Support #379
closed
AR set webcam HD resolution
Added by Frankieo almost 13 years ago.
Updated almost 13 years ago.
Description
I would like to make use of a HD camera (1280x720 / 1920x1080 pixels) in my AR project, but only standard resolution is currently supported (I assume it is 800x600?). How to do this?
edit
With some email help I am now able to diplay 1280x720 webcam! By adding a line to the ARcapture plugIt (carcapture.pkg)
-> Added in the connectCapture function (about line 172), just before the _GETcaptureSize call):
_SETcaptureSize capstr.CAP_Device 1280 720;
problem
The program runs OK, but the 3D model gets dislocated (see added picture). I think this is because there are othe OpenSpace3D settings that are still making use of the 800x600 settings. How to solve this?
Files
You need to calibrate your camera since the picture aspect ratio change the camera projection matrix.
I made a version of the calibration tool to manage capture image size (not implemented in the original version).
however there still have a problem on camera mirror mode, I think that we should revert the X matrix in this case .. TODO
and I should manage a default 16/9 cam matrix in the code .. TODO
This is the result with the new camera_1280_720.yml file in use, it is not okay yet. And mirror mode is indeed not supported.
(I didn't try the calibration program myself yet)
You should try to generate your own YML from the calibration tool
I tried running the calibration program, but I keep getting these errors, no matter what I try:
"RMS error reported by calibrateCamera: 0.451272
Calibration succeeded. avg reprojection error = 0.45"
So I am unable to create a yml file myself.
Did I already mention that I use a Logitech C910 HD camera, which can even run with a 1920x1080 resolution?
I think your camera_1280_720.yml dow not run correctly with my camera, because it even has a better resolution as 1280x720.
(however, I would like to run the program on 1280x720, not with 1920x1080, that will run too slow)
Any news on this project? I would like to work with HD webcam input/display soon?
try this :
1 - print the pattern.pdf without the fit to page setting
2 - open a windows consol (cmd command)
3 - type "calibration.exe -w 8 -h 6 -s 0.025 -vw 1280 -vh 720 -o camera720.yml -op" without the quotes
4 - press "g" and
5 - (move the camera around the pattern like showed here : http://www.uco.es/investiga/grupos/ava/node/26
6 - when "calibrated" is shown press "esc" key
7 - the camera720.yml file is written in the current directory
8 - copy the yml file in your scol partition (my documents\Scol Voyager\Partition_LocalUsr\..)
9 - use the camera720.yml in the ARcapture plugIT
10 - disable the mirror mode in the plugIT
RMS error reported by calibrateCamera: 0.451272
Calibration succeeded. avg reprojection error = 0.45
are normal messages this is your camera projection correction / error
your YML file is written anyway
Great! It works, even with Mirror Mode on!
I used this command in cmd:
C:\opencv_calibration\calibration.exe -w 8 -h 6 -s 0.03 -vw 1280 -vh 720 -o C:\opencv_calibration\camera720.yml -op
(as you can see I had to define export location full path)
- Status changed from New to Resolved
- % Done changed from 80 to 100
Applied in changeset r4254.
Also available in: Atom
PDF