Page 1 of 1

camera data output

Posted: Wed Aug 23, 2017 8:00 pm
by pcls1026
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

Re: camera data output

Posted: Thu Aug 24, 2017 12:42 am
by kwagyeman
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).

Re: camera data output

Posted: Fri Aug 25, 2017 11:52 am
by pcls1026
HI kwagyeman,
I don't want to look at statistics.

I want to look at each pixel's data.

Thanks JLS

Re: camera data output

Posted: Fri Aug 25, 2017 3:44 pm
by kwagyeman
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.

Re: camera data output

Posted: Fri Aug 25, 2017 3:45 pm
by kwagyeman
Please see the image module documentation for more information about these methods.