counting of pixels having same same value
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
monika SINGH
el 8 de Abr. de 2019
Editada: monika SINGH
el 11 de Abr. de 2019
how to count pixels having same value
4 comentarios
Manuel Schmidberger
el 8 de Abr. de 2019
Depending on that you wanna count (one or more values) you can use this:
VALS=[1,2...N] % Array of values 1xN
thermIm= % Matrix of thermal image values
noVals=sum(sum(ismember(thermIm,VALS)))
noVals is the amount of pixels in thermal image containing the values stored in array VALS
If you have just one value you can just use a combination of "length" and "find"
VAL= % Random number 1x1
noVals=length(find(thermIm==VAL))
Respuesta aceptada
Image Analyst
el 8 de Abr. de 2019
Editada: Image Analyst
el 8 de Abr. de 2019
You can take a histogram:
histObject = histogram(yourImage);
or
[counts, grayLevels] = imhist(grayImage);
1 comentario
Más respuestas (0)
Ver también
Categorías
Más información sobre Get Started with Image Processing Toolbox en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!