extract pixel block magick++
Posted: 2006-04-20T14:24:22-07:00
Hi everyone,
I am a beginner, can you please advice me onhow to extract a block of pixels in an efficient way? I acutally want to scan with a window over the image. In pseudo code:
for(int y=0; y<image.rows(); y+= template.height ) {
for(int x=0; x<image.columns(); x+= template.width ) {
pxl_block = image.getPixels( x+template.width, y+template.height )
What is fastest - read the whole image to a pickel paket a scan the the pixel packet or scan the image to make small pixelpackets?
many thanks in advance...
I am a beginner, can you please advice me onhow to extract a block of pixels in an efficient way? I acutally want to scan with a window over the image. In pseudo code:
for(int y=0; y<image.rows(); y+= template.height ) {
for(int x=0; x<image.columns(); x+= template.width ) {
pxl_block = image.getPixels( x+template.width, y+template.height )
What is fastest - read the whole image to a pickel paket a scan the the pixel packet or scan the image to make small pixelpackets?
many thanks in advance...