1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-21 14:41:58 +08:00
Files
opencv_contrib/modules/ximgproc/samples/radon_transform_demo.cpp
クロポ e94ec40615 Merge pull request #3090 from kuloPo:add-hough_space_transform
Add Radon transform function to ximgproc

* resolve rebash conflict

* add test for hough_space_transform

* add perf for hough_space_transform

* add sample for hough_space_transform

* fix compatible issue and trailing space

* fix EOF issue

* resolve rebash conflict

* update radon transform

fix always cropping corner when rotate
transpose the output - now each column is integral
add support for float number
add comment

* add float type to perf test

* add float type to accu test

* update document

* fix trailing space

* resolve rebase conflict

* Resolve coding style issues
2021-11-09 18:53:33 +03:00

19 lines
549 B
C++

// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
#include <opencv2/highgui.hpp>
#include <opencv2/ximgproc/radon_transform.hpp>
using namespace cv;
int main() {
Mat src = imread("peilin_plane.png", IMREAD_GRAYSCALE);
Mat radon;
ximgproc::RadonTransform(src, radon, 1, 0, 180, false, true);
imshow("src image", src);
imshow("Radon transform", radon);
waitKey();
return 0;
}