imagedata stream

Discussion related to "under the hood" OpenMV topics.
shu higashiyama
Posts: 15
Joined: Tue Oct 16, 2018 3:43 am

imagedata stream

Postby shu higashiyama » Fri Oct 19, 2018 3:35 am

I asked about the directory of the previous image file.
But is my recognition incorrect and sending JPEG data via USB is wrong?
If my recognition is correct I was thinking that it can be checked on a serial monitor, but I can not confirm it.
Please tell me how you are sending camera data

Thank you
User avatar
kwagyeman
Posts: 2401
Joined: Sun May 24, 2015 2:10 pm

Re: imagedata stream

Postby kwagyeman » Fri Oct 19, 2018 12:06 pm

Hi, the camera sends a JPEG data stream over serial to the computer. You can use these scripts to see our protocol:

https://github.com/openmv/openmv/blob/m ... enmv_fb.py
https://github.com/openmv/openmv/blob/m ... yopenmv.py

If you need robust multi-platform code then you'd have to look at how our IDE does it which is much more battle hardened.
Nyamekye,
shu higashiyama
Posts: 15
Joined: Tue Oct 16, 2018 3:43 am

Re: imagedata stream

Postby shu higashiyama » Sat Oct 20, 2018 11:21 pm

Thank you for your quick response
I compiled pyopenmv.py
ImportError: no module named 'serial' occurs
Other errors also occur
I think that there are missing files or misconfiguration
Please point out.
User avatar
kwagyeman
Posts: 2401
Joined: Sun May 24, 2015 2:10 pm

Re: imagedata stream

Postby kwagyeman » Sun Oct 21, 2018 3:03 pm

Hi,

sudo pip install pyserial

That's said, have you run python programs on a Linux device before? You may wish to reference some tutorial stuff. Using those scripts is for advanced users who know what they are doing.
Nyamekye,
shu higashiyama
Posts: 15
Joined: Tue Oct 16, 2018 3:43 am

Re: imagedata stream

Postby shu higashiyama » Sun Oct 21, 2018 11:32 pm

Thank you for your reply

I did it according to your advice

python test2.py
The compile error no longer occurred when I ran it.
Use version python 37-32 (windows 7ver.)

However, on Open MV IDE
ImportError: no module named 'serial'
Has occurred

Please tell me the setting of Open MV IDE

Thank you
User avatar
kwagyeman
Posts: 2401
Joined: Sun May 24, 2015 2:10 pm

Re: imagedata stream

Postby kwagyeman » Sun Oct 21, 2018 11:53 pm

Those script aren't runnable in OpenMV IDE. They are designed to be run on the linux computer by CPython.
Nyamekye,
shu higashiyama
Posts: 15
Joined: Tue Oct 16, 2018 3:43 am

Re: imagedata stream

Postby shu higashiyama » Wed Oct 24, 2018 2:30 am

Thank you for your support

As you gave me advice
Running two files on Ubuntu on Linux
I was able to display the camera image.

But serial data stream
I have not confirmed until

Please advice again.

Thank you
User avatar
kwagyeman
Posts: 2401
Joined: Sun May 24, 2015 2:10 pm

Re: imagedata stream

Postby kwagyeman » Thu Oct 25, 2018 4:40 pm

Hi, you can dump the serial data stream by using this code:

Just execute it in the loop:

https://github.com/openmv/openmv/blob/m ... mv.py#L179

See the 3 lines.
Nyamekye,

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 6 guests