# How can I find maxima and minima points of intensity plot of one row of an image?

1 view (last 30 days)
Samidha on 6 Dec 2013
Commented: Samidha on 10 Dec 2013
I want to plot intensity of single row of an MRI image, for that firstly I wrote -
imshow(i)
improfile
from this I got intensity plot of any row or column. Now I want to find maximum and minimum values of that plot.So,please help me to get solution of this obstacle.
Thank you

Image Analyst on 6 Dec 2013
Don't use i (the imaginary variable) as an image name or loop counter.
Try this:
oneRow = grayImage(myRow, :);
% Find the min and max
[minGL, indexOfMin] = min(oneRow)
[maxGL, indexOfMax] = max(oneRow)
See my demo, test.m, attached below in blue, which will generate the following figure.
##### 2 CommentsShow NoneHide None
Samidha on 8 Dec 2013
thank you very much for your reply.. I get max nd min value in numerical form, I don't find profile plot which i want. I write- grayImage=dicomread('mri_7.dcm'); oneRow = grayImage(111, :); % Find the min and max [minGL, indexOfMin] = min(oneRow) [maxGL, indexOfMax] = max(oneRow)
minGL =
0
indexOfMin =
1
maxGL =
105
indexOfMax =
97
Samidha on 10 Dec 2013
Hey I got output..I am sorry for last last comment. thank you v much

### More Answers (1)

sixwwwwww on 6 Dec 2013
Edited: sixwwwwww on 6 Dec 2013
you can use
max(i) % to find maximum value in a row/column vector
and
min(i) % to find minimum value in a row/column vector
sharing image to give specific solution will be further helpful

### Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!