camera data output

General discussion about topics related to OpenMV.
pcls1026
Posts: 19
Joined: Tue Aug 22, 2017 1:33 am

camera data output

Postby pcls1026 » Wed Aug 23, 2017 8:00 pm

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?

Thanks
Jim Sullivan
User avatar
kwagyeman
Posts: 1248
Joined: Sun May 24, 2015 2:10 pm

Re: camera data output

Postby kwagyeman » Thu Aug 24, 2017 12:42 am

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).
Nyamekye,
pcls1026
Posts: 19
Joined: Tue Aug 22, 2017 1:33 am

Re: camera data output

Postby pcls1026 » Fri Aug 25, 2017 11:52 am

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

I want to look at each pixel's data.

Thanks JLS
User avatar
kwagyeman
Posts: 1248
Joined: Sun May 24, 2015 2:10 pm

Re: camera data output

Postby kwagyeman » Fri Aug 25, 2017 3:44 pm

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.
Nyamekye,
User avatar
kwagyeman
Posts: 1248
Joined: Sun May 24, 2015 2:10 pm

Re: camera data output

Postby kwagyeman » Fri Aug 25, 2017 3:45 pm

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

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 1 guest