Page 1 of 1

pixel-iterator functions

Posted: 2012-06-22T17:37:26-07:00
by harryspier
I'm developing an OCR application and using the Wand C api. (I'm new to ImageMagick). I'm using MagickExportPixels on a grayscale (monochrome) image to extract the pixel data. It works just fine but I'd like to speed it up if I could and I noticed that there are also pixel iterator methods and pixel wand methods in the Wand C api.

1) What exactly are pixel iterator methods? I'm assuming that they are ways to iterate over a pixel array?

2) Can I use pixel iterator methods with pixel wand methods to extract the pixel data and if so would that be a faster method of extracting the pixel data than with MagickExportPixels?

Thanks,
Harry Spier

Re: pixel-iterator functions

Posted: 2012-06-24T17:28:06-07:00
by anthony
harryspier wrote:1) What exactly are pixel iterator methods? I'm assuming that they are ways to iterate over a pixel array?
yes. One pixel at a time. Typically used for color or level changes to an image on a per-pixel bases, without regard to the contents of neighbouring pixels.
2) Can I use pixel iterator methods with pixel wand methods to extract the pixel data and if so would that be a faster method of extracting the pixel data than with MagickExportPixels?
You can, but really it depends what you want the data for. You can write 'blobs' (image files in memory) using image file coders too.