how can i detect only the glass area for his spec
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Farkhan Yusof
el 20 de Abr. de 2015
Respondida: Dima Lisin
el 23 de Abr. de 2015
this is the original image

and from my work i just can get until this

this is my code
I=imread('viewImage.jpg'); FaceDetector=vision.CascadeObjectDetector(); BBOX=step(FaceDetector, I); Face=imcrop(I,BBOX); imshow(Face); Ib = rgb2gray(Face); figure, subplot(1,2,1), imshow(Ib); Ie = edge(Ib, 'sobel'); figure, subplot(1,2,1), imshow(Ie); Id = imdilate(Ie, strel('diamond', 1)); subplot(1,2,2), imshow(Id); If = imfill(Id, 'holes'); figure, imshow(If); stat = regionprops(If,'boundingbox'); hold on; for cnt = 1 : numel(stat) bb = stat(cnt).BoundingBox; rectangle('position',bb,'edgecolor','r','linewidth',2); end
thank you
0 comentarios
Respuesta aceptada
Dima Lisin
el 23 de Abr. de 2015
You can create another `vision.CascadeObjectDetector` object to detect the eyes, by setting 'ClassificationModel' to 'Eye Pair'.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Computer Vision with Simulink 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!