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 )
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
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"; }
// [TestMethod] // 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"); // } //
[TestMethod] 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"); }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
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