Determines if the object inside the image is a registration mark or not. This method is available in the
Document/Medical Toolkits.
Syntax
Parameters
- image
- RasterImage object that references the image to be searched for registration mark.
- type
- Value that specifies the type of registration mark for which to look. Currently, only one registration mark is defined (T-shape). See the Comments for more information. More shapes will be added in the future.
- minScale
- Minimum scaling factor of mark to be detected. This is a percentage. It must not exceed maxScale, or an error will be returned. This parameter only accepts positive values.
- maxScale
- Maximum scaling factor of mark to be detected. This is a percentage. It must not be lower than minScale, or an error will be returned. This parameter only accepts positive values.
- width
- The width of the registration mark (in pixels). This parameter only accepts positive values.
- height
- The height of the registration mark (in pixels). This parameter only accepts positive values.
Return Value
Boolean value indicating weather that specific object is registration mark or not.
Example
Visual Basic | Copy Code |
---|
ImageProcessing.Core.CoreUtilities.IsRegistrationMark
Public Sub IsRegistrationMarkExample()
RasterCodecs.Startup()
Dim codecs As New RasterCodecs()
codecs.ThrowExceptionsOnInvalidImages = True
Dim leadImage As RasterImage = codecs.Load("C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Master.jpg")
Dim IsRegMark As Boolean
IsRegMark = CoreUtilities.IsRegistrationMark(leadImage, RegistrationMarkCommandType.TShape, 90, 110, 31, 29)
If (IsRegMark) Then
MessageBox.Show("It's Registration Mark", "IsRegistrationMarkTest")
Else
MessageBox.Show("Not a Registration Mark", "IsRegistrationMarkTest")
End If
RasterCodecs.Shutdown()
End Sub |
C# | Copy Code |
---|
ImageProcessing.Core.CoreUtilities.IsRegistrationMark public void IsRegistrationMarkExample() { // Load an image RasterCodecs.Startup(); RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; RasterImage image = codecs.Load(@"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Master.jpg"); // Prepare the command bool IsRegMark = CoreUtilities.IsRegistrationMark(image, RegistrationMarkCommandType.TShape, 90, 110, 31, 29); MessageBox.Show(IsRegMark ? "It's Registration Mark" : "Not a Registration Mark"); RasterCodecs.Shutdown(); } |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also