Take the average from a region of a plot and subtract the background
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
aneps
el 25 de Nov. de 2013
Comentada: Image Analyst
el 25 de Nov. de 2013
I have a histogram ranging from 0 to 700 (along X axis). It is an exponential decay curve. I want to take the average from 600 to 700. This average is the background. I want to subtract this background from the plot. How can I perform this in Matlab?
0 comentarios
Respuesta aceptada
Image Analyst
el 25 de Nov. de 2013
Try this:
binaryImage = grayImage > 600;
meanGL = mean(grayImage(binaryImage ))
newImage = double(grayImage) - meanGL; % Casting to double is needed to get negative values.
imshow(newImage, []); % The [] is needed.
7 comentarios
Image Analyst
el 25 de Nov. de 2013
It should give you the mean t in the histogram. Because your t starts at 0, you can find the index, if you need it, by adding 1. If you need just the t value, you don't need to add 1.
Más respuestas (0)
Ver también
Categorías
Más información sobre Line Plots 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!