|
Re: Extract Raw Pixel Data
If this is primarily to learn how the algorithm is implemented, efficiency doesn't matter so much, and you can indeed get the pixel data as Ryan described and them implement your convolution or other algorithm in any of the languages. I've done this before in LV and back in college in C, just to get a good feel for how the math worked. May I suggest doing the image processing on a file based image rather than a camera. It splits the problem in half and lets you focus on the downstream issues. Later you can substitute the camera for the JPEG file and everything will fit together nicely.
The thing you will discover is that image processing inherently touches a ton of data. An uncompressed color image of 320x240 is 225 kilobytes. Unless the environment is incredibly predictable, you will often need to touch every pixel in the image at least once, and often many times. To make this fast enough to keep up with the real world forces you ultimately to write the code using every performance trick you can, even SSE instructions, and adds tons of complexity to an otherwise mathematically simple loop. For this reason, once you understand what you need in your implementation, you will likely find that you want to switch to using the professional implementation in a library like NIVision or OpenCV. It is great to be able to understand how they work and compare them, but impractical to make them as fast as needed.
Greg McKaskle
|