MATLAB: Creating a plot of intensity of pixels across an image using MATLAB

column plotgraphimage processingMATLABnumber of pixelspixel density in each columnplot

Hi am a newbie to MATLAB. Can anyone suggest me a code to plot a graph for number of pixels in each column of an image? any serious help would be appreciated.Thanks in advance.I need a code to get the density of black pixels in every column of an image.

Best Answer

It is not clear to me what kind of output you want, but
bar(mean(~im))
should calculate the average density of black (== 0) down the columns and draw a bar chart of the result.
Related Question