• 大小: 172KB
    文件类型: .m
    金币: 1
    下载: 0 次
    发布日期: 2021-06-04
  • 语言: Matlab
  • 标签:

资源简介

对后续开发fast新代码有很好的借鉴作用,对MATLAB应用也是一个很好的推广作用,希望可以帮助到需要的人,谢谢。

资源截图

代码片段和文件信息

%FAST_CORNER_DETECT_9 perform an 9 point FAST corner detection.
%    corners = FAST_CORNER_DETECT_9(image threshold) performs the detection on the image
%    and returns the X coordinates in corners(:1) and the Y coordinares in corners(:2).

function coords = fast_corner_detect_9(im threshold)
sz = size(im);
xsize=sz(2);
ysize=sz(1);
cs = zeros(5000 2);
nc = 0;
for x = 4 : xsize - 3
for y = 4 : ysize -3
cb = im(yx) + threshold;
c_b= im(yx) - threshold;
            if im(y+0x+3) > cb
                if im(y+-3x+1) > cb
                    if im(y+2x+2) > cb
                        if im(y+-2x+-2) > cb
                            if im(y+-1x+3) > cb
                                if im(y+1x+3) > cb
                                    if im(y+-2x+2) > cb
                                        if im(y+-3x+0) > cb
                                            if im(y+-3x+-1) > cb
                                            elseif im(y+-3x+-1) < c_b
                                                continue;
                                            else
                                                if im(y+3x+0) > cb
                                                    if im(y+3x+1) > cb
                                                    else
                                                        continue;
                                                    end
                                                else
                                                    continue;
                                                end
                                            end
                                        elseif im(y+-3x+0) < c_b
                                            continue;
                                        else
                                            if im(y+3x+-1) > cb
                                                if im(y+3x+0) > cb
                                                    if im(y+3x+1) > cb
                                                    else
                                                        continue;
                                                    end
                                                else
                                                    continue;
                                                end
                                            else
                                                continue;
                                            end
                                        end
                                    elseif im(y+-2x+2) < c_b
                                        continue;
                                    else
                                        if im(y+3x+-1) > cb
                                            if im(y+1x+-3) > cb
                                       

评论

共有 条评论