Skip to content

Add python version of panorama_stitching_rotating_camera and perspect… - #16366

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

alalek merged 10 commits into
opencv:3.4from
themechanicalcoder:features2D-tutorial-python

Conversation

@themechanicalcoder

@themechanicalcoder themechanicalcoder commented Jan 16, 2020 •

Copy link
Copy Markdown
Contributor

This pull request adds python version of panorama_stitching_rotating_camera and perspective_correction

`force_builders_only=Docs`

@dkurt

dkurt commented Jan 17, 2020

Copy link
Copy Markdown
Member

@themechanicalcoder

themechanicalcoder commented Jan 18, 2020 •

Copy link
Copy Markdown
Contributor Author

@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

alalek commented Jan 23, 2020

Copy link
Copy Markdown
Member

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.

@alalek alalek left a comment

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.

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.

@alalek alalek left a comment

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.

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
SavyaSanchi-Sharma pushed a commit to SavyaSanchi-Sharma/opencv that referenced this pull request Jul 30, 2026
…torial-python

* Add python version of panorama_stitching_rotating_camera and perspective_correction

* Updated code

* added in the docs

* added python code in the docs

* docs change

* Add java tutorial as well

* Add toggle in documentation

* Added the link for Java code

* format code

* Refactored code
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