Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Well, is your camera RGB (probably by USB or Ethernet) or is it a video camera already in YUV and you use a frame grabber (adapter card) to get the images in the computer?

You want to use grayscale for some reasons (I do use grayscale too), but you must understand that if your camera feeds you with a RGB image or even more strictly a NOT-Grayscale format, something somewhere has to convert it to grayscale. There are various ways to do it (http://en.wikipedia.org/wiki/Grayscale), but it takes computation time. So maybe you won't really save time by only displaying an image in grayscale instead of it's native color format.

Where you might get improved performance is if you perform computations on the frames. A RGB image has three channels whereas a grayscale has only one, three time less pixels to works on. Don't hesitate if you want me to elaborate on this...

About YUV, I don't know if there is a option in Java to capture directly in that format (even if you happen to have a YUV video feed, the adapter card will probably convert it to RGB or BGR). If not, you need to convert it to this colorspace so again it is computation time.

Maybe there is an issue somewhere else in your code that slows thing, though. I would advise to post some of your code in an edit to your question. I am myself not knowledgeable in Java but surely someone here is!