Question
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.
Related Questions
Expert Answer
Kshitij Singh
PhD Expert
Answered Aug 20, 2026
I = fitsread('solarspectra.fts');%input your image
imshow(I,[]);
Create the intensity profile. Call improfile with no arguments. The cursor changes to cross-hairs when you move it over the displayed image. Using the mouse, specify line segments by clicking the endpoints. improfile draws a line between the endpoints. When you finish specifying the path, press Return. .
improfile
Have a different question? Ask here