opencv / opencv_contrib

Repository for OpenCV's extra modules
Apache License 2.0
9.19k stars 5.74k forks source link

Radon Transform #3739

Open GerhardZangerl opened 1 month ago

GerhardZangerl commented 1 month ago

System Information

openCV version 4.9.0-dev Ubuntu 22.04.4 LTS

Detailed description

The Radon Transform provided by openCV changes its src contrary to its documentation. I fixed that behavior locally by changing:

Mat _srcMat = src.getMat() ---> Mat _srcMat = src.getMat().clone();

in the "radon_transform.cc" file.

Steps to reproduce

After the call

double thetastep = 1.0
double  startAngle = -20;
double endAngle = 20;
cv::ximgproc::RadonTransform(matRef, radMatRef, thetaStep, startAngle, endAngle, true);

the cv::Mat matRef seess to be chagen. More detailed: I was using the Radon Transform within a loop when i recognized the behavior.

Issue submission checklist