The SmartFrameRecall program is more complex than most of the examples discussed in this manual. It uses Windows® Forms and is meant to demonstrate how to use the Smart Frame Recall feature.
- Note
- The feature described here requires at least version 2.18.1 of Impact Acquire and also devices offering certain features as part of their firmware.
- Program location
- The source files can be found under:
%INSTALLDIR%\apps\CSharp\SmartFrameRecall\
- Note
- If you have installed the package without example applications, these files won't be available. On Windows® the sample application can be installed or removed from the target system at any time by simply restarting the installation package.
- SmartFrameRecall example:
- Opens the selected device.
- The device snaps images and only transfers thumbnails (full AOI but reduced resolution).
- The example makes a blob analysis (to check if there are connected areas). By default the minBlobSize (width and height) is 160 pixels. However, you can change this in the source code.
- If the blob is bigger than 160 pixels, the example requests a region of interest (ROI; i.e. from the center of the blob the width and height of the display window) of this specific image at full resolution.
- How it works
- Open the example with Microsoft Visual Studio and try to compile and start the sample.
Then, you will see the following window:
In the left window you will see the live view (full AOI, reduced resolution). In the right window you will see the requested AOI or ROI at full resolution if the blob analysis was successful.
Last but not least, at the bottom there is the history of the requested AOIs.
To control the example, there are several shortcuts. Please press the key F1
to open the help window:
- Source code
using System;
using System.Windows.Forms;
namespace mv.impact.acquire.examples
{
static class SmartFrameRecall
{
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new DisplayForm());
}
}
}