Histogram of even/odd values

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
jhz
Posts: 9
Joined: 2016-08-12T05:27:35-07:00
Authentication code: 1151

Histogram of even/odd values

Post by jhz »

Hi, I want to draw histogram of an image of its just even or odd values. I mean i want to draw graph of values of my choice but not the entire image. is it possible? if yes then please help in the code.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Histogram of even/odd values

Post by snibgo »

jhz wrote:I want to draw histogram of an image of its just even or odd values.
A histogram records a count of the number of pixels that fall within a certain range of values. For example, if your image has 16 bits/channel/pixel, values are between 0 and 65535. You can have 65536 buckets if you want, with just one value per bucket, but you wouldn't draw that image -- it would be 65536 pixels wide.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Histogram of even/odd values

Post by fmw42 »

Perhaps he means just even or odd pixels from the image? That could be done by using -sample 50% for one and -roll +1+1 -sample 50% for the the other. I am not sure if -sample 50% starts at 0,0 or 1,1.
Post Reply