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

    Hadron ov64b snapshots have a vertical image artifact

    Video and Image Sensors
    3
    29
    939
    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.
    • Alex KushleyevA
      Alex Kushleyev ModalAI Team @Alex Kushleyev
      last edited by

      @cguzikowski ,

      I am testing OV64b now. I confirmed that snapshot of size 9216x6944 is not possible (i think i can enable it), but 9248x6944 works.

      Also, please see this post, there was a bug that broke snapshot in recent releases, which i just fixed. perhaps that was an issue for you when you switched to latest camera server : https://forum.modalai.com/topic/5166/snapshot-crashes-voxl-camera-server

      I am going to see if i can get MISP running together with ISP snapshot, right now it only runs when preview and misp are disabled and i have small_video and snapshot streams enabled and snapshot resolution set to 9248x6944 and small_video resolution to something smaller.

      Alex

      Alex KushleyevA 1 Reply Last reply Reply Quote 0
      • Alex KushleyevA
        Alex Kushleyev ModalAI Team @Alex Kushleyev
        last edited by

        OK, some updates..

        • the reason why the resolution 9216x6944 was not accepted for snapshot is that the camera pipeline has a list of allowed resolutions and that resolution was not one of them. I could add the resolution 9216x6944 to the list, but actually another resolution (9216x6912) was already supported, so i updated the ov64b driver to include that. The latest driver is available here : https://storage.googleapis.com/modalai_public/temp/ov64b/20260417/ov64b_20260417.zip

          • this driver has the following resolutions : 9248x6944, 9216x6944 9216x6912 and the other lower resolutions. You can use 9216x6912 since it's compatible with misp and isp snapshot.
        • I also added 9216x6912 resolution to the supported misp resolutions in camera server (dev branch) as well as allowed using misp with snapshot (previously it would throw an error since we thought that previously they were not compatible).

        • Actually, snapshot does work with raw_preview + misp, but here is a warning that gets printed continuously:

        WARNING: preview buffer pool for Cam(hires), Frame(30) has 0 free, skipping request
        

        we can work around this warning by adding the following line to the voxl-camera-server.conf for the ov64b camera. this limits the number of buffers that are queued up for the streams and resolves the warning.

        "max_request_queue_depth": 6,
        

        So with these changes, you should be able to use two configurations

        • preview + raw_preview + misp + snapshot
        • small_video + snapshot

        Please use the latest camera server from dev branch.

        Right now, if you enable misp + small+video + snapshot, it does not work properly, but i will try it figure it out. Here is an example set up for small video + snapshot, but you can easily change it to use misp by disabling small_video and enabling preview + misp (and set auto exposure to "auto" from "isp" (auto will use misp auto exposure)).

        Please try it out. I do agree that the ISP output has better overall image quality than MISP, also related to pretty significant lens shading of this small lens on ov64b. We will work on improvements of misp image processing.

        For now, you just need to decide whether you need both RAW bayer and ISP JPG, in which case you cannot use small_video for streaming (until i resolve the issue). This means slightly worse image quality for live streaming. But if you are ok with ISP jpg, you can disable misp and use small_video stream for streaming.

        By the way, i did not see any artifacts in the jpeg from ISP. Can you please let me know if the artifact is in every frame and where exactly it is located? or is the occurrence and location random?

        {
                                "type":                 "ov64b",
                                "name":                 "hires",
                                "enabled":              true,
                                "camera_id":            1,
                                "fps":                  30,
                                "en_preview":           false,
                                "en_misp":              false,
                                "max_request_queue_depth": 6,
                                "preview_width":        9216,
                                "preview_height":       6912,
                                "en_raw_preview":       true,
                                "en_small_video":       true,
                                "en_large_video":       false,
                                "en_snapshot":          true,
                                "ae_mode":              "isp",
                                "gain_min":             100,
                                "gain_max":             1600,
                                "misp_width":           1600,
                                "misp_height":          1200,
                                "misp_venc_enable":     false,
                                "misp_venc_mode":       "h265",
                                "misp_venc_br_ctrl":    "cqp",
                                "misp_venc_Qfixed":     38,
                                "misp_venc_Qmin":       15,
                                "misp_venc_Qmax":       50,
                                "misp_venc_nPframes":   29,
                                "misp_venc_mbps":       30,
                                "misp_venc_osd":        false,
                                "misp_awb":             "auto",
                                "misp_gamma":           1,
                                "misp_zoom":            1,
                                "ae_desired_msv":       110,
                                "exposure_min_us":      20,
                                "exposure_max_us":      33000,
                                "exposure_soft_min_us": 5000,
                                "ae_filter_alpha":      0.6,
                                "ae_ignore_fraction":   0.2,
                                "ae_slope":     0.05,
                                "ae_exposure_period":   1,
                                "ae_gain_period":       1,
                                "small_video_width":    1600,
                                "small_video_height":   1200,
                                "small_venc_mode":      "h264",
                                "small_venc_br_ctrl":   "cqp",
                                "small_venc_Qfixed":    30,
                                "small_venc_Qmin":      15,
                                "small_venc_Qmax":      40,
                                "small_venc_nPframes":  9,
                                "small_venc_mbps":      2,
                                "en_snapshot_width":    9216,
                                "en_snapshot_height":   6912,
                                "exif_focal_length":    3.1,
                                "exif_focal_length_in_35mm_format":     17,
                                "exif_fnumber": 1.24,
                                "snapshot_jpeg_quality":        75
                        }
        
        Alex KushleyevA 1 Reply Last reply Reply Quote 0
        • Alex KushleyevA
          Alex Kushleyev ModalAI Team @Alex Kushleyev
          last edited by

          @cguzikowski ,

          Can you please clarify what you meant by the following statement in your previous post:

          "Also as a side note, the metadata seems to not be recording when using voxl-record-raw-image -j"

          Thanks!

          Alex KushleyevA 1 Reply Last reply Reply Quote 0
          • Alex KushleyevA
            Alex Kushleyev ModalAI Team @Alex Kushleyev
            last edited by

            FYI the voxl-mpa-tools updates have been merged to dev (including the jpeg saving option and option to save timestamp, exposure, gain in the filename -- i think that is what you were referring to). One small change, the timestamp in the filename changed from milliseconds to microseconds.

            https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-mpa-tools/-/tree/dev

            C 1 Reply Last reply Reply Quote 0
            • C
              cguzikowski @Alex Kushleyev
              last edited by

              @Alex-Kushleyev I have been doing some tests and the updates to the camera server and mpa tools seem to work great, thank you! What I meant about the metadata not recording is this data only shows up when using the snapshot command, and does not show up when using the jpeg flag in the voxl-record-raw-image command:
              10650ae7-c508-412d-9703-7f642cc0935b-image.png

              Also noticed the auto exposure doesn't seem to settle unless the camera's feed is opened on the voxl-portal. Here are two images I took - voxl-camera-server was running for a considerable time before taking either one.

              Before looking at the live stream in the portal:
              eaa611d2-5871-4efa-a1cb-1bb672ea6040-image.png

              After looking at the stream in the portal for a few seconds (I could see the exposure settle down)
              53216d92-cc91-4466-b1a0-83677d014d5f-image.png

              Didn't mess with voxl-camera-server at all in between taking the two images.

              Alex KushleyevA 1 Reply Last reply Reply Quote 0
              • Alex KushleyevA
                Alex Kushleyev ModalAI Team @cguzikowski
                last edited by

                @cguzikowski ,

                We can add the jpeg meta to the jpeg file saved from voxl-record-raw-image. which fields specifically are good to have?

                Also, regarding the exposure settling - can you please provide the exact configuration you are running? specifically, which are enabled (misp, small_video, snapshot) and is auto exposure set to "isp" or not -- maybe provide a camera server config? When using MISP, i believe there is a case that if none of the streams are being used, the AE won't run, but we can fix this for the case of enabled snapshot.

                Alex

                C 1 Reply Last reply Reply Quote 0
                • C
                  cguzikowski @Alex Kushleyev
                  last edited by

                  @Alex-Kushleyev Our application doesn't specifically need the metadata, just figured I should point it out in case it was intended to be there. It may be useful to have shutter speed, ISO, aperture, and date/time though.

                  Ah yes that seems to be the issue, we are using MISP, preview, and snapshot. It would be useful to have the AE run without us viewing the stream. Here is the conf file:

                  {
                  	"version":	0.1,
                  	"fsync_en":	false,
                  	"fsync_gpio":	109,
                  	"cameras":	[{
                  			"type":	"boson",
                  			"name":	"boson",
                  			"enabled":	true,
                  			"camera_id":	0,
                  			"fps":	30,
                  			"en_preview":	true,
                  			"en_misp":	true,
                  			"preview_width":	640,
                  			"preview_height":	512,
                  			"en_raw_preview":	true,
                  			"en_small_video":	false,
                  			"en_large_video":	false,
                  			"ae_mode":	"off",
                  			"en_rotate":	false,
                  			"misp_width":	512,
                  			"misp_height":	640,
                  			"misp_venc_enable":	true,
                  			"misp_venc_mode":	"h264",
                  			"misp_venc_br_ctrl":	"cqp",
                  			"misp_venc_Qfixed":	30,
                  			"misp_venc_Qmin":	15,
                  			"misp_venc_Qmax":	50,
                  			"misp_venc_nPframes":	29,
                  			"misp_venc_mbps":	2,
                  			"misp_venc_osd":	false,
                  			"misp_awb":	"off",
                  			"misp_gamma":	1,
                  			"misp_zoom":	1,
                  			"gain_min":	100,
                  			"gain_max":	100
                  		}, {
                  			"type":	"ov64b",
                  			"name":	"hires",
                  			"enabled":	true,
                  			"camera_id":	1,
                  			"fps":	30,
                  			"en_preview":	true,
                  			"en_misp":	true,
                  			"preview_width":	9216,
                  			"preview_height":	6912,
                  			"en_raw_preview":	true,
                  			"en_small_video":	false,
                  			"en_large_video":	false,
                  			"en_snapshot":	true,
                  			"ae_mode":	"isp",
                  			"gain_min":	100,
                  			"gain_max":	100,
                  			"misp_width":	9216,
                  			"misp_height":	6912,
                  			"misp_venc_enable":	false,
                  			"misp_venc_mode":	"h265",
                  			"misp_venc_br_ctrl":	"cqp",
                  			"misp_venc_Qfixed":	38,
                  			"misp_venc_Qmin":	15,
                  			"misp_venc_Qmax":	50,
                  			"misp_venc_nPframes":	29,
                  			"misp_venc_mbps":	30,
                  			"misp_venc_osd":	false,
                  			"misp_awb":	"auto",
                  			"misp_gamma":	1,
                  			"misp_zoom":	1,
                  			"ae_desired_msv":	75,
                  			"exposure_min_us":	1000,
                  			"exposure_max_us":	1001,
                  			"exposure_soft_min_us":	5000,
                  			"ae_filter_alpha":	0.6,
                  			"ae_ignore_fraction":	0.2,
                  			"ae_slope":	0.1,
                  			"ae_exposure_period":	1,
                  			"ae_gain_period":	1,
                  			"max_request_queue_depth":	6,
                  			"en_snapshot_width":	9216,
                  			"en_snapshot_height":	6912,
                  			"exif_focal_length":	3.1,
                  			"exif_focal_length_in_35mm_format":	17,
                  			"exif_fnumber":	1.24,
                  			"snapshot_jpeg_quality":	90
                  		}]
                  }
                  
                  
                  Alex KushleyevA 1 Reply Last reply Reply Quote 0
                  • Alex KushleyevA
                    Alex Kushleyev ModalAI Team @cguzikowski
                    last edited by

                    @cguzikowski , got it, thanks for the clarification. I will add a camera server config param that would force the auto exposure to run all the time, regardless of whether the streams are used or not. this should be simple.

                    Also, i was wondering if you decided that the ISP snapshot is good enough for you or you want to explore saving the RAW bayer and processing offline? We have been experimenting with some approaches for offline processing and I can share some scripts, which have some flexibility on how much to de-noise , sharpen, etc. I am also going to add the LSC (lens shading correction) for the offline processing (and later into real-time misp pipeline) to correct for those artifacts that you saw where the colors change across the image.

                    Alex

                    C 2 Replies Last reply Reply Quote 0
                    • C
                      cguzikowski @Alex Kushleyev
                      last edited by cguzikowski

                      @Alex-Kushleyev Sorry for the delayed response, but I believe the ISP snapshots are good enough quality for us, but could I still get the scripts to mess around and test with?

                      Also is the most recent camera server here the version with the auto-auto exposure? If so, what is the parameter to use to activate that?

                      1 Reply Last reply Reply Quote 0
                      • C
                        cguzikowski @Alex Kushleyev
                        last edited by

                        @Alex-Kushleyev Also just noticed the vertical artifact again. The artifact is only present in the snapshots and not the raw images saved as jpeg - will definitely need those post processing scripts now.

                        Here is the raw image:
                        5b9ca86b-79b0-4ca3-a317-7c0365efd312-image.png

                        And here is the snapshot:
                        2a55882f-b782-4044-8d5d-f0bd7cbe4881-image.png

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