Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

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

1 Answer 1

up vote 6 down vote accepted

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.

share|improve this answer
    
That would have worth a GIF ;o) –  Öskå Apr 9 at 17:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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