radon_transform_demo.cpp 549 B

123456789101112131415161718
  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. #include <opencv2/highgui.hpp>
  5. #include <opencv2/ximgproc/radon_transform.hpp>
  6. using namespace cv;
  7. int main() {
  8. Mat src = imread("peilin_plane.png", IMREAD_GRAYSCALE);
  9. Mat radon;
  10. ximgproc::RadonTransform(src, radon, 1, 0, 180, false, true);
  11. imshow("src image", src);
  12. imshow("Radon transform", radon);
  13. waitKey();
  14. return 0;
  15. }