How to find minimum and maximum pixel value in image
63 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Med Future
am 19 Mär. 2022
Kommentiert: Med Future
am 21 Mär. 2022
Hello Everyone, i hope you are doing well.
I have the following to images. i want detect the pattern and find the minimum and maximum value for the pattern
for example the first image sinewave. i want to detect the shape and find the value for upper peak and lower peak.
same for the second image
Can anybody help me in that
Akzeptierte Antwort
Atsushi Ueno
am 19 Mär. 2022
Bearbeitet: Atsushi Ueno
am 20 Mär. 2022
>i want detect the pattern and find the minimum and maximum value for the pattern
The images have black background with value 0 and a white line with value 255.
You can use max(org:find) function to find non-zero value in each columns in the picture data.
image = imread('im_003002.png');
[~, wave] = max(image); % thx @Scott MacKenzie for x = 1:size(image,2) wave(x) = find(image(:,x)); end
max(wave) % It is y coordinate value of each dots on the white line.
min(wave) % It is y coordinate value of each dots on the white line.
plot(wave);
7 Kommentare
DGM
am 20 Mär. 2022
What exactly do you mean when you say "detect the shape"?
Do you want a mathematical expression of the periodic function?
Do you want to classify the type of periodic waveform?
Are you trying to find instances of the same (or similar) shape in other images?
If you want the first one, note that nothing in these images conveys any calibration information. All units will be in pixels. You will need to know the relationship between image coordinates and data coordinates.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!