Navigation

    VEYE IMAGING Forum

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

    SOLVED MV-MIPI-IMX296M 修改参数,保存重启后参数未改变

    General Discussion
    2
    23
    2617
    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.
    • W
      WackyRabbits @veye_xumm last edited by WackyRabbits

      @veye_xumm
      执行了./make.sh脚本,未生成可执行文件
      按照您的说法,再次进行了操作。重启后,查看参数设置成功,预览画面仍是黑屏
      操作如下:
      【操作】

      1. 将目录./mv_tools_jetson/i2c_tools下的sources及lut_rw文件替换为github路径中的文件
      2. 在路径./mv_tools_jetson/i2c_tools/sources下执行./make.sh
      3. 在路径./mv_tools_jetson/i2c_tools下执行
        ./mv_mipi_i2c.sh -w -f lutenable -p1 1
        ./mv_mipi_i2c.sh -w -f lut -p1 ./lut_samples/lut_gamma1.2_10bitdepth.txt
        画面显示变化,并保存参数
      4. 重启机器,查看lutenable及lut文件,修改成功
      5. 打开预览窗口,画面黑色显示
        微信图片_20230322154632(1)(1).jpg
      veye_xumm 1 Reply Last reply Reply Quote 0
      • veye_xumm
        veye_xumm @WackyRabbits last edited by

        @wackyrabbits

        1. 执行了就生成了,在i2c_tools目录。你认真看看。
        2. 上午给你的github目录是树莓派平台的,不要用那个目录中的lut_rw文件,两个平台的可执行文件不兼容的。 明白不?

        建议你的步骤

        1. 删掉你现在的lut_rw
        2. 执行./make.sh,会生成一个lut_rw的。

        然后再执行测试。

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

          @veye_xumm
          预览画面确实是黑色的。按照您的建议操作,删除lut_rw
          写入lutenable及lut的数据,重启后,读取的数据也是修改后的,但是预览画面确实是黑色的。
          难道树莓派平台github目录的sources无法直接与jetson平台中的sources直接替换?
          1)黑屏若是因为lut写操作一直没有成功过,那为何重启后我读取的lut文件中的数值与我写入的数值是一样的呢?

          另外我发现存在以下问题

          • 在没有开启预览画面的情况下,去修改lut文件,在打开预览模式,虽然显示是更新成功的,但是画面显示是黑色的,再次执行修改lut的命令,画面显示才不是黑色的
          veye_xumm 1 Reply Last reply Reply Quote 0
          • veye_xumm
            veye_xumm @WackyRabbits last edited by

            @wackyrabbits
            忘掉以前的种种吧。
            请按照如下步骤,在jetson xavier nx上,一步一步操作:
            一、视频预览

            export WIDTH=1440
            
            export HEIGHT=1088
            
            export FPS=60
            
            v4l2-ctl -d /dev/video0 --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat=UYVY
            
            v4l2-ctl -d /dev/video0 --set-ctrl frame_rate=$FPS
            
            gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,format=(string)UYVY, width=(int)$WIDTH, height=(int)$HEIGHT, framerate=(fraction)$FPS/1" ! nvvidconv ! "video/x-raw(memory:NVMM),format=(string)I420" ! nv3dsink sync=false
            

            二、调试lut

            1. 从这个github上下载最新的mv_tools_jetson
             git clone https://github.com/veyeimaging/nvidia_jetson_veye_bsp.git 
            

            如果由于某种原因下载不了,换个下载方式。
            2. 修改lut。

            cd mv_tools_jetson/i2c_tools/
            
            $ ./mv_mipi_i2c.sh -w -f lut -p1 ./lut_samples/lut_gamma1.2_10bitdepth.txt -b 9
            w lut from file : ./lut_samples/lut_gamma1.2_10bitdepth.txt successs
            
            1. 在lut使能和不使能状态切换。
             ./mv_mipi_i2c.sh -w -f lutenable -p1 1 -b 9 
            
             ./mv_mipi_i2c.sh -w -f lutenable -p1 0 -b 9 
            

            此时可以看到图像明显的变化。
            4. lut使能时,更换lut

             ./mv_mipi_i2c.sh -w -f lutenable -p1 1 -b 9 
            
            $ ./mv_mipi_i2c.sh -w -f lut -p1 ./lut_samples/lut_gamma1.2_10bitdepth.txt -b 9
            w lut from file : ./lut_samples/lut_gamma1.2_10bitdepth.txt successs
            
            $ ./mv_mipi_i2c.sh -w -f lut -p1 ./lut_samples/lut_gamma0.8_10bitdepth.txt -b 9
            w lut from file : ./lut_samples/lut_gamma0.8_10bitdepth.txt successs
            
            1. 读出lut曲线
            ./mv_mipi_i2c.sh -r -f lut -p1 ./readout_lut.txt -b 9 
            

            可以对比读出的./readout_lut.txt和上次写入的lut_gamma0.8_10bitdepth.txt文件一致。
            6. 参数保存功能

            ./mv_mipi_i2c.sh -w -f paramsave -b 9
            

            然后拔下电源重新上电。
            上电后读取lutenable和lut曲线:

            $ ./mv_mipi_i2c.sh -r -f lut -p1 new_lut.txt -b 9
            r lut and save to file : new_lut.txt 
            xumm@ubuntu:/dbg/mv_tools_jetson/i2c_tools$ ./mv_mipi_i2c.sh -r -f lutenable -b 9                
            r lut enable is 1 
            

            可以看到enable参数保存了,而且对比new_lut.txt 和./readout_lut.txt 完全一致。

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

              @veye_xumm
              现在仍有问题
              下载最新的mv_tools_jetson,并执行上述指令,关机重启后,数据虽然保存,但是预览模式画面仍是黑色的,需要再次执行 ./mv_mipi_i2c.sh -w -f lut -p1 ./lut_samples/lut_gamma0.8_10bitdepth.txt -b 9 命令,画面才会显示出来。麻烦您这边复现一下问题,不知道您这边是否查看了预览画面的效果显示,可否给出一个最优的解决方案。十分感谢。

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

                @wackyrabbits
                断电不能生效是个bug,我们已经做了升级包来解决此问题,MV-MIPI-IMX296M_C1.28_L1.33_upgrade_20230328.bin。
                请参考这个文章下载升级包,升级。
                http://wiki.veye.cc/index.php/Mvcam_firmware_update_manual

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

                  @veye_xumm
                  请问jeston平台的升级工具是不是mv_tools_jeston中的veye_upgrade?

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

                    @wackyrabbits 是的

                    1 Reply Last reply Reply Quote 0
                    • W
                      WackyRabbits last edited by WackyRabbits

                      @veye_xumm
                      Step 2
                      Using v4l2 driver mode, the power up and probe process will be performed during the linux boot process.

                      请问针对上述语句,我需要在jeston平台如何操作?

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

                        @wackyrabbits said in MV-MIPI-IMX296M 修改参数,保存重启后参数未改变:

                        Using v4l2 driver mode, the power up and probe process will be performed during the linux boot process.

                        板子上电即可。

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

                          @veye_xumm
                          十分感谢,问题已经完美解决!

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

                            @wackyrabbits 不客气。

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