SketchTokens icon indicating copy to clipboard operation
SketchTokens copied to clipboard

Index issue of positive patch and negative patch

Open zizhaozhang opened this issue 9 years ago • 0 comments

Hi Joseph,

I think there might be a small issue in stTrain.m From what I know, the clusters.x and clusters.y save the index of the center of each patch. When the image is Paded by imPad, the index begins the up-left point of a patch. That's why when you extract the feature of every path by using chns(xy(j,2):xy(j,2)+p,xy(j,1):xy(j,1)+p,:) where p is patchSiz - 1. However, for negative patch index which you got from find(M), the index you need to got is also the center of a patch, right? If so, however, you index those negative patches assuming the point is the up-left point as can been sen in chns(xy(j,2):xy(j,2)+p,xy(j,1):xy(j,1)+p,:) because the size of chns is the paded size.

Let me know if I am wrong, please.

Zizhao

zizhaozhang avatar Jan 15 '15 15:01 zizhaozhang