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: 164
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 » 2017-09-23T09:42:33-07:00

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: 21904
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

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

Post by fmw42 » 2017-09-23T10:01:29-07:00

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: 164
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 » 2017-09-23T10:16:35-07:00

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: 21904
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

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

Post by fmw42 » 2017-09-23T10:28:48-07:00

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

Post Reply