Monochrome video output with IMX530

I have been looking into trying to use the IMX530 to get a video recording pipeline, but there is one major issue currently. When using nvgstcapture-1.0, the display image is monochrome. It’s not grayscale, but instead purplish.

nvcamtest_8545_s00_00000
nvcamtest_10010_s00_00000
nvcamtest_10010_s00_00001

These are tests, trying to get a feel for how red, blue and green respectively look like, with the current output.

I am currently using a Framos FPA-4.A, connected to a FSA-FT18/A, FSM IMX530, and ultimately attached to a camera lens. The TX2 devkit does not have any modifications to it, and is flashed with JetPack 4.5.1.

Any suggestions? Thanks in advance.

Create file /var/nvidia/nvcam/settings/camera_overrides.isp and add below context to it the change file to 664 by sudo chmod 664 camera_overrides.isp

demosaic.v5.family.use=CCCC;
defaults.yuvMatrix[0] = {0.3333, 0.3333, 0.3333, 0};
defaults.yuvMatrix[1] = {0, 0, 0, 0};
defaults.yuvMatrix[2] = {0, 0, 0, 0};
defaults.yuvMatrix[3] = {0, 0, 0, 1};

This error comes up when I try doing that. As soon as I delete the file, the camera works again, but with the same results.

bitrate = 4000000
Encoder Profile = High
Encoder control-rate = 1
Encoder EnableTwopassCBR = 0
Opening in BLOCKING MODE
Opening in BLOCKING MODE
** Message: 13:05:07.835: main:4670 iterating capture loop …
NvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:645 No cameras available

(nvgstcapture-1.0:9471): GStreamer-CRITICAL **: 13:05:08.097: gst_mini_object_set_qdata: assertion ‘object != NULL’ failed

Could you try to remove below line from the overrides file to check the image.

demosaic.v5.family.use=CCCC;

By removing the line below, the image becomes purely black and white, instead of purple.

Does that means output correct image for mono chrome sensor?

Yes.

Thanks for confirm still any question for this topic?

Well, I was interested in having it display colour. I am trying to get a video recording, and compression pipeline, and using nvgstcapture-1.0 looked promising.

If there are better ways that you can think of, I would be glad to look into it.

Sorry, I don’t understand your question well. Could you give more detail information?

The purpose of this thread is that I was looking to achieve video output of the real-world, in the appropriate colours, not just black and white. That will then be fed through a compression pipeline, and streamed on a different computer.

I was wondering if you might know how to decode this black and white video output, and turn it into rgb outputs, or if this is all I can get through nvgstcapture-1.0.

A different question of mine is if you might know of any other software that can be installed on a Jetson TX2 that may be able to produce video output, and hopefully without needing a video display to be connected.

Note: I am still new to developing this video pipeline myself, and can’t get much help nor information about the project; I am basically trying out as many things as I can.

  1. It’s impossible to restore the color from mono chrome sensor. I would suggest to using normal sensor instead of mono chrome sensor.
  2. You ca reference to the multimedia API sample code for encode only without display preview simultaneous.
    Below command to get the sample code.
sudo apt list -a nvidia-l4t-jetson-multimedia-api
sudo apt install nvidia-l4t-jetson-multimedia-api=32.xxxx

Below are the API link
https://docs.nvidia.com/jetson/l4t-multimedia/classArgus_1_1Ext_1_1ISensorPrivateMetadata.html

I don’t understand what you mean by 1. I am using nvgstcapture-1.0, with no parameters passed into it, and I am completely sure that my current lens setup can capture and display colour.

  1. I have been looking into the jetson mmapi, thank you. I was unsure if there were other TX2-specific applications, hence my question.
  1. Maybe I miss understand your means.
  1. No

The project I am working on requires us to record video (without requiring a display), and either: 1. stream it to a different location (we are unsure of how we will make that work, but it needs to be able to be streamed); 2. save the video on the drive, in h264 or h265 format (for us to do further image processing on).

What I have been unable to do is get nvgstcapture-1.0 to record video in the appropriate colours (the real-life ones; as opposed to the purplish or black/white monochrome snapshots).

You can reference MMAPI for recording and RTSP for streaming to others location via network.
And your sensor is not mono chrome sensor? If yes then you may need to remove the setting in camera_overrides.isp that for mono chrome sensor only. And need tuning process by camera partner.

My sensor is indeed not mono-chrome. Capturing video with the Jetson MMAPI sample 10 (camera_recording) provides colour output, by using only the default settings. Not sure what the issue is with nvgstcapture-1.0.

Check the sensor mode selected is any different for MMAPI sample with nvgstcapture-1.0
Also check with gst-launch-1.0 command to check if the same with nvgstcapture-1.0
And what’s the strings for your sensor?

badge = "e3333_topleft_P5V27C";

I don’t understand what you’re asking of me. I have no experience using gst-launch-1.0 or nvgstcapture-1.0 to check anything. All I could find was Active Sensor Mode = 4, when typing in gsmo in nvgstcapture-1.0, while it was running.

You can search “gst-launch-1.0 nvarguscamerasrc” for the command
Where did you get this sensor?