Skip to content

Commit

Permalink
Compatible to all opencv-python version from 3.3 to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
navarasu committed Jun 22, 2020
1 parent e3a8280 commit 6ec687a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ It generates CSV ot HTML report which can be used to for accuracy analysis.
By combining the log and test reporting, we can generate an interaractive html to debug and analyse the issue offline.

.. todo::
HTML reporting is in milestone and it will be added in 1.4.0 version.
HTML reporting is in milestone and it will be added in 1.6.0 version.


.. code-block:: python
Expand Down
2 changes: 1 addition & 1 deletion docs/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Contour
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
ret, thresh = cv2.threshold(gray, 127, 255, 0)
image, contours, hierarchy = cv2.findContours(thresh, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
contours, hierarchy = cv2.findContours(thresh, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
# log or show the image by drawing the all contour
log.contours(log.Level.ERROR, contours, img)
Expand Down
20 changes: 10 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "opencv-log"
version = "1.3.0"
version = "1.4.0"
description = "OpenCV based visual logger for debugging,logging and testing image processing code"
authors = ["Navarasu <navarasu@outlook.com>"]
readme = 'README.rst'
Expand All @@ -16,17 +16,17 @@ packages = [ { include = "cvlog" }]

[tool.poetry.dependencies]
python = "^3.5"
opencv-python = "^3.4"
opencv-python = ">=3.3"

[tool.poetry.dev-dependencies]
pytest = "^3.0"
flake8 ="^3.7"
coverage="^4.5"
coveralls="^1.8"
beautifulsoup4="4.8.2"
sphinx="2.4.4"
sphinx-rtd-theme="0.4.3"
sphinx-copybutton="^0.2.10"
pytest = ">=3.0"
flake8 =">=3.7"
coverage=">=4.5"
coveralls=">=1.8"
beautifulsoup4=">=4.8.2"
sphinx=">=2.4.4"
sphinx-rtd-theme=">=0.4.3"
sphinx-copybutton=">=0.2.10"

[build-system]
requires = ["poetry>=0.12"]
Expand Down
4 changes: 2 additions & 2 deletions tests/test_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_contours():
log.set_mode(log.Mode.LOG)
imgray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
ret, thresh = cv2.threshold(imgray, 127, 255, 0)
image, contours, hierarchy = cv2.findContours(thresh, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
contours, hierarchy = cv2.findContours(thresh, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
log.contours(log.Level.ERROR, contours, img)
logitem = get_html('log/cvlog.html').select('.log-list .log-item')
assert logitem[0].select('.log-type')[0].text == 'contours'
Expand All @@ -91,7 +91,7 @@ def test_message():
log.set_mode(log.Mode.LOG)
imgray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
ret, thresh = cv2.threshold(imgray, 127, 255, 0)
image, contours, hierarchy = cv2.findContours(thresh, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
contours, hierarchy = cv2.findContours(thresh, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
message = 'Lorem ipsum dolor sit amet, ne persius reprehendunt mei. Ea summo elitr munere his, et consul offendit recteque sea, quis elit nam ut.'
log.image(log.Level.ERROR, img)
log.contours(log.Level.ERROR, contours, img, msg=message)
Expand Down

0 comments on commit 6ec687a

Please sign in to comment.