Path: blob/master/modules/features2d/src/fast_score.hpp
16337 views
/* This is FAST corner detector, contributed to OpenCV by the author, Edward Rosten.1Below is the original copyright and the references */23/*4Copyright (c) 2006, 2008 Edward Rosten5All rights reserved.67Redistribution and use in source and binary forms, with or without8modification, are permitted provided that the following conditions9are met:1011*Redistributions of source code must retain the above copyright12notice, this list of conditions and the following disclaimer.1314*Redistributions in binary form must reproduce the above copyright15notice, this list of conditions and the following disclaimer in the16documentation and/or other materials provided with the distribution.1718*Neither the name of the University of Cambridge nor the names of19its contributors may be used to endorse or promote products derived20from this software without specific prior written permission.2122THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS23"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT24LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR25A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR26CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,27EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,28PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR29PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF30LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING31NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS32SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.33*/3435/*36The references are:37* Machine learning for high-speed corner detection,38E. Rosten and T. Drummond, ECCV 200639* Faster and better: A machine learning approach to corner detection40E. Rosten, R. Porter and T. Drummond, PAMI, 200941*/4243#ifndef __OPENCV_FEATURES_2D_FAST_HPP__44#define __OPENCV_FEATURES_2D_FAST_HPP__4546#ifdef __cplusplus4748#include "precomp.hpp"4950namespace cv51{5253void makeOffsets(int pixel[25], int row_stride, int patternSize);5455template<int patternSize>56int cornerScore(const uchar* ptr, const int pixel[], int threshold);5758}5960#endif61#endif626364