Borrar filtros
Borrar filtros

How to calculate the low and the high value of the threshold (histogram) ?

1 visualización (últimos 30 días)
marwa za
marwa za el 16 de Oct. de 2017
Respondida: KSSV el 17 de Oct. de 2017
can you help me, which function allows to calculate the low and the high value of the threshold (histogram)like the following histogram

Respuestas (1)

KSSV
KSSV el 17 de Oct. de 2017
doc min and max. Also see this code by Image Analyst
[pixelCounts, grayLevels] = imhist(grayImage);
minGrayLevel = min(grayImage(:));
maxGrayLevel = max(grayImage(:));
% or
minGrayLevel = find(pixelCounts > 0, 1, 'first');
maxGrayLevel = find(pixelCounts > 0, 1, 'last');
minCounts = min(pixelCounts(:));
maxCounts = max(pixelCounts(:));

Categorías

Más información sobre Histograms en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by