descriptor.hpp 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // This file is part of OpenCV project.
  2. // It is subject to the license terms in the LICENSE file found in the top-level directory
  3. // of this distribution and at http://opencv.org/license.html.
  4. #ifndef _OPENCV_STEREO_DESCRIPTOR_HPP_
  5. #define _OPENCV_STEREO_DESCRIPTOR_HPP_
  6. namespace cv { namespace stereo {
  7. // FIXIT deprecate and remove CV_ prefix
  8. /// types of supported kernels
  9. enum {
  10. CV_DENSE_CENSUS, CV_SPARSE_CENSUS,
  11. CV_CS_CENSUS, CV_MODIFIED_CS_CENSUS, CV_MODIFIED_CENSUS_TRANSFORM,
  12. CV_MEAN_VARIATION, CV_STAR_KERNEL
  13. };
  14. /**
  15. Two variations of census applied on input images
  16. Implementation of a census transform which is taking into account just the some pixels from the census kernel thus allowing for larger block sizes
  17. **/
  18. CV_EXPORTS void censusTransform(const Mat &image1, const Mat &image2, int kernelSize, Mat &dist1, Mat &dist2, const int type);
  19. /// single image census transform
  20. CV_EXPORTS void censusTransform(const Mat &image1, int kernelSize, Mat &dist1, const int type);
  21. /**
  22. STANDARD_MCT - Modified census which is memorizing for each pixel 2 bits and includes a tolerance to the pixel comparison
  23. MCT_MEAN_VARIATION - Implementation of a modified census transform which is also taking into account the variation to the mean of the window not just the center pixel
  24. **/
  25. CV_EXPORTS void modifiedCensusTransform(const Mat &img1, const Mat &img2, int kernelSize, Mat &dist1, Mat &dist2, const int type, int t = 0, const Mat &integralImage1 = Mat(), const Mat &integralImage2 = Mat());
  26. ///single version of modified census transform descriptor
  27. CV_EXPORTS void modifiedCensusTransform(const Mat &img1, int kernelSize, Mat &dist, const int type, int t = 0, const Mat &integralImage = Mat());
  28. /**The classical center symetric census
  29. A modified version of cs census which is comparing a pixel with its correspondent after the center
  30. **/
  31. CV_EXPORTS void symetricCensusTransform(const Mat &img1, const Mat &img2, int kernelSize, Mat &dist1, Mat &dist2, const int type);
  32. ///single version of census transform
  33. CV_EXPORTS void symetricCensusTransform(const Mat &img1, int kernelSize, Mat &dist1, const int type);
  34. ///in a 9x9 kernel only certain positions are choosen
  35. CV_EXPORTS void starCensusTransform(const Mat &img1, const Mat &img2, int kernelSize, Mat &dist1, Mat &dist2);
  36. ///single image version of star kernel
  37. CV_EXPORTS void starCensusTransform(const Mat &img1, int kernelSize, Mat &dist);
  38. }} // namespace
  39. #endif