Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convertTo/assignTo does not need a channel value #12604

Closed
wants to merge 1 commit into from

Conversation

cv3d
Copy link
Contributor

@cv3d cv3d commented Sep 21, 2018

This pullrequest changes

  • Provide convertTo() and assignTo() with depth-only values

@cv3d cv3d force-pushed the cleanup/convertTo branch 3 times, most recently from 7c6fd0b to 548acff Compare September 21, 2018 13:34
@cv3d
Copy link
Contributor Author

cv3d commented Sep 21, 2018

A small fraction of #12487
@vpisarev @alalek If you find it easier to review this way, then I can rewrite several parts the same way.

@param rtype desired output matrix type or, rather, the depth since the number of channels are the
same as the input has; if rtype is negative, the output matrix will have the same type as the input.
@param ddepth desired output matrix type or, rather, the depth since the number of channels are the
same as the input has; if ddepth is CV_DEPTH_AUTO, the output matrix will have the same type as the input.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation already allows to using both type and depth in existed OpenCV versions.
So this change is questionable actually.

P.S. Allowing both is not a good decision for API if elements are same. I believe during smooth transition on type-safe enums there should be both overloads for ElemDepth and ElemType(second with additional check that CV_MAT_CN(src.type()) == CV_MAT_CN(rtype)).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not we update the documentation to state that depth is enough?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants