Ask Your Question

Destination image size of LinearPolar / LogPolar

asked 2017-08-10 23:32:56 -0500

Formicant gravatar image

updated 2017-08-11 00:04:24 -0500

The documentation says:

void cv::linearPolar (InputArray src, OutputArray dst, Point2f center, double maxRadius, int flags)

  • src – Source image
  • dst – Destination image. It will have same size and type as src.

Why is the size of the destination image forced to be the same as the one of the source image? Does it make any sense?

As far as I understand, the angular and radial resolution of the resulting image shouldn’t depend on the width and height of the source. Ideally, it should be set manually with some reasonable defaults depending on the maxRadius parameter (say, maxRadius × 2π∙maxRadius to match the resolution of the circle edge, or maxRadius × π∙maxRadius to match the average resolution of the source for LinearPolar).

edit retag flag offensive close merge delete



problem is still the same in 3.3, yet please DO NOT use the deprecated 2.4 c-api version.

berak gravatar imageberak ( 2017-08-10 23:57:29 -0500 )edit

Sorry, I’ve just copied the text from the wrong place. I use OpenCV 3 actually.

Formicant gravatar imageFormicant ( 2017-08-11 00:06:13 -0500 )edit

oook, much better ;)

berak gravatar imageberak ( 2017-08-11 00:10:58 -0500 )edit

Should I open an issue in the OpenCV GitHub bugtracker?

Formicant gravatar imageFormicant ( 2017-08-11 00:20:25 -0500 )edit

too late ;)

(and yes, it would need another overload (abi compability))

berak gravatar imageberak ( 2017-08-11 03:51:27 -0500 )edit
Formicant gravatar imageFormicant ( 2017-08-11 04:09:47 -0500 )edit

I don't think this is an issue . btw I agree that it would be useful to have this as feature. Time ago I developed a version that works as you request. Please follow your issue on github to get the code and updates. Bye

pklab gravatar imagepklab ( 2017-08-11 13:36:16 -0500 )edit

1 answer

Sort by » oldest newest most voted

answered 2018-01-04 10:52:17 -0500

pklab gravatar image

a bit late but I've just submitted a pullrequest ( to add the required functionality. Please check/test/comment

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-08-10 23:32:56 -0500

Seen: 200 times

Last updated: Jan 04