pkipki
April 13, 2022, 3:32pm
1
Hi,
Is it possible to show two images (Nicla Vision Camera) in the OpenMV IDE? Both cameras are connected via USB 2.0. Showing one camera image is possible. I tried to open another terminal (serial port) but this doesn’t work.
Not in the IDE no, it only supports 1 camera connection at a time, and you can’t start 2 IDEs at the same time.
pkipki
April 14, 2022, 3:24pm
3
Thanks for your answer. Do you have an idea how i could get both images at the same time on the pc?
You could try modifying this:
#!/usr/bin/env python2
# This file is part of the OpenMV project.
#
# Copyright (c) 2013-2021 Ibrahim Abdelkader <iabdalkader@openmv.io>
# Copyright (c) 2013-2021 Kwabena W. Agyeman <kwagyeman@openmv.io>
#
# This work is licensed under the MIT license, see the file LICENSE for details.
#
# An example script using pyopenmv to grab the framebuffer.
import sys
import numpy as np
import pygame
import pyopenmv
from time import sleep
script = """
# Hello World Example
#
# Welcome to the OpenMV IDE! Click on the green run arrow button below to run the script!
This file has been truncated. show original
With this module to capture and display the 2 framebuffers:
#!/usr/bin/env python2
# This file is part of the OpenMV project.
#
# Copyright (c) 2013-2021 Ibrahim Abdelkader <iabdalkader@openmv.io>
# Copyright (c) 2013-2021 Kwabena W. Agyeman <kwagyeman@openmv.io>
#
# This work is licensed under the MIT license, see the file LICENSE for details.
#
# Openmv module with support for multiple cams.
import struct
import sys,time
import serial
import platform
import numpy as np
from PIL import Image
__serial = []
__port = []
This file has been truncated. show original
Actually, you can do this. Use the Open Terminal feature in the IDE. This allows you to open multiple IDE logger/frame buffer windows.
To display to the windows you need to add print(img.compressed_for_ide(), end=‘’) in your code.
The Open Terminal feature is a micropython experience without our full USB DBG window.