VEYE IMAGING Forum
    • Categories
    • Tags
    • Recent
    • Popular
    • Users
    • WIKI
    • veye.cc
    • Register
    • Login

    imx335的sh脚本不能修改viewmode,

    Scheduled Pinned Locked Moved CS MIPI camera
    3 Posts 2 Posters 1.4k Views 1 Watching
    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.
    • V Offline
      veyeuser
      last edited by

      imx335的sh脚本不能修改viewmode,在python或者cpp中使用videodev2.h头文件和v4l2来设置摄像头,并ioctl的VIDIOC_G_FMT获取height和width时候,发现会变成2592x1944.

      veye_xummV 1 Reply Last reply Reply Quote 0
      • veye_xummV Offline
        veye_xumm @veyeuser
        last edited by

        @veyeuser
        VEYE-MIPI-IMX335由于具有一个isp模块,支持的分辨率只有几种模式。
        可以使用veye5_mipi_i2c.sh直接配置,或者像下面链接中的,使用sensor_mode配置。
        https://wiki.veye.cc/index.php/VEYE_CS_Camera_for_Jetson_TX2#VEYE-MIPI-IMX335_gstreamer_example

        Questions will be answered as soon as possible, please be patient.
        如果你使用中文,请直接用中文提问。
        May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

        1 Reply Last reply Reply Quote 0
        • V Offline
          veyeuser
          last edited by

          我用脚本设置了view mode 4 ,但是通过如下代码获取摄像头的设置,发现设置右变回 view mode 1
          //3. set form of acquisition
          struct v4l2_format vfmt;
          // vfmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
          // vfmt.fmt.pix.width = 2592;
          // vfmt.fmt.pix.height = 1944;
          // vfmt.fmt.pix.field = V4L2_FIELD_ANY;
          // vfmt.fmt.pix.pixelformat = V4L2_PIX_FMT_UYVY;
          //
          // int ret = ioctl(fd, VIDIOC_S_FMT, &vfmt);
          // if(ret < 0){
          // perror("set form fail!");
          // }
          //
          memset(&vfmt, 0, sizeof(vfmt));
          vfmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
          ret = ioctl(fd, VIDIOC_G_FMT, &vfmt);
          if(ret < 0){
          perror("get form fail!");
          }

          printf("width = %d\n", vfmt.fmt.pix.width);
          printf("height = %d\n", vfmt.fmt.pix.height);
          unsigned char *p = (unsigned char *)&vfmt.fmt.pix.pixelformat;
          printf("pixelformat=%c%c%c%c\n", p[0], p[1], p[2], p[3]);
          

          // printf("pixelformat = %d\n", vfmt.fmt.pix.pixelformat);

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post