Question
**In python using OpenCV, numpy and matplotlib** ***I need help with the code that transforms the image using the matrices below, not the actual answer
**In python using OpenCV, numpy and matplotlib**
***I need help with the code that transforms the image using the matrices below, not the actual answer to the question about what does each matrix do to the image***
Please Help with this question
h) Apply the following perspective transformations to image pixels (augmented vector:
[
1])
and obtain new pixel positions
[ x'
] from [
] = * [
1]
Display the resulting image.
1 = [ 2 0 0
0 1 0
0 0 1 ]
2 = [ 2 2 0
2 2 0
0 0 1]
3 = [1 0.2 0
0.2 1 0
0 0 1]
4 = [1.1 0.1 0
0.2 0.9 0
0.1 0.2 1]
Explain what does each transformation do?
*I keep getting an error using cv2.perspectiveTransform() to get the image points "cv2.error: OpenCV(4.7.0) D:\a\opencv-python\opencv-python\opencv\modules\core\src\matmul.dispatch.cpp:550: error: (-215:Assertion failed) scn + 1 == m.cols in function 'cv::perspectiveTransform'
How do I properly get pixel positions from an image that I chose and transform the pixel positions into new pixel positions using the matrices shown?
I am new to python and openCV so any help is greatly appreciated!!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started