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.
Kshitij Singh answered .
2025-11-20
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