Jetson Nano lens shading problem

Hey everyone,

we are using a raspberry pi cam v2 (wide angle lens) with the jetson nano but we have trouble with lens shading. On a raspberry pi 3 the camera works just fine but on the nano we have a huge green dot in the middle and red color all around it. So we hope it is just some driver setting we are missing.

The image below pictures white wall with the color problems clearly visible.

[url]https://ibb.co/gSpy6Jr[/url]

Does anybody have an idea? Thanks already.

There’s a script to bypass the account setting.
sudo ./l4t_create_default_user.sh -u <usr_name> -p

How can creating a new default user help? Everything is working fine on the jetson except of the camera lens shading.

We are using the jetson_csi_cam https://github.com/peter-moran/jetson_csi_cam ros package with the following gstreamer pipeline for gscam http://wiki.ros.org/gscam:

nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)$(arg width), height=(int)$(arg height), format=(string)NV12, framerate=(fraction)$(arg fps)/1 ! nvvidconv flip-method=0 ! video/x-raw, width=(int)$(arg swidth), height=(int)$(arg sheight), format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR

Using the video stream in ROS works fine but the red and green colors are pretty bad for our application scenario.

Is there a way to correct the colors?

Sorry, I was reply to the wrong topic.

For your case please change the badge info at device tree to try. If didn’t help you need have camera partner help to gen a ISP tuning file for this sensor module.

module0 {
badge = “imx185_bottom_liimx185”;
position = “bottom”;

I have never worked with the device tree… Can you specify where and how I can change the badge info?

That would help us a lot if it works!

Have a check below document and sensor programing guide.

[url]Welcome — Jetson Linux<br/>Developer Guide 34.1 documentation

[url]Welcome — Jetson Linux<br/>Developer Guide 34.1 documentation

I tried reading through the docs, but the folder structure for the jetson nano kernel differs from the examples.

When I do run “v4l2-compliance -d /dev/video0” I get the following output:

v4l2-compliance SHA   : not available

Driver Info:
	Driver name   : tegra-video
	Card type     : vi-output, imx219 6-0010
	Bus info      : platform:54080000.vi:0
	Driver version: 4.9.140
	Capabilities  : 0x84200001
		Video Capture
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps   : 0x04200001
		Video Capture
		Streaming
		Extended Pix Format

Compliance test for device /dev/video0 (not using libv4l2):

Required ioctls:
	test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
	test second video open: OK
	test VIDIOC_QUERYCAP: OK
	test VIDIOC_G/S_PRIORITY: OK
	test for unlimited opens: OK

Debug ioctls:
	test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
	test VIDIOC_LOG_STATUS: OK

Input ioctls:
	test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
	test VIDIOC_ENUMAUDIO: OK (Not Supported)
	test VIDIOC_G/S/ENUMINPUT: OK
	test VIDIOC_G/S_AUDIO: OK (Not Supported)
	Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
	test VIDIOC_G/S_MODULATOR: OK (Not Supported)
	test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
	test VIDIOC_ENUMAUDOUT: OK (Not Supported)
	test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
	test VIDIOC_G/S_AUDOUT: OK (Not Supported)
	Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
	test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
	test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
	test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
	test VIDIOC_G/S_EDID: OK (Not Supported)

Test input 0:

	Control ioctls:
		test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
		test VIDIOC_QUERYCTRL: OK
		test VIDIOC_G/S_CTRL: OK
		test VIDIOC_G/S/TRY_EXT_CTRLS: OK
		test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
		test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
		Standard Controls: 1 Private Controls: 16

	Format ioctls:
		test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
		fail: v4l2-test-formats.cpp(1184): ret && node->has_frmintervals
		test VIDIOC_G/S_PARM: FAIL
		test VIDIOC_G_FBUF: OK (Not Supported)
		test VIDIOC_G_FMT: OK
		test VIDIOC_TRY_FMT: OK
		test VIDIOC_S_FMT: OK
		test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
		test Cropping: OK (Not Supported)
		test Composing: OK (Not Supported)
		fail: v4l2-test-formats.cpp(1630): node->can_scale && node->frmsizes_count[v4l_format_g_pixelformat(&cur)]
		test Scaling: OK

	Codec ioctls:
		test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
		test VIDIOC_G_ENC_INDEX: OK (Not Supported)
		test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

	Buffer ioctls:
		test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
		test VIDIOC_EXPBUF: OK

Test input 0:


Total: 43, Succeeded: 42, Failed: 1, Warnings: 0

Does that mean I have to edit the imx219 files? I can only find them in

hardware/nvidia/platform/t210/prog/kernel-dts/tegra210-camera-rbpcv2-imx219.dtsi

with badge=“porg_frant_RBPCV2”.

So did you mean this badge information?

Yes, that’s the badge info to load the ISP tuning parameter. Please rename it to check.

Hi,

Did you manage to correct the image issue? I have similar problem, can you provide more details, i’m not able to find tegra210-camera-rbpcv2-imx219.dtsi file on my Nano.

Thanks.

You might have a look at this article:

If you google for: jetson nano camera pink problem
you’ll get plenty of results. Basically a fix is just to install a camera profile from a company like waveshare (their cameras are the the most common to have this issue, it seems).

1 Like

Thanks. That help, now i have a much better image. I develop a CS mount for raspberry camera V2 and the color effect is more purple than pink. Based on this sample i will try to develop a script that will inspect the current image of a white wall or paper and it will output the correct profile. If will work i will upload it on github

1 Like