What's wrong with my feature extraction code?
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论
I am getting same descriptors for different images.
I tested it by:
image1 = imread('C:\Users\Explorer\Documents\MATLAB\ASL_signs\A.jpg');
image2 = imread('C:\Users\Explorer\Documents\MATLAB\ASL_signs\B.jpg');
v1=Descrip(image1);
v2=Descrip(image2);
SUM=sum(v1-v2)
_____________________________________________________________________________________
Output :
SUM =
0
1 个评论
Explorer
2014-2-12
回答(2 个)
David Young
2014-2-12
0 个投票
Descrip writes then reads contour.jpg, and then computes the result from that. One way to set about debugging would be to see whether contour.jpg is different for the two images. That will help pin down where the problem lies.
4 个评论
Explorer
2014-2-12
David Young
2014-2-13
The idea was that you run Descrip with one input image, look at contour.jpg, run it again with the other input image, and look at contour.jpg again. Are they different?
Image Analyst
2014-2-12
编辑:Image Analyst
2014-2-12
0 个投票
Don't use image as a variable name - it's the name of a built-in function.
5 个评论
Explorer
2014-2-13
Image Analyst
2014-2-13
编辑:Image Analyst
2014-2-13
What are you using now: Descrip or Descrip2? Doesn't stepping through it with the debugger reveal where the problem is????
Image Analyst
2014-2-13
If image A equals image B then I think they should be the same. You didn't attach either image so only you can know that. What did stepping through with the debugger reveal to you?
Walter Roberson
2014-2-13
Watch out for the case where v1 and v2 are being returned as unsigned integers; in that case if v2 > v1 you would get "clipping" at 0 instead of getting a negative number.
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!