Page 1 of 1

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

Posted: Tue Dec 12, 2017 12:56 pm
by mad474
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!

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

Posted: Tue Dec 12, 2017 7:08 pm
by iabdalkader
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.

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

Posted: Tue Dec 12, 2017 8:24 pm
by kwagyeman
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.

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

Posted: Wed Dec 13, 2017 5:16 am
by mad474
@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.