Respect excluded regions in overlay rendering
This commit is contained in:
parent
0fd527cd78
commit
6de4059291
|
|
@ -154,19 +154,20 @@ class QtImageProcessor:
|
|||
r, g, b, a = pixels[x, y]
|
||||
if a == 0:
|
||||
continue
|
||||
match = self._matches(r, g, b)
|
||||
excluded = bool(mask_px and mask_px[x, y])
|
||||
total_all += 1
|
||||
if self._matches(r, g, b):
|
||||
draw.point((x, y), fill=highlight)
|
||||
matches_all += 1
|
||||
if excluded:
|
||||
total_excl += 1
|
||||
if self._matches(r, g, b):
|
||||
if match:
|
||||
matches_excl += 1
|
||||
else:
|
||||
total_keep += 1
|
||||
if self._matches(r, g, b):
|
||||
if match:
|
||||
draw.point((x, y), fill=highlight)
|
||||
matches_keep += 1
|
||||
if match:
|
||||
matches_all += 1
|
||||
|
||||
self.overlay_img = overlay
|
||||
self.stats = Stats(
|
||||
|
|
|
|||
Loading…
Reference in New Issue