Giter VIP home page Giter VIP logo

ivport-v2's People

Contributors

ivmech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ivport-v2's Issues

self._bus.write_byte_data - IOError: [Errno 5] Input/output error

Follwoing your guide, I get to this step:

 python init_ivport.py 

giving me back an error:

Traceback (most recent call last):
  File "init_ivport.py", line 6, in <module>
    iviic = IIC.IIC(addr=(0x70), bus_enable =(0x01))
  File "/home/pi/Desktop/ivport-v2/IIC.py", line 47, in __init__
    self._write(iic_register, config)
  File "/home/pi/Desktop/ivport-v2/IIC.py", line 50, in _write
    self._bus.write_byte_data(self._addr, register, data)
IOError: [Errno 5] Input/output error

Before I was getting a smbus error which I had to enable i2c in the raspi-config

How can I fix this problem?
My cables seem to be connected correctly.

Camera not detected on restart (except reboot)

I followed the guide to setting up ivport-v2 on my RPi and running sudo python2 test_ivport.py fine, if I also run sudo reboot it still works. When I run vcgencmd get_camera I get supported=1 detected=1. So everything works.

However when I poweroff my device and turn it back on (either by running sudo poweroff/sudo shutdown/simply plugging it out) I run sudo python2 test_ivport.py and get picamera.exc.PiCameraError: Camera is not enabled. Try running 'sudo raspi-config' and ensure that the camera has been enabled.

However when I run raspi-config get_camera and raspi-config get_i2c I get 0 (which means it's on https://pi3g.com/2021/05/20/enabling-and-checking-i2c-on-the-raspberry-pi-using-the-command-line-for-your-own-scripts/)

And when I run vcgencmd get_camera I get supported=1 detected=0

So I enable camera and reboot and I get an I/O error that subsides when I re-enable i2c and reboot. This means that ivport cannot detect my camera and i2c unless I explicitely do it and reboot everytime I want to use it. This is not sustainable for me as I need to take pictures reliably (I won't be logging into it to take pics) and the RPi may turn off from time to time.

Also the issue is definitely not related to forgetting to run init_ivport.py I run it everytime I boot up my RPi.

Extra Info:

  • Specs: RPi 3b+
  • OS: Version 10.11 Buster

Cam. 2 Problem ~ IVPort Dual V2 Raspberry Pi Camera Module V2 Multiplexer

I've already bought two of your Multiplexer modules (one for v1 camera and one for v2 -DUAL-). I read on your site that "There are some different videos while switching view source between 2 Different raspberry Pi Camera Module V2 with using IVPort Dual V2 module" but I couldn't found them.

I tried successfully to run your test code from github, but I 've no image from the second camera. When it switches to camera 2 it returns a semi-destroyed frame but with image from the first camera. So I suppose that the module doesn't "see" the camera 2.

To examine this I pull out the second RPi camera and the problem still remains. I got 2 pictures from the same first camera with the second image destroyed ("snow" effect on image).

-I work on rpi 3 with V2 cameras.

-Above tests were implemented through your example code for image capturing -test_ivport.py-
Is there some pin configuration that I've to change in order to see the right image?

Thanks a lot,
Thanasis Pap.

backward compability?

I'm out of my sony sensors and wanted to test it with old OV5647s' now getting this error, weird!

python test_ivport.py

Traceback (most recent call last):
File "_ctypes/callbacks.c", line 314, in 'calling callback function'
File "/home/pi/Desktop/ivport-v2/picamera/camera.py", line 129, in _control_callback
"Received unexpected camera control callback event, 0x%08x" % buf[0].cmd)
picamera.exc.PiCameraRuntimeError: Received unexpected camera control callback event, 0x4f525245
Traceback (most recent call last):
File "test_ivport.py", line 60, in
main()
File "test_ivport.py", line 56, in main
picam_capture()
File "test_ivport.py", line 33, in picam_capture
iv.camera_capture("picam", use_video_port=False)
File "/home/pi/Desktop/ivport-v2/ivport.py", line 142, in camera_capture
self.picam.capture(filename + "_CAM" + str(self.camera) + '.jpg', **options)
File "/home/pi/Desktop/ivport-v2/picamera/camera.py", line 1619, in capture
'Timed out waiting for capture to end')
picamera.exc.PiCameraRuntimeError: Timed out waiting for capture to end

etc. also sometimes something saying like "out of resources, not only memory"

picamera.exc.PiCameraRuntimeError: Received unexpected camera control callback event, 0x4f525245

Dear all,

I have bought a IVPORT v2 multiplexer and I am having problem to make it work. Specifically, it worked once, then I rebooted and, after that, it did not work anymore. I get this error

$ python test_ivport.py
Traceback (most recent call last):
File "_ctypes/callbacks.c", line 314, in 'calling callback function'
File "/home/pi/Desktop/Phenotiki/env/ivport-v2/picamera/camera.py", line 129, in _control_callback
"Received unexpected camera control callback event, 0x%08x" % buf[0].cmd)
picamera.exc.PiCameraRuntimeError: Received unexpected camera control callback event, 0x4f525245
Traceback (most recent call last):
File "test_ivport.py", line 60, in
main()
File "test_ivport.py", line 56, in main
picam_capture()
File "test_ivport.py", line 33, in picam_capture
iv.camera_capture("picam", use_video_port=False)
File "/home/pi/Desktop/Phenotiki/env/ivport-v2/ivport.py", line 142, in camera_capture
self.picam.capture(filename + "_CAM" + str(self.camera) + '.jpg', **options)
File "/home/pi/Desktop/Phenotiki/env/ivport-v2/picamera/camera.py", line 1619, in capture
'Timed out waiting for capture to end')
picamera.exc.PiCameraRuntimeError: Timed out waiting for capture to end

This is what I get with i2cdetect
$ i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: 10 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- 64 -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --

and this with vcgencmd
$ vcgencmd get_camera
supported=1 detected=1

Everything should work, but apparently something is off and I cannot figure out what is wrong.

Below you'll find a pic of the system. I chose the setup A as jumper.

img_20170504_170255

Thanks a lot for your help

Changes made in picamera?

I'm trying to get an IVPort v2 dual to work with Node-RED and need to use the default picamera library. So I've been trying to figure out exactly what changes you've made to it, and which of them must be present to get stock picamera to work. I'm specifically looking at the iviic = IIC.IIC(addr=(0x70), bus_enable =(0x01)) and iviic.write_control_register((0x01)) It seems you define an i2c device with the first command though I expected this would be in the format address=, register=, value=. I'm unable to locate the repository for the IIC Python library and would like to know what exactly these two commands do?

Image from camera 2 is stripped

I have a problem with an IVPort V2 quad multiplexer. Image from camera 2 is always stripped. I have changed the ribbon cable and the result is still the same. The image from camera 2 looks similar than image from camera 1.

My Python code is :

#!/usr/bin/env python

import ivport

iv = ivport.IVPort(ivport.TYPE_QUAD2, iv_jumper='A')

iv.camera_open(camera_v2=True, resolution=(640,480))
iv.camera_change(1)
iv.camera_capture("picam", use_video_port=False)
iv.camera_change(2)
iv.camera_capture("picam", use_video_port=False)
iv.camera_change(3)
iv.camera_capture("picam", use_video_port=False)
iv.camera_change(4)
iv.camera_capture("picam", use_video_port=False)
iv.close()

I uploaded images taken with the multiplexer :
Camera 1
picam_cam1
Camera 2
picam_cam2
Camera 3
picam_cam3
Camera 4
picam_cam4

Pi Camera not detected with IVPort Dual V2

I currently have an ivport v2 dual module connected to my rapsberry pi 3 model B v1.2, to which I connect a single camera (pi camera rev 1.3, ov5647 sensor) for testing. I followed the commands listed in this git: https://github.com/ivmech/ivport-v2, but when you get to the command: vcgencmd get_camera, everything is 0.

I've done a lot of research to understand the problem and fix it. I've added the following lines to the /boot/config.txt file :

Capture d’écran du 2023-12-06 12-30-17

lines added :
dtoverlay=ov5647
start_x=1
gpu_mem=128

I have updated the firmware : sudo rpi-update.

but still the same problem : Capture d’écran du 2023-12-06 12-29-32

(to be sure the cameras work correctly without the module with libcamera i've already tried it)

Here are the traces of the i2cdetect -y 1 command with a camera connected :

Capture d’écran du 2023-12-06 12-28-55

How to capture stereo image pair?

HI,

I have the IVMECH v2 and want to capture a image pair (1 from each of the 2 cameras) as close together as possible. Which code should I be looking at. I tried 3 functions from test_ivport_quad.py:

picam_capture()
images way too far apart sometimes 400ms seconds apart. I need like 30ms apart max.

still_capture()
even farther apart than picam_capture(), may improve if I get rid of preview?

picam_sequence()
can't get the camera to switch reliably in 2 images, often captures 2 images with same camera.

Can someone point me to where I can find code that will capture exactly 1 image from each camera as close together as possible?

Have trouble with connection, errno 121

I use Rpi 3 and 2 camera v2.1 on the ivport V2 Dual, but when I run the 'python init_ivport.py', it shows the error no. is 121, like no response from the I2c device. Has anyone been this before? Really need your help!!!

test code not working

hello i recently bought the ivport V2 dual and everything works up untill the part where i try to run the code to test the cameras. the module is detected supported 1 detected 1 and everything but when i try to run the code
import ivport

raspistill capture

def capture(camera):
"This system command for raspistill capture"
cmd = "raspistill -t 10 -o still_CAM%d.jpg" % camera
os.system(cmd)

iv = ivport.IVPort(ivport.TYPE_DUAL2)
iv.camera_change(1)
capture(1)
iv.camera_change(2)
capture(2)
iv.close()
it says no module named ivport im using a raspberry pi model 3 B+ with two cameras that are V2.1 witht the device gpio pins inserted farthest away form the usb ports first i try thepreview camera and one shows but again the code is not working any ideas why also im usiong python shell 3.5.3 also python test_ivport.py
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
Traceback (most recent call last):
File "test_ivport.py", line 60, in
main()
File "test_ivport.py", line 56, in main
picam_capture()
File "test_ivport.py", line 31, in picam_capture
iv.camera_open()
File "/home/pi/ivport-v2/ivport.py", line 135, in camera_open
self.picam = picamera.PiCamera(camera_v2=camera_v2, resolution=resolution, framerate=framerate)
File "/home/pi/ivport-v2/picamera/camera.py", line 507, in init
self.STEREO_MODES[stereo_mode], stereo_decimate)
File "/home/pi/ivport-v2/picamera/camera.py", line 664, in _init_camera
prefix="Camera component couldn't be enabled")
File "/home/pi/ivport-v2/picamera/exc.py", line 191, in mmal_check
raise PiCameraMMALError(status, prefix)
picamera.exc.PiCameraMMALError: Camera component couldn't be enabled: Out of resources (other than memory)

Initalisation sequence

HI

I am finding my ivport-v2 works well however, I have to perform the following in order to get it to work.I am using r pi B.

I plug in the usb on the Pi and boot up.
I run.
vcgencmd get_camera
which returns
selected=1 detected=0
until I run init_ivport.py
and then reboot again.
then I get
selected=1 detected=1

from this point it works. Do you know if I can restart a service instead of having to reboot? Or why else I can do to get round this.

board issue

I can get the board working since it looks like that and giving:

$ vcgencmd get_camera
supported=1 detected=0

I have tried the listed issue's solution but not get it work..!!
kindly help..!!
the board looks like that:

190817-IVPort-board2

190817-IVPort-board1

Do we have to reboot everytime?

I am trying to find a way to not have to run init_ivport.py and reboot everytime.
Has anyone found a solution?
I was thinking of creating a cron so that it runs the script at the moment of booting but doesnt seem to work..
Thank you!

supported=0, detected=0

I want to use two cameras.

I came to the i2cdetect step.

but
~$ vcgencmd get_camera
supported=0 detected=0
The output is as above.

What should I do?

I want to use CAM1 and CAM3. How do I connect the jumpers?

how better the system can perform?

The manual is too simple to get more information. If four cameras are conncected, is it possible for the system to be perfoming at 1280*720p wtih at least 5fps per camera?

mmal : No data recived from sensor

Hi,

i have just bought from you an ivport-v2 and I have a problem with one of my camera. I would like to use standard Rpi camera and NOIR Rpi camera. Both are V2 of course. Both have same sensor ( sony IMX219 ) and the only on difference, as we can read on official Rpi site (https://www.raspberrypi.org/products/pi-noir-camera-v2/) is that, NOIR have no infrared filter which is obvious.

After whole install I recived 0 errors at all but when I ran test_ivport.py, I got an image from "normal" camera and error from second one "mmal :No data recived from sensor. Check all connections, including the Sunny one on the camera board".

After that I checked my NOIR camera and it works fine.

Can you help me with this problem? I have no idea at this moment how to solve this. I think I checked everything and seems to be fine. Just no data.

I hope there is a way to make it work in other way this multiplexer is just useless for me.

Edit

I have tested multiplexer just with one camera connected. If camera was connected to CAM1 there was no problem at all either for "normal" or noir camera. after i2cdetect -y 1 command i got 0x10 0x64 and 0x70

But if I connect either normal or noir camera to CAM2 and type command i2cdetect -y 1 i get only 0x70 and I am not able to take a still picture.
I am getting this error
mmal: Cannot read cameara info, keeping the defaults for OV5647 mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM) mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1) mmal: Failed to create camera component mmal: main: Failed to create camera component mmal: Camera is not detected. Please check carefully the camera module is installed correctly

Overlapping camera1 and camera2 frames in ROS

Hello everyone :)

I am using an IVPORT-V2 multiplexer for my masters' thesis.
The multiplexer is connected to Raspberry Pi, Model B VI.2. Raspberry runs on Ubuntu Mate 18.04., with ROS Melodic.
I have two Raspberry Pi Camera V2 connected to the multiplexer, one is Noir and the other one is regular.
Using iv.camera_change and iv.camera_capture I am enabled to access every camera's frames.
Every frame I convert with cv_bridge and then I publish that frame as ROS message, type Image from sensor_msgs.msg. There are two topics for each camera, camera_topic1 and camera_topic2. And everything seems to works great :D

Then I have two Subscribers, that are on my laptop, takes that frames, and show it through cv2.imshow. The problem is that approximately every 10 seconds, frame from camera_topic1 shows in camera2 cv2.imshow windows, and I got this pink stripe. It is important for me to have the right picture in every moment because the processed images will be used in the neural network.

Here are the pictures for a better understanding.
Expected (without pink stripe) :
Screenshot from 2020-05-26 17-09-09

Error :
Screenshot from 2020-05-26 17-09-24

Does anybody have an idea? It would really mean a lot to me.
Thanks in advance. :)

supported=1 detected=0

I have IVPORT DUAL V2 connected to two V2.1 cameras on RPi 3 model B. I can detect both ivport dual and camera module successfully with i2cdetect:

tamme@tamme-desktop:~/ivport-v2$ i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: 10 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- 64 -- -- -- -- -- -- -- -- -- -- -- 
70: 70 -- -- -- -- -- -- --                         

But when I test for cameras they are not detected:

tamme@tamme-desktop:~/ivport-v2$ vcgencmd get_camera
supported=1 detected=0

What could be causing this? Internet suggests to check the ribbon cables, but I've triple-checked all cables dozen times and pretty confident they should be ok. Also both cameras work when connected directly to RPi.

Could it be that I didn't bother to solder the ivport card to gpio connectors? I just wanted to test it first and tilted it in such a way that all pins should be connected. The setup looks like this:

img_2421

Unable to run test script

Hallo, I bought one of your board to use in a project I followed your installation instructions but when I run the scripts I got this error:

pi@raspberrypi:~/ivport-v2 $ python init_ivport.py 
pi@raspberrypi:~/ivport-v2 $ python test_ivport.py 
Traceback (most recent call last):
  File "_ctypes/callbacks.c", line 315, in 'calling callback function'
  File "/home/pi/ivport-v2/picamera/camera.py", line 129, in _control_callback
    "Received unexpected camera control callback event, 0x%08x" % buf[0].cmd)
picamera.exc.PiCameraRuntimeError: Received unexpected camera control callback event, 0x4f525245

Traceback (most recent call last):
  File "test_ivport.py", line 60, in <module>
    main()
  File "test_ivport.py", line 56, in main
    picam_capture()
  File "test_ivport.py", line 33, in picam_capture
    iv.camera_capture("picam", use_video_port=False)
  File "/home/pi/ivport-v2/ivport.py", line 142, in camera_capture
   self.picam.capture(filename + "_CAM" + str(self.camera) + '.jpg', **options)
  File "/home/pi/ivport-v2/picamera/camera.py", line 1617, in capture
    if not encoder.wait(self.CAPTURE_TIMEOUT):
  File "/home/pi/ivport-v2/picamera/encoders.py", line 848, in wait
    result = self.event.wait(timeout)
  File "/usr/lib/python2.7/threading.py", line 614, in wait
    self.__cond.wait(timeout)
  File "/usr/lib/python2.7/threading.py", line 359, in wait
    _sleep(delay)

Do you have an idea about where the problem should be?
BTW I'm using two identical RaspiCAM V2 modules in my setup.

Best regards,
weirdgyn

Compatibilty with Nvidia jetson nano

Hi

Is this shield compatible with the Nvidia Jetson Nano to build a stereo camera system?
Can switching between the cameras be automated (e.g., after each frame)?

Thnx

Cluster ivport-v2, x8 camera(V2) does not working

Cluster ivport-v2, x8 camera(V2) does not working

x8 cameras, x2 ivport-v2
ivport-v2(first layer) : 'A' jumper bridged / 'X','Y' jumper no bridged.
ivport-v2(second layer) : 'B' jumper bridged / 'X' jumper bridged.

But, ivport-v2(first layer) works without ivport-v2(second layer)

help me

Hardware/ setup issue with ivport-V2 board

Please see anfegori91's post at ivmech/ivport#21 (comment)
It's got a nice picture of the issue. Re-posting here since our questions are about the V2.

Looks like my board has the R5-R6 shorted together. Are they electrically connected on that one side anyway?

I'm also confused with some of the jumpers, and the manual hasn't been much help. No idea what X and Y are, and if the GPIO (next to 3V3) needs to be jumper-ed as well.

I did try it out. the Pi can't see the camera with the mux unit in place. I have the two A jumpers shorted and have tried with and without the GPIO pins 7,11, and 12 set for each camera. Never got a connected camera.

Camera and all cables still work after taking the mux board out of the path.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.