←选择平台

RegistrationOptions枚举

总结
表示注册期间要执行的转换类型。
语法
c#
VB
objective - c
c++
Java
公共枚举RegistrationOptions
公共枚举RegistrationOptions
typedef NS_OPTIONS(NSUInteger, LTRegistrationOptions)
公共枚举RegistrationOptions
公共枚举RegistrationOptions
成员
价值 成员 描述
0 未知的 未知转换类型。转换算法将被自动选择。
1 XY (0x00000001)在注册时使用一对对应的点执行XY转换。
2 RSXY 在注册过程中使用两对对应的点执行旋转、缩放和XY转换。
3. Affine6 在配准过程中使用三对对应点执行旋转、缩放、剪切和XY转换。
4 的角度来看 在配准过程中使用四对对应点进行透视转换。
例子
c#
VB
使用Leadtools;使用Leadtools.Codecs;使用Leadtools.ImageProcessing;使用Leadtools.ImageProcessing.Core;公共无效AlignImagesCommandExample ()RasterCodecs codecs =RasterCodecs ();编解码器。ThrowExceptionsOnInvalidImages =真正的//加载图像RasterImage ReferenceImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir,“cannon.jpg”));//旋转要注册的图像RasterImage TemplateImage =RasterImage (ReferenceImage);RotateCommand命令=RotateCommand(45 * 100, RotateCommandFlags。双三次的,RasterColor(0,0,0));command.Run (TemplateImage);//从两个图像中获取相互对应的特征点。LeadPoint[] templatePoints =LeadPoint [2];LeadPoint[] referencePoints =LeadPoint [2];referencePoints [0] =LeadPoint(173、102);referencePoints [1] =LeadPoint(216、259);templatePoints [0] =LeadPoint(239、66);templatePoints [1] =LeadPoint(158、207);//准备命令AlignImagesCommand alignCommand =AlignImagesCommand ();alignCommand。TemplateImage=TemplateImage;alignCommand。参考ImagePoints = referencePoints;alignCommand。TemplateImagePoints = templatePoints;alignCommand。RegistrationMethod = RegistrationOptions.Unknown;/ /应用alignCommand.Run (ReferenceImage);//保存生成的图像codecs.Save (alignCommand。RegisteredImage Path.Combine (LEAD_VARS.ImagesDir,“RegisteredImage.bmp”), RasterImageFormat.Bmp, 24);静态LEAD_VARS公共常量字符串ImagesDir =@“C: \ LEADTOOLS21 \ Resources \图片”
进口Leadtools进口Leadtools。编解码器进口Leadtools。ImageProcessing进口Leadtools.ImageProcessing.Core公共AlignImagesCommandExample ()昏暗的编解码器作为RasterCodecs =RasterCodecs ()编解码器。ThrowExceptionsOnInvalidImages =真正的'加载图像昏暗的ReferenceImage作为RasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir,“cannon.jpg”))'旋转要注册的图像昏暗的TemplateImage作为RasterImage =RasterImage (ReferenceImage)昏暗的命令作为RotateCommand =RotateCommand(45 * 100, RotateCommandFlags。双三次的,RasterColor(0,0,0)command.Run (TemplateImage)“从两张图像中获取相互对应的特征点。昏暗的templatePoints ()作为LeadPoint =LeadPoint (2) {}昏暗的referencePoints ()作为LeadPoint =LeadPoint (2) {}referencePoints (0) =LeadPoint(173、102)referencePoints (1) =LeadPoint(216、259)templatePoints (0) =LeadPoint(239、66)templatePoints (1) =LeadPoint(158、207)准备命令昏暗的alignCommand作为AlignImagesCommand =AlignImagesCommand ()alignCommand。TemplateImage=TemplateImagealignCommand。参考ImagePoints = referencePointsalignCommand。TemplateImagePoints = templatePointsalignCommand。RegistrationMethod = RegistrationOptions。未知的的应用alignCommand.Run (ReferenceImage)保存结果图像codecs.Save (alignCommand。RegisteredImage Path.Combine (LEAD_VARS.ImagesDir,“RegisteredImage.jpg”), RasterImageFormat.Bmp, 24)结束公共NotInheritableLEAD_VARS公共常量ImagesDir作为字符串“C: \ LEADTOOLS21 \ Resources \图片”结束
需求

目标平台

Leadtools.ImageProcessing.Core组装
188金宝搏的网址客服|支持|联系我们|知识产权公告
©1991 - 2021领德科技有限公司版权所有。