How to find the value of the pixel with highest value in an image?
62 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Elias Unk
el 29 de Jul. de 2017
Respondida: Guillaume
el 29 de Jul. de 2017
Trying to replicate this step :" B. Maximum Intensity: This is done by finding maximum intensity in gray-scale image by maximizing in X and Y coordinate. When image is taken into max function, it will first getting maximum value along x-axis in each y-column. By taking max function again, an absolute maximum value is obtained." Is it just a sophisticated way to say we'll find the pixel with highest value and can i get the code for his step (even if it's just getting the max value).
0 comentarios
Respuesta aceptada
Guillaume
el 29 de Jul. de 2017
Read the documentation of the max function. When applied to a 2D matrix, max returns a vector of the maximum value of each column. Hence, your description says to apply a second time to get the max of this vector:
max(max(your2Dmatrix))
A better way of doing this would be to actually reshape the matrix into a vector and take the max once. That works regardless the number of dimensions of the matrix, whereas the above only works with 1d and 2d matrices:
max(yourmatrix(:))
0 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!