Opencv videocapture can not access camera

Hi,
Please refer to this sample:
OpenCV Video Capture with GStreamer doesn't work on ROS-melodic - #3 by DaneLLL
You can run the default sample first. If it runs successfully, please change to desired resolution/framerate and try again.