Determines if the object inside the image is a registration mark or not. This method is available in the Document/Medical Toolkits.
public static bool IsRegistrationMark(
Leadtools.RasterImage image,
Leadtools.Imageprocessing.Core.RegistrationMarkCommandType type,
int minScale,
int maxScale,
int width,
int height
)
Public Shared Function IsRegistrationMark( _
ByVal image As Leadtools.RasterImage, _
ByVal type As Leadtools.Imageprocessing.Core.RegistrationMarkCommandType, _
ByVal minScale As Integer, _
ByVal maxScale As Integer, _
ByVal width As Integer, _
ByVal height As Integer _
) As Boolean
public static bool IsRegistrationMark(
Leadtools.RasterImage image,
Leadtools.Imageprocessing.Core.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
)
function Leadtools.ImageProcessing.Core.CoreUtilities.IsRegistrationMark(
image ,
type ,
minScale ,
maxScale ,
width ,
height
)
public:
static bool IsRegistrationMark(
Leadtools.RasterImage^ image,
Leadtools.Imageprocessing.Core.RegistrationMarkCommandType type,
int minScale,
int maxScale,
int width,
int height
)
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 accepts only 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 accepts only positive values.
width
The width of the registration mark (in pixels). This parameter accepts only positive values.
height
The height of the registration mark (in pixels). This parameter accepts only positive values.
Boolean value indicating weather that specific object is registration mark or not.
Currently, there is only one type defined, a T-shaped figure as shown in the following figure. This type is a "T" rotated by 90 degrees counter clockwise. The P4 point must be on the center point of Line P1P2 (that is, the distance from P1 to P4 equals the distance from P2 to P4). The line width should be greater than 2 pixels(preferably 3 pixels). There are no conditions on line lengths since you provide the values for width, height, maxScale, and minScale.
Do not use this command to search for registration marks inside the image. Use SearchRegistrationMarksCommand instead.
For more information, refer to Detecting Registration Marks.
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";
}
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");
}
Leadtools.ImageProcessing.Effects.CombineCommand
Leadtools.ImageProcessing.RotateCommand
Leadtools.ImageProcessing.SizeCommand
Leadtools.ImageProcessing.ResizeCommand
GetTransformationParameters Method
Products |
Support |
Feedback: IsRegistrationMark Method - Leadtools.ImageProcessing.Core |
Introduction |
Help Version 19.0.2017.3.21
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.