Capture video via camera connected shows complete Green/Gray


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,

int main()
VideoCapture cap(0);

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

Mat img;

while (true)
	if (!

	imshow("webcam", img);
return 0;