Skip to content

Add python version of panorama_stitching_rotating_camera and perspect…#16366

Merged
alalek merged 10 commits intoopencv:3.4from
themechanicalcoder:features2D-tutorial-python
Feb 1, 2020
Merged

Add python version of panorama_stitching_rotating_camera and perspect…#16366
alalek merged 10 commits intoopencv:3.4from
themechanicalcoder:features2D-tutorial-python

Conversation

@themechanicalcoder
Copy link
Copy Markdown
Contributor

@themechanicalcoder themechanicalcoder commented Jan 16, 2020

This pull request adds python version of panorama_stitching_rotating_camera and perspective_correction

`force_builders_only=Docs`

@dkurt
Copy link
Copy Markdown
Member

dkurt commented Jan 17, 2020

@themechanicalcoder, can you add corresponding snippets to the tutorial https://docs.opencv.org/master/d9/dab/tutorial_homography.html?

@themechanicalcoder
Copy link
Copy Markdown
Contributor Author

themechanicalcoder commented Jan 18, 2020

@dkurt when I am making changes to this branch only doc builds are being carried out due to which the PR does not show green tick how to enable builds for all the platforms?

@alalek
Copy link
Copy Markdown
Member

alalek commented Jan 23, 2020

how to enable builds for all the platforms

PR is on WIP stage with frequent updates, so there is reason to run large validation cycle.
'Docs' builder is enough for now (for review).
All builds will be triggered after the review and before the merge.

Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

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

Thank you for contribution!

c1Mo = np.array([[0.9659258723258972, 0.2588190734386444, 0.0, 1.5529145002365112],
[ 0.08852133899927139, -0.3303661346435547, -0.9396926164627075, -0.10281121730804443],
[-0.24321036040782928, 0.9076734185218811, -0.342020183801651, 6.130080699920654],
[0, 0, 0, 1]],dtype=np.float64)
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.

Please fix indentation here too.

@@ -0,0 +1,66 @@
import cv2 as cv
import numpy as np
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.

numpy should go first (as dependency of opencv - we have reports about that):

Use this header:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Python 2/3 compatibility
from __future__ import print_function

import numpy as np
import cv2 as cv

@end_toggle

@add_toggle_python
@snippet samples/python/tutorial_code/features2D/Homography/perspective_correction.py warp-chessboard
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.

avoid unnecessary double space after @snippet.

Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution!

Demo page is here.

@alalek alalek merged commit 126b0d8 into opencv:3.4 Feb 1, 2020
@alalek alalek mentioned this pull request Feb 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants