some problems of command: nvgstcapture-1.0

hi all!

I have successfully launch the camera and get the capturing display by the command: nvgstcapture-1.0 on the platform of jetson nano with imx219 csi camera.

But I meet 3 problems here:
1.The display window can’t be resized and it is almost full screen. Which command can be used to resize the display window?

2.How to use this command with opencv? Just like command’nvarguscamerasrc’ sample below:

def gstreamer_pipeline (capture_width=3280, capture_height=2464, exposure_time=90,
framerate=8, flip_method=2):
exposure_time = exposure_time * 1000000 #ms to ns
exp_time_str = ‘"’ + str(exposure_time) + ’ ’ + str(exposure_time) + ‘"’
return ('nvarguscamerasrc ’
'wbmode=0 ’
'awblock=true ’
'gainrange=“1 1” ’
'ispdigitalgainrange=“1 1” ’
'exposuretimerange=%s ’
'aelock=true ! ’
'video/x-raw(memory:NVMM), ’
'width=%d, height=%d, ’
'format=NV12, ’
'framerate=%d/1 ! ’
'nvvidconv flip-method=%d ! ’
'video/x-raw, ’
'format=I420 ! ’
'appsink ’
% (exp_time_str, capture_width, capture_height, framerate, flip_method))

camera = cv2.VideoCapture(gstreamer_pipeline(), cv2.CAP_GSTREAMER)
_, image = camera.read()

3.when I tried to use command: gst-launch-1.0 nvcamerasrc, it occured this error: pipeline counld not be constructed: no element “nvcamerasrc”. So how can I install this plugin? in addition, command"gst-launch-1.0 nvarguscamerasrc" can work here.

Thanks a lot!

Hi,

For more exaples, please refer to https://developer.nvidia.com/embedded/dlc/l4t-accelerated-gstreamer-guide-32-2

For running with opencv, you can check
https://devtalk.nvidia.com/default/topic/1057460/jetson-tx2/custom-built-opencv-3-4-0-following-nvidia-advice-not-working/post/5363355/#5363355
Script for Nano is
https://github.com/AastaNV/JEP/blob/master/script/install_opencv4.0.0_Nano.sh
However, your resolution is almost 4K, so it may not good to use opencv. appsink in opencv requires video/x-raw[CPU] buffers, so you need to copy video/x-raw(memory:NVMM)[DMA] buffers to video/x-raw buffers. Suggest you try tegra_multimedia_api
https://developer.nvidia.com/embedded/dlc/NVIDIA_Tegra_Linux_MultimediaAPIReference

Please use nvarguscamerasrc. nvcamerasrc is deprecated.

Hi DaneLLL:

Thanks for your detail answer.I’m sorry that maybe I should tell more clearly about what I am doing.Actually I want to do two things on the csi camera with jestson nano:

1.Launch the camera and display the captures on a customize window.
2.Do some controls to the camera during it is running.

After some attemps, I found that:

1.I can lanuch the camera by “nvgstcapture-1.0” as well as “nvarguscamerasrc”+opencv(like i pose above).But I can’t find out the command to resize the window to display with command “nvgstcapture” even I tried out all the command on the file that you offer. And “nvarguscamerasrc” can be resized the window with the opencv display.

2.Only command"nvgstcapture-1.0" offers the runtime command that can be used to do some controls when the camera is running. and “nvarguscamerasrc” doesn’t offer these runtime command.

3.In addition, I shoule choose a way that can be easily convert the data to opencv format so that it is benefit for the process after the capture.

Above all, it seems that I should find out a method that the I can capture with the command"nvgstcapture"and convert the image into opencv format in the same time.

Thank you so much!

Hi,
nvgstcapture-1.0 is open source code. It is nvgstapps_src.tbz2 in
https://developer.nvidia.com/embedded/dlc/public_sources_Nano
You may refer to it and add window resize.

You may also consider to use Argus APIs. We have Argus ui application in tegra_multimedia_api/argus/. Please follow README.TXT to build and run the app.

Hi DaneLLL :

Thank you so much!According to your guidance, I think I have found the right way to develop the isp control on Jetson platform.We can develop the applications based on the samples which is in the file ‘argus’ after I build this file and make with the steps in README.TXT.

Best Regards