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:(int)minScale maxScale:(int)maxScale width:(int)width height:(int)height error:(NSError**)outError;
public static boolean isRegistrationMark( RasterImage image, RegistrationMarkCommandType type, int minScale, int maxScale, int width, int height )
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, "Master.jpg")) ' 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.Core; public void IsRegistrationMarkExample() { // Load an image RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "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"); } 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