My project is REM sleep detector, and the provided pictures show the contour of my eyelid. As my eye looks in directions, this contour moves in a distinct way. For lack of a better solution, my first attempt is to draw a grid of rois on my video stream, with that in place I want to use the countnonzero function or use blob detection on the rois. Depending on which rois in the grid change values, movement and direction is detected. (I am sure there is better way)
Problem: I can not specify one or several rois of my choice, the function always work only on the entire image. How do I retrieve values from each roi specifically? Rois are set up by means of multiple rectangle functions. Code is in python. Any help greatly appreciated.
Asked
Active
Viewed 224 times
0
-
1image_block = image[y1:y2,x1:x2] - (x1,y1),(x2,y2) corners of ROI – Hihikomori Dec 27 '20 at 16:21
-
related: https://forum.opencv.org/t/motion-detection-by-means-of-roi-grid/547 – Christoph Rackwitz Dec 28 '20 at 00:00
-
Thanks to both of you, have a good rest of the day – volker Dec 31 '20 at 19:59