5
$\begingroup$

Guys!

I need capture video from certain webcam which isn't $DefaultImagingDevice. As I know there is one legal way: ImageCapture["Device"->$ImagingDevices[[x]]] where x is number of needed device. However ImageCapture doesn't allow to make a grid on the image like this:

grid = Graphics[{Gray,
    Table[Line[{{(i - 1)*16, 0}, {(i - 1)*16, 240}}], {i, 1, 21}],
    Table[Line[{{0, (i - 1)*16}, {320, (i - 1)*16}}], {i, 1, 16}]
    }];

Dynamic[Show[
  CurrentImage[],
  grid,
  ImageSize -> 800]]

http://s18.postimg.org/hek0gtp2h/Camera_small.jpg

May be somebody knows how to apply CurrentImage for certain non-default imaging device? Or how to take just image without any interface elements using ImageCapture?

$\endgroup$
  • $\begingroup$ Perhaps something in here may help ?ImageAcquisition'CaptureDump'* $\endgroup$ – Dr. belisarius Apr 9 '14 at 15:07
  • $\begingroup$ Could you extend your proposition please? What is ?ImageAcquisition'CaptureDump'* ???? $\endgroup$ – Rom38 Apr 9 '14 at 15:28
  • $\begingroup$ Evaluate this in your front end Information["ImageAcquisitionCaptureDump*"] $\endgroup$ – Dr. belisarius Apr 9 '14 at 15:31
  • $\begingroup$ Where I can find more info about this ImageAqcquisition? $\endgroup$ – Rom38 Apr 9 '14 at 15:35
  • 1
    $\begingroup$ Does Block[{$DefaultImagingDevice = $ImagingDevices[[x]]]}, code here] work? Sorry, got no imaging devices to test with. $\endgroup$ – Simon Woods Apr 9 '14 at 15:57
7
$\begingroup$

So basically ImageCapture[] is the hub where you set things which CurrentImage[] adoptes. Run ImageCapture[] and in-interface select the device - it is easier:

enter image description here

Then run your code with CurrentImage[] - it will now pick up the external camera.

enter image description here

Droste video-feedback effect you see in the images proves I'm not using my laptop camera in all this ;-) - not that we need any proof - just an excuse to mention Douglas Hofstadter. Let me know if you get the joke.

$\endgroup$
  • $\begingroup$ That would have worth a GIF ;o) $\endgroup$ – Öskå Apr 9 '14 at 17:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.