Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

extractChannel does not support in-place in OpenCV 5 #29568

Copy link
Copy link

Description

@vrabaud
Issue body actions

System Information

Any with OpenCV 5 at HEAD

Detailed description

Since https://github.com/opencv/opencv/pull/23473/changes#diff-3be366740aac9a82703bf5930bf69f2f9aff56b7c5b5de67eb84799553b0c571, OpenCV 5 does not support in-place with extractChannel.

Steps to reproduce

TEST(Core_Mat, extractChannel)
{
    cv::Mat mat(3, 3, CV_8UC3, Scalar(1,2,3));
    cv::extractChannel(mat, mat, 1);
    EXPECT_EQ(mat.channels(), 1);
}

extractChannel throws. Reverting the _dst.createSameSize to _dst.create works. Should we revert ? Is there a bug in createSameSize ? Should we not allow in place ? Thx

Issue submission checklist

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files (videos, images, onnx, etc)
Reactions are currently unavailable

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

Morty Proxy This is a proxified and sanitized view of the page, visit original site.