lovely openmv-fb.py and openmv.py won't run

General discussion about topics related to OpenMV.
mad474
Posts: 4
Joined: Tue Aug 16, 2016 4:27 am

lovely openmv-fb.py and openmv.py won't run

Postby mad474 » Tue Dec 12, 2017 12:56 pm

Dear experts,

in early (soon after kickstarter) days we were able to run a script on OpenMV Cam2 and check the camera view or framebuffer by calling openmv-fb.py (importing from openmv.py) on the usb-connected (linux) host. If I try this today with latest firmware (https://github.com/openmv/openmv/tree/m ... re/OPENMV2) and latest openmv-scripts (https://github.com/openmv/openmv/tree/master/usr), this is what happens:

Code: Select all

x@x200:~/openmv/usr$ python ./openmv-fb.py
Traceback (most recent call last):
  File "./openmv-fb.py", line 47, in <module>
    fb = openmv.fb_dump()
  File "/home/x/openmv/usr/openmv.py", line 83, in fb_dump
    buff = __serial.read(num_bytes)
  File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 453, in read
    buf = os.read(self.fd, size-len(read))
OverflowError: signed integer is greater than maximum
How to repair or recover? Is it something trivial? Is it worth noting on github (issue or feature request ;-)?
I'd really be (and I was of course) very grateful for that "small python only standard OpenMV viewport". Thanks alot!
User avatar
iabdalkader
Posts: 624
Joined: Sun May 24, 2015 3:53 pm

Re: lovely openmv-fb.py and openmv.py won't run

Postby iabdalkader » Tue Dec 12, 2017 7:08 pm

Hi, I fixed it for you
https://github.com/openmv/openmv/blob/m ... enmv-fb.py

But note those scripts (and the PyGTK IDE) are no longer supported, we keep them around for reference.
User avatar
kwagyeman
Posts: 2447
Joined: Sun May 24, 2015 2:10 pm

Re: lovely openmv-fb.py and openmv.py won't run

Postby kwagyeman » Tue Dec 12, 2017 8:24 pm

Hi, so with the new version of OpenMV IDE you can create a frame buffer viewer at will. Also, MicroPython offers a script that let's you control any pyboard using it. These two things cover any computer use case I think.

I'll add the MP script to the IDE install package so everyone has it. Using that script you can send the MP board another python script to run and then once you want a viewer you can launch OpenMV IDE via the command line.

In general, the current OpenMV.py script doesn't have any of the battle tested code the IDE is using... I don't want to have to maintain two piles of code so anything involving image output should be handled by the IDE.
Nyamekye,
mad474
Posts: 4
Joined: Tue Aug 16, 2016 4:27 am

Re: lovely openmv-fb.py and openmv.py won't run

Postby mad474 » Wed Dec 13, 2017 5:16 am

@iabdalkader
Works! Thank you very much - also for your fast response.
("s/python/python2" is rather important ... was fast asleep yesterday, sorry!).

@kwagyeman

Code: Select all

$ openmvide/bin/openmvide -open_serial_terminal ttyACM0:115200
works fine, thank you very much. But we have use cases, where its rather demanding to install openmvide on every (aged and dead slow) raspberry ∨ derivate ∨ surrogate.

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 3 guests