Image Projections Kavalieratou.

Hi Guys! I have a problem on Structural Characteristics(kavallieratou) technique. Well, i'm implementing this method on matlab for a research, but i'm really new on matlab.(never programed in, never. Only java, but my research needs matlab). I'm have a trouble on step of the projections( horizontal projections, Vertical projections and principally radial projections and profiles(in-out, out -in). In kavallieratou, these steps are necessary to analyze it, and after puts all of them in a vector with 280 characteristics. Going deeper, this technique is to count the black pixels of a row / column, and stores in a vector. The radial projection is calculated by sum of black pixels in the image from the center Geometric image and moving toward the edge pre-defined angles.I just need it for make a comparation with another technics, and i implemented all of others steps but this step i dont know how to do on matlab. Any one knows it?
thanks in advance!

 채택된 답변

Image Analyst
Image Analyst 2012년 5월 12일

0 개 추천

To "count the black pixels of a row / column, and stores in a vector." you'd do this
[rows columns] = size(grayScaleImage);
countOfNonZerosInARow = zeros(1, rows);
countOfNonZerosInAColumn= zeros(1, columns);
for row = 1 : rows
oneRow = grayScaleImage(row, :);
countOfNonZerosInARow(row) = nnz(oneRow);
end
for column = 1 : columns
oneColumn = grayScaleImage(:, column);
countOfNonZerosInAColumn(column) = nnz(oneColumn);
end
There are other ways, but this might be the most straightforward for a beginner like you. Can you handle it from there?

댓글 수: 4

Marcus Vinicius
Marcus Vinicius 2012년 5월 13일
yes, that was very helpful. With that I can implement the technique of vertical and horizontal projection of a database (images). The technique complete, is to use these two, another technique which is as follows: In an image from eg 16x16 pixels, classifying the geometric center of it and from there, to count the black pixels within an angle of 5 °, the angle from 0 °. This is really breaking my head. The geometric part of the point that the center is to be easy to find. But counting the pixels in that angle, I believe I have to use Fourier coefficients, something like that. I appreciate the help for that horizontal and vertical: D
there goes the article base, for anyone interested :)
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.97.3020
Marcus Vinicius
Marcus Vinicius 2012년 5월 13일
in addition, would be very useful to know how to count pixels that are contained in an angle, you have the coordinates of the center of the image.
Image Analyst
Image Analyst 2012년 5월 13일
You'd probably have to use imrotate to get a rectangular array, then use the code I gave you on that. But you'll have to alter imrotate to make sure it rotates/exposes something other than 0's when it does it's thing.
Marcus Vinicius
Marcus Vinicius 2012년 5월 13일
i will do this way. If i get a good result i post here . Thanks I.A. :D

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Marcus Vinicius
Marcus Vinicius 2012년 5월 12일

0 개 추천

no one else?

댓글 수: 2

Image Analyst
Image Analyst 2012년 5월 12일
They've probably never heard of the "kavallieratou technique" - I haven't. There are thousands of papers that other people name after the authors - no one can know them all.
Marcus Vinicius
Marcus Vinicius 2012년 5월 13일
I'm sorry, I should have been a little more specific about my problem and should not have named the name of the author of the article that I research.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by