Skip to content

Commit

Permalink
Merge pull request #96 from procesor2017/master
Browse files Browse the repository at this point in the history
hotfix/bad_doc_bad_area_in_img
  • Loading branch information
janegermaier authored Mar 22, 2022
2 parents 04e1e99 + 68a5f90 commit 6cf4a2c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 216 deletions.
30 changes: 15 additions & 15 deletions WatchUI/keywords/Image.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,25 +214,25 @@ def compare_screen_without_areas(
a += 4
i += 1

# convert to grey
gray_img1, gray_img2 = self._convert_to_grey(img1, img2)
# convert to grey
gray_img1, gray_img2 = self._convert_to_grey(img1, img2)

# SSIM diff Img
score, diff = self._compute_score(gray_img1, gray_img2)
# SSIM diff Img
score, diff = self._compute_score(gray_img1, gray_img2)

# Threshold diff Img
cnts: Any = self._get_contours(diff)
# Threshold diff Img
cnts: Any = self._get_contours(diff)

# Create frame in diff area
for c in cnts:
(x, y, w, h) = cv.boundingRect(c)
cv.rectangle(img1, (x, y), (x + w, y + h), (0, 0, 255), 2)
cv.rectangle(img2, (x, y), (x + w, y + h), (0, 0, 255), 2)
# Create frame in diff area
for c in cnts:
(x, y, w, h) = cv.boundingRect(c)
cv.rectangle(img1, (x, y), (x + w, y + h), (0, 0, 255), 2)
cv.rectangle(img2, (x, y), (x + w, y + h), (0, 0, 255), 2)

# Show image
self._write_and_log(
score, my_ssim, checked_save_folder, img_format, img1, img2
)
# Show image
self._write_and_log(
score, my_ssim, checked_save_folder, img_format, img1, img2
)

@keyword
def crop_image(
Expand Down
File renamed without changes.
201 changes: 0 additions & 201 deletions docs/index.xml

This file was deleted.

0 comments on commit 6cf4a2c

Please sign in to comment.