Hi @chemistry0421
You should also see C samples in source code package:
https://developer.nvidia.com/embedded/l4t/r32_release_v5.1/r32_release_v5.1/sources/t186/public_sources.tbz2
If you use v4l2src plugin, may refer to this sample:
Sony camera module cannot be opened with OpenCV on Xavier - #5 by DaneLLL
(Re-installing OpenCV is not required for later r32 releases)