This code is not powerfull to locaization the plate of the vehicle.
I want to do character recognition from the vehicle plate. But the first step ( To Localize the plate is error)..
The cropped image is not the plate, but the another part of the image.
Here is the code :
I = imread('DSC_0512.JPG');
r = I(:,:,1);
g = I(:,:,2);
b = I(:,:,3);
BW = (r >= 230) & (r <= 260) & (g >= 160) & (g <= 240) & (b >= 160) & (b <= 240);
s = regionprops(BW, 'Area', 'BoundingBox');
[HH, ii] = sort([s.Area], 'descend');
out = imcrop(I, s(ii(1)).BoundingBox);
How to solve it???