219
edits
(created page) |
No edit summary |
||
Line 4: | Line 4: | ||
== Example session == | == Example session == | ||
Lines starting with $ are commands executed on the octave prompt. | |||
Let's load the package and list available hardware | |||
<code> | |||
$ pkg load image-acquisition | |||
$ imaqhwinfo | |||
ans = | |||
scalar structure containing the fields: | |||
driver = uvcvideo | |||
card = UVC Camera (046d:0825) | |||
bus_info = usb-0000:00:16.2-2 | |||
version = 3.2.51 | |||
capabilities = 83886081 | |||
device = /dev/video0 | |||
</code> | |||
$ | |||
$ obj = videoinput("v4l2", "/dev/video0") | |||
obj = videoinput for v4l2 | |||
device = /dev/video0 | |||
driver = uvcvideo | |||
card = UVC Camera (046d:0825) | |||
VideoInput = 0 | |||
VideoResolution = 320 x 240 px | |||
VideoFrameInterval = 1/30 s (30.0 fps) | |||
$ get(obj) | |||
ans = | |||
{ | |||
[1,1] = SelectedSourceName | |||
[2,1] = DeviceCapabilities | |||
[3,1] = VideoInput | |||
[4,1] = VideoResolution | |||
[5,1] = VideoFrameInterval | |||
[6,1] = VideoFormat | |||
[7,1] = brightness | |||
[8,1] = contrast | |||
[9,1] = saturation | |||
[10,1] = white_balance_temperature_auto | |||
[11,1] = gain | |||
[12,1] = power_line_frequency | |||
[13,1] = white_balance_temperature | |||
[14,1] = sharpness | |||
[15,1] = backlight_compensation | |||
[16,1] = exposure_auto | |||
[17,1] = exposure_absolute | |||
[18,1] = exposure_auto_priority | |||
} | |||
$ | |||
$ get(obj, "DeviceCapabilities") | |||
ans = | |||
scalar structure containing the fields: | |||
driver = uvcvideo | |||
card = UVC Camera (046d:0825) | |||
bus_info = usb-0000:00:16.2-2 | |||
version = 3.2.51 | |||
capabilities = 83886081 | |||
$ | |||
$ set(obj, "VideoResolution") | |||
ans = | |||
640 480 | |||
160 120 | |||
176 144 | |||
320 176 | |||
320 240 | |||
352 288 | |||
432 240 | |||
544 288 | |||
640 360 | |||
752 416 | |||
800 448 | |||
800 600 | |||
864 480 | |||
960 544 | |||
960 720 | |||
1024 576 | |||
1184 656 | |||
1280 720 | |||
1280 960 | |||
$ set(obj, "VideoResolution", [320 240]) | |||
$ | |||
$ get(obj, "brightness") | |||
ans = 100 | |||
$ set(obj, "brightness") | |||
ans = | |||
scalar structure containing the fields: | |||
min = 0 | |||
max = 255 | |||
step = 1 | |||
default = 128 | |||
$ set(obj, "brightness", 100) | |||
$ | |||
$ preview(obj) | |||
== Using v4l2loopback for tests == | == Using v4l2loopback for tests == |
edits