Search found 8 matches

by cryptochrome
2012-08-26T08:27:40-07:00
Forum: Users
Topic: Getting percentile values
Replies: 12
Views: 13013

Re: Getting percentile values

If you do not have too many images, you can append them all, apply -linear-stretch, then crop them back. Not a good solution as you lose track of where to crop afterwards, unless all the images are the same size. Then cropping should not be that hard. I understand now why you want to get the gray ...
by cryptochrome
2012-08-25T19:02:06-07:00
Forum: Users
Topic: Getting percentile values
Replies: 12
Views: 13013

Re: Getting percentile values

Let me try again. Suppose the pixel values corresponding to the percentiles I want are 5000 and 50000. Now I want to stretch each image so that pixels between 5000 and 50000 are stretched to fill the range 0 to 65535, while pixels at or below 5000 become 0, and pixels at or above 50000 become 65535 ...
by cryptochrome
2012-08-25T16:34:22-07:00
Forum: Users
Topic: Getting percentile values
Replies: 12
Views: 13013

Re: Getting percentile values

-level will not do that even if you compute the correct percentiles. It will stretch some value to full black and full white. So you would need to follow that with a mapping of black and white to whatever desired graylevel you want. That can be done using -fill newvalue -opaque white. If you know ...
by cryptochrome
2012-08-25T15:58:26-07:00
Forum: Users
Topic: Getting percentile values
Replies: 12
Views: 13013

Re: Getting percentile values

Sorry, I'm still not sure how I can get out the pixel values simply. Is there really no way to get the cdf of an image without using bash scripts or awk? Maybe you could give an example of how to use -linear-stretch to achieve what I want. Suppose I have three 16-bit images in a folder: img1.png ...
by cryptochrome
2012-08-25T14:41:54-07:00
Forum: Users
Topic: Getting percentile values
Replies: 12
Views: 13013

Re: Getting percentile values

Sorry, I'm still not sure how I can get out the pixel values simply. Is there really no way to get the cdf of an image without using bash scripts or awk? Maybe you could give an example of how to use -linear-stretch to achieve what I want. Suppose I have three 16-bit images in a folder: img1.png ...
by cryptochrome
2012-08-24T14:23:30-07:00
Forum: Users
Topic: Getting percentile values
Replies: 12
Views: 13013

Getting percentile values

How can I get the actual pixel values for percentiles in a grayscale image? Using -contrast-stretch is insufficient, because I need the actual values. Once I have the pixel values corresponding to the, say 5th and 95th percentiles from a particular image, I plan to use -level to apply the exact same ...
by cryptochrome
2012-07-27T11:00:13-07:00
Forum: Users
Topic: Image outlines that preserve grayscale values
Replies: 2
Views: 3660

Re: Image outlines that preserve grayscale values

fmw42 wrote:I suggest you use -morphology edgin to get your grayscale edges. -morphology edgein octagon

see
http://www.imagemagick.org/Usage/morphology/#edgein
That works great, thanks.
by cryptochrome
2012-07-26T11:49:05-07:00
Forum: Users
Topic: Image outlines that preserve grayscale values
Replies: 2
Views: 3660

Image outlines that preserve grayscale values

Suppose I have a grayscale image with a bunch of disconnected blobs, and all the pixels in a particular blob have the same (non-zero) grayscale value, and each blob has a different grayscale value associated with it. The blobs may have holes in them. Pixels not in a blob have a grayscale value of ...