Ask Your Question

Revision history [back]

Question about capture Image

hi all, i am trying to get every ounce of speed from my opencv/java videocapture. System works like a charm, but i think i am still wasting clock cycles ...

Currently i read color frames from videocapture device into Mat, update the content of a BufferedImage via arraycopy, then repaint into jpanel. at 1280x720 i get around 20fps with fairly old Mac Powerbook hardware, which is not bad. In my application, grayscale is actually good enough. i know how to change the color frame to a grayscale one using

Imgproc.cvtColor(MatImg, MatImg_mod, Imgproc.COLOR_RGB2GRAY); but that gains me nothing for speed. Anyone know of a way to already pull frames off the camera in grayscale? or to do the Y channel only in the YUV route? any suggestions for how to squeeze some speed out of this puppy and any code examples greatly appreciated. thanks,