How to crop license plate image automatically?

3 vues (au cours des 30 derniers jours)
NS
NS le 22 Fév 2015
Commenté : Image Analyst le 10 Avr 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?

Réponse acceptée

Image Analyst
Image Analyst le 22 Fév 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 commentaires
mae magdadaro
mae magdadaro le 10 Avr 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);
Image Analyst
Image Analyst le 10 Avr 2017
It looks like the cropped image, croppedImage, is the output.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Deep Learning Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by