Page 1 of 1

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

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

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

Posted: 2017-09-23T10:01:29-07:00
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.

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

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

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

Posted: 2017-09-23T10:28:48-07:00
by fmw42
x1 means one row by full number of columns, (Wx1)