With similar method, a body photograph taken from the front profile can be made to appear in perspective. Kendi dilimle: ilham verdiğin için teşekkürler😊.
Very impressive. Sir could you please make a video to show us a way to quantify the rotation of images, one is reference and the other one is deformed. Thank you in advance.
Awesome tutorial like the others!!!!! If I may add an info, in my case my opencv had a version problem, and I downgraded to an older version and it worked fine
Thank you for sharing the code. and how to find the object`s center point and the farthest distance from the center point ,for example ,the center of the egg and the top section can you make video
Hi, I'm watching your videos and I have to measure the size of a foot on a sheet. I am following your tutorial on this subject, but in it all I can do is calculate if the object above is a square. Need to help me or indicate where to edit the code? Thanks in advance.
today, in february 1st, 2023, I ran into some errors... np.float32 seems to be deprecated... cv2.circle only accepts integers for the center parameter... but cv2.getPerspectiveTransform requires float32...... so I created the pts1 and pts2 matrices with np.array([coordinates], dtype=np.float32), and parsed to int inside np.circle call
Hello, I am getting this error: Traceback (most recent call last): File "C:/Users/DOS/PycharmProjects/pythonProject/WarpPerspective.py", line 11, in cv2.circle(img, (pts1[x][0], pts1[x][1]), 5, (255, 0, 0), cv2.FILLED) cv2.error: OpenCV(4.6.0) :-1: error: (-5:Bad argument) in function 'circle' > Overload resolution failed: > - Can't parse 'center'. Sequence item with index 0 has a wrong type > - Can't parse 'center'. Sequence item with index 0 has a wrong type
I really like watching videos on your channel😊. The discussion is easy to understand and the video is interesting, I learned a lot . Thank you and good luck for u..
Traceback (most recent call last): File "C:\Users\sklad\PycharmProjects\OpenCV\warpPrespective.py", line 9, in cv2.circle(img,(pts1[0][0],pts1[0][1]),5,(0,0,255),cv2.FILLED) cv2.error: OpenCV(4.5.5) :-1: error: (-5:Bad argument) in function 'circle' > Overload resolution failed: > - Can't parse 'center'. Sequence item with index 0 has a wrong type > - Can't parse 'center'. Sequence item with index 0 has a wrong type WHAT I MUST DO FOR THE RUN? PLEAS HELP MEE
DeprecationWarning: an integer is required (got type numpy.float32). Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python. cv2.circle(resized,(pts1[0][0],pts1[0][1]),5,(0,0,255),cv2.FILLED) = this error is coming please tell how can i solve it
This was not a basic course. He moves so quickly that the only way to catch up was to paste from github. Also, the cards.jpg was NOT in the github or even in his course from his actual website. All of this should be part of his github if one is to follow along. Please consider this for the future
With similar method, a body photograph taken from the front profile can be made to appear in perspective.
Kendi dilimle: ilham verdiğin için teşekkürler😊.
Very impressive. Sir could you please make a video to show us a way to quantify the rotation of images, one is reference and the other one is deformed. Thank you in advance.
Recording this video @12 44 AM in the morning . Dedication level ultra pro max.
Awesome tutorial like the others!!!!! If I may add an info, in my case my opencv had a version problem, and I downgraded to an older version and it worked fine
Hierdie is die beste video ooit
really useful~~
Thank you for sharing the code. and how to find the object`s center point and the farthest distance from the center point ,for example ,the center of the egg and the top section can you make video
This stuff is great Murtaza. Is there a good book on opnecv
thanks for the great video. It is very helpful.
On line 9 , it should be (0,height) not the (height,0), appreciate if you could include Image with Projects. Nice Concept and Thanks for your efforts
Very very thanks my friend. I lost a lot of time didnt see this :D
It does not take float32 points
And if we change it to np.array , then matrix element (getperspectivetransform)is not formed
int will be okay
excellent video! thank you!
one of the best tutorial thanks
Hi, I'm watching your videos and I have to measure the size of a foot on a sheet. I am following your tutorial on this subject, but in it all I can do is calculate if the object above is a square. Need to help me or indicate where to edit the code? Thanks in advance.
Can you make a video how to allign multiple images taken at a burst and then use the aligned image to increase resolution
today, in february 1st, 2023, I ran into some errors... np.float32 seems to be deprecated... cv2.circle only accepts integers for the center parameter... but cv2.getPerspectiveTransform requires float32...... so I created the pts1 and pts2 matrices with np.array([coordinates], dtype=np.float32), and parsed to int inside np.circle call
tks you
If line no 9 in not working try using np.int16 instead of np.float32...so simple remove np.float32 it will work
Thanks. It worked.
And what about matrix? When i do that my matrixe doesnt work..error like 4 in function ‘cv::getPerspectiveFransform’
why we did this?
Hello, I am getting this error: Traceback (most recent call last):
File "C:/Users/DOS/PycharmProjects/pythonProject/WarpPerspective.py", line 11, in
cv2.circle(img, (pts1[x][0], pts1[x][1]), 5, (255, 0, 0), cv2.FILLED)
cv2.error: OpenCV(4.6.0) :-1: error: (-5:Bad argument) in function 'circle'
> Overload resolution failed:
> - Can't parse 'center'. Sequence item with index 0 has a wrong type
> - Can't parse 'center'. Sequence item with index 0 has a wrong type
Can you make video to calculating the Coordinates that Hard Code the points so instead of Hard Code how we can find Coordinates.
Thanks in Advance.
This automated technique was used in this project : ua-cam.com/video/Il5G57up_yM/v-deo.html . Yes i have plan to share that tutorial .
Sir please is it possible to do the same thing using the webcam instead???
do you know any resources/videos that code this by scratch? I am trying to implement this on my own and I don't know where to start
I really like watching videos on your channel😊. The discussion is easy to understand and the video is interesting, I learned a lot . Thank you and good luck for u..
The error:
Incorrect: pts2 = np.float32([[0, 0], [width, 0], [height, 0], [width, height]])
Correct: pts2 = np.float32([[0, 0], [width, 0], [0, height], [width, height]])
The change: Swap [height, 0] to [0,height]
Traceback (most recent call last):
File "C:\Users\sklad\PycharmProjects\OpenCV\warpPrespective.py", line 9, in
cv2.circle(img,(pts1[0][0],pts1[0][1]),5,(0,0,255),cv2.FILLED)
cv2.error: OpenCV(4.5.5) :-1: error: (-5:Bad argument) in function 'circle'
> Overload resolution failed:
> - Can't parse 'center'. Sequence item with index 0 has a wrong type
> - Can't parse 'center'. Sequence item with index 0 has a wrong type
WHAT I MUST DO FOR THE RUN? PLEAS HELP MEE
try this :
```
cv2.circle(img,[int(i) for i in kernel[0]],2,(255,0,0),3)
```
or try this :
```
cv2.circle(img,[int(i) for i in [kernel[0][0],kernel[0][1]]],2,(255,0,0),3)
```
use uint instead of float32
How can we apply perspective transformation using angle?
DeprecationWarning: an integer is required (got type numpy.float32). Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
cv2.circle(resized,(pts1[0][0],pts1[0][1]),5,(0,0,255),cv2.FILLED) = this error is coming please tell how can i solve it
Cast the (x, y) coordinates of the circle to Integers.
like this : cv2.circle( image, ( int ( pts1[x][0] ) , int ( pts[x][1] ) , etc..... )
When I change the perspective of an image and then apply circle detection on it, python gives none type and a couple of more errors.Can anyone help?
how to do the vice versa ?
Warp perspective and the get perspective transform are not showing
Please can I use matplotlib to get the points for the king of spades?
yes you can
p2 = np.float32([[0,0],[0,width],[height,0],[width, height]])
Brother can explain this point plz ?
We are defining a size layout for warp image
Change the values and you will get to notice what exactly it is
This was not a basic course. He moves so quickly that the only way to catch up was to paste from github. Also, the cards.jpg was NOT in the github or even in his course from his actual website. All of this should be part of his github if one is to follow along. Please consider this for the future
how to do this for more than 10000 x,y co-ordinates
stuck on :
cv2.circle(img,(pts1[0][0],pts1[0][1]),5,(0,0,255),cv2.FILLED)
why doesnt work, doesnt compile
remove np.float and check
i used int16 instead of float32, it worked
i know its late but it may help other
change (pts1[0][0],pts1[0][1]) to (int(pts1[x][0]),int(pts1[x][1]))
@@lmlstudio2008 i just tried it out ,it worked but can you explain why it worked
Still didn't understand the pts2
Very helpful video. Thanks a lot.