Navigation

    VEYE IMAGING Forum

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Recent
    • Popular
    • Users
    • WIKI
    • veye.cc

    UNSOLVED RAW-MIPI-SC132M camera working in raspberry pi 5. Cannot be configured to work with the libcamera2 and opencv libraries

    CS MIPI camera
    3
    17
    2688
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • veye_xumm
      veye_xumm @alex_ai last edited by

      @alex_ai
      RAW-MIPI-SC132M does not support libcamera, nor software based on libcamera. Direct invocation via the v4l2 API is required.

      A S 3 Replies Last reply Reply Quote 0
      • A
        alex_ai @veye_xumm last edited by

        Hi @veye_xumm, sorry for confusion, in previous time you guided me to install custom libcamera for veye_mvcam driver and seems like this step is outdated (but I'm still using libcamera).

        @Sheko try another pipeline in openCV:

        v4l2src device=/dev/video0 ! video/x-raw,format=UYVY, width=1920, height=1080,framerate=30/1 ! videoconvert ! video/x-raw,format=GRAY8 ! appsink sync=1
        
        S 1 Reply Last reply Reply Quote 0
        • S
          Sheko @alex_ai last edited by

          @alex_ai

          command not found(((

          ~ $ v4l2src device=/dev/video0 ! video/x-raw,format=UYVY, width=1920, height=1080,framerate=30/1 ! videoconvert ! video/x-raw,format=GRAY8 ! appsink sync=1
          bash: v4l2src: command not found
          
          
          A 1 Reply Last reply Reply Quote 0
          • S
            Sheko @veye_xumm last edited by

            @veye_xumm
            I got the title wrong - I meant Picamera2. I need to start working in Opencv first.

            ~ $ rpicam-hello
            [3:42:19.883111801] [3703]  INFO Camera camera_manager.cpp:330 libcamera v0.5.2+99-bfd68f78
            [3:42:19.894406703] [3706]  INFO RPI pisp.cpp:720 libpisp version v1.2.1 981977ff21f3 29-04-2025 (14:13:50)
            [3:42:19.895982049] [3706]  WARN CameraSensorProperties camera_sensor_properties.cpp:499 No static properties available for 'mvcam'
            [3:42:19.896044820] [3706]  WARN CameraSensorProperties camera_sensor_properties.cpp:501 Please consider updating the camera sensor properties database
            [3:42:19.899758099] [3706] ERROR IPAProxy ipa_proxy.cpp:185 Configuration file 'mvcam_mono.json' not found for IPA module 'rpi/pisp'
            [3:42:19.899815776] [3706] ERROR IPARPI ipa_base.cpp:152 Could not create camera helper for mvcam
            [3:42:19.899835354] [3706] ERROR RPI pipeline_base.cpp:814 Failed to load a suitable IPA library
            [3:42:19.899850764] [3706] ERROR RPI pisp.cpp:947 Failed to register camera mvcam 10-003b: -22
            Made X/EGL preview window
            ERROR: *** no cameras available ***
            
            
            1 Reply Last reply Reply Quote 0
            • A
              alex_ai @Sheko last edited by

              @sheko
              This is pipeline which need place to openCV instead:

              cap = cv2.VideoCapture('/dev/video0')
              

              to run it from command line you need use gstreamer, try :

              gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=UYVY, width=1920, height=1080,framerate=30/1 ! videoconvert ! video/x-raw,format=GRAY8 ! appsink sync=1
              
              S 1 Reply Last reply Reply Quote 0
              • S
                Sheko @alex_ai last edited by

                @alex_ai

                ~ $ gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=UYVY, width=1920, height=1080,framerate=30/1 ! videoconvert ! video/x-raw,format=GRAY8 ! appsink sync=1
                Setting pipeline to PAUSED ...
                Pipeline is live and does not need PREROLL ...
                Pipeline is PREROLLED ...
                Setting pipeline to PLAYING ...
                New clock: GstSystemClock
                ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
                Additional debug info:
                ../sys/v4l2/gstv4l2src.c(976): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
                Buffer pool activation failed
                Execution ended after 0:00:00.003958838
                ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
                Setting pipeline to NULL ...
                Additional debug info:
                ../libs/gst/base/gstbasesrc.c(3132): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
                streaming stopped, reason not-negotiated (-4)
                Freeing pipeline ...
                
                
                A 1 Reply Last reply Reply Quote 0
                • A
                  alex_ai @Sheko last edited by

                  @sheko please update pipeline with your camera parameters (width, height, framerate). I just copied mine.

                  S 1 Reply Last reply Reply Quote 0
                  • S
                    Sheko @alex_ai last edited by

                    @alex_ai How to do this?

                    A 1 Reply Last reply Reply Quote 0
                    • S
                      Sheko @veye_xumm last edited by

                      @veye_xumm said in RAW-MIPI-SC132M camera working in raspberry pi 5. Cannot be configured to work with the libcamera2 and opencv libraries:

                      Требуется прямой вызов через v4l2 API.

                      Direct call via v4l2 API? What does that mean? Give an example for Python.

                      1 Reply Last reply Reply Quote 0
                      • A
                        alex_ai @Sheko last edited by

                        @sheko
                        As I see your standard camera parameters are: 1080x1280 120fps
                        And as it configured in python script for first step try:

                        cap = cv2.VideoCapture('v4l2src device=/dev/video0')
                        

                        if still failing try with passing parameters to gstreamer:

                        cap = cv2.VideoCapture('v4l2src device=/dev/video0 ! video/x-raw,format=UYVY, width=1080, height=1280,framerate=120/1 ! videoconvert ! video/x-raw,format=GRAY8 ! appsink sync=1')
                        

                        or from command line to check if gstreamer works without python

                        gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=UYVY, width=1080, height=1280,framerate=120/1 ! videoconvert ! video/x-raw,format=GRAY8 ! appsink sync=1
                        

                        if still failing try RAW8 format

                        gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=RAW8, width=1080, height=1280,framerate=120/1 ! appsink sync=1
                        

                        if still failing, can't help, I don't have this sensor.

                        S 1 Reply Last reply Reply Quote 0
                        • S
                          Sheko @alex_ai last edited by

                          @alex_ai
                          error

                          ~ $ cap = cv2.VideoCapture('v4l2src device=/dev/video0
                          bash: syntax error near unexpected token `('
                          
                          
                          ~ $ cap = cv2.VideoCapture('v4l2src device=/dev/video0 ! video/x-raw,format=UYVY, width=1080, height=1280,framerate=120/1 ! videoconvert ! video/x-raw,format=GRAY8 ! appsink sync=1')
                          bash: syntax error near unexpected token `('
                          
                          
                          ~ $ gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=UYVY, width=1080, height=1280,framerate=120/1 ! videoconvert ! video/x-raw,format=GRAY8 ! appsink sync=1
                          Setting pipeline to PAUSED ...
                          Pipeline is live and does not need PREROLL ...
                          Pipeline is PREROLLED ...
                          Setting pipeline to PLAYING ...
                          New clock: GstSystemClock
                          ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
                          Additional debug info:
                          ../sys/v4l2/gstv4l2src.c(976): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
                          Buffer pool activation failed
                          ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
                          Execution ended after 0:00:00.003339447
                          Additional debug info:
                          ../libs/gst/base/gstbasesrc.c(3132): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
                          streaming stopped, reason not-negotiated (-4)
                          Setting pipeline to NULL ...
                          Freeing pipeline ...
                          
                          
                          ~ $ gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=RAW8, width=1080, height=1280,framerate=120/1 ! appsink sync=1
                          WARNING: erroneous pipeline: could not link v4l2src0 to appsink0, v4l2src0 can't handle caps video/x-raw, format=(string)RAW8, width=(int)1080, height=(int)1280, framerate=(fraction)120/1
                          
                          1 Reply Last reply Reply Quote 0
                          • S
                            Sheko last edited by

                            It turns out the manufacturer is ignoring requests for help. Only kind and caring people are helping... The problem remains unresolved.

                            veye_xumm 1 Reply Last reply Reply Quote 0
                            • veye_xumm
                              veye_xumm @Sheko last edited by

                              @sheko Sorry, I just got back from the Chinese New Year holiday. Regarding using the RAW-MIPI-SC132M on the Raspberry Pi 5, I suggest you primarily refer to this document. It covers driver installation, how to use the V4L2 mode, and methods for previewing using OpenCV.
                              https://wiki.veye.cc/index.php/Mv_series_camera_appnotes_4_rpi

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post