Capture video via camera connected shows complete Green/Gray

Hello,

I am trying to run the simple code to capture the video via USB camera(code is written below).
The camera with no Images captured just a green/Gray screen with unrecognizable objects (Attaching the Image)

Camera which I am using is from the link, https://www.leopardimaging.com/product/autonomous-camera/maxim-gmsl2-cameras/li-ov2311-gmsl2/li-ov2311-gmsl2-050h/

int main()
{
VideoCapture cap(0);

cap.set(CAP_PROP_FRAME_WIDTH, 1920);
cap.set(CAP_PROP_FRAME_HEIGHT, 1080);

Mat img;

while (true)
{
	if (!cap.read(img))
		break;

	imshow("webcam", img);
	waitKey(2);
}
return 0;

}