Search found 6 matches

by ese
2011-01-27T21:08:01-07:00
Forum: Developers
Topic: Magick++ get pixel intensities for an image
Replies: 7
Views: 16333

Re: Magick++ get pixel intensities for an image

Fixed the issue by using 'unsigned char' for CharPixels.

Code: Select all

unsigned char *pixels = new unsigned char[width*height];
image.write( 0, 0, width, height, "I", CharPixel, pixels );
by ese
2011-01-26T22:30:07-07:00
Forum: Developers
Topic: Magick++ get pixel intensities for an image
Replies: 7
Views: 16333

Re: Magick++ get pixel intensities for an image

I'm still having issues with pixel input, is it possible to simply get 8-bit grayscale intensities for an image? e.g. The value for any pixel is between [0 .. 255] I have tried the following without success. char *pixels = new char[width*height]; image.write( 0, 0, width, height, "I", CharPixel ...
by ese
2011-01-16T22:39:40-07:00
Forum: Developers
Topic: Magick++ get pixel intensities for an image
Replies: 7
Views: 16333

Re: Magick++ get pixel intensities for an image

My current development machine is a a slightly old single core, so OpenMP wont help until I get a new system :) I'm implementing a generalization of the radon transform, the trace transform so the included method wouldn't really help. Here is what I am doing: Read input image (various formats ...
by ese
2011-01-16T13:20:12-07:00
Forum: Developers
Topic: Magick++ get pixel intensities for an image
Replies: 7
Views: 16333

Re: Magick++ get pixel intensities for an image

Thanks magick.

Do you know which is faster? I'm writing a modified radon transform algorithm on a couple million images so speed is very important.

All I want to do is to read the image, run a Gaussian blur and then get pixel intensities into an array as fast as possible.
by ese
2011-01-16T10:50:37-07:00
Forum: Developers
Topic: Magick++ get pixel intensities for an image
Replies: 7
Views: 16333

Re: Magick++ get pixel intensities for an image

I see this is possible in C, using MagickWand and/or MagickCore. The closest method in Magick++ seems to be getPixel, however this returns a PixelPacket. How can I simple get a double of intensities as there is no way to pass the map to this function. Would it be faster to just use libs to read ...
by ese
2011-01-16T00:15:21-07:00
Forum: Developers
Topic: Magick++ get pixel intensities for an image
Replies: 7
Views: 16333

Magick++ get pixel intensities for an image

Hi,

I'm trying to get an array of pixel intensities for an image with ImageMagick in C++ via Magick++.

I found out how to do it in Perl:

Code: Select all

@pixels = $image->GetPixels(map=>'I', height=>$height, width=>$width, normalize=>true);
How can I do the same in C++?