Ask Your Question

Revision history [back]

How to find out image format retrieved via VideoCapture ?

I am retrieving frames from a video file. I am using VideoCapture class to perform this operation (the code that I am using is given below). It is retrieving a frame but I don't know whether it is RGB or HSV or some other format. How do I find out ?

Mat mFrame = new Mat();
VideoCapture camera = new VideoCapture("/home/ganesh/Videos/my_video_3.mkv");

boolean isCaptured = camera.grab();
boolean isRetrieved = camera.retrieve(mFrame);