PDA

View Full Version : Help me with the external trigger



Abel Dueñas
June 25, 2011, 20:59:52
Hi, my name is Abel Dueñas
I have a camera (DFK 31BF03.H.) and I'm using Matlab 2010 and TISimaq (camera adapter). I want to use the external trigger to then process the captured image. My problem is I can´t see the image before the trigger only after. What I seek is to see the image to decide if I should take the picture. Can you send a example of the code to make it?

I am trying with this code, but I only can see the object that I want to shoot after push my external trigger. I wanna see the preview:

clear all
close all
clc

closepreview
imaqreset %reset imaq
imaqhwinfo %check available adapters
vid = videoinput('tisimaq', 1); %set the first available camera to use tisimaq adapter
src = getselectedsource(vid);
set(src, 'Trigger', 'Enable') %directly manipulate src_obj to enable trigger
set(src, 'TriggerPolarity', 'High') %Set polarity for the rising edge.
src.Saturation=255;
src.Hue=180;
vid.ReturnedColorspace = 'rgb';

preview(vid)


Best Regard,
Abel Dueñas


PD: Sorry for my english, Mi natural language is spanish

Stefan Geissler
June 27, 2011, 13:02:25
Hello Abel,

it is obvious, that you can not see an image before you trigger the camera. The camera provides an image only on a trigger pulse.

What you may want is the camera running free and snap am image from the live stream. Therefore, you may not need a trigger.

Abel Dueñas
June 27, 2011, 15:10:29
Hi Steffan
Do you know how I can do this? Maybe with GPIO?. My camera is DFK 31BF03.H. Do you have any manual of TISIMAQ video adapter? I saw the video adapter and I noticed that has GPIOIN and GPIOOut

Best Regards.
Abel Dueñas

Stefan Geissler
June 28, 2011, 10:12:06
Well, this is Matlab stuff to show the live video and snap a frame from it. The TIS IMAQ plugin is for the standard Matlab interface, which can be used by you. You may ask the Matlab support too, since I have no Matlab experiences.