Editing Image acquisition package
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 7: | Line 7: | ||
If you want to report a bug: [[Image_acquisition_package#Reporting_bugs]] | If you want to report a bug: [[Image_acquisition_package#Reporting_bugs]] | ||
== Example session == | == Example session == | ||
Line 19: | Line 17: | ||
octave:> imaqhwinfo | octave:> imaqhwinfo | ||
ans = | ans = | ||
scalar structure containing the fields: | scalar structure containing the fields: | ||
driver = uvcvideo | driver = uvcvideo | ||
card = UVC Camera (046d:0825) | card = UVC Camera (046d:0825) | ||
Line 69: | Line 69: | ||
octave:> set(obj, "VideoFormat", "RGB3"); | octave:> set(obj, "VideoFormat", "RGB3"); | ||
=== Get device capabilities === | |||
octave:> get(obj, "DeviceCapabilities") | |||
ans = | |||
scalar structure containing the fields: | |||
driver = uvcvideo | |||
card = UVC Camera (046d:0825) | |||
bus_info = usb-0000:00:12.2-4 | |||
version = 3.16.7 | |||
capabilities = 2.2314e+09 | |||
=== List available video resolutions === | === List available video resolutions === | ||
Line 74: | Line 87: | ||
octave:> set(obj, "VideoResolution") | octave:> set(obj, "VideoResolution") | ||
ans = | ans = | ||
640 480 | 640 480 | ||
160 120 | 160 120 | ||
Line 108: | Line 121: | ||
octave:> set(obj, "brightness") | octave:> set(obj, "brightness") | ||
ans = | ans = | ||
scalar structure containing the fields: | scalar structure containing the fields: | ||
min = 0 | min = 0 | ||
max = 255 | max = 255 | ||
Line 136: | Line 149: | ||
octave:> image(img) | octave:> image(img) | ||
octave:> imwrite(img, "ex1_a.png") | octave:> imwrite(img, "ex1_a.png") | ||
octave:> [img, seq, t] = getsnapshot(obj); | octave:> [img, seq, t] = getsnapshot(obj); | ||
octave:> seq | octave:> seq | ||
Line 142: | Line 155: | ||
octave:> t | octave:> t | ||
t = | t = | ||
scalar structure containing the fields: | scalar structure containing the fields: | ||
tv_sec = 10281 | tv_sec = 10281 | ||
tv_usec = 779303 | tv_usec = 779303 | ||
Line 176: | Line 189: | ||
There might be some warnings like "warning: function xyz shadows a built-in function" at start. | There might be some warnings like "warning: function xyz shadows a built-in function" at start. | ||
Exit octave and add libv4l2_debug.log to your bug report | Exit octave and add libv4l2_debug.log to your bug report | ||
Consider running the included tests: | Consider running the included tests: | ||
Line 184: | Line 197: | ||
octave> test @videoinput/set | octave> test @videoinput/set | ||
octave> test @videoinput/getsnapshot | octave> test @videoinput/getsnapshot | ||
== Build source from mercurial repository == | == Build source from mercurial repository == | ||
Line 193: | Line 202: | ||
'''Warning: You really should use the <pkg install -forge> method described above if you are not sure what you are doing here.''' | '''Warning: You really should use the <pkg install -forge> method described above if you are not sure what you are doing here.''' | ||
Get the source and build it yourself. The build dependencies for Debian GNU/Linux | Get the source here [http://sourceforge.net/p/octave/image-acquisition/ci/default/tree/] and build it yourself. The build dependencies for Debian GNU/Linux wheezy are '''libv4l-dev''' and '''libfltk1.3-dev''' or '''libfltk1.1-dev'''. You also need the GNU autotools to generate the configure script. | ||
$ hg clone http://hg.code.sf.net/p/octave/image-acquisition octave-image-acquisition | $ hg clone http://hg.code.sf.net/p/octave/image-acquisition octave-image-acquisition | ||
$ cd octave-image-acquisition/ | $ cd octave-image-acquisition/src/ && ./bootstrap | ||
$ | $ cd ../.. | ||
$ tar czf image-acquisition.tar.gz octave-image-acquisition | |||
octave:>> pkg install -verbose image-acquisition.tar.gz | |||
== make check == | == make check == | ||
Line 205: | Line 216: | ||
$ cd octave-image-acquisition/devel | $ cd octave-image-acquisition/devel | ||
$ make check | $ make check | ||
octave -q run_tests.m | octave -q run_tests.m | ||
../src/__v4l2_handler__.cc........................ PASS 3/3 | ../src/__v4l2_handler__.cc........................ PASS 3/3 | ||
Line 213: | Line 224: | ||
@videoinput/getsnapshot........................... PASS 4/4 | @videoinput/getsnapshot........................... PASS 4/4 | ||
imaqhwinfo........................................ PASS 1/1 | imaqhwinfo........................................ PASS 1/1 | ||
Summary: | Summary: | ||
PASS 20 | PASS 20 | ||
FAIL 0 | FAIL 0 | ||
If there are tests which FAIL, then please have a look at the generated fntest.log and add it to your bug report. | If there are tests which FAIL, then please have a look at the generated fntest.log and add it to your bug report. | ||