Request for Assistance with Hi-846 Camera Color Correction on NXP imx8mm Yocto System

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Request for Assistance with Hi-846 Camera Color Correction on NXP imx8mm Yocto System

169 Views
shixuanlin-ddcx
Contributor II

output_gst_ori.jpg

Dear NXP Support Team, 

I hope this email finds you well. I am reaching out to seek your expertise regarding a color correction issue with the Hi-846 camera on our NXP-based embedded system.

System Details:

  • Platform: NXP (imx8mm)

  • OS: Yocto-based system

  • Kernel: Linux 5.15

  • Camera: Hi-846

Issue Description: We are using the following GStreamer pipeline to capture a single frame from the Hi-846 camera:

gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1 ! "video/x-bayer,format=grbg,width=3264,height=2448" ! bayer2rgb ! videoconvert ! jpegenc ! filesink location=/tmp/output_gst_ori.jpg

notes:

v4l2-ctl --list-formats-ext -d /dev/video0
ioctl: VIDIOC_ENUM_FMT
[17066.470076] mx6s_captuere.c: mbus_code 300a
Type: Video Capture

[0]: 'BA10' (10-bit Bayer GRGR/BGBG)
Size: Discrete 3264x2448
Size: Discrete 640x480
Size: Discrete 1280x720
Size: Discrete 1632x1224

The pipeline successfully captures a photo, but the image exhibits a noticeable greenish tint. The scene includes a white notebook as the background and a red pen as the subject, both of which appear distorted in color. I will attach the captured photo (output_gst_ori.jpg) to this email for your reference.

Request: Could you please advise if NXP has any recommended solutions or guidelines for color correction with the Hi-846 camera on a Yocto-based system? Specifically, we are looking for:

  • Driver or firmware configurations to address the greenish tint.

  • Post-processing techniques (e.g., via GStreamer or other tools) for accurate color reproduction.

  • Any relevant documentation or sample code for camera calibration.

Please let me know if you need further details, such as system logs, driver configurations, or additional test results. We greatly appreciate your support and look forward to your guidance.

Best regards

0 Kudos
Reply
1 Reply

163 Views
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @shixuanlin-ddcx 

I hope you are doing very well.

 

It appears since the Hi-846 outputs 10-bit Bayer data and your current pipeline uses a generic bayer2rgb conversion without any calibration, the resulting RGB image often lacks accurate color fidelity.

You can try using videobalance in your pipeline:

gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1 \
! "video/x-bayer,format=grbg,width=3264,height=2448" \
! bayer2rgb \
! videoconvert \
! videobalance red=1.2 green=1.0 blue=1.6 \
! jpegenc \
! filesink location=/tmp/output_corrected.jpg

 

Adjust the values as necessary.

 

I hope this can helps to you.

 

Best regards,

Salas.

0 Kudos
Reply