Navigation

    VEYE IMAGING Forum

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

    SOLVED IMX462M pixelformat on RPi5

    Machine Vision camera
    2
    24
    4711
    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.
    • A
      alex_ai @veye_xumm last edited by

      @veye_xumm
      Thank you for documentation, I used wrong algorithm to decode 10 bit packed format.
      According to doc:
      10-bit camera modes pack 4 pixels into 5 bytes. The first 4 bytes contain the 8 most significant bits (MSBs) of each pixel, and the final byte contains the 4 pairs of least significant bits (LSBs).

      I fixed it and can open raw image from python, but anyway need find way how to decode video in real time, because now decode one frame is about 3 seconds.

      Same Image as above:

      correct_decoded.jpg

      veye_xumm 2 Replies Last reply Reply Quote 0
      • veye_xumm
        veye_xumm @alex_ai last edited by

        @alex_ai
        You did a great job.
        I have a plan to use the libcamera framework to support RAW-MIPI-IMX462M, but I haven't started yet. Once it is integrated with libcamera, it will be possible to use the picamera programs.

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

          @alex_ai
          To facilitate the application of the mv series cameras, we have released a beta version of the libcamera support package.
          It doesn't do isp tunning, so you can try it out. Please contact me if you have any questions.

          https://github.com/veyeimaging/libcamera
          https://github.com/veyeimaging/raspberrypi_v4l2

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

            @veye_xumm
            Hi, thank you for update.
            I'm stuck with compiling libcamera now, with same error as here : https://github.com/raspberrypi/libcamera/issues/151

            Did not find solution yet, probably need play with source code, will let you know if any updates.

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

              @alex_ai
              You can use the latest libpisp and try again.

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

                @veye_xumm
                Hi, it helped but I had to use 1.0.6 tag of libpisp, with the latest version I had compile errors.
                Now for command : rpicam-hello -v
                I have this error:
                Screenshot 2024-07-25 at 22.39.46.png

                I used set media script before:
                Screenshot 2024-07-25 at 22.42.04.png

                Maybe forgot something else.

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

                  @alex_ai ./media_setting_rpi5**.sh is not necessary.

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

                    @veye_xumm
                    Hi, I noticed that version of libcamera different on my screenshot (it 0.2.0 but I installed 0.3.0)
                    I uninstalled rpicam-apps and rebuild it from source code again and it uses my version of libcamera now.
                    if execute rpicam-still -v I have next error:
                    Screenshot 2024-07-26 at 09.49.33.png
                    In commit I see added json file only to vc4 folder (for RPi4) , can we add it to pisp folder (for RPi5) it should have name : "mvcam_mono.json"? it has different format and can't use same file from vc4.

                    Also I managed start video by this command:
                    rpicam-still --tuning-file /source/libcamera/src/ipa/rpi/pisp/data/uncalibrated.json -t 0
                    and it works!
                    Screenshot 2024-07-26 at 10.00.57.png
                    But better run it without additional parameters
                    Thank you.

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

                      @veye_xumm
                      One more question, I see now all parameters like gain and exposure managed by libcamera software according to json file, Can we use internal camera ISP for it as before?

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

                        @alex_ai
                        Since our camera supports many models of sensor, we are not using libcamera's built-in isp functionality at this time. The RAW-MIPI-IMX462M camera, therefore, can only be used in manual exposure mode.

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

                          @veye_xumm
                          Thanks,  it means only manual gain/exposure mode.

                          I have one more question but it is a little bit out of topic.
                           
                          Yesterday I tried to take pictures of the night sky to compare with 462 color sensor, even with high gain value stars are not bright as for the same parameters on 462 color (but mono should be more sensitive) . It looks like there is no switching between  LCG and HCG modes or I need to tune some other parameters.
                          Can you advise what could be tuned for this case?

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

                            @veye_xumm
                            With metime and mgain parameters I increased sensitive, but it more noisy than color sensor with ISP, anyway issue with pixel format fixed for me, thank you.

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

                              @veye_xumm
                              By the way, I see that I can read registers of camera by snsreg command but can't find how to write.
                              Is it possible set register 0x3009 value to 0x11 to enable HCG mode?

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

                                @alex_ai
                                Sorry, the ability to write directly to the sensor registers is not provided at this time to prevent confusion over the control of the sensor.
                                I will provide a version of the upgrade package to you as soon as possible.

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

                                  @alex_ai
                                  Sorry for not following up with you on this in a timely manner. Please download an upgrade package with hcg mode support from the link below.
                                  https://www.mediafire.com/file/313db29c5mb4260/RAW-MIPI-IMX462M_C1.06_20240806_upgrade_hcg_tmp.bin/file

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

                                    @veye_xumm
                                    Hi, thank you for firmware update.
                                    Just to double check, is HCG mode always turn on now?

                                    Also for register 0x3009 I got value 0xffff instead ox11 but seems like HCG enabled anyway.
                                    Screenshot 2024-08-06 at 19.45.01.png

                                    I need wait for clear sky to test and provide feedback

                                    PS:
                                    After upgrade at the end it writes: "Failed to write register" message but upgrade done , can I just ignore it?
                                    Screenshot 2024-08-06 at 19.22.50.png

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

                                      @alex_ai
                                      After the upgrade, re-power up the Raspberry Pi.
                                      The actual version number corresponding to this upgrade package is 1.09, please confirm this.

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

                                        @veye_xumm
                                        Yes, version is 1.09 after upgrade
                                        Screenshot 2024-08-07 at 08.44.51.png

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

                                          @alex_ai said in IMX462M pixelformat on RPi5:

                                          I need wait for clear sky to test and provide feedback

                                          Finally tested, for gain value 20 it is looks pretty same with color sensor with ISP, but background no so black as for color sensor.
                                          For me this issue resolved, attached examples to compare (10 seconds stacks)

                                          IMX462 mono
                                          IMX462M_small.jpg

                                          IMX462 color with ISP
                                          IMX462C_small.jpg

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