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

Illustration
Mikaela_sf - 2020-09-26T11:09:23+00:00
Question: Creating a plot of intensity of pixels across an image using MATLAB?

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.

Expert Answer

Profile picture of Kshitij Singh 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






Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!