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

Is it possible to use perspective camera? #89

Open
imokya opened this issue Jul 17, 2019 · 5 comments
Open

Is it possible to use perspective camera? #89

imokya opened this issue Jul 17, 2019 · 5 comments

Comments

@imokya
Copy link

imokya commented Jul 17, 2019

currenty the library dosen't work with different size video source. Given a portait video source(height>width), the 3D object gets stretched. When I switch to perspective camera, the stretching issue gone, but the 3D object dosen't perfectly attatch to the marker. Is it possible to use perspective camera in the first place and aslo attatch to the marker correctly ?

@martinloretzzz
Copy link
Contributor

What aspecto ratio do you use for the Perspective camera?
Try to use 4/3 or 3/4 as the aspecto for the Camera
[If the Source Stream isn't 4/3[or 3/4], maybe you should crop it to 4/3]

@imokya
Copy link
Author

imokya commented Jul 18, 2019

hi @0b01001101
thanks for the reply.
cause I can only access the camera frame data(fixed size raw bufferarray), there is no way I can crop the display. or Maybe create another canvas to draw and crop, but it can be resource consuming. Why the library only works in ratio 4/3? It is possible to make it work with other aspect ratios?

@imokya
Copy link
Author

imokya commented Jul 18, 2019

test perspective camera with 3/4 aspect ratio, 3D model dosen't attach correctly, while 4/3 ratio is fine
demo 4/3 https://www.xingway.com/ar2/basic2.html
demo 3/4 https://www.xingway.com/ar2/basic.html

@imokya
Copy link
Author

imokya commented Jul 19, 2019

is it an issue ralated to camera parameters file?

@martinloretzzz
Copy link
Contributor

I think in the that file the aspecto is set to 4/3 so jsartoolkit expects that aspecto ratio

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

2 participants