camera data output

I want to do the following using my MV7:

  1. take a picture(“image”)
    2.retrieve the pixel intensity data.
    3.view the pixel intensity data in a file that is readable by the OpenMV IDE editor.
    How do I do this?

Jim Sullivan

Hi, do Snapshot, then do get statistics, then open a file and write the object returned by get statistics to a file. The get_stats object has a str() method so just need to write it to a file.

Do you need the exact code for this? I can easily give you a general outline but giving you the exact code requires me to find some time to do this which I don’t necessarily have (answering this on a train).

HI kwagyeman,
I don’t want to look at statistics.

I want to look at each pixel’s data.

Thanks JLS

Hi, you can get each pixel value directly using get_pixel(). However, it’s very slow to use in Python over a whole image. Get statistics returns the mean/median/mode/min/max/stddev and more for a region of interest which can be as small or large as you like.

Anyway, the choice of what to use is up to you.

Please see the image module documentation for more information about these methods.