MATLAB: How to plot intensity graph for an image

graphimage processingintensity

hi, i want to plot a intensity graph of an image like this
for an image
to find out the either closed or opened state of eye. i need this for my project. thank you

Best Answer

Convert it to grayscale and take mean along the rows using mean(I,2)
I = rgb2gray('fullfilename')
plot(1:size(I,1) , mean(I,2));