Grooper.IP.ShapeDetection

Detects regions within an image which are similar to a sample image. This command can be used to detect stamps, seals, logos, and other visual elements in an image. The output from Shape Detection can be used in several ways throughout Grooper:


Inherits from: Grooper.IP.IpCommand

Constructors

Signature Description
New ()
New (Owner As ConnectedObject)
Parameters
Owner
          Type: ConnectedObject
          

Fields

Field Name Field Type Description
Database As Grooper.GrooperDb Grooper.GrooperDb

Properties

Property Name Property Type Description
AngleStep System.Double The angular increment. For example, a Maximum Angle of 25° and an Angle Step of 5° will test the following angles: -25°, -20°, -15°, -10°, -5°, 0°, 5°, 10°, 15°, 20°, 25°. The Maximum Angle must be an even multiple of the Angle Step.
BackgroundDifferencing System.Boolean Enables or disables background differencing. Background differencing changes the scale of confidence values so that 0% represents a match against a "blank" region of the document.

When shapes contain mostly whitespace, selecting a confidence threshold can be a challange. For example, if a shape contains 90% white pixels, then it will match any blank white region at 90%. As a result, regions which look nothing like the shape to produce high confidence values.

When background differencing is enabled, confidence values are scaled according to the color balance of the sample image. For example, if the sample contains 90% white pixels, then confidence values from 90% to 100% will be scaled to the range 0% - 100% (values below 90% saturate to 0%).

Binarization Grooper.IP.Binarize If enabled, defines settings which binarize the image prior to processing.
CommandTypeName System.String The type of IP command.
Complexity System.String Indicates the time complexity of this IP command based on the current number of samples, scale factors, and skew angles.
DilationFactor System.Int32 The amount of dilation to apply to images before processing.
HasReferenceProperties System.Boolean Returns true if the object has properties which reference Grooper Node objects.
IsEmpty System.Boolean Returns true if all properties with a ViewableAttribute are set to their default value.
IsWriteable System.Boolean Returns true if the object is writable, or false if it is not.
MaxAngle System.Double The maximum angle at which shapes will be detected. This property, in combination with the Angle Step, determine the number of discreet angles which will be tested.
MaximumScale System.Double The maximum scale factor.
MinConfidence System.Double The minimum confidence for a match to be considered successful.
MinimumScale System.Double The minimum scale factor.
Owner Grooper.ConnectedObject Returns the node that owns the connected object, if any.
OwnerNode Grooper.GrooperNode Returns the node that owns the connected object, if any.
ProximityMeasure Grooper.IP.ShapeDetection.Method Determines the method used for calculating image proximity.Can be one of the following values:
  • SAD: Sum of Absolute Differences.
  • CrossCorr: Normalized cross-correlation.
  • SSD: Sum of Squared Distances.
Region Grooper.RectangleExF The rectangular region to be search for the Shape.
Root Grooper.GrooperRoot Returns the root node
RunResolution Grooper.IP.IpCommand.ProcessingResolution The resolution at which this command will be processed.Can be one of the following values:
  • FullResolution
  • Dpi10
  • Dpi15
  • Dpi20
  • Dpi25
  • Dpi30
  • Dpi40
  • Dpi50
  • Dpi75
  • Dpi100
  • Dpi150
  • Dpi200
  • Dpi250
  • Dpi300
SampleImages Grooper.IP.SampleImageCollection One or more sample images representing the shape to be detected.
ScaleStep System.Double The scale increment.
ShapeName System.String The name to the used to identify the shape. If no name is provided, the name of the sample image which matched each result will be used.
SupportedFormats System.String The pixel formats supported by this command.
SupportedPixelFormats System.Collections.Generic.IEnumerable(Of T) Returns a list of supported pixel formats of images that can be processed by the IP Command.

Methods

Method Name Description
Apply(Image As GrooperImage, DiagMode As Boolean) As IpCommandResult
Parameters
Image
          Type: GrooperImage
          
 
DiagMode
          Type: Boolean
          
ApplyAtalaCommand(cmd As ImageCommand, Image As GrooperImage) As AtalaIpResult
Parameters
cmd
          Type: ImageCommand
          
 
Image
          Type: GrooperImage
          
ApplyCommand(Image As GrooperImage) As IpCommandResult
Parameters
Image
          Type: GrooperImage
          
ApplyImage(Image As GrooperImage) As GrooperImage
Parameters
Image
          Type: GrooperImage
          
GetProperties() As PropertyDescriptorCollection
GetReferences() As List(Of GrooperNode) Returns a list of GrooperNode objects referenced in the properties of this object.
IsPropertyEnabled(PropertyName As String) As Nullable(Of Boolean) Defines whether a property is currently enabled.
Parameters
PropertyName
          Type: String
          The name of the property to determine the enabled state for.
IsPropertyVisible(PropertyName As String) As Nullable(Of Boolean) Defines whether a property is currently visible.
Parameters
PropertyName
          Type: String
          The name of the property to determine the visible state for.
IsType(Type As Type) As Boolean Returns true if the object is of the type specified, or if it derives from the type specfied.
Parameters
Type
          Type: Type
          The type to check.
Serialize() As String Serializes the object.
SetDatabase(Database As GrooperDb) Sets the database connection of the object.
Parameters
Database
          Type: GrooperDb
          
SetOwner(Owner As ConnectedObject, SkipInitialization As Boolean) Sets the owner of the connected object with another object that implements the IConnected interface.
Parameters
Owner
          Type: ConnectedObject
          
 
SkipInitialization
          Type: Boolean
          
ToString() As String Returns a string value representation of the connected object.
ValidateProperties() As ValidationErrorList Validates the properties of the object, returning a list of validation errors.