Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video Size problem #19

Open
TheMasterRoot opened this issue Jan 7, 2019 · 6 comments
Open

Video Size problem #19

TheMasterRoot opened this issue Jan 7, 2019 · 6 comments

Comments

@TheMasterRoot
Copy link

TheMasterRoot commented Jan 7, 2019

Hello i was trying to chance the video size to:

cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1280)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 720)

but when i did that the script crashes and when it works all boxes ate distorted.
How can i fix it ?

@TheMasterRoot TheMasterRoot changed the title Multiple Face whit Tracking Video Size problem Jan 9, 2019
@TheMasterRoot
Copy link
Author

TheMasterRoot commented Jan 9, 2019

look the error:

root@jasar-VirtualBox:/home/jasar/head-pose-estimation# ./video_test_shape.py

Traceback (most recent call last):
    File "./video_test_shape.py", line 162, in <module>
        main()
    File "./video_test_shape.py", line 121, in main
        cv2.line(frame, reprojectdst[start], reprojectdst[end], (0, 255, 0))

OverflowError: signed integer is greater than maximum

@naftalibeder
Copy link

You can just wrap the cv2.line() call in a try block.

@TheMasterRoot
Copy link
Author

You can just wrap the cv2.line() call in a try block.

it worked, thank you.
but now i have another problem. the cube around the face still distorted.

@JasarOrion
Copy link

this is the distorted box

https://imgur.com/a/7TkQZBW

@naftalibeder
Copy link

naftalibeder commented Jan 9, 2019

You’ll need to calibrate the camera (see cv2.calibrateCamera()).

@TheMasterRoot
Copy link
Author

You’ll need to calibrate the camera (see cv2.calibrateCamera()).

i dont know how to use opencv calibrate code. could you help me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants