Skip to content

get and set cameras on stitcher#19619

Merged
alalek merged 2 commits intoopencv:masterfrom
amirtu:OCV-221_get_and_set_cameras_on_stitcher
Mar 9, 2021
Merged

get and set cameras on stitcher#19619
alalek merged 2 commits intoopencv:masterfrom
amirtu:OCV-221_get_and_set_cameras_on_stitcher

Conversation

@amirtu
Copy link
Copy Markdown
Member

@amirtu amirtu commented Feb 25, 2021

resolves #18459

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

@asmorkalov asmorkalov added the pr: needs test New functionality requires minimal tests set label Feb 25, 2021
@amirtu amirtu changed the title wip: get and set cameras on stitcher get and set cameras on stitcher Mar 1, 2021
return OK;
}

Stitcher::Status Stitcher::setTransform(InputArrayOfArrays images, const std::vector<detail::CameraParams> &cameras) {
Copy link
Copy Markdown
Member Author

@amirtu amirtu Mar 1, 2021

Choose a reason for hiding this comment

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

Probably the following code is excessive, as the same result could be achieved by reusing an initialized (through estimateTransform) stitcher's composePanorama with updated images (i.e. different from those passed to estimateTransform). In other words, it would be sufficient to provide only a setter to the homographies (cameras array).

@asmorkalov asmorkalov removed the pr: needs test New functionality requires minimal tests set label Mar 2, 2021
Comment on lines +7 to +10
namespace opencv_test { namespace {

TEST(Stitching_Stitcher_setTransform, issue_18459)
{
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Need to remove indentation from namespaces

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Done

*/
CV_WRAP Status estimateTransform(InputArrayOfArrays images, InputArrayOfArrays masks = noArray());

/** @overload */
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overloads should go after the main function.

http://pullrequest.opencv.org/buildbot/export/pr/19619/docs/d2/d8d/classcv_1_1Stitcher.html#a1bbb3bb8cc7763a0177a05b21c97f794

It differs from the above function only in what argument(s) it accepts.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Done.

@asmorkalov asmorkalov force-pushed the OCV-221_get_and_set_cameras_on_stitcher branch from 5cfe446 to 68c3a75 Compare March 9, 2021 15:08
@asmorkalov asmorkalov requested a review from alalek March 9, 2021 15:10
@alalek alalek merged commit 04d907f into opencv:master Mar 9, 2021
@alalek alalek mentioned this pull request Apr 9, 2021
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
…as_on_stitcher

* Get and set cameras for sticher.

* Code review fixes.

Co-authored-by: amir.tulegenov <amir.tulegenov@xperience.ai>
Co-authored-by: Alexander Smorkalov <alexander.smorkalov@xperience.ai>
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.

Feature Request: get and set cameras_ on stitcher

3 participants