Skip to content

Make div spectrums public#20103

Merged
alalek merged 2 commits intoopencv:3.4from
thezane:make-div-spectrums-public
May 19, 2021
Merged

Make div spectrums public#20103
alalek merged 2 commits intoopencv:3.4from
thezane:make-div-spectrums-public

Conversation

@thezane
Copy link
Copy Markdown
Contributor

@thezane thezane commented May 17, 2021

Make the function divSpectrums public. A unit test to verify the function for supported input types and flags is added.

This feature is requested in #19767.

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@thezane thezane force-pushed the make-div-spectrums-public branch 7 times, most recently from 0b193a4 to 30cac00 Compare May 18, 2021 01:53
@thezane thezane force-pushed the make-div-spectrums-public branch from 30cac00 to d43f3fa Compare May 18, 2021 02:46
@thezane thezane force-pushed the make-div-spectrums-public branch 2 times, most recently from 44a42d8 to 9de5c4b Compare May 18, 2021 06:57
@vpisarev vpisarev self-assigned this May 19, 2021
@vpisarev vpisarev self-requested a review May 19, 2021 05:54
@alalek alalek merged commit c0162a6 into opencv:3.4 May 19, 2021
Mat &converted_src1 = test_mat[TEMP][0];
Mat &converted_src2 = test_mat[TEMP][1];
convert_from_ccs( src1, src1, converted_src1, flags );
convert_from_ccs( src2, src2, converted_src2, flags );
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'd like to see convert_from_ccs and convert_to_ccs as public functions as well. Why do you pass in two src matrices to this function?

Copy link
Copy Markdown
Contributor Author

@thezane thezane May 22, 2021

Choose a reason for hiding this comment

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

I think it's a good idea to make them public if they're going to be used elsewhere. Also, the exact same conversion is used in test_dxt.cpp.

Only a single src matrix needs to be passed in for the end user. The presence of two src args is for the recursive call on line 260. Perhaps the public api can be improved to only accept a single src matrix.

@thezane thezane deleted the make-div-spectrums-public branch May 22, 2021 06:54
@alalek alalek mentioned this pull request May 23, 2021
@alalek alalek mentioned this pull request Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants