mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 22:37:11 +00:00
Keep all OpenCV classifier results (#36294)
This commit is contained in:
parent
22a1452946
commit
a062da05b4
@ -160,6 +160,9 @@ class OpenCVImageProcessor(ImageProcessingEntity):
|
||||
"""Process the image."""
|
||||
cv_image = cv2.imdecode(numpy.asarray(bytearray(image)), cv2.IMREAD_UNCHANGED)
|
||||
|
||||
matches = {}
|
||||
total_matches = 0
|
||||
|
||||
for name, classifier in self._classifiers.items():
|
||||
scale = DEFAULT_SCALE
|
||||
neighbors = DEFAULT_NEIGHBORS
|
||||
@ -177,8 +180,6 @@ class OpenCVImageProcessor(ImageProcessingEntity):
|
||||
detections = cascade.detectMultiScale(
|
||||
cv_image, scaleFactor=scale, minNeighbors=neighbors, minSize=min_size
|
||||
)
|
||||
matches = {}
|
||||
total_matches = 0
|
||||
regions = []
|
||||
# pylint: disable=invalid-name
|
||||
for (x, y, w, h) in detections:
|
||||
|
Loading…
x
Reference in New Issue
Block a user