GpuSurfDetectorInternal.hppGo to the documentation of this file.00001 00011 /* 00012 Copyright (c) 2010, Paul Furgale and Chi Hay Tong 00013 All rights reserved. 00014 00015 Redistribution and use in source and binary forms, with or without 00016 modification, are permitted provided that the following conditions are 00017 met: 00018 00019 * Redistributions of source code must retain the above copyright notice, 00020 this list of conditions and the following disclaimer. 00021 * Redistributions in binary form must reproduce the above copyright 00022 notice, this list of conditions and the following disclaimer in the 00023 documentation and/or other materials provided with the distribution. 00024 * The names of its contributors may not be used to endorse or promote 00025 products derived from this software without specific prior written 00026 permission. 00027 00028 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00029 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 00030 TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 00031 PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 00032 OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00033 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00034 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00035 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00036 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00037 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00038 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00039 */ 00040 00041 #ifndef ASRL_GPU_SURF_DETECTOR_INTERNAL_HPP 00042 #define ASRL_GPU_SURF_DETECTOR_INTERNAL_HPP 00043 00044 #include <boost/shared_ptr.hpp> 00045 #include <opencv/cxtypes.h> 00046 #include "CudaSynchronizedMemory.hpp" 00047 #include <vector> 00048 #include "GpuIntegralImageProcessor.hpp" 00049 #include "GpuIntegralImage.hpp" 00050 #include <gpusurf/GpuSurfDetector.hpp> 00051 #include "GpuSurfFeatures.hpp" 00052 #include "GpuSurfOctave.hpp" 00053 00054 namespace asrl { 00055 00056 00062 class GpuSurfDetectorInternal 00063 { 00064 public: 00065 00071 GpuSurfDetectorInternal(GpuSurfConfiguration config); 00072 00077 virtual ~GpuSurfDetectorInternal(); 00078 00085 void buildIntegralImage(cv::Mat & image); 00086 00091 void detectKeypoints(); 00092 00098 void detectKeypoints(float threshold); 00099 00104 void findOrientation(); 00105 00111 void findOrientationFast(); 00112 00117 void computeDescriptors(); 00118 00123 void computeUprightDescriptors(); 00124 00130 void getKeypoints(std::vector<cv::KeyPoint> & outKeypoints); 00131 00137 void setKeypoints(std::vector<cv::KeyPoint> const & inKeypoints); 00138 00146 void initDetector(int width, int height); 00147 00153 void saveIntegralImage(std::string const & basename); 00154 00160 void getDescriptors(std::vector<float> & outDescriptors); 00161 00167 int descriptorSize(); 00168 00169 00171 bool m_initialized; 00172 00174 boost::shared_ptr<GpuIntegralImageProcessor> m_intProcessor; 00176 boost::shared_ptr<GpuIntegralImage> m_intImg; 00177 00179 GpuSurfOctave m_octaves[ ASRL_SURF_MAX_INTERVALS ]; 00181 float m_dxx_width; 00183 float m_dxx_height; 00184 00186 GpuSurfFeatures m_features; 00187 00189 GpuSurfConfiguration m_config; 00190 00192 cudaDeviceProp m_deviceProp; 00193 00195 CudaSynchronizedMemory<int4> m_maxmin; 00196 00198 CudaSynchronizedMemory<float> m_interest; 00199 00200 00201 }; 00202 00203 } // namespace asrl 00204 00205 00206 00207 #endif // ASRL_GPU_SURF_DETECTOR_INTERNAL_HPP Generated on Fri Apr 30 20:06:19 2010 for gpusurf by 1.6.2 |