Hi George,
there are a lot of examples here in the forum that show you how to add overlays to a Display, for example:
If you are not shure on how to use the Edge tool, try checking the documentation first:
https://help.commonvisionblox.com/NextGen/14.0/md_scripts_main__a_p_i__overview.html
This should be pretty straight forward.
Now, what you want to do is add another Display to show the resulting image, am I right?
If so, you have to have another displayControl or change the following line:
display.Image = value?.DeviceImage;
to not show the DeviceImage but the image you get from whatever processing you have done.
Your Edge Method call should look something like this:
FindFirst(ImagePlane, EdgeSearchMode, EdgeType, Double)
To explain you where the ImagePlane overload of the method comes from you have to take a look at the getting started once again, especially the part with the async processing:
https://forum.commonvisionblox.com/t/getting-started-with-cvb-net/246/10
Here is the interesting part:
private async void grabCheckBox_CheckedChanged(object sender, EventArgs e)
{
if (grabCheckBox.Checked)
{
Device.Stream.Start();
openButton.Enabled = false;
try
{
while (grabCheckBox.Checked)
{
using (StreamImage image = await Device.Stream.WaitAsync())
{
// processing
}
}
}
catch (OperationCanceledException)
{
// acquisition was aborted
}
finally
{
openButton.Enabled = true;
}
}
else
{
if (Device.Stream.IsRunning)
Device.Stream.Abort();
}
}
After you called the WaitAsync(), you have an image that you can use as argument for your edge tool, well not exactly the whole image but image.Planes[0] (for mono cameras) for RGB cameras just pass the index of the plane you want to use for processing.
I will also update my Example here
https://forum.commonvisionblox.com/t/getting-started-displaying-multiple-cameras/1508
To have another display that shows some image that is a result of some filter call or something like that.
For now I see, that you are making progress with the Forms approach so just stick with it but if you have timeā¦ just give my example a try.
Cheers
Chris