How to crop license plate image automatically?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
NS
el 22 de Feb. de 2015
Comentada: Image Analyst
el 10 de Abr. de 2017
1.How to crop the attached license plate image automatically? 2.And using these coordinates how to draw red rectangle around license plate in original image?

0 comentarios
Respuesta aceptada
Image Analyst
el 22 de Feb. de 2015
Get the bounding box with regionprops. Put up rectangle with rectangle. Crop with imcrop().
binaryImage = maskedImage > 0;
labeledImage = bwlabel(binaryImage);
measurements = regionprops(labeledImage, 'BoundingBox');
bb = [measurements.BoundingBox];
% Put up red rectangle
hold on;
rectangle('Position', bb, 'EdgeColor', 'r');
% Crop
croppedImage = imcrop(maskedImage, bb);
7 comentarios
mae magdadaro
el 10 de Abr. de 2017
what is the output of this code?
binaryImage = maskedImage > 0; labeledImage = bwlabel(binaryImage); measurements = regionprops(labeledImage, 'BoundingBox'); bb = [measurements.BoundingBox]; % Put up red rectangle hold on; rectangle('Position', bb, 'EdgeColor', 'r'); % Crop croppedImage = imcrop(maskedImage, bb);
Más respuestas (0)
Ver también
Categorías
Más información sobre Deep Learning 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!