Support #379
closedAR set webcam HD resolution
100%
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
Updated by arkeon almost 13 years ago
- File calibration.rar calibration.rar added
- File camera_1280_720.yml camera_1280_720.yml added
- Assignee set to arkeon
- % Done changed from 10 to 80
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
Updated by Frankieo almost 13 years ago
- File HDweb_withYML.jpg HDweb_withYML.jpg added
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)
Updated by arkeon almost 13 years ago
You should try to generate your own YML from the calibration tool
Updated by Frankieo almost 13 years ago
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)
Updated by Frankieo almost 13 years ago
Any news on this project? I would like to work with HD webcam input/display soon?
Updated by arkeon almost 13 years ago
- File pattern.pdf pattern.pdf added
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
Updated by arkeon almost 13 years ago
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
Updated by Frankieo almost 13 years ago
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)
Updated by arkeon almost 13 years ago
- Status changed from New to Resolved
- % Done changed from 80 to 100
Applied in changeset r4254.