CogVerificationDatabase AddImage Method (String, Boolean, CogVerificationSimpleResultConstants)Cognex VisionPro 9.25 SR1
Adds the specified image to this verification database. If the image cannot be loaded, this method stops and throws an exception.

Namespace: Cognex.VisionPro.Inspection
Assembly: Cognex.VisionPro.Inspection (in Cognex.VisionPro.Inspection.dll) Version: 93.1.0.0 (93.1.0.0)
Syntax

public string[] AddImage(
	string imageFilename,
	bool referenceImage,
	CogVerificationSimpleResultConstants defaultSimpleResult
)

Parameters

imageFilename
Type: System String
The full path to the image to be added.
referenceImage
Type: System Boolean
Set this to true if the images should be referenced by their full path. Set this to false if the images should be embedded (copied) into the database.
defaultSimpleResult
Type: Cognex.VisionPro.Inspection CogVerificationSimpleResultConstants
The default simple result for all the added images

Return Value

Type:  String 
An array of all the images that were added to the database.
Exceptions

ExceptionCondition
InvalidOperationException Thrown if not currently connected.
ArgumentNullException Thrown if imageFilanem is null.
ArgumentNullException Thrown if the imageFilename is not found.
ArgumentNullException Thrown if the image cannot be added to the database.
See Also