How to make the edge darker (increase contrast?)
15 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Steven
el 16 de Dic. de 2013
I want to somehow increase the contrast if it is the thing to do. What I want is make the edge darker and clearer, so that I can detect it better in binary image. For example this is what I want:
But I made this through picture manager not MATLAB. How can I do this with matlab? If I use imadjust or etc for enhancing contrast, I get this:
which is not what I want. Now these are my questions:
1. How can I use MATLAB to get the second image? I do not know how to use imajust or imcontrast to do so.
2. Is my whole method good or efficient for my final purpose? (clearer edge in binary)?
Thanks so much Steven
0 comentarios
Respuesta aceptada
Image Analyst
el 16 de Dic. de 2013
Increasing contrast with a point process like imadjust is not what you want to do. Just think about it - it won't change the shape of your edge, it will just make the threshold occur at a different value. You would need to do a spatial filter, something like mean shift or something like that. But to tell the truth I'm not sure you need to make the edge darker. What are you trying to measure exactly and then I can recommend an approach?
6 comentarios
Image Analyst
el 17 de Dic. de 2013
But contrast adjustment is not what you want to do. You can use bwareopen() to get rid of small clutter and noise in the binary image before summing. Or you can filter the grayscale image before thresholding with a sigma or knn filter, though that might alter the edge in a few locations.
Más respuestas (1)
David Sanchez
el 16 de Dic. de 2013
Play with the limits of imadjust. Test the following code and see how the image contrast changes with the limit values given to imadjust.
I = imread('pout.tif');
J = imadjust(I);
imshow(I),
figure, imshow(J)
K = imadjust(I,[0.4 0.6],[]);
figure, imshow(K)
K2 = imadjust(I,[0.2 0.8],[]);
figure, imshow(K2)
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!