MATLAB Answers

farhat
0

How to localize the vehicle plate with Hough Transform?

Asked by farhat
on 5 Aug 2013
I want to localize the plate of the vehicle and crop it. And the cropped image will be used in character segmentation phase. But the code always give the wrong result.
here is the code..
%# read and crop image
I = imread('DSC_0512.JPG');
%# egde detection
BW = edge(rgb2gray(I), 'canny');
%# hough transform
[H T R] = hough(BW);
P = houghpeaks(H, 4, 'threshold',graythresh(H));
lines = houghlines(BW, T, R, P);
%# show image with lines overlayed, and the aligned/rotated image figure
subplot(121), imshow(I), hold on
for k = 1:length(lines)
xy = [lines(k).point1; lines(k).point2];
plot(xy(:,1), xy(:,2), 'g.-', 'LineWidth',2);
end, hold off
I want that the code can applied for many car's image to get the plate location and crop it.
Here is example of the images.
Any suggestion?

  0 Comments

Sign in to comment.

0 Answers