I need to implemet sliding window 30*7 for features extraction

Hello every one, I am working Text line recognition. I need to implemet sliding window 30*7 for features extraction as upper profile, mean of gravity, moment etc. Please guide me or send me code. I am totally new in this field and in matlab. Thank you in advance.
Saeeda

 Accepted Answer

If you're going to be doing specialized custom operations at each window location, then you need to us nlfilter. You define a function and then do whatever you want in there. Attached is a demo. Of you could have some nested for loops, over rows and columns, then inside there call a function like AnalyzeWindow() which you write to do your operations and return your feature vector.
[rows, columns, numberOfColorChannels] = size(yourImage);
for col = 1 : columns-7
for row = 1 : rows-30
results = AnalyzeWindow(yourImage, row, column); % You write this function.
end
end

More Answers (0)

Categories

Tags

Community Treasure Hunt

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

Start Hunting!