its possible get the average pixel of every columns of pixels?

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
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

its possible get the average pixel of every columns of pixels?

Post by diegomage »

IM trying to exaplain with this image
get the color average for each column of pixel of complex image

and obtain a line that indicate which is the average pixel by column

Image


this is similar to project image 2d to 1d and get the average color of this projection


I found some similar to this post

https://stackoverflow.com/questions/271 ... y-quantile

I only need obtain the colors average per column not the complete curve



Please help me
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: its possible get the average pixel of every columns of pixels?

Post by fmw42 »

Please always provide your IM version and platform/OS when asking questions, since syntax may vary.

Code: Select all

convert image.png -scale x1 1Dimage.png
or

Code: Select all

convert image.png -scale x1 txt:
The latter will give you text listing of each pixel in the 1D average.
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: its possible get the average pixel of every columns of pixels?

Post by diegomage »

yes I not refer exactly to this but your answer help me thank you
I use a command like this for reduce dimension to a line

Code: Select all

convert  image.png     -scale 100x3% xr2d.png
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: its possible get the average pixel of every columns of pixels?

Post by fmw42 »

x1 means one row by full number of columns, (Wx1)
Post Reply