imrasp / LearnVI_Drone

7 stars 1 forks source link

VideoCapture image size #18

Open imrasp opened 6 years ago

imrasp commented 6 years ago

Be aware that at 1280x720 you can expect 15FPS or less this is a limitation of USB 2.0 bandwidth and not the camera itself. Since USB 3.0 webcams are new to the market you can expect to pay a premium REF : http://webcache.googleusercontent.com/search?q=cache:c6z0_izJCcAJ:www.emgu.com/forum/viewtopic.php%3Ft%3D3747+&cd=6&hl=en&ct=clnk&gl=th

imrasp commented 6 years ago

https://arstechnica.com/civis/viewtopic.php?f=6&t=978436

Huffyuv is a lossless codec by Ben Rudiak-Gould that gives around 2:1 compression for decently clean source. Although it is slow at decompression, it has very fast compression and is competitive with PICVideo MJPEG for high-quality capture. It gets significantly better compression with YUY2 or UYVY input than with RGB. This is my method of choice, but it requires a LOT of disk space if you have a noisy feed -- something like 10GB per half hour for me, at 640x480x29.97fps with CD-quality audio.

imrasp commented 6 years ago

Global shutter cam IQinVision

v4l2-ctl -d /dev/video1 --list-formats-ext

ioctl: VIDIOC_ENUM_FMT
    Index       : 0
    Type        : Video Capture
    Pixel Format: 'YUYV'
    Name        : YUYV 4:2:2
        Size: Discrete 1280x720
            Interval: Discrete 0.017s (60.000 fps)
        Size: Discrete 1280x960
            Interval: Discrete 0.019s (54.000 fps)
        Size: Discrete 640x480
            Interval: Discrete 0.019s (54.000 fps)

    Index       : 1
    Type        : Video Capture
    Pixel Format: 'GREY'
    Name        : 8-bit Greyscale
        Size: Discrete 1280x720
            Interval: Discrete 0.017s (60.000 fps)
        Size: Discrete 1280x960
            Interval: Discrete 0.019s (54.000 fps)
        Size: Discrete 640x480
            Interval: Discrete 0.019s (54.000 fps)
imrasp commented 6 years ago

mobius - ros calib result

('D = ', [-0.26195662857200297, 0.0441263311300231, 0.0015978692595019826, -0.001618442666510325, 0.0])
('K = ', [309.2038080910573, 0.0, 317.47738187192186, 0.0, 348.4980876888013, 238.2653550509399, 0.0, 0.0, 1.0])
('R = ', [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0])
('P = ', [203.9306182861328, 0.0, 318.13921615756954, 0.0, 0.0, 294.8394775390625, 239.066151332554, 0.0, 0.0, 0.0, 1.0, 0.0])
None
# oST version 5.0 parameters

[image]

width
640

height
480

[narrow_stereo]

camera matrix
309.203808 0.000000 317.477382
0.000000 348.498088 238.265355
0.000000 0.000000 1.000000

distortion
-0.261957 0.044126 0.001598 -0.001618 0.000000

rectification
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000

projection
203.930618 0.000000 318.139216 0.000000
0.000000 294.839478 239.066151 0.000000
0.000000 0.000000 1.000000 0.000000
imrasp commented 6 years ago

IQinVision camera ros calib

('D = ', [-0.3708541546088663, 0.16722282677278488, -0.0012121279795248379, 0.0006352124631734436, 0.0])
('K = ', [589.0841496480523, 0.0, 283.7350200893131, 0.0, 588.5584428987099, 255.7768915817189, 0.0, 0.0, 1.0])
('R = ', [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0])
('P = ', [518.1420288085938, 0.0, 274.9534675317591, 0.0, 0.0, 549.4267578125, 257.5508008793695, 0.0, 0.0, 0.0, 1.0, 0.0])
None
# oST version 5.0 parameters

[image]

width
640

height
480

[narrow_stereo]

camera matrix
589.084150 0.000000 283.735020
0.000000 588.558443 255.776892
0.000000 0.000000 1.000000

distortion
-0.370854 0.167223 -0.001212 0.000635 0.000000

rectification
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000

projection
518.142029 0.000000 274.953468 0.000000
0.000000 549.426758 257.550801 0.000000
0.000000 0.000000 1.000000 0.000000

('Wrote calibration data to', '/tmp/calibrationdata.tar.gz')
imrasp commented 6 years ago

gun's logitech cam - ros calib

('D = ', [-0.0063537315596489865, 0.09196839081625377, 0.001295396987758146, 0.0013147129093750876, 0.0])
('K = ', [813.6804878474821, 0.0, 331.0379749750803, 0.0, 808.9466037567273, 253.97783194048048, 0.0, 0.0, 1.0])
('R = ', [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0])
('P = ', [816.9920043945312, 0.0, 331.48460130085004, 0.0, 0.0, 812.4269409179688, 254.3105466265897, 0.0, 0.0, 0.0, 1.0, 0.0])
None
# oST version 5.0 parameters

[image]

width
640

height
480

[narrow_stereo]

camera matrix
813.680488 0.000000 331.037975
0.000000 808.946604 253.977832
0.000000 0.000000 1.000000

distortion
-0.006354 0.091968 0.001295 0.001315 0.000000

rectification
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000

projection
816.992004 0.000000 331.484601 0.000000
0.000000 812.426941 254.310547 0.000000
0.000000 0.000000 1.000000 0.000000
imrasp commented 6 years ago

roscore rosparam set cv_camera/device_id 1 rosrun cv_camera cv_camera_node

rosrun camera_calibration cameracalibrator.py --size 9x6 --square 0.023 image:=/cv_camera/imageraw camera:=/cv camera/

imrasp commented 6 years ago

mobuis - ros calibration

('D = ', [-0.2765147597541606, 0.052479268381039945, -0.0013199539860483027, 0.0004802657728054864, 0.0])
('K = ', [408.76256460526787, 0.0, 407.2447748597686, 0.0, 463.6651343352479, 252.18756274716878, 0.0, 0.0, 1.0])
('R = ', [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0])
('P = ', [269.6871337890625, 0.0, 415.58530354675895, 0.0, 0.0, 424.81304931640625, 253.95481774115615, 0.0, 0.0, 0.0, 1.0, 0.0])
None
# oST version 5.0 parameters

[image]

width
848

height
480

[narrow_stereo]

camera matrix
408.762565 0.000000 407.244775
0.000000 463.665134 252.187563
0.000000 0.000000 1.000000

distortion
-0.276515 0.052479 -0.001320 0.000480 0.000000

rectification
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000

projection
269.687134 0.000000 415.585304 0.000000
0.000000 424.813049 253.954818 0.000000
0.000000 0.000000 1.000000 0.000000

('Wrote calibration data to', '/tmp/calibrationdata.tar.gz')

2nd

('D = ', [-0.270115209535647, 0.04775925645447495, -0.0013526057156239871, -0.0015524817571016716, 0.0])
('K = ', [321.40359116573444, 0.0, 312.6202058997774, 0.0, 359.5424147556039, 250.7085802378792, 0.0, 0.0, 1.0])
('R = ', [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0])
('P = ', [211.55117797851562, 0.0, 315.4040554332423, 0.0, 0.0, 306.044677734375, 254.0685189615906, 0.0, 0.0, 0.0, 1.0, 0.0])
None
# oST version 5.0 parameters

[image]

width
640

height
480

[narrow_stereo]

camera matrix
321.403591 0.000000 312.620206
0.000000 359.542415 250.708580
0.000000 0.000000 1.000000

distortion
-0.270115 0.047759 -0.001353 -0.001552 0.000000

rectification
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000

projection
211.551178 0.000000 315.404055 0.000000
0.000000 306.044678 254.068519 0.000000
0.000000 0.000000 1.000000 0.000000

('Wrote calibration data to', '/tmp/calibrationdata.tar.gz')
imrasp commented 6 years ago
('D = ', [-0.26902156103134517, 0.047568364162286235, -0.0027215413820488896, -0.001491015127786872, 0.0])
('K = ', [329.7775161035554, 0.0, 316.77688357221393, 0.0, 370.7263015978578, 251.2873606498051, 0.0, 0.0, 1.0])
('R = ', [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0])
('P = ', [212.90399169921875, 0.0, 315.3086176447541, 0.0, 0.0, 320.19140625, 253.29800943564624, 0.0, 0.0, 0.0, 1.0, 0.0])
None
# oST version 5.0 parameters

[image]

width
640

height
480

[narrow_stereo]

camera matrix
329.777516 0.000000 316.776884
0.000000 370.726302 251.287361
0.000000 0.000000 1.000000

distortion
-0.269022 0.047568 -0.002722 -0.001491 0.000000

rectification
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000

projection
212.903992 0.000000 315.308618 0.000000
0.000000 320.191406 253.298009 0.000000
0.000000 0.000000 1.000000 0.000000
imrasp commented 6 years ago

33207238_1715499361859477_2677766999290937344_n 33397529_1715499505192796_1991845848647991296_n 33305595_1715499605192786_4266328290861514752_n 33222885_1715499688526111_2496414784061177856_n 33222898_1715499788526101_5935413592097554432_n 33232494_1715499861859427_3164010889800056832_n