diff options
author | shamikam | 2017-01-16 02:56:17 +0530 |
---|---|---|
committer | shamikam | 2017-01-16 02:56:17 +0530 |
commit | a6df67e8bcd5159cde27556f4f6a315f8dc2215f (patch) | |
tree | e806e966b06a53388fb300d89534354b222c2cad /macros/detectFASTFeatures.sci | |
download | FOSSEE_Image_Processing_Toolbox-a6df67e8bcd5159cde27556f4f6a315f8dc2215f.tar.gz FOSSEE_Image_Processing_Toolbox-a6df67e8bcd5159cde27556f4f6a315f8dc2215f.tar.bz2 FOSSEE_Image_Processing_Toolbox-a6df67e8bcd5159cde27556f4f6a315f8dc2215f.zip |
Diffstat (limited to 'macros/detectFASTFeatures.sci')
-rw-r--r-- | macros/detectFASTFeatures.sci | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/macros/detectFASTFeatures.sci b/macros/detectFASTFeatures.sci new file mode 100644 index 0000000..e78baba --- /dev/null +++ b/macros/detectFASTFeatures.sci @@ -0,0 +1,53 @@ +function [cornerPoints]=detectFASTFeatures(image,varargin) +// This function is used to detect the corner points using FAST Alogrithm +// +// Calling Sequence +// [ Location Count Metric ] = detectFASTFeatures( Image, Name, Value... ) +// +// Parameters +// Image: Input Image, should be a 2-D grayscale. The Input Image should be real +// MinQuality [Optional Input Argument]: Minimum Accepted Quality of Corners, can be specified as a scalar value between [0,1]. Default: 0.1 +// MinContrast [Optional Input Argument]: Minimum Intensity difference for Corners to be detected, can be specified as a scalar value between[0,1]. Default: 0.2 +// ROI [Optional Input Argument]: Specify a rectangular region of operation. Format [ x y width height ]. Default: [1 1 size(Image,2) size(Image,1)] +// Location: Set of x,y coordinates for the deteccted points +// Count: Number of corner points detected +// Metric: Value describing the strength of each detected Point +// +// Description +// The detectFASTFeatures function uses the Features from Accelerated Segment Test (FAST) algorithm to find feature points. +// +// Examples +// image = imread('sample.jpg'); +// [location count metric] = detectFastFeatures(image); +// +// With Optional Arguments: +// [location count metric] = detectFASTFeatures(image,"MinContrast",0.2); +// +// Authors +// Umang Agrawal +// Sridhar Reddy + + [lhs rhs]=argn(0); + if lhs>3 + error(msprintf(" Too many output arguments")); + elseif rhs-1>6 + error(msprintf(" Too many input arguments")); + elseif modulo(rhs-1,2)<>0 + error(msprintf("Either Argument Name or its Value missing")); + end + imageList=mattolist(image); + select rhs-1 + case 0 then + [location count metric]=opencv_detectFASTFeatures(imageList); + case 2 then + [location count metric]=opencv_detectFASTFeatures(imageList,varargin(1),varargin(2)); + case 4 then + [location count metric]=opencv_detectFASTFeatures(imageList,varargin(1),varargin(2),varargin(3),varargin(4)); + case 6 then + [location count metric]=opencv_detectFASTFeatures(imageList,varargin(1),varargin(2),varargin(3),varargin(4),varargin(5),varargin(6)); + end + cornerPoints=struct('Type','cornerPoints','Location',location,'Metric',metric,'Count',count); + //for i=1:count + // cornerPoints(i)=struct('Location',location(i,:),'metric',metric(i,:),'Count',1); + //end +endfunction |