Colorimetry/reflected light assessment?

Greetings - new user with an OpenMV Cam M7 on the way. Probably should have asked this question before ordering, but I think I will find a use for this device regardless. Anyway, I hoping to get some high level feedback from those that are familiar with the OpenMV platform about my intended use. I’d like to use the M7 to image a fixed region with controlled lighting, then I’d like to isolate multiple specific regions in the image (8x 2mmx2mm regions for instance) and either perform a color analysis on these region (regions are illuminated with white light) or a light intensity assessment (regions are illuminated with single color LEDs). It seems like this should be readily doable with the M7 given the documentation I’ve reviewed, but I’ve barely gotten my feet wet, so I might be missing something.

What do you think? Have I made an appropriate choice? Or am I heading in to uncharted waters? Any feedback appreciated, and if this does seem like a good fit, if you can point me towards documentation/examples, it would be highly appreciated!


Hi Type11969,

(Disclaimer: I’m just another user, not a dev so take my words with a grain of salt).

I’ve been using the openMV for a very similar thing to what you’ve described, and love it. My application is looking at polarized light, so I have six filters rigidly mounted in front of the camera, and a homogenous background behind it. There’s a stepper driven rotating filter wheel just in front of the lens too.

My rough software workflow is to set the camera on manual exposure, manual gain, manual white balance, take a couple of seconds of frames to let it settle down, then do proper data acquisition. I capture a frame, then for a list of six rectangles that the software looks at, sums the rectangles, find the average pixel intensity of each, then spit the data to serial in a CSV-like format. The PC logs the serial data for later analysis. From memory I was getting around 15Hz frame rate, which is more than enough for me.

While I’m still in the early stages, I am very happy with the speed of development and all the data is as expected so far. It was very satisfying to see the plotted data show a perfect anti-correlation between the opposite pairs of filters.

For your application it sounds like you’ll be doing almost exactly the same thing, except using the colour information, which I haven’t tried yet. However all the objects and methods are nicely thought out, so I think you’ll find it easy going.

Oh, and one tip it took me a while to find: I was summing all pixels in a rectangle to get the average intensity, using nested “for x” and “for y” loops. Turns out this is a really inefficient way to do it.
The better way to get detailed information on a small area, make a new image with image.copy() and pass it a region-of-interest that will crop it down to the desired rectangle. Then you can call image.get_statistics() on that, and avoid having to do any loops yourself.


get_stats() work on an ROI too.

Great feedback, thanks guys. I’m sure I will have many more questions as I progress, but this feedback at least leads me to believe that I’ve come to the right place. Thanks again!