Image acquisition package: Difference between revisions

Jump to navigation Jump to search
m
Remove redundant Category:Packages.
m (remove whitespaces)
m (Remove redundant Category:Packages.)
 
(8 intermediate revisions by 3 users not shown)
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]]
'''image-acquisition will not work on Windows as far as there is not port of v4l2 (standing for ''Video for Linux 2'')'''


== Example session ==
== Example session ==
Line 67: 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 85: Line 74:
  octave:> set(obj, "VideoResolution")
  octave:> set(obj, "VideoResolution")
  ans =
  ans =
 
     640    480
     640    480
     160    120
     160    120
Line 119: Line 108:
  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 147: Line 136:
  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 153: Line 142:
  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 187: Line 176:
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. The logfile libv4l2_debug.log is overwritten between open/close so you have to rename it if you run different scripts.


Consider running the included tests:
Consider running the included tests:
Line 195: Line 184:
  octave> test @videoinput/set
  octave> test @videoinput/set
  octave> test @videoinput/getsnapshot
  octave> test @videoinput/getsnapshot
Run the compliance check (perhaps also with -s)
v4l2-compliance -d /dev/video0


== Build source from mercurial repository ==
== Build source from mercurial repository ==
Line 200: Line 193:
'''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 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.
Get the source and build it yourself. The build dependencies for Debian GNU/Linux jessie 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/src/ && ./bootstrap
  $ cd octave-image-acquisition/
  $ cd ../..
  $ make install
$ tar czf image-acquisition.tar.gz octave-image-acquisition
octave:>> pkg install -verbose image-acquisition.tar.gz


== make check ==
== make check ==
Line 214: Line 205:
  $ 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 222: Line 213:
  @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.
[[Category:Octave Forge]]

Navigation menu