Skip to content

cv::cartToPolar does not support inplace processing #24891

@chacha21

Description

@chacha21

Describe the feature and motivation

Currently, cv::cartToPolar() does not support in-place processing, there is a specific assert

void cartToPolar( InputArray src1, InputArray src2,
                  OutputArray dst1, OutputArray dst2, bool angleInDegrees )
{
    CV_INSTRUMENT_REGION();

    CV_Assert(src1.getObj() != dst1.getObj() && src1.getObj() != dst2.getObj() &&
              src2.getObj() != dst1.getObj() && src2.getObj() != dst2.getObj());

However, I can't see a reason to disallow in-place processing here.
Since the doc tells that input and output must be of the same size and type, and that this is a pixel-per-pixel operation, it should just work.
Is there any strong reason that I missed ?

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions