Prev: Animating plots
Next: Matlab Compiler for GUI
From: dude on 10 Jul 2010 10:24 Hello everybody I've been working in Number Plate Recognition and i have managed to detect the number plate so far. but the thing is after using the hough transformation i cant extract the number plate region. can anyone please guide me with it?? here is my code up to now [code] clear; im=imread('goood.jpg');%putting the image name imtool(im); sz=size(im); for i=1:sz(1) for j=1:sz(2) if im(i,j,1)>200 & im(i,j,2)>200 & im(i,j,3)>200 white(i,j)=1; green(i,j)=0; blue(i,j)=0; red(i,j)=0; elseif im(i,j,1)>200 & im(i,j,2)<50 & im(i,j,3)<50 white(i,j)=0; green(i,j)=0; blue(i,j)=0; red(i,j)=1; elseif im(i,j,1)<50 & im(i,j,2)>200 & im(i,j,3)<50 white(i,j)=0; green(i,j)=1; blue(i,j)=0; red(i,j)=0; elseif im(i,j,1)<50 & im(i,j,2)<50 & im(i,j,3)>200 white(i,j)=0; green(i,j)=0; blue(i,j)=1; red(i,j)=0; else white(i,j)=0; green(i,j)=0; blue(i,j)=0; red(i,j)=0; end end end bware = bwareaopen(white,500); imtool(bware); se90 = strel('line', 3, 90); se0 = strel('line', 3, 0); BWsdil = imdilate(bware, [se90 se0]); BWdfill = imfill(BWsdil, 'holes'); Wnobord = imclearborder(BWdfill, 4); imtool(Wnobord); [H, theta,rho]=hough(Wnobord); imshow(imadjust(mat2gray(H)), [], 'XData',theta, 'YData',rho, ... 'InitialMagnification','fit') xlabel('\theta (degrees)'), ylabel('\rho') axis on, axis normal, hold on colormap(hot), colorbar BWoutline = bwperim(Wnobord); Segout = im; Segout(BWoutline) = 255; imtool(Segout); %imgcropped = imcrop(Segout,Wnobord); %imshow(imgcropped); imtool(white); imtool(green); imtool(blue); imtool(red); [/code]
From: dude on 10 Jul 2010 10:41 "dude " <dudedatro(a)gmail.com> wrote in message And this is the image of a car that i have detected the number plate. but cant extract only the plate. http://img8.imageshack.us/i/selectedregion.jpg/
From: us on 10 Jul 2010 15:20 "dude " <dudedatro(a)gmail.com> wrote in message <i1a0q1$83s$1(a)fred.mathworks.com>... > "dude " <dudedatro(a)gmail.com> wrote in message > > And this is the image of a car that i have detected the number plate. but cant extract only the plate. > > http://img8.imageshack.us/i/selectedregion.jpg/ a hint: - the number is: WP HX - 8093 us
From: dude on 10 Jul 2010 15:45 "us " <us(a)neurol.unizh.ch> wrote in message <i1ah5k$okq$1(a)fred.mathworks.com>... > "dude " <dudedatro(a)gmail.com> wrote in message <i1a0q1$83s$1(a)fred.mathworks.com>... > > "dude " <dudedatro(a)gmail.com> wrote in message > > > > And this is the image of a car that i have detected the number plate. but cant extract only the plate. > > > > http://img8.imageshack.us/i/selectedregion.jpg/ > > a hint: > - the number is: WP HX - 8093 > > us Thank u very much for the reply but can u please tel me that in more detail??? i managed to develop the character recognition part but it works when only the number plate region is extracted. my problem is how to extract this selected portion from the original image. i have tried imcrop but no use. it was like this, imgcropped = imcrop(Segout,BWoutline); imshow(imgcropped); (According to the above code)
From: us on 10 Jul 2010 17:13
"dude " <dudedatro(a)gmail.com> wrote in message <i1aik4$kqf$1(a)fred.mathworks.com>... > "us " <us(a)neurol.unizh.ch> wrote in message <i1ah5k$okq$1(a)fred.mathworks.com>... > > "dude " <dudedatro(a)gmail.com> wrote in message <i1a0q1$83s$1(a)fred.mathworks.com>... > > > "dude " <dudedatro(a)gmail.com> wrote in message > > > > > > And this is the image of a car that i have detected the number plate. but cant extract only the plate. > > > > > > http://img8.imageshack.us/i/selectedregion.jpg/ > > > > a hint: > > - the number is: WP HX - 8093 > > > > us > > Thank u very much for the reply but can u please tel me that in more detail??? a hint: - use the human vision tbx... us |