VT_Example_for_moving_ROI.png

This example describes how to utilize the sequencer to move the ROI to predefined positions over the full frame to capture important detail of the moving object. Each step of the sequencer is triggered through an external signal. This encapsulates the configuration in one place so you only transfer and handle the data required to perform your image analysis tasks at hand.

If you want to know more detail about what to do with a sequencer please refer to the application notes below where the concepts and features are described in much more detail.

The figure shows the resulting images of the described sequence. The vial is virtually cut out within the camera by moving the ROI over the imaged field.

    // STOP ACQUISITION AND LOAD DEFAULT PARAMETERS
pDevice->GetRemoteNode("AcquisitionStop")->Execute();
pDevice->GetRemoteNode("UserSetSelector")->SetString("Default");
pDevice->GetRemoteNode("UserSetLoad")->Execute();

// CONFIGURING GPIO “Line0” AS THE TRIGGER INPUT
pDevice->GetRemoteNode("TriggerMode")->SetString("On");
pDevice->GetRemoteNode("TriggerSource")->SetString("Line0");
pDevice->GetRemoteNode("TriggerActivation")->SetString("RisingEdge");
pDevice->GetRemoteNode("TriggerDelay")->SetDouble(0.0);
pDevice->GetRemoteNode("LineSelector")->SetString("Line0");
pDevice->GetRemoteNode("LineInverter")->SetBool(false);
pDevice->GetRemoteNode("LineDebouncerHighTimeAbs")->SetDouble(1.0);
pDevice->GetRemoteNode("LineDebouncerLowTimeAbs")->SetDouble(1.0);

// SWITCH TO SEQUENCER CONFIG MODE
pDevice->GetRemoteNode("SequencerConfigurationMode")->SetString("On");

// SET 0 (FIRST STEP OF THE SEQUENCE)
pDevice->GetRemoteNode("SequencerSetSelector")->SetInt(0);
pDevice->GetRemoteNode("SequencerSetLoad")->Execute();

pDevice->GetRemoteNode("TriggerMode")->SetString("On");

// ROI AT TOP LEFT (VGA)
pDevice->GetRemoteNode("OffsetX")->SetInt(0);
pDevice->GetRemoteNode("OffsetY")->SetInt(0);
pDevice->GetRemoteNode("Width")->SetInt(320);
pDevice->GetRemoteNode("Height")->SetInt(240);
pDevice->GetRemoteNode("OffsetX")->SetInt(0);
pDevice->GetRemoteNode("OffsetY")->SetInt(0);

pDevice->GetRemoteNode("SequencerPathSelector")->SetInt(0);
pDevice->GetRemoteNode("SequencerTriggerSource")->SetString("ExposureActive");
pDevice->GetRemoteNode("SequencerTriggerActivation")->SetString("RisingEdge");
pDevice->GetRemoteNode("SequencerSetNext")->SetInt(1);
pDevice->GetRemoteNode("SequencerSetSave")->Execute();

// SET 1 (SECOND STEP OF THE SEQUENCE)
pDevice->GetRemoteNode("SequencerSetSelector")->SetInt(1);
pDevice->GetRemoteNode("SequencerSetLoad")->Execute();

pDevice->GetRemoteNode("TriggerMode")->SetString("On");

// ROI AT CENTER (VGA)
pDevice->GetRemoteNode("OffsetX")->SetInt(0);
pDevice->GetRemoteNode("OffsetY")->SetInt(0);
pDevice->GetRemoteNode("Width")->SetInt(320);
pDevice->GetRemoteNode("Height")->SetInt(240);
pDevice->GetRemoteNode("OffsetX")->SetInt(160);
pDevice->GetRemoteNode("OffsetY")->SetInt(120);

pDevice->GetRemoteNode("SequencerPathSelector")->SetInt(0);
pDevice->GetRemoteNode("SequencerTriggerSource")->SetString("ExposureActive");
pDevice->GetRemoteNode("SequencerTriggerActivation")->SetString("RisingEdge");
pDevice->GetRemoteNode("SequencerSetNext")->SetInt(2);
pDevice->GetRemoteNode("SequencerSetSave")->Execute();

// SET 2 (THIRD STEP OF THE SEQUENCE)
pDevice->GetRemoteNode("SequencerSetSelector")->SetInt(2);
pDevice->GetRemoteNode("SequencerSetLoad")->Execute();

pDevice->GetRemoteNode("TriggerMode")->SetString("On");

// ROI AT BOTTOM RIGHT (VGA)
pDevice->GetRemoteNode("OffsetX")->SetInt(0);
pDevice->GetRemoteNode("OffsetY")->SetInt(0);
pDevice->GetRemoteNode("Width")->SetInt(320);
pDevice->GetRemoteNode("Height")->SetInt(240);
pDevice->GetRemoteNode("OffsetX")->SetInt(320);
pDevice->GetRemoteNode("OffsetY")->SetInt(240);

pDevice->GetRemoteNode("SequencerPathSelector")->SetInt(0);
pDevice->GetRemoteNode("SequencerTriggerSource")->SetString("ExposureActive");
pDevice->GetRemoteNode("SequencerTriggerActivation")->SetString("RisingEdge");
pDevice->GetRemoteNode("SequencerSetNext")->SetInt(0);

pDevice->GetRemoteNode("SequencerSetSave")->Execute();

pDevice->GetRemoteNode("SequencerSetStart")->SetInt(0);

// SEQUENCER CONFIG END
pDevice->GetRemoteNode("SequencerConfigurationMode")->SetString("Off");


// START CAMERA SEQUENCER
pDevice->GetRemoteNode("SequencerMode")->SetString("On");
pDataStream->StartAcquisitionContinuous();
pDevice->GetRemoteNode("AcquisitionStart")->Execute();

// WAIT FOR TRIGGERS TO CAPTURE IMAGES WITH CHANGING ROI’S

// STOP CAMERA SEQUENCER
pDevice->GetRemoteNode("AcquisitionStop")->Execute();
pDataStream->StopAcquisition();
pDevice->GetRemoteNode("SequencerMode")->SetString("Off"); 
  
    // STOP ACQUISITION AND LOAD DEFAULT PARAMETERS
mDevice.RemoteNodeList["AcquisitionStop"].Execute();
mDevice.RemoteNodeList["UserSetSelector"].Value = "Default";
mDevice.RemoteNodeList["UserSetLoad"].Execute();

// CONFIGURING GPIO “Line0” AS THE TRIGGER INPUT
mDevice.RemoteNodeList["TriggerMode"].Value = "On";
mDevice.RemoteNodeList["TriggerSource"].Value = "Line0";
mDevice.RemoteNodeList["TriggerActivation"].Value = "RisingEdge";
mDevice.RemoteNodeList["TriggerDelay"].Value = (double)0.0;
mDevice.RemoteNodeList["LineSelector"].Value = "Line0";
mDevice.RemoteNodeList["LineInverter"].Value = false;
mDevice.RemoteNodeList["LineDebouncerHighTimeAbs"].Value = (double)1.0;
mDevice.RemoteNodeList["LineDebouncerLowTimeAbs"].Value = (double)1.0;

// SWITCH TO SEQUENCER CONFIG MODE
mDevice.RemoteNodeList["SequencerConfigurationMode"].Value = "On";

// SET 0 (FIRST STEP OF THE SEQUENCE)
mDevice.RemoteNodeList["SequencerSetSelector"].Value = (long)0;
mDevice.RemoteNodeList["SequencerSetLoad"].Execute();

mDevice.RemoteNodeList["TriggerMode"].Value = "On";

// ROI AT TOP LEFT (VGA)
mDevice.RemoteNodeList["OffsetX"].Value = (long)0;
mDevice.RemoteNodeList["OffsetY"].Value = (long)0;
mDevice.RemoteNodeList["Width"].Value = (long)320;
mDevice.RemoteNodeList["Height"].Value = (long)240;
mDevice.RemoteNodeList["OffsetX"].Value = (long)0;
mDevice.RemoteNodeList["OffsetY"].Value = (long)0;

mDevice.RemoteNodeList["SequencerPathSelector"].Value = (long)0;
mDevice.RemoteNodeList["SequencerTriggerSource"].Value = "ExposureActive";
mDevice.RemoteNodeList["SequencerTriggerActivation"].Value = "RisingEdge";
mDevice.RemoteNodeList["SequencerSetNext"].Value = (long)1;
mDevice.RemoteNodeList["SequencerSetSave"].Execute();

// SET 1 (SECOND STEP OF THE SEQUENCE)
mDevice.RemoteNodeList["SequencerSetSelector"].Value = (long)1;
mDevice.RemoteNodeList["SequencerSetLoad"].Execute();

mDevice.RemoteNodeList["TriggerMode"].Value = "On";

// ROI AT CENTER (VGA)
mDevice.RemoteNodeList["OffsetX"].Value = (long)0;
mDevice.RemoteNodeList["OffsetY"].Value = (long)0;
mDevice.RemoteNodeList["Width"].Value = (long)320;
mDevice.RemoteNodeList["Height"].Value = (long)240;
mDevice.RemoteNodeList["OffsetX"].Value = (long)160;
mDevice.RemoteNodeList["OffsetY"].Value = (long)120;

mDevice.RemoteNodeList["SequencerPathSelector"].Value = (long)0;
mDevice.RemoteNodeList["SequencerTriggerSource"].Value = "ExposureActive";
mDevice.RemoteNodeList["SequencerTriggerActivation"].Value = "RisingEdge";
mDevice.RemoteNodeList["SequencerSetNext"].Value = (long)2;
mDevice.RemoteNodeList["SequencerSetSave"].Execute();

// SET 2 (THIRD STEP OF THE SEQUENCE)
mDevice.RemoteNodeList["SequencerSetSelector"].Value = (long)2;
mDevice.RemoteNodeList["SequencerSetLoad"].Execute();

mDevice.RemoteNodeList["TriggerMode"].Value = "On";

// ROI AT BOTTOM RIGHT (VGA)
mDevice.RemoteNodeList["OffsetX"].Value = (long)0;
mDevice.RemoteNodeList["OffsetY"].Value = (long)0;
mDevice.RemoteNodeList["Width"].Value = (long)320;
mDevice.RemoteNodeList["Height"].Value = (long)240;
mDevice.RemoteNodeList["OffsetX"].Value = (long)320;
mDevice.RemoteNodeList["OffsetY"].Value = (long)240;

mDevice.RemoteNodeList["SequencerPathSelector"].Value = (long)0;
mDevice.RemoteNodeList["SequencerTriggerSource"].Value = "ExposureActive";
mDevice.RemoteNodeList["SequencerTriggerActivation"].Value = "RisingEdge";
mDevice.RemoteNodeList["SequencerSetNext"].Value = (long)0;

mDevice.RemoteNodeList["SequencerSetSave"].Execute();

mDevice.RemoteNodeList["SequencerSetStart"].Value = (long)0;

// SEQUENCER CONFIG END
mDevice.RemoteNodeList["SequencerConfigurationMode"].Value = "Off";


// START CAMERA SEQUENCER
mDevice.RemoteNodeList["SequencerMode"].Value = "On";
mDataStream.StartAcquisition();
mDevice.RemoteNodeList["AcquisitionStart"].Execute();

// WAIT FOR TRIGGERS TO CAPTURE IMAGES WITH CHANGING ROI’S

// STOP CAMERA SEQUENCER
mDevice.RemoteNodeList["AcquisitionStop"].Execute();
mDataStream.StopAcquisition();
mDevice.RemoteNodeList["SequencerMode"].Value = "Off"; 
  

Downloads

Software examples

Hasta la cima