You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where in the documentation does it state, that it is not changed? I do not find that in the current version.
But I do agree, changing the input is not something I expected either.
Instead of transposing the input I'm proposing to change the math a bit to work with the non-transposed version. Instead of projecting the rows, we could project the columns. But I am unsure, if that would hurt performance, since we would use cv::reduce for columns instead of rows, we would have to test it.
Doing my proposed chang would mean that we do neither need to clone the input beforehand, as you propose, nor do we need to store the transposed version in a new Mat as is proposed in #3813
This does work as I show in the PR below. But to keep the sinogram horizontal instead of vertical we have to transpose the output. This will keep the output the same, just to not introduce major (breaking) changes. I don't know if it is ok to have the radon transformatin transposed.
Alternatively we could just improve documentation, clearly stating that the srcMat get's transposed, which is easily reversible in case anyone wants to reuse the srcMat.
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
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
The text was updated successfully, but these errors were encountered: