我试图提取Radon Signature以识别衣服的图案(条纹,格子图案,不规则和无图案),如1所示.
要实现的算法:
1. Use sobel operator to compute the gradient map as f(x,y). 2. Perform Radon transform based on maximum disk area. 3. Compute the variance of r under all theta directions. 4. Employ L2-norm to normalize the feature vector. 5. Plot Radon Signature as a bar chart of var(r) for all theta values.
我做了以下事情:
img = imread('plaid.jpg'); grey = rgb2gray(img); img2 = edge(grey, 'sobel'); vararray=zeros(1,size(theta,2)); theta = -89:90; for j = 1: size(theta,2) [R3,xp3] = radon (img2,theta(j)); vararray(j) = var(R3); end vararray = vararray/norm(vararray); figure(1), bar(theta,vararray),title('Radon Signature');
我相信我的错误在于前两步.我不确定如何仅在最大磁盘区域上执行Radon.
我的结果显示在右侧,而文章(下面引用)显示在左侧.
但是,我的结果应该至少显示2个不同的峰,如acticle的结果所示,但他们没有.
任何帮助表示赞赏.
算法来源:"视障人士的辅助服装模式识别",杨晓东,IEEE学生会员,帅帅,田英利,IEEE高级会员