Directional feature extraction and Freeman chain code

2 次查看(过去 30 天)
Hi,
I used a freeman chain code file - that's exchanged by Alessandro Minnini- to extract the features of my (x,y) coordinate series and I'm new to this algorithm and matlab too.
I've the following questions :
1- When I run it on my data an error sometimes occurs : " Curve isn't 8-connected in elements " , why ?
2- The cc.code length is np-by-1 or 1-by-np array and most of its numbers is repeated, so can we reduce the result to only get the features of a character without duplicates and avoiding a feature vector length as the original coordinates length ?
3- if I used the following code to get the directions of a series of coordinates or the angles , is it right?
deltax=x(1:end-1)-x(2:end);
deltay=y(1:end-1)-y(2:end);
deltas=sqrt(deltax.^2+deltay.^2);
ax= deltax(1:end)./deltas(1:end); thx=cos(ax);
ay= deltay(1:end)./deltas(1:end); thy=sin(ax);
tangent=ay./ax;
theta=atan(tangent)
if it's not right please show me a way to extract direction features from my(x,y) coordinates series.
Thank you in advance

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Biomedical Imaging 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by