pyopenmv support multiple camera

Hello everyone! I have three opemmv board to detection left/right/up side object. I want to view every side image in pc via USB meantime.Does pyopenmv.py can be finish this function? Thanks advance!

Someone contributed this script, it supports multiple cameras:

OK.Thanks !@ iabdalkader

Hello iabdalkader! I used the Pyopenmv_multi.Py script On Win10 system and Python2.7 version.But when run the script,Nothing information shows at CMD console or show any Windows. What is issue there?Thanks!

I haven’t tested these scripts on Windows, I’m not sure if they work on Windows. Please try the script on Linux.

Thanks iabdalkader kindly reply.Today, I Test it at ubuntu 16.04 platfrom and python2.7.12.Nothing information show same as win10 system.Can you be try at your linux system?Thanks!

sudo python pyopenmv_multi.py /dev/ttyACM0 test.py

What information do you expect to see ? It just runs test.py. What is in test.py ?

Thanks iabdalkader ! The test.py as follow:

 import sensor, image, time

sensor.reset()                      # Reset and initialize the sensor.
sensor.set_pixformat(sensor.RGB565) # Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.QVGA)   # Set frame size to QVGA (320x240)
sensor.skip_frames(time = 2000)     # Wait for settings take effect.
clock = time.clock()                # Create a clock object to track the FPS.

while(True):
    clock.tick()                    # Update the FPS clock.
    img = sensor.snapshot()         # Take a picture and return the image.
    print(clock.fps())              # Note: OpenMV Cam runs about half as fast when connected
                                    # to the IDE. The FPS should increase once disconnected.

I had installed three openmv4 at pc, want to showing the three image information same time, needed the function same as pyopenmv_fb.py script. Thanks!

It’s working, but it only runs the script for 250ms and then tries to read the text buffer if there’s any output, so you won’t always see output. This is just the test mode, you should import this module and write your own script if you want to run scripts and wait for output, read the framebuffer etc…