System information (version)
Platform =>TX2(the carrier board is designed by myself)
Flash OS =>Jetpack3.3(R28.2.1)
camera sensor =>Sony IMX185(designed by myself)
OpenCV => 3.4.1(compile it from source reference:<a target='_blank' rel='noopener noreferrer' href='https://www.jetsonhacks.com/2018/05/28/build-opencv-3-4-with-cuda-on-nvidia-jetson-tx2/'>https://www.jetsonhacks.com/2018/05/28/build-opencv-3-4-with-cuda-on-nvidia-jetson-tx2/</a>)
I have changed the tegra186-quill-p3310-1000-c03-00-base.dtb and flashed in my TX2.
It seems that IMX185 have been loaded onto TX2.Here is log about imx185
nvidia@tegra-ubuntu:~$ dmesg | grep -i imx185
[ 2.764612] imx185 1-001a: [IMX185]: probing v4l2 sensor at addr 0x1a.
[ 2.767065] imx185 1-001a: imx185_fuse_id_setup, fuse id: 000085010101
[ 2.767156] imx185 1-001a: Detected IMX185 sensor
[ 4.714222] tegra-vi4 15700000.vi: subdev imx185 1-001a bound
When I execute this command(“nvgstcapture-1.0”),it can capture video on my screen.
nvidia@tegra-ubuntu:~$ nvgstcapture-1.0
Encoder null, cannot set bitrate!
Encoder Profile = High
Supported resolutions in case of ARGUS Camera
(2) : 640x480
(3) : 1280x720
(4) : 1920x1080
(5) : 2104x1560
(6) : 2592x1944
(7) : 2616x1472
(8) : 3840x2160
(9) : 3896x2192
(10): 4208x3120
(11): 5632x3168
(12): 5632x4224
Runtime ARGUS Camera Commands:
Help : 'h'
Quit : 'q'
Set Capture Mode:
mo:<val>
(1): image
(2): video
Get Capture Mode:
gmo
Set sensor orientation:
so:<val>
(0): none
(1): Rotate counter-clockwise 90 degrees
(2): Rotate 180 degrees
(3): Rotate clockwise 90 degrees
Get sensor orientation:
gso
Set Whitebalance Mode:
wb:<val>
(0): off
(1): auto
(2): incandescent
(3): fluorescent
(4): warm-fluorescent
(5): daylight
(6): cloudy-daylight
(7): twilight
(8): shade
(9): manual
Get Whitebalance Mode:
gwb
Set Saturation (0 to 2):
st:<val> e.g., st:1.25
Get Saturation:
gst
Capture: enter 'j' OR
followed by a timer (e.g., jx5000, capture after 5 seconds) OR
followed by multishot count (e.g., j:6, capture 6 images)
timer/multihot values are optional, capture defaults to single shot with timer=0s
Start Recording : enter '1'
Stop Recording : enter '0'
Video snapshot : enter '2' (While recording video)
Get Preview Resolution:
gpcr
Get Image Capture Resolution:
gicr
Get Video Capture Resolution:
gvcr
Runtime encoder configuration options:
Set Encoding Bit-rate(in bytes):
br:<val> e.g., br:4000000
Get Encoding Bit-rate(in bytes):
gbr
Set Encoding Profile(only for H.264):
ep:<val> e.g., ep:1
(0): Baseline
(1): Main
(2): High
Get Encoding Profile(only for H.264):
gep
Force IDR Frame on video Encoder(only for H.264):
Enter 'f'
bitrate = 4000000
Encoder Profile = High
** Message: <main:5684> iterating capture loop ....
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 0
Output Stream W = 640 H = 480
seconds to Run = 0
Framerate set to : 30 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 4
===== MSENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
^C** Message: <_intr_handler:5104> User Interrupted..
Terminating the camera pipeline ...
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
** Message: <main:5694> Capture completed
** Message: <main:5745> Camera application will now exit
However,it was failed when i executed gst-launch-1.0
nvidia@tegra-ubuntu:~$ gst-launch-1.0 nvcamerasrc ! 'video/x-raw(memory:NVMM),witdth=1920,height=1080,format=NV12,framerate=(fraction)30/1' ! nvoverlaysink -e
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
Setting pipeline to NULL ...
Freeing pipeline ...
I also use opencv to capture video from my IMX185.Bur failed.
std::string get_tegra_pipeline(int width, int height, int fps)
{ return "nvcamerasrc ! video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080,format=(string)I420, framerate=(fraction)30/1 ! nvvidconv ! video/x-raw,format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink";
}
The error message:
OpenCV(3.4.1-dev) Error: Unspecified error (GStreamer: unable to start pipeline
) in cvCaptureFromCAM_GStreamer, file /home/nvidia/opencv/modules/videoio/src/cap_gstreamer.cpp, line 890
VIDEOIO(cvCreateCapture_GStreamer (CV_CAP_GSTREAMER_FILE, filename)): raised OpenCV exception:
OpenCV(3.4.1-dev) /home/nvidia/opencv/modules/videoio/src/cap_gstreamer.cpp:890: error: (-2) GStreamer: unable to start pipeline
in function cvCaptureFromCAM_GStreamer