⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 corner_color1.m

📁 Harris Corner detection algorithm
💻 M
字号:
% This program is used to detect corners or points in an image using color intensity as the standard unlike usual methods of applying it on grey scale images
% Written by Rajeev Madazhy
% Graduate Student
% Department of Mechanical Engineering, LSU, Baton Rouge, LA
% Contact Information:  rmadaz1@lsu.edu

clear;
close all;
clc;
%im = imread(['pict0044.jpg']);
im = imread(['red1.bmp']);
sz=size(im);
m=sz(:,1);
n=sz(:,2);
k=1;


    for i=1:m-2
        for j=1:n-2
            if im(i,j) <=100 & im(i+1,j) <=100 & im(i+2,j) <=100 | im(i,j) <=100 & im(i,j+1) <=100 & im(i,j+2) <=100 
                
            elseif im(i,j) <=100
                point_locator(k,1)=i;
                point_locator(k,2)=j;
                k=k+1;
            end
        end
    end
%end
% to get the points from the the point_locator matrix
x=size(point_locator);
x1=x(:,1);
x2=x1/3;
refined_point_locator=point_locator(1:x2,1:2);
                  
figure;
imagesc(im);
colormap('gray');
hold on;

plot(refined_point_locator(:,2),refined_point_locator(:,1),'*');




 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -