Looking for fast way to extract pixel values
Re: Looking for fast way to extract pixel values
The fastest way to extract pixels is to use an API call. Pick your favorite language and read an image then extract pixels. See http://www.imagemagick.org/script/magick-wand.php for a method. A second method on that page can process pixels in parallel on a multi-core system for even better performance.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Looking for fast way to extract pixel values
If it is only one pixel, crop the read either during the read, using special read options,
http://www.imagemagick.org/Usage/files/#read_mods
or using -crop, and then output a txt: Enumerated Pixel Image
For the whole image the txt: image is a still good solution.
http://www.imagemagick.org/Usage/files/#txt
But in a larger program, or or scattered pixels using the right API interface, as mentioned by Cristy (magick) is the better solution.
http://www.imagemagick.org/Usage/files/#read_mods
or using -crop, and then output a txt: Enumerated Pixel Image
For the whole image the txt: image is a still good solution.
http://www.imagemagick.org/Usage/files/#txt
But in a larger program, or or scattered pixels using the right API interface, as mentioned by Cristy (magick) is the better solution.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/