Skip to content

Commit

Permalink
hotfix/bad_doc_bad_area_in_img
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Egermaier committed Mar 22, 2022
1 parent 04e1e99 commit 68a5f90
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 68a5f90

Please sign in to comment.