I’m working on a project where I have a camera input and then have several “panels” in this input where I check if the pixels are within a specified threshold.
Basically a 1D array of unsigned chars representing an image then I have several bounding boxes that cover specific areas of this image. I want to check the pixels within each of these rectangles to see if any are within some given threshold.
The simplest method which i’ve implemented is iterate through each pixel, then for each pixel iterate through the bounding boxes and see if the pixel meets the threshold for that box. This works fine but is a bit slow, and also won’t scale very well.
Is there some kind of clever algorithm or solution I should try that will be faster?