Getting pixel coordinates of individual pixels in an image
Posted: 2012-08-01T09:47:59-07:00
Hi all,
How do I get the x and y coordinates and the brightness of all the pixels that comprise an image? Is the exportPixels method in the magick wand the way to go? I need to get these values for each pixel. I have a program in ansi C to which I need to pass these coordinates. I can however use C++ too since I am probably going to convert that program to c++.
I have also seen the commandline interface where the convert utility looks promising. However, I cannot tell what parameters to use for this utility.
My program will run chiefly on Linux (Ubuntu) but I plan to run it on the rasbperry pie too.
Pranav
How do I get the x and y coordinates and the brightness of all the pixels that comprise an image? Is the exportPixels method in the magick wand the way to go? I need to get these values for each pixel. I have a program in ansi C to which I need to pass these coordinates. I can however use C++ too since I am probably going to convert that program to c++.
I have also seen the commandline interface where the convert utility looks promising. However, I cannot tell what parameters to use for this utility.
My program will run chiefly on Linux (Ubuntu) but I plan to run it on the rasbperry pie too.
Pranav