ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    camera resolution on hires camera

    VOXL
    5
    15
    1027
    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.
    • Eric KatzfeyE
      Eric Katzfey ModalAI Team @colerose
      last edited by

      @colerose You are still streaming at a 1Mbps bitrate. For high resolutions you will need to increase that to get a better picture.

      1 Reply Last reply Reply Quote 0
      • C
        colerose
        last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • C
          colerose
          last edited by colerose

          I have upped the bitrate and the resolution for the hires and the tflite-overlay in the voxl-streamer.conf file.

          I've also upped the resolution to match the tflite-overlay and the hires in the voxl-camera-server.conf file. I'm still not really seeing an improvement in the output on voxl-portal.

          Can someone please give me some recommended settings for a higher resolution? Its a hires camera so I would have assume that that would've shipped as the default with the payload.

          This is my voxl-streamer.conf

          {
              "configuration": "tracking",
              "hires": {
                  "input": {
                      "interface": "mpa",
                      "mpa-camera": "hires_preview" },
                  "output": {
                      "stream": {
                          "rotation": 0,
                          "width": 1920,
                          "height":1080,
                          "decimator": 2,
                          "bitrate": 10000000 } }
              },
              "hires-logo": {
                  "input": {
                      "interface": "mpa",
                      "mpa-camera": "hires_preview" },
                  "output": {
                      "stream": {
                          "rotation": 0,
                          "width": 640,
                          "height": 480,
                          "decimator": 2,
                          "bitrate":1000000 } },
                  "overlay": {
                      "location": "/etc/modalai/modalai.png",
                      "offset_x": -1,
                      "offset_y": -1 }
              },
              "stereo": {
                  "input": {
                      "interface": "mpa",
                      "mpa-camera": "stereo" },
                  "output": {
                      "stream": {
                          "width": 640,
                          "height": 960,
                          "decimator": 2,
                          "bitrate": 1000000 } }
              },
              "tracking": {
                  "input": {
                      "interface": "mpa",
                      "mpa-camera": "tracking" },
                  "output": {
                      "stream": {
                          "width": 640,
                          "height": 480,
                          "decimator": 2,
                          "bitrate": 1000000 } }
              },
              "dfs-disparity": {
                  "input": {
                      "interface": "mpa",
                      "mpa-camera": "dfs_disparity" },
                  "output": {
                      "stream": {
                          "width": 640,
                          "height": 480,
                          "decimator": 2,
                          "bitrate": 1000000 } }
              },
              "qvio-overlay": {
                  "input": {
                      "interface": "mpa",
                      "mpa-camera": "qvio_overlay" },
                  "output": {
                      "stream": {
                          "width": 640,
                          "height": 544,
                          "decimator": 2,
                          "bitrate": 1000000 } }
              },
              "tflite-overlay": {
                  "input": {
                      "interface": "mpa",
                      "mpa-camera": "tflite" },
                  "output": {
                      "stream": {
                          "width":1920,
                          "height": 1080,
                          "decimator": 2,
                          "bitrate": 10000000 } }
              },
              "hdmi-mpa": {
                  "input": {
                      "interface": "mpa",
                      "mpa-camera": "v4l2" },
                  "output": {
                      "stream": {
                          "width": 640,
                          "height": 360,
                          "decimator": 2,
                          "bitrate": 1000000 } }
              },
              "gphoto2-mpa": {
                  "input": {
                      "interface": "mpa",
                      "mpa-camera": "gphoto2" },
                  "output": {
                      "stream": {
                          "width": 640,
                          "height": 360,
                          "decimator": 2,
                          "bitrate": 1000000 } }
              },
              "video-test": {
                  "input": {
                      "interface": "test",
                      "frame": {
                          "width": 1280,
                          "height": 720,
                          "format": "uyvy" } },
                  "output": {
                      "stream": {
                          "rotation": 0,
                          "width": 640,
                          "height": 360,
                          "rate": 15,
                          "bitrate": 1000000 } }
              },
              "uvc-video": {
                  "input": {
                      "interface": "uvc",
                      "device": "/dev/video0" },
                  "output": {
                      "stream": {
                          "rotation": 0,
                          "width": 640,
                          "height": 360,
                          "rate": 15,
                          "bitrate": 1000000 } }
              }
          
          }
          
          
          
          

          and here is my voxl-camera-server.conf

          {
          	"version":	0.2,
          	"port_J2":	{
          		"name":	"hires",
          		"enabled":	true,
          		"type":	"hires",
          		"api":	"hal3",
          		"frame_rate":	30,
          		"override_id":	-1,
          		"auto_exposure_mode":	"isp",
          		"preview":	{
          			"enabled":	true,
          			"width":	1920,
          			"height":	1080,
          			"format":	"nv21"
          		},
          		"video":	{
          			"enabled":	false,
          			"width":	1024,
          			"height":	768,
          			"format":	"h265"
          		},
          		"snapshot":	{
          			"enabled":	false,
          			"width":	1024,
          			"height":	768,
          			"format":	"jpg"
          		}
          	},
          	"port_J3":	{
          		"name":	"empty",
          		"enabled":	false
          	},
          	"port_J4":	{
          		"name":	"empty",
          		"enabled":	false
          	}
          }
          
          1 Reply Last reply Reply Quote 0
          • ?
            A Former User
            last edited by

            The default hires sensor that comes on the m500/flight deck is the M0025 which is a close range camera focused to around 2 feet meant for close up inspection. If you're seeing poor quality images past 2-3 feet then the issue could be that the lens isn't right for your application. If you're looking for a more medium to long range focused camera, we also have the M0024 based on the same IMX214 sensor.

            1 Reply Last reply Reply Quote 0
            • C
              colerose
              last edited by

              I am seeing poor quality images up close as well. Is there a recommended change that I could make to the height, width, and bitrate in the voxl-camera-server.conf and voxl-streamer.conf files to get good resolution for close up objects?

              1 Reply Last reply Reply Quote 0
              • ?
                A Former User
                last edited by

                If you're not seeing any good quality images it could be that the lens is out of focus, you can twist the outer plastic on the front of the camera to focus it. Could you upload some images that you're seeing so that I can take a look and possibly help more.

                1 Reply Last reply Reply Quote 0
                • Eric KatzfeyE
                  Eric Katzfey ModalAI Team
                  last edited by

                  I usually test these things with Ethernet instead of a wireless connection to make sure that I have enough bandwidth on the link. I set the bitrate to 50000000 (50Mb). My current test setup has an IMX230 4K sensor instead of the IMX214 4K sensor but the results should be similar. I also use VLC on a Linux box on my local network (also with Ethernet) to view the video. Here are photos of my setup and the results of 640x360 vs 1920x1080. The 1080p is clearly better.
                  test setup
                  low resolution
                  high resolution

                  1 Reply Last reply Reply Quote 0
                  • C
                    colerose
                    last edited by

                    Thanks @Eric-Katzfey! I have been able to successfully increase the resolution on the hires camera by modifying the files as you described them below. However, once I do so, running the voxl-tflite-server and then running voxl-tflite-overlay no longer shows the detections. I can see the camera stream in a higher resolution on the Tflite tab in voxl-streamer (and by connecting through opencv) however there are no detections happening when running the voxl-tflite-server in debug mode and when viewing the streamer. Any idea why this might be happening?

                    1 Reply Last reply Reply Quote 0
                    • Eric KatzfeyE
                      Eric Katzfey ModalAI Team
                      last edited by

                      That sounds more like an @Matt-Turi or @Alex-Gardner question.

                      1 Reply Last reply Reply Quote 0
                      • ?
                        A Former User
                        last edited by

                        You are not seeing any detections on the overlay because the tflite server expects our default input image size, then resizes it down to 300x300 for model execution. In order to run with 1920x1080p resolution, you must change line 287 of models.cpp to match:

                        mcv_init_resize_map(1920, 1080, model_img_width, model_img_height, &map);
                        // This would for 1920px width, 1080px height
                        
                        

                        Then, as long as your skip_n_frames parameter is set to 0, voxl-streamer will be able to display the output correctly.

                        1 Reply Last reply Reply Quote 0
                        • ?
                          A Former User
                          last edited by

                          If you use the dev opkg repo, there is now a new version of voxl-tflite-server (v0.1.2) that will handle any input size, and color output with the hires cam by default.

                          1 Reply Last reply Reply Quote 0
                          • C
                            colerose
                            last edited by

                            Thanks @Matt-Turi! I'll give this a shot!

                            1 Reply Last reply Reply Quote 0
                            • G
                              gauravshukla914
                              last edited by

                              Hello @Alex-Gardner I'm currently using M0025 sensor which is by default with VOXL-Flight deck. I read your comment above that the sensor M0024 would be a better choice for medium to long range application. Is there a way to integrate M0024 sensor with the voxl-flight deck? I understand that the sensor size is a little big and it won't fit in the space that's being designed for the default sensor.

                              1 Reply Last reply Reply Quote 0
                              • ?
                                A Former User
                                last edited by

                                We don't sell any platforms with the M0024 sensor onboard by default. If you're just trying to use it for color fpv/more general inspection I'd suggest just VHB taping it to the front, if you're trying to use it for hyper-accurate detections you'll have to modify one of our platforms or design your own (as most of our platforms are meant to serve as reference designs and not full production hardware).

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post
                                Powered by NodeBB | Contributors