count white pixel from the bottom to the top and from the left to the right
Show older comments
i'm fresh learner for matlab, now i doing car plate localization project. My supervisor have give this hits to me "A(i,j)=abs(I(i,j)-I(i,j+1))" for count white pixel from the bottom to the top and from the left to the right, however i have no idea about this statement. below is my code i done.
[code]
clc;clear all;
input = imread('1.jpg')
I = imresize (input, [288 768]);
J = rgb2gray(I);
L = medfilt2 (J, [5 5]);
BW1 = edge(L,'sobel');
[x y]=size(BW1);
for i=1:x
counts = flipud(sum(BW1 == 1,2));
end
[/code]
thanks for your advice.
2 Comments
Oleg Komarov
on 28 Jul 2011
To format properly your code: http://www.mathworks.com/matlabcentral/answers/7885-tutorial-how-to-format-your-question
Oleg Komarov
on 28 Jul 2011
Ans as I said in the previous your post, you don't need the loop.
Answers (1)
Image Analyst
on 28 Jul 2011
0 votes
A(i,j)=abs(I(i,j)-I(i,j+1)) has nothing at all to do with the code you posted. To do that, you'd use conv2(), not medfilt2, edge, etc.
Categories
Find more on Text Detection and Recognition in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!