Closed xiahaa closed 5 years ago
I always get confuse in Non-maximum suppression. I use my way in fast original , the result seems not very good. but with same code in fast, the result is better.
@xiaohanlyu
for i=4:m-3
for j=4:n-3
if result(i,j)~=0
if max(max(result(i-2:i+2,j-2:j+2)))==result(i,j)
[img(i-3,j), img(i-3,j+1), img(i-2,j+2), img(i-1,j+3), img(i,j+3), img(i+1,j+3), img(i+2,j+2), img(i+3,j+1), ...
img(i+3,j), img(i+3,j-1), img(i+2,j-2), img(i+1,j-3), img(i,j-3), img(i-1,j-3), img(i-2,j-2), img(i-3,j-1)]= ...
deal(255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255);
end
end
end
end
This is not non-maxima suppression, this is just drawing. When there is a fast corner, draw its corresponding bresenham circle. see this zoomed image as an example red cross are fast corners. white pixels are their nn pixels.
You should do like what you do in the harris.m. Traverse the image, if current pixel is a corner, check its nn to see if there are other corners, if there is, compare their scores, only keep the one with the maximum score but mask others.
see my answer in your new branch
@xiaohanlyu add some comment for you to understand the code.
@xiaohanlyu I added a folder called "3rdparty" where we place all third party (means implemented by others) codes there. You will find two implementations of non-maxima suppression. The "nonmaxsuppts" is the one for corner points. It was implemented by a professor from western Australia university. He uses "imdilate" (help imdilate) and then compare the dilated image with the raw score image to find maxima. It will have the same effect as your first implementation: if you have two neighboring maximas, then both of them will be kept.
@xiaohanlyu I see your commit. It is ok for fast detection. I think you can start your work on Brief.
@xiaohanlyu I uploaded my code by a mistake. However, it is still a good idea that you work alone on feature descriptor and matching. Only in this way, you can truly grasp something.
So do we have lecture in tomorrow afternoon? I remember you said you have a speech tomorrow
@xiaohanlyu No. However, if your progress is quite good and you would like to try more on feature based application (recognition, etc.), I can give you a lecture on those topics on Friday (but after 16:00) or some date next week depends on you. Otherwise, we just skip this week. Perhaps at the end, I can add one lecture on some topics you feel interested and I am also familiar since I think after you have some experimence on computer vision and image processing, you would have some ideas.
OK. And I also have some question about your code(extract_brief_descriptor). 1.Why you enlarge the size of image? 2.Why you add more rows in column 1 and column 2 specifically?(in 11 and 12 row)
just padding. Because the size of the brief pattern is 9x9. So if you don't do image padding, you have to filter out some features near the boarder. This is not a must, but an option. So either fiter out or padding.
add more rows in column 1 and column 2 specifically?(in 11 and 12 row)
just in case of out of boader
@xiaohanlyu tell me when you are done with description and matching. I will depend on your progress to give your additional tasks like:
However, if you have no interests in those additional tasks, feel free to tell me and we can skip.
Ok,i will try to finish the current task quickly.
i write extract descriptor file by myself. There is an error in sub2ind. but when i try your file, there also has same error. How to solve it? also, it works yesterday but broken today
Finally i solve this problem by comment this line('sss'). i create a new folder named mybrieffast. all of my files in it. It still have some problems. It seems like i plot two times corner in the plot. But i check the data, It seems no repeat figure in it. so i don't know why there are some repeat in plot.
Finally i solve this problem by comment this line('sss'). i create a new folder named mybrieffast. all of my files in it. It still have some problems. It seems like i plot two times corner in the plot. But i check the data, It seems no repeat figure in it. so i don't know why there are some repeat in plot.
simple bug. rgb2gray use gray image, not rgb image.
@xiaohanlyu another bug of your code. if you choose not to do the padding, then you have to filter out corners near the border. i>=11, etc
@xiaohanlyu check my latest submission which fixes your bugs.
See this pdf file as the assignment for 3 and 4: https://github.com/xiaohanlyu/image-stitching/blob/master/docs/ex34.pdf
有一点昨天讲错了,Brief不是去和中心像素比较大小,生成的pattern就是比较对,比如(3,3)-(4,1)代表比较中心像素偏移(3,3)的那个像素和偏移(4,1)的那个像素的灰度大小,小的话置1,否则置0。 根据你需要描述的大小,产生对应的描述对,比如Brief 128代表产生128个对比对。
when you finish, tell me. Then we will work on some fancy issues using SIFT and HOG.