Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.6.27
|
Leadtools.ImageProcessing.Core Namespace > CoreUtilities Class : IsRegistrationMark Method |
public static bool IsRegistrationMark( RasterImage image, RegistrationMarkCommandType type, int minScale, int maxScale, int width, int height )
'Declaration
Public Shared Function IsRegistrationMark( _ ByVal image As RasterImage, _ ByVal type As RegistrationMarkCommandType, _ ByVal minScale As Integer, _ ByVal maxScale As Integer, _ ByVal width As Integer, _ ByVal height As Integer _ ) As Boolean
'Usage
Dim image As RasterImage Dim type As RegistrationMarkCommandType Dim minScale As Integer Dim maxScale As Integer Dim width As Integer Dim height As Integer Dim value As Boolean value = CoreUtilities.IsRegistrationMark(image, type, minScale, maxScale, width, height)
public static bool IsRegistrationMark( RasterImage image, RegistrationMarkCommandType type, int minScale, int maxScale, int width, int height )
+ (BOOL)isRegistrationMark:(LTRasterImage *)image\ type:(LTRegistrationMarkCommandType)type minScale:(NSInteger)minScale maxScale:(NSInteger)maxScale width:(NSInteger)width height:(NSInteger)height error:(NSError **)error
public static boolean isRegistrationMark( RasterImage image, RegistrationMarkCommandType type, int minScale, int maxScale, int width, int height )
This example determines if the object is a registration mark.
Imports Leadtools Imports Leadtools.Codecs Imports Leadtools.ImageProcessing.Core Public Sub IsRegistrationMarkExample() Dim codecs As New RasterCodecs() codecs.ThrowExceptionsOnInvalidImages = True Dim leadImage As RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "RGSRef.cmp")) ' Prepare the command 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 End Sub Public NotInheritable Class LEAD_VARS Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images" End Class
using Leadtools; using Leadtools.Codecs; using Leadtools.ImageProcessing; using Leadtools.ImageProcessing.Core; public void IsRegistrationMarkExample() { // Load an image RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "RGSRef.cmp")); // 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"); } static class LEAD_VARS { public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images"; }
// // public async Task IsRegistrationMarkExample() // { // // Load an image // RasterCodecs codecs = new RasterCodecs(); // codecs.ThrowExceptionsOnInvalidImages = true; // // Load the image // string srcFileName = @"Assets\Image1.cmp"; // StorageFile loadFile = await Tools.AppInstallFolder.GetFileAsync(srcFileName); // RasterImage image = await codecs.LoadAsync(LeadStreamFactory.Create(loadFile)); // // Prepare the command // bool IsRegMark = CoreUtilities.IsRegistrationMark(image, RegistrationMarkCommandType.TShape, 90, 110, 31, 29); // Debug.WriteLine(IsRegMark ? "It's Registration Mark" : "Not a Registration Mark"); // } //
using Leadtools; using Leadtools.Codecs; using Leadtools.ImageProcessing.Core; public async Task IsRegistrationMarkExample() { // Load an image RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; // Load the image string srcFileName = @"Assets\Image1.cmp"; StorageFile loadFile = await Tools.AppInstallFolder.GetFileAsync(srcFileName); RasterImage image = await codecs.LoadAsync(LeadStreamFactory.Create(loadFile)); // Prepare the command bool IsRegMark = CoreUtilities.IsRegistrationMark(image, RegistrationMarkCommandType.TShape, 90, 110, 31, 29); Debug.WriteLine(IsRegMark ? "It's Registration Mark" : "Not a Registration Mark"); }
CoreUtilities Class
CoreUtilities Members
Detecting Registration Marks
Leadtools.ImageProcessing.Effects.CombineCommand
Leadtools.ImageProcessing.RotateCommand
Leadtools.ImageProcessing.SizeCommand
Leadtools.ImageProcessing.ResizeCommand
GetTransformationParameters Method
SearchRegistrationMarksCommand Class
GetRegistrationMarksCenterMass Method