From edf127edc771f715c49f86e91e768633f0a0ed93 Mon Sep 17 00:00:00 2001 From: alvin.chen <alvin.chen@DESKTOP-RPIS58P> Date: 星期五, 29 十一月 2019 10:31:32 +0800 Subject: [PATCH] add source --- HalconTools/MeasureModule/MeasureParamSave.cs | 94 HalconTools/frmJobManager.cs | 237 LLMF/LLMF.csproj | 186 PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/FunctionPlot.cs | 562 Lib/FlyCapture/FlyCapture2Managed_v100.dll | 0 PointGreyAndHalcon/PointGreyAndHalcon/PointGreyAndHalcon.csproj | 88 HalconTools/frmCalibration.resx | 132 Lib/SuperDog/dog_windows_3153818.dll | 0 LLMF/frmPassword.Designer.cs | 89 HalconTools/FitModule/FitAssistant.cs | 419 HalconTools/Resources/Resource.zh-CN.resx | 330 HalconTools/ViewROI/ROIRectangle1.cs | 211 Lib/SuperDog/api_dsp_windows.dll | 0 FileToolkit/Properties/Settings.Designer.cs | 26 PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROIController.cs | 401 HalconTools/ToolKit/EventData.cs | 31 Lib/SuperDog/dog_windows_x64_3153818.dll | 0 HalconTools/MeasureModule/Measurement.cs | 516 LLMF/frmMain.resx | 1172 + HalconTools/frmContourAssistant.Designer.cs | 528 FileToolkit/SerializeFileTool.cs | 70 HalconTools/Properties/Settings.Designer.cs | 26 HalconTools/Properties/Settings.settings | 7 HalconTools/CalibrationModule/QualityProcedures.cs | 1034 + HalconTools/ViewROI/HObjectEntry.cs | 53 HalconTools/Resources/Resource.en-US.resx | 330 PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/GraphicsContext.cs | 417 EventTool/Properties/Resources.Designer.cs | 63 LLMF/Log.cs | 92 PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROICircularArc.cs | 305 HalconTools/frmFitCircleAndLine.Designer.cs | 1254 + HalconTools/ContourModule/ContourResult.cs | 43 HalconTools/frmScrewAssistant.cs | 202 HalconTools/ToolKit/SerializeTool.cs | 46 HalconTools/frmFitCircleAndLine.cs | 512 Lib/FlyCapture/FlyCapture2Managed.dll | 0 LLMF/FrmActive.cs | 251 HalconTools/CalibrationModule/CalibrationAssistant.cs | 1751 ++ FileToolkit/StarterTool.cs | 76 HalconTools/frmMain.Designer.cs | 194 EventTool/EventTool.csproj | 87 LLMF/RegistryHelper.cs | 79 FileToolkit/Properties/AssemblyInfo.cs | 36 HalconTools/FitModule/FitCircleParam.cs | 38 HalconTools/ViewROI/ROICircularArc.cs | 305 LLMF/Properties/Resources.resx | 117 LLMF/Program.cs | 51 LLMF/frmMain.cs | 2202 ++ HalconTools/ToolKit/LogType.cs | 12 HalconTools/ViewROI/ROICircle.cs | 155 FileToolkit/Properties/Resources.resx | 117 HalconTools/HalconTools.csproj | 240 HalconTools/ScrewModule/ScrewResult.cs | 22 HalconTools/ResourceCulture.cs | 124 LLMF/Properties/Settings.settings | 7 LLMF/WelcomeUser.cs | 19 PointGreyAndHalcon/PointGreyAndHalcon/PointGreyAndHalcon.cs | 343 HalconTools/ToolKit/ListenEventCreater.cs | 25 PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/HObjectEntry.cs | 53 PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROIRectangle2.cs | 251 HalconTools/CalibrationModule/QualityIssue.cs | 46 LLMF/Properties/Settings.Designer.cs | 26 PointGreyAndHalcon/PointGreyAndHalcon/Properties/AssemblyInfo.cs | 36 LLMF/frmConfig.cs | 188 PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/HWndCtrl.cs | 868 + HalconTools/FitModule/LinePosition.cs | 33 LLMF/FrmActive.resx | 120 HalconTools/JobModule/Job.cs | 42 HalconTools/MatchingModule/MatchingParamSave.cs | 113 HalconTools/ViewROI/ROI.cs | 161 LLMF/frmConfig.Designer.cs | 421 HalconTools/ToolKit/FileOperationResult.cs | 10 FileToolkit/Win32API.cs | 132 HalconTools/FitModule/FitModule.csproj | 107 HalconTools/MeasureModule/MeasurementPair.cs | 165 LLMF.sln | 52 HalconTools/ViewROI/FunctionPlot.cs | 562 FileToolkit/SerializeTool.cs | 46 HalconTools/ScrewModule/ScrewParam.cs | 20 HalconTools/ToolKit/SerialPort.cs | 177 EventTool/EventData.cs | 31 HalconTools/MatchingModule/MatchingAssistant.cs | 1544 + HalconTools/MatchingModule/MatchingParam.cs | 641 HalconTools/frmFitCircleAndLine.resx | 120 HalconTools/HalconTool.cs | 624 HalconTools/ToolKit/StarterTool.cs | 76 HalconTools/ViewROI/ROILine.cs | 204 PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROILine.cs | 202 HalconTools/ToolKit/SocketTools.cs | 348 LLMF/Properties/Resources.Designer.cs | 63 HalconTools/ToolKit/Win32API.cs | 132 LLMF/frmPassword.resx | 120 HalconTools/FitModule/LineMetrology.cs | 52 LLMF/Toolkit/OPC.cs | 483 HalconTools/FitModule/FitLineResult.cs | 117 HalconTools/ToolKit/IniTool.cs | 59 Lib/SuperDog/api_dsp_windows_x64.dll | 0 LLMF/frmMain.Designer.cs | 2096 ++ Lib/SuperDog/dog_net_windows.dll | 0 HalconTools/ToolKit/Log.cs | 5 HalconTools/MatchingModule/MatchingOptSpeed.cs | 245 HalconTools/ContourModule/ContourParam.cs | 33 HalconTools/ToolKit/NetWorkTool.cs | 20 LLMF/ico.ico | 0 HalconTools/ScrewModule/ScrewAssistant.cs | 195 HalconTools/FitModule/FitLineParam.cs | 41 PointGreyAndHalcon/PointGreyAndHalcon.sln | 20 LLMF/WelcomeUser.Designer.cs | 66 HalconTools/ToolKit/LkSensor.cs | 403 HalconTools/JobModule/ToolType.cs | 29 LLMF/frmConfig.resx | 120 HalconTools/MeasureModule/MeasurementEdge.cs | 134 HalconTools/Properties/AssemblyInfo.cs | 36 HalconTools/ContourModule/ContourAssistant.cs | 224 HalconTools/FitModule/FitCircleResult.cs | 118 PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROI.cs | 161 LLMF/WelcomeUser.resx | 2544 +++ HalconTools/ToolKit/Counter.cs | 90 HalconTools/ViewROI/ROIRectangle2.cs | 251 HalconTools/CalibrationModule/CalibImage.cs | 285 HalconTools/MatchingModule/MatchingOptStatistics.cs | 283 HalconTools/frmContourAssistant.resx | 120 EventTool/Properties/Settings.Designer.cs | 26 LLMF/Toolkit/ConfigStruct.cs | 208 HalconTools/MeasureModule/MeasureAssistant.cs | 733 HalconTools/Properties/Resources.resx | 120 HalconTools/frmContourAssistant.cs | 240 HalconTools/ToolKit/SerializeFileTool.cs | 70 HalconTools/frmScrewAssistant.resx | 120 HalconTools/frmJobManager.resx | 123 FileToolkit/Properties/Settings.settings | 7 LLMF/app.config | 3 HalconTools/MeasureModule/MeasurementResult.cs | 164 HalconTools/ViewROI/GraphicsContext.cs | 417 HalconTools/frmMain.zh-CHS.resx | 120 EventTool/Properties/AssemblyInfo.cs | 36 FileToolkit/FileToolkit.csproj | 84 HalconTools/Properties/Resources.Designer.cs | 63 EventTool/Properties/Settings.settings | 7 HalconTools/ToolKit/LogManager.cs | 179 HalconTools/MatchingModule/MatchingOpt.cs | 147 FileToolkit/Properties/Resources.Designer.cs | 63 HalconTools/frmMeasureAssistant.resx | 129 HalconTools/JobModule/JobAssistance.cs | 72 HalconTools/ViewROI/ROIController.cs | 402 HalconTools/FitModule/FitResult.cs | 15 PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROICircle.cs | 155 HalconTools/frmJobManager.Designer.cs | 270 LLMF/FrmActive.designer.cs | 86 EventTool/Properties/Resources.resx | 117 HalconTools/ViewROI/HWndCtrl.cs | 867 + HalconTools/frmMatchingAssistant.cs | 4774 +++++ HalconTools/frmMeasureAssistant.cs | 2649 +++ HalconTools/frmMain.resx | 479 LLMF/frmPassword.cs | 59 FileToolkit/FileOperationResult.cs | 10 EventTool/ListenEventArgs.cs | 27 EventTool/ListenEventCreater.cs | 25 HalconTools/FitModule/CirclePosition.cs | 29 Lib/halcon/halcondotnet.dll | 0 PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROIRectangle1.cs | 211 HalconTools/frmMain.cs | 159 LLMF/Toolkit/StarterTool.cs | 33 HalconTools/ToolKit/StyleSetTools.cs | 77 HalconTools/frmScrewAssistant.Designer.cs | 354 HalconTools/frmCalibration.cs | 1415 + HalconTools/ToolKit/ListenEventArgs.cs | 27 HalconTools/ToolKit/KillApplication.cs | 35 HalconTools/MatchingModule/MatchingResult.cs | 101 LLMF/Properties/AssemblyInfo.cs | 36 HalconTools/frmCalibration.Designer.cs | 2958 +++ HalconTools/frmMatchingAssistant.resx | 138 172 files changed, 50,330 insertions(+), 0 deletions(-) diff --git a/EventTool/EventData.cs b/EventTool/EventData.cs new file mode 100644 index 0000000..d4ff2e0 --- /dev/null +++ b/EventTool/EventData.cs @@ -0,0 +1,31 @@ +锘縩amespace EventTool +{ + public class EventData + { + private object data; + + public EventData() + { + this.data = ""; + } + + public EventData(object obj) + { + this.data = ""; + this.data = obj; + } + + public object Data + { + get + { + return this.data; + } + set + { + this.data = value; + } + } + } +} + diff --git a/EventTool/EventTool.csproj b/EventTool/EventTool.csproj new file mode 100644 index 0000000..13ccec0 --- /dev/null +++ b/EventTool/EventTool.csproj @@ -0,0 +1,87 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>9.0.21022</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{2EBB374F-7C87-4A83-8AF4-503CDF0D1B0E}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>EventTool</RootNamespace> + <AssemblyName>EventTool</AssemblyName> + <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <StartupObject> + </StartupObject> + <FileUpgradeFlags> + </FileUpgradeFlags> + <UpgradeBackupLocation> + </UpgradeBackupLocation> + <OldToolsVersion>3.5</OldToolsVersion> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Xml.Linq"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> + <Reference Include="System.Data.DataSetExtensions"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> + <Reference Include="System.Data" /> + <Reference Include="System.Deployment" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="EventData.cs" /> + <Compile Include="ListenEventArgs.cs" /> + <Compile Include="ListenEventCreater.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + <SubType>Designer</SubType> + </EmbeddedResource> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Resources.resx</DependentUpon> + <DesignTime>True</DesignTime> + </Compile> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/EventTool/ListenEventArgs.cs b/EventTool/ListenEventArgs.cs new file mode 100644 index 0000000..dcead99 --- /dev/null +++ b/EventTool/ListenEventArgs.cs @@ -0,0 +1,27 @@ +锘縰sing System; + +namespace EventTool +{ + public class ListenEventArgs : EventArgs + { + private EventData iData; + + public ListenEventArgs(EventData iData) + { + this.iData = iData; + } + + public EventData IData + { + get + { + return this.iData; + } + set + { + this.iData = value; + } + } + } +} + diff --git a/EventTool/ListenEventCreater.cs b/EventTool/ListenEventCreater.cs new file mode 100644 index 0000000..7b1a787 --- /dev/null +++ b/EventTool/ListenEventCreater.cs @@ -0,0 +1,25 @@ +锘縰sing System; + +namespace EventTool +{ + public class ListenEventCreater + { + public event EventHandler<ListenEventArgs> ListenEvent; + + public void ChangeValue(EventData iData) + { + ListenEventArgs args = new ListenEventArgs(iData); + this.SendEvent(args); + } + + protected virtual void SendEvent(ListenEventArgs args) + { + EventHandler<ListenEventArgs> listenEvent = this.ListenEvent; + if (listenEvent != null) + { + listenEvent(this, args); + } + } + } +} + diff --git a/EventTool/Properties/AssemblyInfo.cs b/EventTool/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..3090b92 --- /dev/null +++ b/EventTool/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +锘縰sing System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 鏈夊叧绋嬪簭闆嗙殑甯歌淇℃伅閫氳繃涓嬪垪灞炴�ч泦 +// 鎺у埗銆傛洿鏀硅繖浜涘睘鎬у�煎彲淇敼 +// 涓庣▼搴忛泦鍏宠仈鐨勪俊鎭�� +[assembly: AssemblyTitle("EventTool")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("EventTool")] +[assembly: AssemblyCopyright("Copyright 漏 Microsoft 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 灏� ComVisible 璁剧疆涓� false 浣挎绋嬪簭闆嗕腑鐨勭被鍨� +// 瀵� COM 缁勪欢涓嶅彲瑙併�傚鏋滈渶瑕佷粠 COM 璁块棶姝ょ▼搴忛泦涓殑绫诲瀷锛� +// 鍒欏皢璇ョ被鍨嬩笂鐨� ComVisible 灞炴�ц缃负 true銆� +[assembly: ComVisible(false)] + +// 濡傛灉姝ら」鐩悜 COM 鍏紑锛屽垯涓嬪垪 GUID 鐢ㄤ簬绫诲瀷搴撶殑 ID +[assembly: Guid("3b92a380-78bd-4567-ab18-d8a4cec99b2a")] + +// 绋嬪簭闆嗙殑鐗堟湰淇℃伅鐢变笅闈㈠洓涓�肩粍鎴�: +// +// 涓荤増鏈� +// 娆$増鏈� +// 鍐呴儴鐗堟湰鍙� +// 淇鍙� +// +// 鍙互鎸囧畾鎵�鏈夎繖浜涘�硷紝涔熷彲浠ヤ娇鐢ㄢ�滃唴閮ㄧ増鏈彿鈥濆拰鈥滀慨璁㈠彿鈥濈殑榛樿鍊硷紝 +// 鏂规硶鏄寜濡備笅鎵�绀轰娇鐢ㄢ��*鈥�: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/EventTool/Properties/Resources.Designer.cs b/EventTool/Properties/Resources.Designer.cs new file mode 100644 index 0000000..7b61084 --- /dev/null +++ b/EventTool/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +锘�//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace EventTool.Properties { + using System; + + + /// <summary> + /// A strongly-typed resource class, for looking up localized strings, etc. + /// </summary> + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// <summary> + /// Returns the cached ResourceManager instance used by this class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("EventTool.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/EventTool/Properties/Resources.resx b/EventTool/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/EventTool/Properties/Resources.resx @@ -0,0 +1,117 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/EventTool/Properties/Settings.Designer.cs b/EventTool/Properties/Settings.Designer.cs new file mode 100644 index 0000000..74803eb --- /dev/null +++ b/EventTool/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +锘�//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace EventTool.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/EventTool/Properties/Settings.settings b/EventTool/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/EventTool/Properties/Settings.settings @@ -0,0 +1,7 @@ +锘�<?xml version='1.0' encoding='utf-8'?> +<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> + <Profiles> + <Profile Name="(Default)" /> + </Profiles> + <Settings /> +</SettingsFile> diff --git a/FileToolkit/FileOperationResult.cs b/FileToolkit/FileOperationResult.cs new file mode 100644 index 0000000..a2f8fcf --- /dev/null +++ b/FileToolkit/FileOperationResult.cs @@ -0,0 +1,10 @@ +锘縩amespace ToolKit.FileToolkit +{ + public enum FileOperationResult + { + OK, + NOTEXIST, + WRITEERROR + } +} + diff --git a/FileToolkit/FileToolkit.csproj b/FileToolkit/FileToolkit.csproj new file mode 100644 index 0000000..c803437 --- /dev/null +++ b/FileToolkit/FileToolkit.csproj @@ -0,0 +1,84 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>9.0.21022</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{EC3A7C8F-C3FB-461C-9AF1-2456E1CBEC46}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>FileToolkit</RootNamespace> + <AssemblyName>FileToolkit</AssemblyName> + <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <StartupObject> + </StartupObject> + <FileUpgradeFlags> + </FileUpgradeFlags> + <UpgradeBackupLocation> + </UpgradeBackupLocation> + <OldToolsVersion>3.5</OldToolsVersion> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Deployment" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Runtime.Serialization.Formatters.Soap" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="FileOperationResult.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + <SubType>Designer</SubType> + </EmbeddedResource> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Resources.resx</DependentUpon> + <DesignTime>True</DesignTime> + </Compile> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + <Compile Include="SerializeFileTool.cs" /> + <Compile Include="SerializeTool.cs" /> + <Compile Include="StarterTool.cs" /> + <Compile Include="Win32API.cs" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/FileToolkit/Properties/AssemblyInfo.cs b/FileToolkit/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a5f7c70 --- /dev/null +++ b/FileToolkit/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +锘縰sing System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 鏈夊叧绋嬪簭闆嗙殑甯歌淇℃伅閫氳繃涓嬪垪灞炴�ч泦 +// 鎺у埗銆傛洿鏀硅繖浜涘睘鎬у�煎彲淇敼 +// 涓庣▼搴忛泦鍏宠仈鐨勪俊鎭�� +[assembly: AssemblyTitle("FileToolkit")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("BroConcentric")] +[assembly: AssemblyProduct("FileToolkit")] +[assembly: AssemblyCopyright("Copyright 漏 BroConcentric2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 灏� ComVisible 璁剧疆涓� false 浣挎绋嬪簭闆嗕腑鐨勭被鍨� +// 瀵� COM 缁勪欢涓嶅彲瑙併�傚鏋滈渶瑕佷粠 COM 璁块棶姝ょ▼搴忛泦涓殑绫诲瀷锛� +// 鍒欏皢璇ョ被鍨嬩笂鐨� ComVisible 灞炴�ц缃负 true銆� +[assembly: ComVisible(false)] + +// 濡傛灉姝ら」鐩悜 COM 鍏紑锛屽垯涓嬪垪 GUID 鐢ㄤ簬绫诲瀷搴撶殑 ID +[assembly: Guid("6d8fbddf-137a-42b0-9573-3f346f1380dc")] + +// 绋嬪簭闆嗙殑鐗堟湰淇℃伅鐢变笅闈㈠洓涓�肩粍鎴�: +// +// 涓荤増鏈� +// 娆$増鏈� +// 鍐呴儴鐗堟湰鍙� +// 淇鍙� +// +// 鍙互鎸囧畾鎵�鏈夎繖浜涘�硷紝涔熷彲浠ヤ娇鐢ㄢ�滃唴閮ㄧ増鏈彿鈥濆拰鈥滀慨璁㈠彿鈥濈殑榛樿鍊硷紝 +// 鏂规硶鏄寜濡備笅鎵�绀轰娇鐢ㄢ��*鈥�: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.1")] +[assembly: AssemblyFileVersion("1.0.0.1")] diff --git a/FileToolkit/Properties/Resources.Designer.cs b/FileToolkit/Properties/Resources.Designer.cs new file mode 100644 index 0000000..a56aec9 --- /dev/null +++ b/FileToolkit/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +锘�//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace FileToolkit.Properties { + using System; + + + /// <summary> + /// A strongly-typed resource class, for looking up localized strings, etc. + /// </summary> + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// <summary> + /// Returns the cached ResourceManager instance used by this class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FileToolkit.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/FileToolkit/Properties/Resources.resx b/FileToolkit/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/FileToolkit/Properties/Resources.resx @@ -0,0 +1,117 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/FileToolkit/Properties/Settings.Designer.cs b/FileToolkit/Properties/Settings.Designer.cs new file mode 100644 index 0000000..db12d5f --- /dev/null +++ b/FileToolkit/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +锘�//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace FileToolkit.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/FileToolkit/Properties/Settings.settings b/FileToolkit/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/FileToolkit/Properties/Settings.settings @@ -0,0 +1,7 @@ +锘�<?xml version='1.0' encoding='utf-8'?> +<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> + <Profiles> + <Profile Name="(Default)" /> + </Profiles> + <Settings /> +</SettingsFile> diff --git a/FileToolkit/SerializeFileTool.cs b/FileToolkit/SerializeFileTool.cs new file mode 100644 index 0000000..28df99b --- /dev/null +++ b/FileToolkit/SerializeFileTool.cs @@ -0,0 +1,70 @@ +锘縰sing System; +using System.IO; +using System.Text; + +namespace ToolKit.FileToolkit +{ + public class SerializeFileTool<T> + { + public T GetConfig(string fileName) + { + T local = default(T); + byte[] bStr = null; + if (this.ReadBytes(fileName, out bStr) == FileOperationResult.OK) + { + local = SerializeTool<T>.XmlSerializerDeserialize(bStr); + } + return local; + } + + private FileOperationResult ReadBytes(string path, out byte[] bStr) + { + bStr = null; + if (!File.Exists(path)) + { + return FileOperationResult.NOTEXIST; + } + try + { + using (FileStream stream = new FileStream(path, FileMode.Open, FileAccess.ReadWrite)) + { + bStr = new byte[stream.Length]; + stream.Read(bStr, 0, bStr.Length); + } + } + catch + { + return FileOperationResult.WRITEERROR; + } + return FileOperationResult.OK; + } + + public void SetConfig(string fileName, T config) + { + this.WriteBytes(fileName, FileMode.Create, SerializeTool<T>.XmlSerializerSerialize(config)); + } + + private FileOperationResult WriteBytes(string path, FileMode filemode, byte[] bStr) + { + try + { + using (FileStream stream = new FileStream(path, filemode, FileAccess.ReadWrite)) + { + stream.Write(bStr, 0, bStr.Length); + } + } + catch (Exception) + { + return FileOperationResult.WRITEERROR; + } + return FileOperationResult.OK; + } + + private FileOperationResult WriteString(string path, FileMode filemode, string str) + { + byte[] bytes = Encoding.Default.GetBytes(str); + return this.WriteBytes(path, filemode, bytes); + } + } +} + diff --git a/FileToolkit/SerializeTool.cs b/FileToolkit/SerializeTool.cs new file mode 100644 index 0000000..27ccf10 --- /dev/null +++ b/FileToolkit/SerializeTool.cs @@ -0,0 +1,46 @@ +锘縰sing System.IO; +using System.Runtime.Serialization.Formatters.Soap; +using System.Xml.Serialization; + +namespace ToolKit.FileToolkit +{ + public class SerializeTool<T> + { + public static T SoapFormatterDeserialize(byte[] data) + { + using (MemoryStream stream = new MemoryStream(data)) + { + SoapFormatter formatter = new SoapFormatter(); + return (T) formatter.Deserialize(stream); + } + } + + public static byte[] SoapFormatterSerialize(T obj) + { + using (MemoryStream stream = new MemoryStream()) + { + new SoapFormatter().Serialize(stream, obj); + return stream.ToArray(); + } + } + + public static T XmlSerializerDeserialize(byte[] data) + { + using (MemoryStream stream = new MemoryStream(data)) + { + XmlSerializer serializer = new XmlSerializer(typeof(T)); + return (T) serializer.Deserialize(stream); + } + } + + public static byte[] XmlSerializerSerialize(T obj) + { + using (MemoryStream stream = new MemoryStream()) + { + new XmlSerializer(typeof(T)).Serialize((Stream) stream, obj); + return stream.ToArray(); + } + } + } +} + diff --git a/FileToolkit/StarterTool.cs b/FileToolkit/StarterTool.cs new file mode 100644 index 0000000..392d70b --- /dev/null +++ b/FileToolkit/StarterTool.cs @@ -0,0 +1,76 @@ +锘縰sing System.Diagnostics; +using System.Threading; + +namespace ToolKit +{ + public class StarterTool + { + public static bool IsExistMutex(string mutexName, out Mutex mutex) + { + bool flag; + mutex = new Mutex(true, mutexName, out flag); + return !flag; + } + + public static bool IsSingle() + { + return (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length <= 1); + } + + public static void PowerWait(string[] args) + { + if ((((args != null) && (args.Length > 1)) && args[0].ToUpper().Equals("-S")) && (args[1] != null)) + { + int result = 0; + if (int.TryParse(args[1], out result) && (result > 0)) + { + Thread.Sleep((int) (result * 0x3e8)); + } + } + } + + //private void Form1_Load(object sender, EventArgs e) + //{ + + // string appPath = @"C:\Program Files\KEPServerEx\servermain.exe E:\MacBookTest_F2\Kep_F2.opf"; + // int sleepTime = 200; + // bool isVisible = false; + + // KillApp(appPath); + // ShowWindow(appPath, sleepTime, isVisible); + //} + + public static void ShowWindow(string appPathNargs, int sleepTime, bool isVisible) + { + int exeStart = appPathNargs.IndexOf(".exe", 0); + string appPath = appPathNargs.Substring(0, exeStart + 4); + string args = appPathNargs.Substring(exeStart + 5); + + System.Diagnostics.Process p = System.Diagnostics.Process.Start(appPath, args); + + System.Threading.Thread.Sleep(sleepTime); + string name = p.MainWindowTitle; + + System.IntPtr ptr = HideIcon.Win32API.FindWindow(null, name); + HideIcon.Win32API.ShowWindow(ptr, System.Convert.ToInt32(isVisible)); + } + + public static void KillApp(string appPath) + { + int exeStart = appPath.IndexOf(".exe", 0); + + string[] appNames = appPath.Substring(0, exeStart).Split('\\'); + string appName = appNames[appNames.Length - 1]; + + System.Diagnostics.Process[] pList = System.Diagnostics.Process.GetProcesses(); + foreach (System.Diagnostics.Process item in pList) + { + if (item.ProcessName.ToUpper().Equals(appName.ToUpper())) + { + item.Kill(); + } + } + } + } +} + diff --git a/FileToolkit/Win32API.cs b/FileToolkit/Win32API.cs new file mode 100644 index 0000000..21c430e --- /dev/null +++ b/FileToolkit/Win32API.cs @@ -0,0 +1,132 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; +using System.Runtime.InteropServices; + +/******************************************************************************** +* 璧勬枡鏀堕泦:Jonny Sun ,www.csframework.com +* ******************************************************************************/ + +namespace HideIcon +{ + /// <summary> + /// 鎿嶄綔Windows绐椾綋,绯荤粺鎵樼洏鎵�鐢ㄧ殑API鍑芥暟 + /// </summary> + public class Win32API + { + public const int WM_USER = 0x400; + public const int WM_CLOSE = 0x10; + public const int WM_GETTEXT = 0x000D; + public const int WM_SETTEXT = 0x000C; + + public const int STANDARD_RIGHTS_REQUIRED = 0xF0000; + public const int SYNCHRONIZE = 0x100000; + public const int PROCESS_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0xFFF; + public const int PROCESS_TERMINATE = 0x1; + + public const int PROCESS_VM_OPERATION = 0x8; + public const int PROCESS_VM_READ = 0x10; + public const int PROCESS_VM_WRITE = 0x20; + + public const int MEM_RESERVE = 0x2000; + public const int MEM_COMMIT = 0x1000; + public const int MEM_RELEASE = 0x8000; + + public const int PAGE_READWRITE = 0x4; + + public const int TB_BUTTONCOUNT = (WM_USER + 24); + public const int TB_HIDEBUTTON = (WM_USER + 4); + public const int TB_GETBUTTON = (WM_USER + 23); + public const int TB_GETBUTTONTEXT = WM_USER + 75; + public const int TB_GETBITMAP = (WM_USER + 44); + public const int TB_DELETEBUTTON = (WM_USER + 22); + public const int TB_ADDBUTTONS = (WM_USER + 20); + public const int TB_INSERTBUTTON = (WM_USER + 21); + public const int TB_ISBUTTONHIDDEN = (WM_USER + 12); + public const int ILD_NORMAL = 0x0; + public const int TPM_NONOTIFY = 0x80; + + public const int WS_VISIBLE = 268435456;//绐椾綋鍙 + public const int WS_MINIMIZEBOX = 131072;//鏈夋渶灏忓寲鎸夐挳 + public const int WS_MAXIMIZEBOX = 65536;//鏈夋渶澶у寲鎸夐挳 + public const int WS_BORDER = 8388608;//绐椾綋鏈夎竟妗� + public const int GWL_STYLE = (-16);//绐椾綋鏍峰紡 + public const int GW_HWNDFIRST = 0; + public const int GW_HWNDNEXT = 2; + public const int SW_HIDE = 0; + public const int SW_SHOW = 5; + + [DllImport("User32.Dll")] + public static extern void GetClassName(IntPtr hwnd, StringBuilder s, int nMaxCount); + + [DllImport("user32.dll", EntryPoint = "SetForegroundWindow", SetLastError = true)] + public static extern void SetForegroundWindow(IntPtr hwnd); + + [DllImport("user32.dll", EntryPoint = "GetDlgItem", SetLastError = true)] + public static extern IntPtr GetDlgItem(int nID, IntPtr phWnd); + + [DllImport("user32.dll", CharSet = CharSet.Auto)] + public static extern int RegisterWindowMessage(string msg); + + [DllImport("kernel32", EntryPoint = "OpenProcess")] + public static extern IntPtr OpenProcess(int dwDesiredAccess, IntPtr bInheritHandle, IntPtr dwProcessId); + + [DllImport("kernel32", EntryPoint = "CloseHandle")] + public static extern int CloseHandle(IntPtr hObject); + + [DllImport("user32", EntryPoint = "GetWindowThreadProcessId")] + public static extern IntPtr GetWindowThreadProcessId(IntPtr hwnd, ref IntPtr lpdwProcessId); + + [DllImport("user32.dll")] + public static extern bool PostMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam); + + [DllImport("user32", EntryPoint = "SendMessage")] + public static extern int SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + + [DllImport("user32", EntryPoint = "SendMessage")] + public static extern int SendMessage(IntPtr hwnd, int wMsg, int wParam, IntPtr lParam); + + [DllImport("kernel32", EntryPoint = "ReadProcessMemory")] + public static extern int ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, ref IntPtr lpBuffer, int nSize, int lpNumberOfBytesWritten); + + [DllImport("kernel32.dll", EntryPoint = "ReadProcessMemory")] + public static extern bool ReadProcessMemoryEx(IntPtr hProcess, IntPtr lpBaseAddress, IntPtr lpBuffer, int nSize, ref uint vNumberOfBytesRead); + + [DllImport("kernel32", EntryPoint = "ReadProcessMemory")] + public static extern int ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, int nSize, int lpNumberOfBytesWritten); + + [DllImport("kernel32", EntryPoint = "WriteProcessMemory")] + public static extern int WriteProcessMemory(IntPtr hProcess, ref int lpBaseAddress, ref int lpBuffer, int nSize, ref int lpNumberOfBytesWritten); + + [DllImport("kernel32", EntryPoint = "VirtualAllocEx")] + public static extern IntPtr VirtualAllocEx(IntPtr hProcess, int lpAddress, int dwSize, int flAllocationType, int flProtect); + + [DllImport("kernel32", EntryPoint = "VirtualFreeEx")] + public static extern int VirtualFreeEx(IntPtr hProcess, IntPtr lpAddress, int dwSize, int dwFreeType); + + [DllImport("User32.dll")] + public extern static int GetWindow(int hWnd, int wCmd); + + [DllImport("User32.dll")] + public extern static int GetWindowLongA(int hWnd, int wIndx); + + [DllImport("user32.dll")] + public static extern bool GetWindowText(int hWnd, StringBuilder title, int maxBufSize); + + [DllImport("user32.dll", CharSet = CharSet.Auto)] + public extern static int GetWindowTextLength(IntPtr hWnd); + + [DllImport("User32.dll", EntryPoint = "FindWindow")] + public static extern IntPtr FindWindow(string lpClassName, string lpWindowName); + + [DllImport("user32.dll", EntryPoint = "FindWindowEx", SetLastError = true)] + public static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow); + + [DllImport("user32.dll", EntryPoint = "ShowWindow", SetLastError = true)] + public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); + + [DllImport("user32.dll", EntryPoint = "SendMessageA")] + public static extern int SendMessage(IntPtr hwnd, int wMsg, IntPtr wParam, IntPtr lParam); + + } +} diff --git a/HalconTools/CalibrationModule/CalibImage.cs b/HalconTools/CalibrationModule/CalibImage.cs new file mode 100644 index 0000000..300d0a6 --- /dev/null +++ b/HalconTools/CalibrationModule/CalibImage.cs @@ -0,0 +1,285 @@ +锘縰sing System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using HalconDotNet; + +namespace HalconTools +{ + public class CalibImage + { + /// <summary> + /// Reference to the controller class that performs all + /// calibration operations and interacts with the GUI. + /// </summary> + private CalibrationAssistant mAssistant; + /// <summary>Calibration image</summary> + private HImage mImage; + /// <summary> + /// Width of calibration image + /// </summary> + public int mWidth; + /// <summary> + /// Height of calibration image + /// </summary> + public int mHeight; + + + /// <summary> + /// Tuple with row coordinates of the detected marks + /// </summary> + private HTuple mMarkCenterRows; + /// <summary> + /// Tuple with column coordinates of the detected marks + /// </summary> + private HTuple mMarkCenterCols; + + private HTuple mWorldX; + private HTuple mWorldY; + + /// <summary> + /// Estimation for the external camera parameters (position and + /// orientation) + /// </summary> + private HPose mEstimatedPose; + + + /// <summary> + /// HALCON error message that occurs when calculating the + /// basic information for the calibration image + /// (plate region, marks and pose). + /// </summary> + public string mErrorMessage; + /// <summary> + /// Flag that describes the degree of success or failure + /// after an update of the basic information. + /// </summary> + public string mPlateStatus; + /// <summary> + /// Flag that permits or forbids this calibration image + /// to be part of the calibration process + /// </summary> + public int mCanCalib; // true = 0 || false = 1 + + + /// <summary> + /// Region of the plane calibration plate in the calibration image + /// </summary> + private HRegion mCaltabRegion; + /// <summary> + /// XLD contour points of the marks detected in + /// the calibration image, generated from the row and + /// column values <c>mMarkCenterRows</c> and + /// <c>mMarkCenterCols</c> + /// </summary> + private HXLDCont mMarkCenter; + /// <summary> + /// Estimated world coordinate system (pose of the calibration plate + /// in camera coordinates), based on the + /// <c>mEstimatedPose</c> and the camera parameters + /// for this calibration image + /// </summary> + private HObject mEstimatedWCS; + + private double mEstimatedPlateSize; + + // for quality measurement + private ArrayList mQualityIssuesList; + + /// <summary> + /// Initializes all status flags and objects to set up + /// this image for the calibration process + /// </summary> + /// <param name="img">Calibration image</param> + /// <param name="assist">Reference to the Calibration Assistant</param> + public CalibImage(HImage img, CalibrationAssistant assist) + { + string tmp; + mImage = img; + + mAssistant = assist; + mCanCalib = 1; //labeled as 'for not having been evaluated' + mPlateStatus = CalibrationAssistant.PS_NOT_FOUND;// "No Plate found" yet + mImage.GetImagePointer1(out tmp, out mWidth, out mHeight); + mEstimatedPlateSize = 0; + mErrorMessage = ""; + + // initialize all instances + mCaltabRegion = new HRegion(); + mMarkCenter = new HXLDCont(); + mEstimatedWCS = new HObject(); + mQualityIssuesList = new ArrayList(15); + + mMarkCenterRows = new HTuple(); + mMarkCenterCols = new HTuple(); + mEstimatedPose = new HPose(); + } + + + /************** getter-methods *************/ + /********************************************/ + public HImage getImage() + { + return mImage; + } + + public HTuple getMarkCenterRows() + { + return mMarkCenterRows; + } + public HTuple getMarkCenterColumns() + { + return mMarkCenterCols; + } + public HTuple getWorldX() + { + return mWorldX; + } + public HTuple getWorldY() + { + return mWorldY; + } + public HXLDCont getMarkCenters() + { + return mMarkCenter; + } + public HTuple getEstimatedPose() + { + return mEstimatedPose; + } + public HObject getEstimatedWCS() + { + return mEstimatedWCS; + } + public double getEstimatedPlateSize() + { + return mEstimatedPlateSize; + } + public HObject getCaltabRegion() + { + return mCaltabRegion; + } + public ArrayList getQualityIssueList() + { + return mQualityIssuesList; + } + public string getPlateStatus() + { + return mPlateStatus; + } + + + + /// <summary> + /// Determine s(or updates) the basic information for this + /// calibration image, which are the values for the region + /// plate, the center marks, and the estimated pose. + /// The flag <c>mPlateStatus</c> describes the evaluation + /// of the computation process. + /// If desired the quality assessment can be recalculated + /// as well. + /// </summary> + /// <param name="updateQuality"> + /// Triggers the recalculation of the quality assessment for + /// this calibration image + /// </param> + public void UpdateCaltab(bool updateQuality) + { + HTuple unit = new HTuple("mm"); + + bool failed = false; + QualityProcedures proc = new QualityProcedures(); + string descrFile; + HTuple startCamp; + mErrorMessage = ""; + + + mCaltabRegion.Dispose(); + mMarkCenter.Dispose(); + mEstimatedWCS.Dispose(); + + //reset this variable + mMarkCenterRows = new HTuple(); + + mPlateStatus = CalibrationAssistant.PS_NOT_FOUND; + + descrFile = mAssistant.getDesrcFile(); + + try + { + mCaltabRegion = mImage.FindCaltab(descrFile, + (int)mAssistant.mFilterSize, + (int)mAssistant.mMarkThresh, + (int)mAssistant.mMinMarkDiam); + + mPlateStatus = CalibrationAssistant.PS_MARKS_FAILED; + + //-- Quality issue measurements -- + if (updateQuality) + { + mQualityIssuesList.Clear(); + failed = mAssistant.testQualityIssues(this); + } + + startCamp = mAssistant.getCameraParams(this); + mMarkCenterRows = mImage.FindMarksAndPose(mCaltabRegion, + descrFile, + startCamp, + (int)mAssistant.mInitThresh, + (int)mAssistant.mThreshDecr, + (int)mAssistant.mMinThresh, + mAssistant.mSmoothing, + mAssistant.mMinContLength, + mAssistant.mMaxMarkDiam, + out mMarkCenterCols, + out mEstimatedPose); + + + mMarkCenter.GenCrossContourXld(mMarkCenterRows, + mMarkCenterCols, + new HTuple(6.0), + 0.785398); + + if (failed) + mAssistant.addQualityIssue(this, CalibrationAssistant.QUALITY_ISSUE_FAILURE, 0.0); + + + HOperatorSet.ImagePointsToWorldPlane(startCamp, mEstimatedPose, + mMarkCenterRows, mMarkCenterCols, + unit, out mWorldX, out mWorldY); + mEstimatedPlateSize = HMisc.DistancePp(mWorldY[0].D, mWorldX[0].D, + mWorldY[1].D, mWorldX[1].D); + mEstimatedPlateSize *= 10.0; + proc.get_3d_coord_system(mImage, out mEstimatedWCS, + startCamp, mEstimatedPose, + new HTuple(mEstimatedPlateSize / 2.0)); + + mPlateStatus = mQualityIssuesList.Count > 0 ? CalibrationAssistant.PS_QUALITY_ISSUES : CalibrationAssistant.PS_OK; // "Quality Issues found": "OK"; + mCanCalib = 0; + } + catch (HOperatorException e) + { + this.mErrorMessage = e.Message; + mCanCalib = 1; + + /* if exception was raised due to lack of memory, + * forward the error to the calling method */ + if (e.Message.IndexOf("not enough") != -1) + throw (e); + } + } + + + /// <summary> + /// Releases the memory for all iconic HALCON objects contained in + /// this instance. + /// </summary> + public void Clear() + { + mImage.Dispose(); + mCaltabRegion.Dispose(); + } + + } +} diff --git a/HalconTools/CalibrationModule/CalibrationAssistant.cs b/HalconTools/CalibrationModule/CalibrationAssistant.cs new file mode 100644 index 0000000..7b136ac --- /dev/null +++ b/HalconTools/CalibrationModule/CalibrationAssistant.cs @@ -0,0 +1,1751 @@ +锘縰sing System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using HalconDotNet; + +namespace HalconTools +{ + public delegate void CalibDelegate(int value); + + public class CalibrationAssistant + { + /// <summary> + /// Constant indicating the camera model to be of type + /// line scan camera. + /// </summary> + public const int CAMERA_TYP_LINE_SCAN = 3; + /// <summary> + /// Constant indicating the camera model to be of type + /// area scan camera with the division + /// model to describe the lens distortions + /// </summary> + public const int CAMERA_TYP_AREA_SCAN_DIV = 4; + /// <summary> + /// Constant indicating the camera model to be of type + /// area scan camera with the polynomial + /// model to describe the lens distortions + /// </summary> + public const int CAMERA_TYP_AREA_SCAN_POLY = 5; + + /// <summary> + /// Constant indicating a change in the set of + /// <c>CalibImage</c> instances regarding the parameters + /// marks and poses. + /// </summary> + public const int UPDATE_MARKS_POSE = 10; + /// <summary> + /// Constant indicating a change in the set of + /// <c>CalibImage</c> instances regarding the + /// quality assessment. + /// </summary> + public const int UPDATE_QUALITY_TABLE = 12; + /// <summary> + /// Constant indicating a change in the evaluation grades + /// of the <c>CalibImage</c> set. The grades measure the results + /// of the calibration preparations prior to the calibration + /// process itself. + /// </summary> + public const int UPDATE_CALTAB_STATUS = 13; + /// <summary> + /// Constant indicating an update of the calibration + /// results. + /// </summary> + public const int UPDATE_CALIBRATION_RESULTS = 14; + + /// <summary> + /// Constant indicating that the quality measurement + /// includes all quality assessment operators for + /// evaluating the set of calibration images. + /// </summary> + public const int QUALITY_ISSUE_TEST_ALL = 0; + /// <summary> + /// Constant indicating that the quality measurement uses only the + /// basic quality assessment operators for speedup purposes. + /// </summary> + public const int QUALITY_ISSUE_TEST_QUICK = 1; + /// <summary> + /// Constant indicating no quality measurement + /// for the set of calibration images. + /// </summary> + public const int QUALITY_ISSUE_TEST_NONE = 2; + + /// <summary> + /// Constant indicating the image quality feature 'exposure' + /// </summary> + public const int QUALITY_ISSUE_IMG_EXPOSURE = 20; + /// <summary> + /// Constant indicating the image quality feature 'homogeneity' + /// </summary> + public const int QUALITY_ISSUE_IMG_HOMOGENEITY = 21; + /// <summary> + /// Constant indicating the image quality feature 'contrast' + /// </summary> + public const int QUALITY_ISSUE_IMG_CONTRAST = 22; + /// <summary> + /// Constant indicating the image quality feature 'sharpness' + /// </summary> + public const int QUALITY_ISSUE_IMG_FOCUS = 23; + /// <summary> + /// Constant indicating the size of the depicted + /// calibration plate in the calibration image, to evaluate + /// the distance used to the camera + /// </summary> + public const int QUALITY_ISSUE_IMG_CALTAB_SIZE = 24; + + /// <summary> + /// Constant indicating the coverage of the view field. + /// This is assured only by a sufficient number of + /// calibration images and its correct distribution in the space. + /// </summary> + public const int QUALITY_ISSUE_SEQ_MARKS_DISTR = 25; + /// <summary> + /// Constant indicating the amount of distortions covered, + /// described by the set of images showing tilted calibration + /// plates + /// </summary> + public const int QUALITY_ISSUE_SEQ_CALTAB_TILT = 26; + /// <summary> + /// Constant indicating whether the number of provided calibration + /// images is sufficient enough to obtain stable calibration results. + /// </summary> + public const int QUALITY_ISSUE_SEQ_NUMBER = 27; + /// <summary> + /// Constant indicating the all over quality performance, + /// being best for a value close or equal to 1 + /// </summary> + public const int QUALITY_ISSUE_SEQ_ALL_OVER = 28; + /// <summary> + /// Constant that indicates an error in the calibration + /// preprocessing step, which has to perform well for the + /// whole sequence of calibration images in order to start + /// the calibration process. + /// </summary> + public const int QUALITY_ISSUE_SEQ_ERROR = 29; + /// <summary> + /// Constant indicating an error in the preprocessing step + /// for a single calibration image, i.e., that the + /// marks and pose values might be missing or the region + /// plate couldn't be detected + /// </summary> + public const int QUALITY_ISSUE_FAILURE = 30; + + /// <summary> + /// Constant describing an error while reading a + /// calibration image from file + /// </summary> + public const int ERR_READING_FILE = 31; + /// <summary> + /// Constant describing an error exception raised during + /// the calibration process + /// </summary> + public const int ERR_IN_CALIBRATION = 32; + /// <summary> + /// Constant indicating an invalid reference index. The + /// index is needed to define the reference image for + /// the camera calibration. + /// </summary> + public const int ERR_REFINDEX_INVALID = 33; + /// <summary> + /// Constant describing an error exception raised + /// during quality assessment. + /// </summary> + public const int ERR_QUALITY_ISSUES = 34; + /// <summary> + /// Constant describing an error that occurred while + /// writing the calibration parameters into file + /// </summary> + public const int ERR_WRITE_CALIB_RESULTS = 35; + + + /// <summary> + /// Constant indicating the result status of the + /// calibration preparation step: + /// Plate region couldn't be detected in the + /// calibration image. + /// </summary> + public const string PS_NOT_FOUND = "Plate not found"; + /// <summary> + /// Constant that describes the results of the + /// calibration preparation step: + /// Plate region was detected, but the marks could not + /// be extracted in the plate region. + /// </summary> + public const string PS_MARKS_FAILED = "Marks not found"; + /// <summary> + /// Constant indicating the result status of the + /// calibration preparation step: + /// Plate region and marks were detected, + /// but the quality assessment delivered bad scores. + /// </summary> + public const string PS_QUALITY_ISSUES = "Quality issues detected"; + /// <summary> + /// Constant indicating the result status of the + /// calibration preparation step: + /// The preprocessing step was successful. + /// </summary> + public const string PS_OK = "Ok"; + + /// <summary> + /// List of calibration images that are used + /// to perform the camera calibration. + /// </summary> + private ArrayList CalibData; + /// <summary> + /// Index to the reference image that is used to + /// determine the initial values for the internal camera + /// parameters for the camera calibration + /// </summary> + public int mReferenceIndex; + + private QualityProcedures procedure; + + + // CALIBRATION RESULTS ----------------------------------------- + /// <summary> + /// Flag indicating that the calibration was successful and + /// the present calibration results are up to date + /// </summary> + public bool mCalibValid; + /// <summary> + /// The average error give an impression of the accuracy of the + /// calibration. The error (deviations in x and y coordinates) are + /// measured in pixels + /// </summary> + public double mErrorMean; + + /// <summary> + /// Ordered tuple with the external camera parameters for all + /// calibration images, i.e., the position and orientation of the + /// calibration plate in camera coordinates. + /// </summary> + public HTuple mPoses; + /// <summary> + /// Internal camera parameters + /// </summary> + public HTuple mCameraParams; + /// <summary> + /// Error contents that caused an exception + /// </summary> + public string mErrorMessage; + + /// <summary> + /// Calibration image at index <c>mReferenceIndex</c> + /// </summary> + public HImage mReferenceImage; + /// <summary> + /// Synthetic calibration images with calibrated camera + /// parameters to test the quality of the calibration + /// algorithm + /// </summary> + public HImage mSimulatedImage; + /// <summary> + /// Reference world coordinate system, based on + /// <c>mPose</c> and the calibrated camera parameters + /// </summary> + public HObject mReferenceWCS; + + /// <summary> + /// Flag describing whether all calibration images + /// have a sufficient quality, i.e. whether the region plate and + /// marks have been detected in all calibration images, + /// so that a camera calibration can be invoked + /// </summary> + public bool mCanCalib; + /// <summary> + /// Flag indicating that the origin of the reference world coordinate + /// system <c>mReferenceWCS</c> is mapped to the origin of the image + /// coordinate system. + /// </summary> + public bool mAtImgCoord; + + + // FIRST TAB ----------------------------------------------- + /// <summary> + /// Name of the calibration plate description file to read + /// the mark center points from + /// </summary> + public string mDescrFileName; + /// <summary> + /// Thickness of the calibration plate that was used in the + /// calibration images + /// </summary> + public double mThickness; + /// <summary> + /// Camera type, which can either be an area scan camera + /// (using the division or polynomial model) or a linescan camera + /// </summary> + public int mCameraType; + /// <summary> + /// Horizontal distance between two neighboring CCD + /// sensor cells + /// </summary> + public double mCellWidth; // Sx + /// <summary> + /// Vertical distance between two neighboring CCD + /// sensor cells + /// </summary> + public double mCellHeight; // Sy + /// <summary> + /// Nominal focal length of the camera lense + /// </summary> + public double mFocalLength; + /// <summary> + /// Parameter to model the radial distortion described by + /// the division model + /// </summary> + public double mKappa; + /// <summary> + /// First parameter to model the radial distortion described by + /// the polynomial model + /// </summary> + public double mK1; + /// <summary> + /// Second parameter to model the radial distortion described by + /// the polynomial model + /// </summary> + public double mK2; + /// <summary> + /// Third parameter to model the radial distortion described by + /// the polynomial model + /// </summary> + public double mK3; + /// <summary> + /// First parameter to model the decentering distortion described by + /// the polynomial model + /// </summary> + public double mP1; + /// <summary> + /// Second parameter to model the decentering distortion described by + /// the polynomial model + /// </summary> + public double mP2; + /// <summary> + /// Flag indicating the type of camera lense used: + /// telecentric, which means a parallel projection with the focal + /// length equal to 0, or a perspective projection + /// </summary> + public bool isTelecentric; + + /// <summary> + /// X component of the motion vector, which describes the motion + /// between the linescan camera and the object. + /// </summary> + public double mMotionVx; + /// <summary> + /// Y component of the motion vector, which describes the motion + /// between the linescan camera and the object. + /// </summary> + public double mMotionVy; + /// <summary> + /// Z component of the motion vector, which describes the motion + /// between the linescan camera and the object. + /// </summary> + public double mMotionVz; + + // SECOND TAB --------------------------------------------- + private int mWarnLevel; + private int mImageTests; + private int mSequenceTests; + + /// <summary> + /// List of quality assessment scores of the whole set of calibration + /// images. + /// </summary> + public ArrayList mSeqQualityList; + + /// <summary> + /// Size of the filter mask that is used to smooth the + /// image before determining the region plate in the + /// calibration image + /// </summary> + public double mFilterSize; + /// <summary> + /// Threshold value for mark extraction + /// </summary> + public double mMarkThresh; + /// <summary> + /// Expected minimum diameter of the marks on the + /// calibration plate + /// </summary> + public double mMinMarkDiam; + /// <summary> + /// Initial threshold value for contour detection + /// </summary> + public double mInitThresh; + /// <summary> + /// Loop value for successive reduction of + /// the initial threshold <c>mInitThresh</c> + /// </summary> + public double mThreshDecr; + /// <summary> + /// Minimum threshold for contour detection + /// </summary> + public double mMinThresh; + /// <summary> + /// Filter parameter for contour detection + /// </summary> + public double mSmoothing; + /// <summary> + /// Minimum length of the contours of the marks + /// </summary> + public double mMinContLength; + /// <summary> + /// Maximum expected diameter of the marks + /// </summary> + public double mMaxMarkDiam; + + // reset vals + public int resetFilterSize = 9; + public int resetMarkThresh = 180; + public int resetMinMarkDiam = 5; + public int resetInitThresh = 128; + public int resetThreshDecr = 10; + public int resetMinThresh = 18; + public double resetSmoothing = 0.9; /* 90*0.01 */ + public int resetMinContL = 15; + public int resetMaxMarkDiam = 500; + + /// <summary> + /// Delegate to notify the GUI about changes in the data models + /// </summary> + public CalibDelegate NotifyCalibObserver; + + + /* Constructor, in which all calibration parameters + * and auxiliary variables, flags and lists are initilized */ + public CalibrationAssistant() + { + CalibData = new ArrayList(15); + mReferenceIndex = -1; + mDescrFileName = "caltab_10mm.descr"; + mCalibValid = false; + mCanCalib = true; + mAtImgCoord = false; + + mReferenceImage = new HImage(); + mSimulatedImage = new HImage(); + + mFilterSize = resetFilterSize; + mMarkThresh = resetMarkThresh; + mMinMarkDiam = resetMinMarkDiam; + mInitThresh = resetInitThresh; + mThreshDecr = resetThreshDecr; + mMinThresh = resetMinThresh; + mSmoothing = resetSmoothing; + mMinContLength = resetMinContL; + mMaxMarkDiam = resetMaxMarkDiam; + + mWarnLevel = 70; + mImageTests = QUALITY_ISSUE_TEST_ALL; + mSequenceTests = QUALITY_ISSUE_TEST_ALL; + mSeqQualityList = new ArrayList(15); + procedure = new QualityProcedures(); + + + mThickness = 1.00; // millimeter + mCameraType = CAMERA_TYP_AREA_SCAN_DIV; + mCellWidth = 8.300; // micrometer + mCellHeight = 8.300; // micrometer + mFocalLength = 8.000; // millimeter + isTelecentric = false; + mKappa = 0.0; + mK1 = 0.0; + mK2 = 0.0; + mK3 = 0.0; + mP1 = 0.0; + mP2 = 0.0; + mMotionVx = 0.0; + mMotionVy = 500.0; + mMotionVz = 0.0; + + NotifyCalibObserver = new CalibDelegate(dummy); + } + + /*******************************************/ + /********** Tab.1 ************/ + /*******************************************/ + + /// <summary> + /// Sets the reference index to the supplied value + /// </summary> + public void setReferenceIdx(int val) + { + mReferenceIndex = val; + } + + /*******************************************/ + + /// <summary> + /// Sets the file path for the description file to + /// the supplied value + /// </summary> + /// <param name="fileName"> + /// Absolute path to the description file + /// </param> + public void setDesrcFile(string fileName) + { + mDescrFileName = fileName; + Update(); + } + /// <summary> + /// Gets the path to the description file used + /// with the calibration + /// </summary> + public string getDesrcFile() + { + return mDescrFileName; + } + + /*******************************************/ + + /// <summary> + /// Sets the thickness parameter to the supplied value + /// </summary> + public void setThickness(double val) + { + mThickness = val; + UpdateResultVisualization(); + } + /// <summary> + /// Returns the current value for the thickness of the calibration + /// plate. + /// </summary> + public double getThickness() + { + return mThickness; + } + + /*******************************************/ + + /// <summary> + /// Sets the camera type to the supplied value and + /// invokes an update to adjust data for the calibration images. + /// + /// </summary> + public void setCameraType(int mode) + { + mCameraType = mode; + Update(true); + } + /// <summary> + /// Returns the current camera type. + /// </summary> + public int getCameraType() + { + return mCameraType; + } + + /*******************************************/ + + /// <summary> + /// Sets the parameter for the CCD sensor cell width + /// to the supplied value. + /// </summary> + public void setCellWidth(double val) + { + mCellWidth = val; + Update(); + } + /// <summary> + /// Returns the value for the CCD sensor cell width + /// </summary> + public double getCellWidth() + { + return mCellWidth; + } + + /*******************************************/ + + /// <summary> + /// Sets the parameter for the CCD sensor cell height + /// to the supplied value. + /// </summary> + public void setCellHeight(double val) + { + mCellHeight = val; + Update(); + } + /// <summary> + /// Returns the value for the CCD sensor cell height + /// </summary> + public double getCellHeight() + { + return mCellHeight; + } + + /*******************************************/ + + /// <summary> + /// Sets the parameter for the focal length to the + /// supplied value + /// </summary> + public void setFocalLength(double val) + { + mFocalLength = val; + Update(); + } + /// <summary> + /// Returns the current value for the focal length + /// </summary> + public double getFocalLength() + { + return mFocalLength; + } + + /*******************************************/ + + /// <summary> + /// Sets the boolean flag to indicate the use of telecentric + /// lense + /// </summary> + public void setIsTelecentric(bool val) + { + isTelecentric = val; + Update(); + } + /// <summary> + /// Returns whether the current camera lense is defined to + /// be telecentric or not + /// </summary> + public bool IsTelecentric() + { + return isTelecentric; + } + + /*******************************************/ + + /// <summary> + /// Sets the motion vector Vx to the supplied + /// value + /// </summary> + public void setMotionX(double val) + { + mMotionVx = val; + Update(); + } + /// <summary> + /// Gets the current value for the motion vector Vx + /// </summary> + public double getMotionX() + { + return mMotionVx; + } + + /*******************************************/ + + /// <summary> + /// Sets the motion vector Vy to the supplied + /// value + /// </summary> + public void setMotionY(double val) + { + mMotionVy = val; + Update(); + } + /// <summary> + /// Gets the current value for the motion vector Vy + /// </summary> + public double getMotionY() + { + return mMotionVy; + } + + /*******************************************/ + + /// <summary> + /// Sets the motion vector Vz to the supplied + /// value + /// </summary> + public void setMotionZ(double val) + { + mMotionVz = val; + Update(); + } + /// <summary> + /// Gets the current value for the motion vector Vz + /// </summary> + public double getMotionZ() + { + return mMotionVz; + } + + /*******************************************/ + /********** Tab.2 ************/ + /*******************************************/ + /*******************************************/ + + /// <summary> + /// Sets the parameter for the warn level to + /// the supplied value. + /// </summary> + public void setWarnLevel(int val) + { + mWarnLevel = val; + Update(true); + } + /// <summary> + /// Gets the current value for the warn level + /// </summary> + public double getWarnLevel() + { + return mWarnLevel; + } + + /*******************************************/ + + /// <summary> + /// Sets the parameter to define the mode (accuracy) of + /// the quality assessment for single + /// calibration images + /// </summary> + /// <param name="mode"> + /// mode (accuracy) of the quality assessment; one of the constants + /// starting with QUALITY_ISSUE_TEST_*. + /// </param> + public void setImageTests(int mode) + { + mImageTests = mode; + Update(true); + } + /// <summary> + /// Gets the current value that describes the + /// accuracy of the quality assessment + /// </summary> + public double getImageTests() + { + return mImageTests; + } + + /*******************************************/ + + /// <summary> + /// Sets the parameter to define the mode (accuracy) of + /// the quality assessment for the whole sequence + /// of calibration images + /// </summary> + /// <param name="mode"> + /// mode (accuracy) of the quality assessment; one of the constants + /// starting with QUALITY_ISSUE_TEST_*. + /// </param> + public void setSequenceTests(int mode) + { + mSequenceTests = mode; + Update(true); + } + /// <summary> + /// Gets the current value that describes the + /// accuracy of the quality assessment + /// </summary> + public double getSequenceTests() + { + return mSequenceTests; + } + + /*******************************************/ + + /// <summary> + /// Sets the parameter for the filter size to + /// the supplied value. + /// </summary> + public void setFilterSize(double val) + { + mFilterSize = val; + Update(); + } + /// <summary> + /// Gets the current value for the parameter + /// describing the filter size + /// </summary> + public double getFilterSize() + { + return mFilterSize; + } + + /*******************************************/ + + /// <summary> + /// Sets the parameter for mark threshold to + /// the supplied value. + /// </summary> + public void setMarkThresh(double val) + { + mMarkThresh = val; + Update(); + } + /// <summary> + /// Gets the current value for the parameter + /// describing the mark threshold + /// </summary> + public double getMarkThresh() + { + return mMarkThresh; + } + + /*******************************************/ + + /// <summary> + /// Sets the parameter for the minimum mark + /// diameter to the supplied value. + /// </summary> + public void setMinMarkDiam(double val) + { + mMinMarkDiam = val; + Update(); + } + /// <summary> + /// Gets the current value for the parameter + /// describing the minimum mark diameter + /// </summary> + public double getMinMarkDiam() + { + return mMinMarkDiam; + } + + /*******************************************/ + + /// <summary> + /// Sets the parameter for the start threshold + /// to the supplied value. + /// </summary> + public void setInitThresh(double val) + { + mInitThresh = val; + Update(); + } + /// <summary> + /// Gets the current value for the parameter + /// describing the start threshold + /// </summary> + public double getInitThresh() + { + return mInitThresh; + } + + /*******************************************/ + + /// <summary> + /// Sets the parameter for the threshold + /// decrement to the supplied value. + /// </summary> + public void setThreshDecr(double val) + { + mThreshDecr = val; + Update(); + } + /// <summary> + /// Gets the current value for the parameter + /// describing the threshold decrement + /// </summary> + public double getThreshDecr() + { + return mThreshDecr; + } + + /*******************************************/ + + /// <summary> + /// Sets the parameter for the minimum + /// threshold to the supplied value. + /// </summary> + public void setMinThresh(double val) + { + mMinThresh = val; + Update(); + } + /// <summary> + /// Gets the current value for the parameter + /// describing the minimum threshold + /// </summary> + public double getMinThresh() + { + return mMinThresh; + } + + /*******************************************/ + + /// <summary> + /// Sets the parameter describing the smoothing + /// factor to the supplied value. + /// </summary> + public void setSmoothing(double val) + { + mSmoothing = val; + Update(); + } + /// <summary> + /// Gets the parameter describing the smoothing + /// factor + /// </summary> + public double getSmoothing() + { + return mSmoothing; + } + + /*******************************************/ + + /// <summary> + /// Sets the parameter describing the minimum + /// contour length to the supplied value. + /// </summary> + public void setMinContLength(double val) + { + mMinContLength = val; + Update(); + } + /// <summary> + /// Gets the parameter describing the minimum + /// contour length + /// </summary> + public double getMinContLength() + { + return mMinContLength; + } + + /*******************************************/ + + /// <summary> + /// Sets the parameter describing the maximum + /// mark diameter to the supplied value. + /// </summary> + public void setMaxMarkDiam(double val) + { + mMaxMarkDiam = val; + Update(); + } + /// <summary> + /// Gets the parameter describing the maximum + /// mark diameter + /// </summary> + public double getMaxMarkDiam() + { + return mMaxMarkDiam; + } + + /*******************************************/ + + /// <summary> + /// Sets the flag defining the origin of + /// the reference world coordinate system + /// to be in the image coordinate system + /// </summary> + public void setAtImgCoord(bool val) + { + mAtImgCoord = val; + UpdateResultVisualization(); + + } + /// <summary> + /// Gets the current value for the flag + /// </summary> + public bool getAtImgCoord() + { + return mAtImgCoord; + } + + + public void dummy(int val) { } + + /*******************************************/ + /*******************************************/ + /*******************************************/ + /*******************************************/ + + /// <summary> + /// Gets the calibration image for the index <c>i</c> + /// from the list <c>CalibData</c> + /// </summary> + public CalibImage getCalibDataAt(int i) + { + if (CalibData.Count > 0) + return (CalibImage)CalibData[i]; + else + return null; + } + + public int getCalibDataLength() + { + return CalibData.Count; + } + + /// <summary> + /// Add a new calibration image to the list <c>CalibData</c>. + /// The image is read from the location <c>filename</c> + /// and a new calibration image instance is then + /// generated, embedding this image. + /// As a preparation step prior to the calibration process, the + /// basic information for the calibration image are determined, + /// in terms of: detection of the region plate and the marks + /// and pose. + /// </summary> + /// <returns> + /// Instance of a calibration image model created for + /// the calibration image, supplied by <c>filename</c> + /// </returns> + public CalibImage addImage(string filename) + { + HImage image = null; + CalibImage data = null; + + try + { + image = new HImage(filename); + data = new CalibImage(image, this); + CalibData.Add(data); + data.UpdateCaltab(true); + mCanCalib = (mCanCalib && (data.mCanCalib == 0)); + mCalibValid = false; + } + catch (HOperatorException e) + { + mErrorMessage = e.Message; + NotifyCalibObserver(CalibrationAssistant.ERR_READING_FILE); + } + + return data; + } + + /// <summary> + /// Removes the instance of the calibration images + /// at the index <c>index</c> from the list <c>CalibData</c> + /// </summary> + public void removeImage(int index) + { + ((CalibImage)CalibData[index]).Clear(); + CalibData.RemoveAt(index); + mCalibValid = false; + getCanCalibrate(); + NotifyCalibObserver(CalibrationAssistant.UPDATE_CALIBRATION_RESULTS); + } + + /// <summary> + /// Removes all instances of the calibration images + /// from the list <c>CalibData</c> + /// </summary> + public void removeImage() + { + int count = CalibData.Count; + for (int i = 0; i < count; i++) + ((CalibImage)CalibData[i]).Clear(); + + CalibData.Clear(); + mCalibValid = false; + mCanCalib = false; + NotifyCalibObserver(CalibrationAssistant.UPDATE_CALIBRATION_RESULTS); + } + + /// <summary> + /// Gets the HALCON image with the index <c>index</c> in the list of + /// calibration images <c>CalibData</c>. + /// </summary> + public HImage getImageAt(int index) + { + if (CalibData.Count > 0) + return ((CalibImage)CalibData[index]).getImage(); + return null; + } + + /// <summary> + /// Resets the flag <c>mCanCalib</c> to the boolean 'true' + /// </summary> + public void resetCanCalib() + { + mCanCalib = true; + } + + /// <summary> + /// Returns the reference image for the calibration process + /// </summary> + public HImage getRefImage() + { + return (HImage)mReferenceImage; + } + + /// <summary> + /// Returns the simulated image obtained from + /// the calibration process + /// </summary> + public HImage getSimulatedImage() + { + return mSimulatedImage; + } + + /// <summary> + /// Returns the reference world coordinate system + /// obtained from the calibration process + /// </summary> + /// <returns></returns> + public HObject getReferenceWCS() + { + return mReferenceWCS; + } + + /*******************************************/ + + /// <summary> + /// Auxiliary method prior to the actual update + /// routine. Calls the actual update method + /// omitting the quality assessment for the + /// set of calibration image models. + /// </summary> + public void Update() + { + bool doQuality = false; + Update(doQuality); + } + + /// <summary> + /// Updates the data of the calibration images + /// if a change occurred in the calibration parameters. + /// The quality assessment is performed if the + /// supplied value is positive; otherwise, it is omited. + /// </summary> + /// <param name="doQuality"> + /// If the flag is positive, an update of the + /// quality assessment is invoked, otherwise not. + /// </param> + public void Update(bool doQuality) + { + int count; + + if ((count = CalibData.Count) == 0) + return; + + try + { + for (int i = 0; i < count; i++) + ((CalibImage)CalibData[i]).UpdateCaltab(doQuality); + + if (doQuality) + UpdateSequenceIssues(); + + + mCanCalib = getCanCalibrate(); + + NotifyCalibObserver(CalibrationAssistant.UPDATE_CALTAB_STATUS); + NotifyCalibObserver(CalibrationAssistant.UPDATE_MARKS_POSE); + + if (doQuality) + NotifyCalibObserver(CalibrationAssistant.UPDATE_QUALITY_TABLE); + } + catch (HOperatorException e) + { + mErrorMessage = (string)e.Message; + mCanCalib = false; + NotifyCalibObserver(CalibrationAssistant.ERR_QUALITY_ISSUES); + } + + if (mCalibValid) + { + mCalibValid = false; + NotifyCalibObserver(CalibrationAssistant.UPDATE_CALIBRATION_RESULTS); + } + } + + /*******************************************/ + + /// <summary> + /// Checks the whole set of calibration image models for + /// the quality of the preprocessing step. If the basic + /// information, i.e. the region plate and the marks + /// and pose, was extracted in all images, then the + /// flag <c>mCanCalib</c> is positive, which means + /// the actual calibration process can be initiated + /// </summary> + /// <returns> + /// Flag indicating the feasibility of the calibration + /// process + /// </returns> + public bool getCanCalibrate() + { + int count = CalibData.Count; + int val = 0; + + for (int i = 0; i < count; i++) + val += ((CalibImage)CalibData[i]).mCanCalib; + + if (val == 0 && count > 0) + mCanCalib = true; + else + mCanCalib = false; + + return mCanCalib; + } + + /// <summary> + /// Gets the mark centers and the poses extracted from + /// the set of calibration images + /// </summary> + /// <param name="rows"> + /// Tuple of row coordinates of all marks from + /// the entire set of calibration images + /// </param> + /// <param name="cols"> + /// Tuple of column coordinates of all marks from + /// the entire set of calibration images + /// </param> + /// <returns> + /// Tuple of estimated poses for the entire set + /// of calibration images + /// </returns> + public HTuple getCalibrationData(out HTuple rows, out HTuple cols) + { + int count = CalibData.Count; + HTuple pose = new HTuple(); + rows = new HTuple(); + cols = new HTuple(); + CalibImage image; + + for (int i = 0; i < count; i++) + { + image = (CalibImage)CalibData[i]; + pose = pose.TupleConcat(image.getEstimatedPose()); + rows = rows.TupleConcat(image.getMarkCenterRows()); + cols = cols.TupleConcat(image.getMarkCenterColumns()); + } + return pose; + } + + /// <summary> + /// Gets the camera parameters corresponding to + /// the supplied calibration image. + /// </summary> + /// <returns>Camera parameters</returns> + public HTuple getCameraParams(CalibImage image) + { + HTuple campar; + int paramsListSize = 8; + int offset = 0; + bool areaScanPoly = false; + + if (mCameraType == CalibrationAssistant.CAMERA_TYP_AREA_SCAN_POLY) + { + paramsListSize = 12; + offset = 4; + areaScanPoly = true; + } + + paramsListSize += (mCameraType == CalibrationAssistant.CAMERA_TYP_LINE_SCAN) ? 3 : 0; + + campar = new HTuple(paramsListSize); + campar[0] = (isTelecentric ? 0.0 : ((double)mFocalLength / 1000.0)); + + if (areaScanPoly) + { + campar[1] = mK1; + campar[2] = mK2; + campar[3] = mK3; + campar[4] = mP1; + campar[5] = mP2; + } + else + { + campar[1] = mKappa; + } + + campar[2 + offset] = (double)mCellWidth / 1000000.0; // Sx -width -> * 10^ -6 + campar[3 + offset] = (double)mCellHeight / 1000000.0; // Sy -height -> * 10^ -6 + campar[4 + offset] = (double)image.mWidth * 0.5; // x -principal point + campar[5 + offset] = (double)image.mHeight * 0.5; // y -principal point + campar[6 + offset] = image.mWidth; // imagewidth + campar[7 + offset] = image.mHeight; // imageheight + + if (paramsListSize == 11) + { + campar[8] = mMotionVx / 1000000.0; + campar[9] = mMotionVy / 1000000.0; + campar[10] = mMotionVz / 1000000.0; + + campar[5 + offset] = 0; // y -principal point = 0 for line scan camera + } + + return campar; + } + + /// <summary> + /// Tests different quality features for the calibration image + /// <c>cImg</c> + /// </summary> + /// <returns> + /// Returns a value indicating the success or failure + /// of the quality assessment + /// </returns> + public bool testQualityIssues(CalibImage cImg) + { + ArrayList qList; + + HObject markContours; + HObject plateRegion; + HImage mImg; + HTuple score, score2, contrast; + int numRegions, numContours; + bool qualityFailure; + + + + mImg = cImg.getImage(); + qList = cImg.getQualityIssueList(); + procedure = new QualityProcedures(); + contrast = new HTuple(); + qualityFailure = false; + // DescriptionFileName = mDescrFileName; + ; + + try + { + procedure.find_caltab_edges(mImg, out plateRegion, + out markContours, + new HTuple(mDescrFileName)); + numRegions = plateRegion.CountObj(); + numContours = markContours.CountObj(); + + if (mImageTests < QUALITY_ISSUE_TEST_NONE) + { + if (numRegions == 0) + { + qualityFailure = true; + } + else + { + procedure.eval_caltab_overexposure(mImg, plateRegion, out score); + addQualityIssue(qList, QUALITY_ISSUE_IMG_EXPOSURE, score.D); + } + + if (numContours == 0) + { + qualityFailure = true; + } + else + { + procedure.eval_caltab_contrast_homogeneity(mImg, markContours, out contrast, out score, out score2); + addQualityIssue(qList, QUALITY_ISSUE_IMG_CONTRAST, score.D); + addQualityIssue(qList, QUALITY_ISSUE_IMG_HOMOGENEITY, score2.D); + + procedure.eval_caltab_size(mImg, plateRegion, markContours, out score); + addQualityIssue(qList, QUALITY_ISSUE_IMG_CALTAB_SIZE, score.D); + } + + if (mImageTests == QUALITY_ISSUE_TEST_ALL) + { + procedure.eval_caltab_focus(mImg, markContours, contrast, out score); + addQualityIssue(qList, QUALITY_ISSUE_IMG_FOCUS, score.D); + } + } + } + catch (HOperatorException e) + { + throw (e); + } + + return qualityFailure; + } + + /// <summary> + /// Tests for quality features concerning the performance + /// of the entire sequence of calibration images provided by + /// the list <c>CalibData</c> + /// </summary> + public void UpdateSequenceIssues() + { + HTuple markRows, marksCols, startPose, width, height, hScore; + bool hasIssue; + bool hasError; + double minScore, score; + int count, countL; + CalibImage imgC; + ArrayList qList; + + mSeqQualityList.Clear(); + + try + { + if (mSequenceTests < QUALITY_ISSUE_TEST_NONE) + { + hasIssue = false; + hasError = false; + minScore = 1.0; + + if ((count = CalibData.Count) == 0) + return; + + for (int i = 0; i < count; i++) + { + imgC = (CalibImage)CalibData[i]; + + if (imgC.getPlateStatus() == PS_QUALITY_ISSUES) + { + hasIssue = true; + qList = imgC.getQualityIssueList(); + countL = qList.Count; + + for (int j = 0; j < countL; j++) + { + score = ((QualityIssue)qList[j]).getScore(); + + if (score < minScore) + minScore = score; + } + } + else if (imgC.getPlateStatus() != PS_OK) + { + hasError = true; + } + }//for + + if (hasError) + { + addQualityIssue(mSeqQualityList, QUALITY_ISSUE_SEQ_ERROR, 0.0); + } + else if (hasIssue) + { + addQualityIssue(mSeqQualityList, QUALITY_ISSUE_SEQ_ALL_OVER, minScore); + } + + if (count < 20) + { + score = (count <= 10) ? 0.0 : (0.1 * ((double)count - 10.0)); + addQualityIssue(mSeqQualityList, QUALITY_ISSUE_SEQ_NUMBER, score); + } + + if (mSequenceTests == QUALITY_ISSUE_TEST_ALL && count > 0) + { + startPose = getCalibrationData(out markRows, out marksCols); + width = new HTuple(((CalibImage)CalibData[0]).mWidth); + height = new HTuple(((CalibImage)CalibData[0]).mHeight); + + procedure.eval_marks_distribution(markRows, marksCols, width, height, out hScore); + addQualityIssue(mSeqQualityList, QUALITY_ISSUE_SEQ_MARKS_DISTR, hScore[0].D); + + procedure.eval_caltab_tilt(startPose, out hScore); + addQualityIssue(mSeqQualityList, QUALITY_ISSUE_SEQ_CALTAB_TILT, hScore[0].D); + } + }//if!=None + } + catch (HOperatorException e) + { + mErrorMessage = e.Message; + } + } + + /// <summary> + /// Adds the calculated score <c>score</c> for the quality feature + /// <c>type</c> to the supplied feature list <c>qList</c> + /// </summary> + /// <param name="qList"> + /// Quality feature list + /// </param> + /// <param name="type"> + /// Constant starting with QUALITY_*, describing one of the quality + /// features + /// </param> + /// <param name="score"> + /// Score determined for the quality feature + /// </param> + public void addQualityIssue(ArrayList qList, int type, double score) + { + if ((int)(score * 100) <= mWarnLevel) + qList.Add(new QualityIssue(type, score)); + } + + /// <summary> + /// Calls the actual <c>addQualityIssue</c> + /// method, with the feature list obtained from the + /// calibration image <c>cImg</c> + /// </summary> + /// <param name="cImg"> + /// Calibration image model, which has been tested for + /// the quality feature defined with <c>type</c> + /// </param> + /// <param name="type"> + /// Constant starting with QUALITY_* describing one of the quality + /// features + /// </param> + /// <param name="score"> + /// Score determined for the quality feature + /// </param> + public void addQualityIssue(CalibImage cImg, int type, double score) + { + ArrayList qList = cImg.getQualityIssueList(); + addQualityIssue(qList, type, score); + } + + /// <summary> + /// Applies the calibration on the set of calibration + /// images <c>CalibData</c> + /// </summary> + public void applyCalibration() + { + HTuple x, y, z, marksR, marksC; + HTuple error, startPoses, startCampar, parameters; + CalibImage refImg; + + mCalibValid = false; + mErrorMean = -1; + + if (mReferenceIndex >= 0) + { + try + { + refImg = (CalibImage)CalibData[mReferenceIndex]; + HOperatorSet.CaltabPoints(mDescrFileName, out x, out y, out z); + startPoses = getCalibrationData(out marksR, out marksC); + startCampar = getCameraParams(refImg); + parameters = new HTuple("all"); + + HOperatorSet.CameraCalibration(x, y, z, + marksR, marksC, + startCampar, + startPoses, + parameters, + out mCameraParams, + out mPoses, + out error); + mErrorMean = error[0].D; + mCalibValid = true; + + UpdateResultVisualization(); + } + catch (HOperatorException e) + { + mErrorMessage = e.Message; + NotifyCalibObserver(CalibrationAssistant.ERR_IN_CALIBRATION); + } + } + else + { + NotifyCalibObserver(CalibrationAssistant.ERR_REFINDEX_INVALID); + }//if-else + } + + /// <summary> + /// Generates the iconic objects of the calibration results + /// for display + /// </summary> + public void UpdateResultVisualization() + { + HTuple refPose, correctedPose; + double axisLen; + HObject obj; + + if (!mCalibValid) + return; + + mSimulatedImage.Dispose(); + + mReferenceImage = ((CalibImage)CalibData[mReferenceIndex]).getImage(); + refPose = getCalibratedPose(false); + + HOperatorSet.SimCaltab(out obj, new HTuple(mDescrFileName), + mCameraParams, refPose, new HTuple(128), + new HTuple(224), new HTuple(80), new HTuple(1)); + + mSimulatedImage = new HImage(obj); + + correctedPose = getCalibratedPose(true); + axisLen = ((CalibImage)CalibData[mReferenceIndex]).getEstimatedPlateSize(); + + procedure.get_3d_coord_system(mReferenceImage, out mReferenceWCS, mCameraParams, + correctedPose, new HTuple(axisLen / 2)); + + NotifyCalibObserver(CalibrationAssistant.UPDATE_CALIBRATION_RESULTS); + } + + /// <summary> + /// Saves the calibrated camera parameters in the file + /// defined by <c>filename</c> + /// </summary> + public void saveCamParams(string filename) + { + if (mCalibValid) + { + try + { + HOperatorSet.WriteCamPar(mCameraParams, new HTuple(filename)); + } + catch (HOperatorException e) + { + mErrorMessage = e.Message; + NotifyCalibObserver(CalibrationAssistant.ERR_WRITE_CALIB_RESULTS); + } + } + } + + /// <summary> + /// Saves the pose obtained from the camera calibration + /// in the file, defined by <c>filename</c> + /// </summary> + public void saveCamPose(string filename) + { + HTuple Pose; + if (mCalibValid) + { + try + { + Pose = getCalibratedPose(true); + HOperatorSet.WritePose(Pose, new HTuple(filename)); + } + catch (HOperatorException e) + { + mErrorMessage = e.Message; + NotifyCalibObserver(CalibrationAssistant.ERR_WRITE_CALIB_RESULTS); + } + } + } + + /// <summary> + /// Returns calibration results + /// </summary> + /// <param name="camParams"> + /// Calibrated internal camera parameters + /// </param> + /// <param name="refPose"> + /// Calibrated external camera parameters + /// </param> + public void getCalibrationResult(out HTuple camParams, + out HTuple refPose) + { + camParams = new HTuple(mCameraParams); + refPose = getCalibratedPose(true); + } + + /// <summary> + /// Returns the calibrated reference pose + /// </summary> + public HTuple getCalibratedPose(bool corrected) + { + HTuple tX, tY, tZ, correctedPose, refPose = null; + + if (!mCalibValid) + return new HTuple(1.0, -1.0, 0.0); + + + if (mPoses.Length >= 7 * (mReferenceIndex + 1)) + refPose = mPoses.TupleSelectRange(new HTuple(7 * mReferenceIndex), + new HTuple(7 * mReferenceIndex + 6)); + + if (!corrected) + return refPose; + + tX = new HTuple(0); + tY = new HTuple(0); + tZ = new HTuple(this.mThickness / 1000.0); + + if (mAtImgCoord) + { + HOperatorSet.ImagePointsToWorldPlane(mCameraParams, refPose, + new HTuple(0), new HTuple(0), + new HTuple("mm"), out tX, out tY); + } + HOperatorSet.SetOriginPose(refPose, tX, tY, tZ, out correctedPose); + + return correctedPose; + } + + /// <summary>Loads camera parameters from file</summary> + /// <param name="camParFile">File name</param> + /// <returns>Success or failure of load process</returns> + public bool importCamParams(string camParFile) + { + HTuple campar; + int offset = 0; + bool areaScanPoly = false; + + + try + { + HOperatorSet.ReadCamPar(new HTuple(camParFile), out campar); + + // -- load camera parameters -- + switch (campar.Length) + { + case 8: + mCameraType = CAMERA_TYP_AREA_SCAN_DIV; + break; + case 11: + mCameraType = CAMERA_TYP_LINE_SCAN; + break; + case 12: + mCameraType = CAMERA_TYP_AREA_SCAN_POLY; + offset = 4; + areaScanPoly = true; + break; + default: + mCameraType = -1; + break; + } + + mFocalLength = campar[0] * 1000.0; + + if (mFocalLength == 0.0) + isTelecentric = true; + else + isTelecentric = false; + + if (areaScanPoly) + { + mK1 = campar[1]; + mK2 = campar[2]; + mK3 = campar[3]; + mP1 = campar[4]; + mP2 = campar[5]; + } + else + { + mKappa = campar[1]; + } + + mCellWidth = campar[2 + offset] * 1000000.0; + mCellHeight = campar[3 + offset] * 1000000.0; + + // line scan camera + if (campar.Length == 11) + { + mMotionVx = campar[8].D * 1000000.0; + mMotionVy = campar[9].D * 1000000.0; + mMotionVz = campar[10].D * 1000000.0; + } + + Update(true); + } + catch (HOperatorException e) + { + mErrorMessage = e.Message; + NotifyCalibObserver(CalibrationAssistant.ERR_READING_FILE); + return false; + } + + return true; + } + + /// <summary> + /// Resets the camera parameters to the default settings. + /// </summary> + /// <param name="camTyp"> + /// Flag to change camera type to the default as well + /// </param> + public void resetCameraSetup(bool camTyp) + { + if (camTyp) + mCameraType = CAMERA_TYP_AREA_SCAN_DIV; + + mThickness = 1.00; + mCellWidth = 8.300; + mCellHeight = 8.300; + mFocalLength = 8.000; + isTelecentric = false; + mKappa = 0.0; + mK1 = 0.0; + mK2 = 0.0; + mK3 = 0.0; + mP1 = 0.0; + mP2 = 0.0; + mMotionVx = 0.0; + mMotionVy = 500.0; + mMotionVz = 0.0; + + Update(true); + } + + } +} diff --git a/HalconTools/CalibrationModule/QualityIssue.cs b/HalconTools/CalibrationModule/QualityIssue.cs new file mode 100644 index 0000000..6290aa7 --- /dev/null +++ b/HalconTools/CalibrationModule/QualityIssue.cs @@ -0,0 +1,46 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace HalconTools +{ + public class QualityIssue + { + /// <summary> + /// Constant starting with QUALITY_ISSUE_*, defined in the class + /// CalibrationAssistant. + /// </summary> + private int qIssue; + /// <summary> + /// Score obtained from the quality assessment + /// </summary> + private double qScore; + + /// <summary>Initialize an instance</summary> + /// <param name="IType"> + /// Constant starting with QUALITY_ISSUE_*, defined in + /// the class CalibrationAssistant. + /// </param> + /// <param name="scr"> + /// Score achieved for this quality measurement. + /// </param> + public QualityIssue(int IType, double scr) + { + qIssue = IType; + qScore = scr; + } + + // getter-setter methods + public double getScore() + { + return qScore; + } + + public int getIssueType() + { + return qIssue; + } + + } +} diff --git a/HalconTools/CalibrationModule/QualityProcedures.cs b/HalconTools/CalibrationModule/QualityProcedures.cs new file mode 100644 index 0000000..406536a --- /dev/null +++ b/HalconTools/CalibrationModule/QualityProcedures.cs @@ -0,0 +1,1034 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using HalconDotNet; + +namespace HalconTools +{ + public class QualityProcedures + { + /// <summary> + /// Evaluates the sharpness of the calibration plate in the calibration + /// image. + /// </summary> + public void eval_caltab_focus(HObject ho_Image, + HObject ho_Marks, + HTuple hv_Contrast, + out HTuple hv_FocusScore) + { + // Local iconic variables + + HObject ho_Region, ho_RegionUnion, ho_ImageReduced; + HObject ho_DerivGauss; + + // Local control variables + + HTuple hv_Number, hv_MeanGradient, hv_Deviation; + HTuple hv_MinScore, hv_RawResult; + + // Initialize local and output iconic variables + HOperatorSet.GenEmptyObj(out ho_Region); + HOperatorSet.GenEmptyObj(out ho_RegionUnion); + HOperatorSet.GenEmptyObj(out ho_ImageReduced); + HOperatorSet.GenEmptyObj(out ho_DerivGauss); + + hv_FocusScore = 0.0; + if ((int)(new HTuple(hv_Contrast.TupleEqual(0))) != 0) + { + ho_Region.Dispose(); + ho_RegionUnion.Dispose(); + ho_ImageReduced.Dispose(); + ho_DerivGauss.Dispose(); + + return; + } + HOperatorSet.CountObj(ho_Marks, out hv_Number); + if ((int)(new HTuple(hv_Number.TupleLess(3))) != 0) + { + ho_Region.Dispose(); + ho_RegionUnion.Dispose(); + ho_ImageReduced.Dispose(); + ho_DerivGauss.Dispose(); + + return; + } + ho_Region.Dispose(); + HOperatorSet.GenRegionContourXld(ho_Marks, out ho_Region, "margin"); + ho_RegionUnion.Dispose(); + HOperatorSet.Union1(ho_Region, out ho_RegionUnion); + ho_ImageReduced.Dispose(); + HOperatorSet.ReduceDomain(ho_Image, ho_RegionUnion, out ho_ImageReduced); + ho_DerivGauss.Dispose(); + HOperatorSet.DerivateGauss(ho_ImageReduced, out ho_DerivGauss, 0.7, "gradient"); + HOperatorSet.Intensity(ho_Region, ho_DerivGauss, out hv_MeanGradient, out hv_Deviation); + hv_MinScore = 0.25; + //Normalize the Gradient with the contrast + hv_RawResult = hv_MeanGradient / hv_Contrast; + hv_FocusScore = (((hv_RawResult * 4.5)).TupleSort())[(new HTuple((new HTuple(hv_RawResult.TupleLength() + )) / 20.0)).TupleRound()]; + hv_FocusScore = ((((((((hv_FocusScore - hv_MinScore)).TupleConcat(0.0))).TupleMax() + )).TupleConcat(1.0))).TupleMin(); + ho_Region.Dispose(); + ho_RegionUnion.Dispose(); + ho_ImageReduced.Dispose(); + ho_DerivGauss.Dispose(); + + return; + } + + + + /// <summary> + /// Extracts the calibration plate and the marks on this plate + /// for the supplied image + /// </summary> + public void find_caltab_edges(HObject ho_Image, + out HObject ho_Caltab, + out HObject ho_Marks, + HTuple hv_DescriptionFileName) + { + + + // Stack for temporary objects + HObject[] OTemp = new HObject[20]; + + // Local iconic variables + + HObject ho_ImageMean, ho_RegionDynThresh, ho_RegionBorder; + HObject ho_RegionOpening1, ho_ConnectedRegions1, ho_SelectedRegions4; + HObject ho_SelectedRegions5, ho_RegionBorder2, ho_RegionTrans; + HObject ho_RegionErosion, ho_RegionBorder1, ho_RegionDilation2; + HObject ho_RegionDifference1, ho_RegionOpening, ho_ConnectedRegions; + HObject ho_SelectedRegions2, ho_SelectedRegions, ho_RegionFillUp; + HObject ho_SelectedRegions1, ho_RegionIntersection, ho_RegionFillUp1; + HObject ho_RegionDifference, ho_CaltabCandidates, ho_ObjectSelected = null; + HObject ho_ConnectedMarks = null, ho_ObjectSelectedCaltab = null; + HObject ho_RegionFillUpCand, ho_MarksCand, ho_RegionDilation1; + HObject ho_ImageReduced, ho_DefaultEdges, ho_UnionContours; + HObject ho_SelectedXLD, ho_SelectedXLD1; + + + // Local control variables + + HTuple hv_Width, hv_Height, hv_EstimatedCaltabSize; + HTuple hv_EstimatedMarkSize, hv_Number, hv_X, hv_Y, hv_Z; + HTuple hv_NumDescrMarks, hv_Index, hv_NumberMarks = new HTuple(); + HTuple hv_Anisometry = new HTuple(), hv_Bulkiness = new HTuple(); + HTuple hv_StructureFactor = new HTuple(), hv_AreaMarks = new HTuple(); + HTuple hv_Row = new HTuple(), hv_Column = new HTuple(), hv_Rectangularity; + HTuple hv_SortedIndex, hv_IndexBest, hv_MinContrast, hv_NumberCand; + HTuple hv_Area, hv_Dummy, hv_DummyS, hv_AreaMedian; + + // Initialize local and output iconic variables + HOperatorSet.GenEmptyObj(out ho_Caltab); + HOperatorSet.GenEmptyObj(out ho_Marks); + HOperatorSet.GenEmptyObj(out ho_ImageMean); + HOperatorSet.GenEmptyObj(out ho_RegionDynThresh); + HOperatorSet.GenEmptyObj(out ho_RegionBorder); + HOperatorSet.GenEmptyObj(out ho_RegionOpening1); + HOperatorSet.GenEmptyObj(out ho_ConnectedRegions1); + HOperatorSet.GenEmptyObj(out ho_SelectedRegions4); + HOperatorSet.GenEmptyObj(out ho_SelectedRegions5); + HOperatorSet.GenEmptyObj(out ho_RegionBorder2); + HOperatorSet.GenEmptyObj(out ho_RegionTrans); + HOperatorSet.GenEmptyObj(out ho_RegionErosion); + HOperatorSet.GenEmptyObj(out ho_RegionBorder1); + HOperatorSet.GenEmptyObj(out ho_RegionDilation2); + HOperatorSet.GenEmptyObj(out ho_RegionDifference1); + HOperatorSet.GenEmptyObj(out ho_RegionOpening); + HOperatorSet.GenEmptyObj(out ho_ConnectedRegions); + HOperatorSet.GenEmptyObj(out ho_SelectedRegions2); + HOperatorSet.GenEmptyObj(out ho_SelectedRegions); + HOperatorSet.GenEmptyObj(out ho_RegionFillUp); + HOperatorSet.GenEmptyObj(out ho_SelectedRegions1); + HOperatorSet.GenEmptyObj(out ho_RegionIntersection); + HOperatorSet.GenEmptyObj(out ho_RegionFillUp1); + HOperatorSet.GenEmptyObj(out ho_RegionDifference); + HOperatorSet.GenEmptyObj(out ho_CaltabCandidates); + HOperatorSet.GenEmptyObj(out ho_ObjectSelected); + HOperatorSet.GenEmptyObj(out ho_ConnectedMarks); + HOperatorSet.GenEmptyObj(out ho_ObjectSelectedCaltab); + HOperatorSet.GenEmptyObj(out ho_RegionFillUpCand); + HOperatorSet.GenEmptyObj(out ho_MarksCand); + HOperatorSet.GenEmptyObj(out ho_RegionDilation1); + HOperatorSet.GenEmptyObj(out ho_ImageReduced); + HOperatorSet.GenEmptyObj(out ho_DefaultEdges); + HOperatorSet.GenEmptyObj(out ho_UnionContours); + HOperatorSet.GenEmptyObj(out ho_SelectedXLD); + HOperatorSet.GenEmptyObj(out ho_SelectedXLD1); + + // + ho_Marks.Dispose(); + HOperatorSet.GenEmptyObj(out ho_Marks); + ho_Caltab.Dispose(); + HOperatorSet.GenEmptyObj(out ho_Caltab); + HOperatorSet.GetImageSize(ho_Image, out hv_Width, out hv_Height); + hv_EstimatedCaltabSize = (((((hv_Width.TupleConcat(hv_Height))).TupleMax()) / 2.5)).TupleRound() + ; + hv_EstimatedMarkSize = ((hv_EstimatedCaltabSize / 12.0)).TupleRound(); + ho_ImageMean.Dispose(); + HOperatorSet.MeanImage(ho_Image, out ho_ImageMean, hv_EstimatedMarkSize * 3, hv_EstimatedMarkSize * 3); + ho_RegionDynThresh.Dispose(); + HOperatorSet.DynThreshold(ho_Image, ho_ImageMean, out ho_RegionDynThresh, 3, + "light"); + ho_RegionBorder.Dispose(); + HOperatorSet.DynThreshold(ho_Image, ho_ImageMean, out ho_RegionBorder, 20, "dark"); + ho_RegionOpening1.Dispose(); + HOperatorSet.OpeningCircle(ho_RegionBorder, out ho_RegionOpening1, 1.5); + ho_ConnectedRegions1.Dispose(); + HOperatorSet.Connection(ho_RegionOpening1, out ho_ConnectedRegions1); + ho_SelectedRegions4.Dispose(); + HOperatorSet.SelectShape(ho_ConnectedRegions1, out ho_SelectedRegions4, "compactness", + "and", 17, 50); + ho_SelectedRegions5.Dispose(); + HOperatorSet.SelectShape(ho_SelectedRegions4, out ho_SelectedRegions5, "anisometry", + "and", 1, 1.4); + ho_RegionBorder2.Dispose(); + HOperatorSet.Boundary(ho_SelectedRegions5, out ho_RegionBorder2, "outer"); + ho_SelectedRegions5.Dispose(); + HOperatorSet.SelectShape(ho_RegionBorder2, out ho_SelectedRegions5, "circularity", + "and", 0.006, 1); + ho_RegionTrans.Dispose(); + HOperatorSet.ShapeTrans(ho_SelectedRegions5, out ho_RegionTrans, "rectangle2"); + ho_RegionErosion.Dispose(); + HOperatorSet.ErosionCircle(ho_RegionTrans, out ho_RegionErosion, (hv_Width / 640.0) * 5.5); + ho_RegionBorder1.Dispose(); + HOperatorSet.Boundary(ho_RegionErosion, out ho_RegionBorder1, "inner"); + ho_RegionDilation2.Dispose(); + HOperatorSet.DilationCircle(ho_RegionBorder1, out ho_RegionDilation2, 3.5); + ho_RegionDifference1.Dispose(); + HOperatorSet.Difference(ho_RegionDynThresh, ho_RegionDilation2, out ho_RegionDifference1 + ); + ho_RegionOpening.Dispose(); + HOperatorSet.OpeningCircle(ho_RegionDifference1, out ho_RegionOpening, (hv_Width / 640) * 1.5); + ho_ConnectedRegions.Dispose(); + HOperatorSet.Connection(ho_RegionOpening, out ho_ConnectedRegions); + ho_SelectedRegions2.Dispose(); + HOperatorSet.SelectShape(ho_ConnectedRegions, out ho_SelectedRegions2, "area", + "and", (hv_EstimatedCaltabSize.TuplePow(2)) / 10, (hv_EstimatedCaltabSize.TuplePow( + 2)) * 5); + ho_SelectedRegions.Dispose(); + HOperatorSet.SelectShape(ho_SelectedRegions2, out ho_SelectedRegions, "compactness", + "and", 1.4, 10); + ho_RegionFillUp.Dispose(); + HOperatorSet.FillUp(ho_SelectedRegions, out ho_RegionFillUp); + ho_SelectedRegions1.Dispose(); + HOperatorSet.SelectShape(ho_RegionFillUp, out ho_SelectedRegions1, "rectangularity", + "and", 0.6, 1); + ho_RegionIntersection.Dispose(); + HOperatorSet.Intersection(ho_SelectedRegions1, ho_RegionDynThresh, out ho_RegionIntersection + ); + ho_RegionFillUp1.Dispose(); + HOperatorSet.FillUp(ho_RegionIntersection, out ho_RegionFillUp1); + ho_RegionDifference.Dispose(); + HOperatorSet.Difference(ho_RegionFillUp1, ho_RegionIntersection, out ho_RegionDifference + ); + HOperatorSet.CountObj(ho_RegionDifference, out hv_Number); + ho_CaltabCandidates.Dispose(); + HOperatorSet.GenEmptyObj(out ho_CaltabCandidates); + HOperatorSet.CaltabPoints(hv_DescriptionFileName, out hv_X, out hv_Y, out hv_Z); + hv_NumDescrMarks = new HTuple(hv_X.TupleLength()); + for (hv_Index = 1; hv_Index.Continue(hv_Number, 1); hv_Index = hv_Index.TupleAdd(1)) + { + ho_ObjectSelected.Dispose(); + HOperatorSet.SelectObj(ho_RegionDifference, out ho_ObjectSelected, hv_Index); + ho_ConnectedMarks.Dispose(); + HOperatorSet.Connection(ho_ObjectSelected, out ho_ConnectedMarks); + HOperatorSet.CountObj(ho_ConnectedMarks, out hv_NumberMarks); + HOperatorSet.Eccentricity(ho_ConnectedMarks, out hv_Anisometry, out hv_Bulkiness, + out hv_StructureFactor); + HOperatorSet.AreaCenter(ho_ConnectedMarks, out hv_AreaMarks, out hv_Row, out hv_Column); + ho_ObjectSelectedCaltab.Dispose(); + HOperatorSet.SelectObj(ho_RegionIntersection, out ho_ObjectSelectedCaltab, + hv_Index); + if ((int)((new HTuple((new HTuple((new HTuple(hv_NumberMarks.TupleGreaterEqual( + 10))).TupleAnd(new HTuple(hv_NumberMarks.TupleLess(hv_NumDescrMarks + 20))))).TupleAnd( + new HTuple(((((hv_Anisometry.TupleSort())).TupleSelect((new HTuple(hv_Anisometry.TupleLength() + )) / 2))).TupleLess(2))))).TupleAnd(new HTuple((new HTuple(hv_AreaMarks.TupleMean() + )).TupleGreater(20)))) != 0) + { + HOperatorSet.ConcatObj(ho_CaltabCandidates, ho_ObjectSelectedCaltab, out OTemp[0] + ); + ho_CaltabCandidates.Dispose(); + ho_CaltabCandidates = OTemp[0]; + } + } + ho_RegionFillUpCand.Dispose(); + HOperatorSet.FillUp(ho_CaltabCandidates, out ho_RegionFillUpCand); + HOperatorSet.Rectangularity(ho_RegionFillUpCand, out hv_Rectangularity); + if ((int)(new HTuple((new HTuple(hv_Rectangularity.TupleLength())).TupleEqual( + 0))) != 0) + { + ho_ImageMean.Dispose(); + ho_RegionDynThresh.Dispose(); + ho_RegionBorder.Dispose(); + ho_RegionOpening1.Dispose(); + ho_ConnectedRegions1.Dispose(); + ho_SelectedRegions4.Dispose(); + ho_SelectedRegions5.Dispose(); + ho_RegionBorder2.Dispose(); + ho_RegionTrans.Dispose(); + ho_RegionErosion.Dispose(); + ho_RegionBorder1.Dispose(); + ho_RegionDilation2.Dispose(); + ho_RegionDifference1.Dispose(); + ho_RegionOpening.Dispose(); + ho_ConnectedRegions.Dispose(); + ho_SelectedRegions2.Dispose(); + ho_SelectedRegions.Dispose(); + ho_RegionFillUp.Dispose(); + ho_SelectedRegions1.Dispose(); + ho_RegionIntersection.Dispose(); + ho_RegionFillUp1.Dispose(); + ho_RegionDifference.Dispose(); + ho_CaltabCandidates.Dispose(); + ho_ObjectSelected.Dispose(); + ho_ConnectedMarks.Dispose(); + ho_ObjectSelectedCaltab.Dispose(); + ho_RegionFillUpCand.Dispose(); + ho_MarksCand.Dispose(); + ho_RegionDilation1.Dispose(); + ho_ImageReduced.Dispose(); + ho_DefaultEdges.Dispose(); + ho_UnionContours.Dispose(); + ho_SelectedXLD.Dispose(); + ho_SelectedXLD1.Dispose(); + + return; + } + hv_SortedIndex = hv_Rectangularity.TupleSortIndex(); + hv_IndexBest = (((hv_SortedIndex.TupleInverse())).TupleSelect(0)) + 1; + ho_Caltab.Dispose(); + HOperatorSet.SelectObj(ho_RegionFillUpCand, out ho_Caltab, hv_IndexBest); + ho_RegionFillUp.Dispose(); + HOperatorSet.FillUp(ho_Caltab, out ho_RegionFillUp); + ho_MarksCand.Dispose(); + HOperatorSet.Difference(ho_RegionFillUp, ho_RegionDynThresh, out ho_MarksCand + ); + ho_RegionBorder.Dispose(); + HOperatorSet.Boundary(ho_MarksCand, out ho_RegionBorder, "inner"); + ho_RegionDilation1.Dispose(); + HOperatorSet.DilationCircle(ho_RegionBorder, out ho_RegionDilation1, 9.5); + ho_ImageReduced.Dispose(); + HOperatorSet.ReduceDomain(ho_Image, ho_RegionDilation1, out ho_ImageReduced); + hv_MinContrast = 10; + ho_DefaultEdges.Dispose(); + HOperatorSet.EdgesSubPix(ho_ImageReduced, out ho_DefaultEdges, "canny", 2, hv_MinContrast / 2, + hv_MinContrast); + HOperatorSet.CountObj(ho_DefaultEdges, out hv_NumberCand); + if ((int)(new HTuple(hv_NumberCand.TupleLess(10))) != 0) + { + ho_ImageMean.Dispose(); + ho_RegionDynThresh.Dispose(); + ho_RegionBorder.Dispose(); + ho_RegionOpening1.Dispose(); + ho_ConnectedRegions1.Dispose(); + ho_SelectedRegions4.Dispose(); + ho_SelectedRegions5.Dispose(); + ho_RegionBorder2.Dispose(); + ho_RegionTrans.Dispose(); + ho_RegionErosion.Dispose(); + ho_RegionBorder1.Dispose(); + ho_RegionDilation2.Dispose(); + ho_RegionDifference1.Dispose(); + ho_RegionOpening.Dispose(); + ho_ConnectedRegions.Dispose(); + ho_SelectedRegions2.Dispose(); + ho_SelectedRegions.Dispose(); + ho_RegionFillUp.Dispose(); + ho_SelectedRegions1.Dispose(); + ho_RegionIntersection.Dispose(); + ho_RegionFillUp1.Dispose(); + ho_RegionDifference.Dispose(); + ho_CaltabCandidates.Dispose(); + ho_ObjectSelected.Dispose(); + ho_ConnectedMarks.Dispose(); + ho_ObjectSelectedCaltab.Dispose(); + ho_RegionFillUpCand.Dispose(); + ho_MarksCand.Dispose(); + ho_RegionDilation1.Dispose(); + ho_ImageReduced.Dispose(); + ho_DefaultEdges.Dispose(); + ho_UnionContours.Dispose(); + ho_SelectedXLD.Dispose(); + ho_SelectedXLD1.Dispose(); + + return; + } + ho_UnionContours.Dispose(); + HOperatorSet.UnionCocircularContoursXld(ho_DefaultEdges, out ho_UnionContours, + 0.5, 0.1, 0.2, 30, 10, 10, "true", 1); + ho_SelectedXLD.Dispose(); + HOperatorSet.SelectShapeXld(ho_UnionContours, out ho_SelectedXLD, "area", "and", + 30, 10000); + ho_SelectedXLD1.Dispose(); + HOperatorSet.SelectShapeXld(ho_SelectedXLD, out ho_SelectedXLD1, "circularity", + "and", 0.4, 1); + ho_MarksCand.Dispose(); + HOperatorSet.SelectShapeXld(ho_SelectedXLD1, out ho_MarksCand, "compactness", + "and", 1, 1.5); + HOperatorSet.AreaCenterXld(ho_MarksCand, out hv_Area, out hv_Dummy, out hv_Dummy, + out hv_DummyS); + HOperatorSet.CountObj(ho_MarksCand, out hv_Number); + if ((int)(new HTuple(hv_Number.TupleLess(4))) != 0) + { + ho_ImageMean.Dispose(); + ho_RegionDynThresh.Dispose(); + ho_RegionBorder.Dispose(); + ho_RegionOpening1.Dispose(); + ho_ConnectedRegions1.Dispose(); + ho_SelectedRegions4.Dispose(); + ho_SelectedRegions5.Dispose(); + ho_RegionBorder2.Dispose(); + ho_RegionTrans.Dispose(); + ho_RegionErosion.Dispose(); + ho_RegionBorder1.Dispose(); + ho_RegionDilation2.Dispose(); + ho_RegionDifference1.Dispose(); + ho_RegionOpening.Dispose(); + ho_ConnectedRegions.Dispose(); + ho_SelectedRegions2.Dispose(); + ho_SelectedRegions.Dispose(); + ho_RegionFillUp.Dispose(); + ho_SelectedRegions1.Dispose(); + ho_RegionIntersection.Dispose(); + ho_RegionFillUp1.Dispose(); + ho_RegionDifference.Dispose(); + ho_CaltabCandidates.Dispose(); + ho_ObjectSelected.Dispose(); + ho_ConnectedMarks.Dispose(); + ho_ObjectSelectedCaltab.Dispose(); + ho_RegionFillUpCand.Dispose(); + ho_MarksCand.Dispose(); + ho_RegionDilation1.Dispose(); + ho_ImageReduced.Dispose(); + ho_DefaultEdges.Dispose(); + ho_UnionContours.Dispose(); + ho_SelectedXLD.Dispose(); + ho_SelectedXLD1.Dispose(); + + return; + } + hv_AreaMedian = ((hv_Area.TupleSort())).TupleSelect(hv_Number / 2); + ho_Marks.Dispose(); + HOperatorSet.SelectShapeXld(ho_MarksCand, out ho_Marks, "area", "and", hv_AreaMedian - (hv_AreaMedian * 0.5), + hv_AreaMedian + (hv_AreaMedian * 0.5)); + ho_ImageMean.Dispose(); + ho_RegionDynThresh.Dispose(); + ho_RegionBorder.Dispose(); + ho_RegionOpening1.Dispose(); + ho_ConnectedRegions1.Dispose(); + ho_SelectedRegions4.Dispose(); + ho_SelectedRegions5.Dispose(); + ho_RegionBorder2.Dispose(); + ho_RegionTrans.Dispose(); + ho_RegionErosion.Dispose(); + ho_RegionBorder1.Dispose(); + ho_RegionDilation2.Dispose(); + ho_RegionDifference1.Dispose(); + ho_RegionOpening.Dispose(); + ho_ConnectedRegions.Dispose(); + ho_SelectedRegions2.Dispose(); + ho_SelectedRegions.Dispose(); + ho_RegionFillUp.Dispose(); + ho_SelectedRegions1.Dispose(); + ho_RegionIntersection.Dispose(); + ho_RegionFillUp1.Dispose(); + ho_RegionDifference.Dispose(); + ho_CaltabCandidates.Dispose(); + ho_ObjectSelected.Dispose(); + ho_ConnectedMarks.Dispose(); + ho_ObjectSelectedCaltab.Dispose(); + ho_RegionFillUpCand.Dispose(); + ho_MarksCand.Dispose(); + ho_RegionDilation1.Dispose(); + ho_ImageReduced.Dispose(); + ho_DefaultEdges.Dispose(); + ho_UnionContours.Dispose(); + ho_SelectedXLD.Dispose(); + ho_SelectedXLD1.Dispose(); + + return; + } + + + + + /// <summary> + /// Determines whether the calibration image is overexposed + /// </summary> + public void eval_caltab_overexposure(HObject ho_Image, + HObject ho_Caltab, + out HTuple hv_OverexposureScore) + { + + // Local iconic variables + + HObject ho_ImageReduced, ho_Region; + + + // Local control variables + + HTuple hv_AreaCaltab, hv_Row, hv_Column, hv_AreaOverExp; + HTuple hv_Thresh, hv_Ratio; + + // Initialize local and output iconic variables + HOperatorSet.GenEmptyObj(out ho_ImageReduced); + HOperatorSet.GenEmptyObj(out ho_Region); + + //returns a measure of the amount of saturation of the plate + hv_OverexposureScore = 0.0; + HOperatorSet.AreaCenter(ho_Caltab, out hv_AreaCaltab, out hv_Row, out hv_Column); + if ((int)((new HTuple(hv_AreaCaltab.TupleEqual(0))).TupleOr(new HTuple(hv_AreaCaltab.TupleEqual( + new HTuple())))) != 0) + { + ho_ImageReduced.Dispose(); + ho_Region.Dispose(); + + return; + } + ho_ImageReduced.Dispose(); + HOperatorSet.ReduceDomain(ho_Image, ho_Caltab, out ho_ImageReduced); + ho_Region.Dispose(); + HOperatorSet.Threshold(ho_ImageReduced, out ho_Region, 255, 255); + HOperatorSet.AreaCenter(ho_Region, out hv_AreaOverExp, out hv_Row, out hv_Column); + hv_Thresh = 0.15; + hv_Ratio = (hv_AreaOverExp.TupleReal()) / hv_AreaCaltab; + if ((int)(new HTuple(hv_Ratio.TupleLess(hv_Thresh))) != 0) + { + hv_OverexposureScore = (((new HTuple(1.0)).TupleConcat(1 - (hv_Ratio / hv_Thresh)))).TupleMin() + ; + } + ho_ImageReduced.Dispose(); + ho_Region.Dispose(); + + return; + } + + + /// <summary> + /// Evaluates the gray value contrast between the marks and the calibration + /// plate and the homogeneity of the used illumination. + /// </summary> + public void eval_caltab_contrast_homogeneity(HObject ho_Image, + HObject ho_Marks, + out HTuple hv_Contrast, + out HTuple hv_ContrastScore, + out HTuple hv_HomogeneityScore) + { + + // Local iconic variables + + HObject ho_Region, ho_RegionDilation; + + + // Local control variables + + HTuple hv_Number, hv_Min, hv_Max, hv_Range; + HTuple hv_MinContrast, hv_MaxContrast, hv_DeviationMax; + + // Initialize local and output iconic variables + HOperatorSet.GenEmptyObj(out ho_Region); + HOperatorSet.GenEmptyObj(out ho_RegionDilation); + + hv_ContrastScore = 0.0; + hv_Contrast = 0.0; + hv_HomogeneityScore = 0.0; + HOperatorSet.CountObj(ho_Marks, out hv_Number); + if ((int)(new HTuple(hv_Number.TupleLess(4))) != 0) + { + ho_Region.Dispose(); + ho_RegionDilation.Dispose(); + + return; + } + ho_Region.Dispose(); + HOperatorSet.GenRegionContourXld(ho_Marks, out ho_Region, "margin"); + ho_RegionDilation.Dispose(); + HOperatorSet.DilationCircle(ho_Region, out ho_RegionDilation, 5.5); + HOperatorSet.MinMaxGray(ho_RegionDilation, ho_Image, 3, out hv_Min, out hv_Max, + out hv_Range); + //Calculate contrast score + hv_Contrast = hv_Range.TupleMean(); + hv_MinContrast = 70; + hv_MaxContrast = 160; + if ((int)(new HTuple(hv_Contrast.TupleGreater(hv_MinContrast))) != 0) + { + hv_ContrastScore = (hv_Contrast - hv_MinContrast) / (hv_MaxContrast - hv_MinContrast); + hv_ContrastScore = ((hv_ContrastScore.TupleConcat(1.0))).TupleMin(); + } + //Now for the homogeneity score + HOperatorSet.TupleDeviation(hv_Max, out hv_DeviationMax); + hv_HomogeneityScore = 1.1 - (hv_DeviationMax / 40.0); + hv_HomogeneityScore = ((((((hv_HomogeneityScore.TupleConcat(1.0))).TupleMin() + )).TupleConcat(0.0))).TupleMax(); + ho_Region.Dispose(); + ho_RegionDilation.Dispose(); + + return; + + } + + /// <summary> + /// Evaluates the area covered by the calibration plate in the calibration + /// image. + /// </summary> + public void eval_caltab_size(HObject ho_Image, + HObject ho_Caltab, + HObject ho_Marks, + out HTuple hv_SizeScore) + { + + + // Local iconic variables + + HObject ho_Region = null, ho_RegionUnion = null; + + + // Local control variables + + HTuple hv_Width, hv_Height, hv_Number, hv_Row1 = new HTuple(); + HTuple hv_Column1 = new HTuple(), hv_Phi1 = new HTuple(), hv_Length1 = new HTuple(); + HTuple hv_Length2 = new HTuple(), hv_Area = new HTuple(), hv_Row = new HTuple(); + HTuple hv_Column = new HTuple(), hv_MinRatio, hv_MaxRatio; + HTuple hv_Ratio; + + // Initialize local and output iconic variables + HOperatorSet.GenEmptyObj(out ho_Region); + HOperatorSet.GenEmptyObj(out ho_RegionUnion); + + hv_SizeScore = 0.0; + HOperatorSet.GetImageSize(ho_Image, out hv_Width, out hv_Height); + HOperatorSet.CountObj(ho_Marks, out hv_Number); + if ((int)(new HTuple(hv_Number.TupleGreaterEqual(4))) != 0) + { + //Best approach: Use the surrounding box of the marks as reference size + ho_Region.Dispose(); + HOperatorSet.GenRegionContourXld(ho_Marks, out ho_Region, "filled"); + ho_RegionUnion.Dispose(); + HOperatorSet.Union1(ho_Region, out ho_RegionUnion); + HOperatorSet.SmallestRectangle2(ho_RegionUnion, out hv_Row1, out hv_Column1, + out hv_Phi1, out hv_Length1, out hv_Length2); + hv_Area = (hv_Length2 * hv_Length1) * 4; + } + else + { + //If no marks could be found: use the caltab as reference size + HOperatorSet.AreaCenter(ho_Caltab, out hv_Area, out hv_Row, out hv_Column); + if ((int)((new HTuple(hv_Area.TupleEqual(0))).TupleOr(new HTuple(hv_Area.TupleEqual( + new HTuple())))) != 0) + { + ho_Region.Dispose(); + ho_RegionUnion.Dispose(); + + return; + } + } + hv_MinRatio = 0.015; + hv_MaxRatio = 0.075; + hv_Ratio = (hv_Area.TupleReal()) / (hv_Width * hv_Height); + if ((int)(new HTuple(hv_Ratio.TupleGreater(hv_MinRatio))) != 0) + { + hv_SizeScore = (hv_Ratio - hv_MinRatio) / (hv_MaxRatio - hv_MinRatio); + hv_SizeScore = (((new HTuple(1.0)).TupleConcat(hv_SizeScore))).TupleMin(); + } + ho_Region.Dispose(); + ho_RegionUnion.Dispose(); + + return; + } + + + /// <summary> + /// Display the axes of a 3d coordinate system. + /// </summary> + private void disp_3d_coord_system(HTuple hv_WindowHandle, + HTuple hv_CamParam, + HTuple hv_Pose, + HTuple hv_CoordAxesLength) + { + + // Local iconic variables + + HObject ho_ContX, ho_ContY, ho_ContZ; + + + // Local control variables + + HTuple hv_TransWorld2Cam, hv_OrigCamX, hv_OrigCamY; + HTuple hv_OrigCamZ, hv_Row0, hv_Column0, hv_X, hv_Y, hv_Z; + HTuple hv_RowAxX, hv_ColumnAxX, hv_RowAxY, hv_ColumnAxY; + HTuple hv_RowAxZ, hv_ColumnAxZ; + + // Initialize local and output iconic variables + HOperatorSet.GenEmptyObj(out ho_ContX); + HOperatorSet.GenEmptyObj(out ho_ContY); + HOperatorSet.GenEmptyObj(out ho_ContZ); + + if ((int)(new HTuple((new HTuple(hv_Pose.TupleLength())).TupleNotEqual(7))) != 0) + { + ho_ContX.Dispose(); + ho_ContY.Dispose(); + ho_ContZ.Dispose(); + + return; + } + if ((int)(new HTuple(((hv_Pose.TupleSelect(5))).TupleEqual(0.0))) != 0) + { + ho_ContX.Dispose(); + ho_ContY.Dispose(); + ho_ContZ.Dispose(); + + return; + } + HOperatorSet.PoseToHomMat3d(hv_Pose, out hv_TransWorld2Cam); + //Project the world origin into the image + HOperatorSet.AffineTransPoint3d(hv_TransWorld2Cam, 0, 0, 0, out hv_OrigCamX, + out hv_OrigCamY, out hv_OrigCamZ); + HOperatorSet.Project3dPoint(hv_OrigCamX, hv_OrigCamY, hv_OrigCamZ, hv_CamParam, + out hv_Row0, out hv_Column0); + //Project the coordinate axes into the image + HOperatorSet.AffineTransPoint3d(hv_TransWorld2Cam, hv_CoordAxesLength, 0, 0, + out hv_X, out hv_Y, out hv_Z); + HOperatorSet.Project3dPoint(hv_X, hv_Y, hv_Z, hv_CamParam, out hv_RowAxX, out hv_ColumnAxX); + HOperatorSet.AffineTransPoint3d(hv_TransWorld2Cam, 0, hv_CoordAxesLength, 0, + out hv_X, out hv_Y, out hv_Z); + HOperatorSet.Project3dPoint(hv_X, hv_Y, hv_Z, hv_CamParam, out hv_RowAxY, out hv_ColumnAxY); + HOperatorSet.AffineTransPoint3d(hv_TransWorld2Cam, 0, 0, hv_CoordAxesLength, + out hv_X, out hv_Y, out hv_Z); + HOperatorSet.Project3dPoint(hv_X, hv_Y, hv_Z, hv_CamParam, out hv_RowAxZ, out hv_ColumnAxZ); + ho_ContX.Dispose(); + gen_arrow_cont(out ho_ContX, hv_Row0, hv_Column0, hv_RowAxX, hv_ColumnAxX); + ho_ContY.Dispose(); + gen_arrow_cont(out ho_ContY, hv_Row0, hv_Column0, hv_RowAxY, hv_ColumnAxY); + ho_ContZ.Dispose(); + gen_arrow_cont(out ho_ContZ, hv_Row0, hv_Column0, hv_RowAxZ, hv_ColumnAxZ); + if (HDevWindowStack.IsOpen()) + { + //dev_display (ContX) + } + if (HDevWindowStack.IsOpen()) + { + //dev_display (ContY) + } + if (HDevWindowStack.IsOpen()) + { + //dev_display (ContZ) + } + HOperatorSet.DispObj(ho_ContX, hv_WindowHandle); + HOperatorSet.DispObj(ho_ContY, hv_WindowHandle); + HOperatorSet.DispObj(ho_ContZ, hv_WindowHandle); + HOperatorSet.SetTposition(hv_WindowHandle, hv_RowAxX + 3, hv_ColumnAxX + 3); + HOperatorSet.WriteString(hv_WindowHandle, "X"); + HOperatorSet.SetTposition(hv_WindowHandle, hv_RowAxY + 3, hv_ColumnAxY + 3); + HOperatorSet.WriteString(hv_WindowHandle, "Y"); + HOperatorSet.SetTposition(hv_WindowHandle, hv_RowAxZ + 3, hv_ColumnAxZ + 3); + HOperatorSet.WriteString(hv_WindowHandle, "Z"); + ho_ContX.Dispose(); + ho_ContY.Dispose(); + ho_ContZ.Dispose(); + + return; + } + + /// <summary> + /// Generate a contour in form of an arrow. + /// </summary> + private void gen_arrow_cont(out HObject ho_Arrow, + HTuple hv_Row1, + HTuple hv_Column1, + HTuple hv_Row2, + HTuple hv_Column2) + { + + // Local iconic variables + + HObject ho_Cross1, ho_Cross2, ho_CrossP1, ho_CrossP2; + + + // Local control variables + + HTuple hv_Length, hv_Angle, hv_MinArrowLength; + HTuple hv_DRow, hv_DCol, hv_ArrowLength, hv_Phi, hv_P1R; + HTuple hv_P1C, hv_P2R, hv_P2C; + + // Initialize local and output iconic variables + HOperatorSet.GenEmptyObj(out ho_Arrow); + HOperatorSet.GenEmptyObj(out ho_Cross1); + HOperatorSet.GenEmptyObj(out ho_Cross2); + HOperatorSet.GenEmptyObj(out ho_CrossP1); + HOperatorSet.GenEmptyObj(out ho_CrossP2); + + //Generate a contour in form of a arrow + hv_Length = 7; + hv_Angle = 40; + hv_MinArrowLength = 2; + hv_DRow = hv_Row2 - hv_Row1; + hv_DCol = hv_Column2 - hv_Column1; + hv_ArrowLength = (((hv_DRow * hv_DRow) + (hv_DCol * hv_DCol))).TupleSqrt(); + if ((int)(new HTuple(hv_ArrowLength.TupleLess(hv_MinArrowLength))) != 0) + { + hv_Length = 0; + } + HOperatorSet.TupleAtan2(hv_DRow, -hv_DCol, out hv_Phi); + hv_P1R = hv_Row2 - (hv_Length * (((hv_Phi - (hv_Angle.TupleRad()))).TupleSin())); + hv_P1C = hv_Column2 + (hv_Length * (((hv_Phi - (hv_Angle.TupleRad()))).TupleCos())); + hv_P2R = hv_Row2 - (hv_Length * (((hv_Phi + (hv_Angle.TupleRad()))).TupleSin())); + hv_P2C = hv_Column2 + (hv_Length * (((hv_Phi + (hv_Angle.TupleRad()))).TupleCos())); + ho_Cross1.Dispose(); + HOperatorSet.GenCrossContourXld(out ho_Cross1, hv_Row1, hv_Column1, 6, 0.785398); + ho_Cross2.Dispose(); + HOperatorSet.GenCrossContourXld(out ho_Cross2, hv_Row2, hv_Column2, 6, 0.785398); + ho_CrossP1.Dispose(); + HOperatorSet.GenCrossContourXld(out ho_CrossP1, hv_P1R, hv_P1C, 6, 0.785398); + ho_CrossP2.Dispose(); + HOperatorSet.GenCrossContourXld(out ho_CrossP2, hv_P2R, hv_P2C, 6, 0.785398); + ho_Arrow.Dispose(); + HOperatorSet.GenContourPolygonXld(out ho_Arrow, ((((((hv_Row1.TupleConcat(hv_Row2))).TupleConcat( + hv_P1R))).TupleConcat(hv_Row2))).TupleConcat(hv_P2R), ((((((hv_Column1.TupleConcat( + hv_Column2))).TupleConcat(hv_P1C))).TupleConcat(hv_Column2))).TupleConcat( + hv_P2C)); + ho_Cross1.Dispose(); + ho_Cross2.Dispose(); + ho_CrossP1.Dispose(); + ho_CrossP2.Dispose(); + + return; + } + + private void tuple_equal_greater(HTuple hv_Tuple, + HTuple hv_Threshold, + out HTuple hv_Selected, + out HTuple hv_Indices) + { + + // Local control variables + + HTuple hv_Sgn; + + // Initialize local and output iconic variables + + hv_Selected = new HTuple(); + HOperatorSet.TupleSgn(hv_Tuple - hv_Threshold, out hv_Sgn); + HOperatorSet.TupleFind(hv_Sgn, 1, out hv_Indices); + if ((int)((new HTuple((new HTuple(hv_Indices.TupleLength())).TupleGreater(1))).TupleOr( + new HTuple(((hv_Indices.TupleSelect(0))).TupleNotEqual(-1)))) != 0) + { + HOperatorSet.TupleSelect(hv_Tuple, hv_Indices, out hv_Selected); + } + + return; + } + + private void gen_fuzzy_weight_funct(HTuple hv_NPoints, + HTuple hv_Min, + HTuple hv_Max, + HTuple hv_LowPass, + HTuple hv_HighPass, + out HTuple hv_FuzzyFunct) + { + + // Local control variables + + HTuple hv_Ones, hv_Index, hv_X, hv_Y, hv_Dummy; + HTuple hv_IndicesTrans, hv_IndicesHigh, hv_i, hv_NTransPoints; + + // Initialize local and output iconic variables + + //generates a function which is 0.0 for values lower than LowPass, 1.0 for + //values over HighPass, and grows linearly for values in between the two + HOperatorSet.TupleGenConst(hv_NPoints, 1, out hv_Ones); + hv_Index = ((hv_Ones.TupleCumul()) - 1) / ((new HTuple(hv_Ones.TupleLength())).TupleReal() + ); + hv_X = (hv_Index * (hv_Max - hv_Min)) + hv_Min; + HOperatorSet.TupleGenConst(new HTuple(hv_X.TupleLength()), 0.0, out hv_Y); + tuple_equal_greater(hv_X, hv_LowPass, out hv_Dummy, out hv_IndicesTrans); + tuple_equal_greater(hv_X, hv_HighPass, out hv_Dummy, out hv_IndicesHigh); + //ramp from LowPass (0.0) to Highpass (1.0) + hv_i = 0; + while ((int)(new HTuple(((hv_IndicesTrans.TupleSelect(hv_i))).TupleLess(hv_IndicesHigh.TupleSelect( + 0)))) != 0) + { + hv_i = hv_i + 1; + } + hv_NTransPoints = hv_i.Clone(); + for (hv_i = 0; hv_i.Continue(hv_NTransPoints - 1, 1); hv_i = hv_i.TupleAdd(1)) + { + if (hv_Y == null) + hv_Y = new HTuple(); + hv_Y[hv_IndicesTrans.TupleSelect(hv_i)] = (hv_i.TupleReal()) / hv_NTransPoints; + } + for (hv_i = hv_IndicesTrans.TupleSelect(hv_NTransPoints); hv_i.Continue((new HTuple(hv_Y.TupleLength() + )) - 1, 1); hv_i = hv_i.TupleAdd(1)) + { + if (hv_Y == null) + hv_Y = new HTuple(); + hv_Y[hv_i] = 1.0; + } + HOperatorSet.CreateFunct1dPairs(hv_X, hv_Y, out hv_FuzzyFunct); + + return; + } + + + /// <summary> + /// Measures the tilt that is used for the plates in the set + /// of calibration images. The more tilted plates are used + /// in the image set, the better you can correct the radial + /// distortion of the lense by performing the calibration. + /// </summary> + public void eval_caltab_tilt(HTuple hv_FinalPoses, + out HTuple hv_TiltScore) + { + + // Local control variables + + HTuple hv_NImages, hv_Ones, hv_Index, hv_Slant; + HTuple hv_Pan, hv_FuzzyFunct, hv_SlantWeight, hv_PanWeight; + HTuple hv_TmpPan, hv_TmpSlant; + + // Initialize local and output iconic variables + + hv_NImages = (new HTuple(hv_FinalPoses.TupleLength())) / 7; + HOperatorSet.TupleGenConst(hv_NImages, 1, out hv_Ones); + hv_Index = (hv_Ones.TupleCumul()) - 1; + HOperatorSet.TupleSelect(hv_FinalPoses, (7 * hv_Index) + 3, out hv_Slant); + HOperatorSet.TupleSelect(hv_FinalPoses, (7 * hv_Index) + 4, out hv_Pan); + for (hv_Index = 0; (int)hv_Index <= (int)((new HTuple(hv_Slant.TupleLength())) - 1); hv_Index = (int)hv_Index + 1) + { + if ((int)(new HTuple(((hv_Slant.TupleSelect(hv_Index))).TupleGreater(180))) != 0) + { + if (hv_Slant == null) + hv_Slant = new HTuple(); + hv_Slant[hv_Index] = 360 - (hv_Slant.TupleSelect(hv_Index)); + } + } + for (hv_Index = 0; (int)hv_Index <= (int)((new HTuple(hv_Pan.TupleLength())) - 1); hv_Index = (int)hv_Index + 1) + { + if ((int)(new HTuple(((hv_Pan.TupleSelect(hv_Index))).TupleGreater(180))) != 0) + { + if (hv_Pan == null) + hv_Pan = new HTuple(); + hv_Pan[hv_Index] = 360 - (hv_Pan.TupleSelect(hv_Index)); + } + } + hv_Pan = hv_Pan.TupleRad(); + hv_Slant = hv_Slant.TupleRad(); + //function acting as a fuzzy weighting + gen_fuzzy_weight_funct(256, (new HTuple(0.0)).TupleRad(), (new HTuple(90.0)).TupleRad() + , (new HTuple(15.0)).TupleRad(), (new HTuple(40.0)).TupleRad(), out hv_FuzzyFunct); + HOperatorSet.GetYValueFunct1d(hv_FuzzyFunct, hv_Slant, "constant", out hv_SlantWeight); + HOperatorSet.GetYValueFunct1d(hv_FuzzyFunct, hv_Pan, "constant", out hv_PanWeight); + //Calculate score value + hv_TmpPan = (hv_PanWeight.TupleSum()) / 6; + hv_TmpPan = ((hv_TmpPan.TupleConcat(0.5))).TupleMin(); + hv_TmpSlant = (hv_SlantWeight.TupleSum()) / 6; + hv_TmpSlant = ((hv_TmpSlant.TupleConcat(0.5))).TupleMin(); + hv_TiltScore = hv_TmpSlant + hv_TmpPan; + + return; + } + + + /// <summary> + /// Evaluates the distribution of the marks and hence the plates + /// used for the calibration images. Precise measurements can only be + /// achieved if the field view of the camera is covered well by the + /// calibration plate in the images. + /// </summary> + public void eval_marks_distribution(HTuple hv_NRCoord, + HTuple hv_NCCoord, + HTuple hv_Width, + HTuple hv_Height, + out HTuple hv_MarksDistributionScore) + { + // Local iconic variables + + HObject ho_Region, ho_DistanceImage, ho_Mask; + + + // Local control variables + + HTuple hv_Border, hv_Min, hv_Max, hv_Range; + HTuple hv_ImageDiagonal, hv_MinThresh, hv_MaxThresh, hv_Ratio; + HTuple hv_Tmp1, hv_Tmp2; + + // Initialize local and output iconic variables + HOperatorSet.GenEmptyObj(out ho_Region); + HOperatorSet.GenEmptyObj(out ho_DistanceImage); + HOperatorSet.GenEmptyObj(out ho_Mask); + + //Determine the distances between the marks centers + ho_Region.Dispose(); + HOperatorSet.GenRegionPoints(out ho_Region, hv_NRCoord, hv_NCCoord); + ho_DistanceImage.Dispose(); + HOperatorSet.DistanceTransform(ho_Region, out ho_DistanceImage, "octagonal", + "false", hv_Width, hv_Height); + //A clipping is needed because the marks cannot come close to the border + hv_Border = (((hv_Width.TupleConcat(hv_Height))).TupleMax()) / 15; + ho_Mask.Dispose(); + HOperatorSet.GenRectangle1(out ho_Mask, hv_Border, hv_Border, (hv_Height - 1) - hv_Border, + (hv_Width - 1) - hv_Border); + HOperatorSet.MinMaxGray(ho_Mask, ho_DistanceImage, 0, out hv_Min, out hv_Max, + out hv_Range); + HOperatorSet.DistancePp(0, 0, hv_Height - 1, hv_Width - 1, out hv_ImageDiagonal); + hv_MinThresh = 0.3; + hv_MaxThresh = 0.85; + hv_Ratio = (hv_Max / hv_ImageDiagonal) * 2.5; + hv_Tmp1 = 1 - hv_Ratio; + hv_Tmp2 = (hv_Tmp1 - hv_MinThresh) / (hv_MaxThresh - hv_MinThresh); + hv_MarksDistributionScore = ((((((hv_Tmp2.TupleConcat(1.0))).TupleMin())).TupleConcat( + 0.0))).TupleMax(); + ho_Region.Dispose(); + ho_DistanceImage.Dispose(); + ho_Mask.Dispose(); + + return; + + } + + /// <summary> + /// Auxiliary method for display purposes. Returns the coordinate system + /// described by the parameters <c>hv_CamParam</c> and <c>hv_Pose</c> + /// as an iconic object. + /// </summary> + public void get_3d_coord_system(HObject ho_ImageReference, + out HObject ho_CoordSystemRegion, + HTuple hv_CamParam, + HTuple hv_Pose, + HTuple hv_CoordAxesLength) + { + + // Local iconic variables + + HObject ho_CoordSystemImage; + + + // Local control variables + + HTuple hv_Width, hv_Height, hv_OldBG, hv_WindowHandle; + + // Initialize local and output iconic variables + HOperatorSet.GenEmptyObj(out ho_CoordSystemRegion); + HOperatorSet.GenEmptyObj(out ho_CoordSystemImage); + + HOperatorSet.GetImageSize(ho_ImageReference, out hv_Width, out hv_Height); + HOperatorSet.GetWindowAttr("background_color", out hv_OldBG); + HOperatorSet.SetWindowAttr("background_color", "black"); + HOperatorSet.OpenWindow(0, 0, hv_Width, hv_Height, 0, "buffer", "", out hv_WindowHandle); + HOperatorSet.SetWindowAttr("background_color", hv_OldBG); + HOperatorSet.SetColor(hv_WindowHandle, "white"); + HOperatorSet.SetPart(hv_WindowHandle, 0, 0, hv_Height - 1, hv_Width - 1); + disp_3d_coord_system(hv_WindowHandle, hv_CamParam, hv_Pose, hv_CoordAxesLength); + ho_CoordSystemImage.Dispose(); + HOperatorSet.DumpWindowImage(out ho_CoordSystemImage, hv_WindowHandle); + HOperatorSet.CloseWindow(hv_WindowHandle); + ho_CoordSystemRegion.Dispose(); + HOperatorSet.Threshold(ho_CoordSystemImage, out ho_CoordSystemRegion, 255, 255); + ho_CoordSystemImage.Dispose(); + + return; + } + } +} diff --git a/HalconTools/ContourModule/ContourAssistant.cs b/HalconTools/ContourModule/ContourAssistant.cs new file mode 100644 index 0000000..c93a411 --- /dev/null +++ b/HalconTools/ContourModule/ContourAssistant.cs @@ -0,0 +1,224 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.IO; +using HalconDotNet; +using System.ComponentModel; + +namespace HalconTools +{ + public delegate void ContourDelegate(object sender, HImage image, ContourResult result); + + public class ContourAssistant + { + public event ContourDelegate ContourDone; + + /// <summary>HALCON image used for .</summary> + public HImage mImage; + public int mWidth; + public int mHeight; + + public HWndCtrl viewController; + public ROIController roiController; + + public ContourParam mContourPara = new ContourParam(); + public HObject mObject; + public HObject mThresholdObj; + public HObject mSelectObj; + + public ContourResult mContourResult = new ContourResult(); + + public ContourAssistant() + { + initObj(); + } + + public ContourAssistant(HWindowControl viewPort) + { + viewController = new HWndCtrl(viewPort); + roiController = new ROIController(); + + initObj(); + } + + public void initObj() + { + HOperatorSet.GenEmptyObj(out mObject); + mObject.Dispose(); + HOperatorSet.GenEmptyObj(out mThresholdObj); + mThresholdObj.Dispose(); + HOperatorSet.GenEmptyObj(out mSelectObj); + mSelectObj.Dispose(); + } + + public bool SetImage(string filename) + { + string tmp; + + try + { + mImage = new HImage(filename); + mImage.GetImagePointer1(out tmp, out mWidth, out mHeight); + } + catch (HOperatorException e) + { + mImage = null; + return false; + } + return true; + } + + public bool SetImage(HImage image) + { + string tmp; + + try + { + mImage = image; + mImage.GetImagePointer1(out tmp, out mWidth, out mHeight); + } + catch (HOperatorException e) + { + mImage = null; + return false; + } + return true; + } + + public HImage GetImage() + { + return mImage; + } + + /// <summary> + /// Writes the new image to graphic window + /// </summary> + public void UpdateImage() + { + viewController.resetAll(); + viewController.useROIController(roiController); + viewController.setViewState(HWndCtrl.MODE_VIEW_NONE); + + viewController.addIconicVar(mImage); + viewController.repaint(); + } + + public void UpdateObj(HObject obj) + { + viewController.resetAll(); + viewController.useROIController(roiController); + viewController.setViewState(HWndCtrl.MODE_VIEW_NONE); + + viewController.changeGraphicSettings(GraphicsContext.GC_COLOR, "blue"); + viewController.changeGraphicSettings(GraphicsContext.GC_LINEWIDTH, 1); + + viewController.addIconicVar(obj); + viewController.repaint(); + } + + public void UpdateObj(HObject obj, string color) + { + viewController.resetAll(); + viewController.useROIController(roiController); + viewController.setViewState(HWndCtrl.MODE_VIEW_NONE); + + viewController.changeGraphicSettings(GraphicsContext.GC_COLOR, color); + viewController.changeGraphicSettings(GraphicsContext.GC_LINEWIDTH, 1); + + viewController.addIconicVar(obj); + viewController.repaint(); + } + + public void SetPara(ContourParam para) + { + this.mContourPara.AreaMax = para.AreaMax; + this.mContourPara.AreaMin = para.AreaMin; + this.mContourPara.ThresholdMax = para.ThresholdMax; + this.mContourPara.ThresholdMin = para.ThresholdMin; + this.mContourPara.SelectObj = para.SelectObj; + } + + /// <summary> + /// 浜屽�煎寲鍥惧儚 + /// </summary> + /// <param name="image">鍥惧儚</param> + /// <returns></returns> + public HObject ThresholdObj(HImage image) + { + HObject tmpObj; + HOperatorSet.GenEmptyObj(out tmpObj); + tmpObj.Dispose(); + + HOperatorSet.Threshold(image, out tmpObj, mContourPara.ThresholdMin, mContourPara.ThresholdMax); + + return tmpObj; + } + + /// <summary> + /// 鏍规嵁闈㈢Н鍓旈櫎鐗╀綋 + /// </summary> + /// <param name="obj"></param> + /// <returns></returns> + public HObject SelectObj(HObject obj) + { + HObject tmpObj1, tmpObj2; + + //鍏堝皢鐗╀綋鍒嗗紑 + HOperatorSet.GenEmptyObj(out tmpObj1); + tmpObj1.Dispose(); + HOperatorSet.Connection(obj, out tmpObj1); + //閫夋嫨鐗╀綋 + HOperatorSet.GenEmptyObj(out tmpObj2); + tmpObj2.Dispose(); + HOperatorSet.SelectShape(tmpObj1, out tmpObj2, "area", "and", mContourPara.AreaMin, mContourPara.AreaMax); + + return tmpObj2; + } + + /// <summary> + /// 鏍规嵁搴忓彿閫夋嫨鐗╀綋 + /// </summary> + /// <param name="obj"></param> + /// <returns></returns> + public HObject Select(HObject obj) + { + HObject tmpObj; + HOperatorSet.GenEmptyObj(out tmpObj); + tmpObj.Dispose(); + HOperatorSet.SelectObj(obj, out tmpObj, mContourPara.SelectObj); + + return tmpObj; + } + + public void Run() + { + mThresholdObj = ThresholdObj(mImage); + mSelectObj = SelectObj(mThresholdObj); + + if (mSelectObj.CountObj() == 0) return; + + mObject = Select(mSelectObj); + + mContourResult.mObject = mObject; + + //鑾峰緱鍚勭缁撴灉 + HTuple Area = null, Row = null, Col = null, hv_Rows1 = null, hv_Columns1 = null; + + HOperatorSet.AreaCenter(mObject, out Area, out Row, out Col); + mContourResult.mArea = Area; + mContourResult.center_Row = Row; + mContourResult.center_Column =Col; + + HOperatorSet.GetRegionContour(mObject, out hv_Rows1, out hv_Columns1); + mContourResult.hv_Columns = hv_Columns1; + mContourResult.hv_Rows = hv_Rows1; + + if (ContourDone != null) + { + ContourDone(this, mImage, mContourResult); + } + } + + } +} diff --git a/HalconTools/ContourModule/ContourParam.cs b/HalconTools/ContourModule/ContourParam.cs new file mode 100644 index 0000000..6d827dc --- /dev/null +++ b/HalconTools/ContourModule/ContourParam.cs @@ -0,0 +1,33 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace HalconTools +{ + public class ContourParam + { + public int ThresholdMin { set; get; } + + public int ThresholdMax { set; get; } + + public int AreaMin { set; get; } + + public int AreaMax { set; get; } + + public int SelectObj { set; get; } + + public ContourParam() + { + } + + public ContourParam(int thresholdMin, int thresholdMax, int areaMin, int areaMax, int selectObj) + { + this.ThresholdMax = thresholdMax; + this.ThresholdMin = thresholdMin; + this.AreaMax = areaMax; + this.AreaMin = areaMin; + this.SelectObj = selectObj; + } + } +} \ No newline at end of file diff --git a/HalconTools/ContourModule/ContourResult.cs b/HalconTools/ContourModule/ContourResult.cs new file mode 100644 index 0000000..4c457fa --- /dev/null +++ b/HalconTools/ContourModule/ContourResult.cs @@ -0,0 +1,43 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using HalconDotNet; + +namespace HalconTools +{ + public class ContourResult + { + public ContourResult() + { + mContours = new HXLDCont(); + mContLine = new HXLDCont(); + mContPoints = new HXLDCont(); + + HOperatorSet.GenEmptyObj(out mObject); + // mObject.Dispose(); + } + + /// <summary> + /// Model contour applied for model detection + /// </summary> + public HXLDCont mContours; + + public HXLDCont mContLine; + + public HXLDCont mContPoints; + + public HTuple hv_Rows; + + public HTuple hv_Columns; + + public HTuple center_Row; + + public HTuple center_Column; + + public HTuple mArea; + + public HObject mObject; + + } +} diff --git a/HalconTools/FitModule/CirclePosition.cs b/HalconTools/FitModule/CirclePosition.cs new file mode 100644 index 0000000..45190c2 --- /dev/null +++ b/HalconTools/FitModule/CirclePosition.cs @@ -0,0 +1,29 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using HalconDotNet; + +namespace HalconTools +{ + public class CirclePosition + { + public double hv_Row { get; set; } + + public double hv_Column { get; set; } + + public double hv_Radius { get; set; } + + public CirclePosition(HTuple roiData) + { + this.hv_Row = roiData[0].D; + this.hv_Column = roiData[1].D; + this.hv_Radius = roiData[2].D; + } + + public CirclePosition() + { + + } + } +} diff --git a/HalconTools/FitModule/FitAssistant.cs b/HalconTools/FitModule/FitAssistant.cs new file mode 100644 index 0000000..4fee8e3 --- /dev/null +++ b/HalconTools/FitModule/FitAssistant.cs @@ -0,0 +1,419 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using HalconDotNet; +using System.ComponentModel; + +namespace HalconTools +{ + public delegate void FitMessageDelegate(int value); + + public delegate void SetImageDelegate(object sender, HImage image); + public delegate void FitLineDelegate(object sender, HImage image, FitLineResult result); + public delegate void FitCircleDelegate(object sender,HImage image,FitCircleResult result); + public class FitAssistant + { + public event FitLineDelegate FitLineDone; + public event FitCircleDelegate FitCircleDone; + public event FitMessageDelegate NotifyIconObserverMessage; + + private const int ERR_READING_FILE = 0; + + private const int ERR_NO_IMAGE = 1; + + private const int ERR_PARAMSET = 2; + + private const int ERR_FITLINE = 3; + + private const int ERR_FITCIRCLE = 4; + + + + /// <summary>HALCON image used for .</summary> + public HImage mImage; + public int mWidth; + public int mHeight; + + + public HWndCtrl viewController; + public ROIController roiController; + + /// <summary>Error messages for failed measure actions.</summary> + public HTuple exceptionText; + + private object someEventLock; + + public FitAssistant() + { + NotifyIconObserverMessage = new FitMessageDelegate(UpdateMessage); + someEventLock = new object(); + roiController = new ROIController(); + } + + public FitAssistant(HWindowControl viewPort) + { + NotifyIconObserverMessage = new FitMessageDelegate(UpdateMessage); + someEventLock = new object(); + + viewController = new HWndCtrl(viewPort); + roiController = new ROIController(); + } + + public void UpdateMessage(int val) + { + switch (val) + { + case FitAssistant.ERR_READING_FILE: + System.Windows.Forms.MessageBox.Show("Error Imge File!", + "Fit Wizard", + System.Windows.Forms.MessageBoxButtons.OK, + System.Windows.Forms.MessageBoxIcon.Information); + break; + case FitAssistant.ERR_NO_IMAGE: + System.Windows.Forms.MessageBox.Show("No Imge!", + "Fit Wizard", + System.Windows.Forms.MessageBoxButtons.OK, + System.Windows.Forms.MessageBoxIcon.Information); + break; + case FitAssistant.ERR_PARAMSET: + System.Windows.Forms.MessageBox.Show("Error param set!", + "Fit Wizard", + System.Windows.Forms.MessageBoxButtons.OK, + System.Windows.Forms.MessageBoxIcon.Information); + break; + case FitAssistant.ERR_FITLINE: + System.Windows.Forms.MessageBox.Show("Error fit line!", + "Fit Wizard", + System.Windows.Forms.MessageBoxButtons.OK, + System.Windows.Forms.MessageBoxIcon.Information); + break; + case FitAssistant.ERR_FITCIRCLE: + System.Windows.Forms.MessageBox.Show("Error fit circle!", + "Fit Wizard", + System.Windows.Forms.MessageBoxButtons.OK, + System.Windows.Forms.MessageBoxIcon.Information); + break; + default: + break; + } + } + + public bool SetImage(string filename) + { + string tmp; + + exceptionText = ""; + try + { + mImage = new HImage(filename); + mImage.GetImagePointer1(out tmp, out mWidth, out mHeight); + } + catch (HOperatorException e) + { + mImage = null; + exceptionText = e.Message; + NotifyIconObserverMessage(FitAssistant.ERR_READING_FILE); + return false; + } + return true; + } + + public bool SetImage(HImage image) + { + string tmp; + + exceptionText = ""; + try + { + mImage = image; + mImage.GetImagePointer1(out tmp, out mWidth, out mHeight); + } + catch (HOperatorException e) + { + mImage = null; + exceptionText = e.Message; + NotifyIconObserverMessage(FitAssistant.ERR_READING_FILE); + return false; + } + return true; + } + + /// <summary> + /// Writes the new image to graphic window + /// </summary> + public void UpdateImage() + { + //viewController = new HWndCtrl(viewPort); + //roiController = new ROIController(); + viewController.resetAll(); + viewController.useROIController(roiController); + viewController.setViewState(HWndCtrl.MODE_VIEW_NONE); + + viewController.addIconicVar(mImage); + viewController.repaint(); + } + + public LinePosition GetLinePosition() + { + LinePosition position; + int activeROIIdx = roiController.getActiveROIIdx(); + if (activeROIIdx > -1) + { + ROI line = roiController.getActiveROI(); + HTuple ss = line.getModelData(); + if (ss.Length == 4) + { + position = new LinePosition(ss); + } + else + { + position = null; + } + } + else + { + position = null; + } + return position; + } + + public CirclePosition GetCirClePosition() + { + CirclePosition position; + int activeROIIdx = roiController.getActiveROIIdx(); + if (activeROIIdx > -1) + { + ROI circle = roiController.getActiveROI(); + HTuple ss = circle.getModelData(); + if (ss.Length == 3) + { + position = new CirclePosition(ss); + } + else + { + position = null; + } + } + else + { + position = null; + } + + return position; + } + + /// <summary> + /// 鍦ㄦ寚瀹氱獥浣撲腑鏄剧ずFit鍒扮殑缁撴灉 + /// </summary> + /// <param name="viewPort">鍥惧儚鏄剧ず绐椾綋</param> + /// <param name="CurrentImg">鍥惧儚</param> + /// <param name="result">鍖归厤缁撴灉</param> + public void FitLineGraphics(HWndCtrl viewController, HImage CurrentImg, FitLineResult result) + { + //Window control that manages visualization + + viewController.resetAll(); + viewController.repaint(); + + viewController.changeGraphicSettings(GraphicsContext.GC_LINESTYLE, new HTuple()); + viewController.addIconicVar(CurrentImg); + HXLD DetectionContour = result.mFitLineResult; + if (DetectionContour != null) + { + viewController.changeGraphicSettings(GraphicsContext.GC_COLOR, "green"); + viewController.changeGraphicSettings(GraphicsContext.GC_LINEWIDTH, 2); + viewController.addIconicVar(DetectionContour); + + viewController.repaint(); + } + } + + public void FitCircleGraphics(HWndCtrl viewController, HImage CurrentImg, FitCircleResult result) + { + //Window control that manages visualization + + viewController.resetAll(); + viewController.repaint(); + + viewController.changeGraphicSettings(GraphicsContext.GC_LINESTYLE, new HTuple()); + viewController.addIconicVar(CurrentImg); + HXLD DetectionContour = result.mFitCircleResult; + if (DetectionContour != null) + { + viewController.changeGraphicSettings(GraphicsContext.GC_COLOR, "green"); + viewController.changeGraphicSettings(GraphicsContext.GC_LINEWIDTH, 2); + viewController.addIconicVar(DetectionContour); + + viewController.repaint(); + } + } + + public FitLineResult FitLine(FitLineParam param) + { + double t2, t1; + //HTuple hv_rows=null,hv_column=null; + FitLineResult result = new FitLineResult(); + + if (mImage == null) + { + if (NotifyIconObserverMessage != null) + { + NotifyIconObserverMessage(FitAssistant.ERR_NO_IMAGE); + } + return result; + } + + if (param == null) + { + if (NotifyIconObserverMessage != null) + { + NotifyIconObserverMessage(FitAssistant.ERR_PARAMSET); + } + return result; + } + + try + { + lock (someEventLock) + { + t1 = HSystem.CountSeconds(); + + mImage.GetImageSize(out result.mWidth,out result.mHeight); + HMetrologyModel hv_MetrologyHandle = new HMetrologyModel(); + hv_MetrologyHandle.CreateMetrologyModel(); + hv_MetrologyHandle.SetMetrologyModelImageSize(result.mWidth, result.mHeight); + hv_MetrologyHandle.AddMetrologyObjectLineMeasure((HTuple)param.hv_RowBegin, (HTuple)param.hv_ColumnBegin, + (HTuple)param.hv_RowEnd, (HTuple)param.hv_ColumnEnd, (HTuple)param.hv_measure_Length1, (HTuple)param.hv_measure_Length2, + (HTuple)param.hv_measure_sigma, (HTuple)param.hv_measure_threshold, new HTuple(), new HTuple()); + + hv_MetrologyHandle.SetMetrologyObjectParam((HTuple)"all", (HTuple)"measure_length1", (HTuple)param.hv_measure_Length1); + hv_MetrologyHandle.SetMetrologyObjectParam((HTuple)"all", (HTuple)"measure_length2", (HTuple)param.hv_measure_Length2); + hv_MetrologyHandle.SetMetrologyObjectParam((HTuple)"all", (HTuple)"num_measures", (HTuple)param.hv_measure_number); + hv_MetrologyHandle.SetMetrologyObjectParam((HTuple)"all", (HTuple)"measure_select", (HTuple)param.hv_measure_position.ToString()); + hv_MetrologyHandle.SetMetrologyObjectParam((HTuple)"all", (HTuple)"measure_transition", (HTuple)param.hv_measure_transition.ToString()); + + hv_MetrologyHandle.ApplyMetrologyModel(mImage); + + result.mContours = hv_MetrologyHandle.GetMetrologyObjectMeasures("all", "all", out result.hv_Rows, out result.hv_Columns); + result.mContLine.GenContourPolygonXld((HTuple)result.hv_Rows, (HTuple)result.hv_Columns); + result.mContPoints.GenCrossContourXld((HTuple)result.hv_Rows, (HTuple)result.hv_Columns, 6, 0.785398); + + result.mContLine.FitLineContourXld("tukey", (int)(param.hv_measure_number - 10), 3, 5, 2.0, + out result.mRowStart, out result.mColumnStart, out result.mRowEnd, out result.mColumnEnd, + out result.mVector, out result.mNC, out result.mDist); + + HTuple rows, cols; + + rows = new HTuple(new HTuple[] { result.mRowStart, result.mRowEnd }); + cols = new HTuple(new HTuple[] { result.mColumnStart, result.mColumnEnd }); + + result.mFitLineResult.GenContourPolygonXld(rows, cols); + + //result.mAngle = result.mFitLineResult.GetContourAttribXld("angle"); + + //result.mAngle = result.mFitLineResult.GetContourAngleXld("abs", "range", 3); + + t2 = HSystem.CountSeconds(); + result.mTime = 1000.0 * (t2 - t1); + + if (FitLineDone != null) + { + FitLineDone(this, mImage, result); + } + } + } + catch(HOperatorException e) + { + if (NotifyIconObserverMessage != null) + { + //NotifyIconObserverMessage(FitAssistant.ERR_FITLINE); + } + result = null; + return result; + } + + return result; + } + + public FitCircleResult FitCircle(FitCircleParam param) + { + double t2, t1; + FitCircleResult result = new FitCircleResult(); + + if (mImage == null) + { + if (NotifyIconObserverMessage != null) + { + NotifyIconObserverMessage(FitAssistant.ERR_NO_IMAGE); + } + return result; + } + + if (param == null) + { + if (NotifyIconObserverMessage != null) + { + NotifyIconObserverMessage(FitAssistant.ERR_PARAMSET); + } + return result; + } + + try + { + lock (someEventLock) + { + t1 = HSystem.CountSeconds(); + + mImage.GetImageSize(out result.mWidth, out result.mHeight); + HMetrologyModel hv_MetrologyHandle = new HMetrologyModel(); + hv_MetrologyHandle.CreateMetrologyModel(); + hv_MetrologyHandle.SetMetrologyModelImageSize(result.mWidth, result.mHeight); + hv_MetrologyHandle.AddMetrologyObjectCircleMeasure((HTuple)param.hv_RowCenter, (HTuple)param.hv_ColumnCenter, (HTuple)param.hv_Radius, + (HTuple)param.hv_measure_Length1, (HTuple)param.hv_measure_Length2, (HTuple)param.hv_measure_sigma, (HTuple)param.hv_measure_threshold, + new HTuple(), new HTuple()); + + hv_MetrologyHandle.SetMetrologyObjectParam((HTuple)"all", (HTuple)"measure_length1", (HTuple)param.hv_measure_Length1); + hv_MetrologyHandle.SetMetrologyObjectParam((HTuple)"all", (HTuple)"measure_length2", (HTuple)param.hv_measure_Length2); + hv_MetrologyHandle.SetMetrologyObjectParam((HTuple)"all", (HTuple)"num_measures", (HTuple)param.hv_measure_number); + hv_MetrologyHandle.SetMetrologyObjectParam((HTuple)"all", (HTuple)"measure_select", (HTuple)param.hv_measure_position.ToString()); + hv_MetrologyHandle.SetMetrologyObjectParam((HTuple)"all", (HTuple)"measure_transition", (HTuple)param.hv_measure_transition.ToString()); + + hv_MetrologyHandle.ApplyMetrologyModel(mImage); + + result.mContours = hv_MetrologyHandle.GetMetrologyObjectMeasures("all", "all", out result.hv_Rows, out result.hv_Columns); + result.mContCircle.GenContourPolygonXld((HTuple)result.hv_Rows, (HTuple)result.hv_Columns); + result.mContPoints.GenCrossContourXld((HTuple)result.hv_Rows, (HTuple)result.hv_Columns, 6, 0.785398); + + result.mContCircle.FitCircleContourXld("ahuber", -1, 2.0, 4, 3, 2.0, + out result.mRowCenter, out result.mColumnCenter, out result.mRadius, + out result.mStartPhi, out result.mEndPhi, out result.mPointOrder); + + result.mFitCircleResult.GenCircleContourXld(result.mRowCenter, result.mColumnCenter, result.mRadius, + 0, (new HTuple(360)).TupleRad(), (HTuple)"positive", 1.0); + + t2 = HSystem.CountSeconds(); + result.mTime = 1000.0 * (t2 - t1); + + if (FitCircleDone != null) + { + FitCircleDone(this, mImage, result); + } + } + } + catch(HOperatorException e) + { + if (NotifyIconObserverMessage != null) + { + //NotifyIconObserverMessage(FitAssistant.ERR_FITCIRCLE); + } + result = null; + return result; + } + + return result; + } + + } + +} diff --git a/HalconTools/FitModule/FitCircleParam.cs b/HalconTools/FitModule/FitCircleParam.cs new file mode 100644 index 0000000..078ada2 --- /dev/null +++ b/HalconTools/FitModule/FitCircleParam.cs @@ -0,0 +1,38 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace HalconTools +{ + public class FitCircleParam + { + public double hv_RowCenter { get; set; } + + public double hv_ColumnCenter { get; set; } + + public double hv_Radius { get; set; } + + /// <summary> + /// ROI height + /// </summary> + public double hv_measure_Length1 { get; set; } + + /// <summary> + /// ROI width + /// </summary> + public double hv_measure_Length2 { get; set; } + + public double hv_measure_sigma { get; set; } + + public double hv_measure_threshold { get; set; } + + public double hv_measure_number { get; set; } + + public string hv_measure_position { get; set; } + + public string hv_measure_transition { get; set; } + + public string hv_measure_interpolation { get; set; } + } +} diff --git a/HalconTools/FitModule/FitCircleResult.cs b/HalconTools/FitModule/FitCircleResult.cs new file mode 100644 index 0000000..5528d36 --- /dev/null +++ b/HalconTools/FitModule/FitCircleResult.cs @@ -0,0 +1,118 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using HalconDotNet; + +namespace HalconTools +{ + public class FitCircleResult + { + /// <summary> + /// Model contour applied for model detection + /// </summary> + public HXLD mContours; + + public HXLDCont mContCircle; + + public HXLDCont mContPoints; + + /// <summary> + /// All circle contours detected + /// </summary> + public HXLDCont mFitCircleResult; + + /// <summary> + /// Row coordinate of the found instances of the model + /// </summary> + public HTuple mRow; + /// <summary> + /// Column coordinate of the found instances of the model + /// </summary> + public HTuple mCol; + + //Fit result + public HTuple mRowCenter; + + public HTuple mColumnCenter; + + public HTuple mRadius; + + public HTuple mStartPhi; + + public HTuple mEndPhi; + + public HTuple mPointOrder; + + /// <summary> + /// Rotation angle of the found instances of the model + /// </summary> + public HTuple mAngle; + + public HTuple hv_Rows; + + public HTuple hv_Columns; + + /// <summary> + /// Image Width + /// </summary> + public int mWidth; + + /// <summary> + /// Image Height + /// </summary> + public int mHeight; + + /// <summary> + /// Time needed to detect <c>count</c> numbers of model instances + /// </summary> + public double mTime; + /// <summary> + /// Number of model instances found + /// </summary> + public int count; + /// <summary> + /// 2D homogeneous transformation matrix that can be used to transform + /// data from the model into the test image. + /// </summary> + public HHomMat2D hmat; + + /// <summary>Constructor</summary> + public FitCircleResult() + { + hmat = new HHomMat2D(); + mFitCircleResult = new HXLDCont(); + mContCircle = new HXLDCont(); + mContPoints = new HXLDCont(); + } + + + /// <summary> + /// Gets the detected contour. + /// </summary> + /// <returns>Detected contour</returns> + public HXLDCont getDetectionResults() + { + HXLDCont rContours = new HXLDCont(); + hmat.HomMat2dIdentity(); + mFitCircleResult.GenEmptyObj(); + + //for (int i = 0; i < count; i++) + //{ + // hmat.VectorAngleToRigid(0, 0, 0, mRow[i].D, mCol[i].D, mAngle[i].D); + // rContours = hmat.AffineTransContourXld(mContour); + // mFitLineResult = mFitLineResult.ConcatObj(rContours); + //} + return mFitCircleResult; + } + + + /// <summary> + /// Resets the detection results and sets count to 0. + /// </summary> + public void reset() + { + count = 0; + } + } +} diff --git a/HalconTools/FitModule/FitLineParam.cs b/HalconTools/FitModule/FitLineParam.cs new file mode 100644 index 0000000..e430c97 --- /dev/null +++ b/HalconTools/FitModule/FitLineParam.cs @@ -0,0 +1,41 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace HalconTools +{ + public class FitLineParam + { + public double hv_RowBegin { get; set; } + + public double hv_ColumnBegin { get; set; } + + public double hv_RowEnd { get; set; } + + public double hv_ColumnEnd { get; set; } + + /// <summary> + /// ROI height + /// </summary> + public double hv_measure_Length1 { get; set; } + + /// <summary> + /// ROI width + /// </summary> + public double hv_measure_Length2 { get; set; } + + public double hv_measure_sigma { get; set; } + + public double hv_measure_threshold { get; set; } + + public double hv_measure_number { get; set; } + + public string hv_measure_position { get; set; } + + public string hv_measure_transition { get; set; } + + public string hv_measure_interpolation { get; set; } + + } +} diff --git a/HalconTools/FitModule/FitLineResult.cs b/HalconTools/FitModule/FitLineResult.cs new file mode 100644 index 0000000..6a7ba34 --- /dev/null +++ b/HalconTools/FitModule/FitLineResult.cs @@ -0,0 +1,117 @@ +锘縰sing System; +using HalconDotNet; + +namespace HalconTools +{ + public class FitLineResult + { + /// <summary> + /// Model contour applied for model detection + /// </summary> + public HXLDCont mContours; + + public HXLDCont mContLine; + + public HXLDCont mContPoints; + + /// <summary> + /// All model contours detected + /// </summary> + public HXLDCont mFitLineResult; + + /// <summary> + /// Row coordinate of the found instances of the model + /// </summary> + public HTuple mRow; + /// <summary> + /// Column coordinate of the found instances of the model + /// </summary> + public HTuple mCol; + + //Fit result + public HTuple mRowStart; + + public HTuple mColumnStart; + + public HTuple mRowEnd; + + public HTuple mColumnEnd; + + public HTuple mVector; + + public HTuple mNC; + + public HTuple mDist; + + /// <summary> + /// Rotation angle of the found instances of the model + /// </summary> + public HTuple mAngle; + + public HTuple hv_Rows; + + public HTuple hv_Columns; + + /// <summary> + /// Image Width + /// </summary> + public int mWidth; + + /// <summary> + /// Image Height + /// </summary> + public int mHeight; + + /// <summary> + /// Time needed to detect <c>count</c> numbers of model instances + /// </summary> + public double mTime; + /// <summary> + /// Number of model instances found + /// </summary> + public int count; + /// <summary> + /// 2D homogeneous transformation matrix that can be used to transform + /// data from the model into the test image. + /// </summary> + public HHomMat2D hmat; + + /// <summary>Constructor</summary> + public FitLineResult() + { + hmat = new HHomMat2D(); + mFitLineResult = new HXLDCont(); + mContLine = new HXLDCont(); + mContPoints = new HXLDCont(); + } + + + /// <summary> + /// Gets the detected contour. + /// </summary> + /// <returns>Detected contour</returns> + public HXLDCont getDetectionResults() + { + HXLDCont rContours = new HXLDCont(); + hmat.HomMat2dIdentity(); + mFitLineResult.GenEmptyObj(); + + //for (int i = 0; i < count; i++) + //{ + // hmat.VectorAngleToRigid(0, 0, 0, mRow[i].D, mCol[i].D, mAngle[i].D); + // rContours = hmat.AffineTransContourXld(mContour); + // mFitLineResult = mFitLineResult.ConcatObj(rContours); + //} + return mFitLineResult; + } + + + /// <summary> + /// Resets the detection results and sets count to 0. + /// </summary> + public void reset() + { + count = 0; + } + } +} diff --git a/HalconTools/FitModule/FitModule.csproj b/HalconTools/FitModule/FitModule.csproj new file mode 100644 index 0000000..476dd2d --- /dev/null +++ b/HalconTools/FitModule/FitModule.csproj @@ -0,0 +1,107 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>9.0.21022</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{4C6E72DB-DEF1-4F3F-94E4-883FDEDBB7C8}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>FitModule</RootNamespace> + <AssemblyName>FitModule</AssemblyName> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <StartupObject> + </StartupObject> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="halcondotnet, Version=11.0.2.0, Culture=neutral, PublicKeyToken=4973bed59ddbf2b8, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>C:\Program Files\MVTec\HALCON-11.0\bin\dotnet35\halcondotnet.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Core"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> + <Reference Include="System.Xml.Linq"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> + <Reference Include="System.Data.DataSetExtensions"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> + <Reference Include="System.Data" /> + <Reference Include="System.Deployment" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="CirclePosition.cs" /> + <Compile Include="FitAssistant.cs" /> + <Compile Include="FitCircleParam.cs" /> + <Compile Include="FitCircleResult.cs" /> + <Compile Include="FitLineParam.cs" /> + <Compile Include="FitLineResult.cs" /> + <Compile Include="FitResult.cs" /> + <Compile Include="Form1.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="Form1.Designer.cs"> + <DependentUpon>Form1.cs</DependentUpon> + </Compile> + <Compile Include="LineMetrology.cs" /> + <Compile Include="LinePosition.cs" /> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + <SubType>Designer</SubType> + </EmbeddedResource> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\ViewROI\ViewROI.csproj"> + <Project>{C4F5C5DE-7EA8-47FE-8218-48138F48965F}</Project> + <Name>ViewROI</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/HalconTools/FitModule/FitResult.cs b/HalconTools/FitModule/FitResult.cs new file mode 100644 index 0000000..a3991b2 --- /dev/null +++ b/HalconTools/FitModule/FitResult.cs @@ -0,0 +1,15 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace HalconTools +{ + public class FitResult + { + public FitLineResult LineResult { get; set; } + + public FitCircleResult CircleResult { get; set; } + + } +} diff --git a/HalconTools/FitModule/LineMetrology.cs b/HalconTools/FitModule/LineMetrology.cs new file mode 100644 index 0000000..46ef865 --- /dev/null +++ b/HalconTools/FitModule/LineMetrology.cs @@ -0,0 +1,52 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.ComponentModel; + +namespace HalconTools +{ + public class LineMetrology + { + public double hv_RowBegin { get; set; } + + public double hv_ColumnBegin { get; set; } + + public double hv_RowEnd { get; set; } + + public double hv_ColumnEnd { get; set; } + + [DefaultValue(1.0)] + public double hv_measure_sigma = 1.0; + + [DefaultValue(40.0)] + public double hv_measure_threshold = 40.0; + + [DefaultValue(10)] + public double hv_num_measures = 10; + + public measure_select hv_measure_select { get; set; } + + public measure_transition hv_measure_transition { get; set; } + + + [DefaultValue("first")] + public enum measure_select + { + first, + last, + all + } + + [DefaultValue("positive")] + public enum measure_transition + { + positive, + negative, + all + } + + + + } +} diff --git a/HalconTools/FitModule/LinePosition.cs b/HalconTools/FitModule/LinePosition.cs new file mode 100644 index 0000000..ee64049 --- /dev/null +++ b/HalconTools/FitModule/LinePosition.cs @@ -0,0 +1,33 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using HalconDotNet; + +namespace HalconTools +{ + public class LinePosition + { + public double hv_RowBegin { get; set; } + + public double hv_ColumnBegin { get; set; } + + public double hv_RowEnd { get; set; } + + public double hv_ColumnEnd { get; set; } + + + public LinePosition(HTuple position) + { + this.hv_RowBegin = position[0].D; + this.hv_ColumnBegin = position[1].D; + this.hv_RowEnd = position[2].D; + this.hv_ColumnEnd = position[3].D; + } + + public LinePosition() + { + + } + } +} diff --git a/HalconTools/HalconTool.cs b/HalconTools/HalconTool.cs new file mode 100644 index 0000000..d9a91b4 --- /dev/null +++ b/HalconTools/HalconTool.cs @@ -0,0 +1,624 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Windows.Forms; +using HalconDotNet; + +namespace HalconTools +{ + public class HalconTool + { + #region 鍚勭鍗曟柟娉曚互鍙婂畾涔� + + #region 瀹氫箟 + public HWndCtrl viewController; + + public ListenEventCreater resultCreater = new ListenEventCreater(); + + public struct FindLineResult + { + public string SerialNumer; + public FitLineResult fitLineResult; + } + + public struct FindCircleResult + { + public string SerialNumber; + public FitCircleResult fitCircleResult; + } + + public struct PatternMatchResult + { + public string SerialNumber; + public MatchingResult matchingResult; + } + + public struct FindContourResult + { + public string SerialNumber; + public ContourResult contourResult; + } + + public List<FindLineResult> findLineResults = new List<FindLineResult>(); + public List<FindCircleResult> findCircleResults = new List<FindCircleResult>(); + public List<PatternMatchResult> patternMatchResults = new List<PatternMatchResult>(); + + public FindLineResult findLineResult = new FindLineResult(); + public FindCircleResult findCircleResult = new FindCircleResult(); + public PatternMatchResult patternMatchResult = new PatternMatchResult(); + public FindContourResult contourResult = new FindContourResult(); + + public FitAssistant mFitAssistant = new FitAssistant(); + public HImage image; + public FitLineResult result; + public MatchingAssistant mMatchingAssistant = new MatchingAssistant(); + public ContourAssistant mContourAssistant = new ContourAssistant(); + + + public FitLineParam fitLinePara = new FitLineParam(); + public FitCircleParam fitCirclePara = new FitCircleParam(); + public MatchingParam matchingPara = new MatchingParam(); + public ContourParam contourPara = new ContourParam(); + public HImage hImage; + + public List<FitLineParam> fitLineParas = new List<FitLineParam>(); + public List<FitCircleParam> fitCircleParas = new List<FitCircleParam>(); + SerializeFileTool<List<FitLineParam>> sft1 = new SerializeFileTool<List<FitLineParam>>(); + SerializeFileTool<List<FitCircleParam>> sft2 = new SerializeFileTool<List<FitCircleParam>>(); + #endregion + + #region 鍒濆鍖� + public void initHalconTool() + { + mFitAssistant.FitLineDone += new FitLineDelegate(mFitAssistant_FitLineDone); + mFitAssistant.FitCircleDone += new FitCircleDelegate(mFitAssistant_FitCircleDone); + mFitAssistant.NotifyIconObserverMessage += new FitMessageDelegate(mFitAssistant_NotifyIconObserverMessage); + mMatchingAssistant.FindShapeModelDone += new FindShapeModelDelegate(mMatchingAssistant_FindShapeModelDone); + mContourAssistant.ContourDone += new ContourDelegate(mContourAssistant_ContourDone); + //mMatchingAssistant .NotifyIconObserver+= + + string FolderPath = Application.StartupPath + "\\FitConfig"; + string FilePath; + + FilePath = FolderPath + "\\fitLineConfig.xml"; + fitLineParas = sft1.GetConfig(FilePath); + + FilePath = FolderPath + "\\fitCircleConfig.xml"; + fitCircleParas = sft2.GetConfig(FilePath); + } + + + + public HalconTool() + { + JobImage = new HImage(); + mFitAssistant = new FitAssistant(); + mMatchingAssistant = new MatchingAssistant(); + initHalconTool(); + } + + /// <summary> + /// + /// </summary> + /// <param name="viewPort">fit绠楁硶鐨勭獥鍙�</param> + /// <param name="ModuleNum">鍖归厤鐨勬ā鏉挎暟閲�</param> + public HalconTool(HWindowControl viewPort, int ModuleNum) + { + mFitAssistant = new FitAssistant(viewPort); + mMatchingAssistant = new MatchingAssistant(ModuleNum); + initHalconTool(); + } + + /// <summary> + /// + /// </summary> + /// <param name="viewPort">fit绠楁硶鐨勭獥鍙�</param> + public HalconTool(HWindowControl viewPort) + { + mFitAssistant = new FitAssistant(viewPort); + initHalconTool(); + } + + /// <summary> + /// + /// </summary> + /// <param name="ModuleNum">鍖归厤鐨勬ā鏉挎暟閲�</param> + public HalconTool(int ModuleNum) + { + mMatchingAssistant = new MatchingAssistant(ModuleNum); + initHalconTool(); + } + #endregion + + #region 娑堟伅澶勭悊閮ㄥ垎 + void mFitAssistant_FitCircleDone(object sender, HImage image, FitCircleResult result) + { + if (findCircleResults == null) findCircleResults = new List<FindCircleResult>(); + findCircleResult.fitCircleResult = result; + + findCircleResults.Add(findCircleResult); + + //鍙嶉娑堟伅 + resultCreater.ChangeValue(new EventData("FindCircleDone")); + } + + void mFitAssistant_FitLineDone(object sender, HImage image, FitLineResult result) + { + ////鐢讳笂鎵惧埌鐨勭粨鏋� + //mFitAssistant.FitLineGraphics(mFitAssistant.viewController, image, result); + + //缁撴灉澶勭悊 + if (findLineResults == null) findLineResults = new List<FindLineResult>(); + findLineResult.fitLineResult = result; + + findLineResults.Add(findLineResult); + + //鍙嶉娑堟伅 + resultCreater.ChangeValue(new EventData("FindLineDone")); + } + + + void mMatchingAssistant_FindShapeModelDone(object sender, HImage image, MatchingResult result) + { + if (patternMatchResults == null) patternMatchResults = new List<PatternMatchResult>(); + patternMatchResult.matchingResult = result; + + patternMatchResults.Add(patternMatchResult); + + resultCreater.ChangeValue(new EventData("MatchDone")); + } + + void mFitAssistant_NotifyIconObserverMessage(int value) + { + //鍙嶉娌℃湁鎵惧埌鐨勬秷鎭� + resultCreater.ChangeValue(new EventData("CanNotFind")); + } + + void mContourAssistant_ContourDone(object sender, HImage image, ContourResult result) + { + contourResult.contourResult = result; + resultCreater.ChangeValue(new EventData("ContourDone")); + } + #endregion + + #region 鎵剧嚎鎵惧渾閮ㄥ垎 + /// <summary> + /// 鎵剧洿绾� + /// </summary> + /// <param name="sn">搴忓垪鍙�</param> + /// <param name="image">Halcon鍥惧儚</param> + /// <param name="para">鎵剧洿绾垮弬鏁�</param> + public void FindLine(string sn, HImage image, FitLineParam para) + { + findLineResult.SerialNumer = sn; + mFitAssistant.mImage = image; + mFitAssistant.FitLine(para); + } + + /// <summary> + /// 鎵惧渾 + /// </summary> + /// <param name="sn">搴忓垪鍙�</param> + /// <param name="image">Halcon鍥惧儚</param> + /// <param name="para">鎵惧渾鍙傛暟</param> + public void FindCircle(string sn, HImage image, FitCircleParam para) + { + findCircleResult.SerialNumber = sn; + mFitAssistant.mImage = image; + mFitAssistant.FitCircle(para); + } + + /// <summary> + /// 閫氳繃鍏ㄥ眬鍙橀噺鍙傛暟鎵剧洿绾� + /// </summary> + private void ThFindLine() + { + mFitAssistant.mImage = hImage; + mFitAssistant.FitLine(fitLinePara); + } + + /// <summary> + /// 閫氳繃鍏ㄥ眬鍙橀噺鍙傛暟鎵惧渾 + /// </summary> + private void ThFindCircle() + { + mFitAssistant.mImage = hImage; + mFitAssistant.FitCircle(fitCirclePara); + } + + /// <summary> + /// 鐢ㄨ繘绋嬫壘鐩寸嚎 + /// </summary> + /// <param name="sn"></param> + /// <param name="image"></param> + /// <param name="para"></param> + public void ThreadFindLine(string sn, HImage image, FitLineParam para) + { + hImage = image; + fitLinePara = para; + + Thread findLineThread = new Thread(ThFindLine); + findLineThread.Start(); + } + + /// <summary> + /// 鐢ㄨ繘绋嬫壘鍦� + /// </summary> + /// <param name="sn"></param> + /// <param name="image"></param> + /// <param name="para"></param> + public void ThreadFindCircle(string sn, HImage image, FitCircleParam para) + { + hImage = image; + fitCirclePara = para; + + Thread findCircleThread = new Thread(ThFindCircle); + findCircleThread.Start(); + } + #endregion + + #region 鍖归厤閮ㄥ垎 + /// <summary> + /// 鍒涘缓妯℃澘锛堣幏鍙栨ā鏉縄D锛� + /// </summary> + /// <param name="sn">搴忓垪鍙�</param> + /// <param name="image">鍥惧儚</param> + /// <param name="para">鍙傛暟</param> + public void CreateModule(string sn, HImage image, MatchingParam para) + { + patternMatchResult.SerialNumber = sn; + mMatchingAssistant.mImage = image; + mMatchingAssistant.parameterSet = para; + + mMatchingAssistant.createShapeModel(); + } + + /// <summary> + /// 鍖归厤妯℃澘锛堝凡寰楀埌妯℃澘ID锛� + /// </summary> + /// <param name="sn">搴忓垪鍙�</param> + /// <param name="image">鍥惧儚</param> + /// <param name="para">鍙傛暟</param> + public void FindModule(string sn, HImage image, MatchingParam para) + { + patternMatchResult.SerialNumber = sn; + mMatchingAssistant.mImage = image; + mMatchingAssistant.parameterSet = para; + + mMatchingAssistant.detectShapeModel(); + } + + /// <summary> + /// 鏍规嵁妯℃澘鐨勫湴鍧�鍖归厤 + /// </summary> + /// <param name="sn">搴忓垪鍙�</param> + /// <param name="image">鍥惧儚</param> + /// <param name="para">鍙傛暟</param> + /// <param name="modulePath">妯℃澘鏂囦欢鍦板潃</param> + public void PatterMatchWithModule(string sn, HImage image, MatchingParam para, string modulePath) + { + patternMatchResult.SerialNumber = sn; + mMatchingAssistant.tImage = image; + mMatchingAssistant.parameterSet = para; + + + mMatchingAssistant.loadShapeModel(modulePath); + mMatchingAssistant.detectShapeModel(); + } + #endregion + + #region 鎵捐疆寤撻儴鍒� + public void FindContour(string sn, HImage image, ContourParam para) + { + contourResult.SerialNumber = sn; + mContourAssistant.mImage = image; + mContourAssistant.mContourPara = para; + mContourAssistant.Run(); + } + #endregion + + #region 鍔犺浇鍙傛暟 + /// <summary> + /// 鍔犺浇鍖归厤鍙傛暟 + /// </summary> + /// <param name="ParaPath"></param> + public void LoadMatchingParameter(string ParaPath) + { + mMatchingAssistant.LoadPara(ParaPath); + matchingPara = mMatchingAssistant.parameterSet; + } + + /// <summary> + /// 鍔犺浇鎵剧洿绾跨殑鍙傛暟 + /// </summary> + /// <param name="ParaPath">鍙傛暟鏂囦欢鍦板潃</param> + public void LoadFitLineParameter(string ParaPath) + { + MeasureParamSave paramSave = new HalconTools.MeasureParamSave(); + paramSave = paramSave.Load(ParaPath); + + fitLinePara.hv_measure_Length1 = paramSave.hv_measure_Length1; + fitLinePara.hv_measure_Length2 = paramSave.hv_measure_Length2; + fitLinePara.hv_measure_sigma = paramSave.hv_measure_sigma; + fitLinePara.hv_measure_position = paramSave.hv_measure_position; + fitLinePara.hv_measure_transition = paramSave.hv_measure_transition; + fitLinePara.hv_measure_number = paramSave.hv_measure_number; + fitLinePara.hv_measure_threshold = paramSave.hv_measure_threshold; + fitLinePara.hv_measure_interpolation = paramSave.hv_measure_interpolation; + } + + /// <summary> + /// 鍔犺浇鎵惧渾鍙傛暟 + /// </summary> + /// <param name="ParaPath">鍙傛暟鏂囦欢鍦板潃</param> + public void LoadFitCircleParameter(string ParaPath) + { + MeasureParamSave paramSave = new HalconTools.MeasureParamSave(); + paramSave = paramSave.Load(ParaPath); + + fitCirclePara.hv_measure_Length1 = paramSave.hv_measure_Length1; + fitCirclePara.hv_measure_Length2 = paramSave.hv_measure_Length2; + fitCirclePara.hv_measure_sigma = paramSave.hv_measure_sigma; + fitCirclePara.hv_measure_position = paramSave.hv_measure_position; + fitCirclePara.hv_measure_transition = paramSave.hv_measure_transition; + fitCirclePara.hv_measure_number = paramSave.hv_measure_number; + fitCirclePara.hv_measure_threshold = paramSave.hv_measure_threshold; + fitCirclePara.hv_measure_interpolation = paramSave.hv_measure_interpolation; + } + + /// <summary> + /// 鍔犺浇杞粨鍙傛暟 + /// </summary> + /// <param name="ParaPath">鍙傛暟鏂囦欢鍦板潃</param> + public void LoadContourParameter(string ParaPath) + { + SerializeFileTool<ContourParam> sft = new SerializeFileTool<ContourParam>(); + contourPara = sft.GetConfig(ParaPath); + } + #endregion + #endregion + + #region Job + + #region 瀹氫箟 + + public SerializeFileTool<List<Job>> sftJobs = new SerializeFileTool<List<Job>>(); + public List<Job> Jobs = new List<Job>(); + public List<JobResults> JobResults = new List<JobResults>(); + private JobResults tmpJobResults = new JobResults(); + private JobResult tmpJobResult = new JobResult(); + private FitLineResult tmpFitLineResult = new FitLineResult(); + public HImage JobImage; + private JobAssistance mJobAssistance = new JobAssistance(); + + #endregion + + public void LoadJobs() + { + string path = System.Windows.Forms.Application.StartupPath + "\\JobConfige\\JobConfige.xml"; + Jobs = sftJobs.GetConfig(path); + } + + public void LoadJobs(string path) + { + Jobs = sftJobs.GetConfig(path); + } + + /// <summary> + /// 鍗曚釜job杩愯鏂规硶锛堥渶绋嬪簭鍛樿嚜宸辩紪鍐欏弬鏁颁紶閫掞級 + /// </summary> + /// <param name="index">搴忓彿</param> + public void Run(int index) + { + if (JobImage == null) return; + + tmpJobResults = new JobResults(); + tmpJobResults.results = new List<JobResult>(); + tmpJobResults.name = Jobs[index].name; + + switch (index) + { + case 0: + + for (int j = 0; j < 2; j++) + { + tmpJobResult = new JobResult(); + tmpJobResult = mJobAssistance.ToolRun(JobImage, Jobs[index].tools[j]); + tmpJobResults.results.Add(tmpJobResult); + } + JobResults.Add(tmpJobResults); + + break; + + case 1: + case 2: + case 3: + case 4: + + for (int j = 0; j < 4; j++) + { + tmpJobResult = new JobResult(); + tmpJobResult = mJobAssistance.ToolRun(JobImage, Jobs[index].tools[j]); + tmpJobResults.results.Add(tmpJobResult); + } + JobResults.Add(tmpJobResults); + + break; + + default: + break; + } + + resultCreater.ChangeValue(new EventData(Jobs[index].name + "_Done")); + } + + /// <summary> + /// 鍗曚釜job杩愯鏂规硶锛堥渶绋嬪簭鍛樿嚜宸辩紪鍐欏弬鏁颁紶閫掞級 + /// </summary> + /// <param name="JobName">Job鍚嶇О</param> + public void Run(string JobName) + { + if (JobImage == null) return; + + tmpJobResults = new JobResults(); + tmpJobResults.results = new List<JobResult>(); + + for (int i = 0; i < Jobs.Count; i++) + { + if (Jobs[i].name.Equals(JobName)) + { + tmpJobResults.name = Jobs[i].name; + + switch (JobName) + { + case "JobLLMF": + + for (int j = 0; j < 1; j++) + { + tmpJobResult = new JobResult(); + tmpJobResult = mJobAssistance.ToolRun(JobImage, Jobs[i].tools[j]); + + if (tmpJobResult.fitLineResult == null) + { + resultCreater.ChangeValue(new EventData(JobName + "_Undone")); + return; + } + + tmpJobResults.results.Add(tmpJobResult); + } + JobResults.Add(tmpJobResults); + + break; + default: + break; + } + + break; + } + } + + resultCreater.ChangeValue(new EventData(JobName + "_Done")); + JobImage.Dispose(); + } + + /// <summary> + /// 娓呯┖缁撴灉 + /// </summary> + public void Clear_JobResults() + { + JobResults.Clear(); + } + + #endregion + + #region 璁$畻鏂规硶 + /// <summary> + /// 璁$畻2鐩寸嚎璺濈 + /// </summary> + /// <param name="l1">鐩寸嚎1</param> + /// <param name="l2">鐩寸嚎2</param> + /// <returns>璺濈</returns> + public double DistanceLine2Line(FitLineResult l1, FitLineResult l2) + { + HTuple tmp = new HTuple(); + + HOperatorSet.DistancePl((l1.mRowStart + l1.mRowEnd) / 2, (l1.mColumnStart + l1.mColumnEnd) / 2, + l2.mRowStart, l2.mColumnStart, l2.mRowEnd, l2.mColumnEnd, out tmp); + + return tmp.D; + } + + /// <summary> + /// 璁$畻2鐩寸嚎浜ょ偣 + /// </summary> + /// <param name="l1">鐩寸嚎1</param> + /// <param name="l2">鐩寸嚎2</param> + /// <param name="x">浜ょ偣x</param> + /// <param name="y">浜ょ偣y</param> + public void IntersectionLine2Line(FitLineResult l1, FitLineResult l2, out double x, out double y) + { + HTuple row, col, isP; + + HOperatorSet.IntersectionLl(l1.mRowStart, l1.mColumnStart, l1.mRowEnd, l1.mColumnEnd, + l2.mRowStart, l2.mColumnStart, l2.mRowEnd, l2.mColumnEnd, + out row, out col, out isP); + + x = col.D; + y = row.D; + } + + /// <summary> + /// 璁$畻2鐩寸嚎浜ょ偣 + /// </summary> + /// <param name="Line1StartX"></param> + /// <param name="Line1StartY"></param> + /// <param name="Line1EndX"></param> + /// <param name="Line1EndY"></param> + /// <param name="Line2StartX"></param> + /// <param name="Line2StartY"></param> + /// <param name="Line2EndX"></param> + /// <param name="Line2EndY"></param> + /// <param name="x"></param> + /// <param name="y"></param> + public void IntersectionLine2Line(double Line1StartX, double Line1StartY, double Line1EndX, double Line1EndY, + double Line2StartX, double Line2StartY, double Line2EndX, double Line2EndY, out double x, out double y) + { + HTuple row, col, isP; + + HOperatorSet.IntersectionLl((HTuple)Line1StartY, (HTuple)Line1StartX, (HTuple)Line1EndY, (HTuple)Line1EndX, + (HTuple)Line2StartY, (HTuple)Line2StartX, (HTuple)Line2EndY, (HTuple)Line2EndX, + out row, out col, out isP); + + x = col.D; + y = row.D; + } + /// <summary> + /// 璁$畻鐩寸嚎涓庢按骞冲潗鏍囩殑瑙掑害 + /// </summary> + /// <param name="l1">鐩寸嚎1</param> + /// <returns>瑙掑害</returns> + public double AngleLine2HorizontialAxis(FitLineResult l1) + { + HTuple tmp; + + HOperatorSet.AngleLx(l1.mRowStart, l1.mColumnStart, l1.mRowEnd, l1.mColumnEnd, out tmp); + + return tmp.D / Math.PI * 180; + } + + /// <summary> + /// 璁$畻鐐瑰埌鐐硅窛绂� + /// </summary> + /// <param name="x1"></param> + /// <param name="y1"></param> + /// <param name="x2"></param> + /// <param name="y2"></param> + /// <returns></returns> + public double DistanceP2P(double x1, double y1, double x2, double y2) + { + HTuple dis; + HOperatorSet.DistancePp((HTuple)y1, (HTuple)x1, (HTuple)y2, (HTuple)x2, out dis); + + return dis.D; + } + + /// <summary> + /// 璁$畻2鐩寸嚎鐨勮搴� + /// </summary> + /// <param name="r1"></param> + /// <param name="r2"></param> + /// <returns></returns> + public double AngleLine2Line(FitLineResult r1, FitLineResult r2) + { + HTuple angle; + HOperatorSet.AngleLl(r1.mRowStart, r1.mColumnStart, r1.mRowEnd, r1.mColumnEnd, + r2.mRowStart, r2.mColumnStart, r2.mRowEnd, r2.mColumnEnd, out angle); + + return angle.D / Math.PI * 180; + } + + #endregion + } +} diff --git a/HalconTools/HalconTools.csproj b/HalconTools/HalconTools.csproj new file mode 100644 index 0000000..ee5e505 --- /dev/null +++ b/HalconTools/HalconTools.csproj @@ -0,0 +1,240 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>9.0.21022</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{461F5DE4-F558-41B7-9494-F76854E0E7C7}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>HalconTools</RootNamespace> + <AssemblyName>HalconTools</AssemblyName> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <StartupObject> + </StartupObject> + <FileUpgradeFlags> + </FileUpgradeFlags> + <UpgradeBackupLocation> + </UpgradeBackupLocation> + <OldToolsVersion>3.5</OldToolsVersion> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="halcondotnet, Version=11.0.1.0, Culture=neutral, PublicKeyToken=4973bed59ddbf2b8, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\Lib\halcon\halcondotnet.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Core"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> + <Reference Include="System.Data" /> + <Reference Include="System.Deployment" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Runtime.Serialization.Formatters.Soap" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="CalibrationModule\CalibImage.cs" /> + <Compile Include="CalibrationModule\CalibrationAssistant.cs" /> + <Compile Include="CalibrationModule\QualityIssue.cs" /> + <Compile Include="CalibrationModule\QualityProcedures.cs" /> + <Compile Include="ContourModule\ContourAssistant.cs" /> + <Compile Include="ContourModule\ContourParam.cs" /> + <Compile Include="ContourModule\ContourResult.cs" /> + <Compile Include="FitModule\CirclePosition.cs" /> + <Compile Include="FitModule\FitAssistant.cs" /> + <Compile Include="FitModule\FitCircleParam.cs" /> + <Compile Include="FitModule\FitCircleResult.cs" /> + <Compile Include="FitModule\FitLineParam.cs" /> + <Compile Include="FitModule\FitLineResult.cs" /> + <Compile Include="FitModule\FitResult.cs" /> + <Compile Include="FitModule\LineMetrology.cs" /> + <Compile Include="FitModule\LinePosition.cs" /> + <Compile Include="frmCalibration.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="frmCalibration.Designer.cs"> + <DependentUpon>frmCalibration.cs</DependentUpon> + </Compile> + <Compile Include="frmContourAssistant.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="frmContourAssistant.Designer.cs"> + <DependentUpon>frmContourAssistant.cs</DependentUpon> + </Compile> + <Compile Include="frmFitCircleAndLine.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="frmFitCircleAndLine.Designer.cs"> + <DependentUpon>frmFitCircleAndLine.cs</DependentUpon> + </Compile> + <Compile Include="frmJobManager.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="frmJobManager.Designer.cs"> + <DependentUpon>frmJobManager.cs</DependentUpon> + </Compile> + <Compile Include="frmMain.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="frmMain.Designer.cs"> + <DependentUpon>frmMain.cs</DependentUpon> + </Compile> + <Compile Include="frmMatchingAssistant.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="frmMeasureAssistant.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="frmScrewAssistant.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="frmScrewAssistant.Designer.cs"> + <DependentUpon>frmScrewAssistant.cs</DependentUpon> + </Compile> + <Compile Include="HalconTool.cs" /> + <Compile Include="JobModule\Job.cs" /> + <Compile Include="JobModule\JobAssistance.cs" /> + <Compile Include="JobModule\ToolType.cs" /> + <Compile Include="MatchingModule\MatchingAssistant.cs" /> + <Compile Include="MatchingModule\MatchingOpt.cs" /> + <Compile Include="MatchingModule\MatchingOptSpeed.cs" /> + <Compile Include="MatchingModule\MatchingOptStatistics.cs" /> + <Compile Include="MatchingModule\MatchingParam.cs" /> + <Compile Include="MatchingModule\MatchingParamSave.cs" /> + <Compile Include="MatchingModule\MatchingResult.cs" /> + <Compile Include="MeasureModule\MeasureAssistant.cs" /> + <Compile Include="MeasureModule\Measurement.cs" /> + <Compile Include="MeasureModule\MeasurementEdge.cs" /> + <Compile Include="MeasureModule\MeasurementPair.cs" /> + <Compile Include="MeasureModule\MeasurementResult.cs" /> + <Compile Include="MeasureModule\MeasureParamSave.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <EmbeddedResource Include="frmCalibration.resx"> + <DependentUpon>frmCalibration.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="frmContourAssistant.resx"> + <DependentUpon>frmContourAssistant.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="frmFitCircleAndLine.resx"> + <DependentUpon>frmFitCircleAndLine.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="frmJobManager.resx"> + <DependentUpon>frmJobManager.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="frmMain.resx"> + <DependentUpon>frmMain.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="frmMain.zh-CHS.resx"> + <DependentUpon>frmMain.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="frmMatchingAssistant.resx"> + <DependentUpon>frmMatchingAssistant.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="frmMeasureAssistant.resx"> + <DependentUpon>frmMeasureAssistant.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="frmScrewAssistant.resx"> + <DependentUpon>frmScrewAssistant.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="Resources\Resource.en-US.resx"> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="Resources\Resource.zh-CN.resx"> + <SubType>Designer</SubType> + </EmbeddedResource> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Resources.resx</DependentUpon> + <DesignTime>True</DesignTime> + </Compile> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + <Compile Include="ResourceCulture.cs" /> + <Compile Include="ScrewModule\ScrewAssistant.cs" /> + <Compile Include="ScrewModule\ScrewParam.cs" /> + <Compile Include="ScrewModule\ScrewResult.cs" /> + <Compile Include="ToolKit\Counter.cs" /> + <Compile Include="ToolKit\EventData.cs" /> + <Compile Include="ToolKit\FileOperationResult.cs" /> + <Compile Include="ToolKit\IniTool.cs" /> + <Compile Include="ToolKit\KillApplication.cs" /> + <Compile Include="ToolKit\ListenEventArgs.cs" /> + <Compile Include="ToolKit\ListenEventCreater.cs" /> + <Compile Include="ToolKit\LkSensor.cs" /> + <Compile Include="ToolKit\Log.cs" /> + <Compile Include="ToolKit\LogManager.cs" /> + <Compile Include="ToolKit\LogType.cs" /> + <Compile Include="ToolKit\NetWorkTool.cs" /> + <Compile Include="ToolKit\SerializeFileTool.cs" /> + <Compile Include="ToolKit\SerializeTool.cs" /> + <Compile Include="ToolKit\SerialPort.cs" /> + <Compile Include="ToolKit\SocketTools.cs" /> + <Compile Include="ToolKit\StarterTool.cs" /> + <Compile Include="ToolKit\StyleSetTools.cs" /> + <Compile Include="ToolKit\Win32API.cs" /> + <Compile Include="ViewROI\FunctionPlot.cs" /> + <Compile Include="ViewROI\GraphicsContext.cs" /> + <Compile Include="ViewROI\HObjectEntry.cs" /> + <Compile Include="ViewROI\HWndCtrl.cs" /> + <Compile Include="ViewROI\ROI.cs" /> + <Compile Include="ViewROI\ROICircle.cs" /> + <Compile Include="ViewROI\ROICircularArc.cs" /> + <Compile Include="ViewROI\ROIController.cs" /> + <Compile Include="ViewROI\ROILine.cs" /> + <Compile Include="ViewROI\ROIRectangle1.cs" /> + <Compile Include="ViewROI\ROIRectangle2.cs" /> + </ItemGroup> + <ItemGroup> + <Content Include="FitModule\FitModule.csproj" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/HalconTools/JobModule/Job.cs b/HalconTools/JobModule/Job.cs new file mode 100644 index 0000000..be55e96 --- /dev/null +++ b/HalconTools/JobModule/Job.cs @@ -0,0 +1,42 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.IO; +using HalconDotNet; + +namespace HalconTools +{ + /// <summary> + /// 姣忎釜Job涓璗ool鐨勭被鍨嬪弬鏁� + /// </summary> + public struct JobTool + { + public ToolType type; + public FitLineParam fitLineParam; + public FitCircleParam fitCircleParam; + public MatchingParam matchingParam; + public string modelPath; + public ScrewParam screwParam; + } + + public struct JobResult + { + public FitLineResult fitLineResult; + public FitCircleResult fitCircleResult; + public MatchingResult matchingResult; + public ScrewResult screwResult; + } + + public struct Job + { + public string name; + public List<JobTool> tools; + } + + public struct JobResults + { + public string name; + public List<JobResult> results; + } +} diff --git a/HalconTools/JobModule/JobAssistance.cs b/HalconTools/JobModule/JobAssistance.cs new file mode 100644 index 0000000..ff837e5 --- /dev/null +++ b/HalconTools/JobModule/JobAssistance.cs @@ -0,0 +1,72 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using HalconDotNet; + +namespace HalconTools +{ + public class JobAssistance + { + public JobAssistance() + { + } + + /// <summary> + /// 鍗曠嫭宸ュ叿杩愯 + /// </summary> + /// <param name="tool"></param> + public JobResult ToolRun(HImage image,JobTool tool) + { + JobResult tmpResult = new JobResult(); + FitAssistant mfit = new FitAssistant(); + MatchingAssistant mMatch = new MatchingAssistant(); + ScrewAssistant mScrew = new ScrewAssistant(); + + switch (tool.type) + { + case ToolType.FindCircle: + + tmpResult.fitCircleResult = new FitCircleResult(); + mfit.mImage = image; + tmpResult.fitCircleResult = mfit.FitCircle(tool.fitCircleParam); + + break; + + case ToolType.FindLine: + + tmpResult.fitLineResult = new FitLineResult(); + mfit.mImage = image; + tmpResult.fitLineResult = mfit.FitLine(tool.fitLineParam); + + break; + + case ToolType.Matching: + + tmpResult.matchingResult = new MatchingResult(); + mMatch.mImage = image; + mMatch.parameterSet = tool.matchingParam; + + mMatch.loadShapeModel(tool.modelPath); + mMatch.detectShapeModel(); + + tmpResult.matchingResult = mMatch.tResult; + + break; + + case ToolType.Screw: + + tmpResult.screwResult = new ScrewResult(); + mScrew.mImage = image; + mScrew.SetPara(tool.screwParam); + mScrew.Run(); + tmpResult.screwResult = mScrew.mScrewResult; + + break; + } + + return tmpResult; + } + + } +} diff --git a/HalconTools/JobModule/ToolType.cs b/HalconTools/JobModule/ToolType.cs new file mode 100644 index 0000000..e4ca05a --- /dev/null +++ b/HalconTools/JobModule/ToolType.cs @@ -0,0 +1,29 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace HalconTools +{ + public enum ToolType + { + /// <summary> + /// 鎵剧洿绾� + /// </summary> + FindLine = 0, + + /// <summary> + /// 鎵惧渾 + /// </summary> + FindCircle = 1, + + /// <summary> + /// 鍖归厤 + /// </summary> + Matching = 2, + + /// <summary> + /// 铻轰笣瀛斿畾浣� + /// </summary> + Screw = 3, + } +} diff --git a/HalconTools/MatchingModule/MatchingAssistant.cs b/HalconTools/MatchingModule/MatchingAssistant.cs new file mode 100644 index 0000000..c53cc2e --- /dev/null +++ b/HalconTools/MatchingModule/MatchingAssistant.cs @@ -0,0 +1,1544 @@ +using System; +using System.Collections; +using HalconDotNet; +using System.ComponentModel; + +namespace HalconTools +{ + public delegate void MatchingDelegate(int value); + public delegate void AutoParamDelegate(string value); + public delegate void FindShapeModelDelegate(object sender,HImage image, MatchingResult result); + + [DefaultEvent("SetImageDone")] + /// <summary> + /// This is a controller class, which receives the + /// GUI component changes made by the user and forwards + /// the actions according to the internal settings. + /// To notify the GUI about semantic changes, we use two delegates. One + /// notifies about changes regarding the display objects + /// (like a change of image or change in model or contour). It is also used + /// to forward errors to the user, which might occur during a processing step. + /// The second delegate notifies the GUI to correct its sliders and trackbars + /// according to the new parameter setting, computed along with the + /// 'auto'-mechanism. + /// </summary> + public class MatchingAssistant + { + /// <summary> + /// Constant indicating that the model contour display should be + /// updated. + /// </summary> + public const int UPDATE_XLD = 0; + /// <summary> + /// Constant indicating that the pyramid (display-)level should be + /// updated. + /// </summary> + public const int UPDATE_DISPLEVEL = 1; + /// <summary> + /// Constant indicating that the pyramid should be updated. + /// </summary> + public const int UPDATE_PYRAMID = 2; + /// <summary> + /// Constant indicating that the detection results should be updated. + /// </summary> + public const int UPDATE_DETECTION_RESULT= 3; + /// <summary> + /// Constant indicating that the test image display should be updated. + /// </summary> + public const int UPDATE_TESTVIEW = 4; + + /// <summary> + /// Constant indicating an error if a wrong file extension is used for + /// a model file. + /// </summary> + public const int ERR_NO_VALID_FILE = 5; + /// <summary> + /// Constant indicating an error when writing a model file + /// </summary> + public const int ERR_WRITE_SHAPEMODEL = 6; + /// <summary> + /// Constant indicating an error when reading from model file + /// </summary> + public const int ERR_READ_SHAPEMODEL = 7; + /// <summary> + /// Constant indicating an error if operations are performed that + /// need a shape-based model, though no model has been created, yet + /// </summary> + public const int ERR_NO_MODEL_DEFINED = 8; + /// <summary> + /// Constant indicating an error if operations are performed that + /// need a model image, though no model image has been loaded, yet + /// </summary> + public const int ERR_NO_IMAGE = 9; + /// <summary> + /// Constant indicating an error if operations are performed that + /// need test images, though no test image has been loaded, yet + /// </summary> + public const int ERR_NO_TESTIMAGE = 10; + /// <summary> + /// Constant indicating an error when reading an image file. + /// </summary> + public const int ERR_READING_IMG = 11; + /// <summary> + /// 指示查找错误 + /// </summary> + public const int ERR_FINDSHAPEMODEL = 12; + /// <summary> + /// 错误的参数 + /// </summary> + public const int ERR_PARAMSET = 13; + + /// <summary> + /// Region of interest defined by the sum of + /// the positive and negative ROIs + /// </summary> + private HRegion mROIModel; + + /// <summary>Training image with full domain</summary> + private HImage oImage; + + /// <summary> + /// 给FindShapeModel使用 + /// </summary> + private HImage OriginalImage; + + readonly object someEventLock; + + /// <summary> + /// The model image is the training image with + /// a domain reduced by the region mROIModel + /// </summary> + public HImage mImage; + + /// <summary> + /// Test image in which the model is searched. + /// </summary> + public HImage tImage; + + /// <summary>List of test images</summary> + public Hashtable TestImages; + + //matching parameters + public MatchingParam parameterSet; + + public MatchingParam getParameterSet + { + get + { + return parameterSet; + } + //set; + } + + //matching result + public MatchingResult tResult; + //model handle + private HShapeModel ModelID; + //model handle FindShapeModel使用 + private HShapeModel[] FindShapeModelID; + // + public MatchingResult findShapeResult { get; set; } + + // flags to control processing + private bool findAlways; + private bool createNewModelID; + + //flags to control the inspection and recognition process + public bool onExternalModelID; + public bool onTimer = false; + + // display purposes + private int oWidth; + private int oHeight; + private double scaleW = 1.0; + private double scaleH = 1.0; + + private HImage PyramidImages; + private HRegion PyramidROIs; + private int currentImgLevel = 1; //mNumLevel + private int maxPyramidLevel = 6; + private HHomMat2D homSc2D; + + /// <summary>Stores exception message for display</summary> + public string exceptionText = ""; + + + // upper and lower range + private int contrastLowB; + private int contrastUpB; + private double scaleStepLowB; + private double scaleStepUpB; + private double angleStepLowB; + private double angleStepUpB; + private int pyramLevLowB; + private int pyramLevUpB; + private int minContrastLowB; + private int minContrastUpB; + + // auxiliary value table to store intermediate states + private int mCachedNumLevel; + private double mCachedStartAng; + private double mCachedAngExt; + private double mCachedAngStep; + private double mCachedMinScale; + private double mCachedMaxScale; + private double mCachedScaleStep; + private string mCachedMetric; + private int mCachedMinCont; + + + + /// <summary> + /// Delegate to forward changes for the display, which means changes + /// in the model contour, image level etc. + /// </summary> + public MatchingDelegate NotifyIconObserver; + /// <summary> + /// Delegate to forward changes in the matching parameters determined + /// with the 'auto-' mechanism + /// </summary> + public AutoParamDelegate NotifyParamObserver; + + private MatchingDelegate NotifyIconObserverMessage; + + /// <summary> + /// 图像设定完成事件 + /// </summary> + public event SetImageDelegate SetImageDone; + + /// <summary> + /// 匹配完成事件 + /// </summary> + public event FindShapeModelDelegate FindShapeModelDone; + + /// <summary> + /// Initializes flags, lists, and delegates to have a valid + /// starting point to start the assistant. + /// </summary> + public MatchingAssistant(MatchingParam parSet) + { + parameterSet = parSet; + NotifyIconObserver = new MatchingDelegate(dummy); + NotifyParamObserver = new AutoParamDelegate(dummyS); + homSc2D = new HHomMat2D(); + TestImages = new Hashtable(10); + tResult = new MatchingResult(); + + contrastLowB = 0; + contrastUpB = 255; + scaleStepLowB = 0.0; + scaleStepUpB = (double)19.0/1000.0; + angleStepLowB = 0.0; + angleStepUpB = (double)(112.0/10.0)*Math.PI/180.0; + pyramLevLowB = 1; + pyramLevUpB = 6; + minContrastLowB = 0; + minContrastUpB = 30; + + findAlways = false; + createNewModelID = true; + ModelID = new HShapeModel(); + onExternalModelID = false; + } + + public MatchingAssistant(int num) + { + someEventLock = new object(); + FindShapeModelID = new HShapeModel[num]; + NotifyIconObserverMessage = new MatchingDelegate(UpdateMessage); + + initMatch(); + } + + public MatchingAssistant() + { + someEventLock = new object(); + FindShapeModelID = new HShapeModel[1]; + NotifyIconObserverMessage = new MatchingDelegate(UpdateMessage); + + initMatch(); + } + + private void initMatch() + { + tResult = new MatchingResult(); + ModelID = new HShapeModel(); + } + + public void UpdateMessage(int val) + { + switch (val) + { + case MatchingAssistant.ERR_NO_MODEL_DEFINED: + System.Windows.Forms.MessageBox.Show("Please define a Model!", + "Matching Wizard", + System.Windows.Forms.MessageBoxButtons.OK, + System.Windows.Forms.MessageBoxIcon.Information); + break; + case MatchingAssistant.ERR_NO_IMAGE: + System.Windows.Forms.MessageBox.Show("Please load an image", + "Matching Wizard", + System.Windows.Forms.MessageBoxButtons.OK, + System.Windows.Forms.MessageBoxIcon.Information); + break; + case MatchingAssistant.ERR_NO_VALID_FILE: + System.Windows.Forms.MessageBox.Show("Selected file is not a HALCON ShapeModel file .shm", + "Matching Wizard", + System.Windows.Forms.MessageBoxButtons.OK, + System.Windows.Forms.MessageBoxIcon.Information); + break; + case MatchingAssistant.ERR_FINDSHAPEMODEL: + System.Windows.Forms.MessageBox.Show("模板匹配失败", + "Matching Wizard", + System.Windows.Forms.MessageBoxButtons.OK, + System.Windows.Forms.MessageBoxIcon.Information); + break; + case MatchingAssistant.ERR_PARAMSET: + System.Windows.Forms.MessageBox.Show("错误的参数设置", + "Matching Wizard", + System.Windows.Forms.MessageBoxButtons.OK, + System.Windows.Forms.MessageBoxIcon.Information); + break; + default: + break; + } + } + + /// <summary>Sets <c>image</c> to be the training image <c>oImage</c> </summary> + public void setImage(HImage image) + { + string tmp; + image.GetImagePointer1(out tmp, + out oWidth, + out oHeight); + + oImage = image; + reset(); + } + + /// <summary> + /// Loads the training image from the file supplied by <c>filename</c> + /// </summary> + public bool setImage(string filename) + { + HImage image; + + try + { + image = new HImage(filename); + setImage(image); + } + catch(HOperatorException e) + { + exceptionText = e.Message; + NotifyIconObserver(MatchingAssistant.ERR_READING_IMG); + return false; + } + + return true; + } + + /// <summary> + /// Compute the model image and the model contour for the applied ROI. + /// </summary> + public void setModelROI(HRegion roi) + { + mROIModel = roi; + PyramidROIs = null; + createNewModelID = true; + + if(mROIModel==null) + { + mImage = null; + return; + } + + mImage = oImage.ReduceDomain(mROIModel); + + determineStepRanges(); + + if(parameterSet.isOnAuto()) + determineShapeParameter(); + + inspectShapeModel(); + } + + /********************************************************************/ + /* methods for test image */ + /********************************************************************/ + + /// <summary> + /// Loads and adds test image files to the list of test images + /// </summary> + public bool addTestImages(string fileKey) + { + if(TestImages.ContainsKey(fileKey)) + return false; + + try + { + HImage image = new HImage(fileKey); + TestImages.Add(fileKey, image); + } + catch(HOperatorException e) + { + exceptionText = e.Message; + NotifyIconObserver(MatchingAssistant.ERR_READING_IMG); + return false; + } + return true; + } + + /// <summary> + /// Sets an image from the list of test images to be the current + /// test image. The filename is given by the value fileKey. + /// </summary> + public void setTestImage(string fileKey) + { + tImage = (HImage)TestImages[fileKey]; + NotifyIconObserver(MatchingAssistant.UPDATE_TESTVIEW); + } + + /// <summary> + /// Removes an image from the list of test images, + /// using the file name + /// </summary> + public void removeTestImage(string fileName) + { + if(TestImages.ContainsKey(fileName)) + TestImages.Remove(fileName); + + if(TestImages.Count==0) + tImage = null; + } + + /// <summary> + /// Removes all images from the list of test images + /// </summary> + public void removeTestImage() + { + TestImages.Clear(); + tImage = null; + } + + /// <summary> + /// Sets the current test image to the image defined by + /// <c>fileName</c> and return it + /// </summary> + public HImage getTestImage(string fileName) + { + if((tImage == null) && (TestImages.ContainsKey(fileName))) + tImage = (HImage)TestImages[fileName]; + + return tImage; + } + + /// <summary> + /// Returns the current test image + /// </summary> + public HImage getCurrTestImage() + { + return tImage; + } + + + /******************************************************************/ + /* auto options */ + /******************************************************************/ + + /// <summary> + /// Adds the parameter name given by <c>mode</c> + /// to the list of matching parameters that are + /// set to be determined automatically + /// </summary> + public void setAuto(string mode) + { + if(parameterSet.setAuto(mode)) + determineShapeParameter(); + } + + /// <summary> + /// Removes the parameter name given by <c>mode</c> from the + /// list of matching parameters that are determined + /// automatically + /// </summary> + public bool removeAuto(string mode) + { + return parameterSet.removeAuto(mode); + } + + + /************************ set matching values ********************/ + /******************************************************************/ + + /// <summary> + /// Sets Contrast to the input value <c>val</c> + /// and recreates the model. + /// </summary> + public void setContrast(int val) + { + parameterSet.setContrast(val); + minContrastUpB = (int)val; + + inspectShapeModel(); + + if(parameterSet.isOnAuto()) + determineShapeParameter(); + + createNewModelID = true; + } + + /// <summary> + /// Sets ScaleStep to the input value <c>val</c> + /// </summary> + public void setScaleStep(double val) + { + parameterSet.setScaleStep(val); + + if(parameterSet.isOnAuto()) + determineShapeParameter(); + + createNewModelID = true; + } + + /// <summary> + /// Sets AngleStep to the input value <c>val</c> + /// </summary> + public void setAngleStep(double val) + { + parameterSet.setAngleStep(val); + + if(parameterSet.isOnAuto()) + determineShapeParameter(); + + createNewModelID = true; + } + + /// <summary> + /// Sets PyramidLevel to the input value <c>val</c> + /// </summary> + public void setPyramidLevel(double val) + { + parameterSet.setNumLevel(val); + + if(parameterSet.isOnAuto()) + determineShapeParameter(); + + createNewModelID = true; + } + + /// <summary> + /// Sets Optimization to the input value <c>val</c> + /// </summary> + public void setOptimization(string val) + { + parameterSet.setOptimization(val); + + if(parameterSet.isOnAuto()) + determineShapeParameter(); + + createNewModelID = true; + } + + /// <summary> + /// Sets MinContrast to the input value <c>val</c> + /// </summary> + public void setMinContrast(int val) + { + parameterSet.setMinContrast(val); + + if(parameterSet.isOnAuto()) + determineShapeParameter(); + + createNewModelID = true; + } + + /*******************************************************/ + + /// <summary> + /// Sets Metric to the input value <c>val</c> + /// </summary> + public void setMetric(string val) + { + parameterSet.setMetric(val); + createNewModelID = true; + } + + /// <summary> + /// Sets MinScale to the input value <c>val</c> + /// </summary> + public void setMinScale(double val) + { + parameterSet.setMinScale(val); + createNewModelID = true; + } + + /// <summary> + /// Sets MaxScale to the input value <c>val</c> + /// </summary> + public void setMaxScale(double val) + { + parameterSet.setMaxScale(val); + createNewModelID = true; + } + + /// <summary> + /// Sets StartingAngle to the input value <c>val</c> + /// </summary> + public void setStartingAngle(double val) + { + parameterSet.setStartingAngle(val); + createNewModelID = true; + } + + /// <summary> + /// Sets AngleExtent to the input value <c>val</c> + /// </summary> + public void setAngleExtent(double val) + { + parameterSet.setAngleExtent(val); + createNewModelID = true; + } + + /// <summary> + /// Changes the currentImgLevel to the input parameter + /// <c>val</c> and triggers an update in the GUI display + /// </summary> + public void setDispLevel(int val) + { + this.currentImgLevel = val; + NotifyIconObserver(MatchingAssistant.UPDATE_DISPLEVEL); + } + + /****************** set findmodel parameters *****************/ + /**************************************************************/ + /// <summary> + /// Sets MinScore to the input value and starts model detection + /// if the flag <c>findAlways</c> is checked + /// </summary> + public void setMinScore(double val) + { + parameterSet.setMinScore(val); + + if(findAlways) + detectShapeModel(); + } + + /// <summary> + /// Sets NumMatches to the input value and starts model detection + /// if the flag <c>findAlways</c> is checked + /// </summary> + public void setNumMatches(int val) + { + parameterSet.setNumMatches(val); + + if(findAlways) + detectShapeModel(); + } + + /// <summary> + /// Sets Greediness to the input value and starts model detection + /// if the flag <c>findAlways</c> is checked + /// </summary> + public void setGreediness(double val) + { + parameterSet.setGreediness(val); + + if(findAlways) + detectShapeModel(); + } + + /// <summary> + /// Sets MaxOverlap to the input value and starts model detection + /// if the flag <c>findAlways</c> is checked + /// </summary> + public void setMaxOverlap(double val) + { + parameterSet.setMaxOverlap(val); + + if(findAlways) + detectShapeModel(); + } + + /// <summary> + /// Sets SubPixel to the input value and starts model detection + /// if the flag <c>findAlways</c> is checked + /// </summary> + public void setSubPixel(string val) + { + parameterSet.setSubPixel(val); + + if(findAlways) + detectShapeModel(); + } + + /// <summary> + /// Sets LastPyramLevel to the input value and starts model detection + /// if the flag <c>findAlways</c> is checked + /// </summary> + public void setLastPyramLevel(int val) + { + parameterSet.setLastPyramLevel(val); + + if(findAlways) + detectShapeModel(); + } + + /// <summary> + /// Sets the flag <c>findAlways</c> to the input value <c>flag</c> + /// </summary> + public void setFindAlways(bool flag) + { + findAlways = flag; + + if(findAlways && tImage != null) + detectShapeModel(); + } + + /// <summary> + /// Triggers model detection, if a test image is defined + /// </summary> + public bool applyFindModel() + { + bool success = false; + + if(tImage != null) + success = detectShapeModel(); + else + NotifyIconObserver(MatchingAssistant.ERR_NO_TESTIMAGE); + + return success; + } + + /// <summary> + /// Gets detected model contours + /// </summary> + public HXLD getDetectionResults() + { + return tResult.getDetectionResults(); + } + + /// <summary> + /// Gets matching results + /// </summary> + public MatchingResult getMatchingResults() + { + return tResult; + } + + /******************** optimize recognition speed *****************/ + /******************************************************************/ + + /// <summary> + /// Sets the RecognitionRateOption to the input + /// value <c>idx</c> + /// </summary> + public void setRecogRateOption(int idx) + { + parameterSet.setRecogRateOption(idx); + } + + /// <summary> + /// Sets the RecognitionRate to the input value <c>val</c> + /// </summary> + public void setRecogitionRate(int val) + { + parameterSet.setRecogitionRate(val); + } + + /// <summary> + /// Sets the RecognitionSpeedMode to the input + /// value <c>val</c> + /// </summary> + public void setRecogSpeedMode(string val) + { + parameterSet.setRecogSpeedMode(val); + } + + /// <summary> + /// Sets the RecognitionManualSelection to the input . + /// value <c>val</c> + /// </summary> + public void setRecogManualSelection(int val) + { + parameterSet.setRecogManualSelection(val); + } + + + /********************************************************************/ + /* getter methods */ + /********************************************************************/ + + /// <summary> + /// Gets the model for the current image level + /// </summary> + public HXLD getModelContour() + { + if(PyramidROIs==null) + return null; + + homSc2D.HomMat2dIdentity(); + homSc2D = homSc2D.HomMat2dScaleLocal(scaleW, scaleH); + + return ((PyramidROIs.SelectObj(currentImgLevel)). + GenContourRegionXld("center")). + AffineTransContourXld(homSc2D); + } + + /// <summary> + /// Gets the model supplied by a loaded shapebased model file (.shm) + /// </summary> + public HXLD getLoadedModelContour() + { + HTuple row1, col1, row2, col2, row, col; + HHomMat2D homMat2D = new HHomMat2D(); + + try + { + tResult.mContour.SmallestRectangle1Xld(out row1, out col1, out row2, out col2); + row2 = row1.TupleMin(); + col2 = col1.TupleMin(); + row = row2.TupleFloor()-5; + col = col2.TupleFloor()-5; + homMat2D.HomMat2dIdentity(); + homMat2D = homMat2D.HomMat2dTranslate(-row,-col); + + return homMat2D.AffineTransContourXld(tResult.mContour); + } + catch(HOperatorException e) + { + exceptionText = e.Message; + NotifyIconObserver(MatchingAssistant.ERR_READ_SHAPEMODEL); + return null; + } + } + + /// <summary> + /// Gets the model region for the current image level. + /// </summary> + public HRegion getModelRegion() + { + if(PyramidROIs==null) + return null; + + HRegion reg = PyramidROIs.SelectObj(currentImgLevel); + return reg.ZoomRegion(scaleW, scaleH); + } + + /// <summary> + /// Gets the model image for the current image level. + /// </summary> + public HImage getDispImage() + { + int fW, fH; + string tmp; + + if (PyramidImages ==null) + return oImage; + + HImage img = PyramidImages.SelectObj(currentImgLevel); + img.GetImagePointer1(out tmp, out fW, out fH); + + scaleW = (double)oWidth/fW; + scaleH = (double)oHeight/fH; + + return img.ZoomImageFactor(scaleW, scaleH, "nearest_neighbor"); + } + + /// <summary> + /// Clears all model creation and detection results + /// and resets flags to their initial values. + /// </summary> + public void reset() + { + mROIModel = null; + currentImgLevel = 1; + PyramidROIs = null; + PyramidImages = null; + mImage = null; + scaleH = 1; + scaleW = 1; + createNewModelID = true; + + tResult.reset(); + NotifyIconObserver(MatchingAssistant.UPDATE_XLD); + } + + + /********************************************************************/ + /********************************************************************/ + + /// <summary> + /// Writes model to the file specified by <c>fileName</c>. + /// </summary> + public void saveShapeModel(string fileName) + { + if(mImage == null) + { + NotifyIconObserver(MatchingAssistant.ERR_NO_MODEL_DEFINED); + return; + } + + if (createNewModelID) + if (!createShapeModel()) + return; + try + { + ModelID.WriteShapeModel(fileName); + } + catch(HOperatorException e) + { + exceptionText = e.Message; + NotifyIconObserver(MatchingAssistant.ERR_WRITE_SHAPEMODEL); + } + } + + /// <summary> + /// Loads model from the file specified by <c>fileName</c> + /// </summary> + public bool loadShapeModel(string fileName) + { + onExternalModelID = false; + + try + { + ModelID.ReadShapeModel(fileName); + } + catch(HOperatorException e) + { + exceptionText = e.Message; + NotifyIconObserver(MatchingAssistant.ERR_READ_SHAPEMODEL); + return false; + } + + onExternalModelID = true; + tResult.mContour = ModelID.GetShapeModelContours(1); + + cacheModelParams(); + + parameterSet.mNumLevel = ModelID.GetShapeModelParams(out parameterSet.mStartingAngle, + out parameterSet.mAngleExtent, + out parameterSet.mAngleStep, + out parameterSet.mMinScale, + out parameterSet.mMaxScale, + out parameterSet.mScaleStep, + out parameterSet.mMetric, + out parameterSet.mMinContrast); + return true; + } + + /***************************************************************/ + /***************************************************************/ + private void cacheModelParams() + { + mCachedNumLevel = parameterSet.mNumLevel; + mCachedStartAng = parameterSet.mStartingAngle; + mCachedAngExt = parameterSet.mAngleExtent; + mCachedAngStep = parameterSet.mAngleStep; + mCachedMinScale = parameterSet.mMinScale; + mCachedMaxScale = parameterSet.mMaxScale; + mCachedScaleStep = parameterSet.mScaleStep; + mCachedMetric = parameterSet.mMetric; + mCachedMinCont = parameterSet.mMinContrast; + } + + + public void resetCachedModelParams() + { + parameterSet.mNumLevel = mCachedNumLevel; + parameterSet.mStartingAngle = mCachedStartAng; + parameterSet.mAngleExtent = mCachedAngExt; + parameterSet.mAngleStep = mCachedAngStep; + parameterSet.mMinScale = mCachedMinScale; + parameterSet.mMaxScale = mCachedMaxScale; + parameterSet.mScaleStep = mCachedScaleStep; + parameterSet.mMetric = mCachedMetric; + parameterSet.mMinContrast = mCachedMinCont; + createNewModelID = true; + } + + /// <summary> + /// Creates the shape-based model. If the region of interest + /// <c>mROIModel</c> is missing or not well defined using the + /// interactive ROIs, then an error message is returned. + /// </summary> + public bool createShapeModel() + { + if(mImage==null) + { + if(!onTimer) + NotifyIconObserver(MatchingAssistant.ERR_NO_MODEL_DEFINED); + return false; + } + + try + { + ModelID = mImage.CreateScaledShapeModel(parameterSet.mNumLevel, + parameterSet.mStartingAngle, + parameterSet.mAngleExtent, + parameterSet.mAngleStep, + parameterSet.mMinScale, + parameterSet.mMaxScale, + parameterSet.mScaleStep, + parameterSet.mOptimization, + parameterSet.mMetric, + parameterSet.mContrast, + parameterSet.mMinContrast); + } + catch(HOperatorException e) + { + + if(!onTimer) + { + exceptionText = e.Message; + NotifyParamObserver(MatchingParam.H_ERR_MESSAGE); + } + return false; + } + + tResult.mContour = ModelID.GetShapeModelContours(1); + + createNewModelID = false; + return true; + } + + /// <summary> + /// Finds the model in the test image. If the model + /// hasn't been created or needs to be recreated (due to + /// user changes made to the GUI components), + /// then the model is created first. + /// </summary> + public bool detectShapeModel() + { + HTuple levels, rtmp; + rtmp = new HTuple(); + double t2, t1; + + if(tImage == null) + return false; + + if(createNewModelID && !onExternalModelID) + if(!createShapeModel()) + return false; + + try + { + levels = new HTuple(new int [] {parameterSet.mNumLevel, + parameterSet.mLastPyramidLevel}); + t1 = HSystem.CountSeconds(); + tImage.FindScaledShapeModel(ModelID, + parameterSet.mStartingAngle, + parameterSet.mAngleExtent, + parameterSet.mMinScale, + parameterSet.mMaxScale, + parameterSet.mMinScore, + parameterSet.mNumMatches, + parameterSet.mMaxOverlap, + new HTuple(parameterSet.mSubpixel), + levels, + parameterSet.mGreediness, + out tResult.mRow, + out tResult.mCol, + out tResult.mAngle, + out tResult.mScaleRow, + out tResult.mScore); + t2 = HSystem.CountSeconds(); + tResult.mTime = 1000.0 * (t2 - t1); + tResult.count = tResult.mRow.Length; + tResult.mScaleCol = tResult.mScaleRow; + } + catch(HOperatorException e) + { + if(!onTimer) + { + exceptionText = e.Message; + NotifyParamObserver(MatchingParam.H_ERR_MESSAGE); + } + + return false; + } + + if (NotifyIconObserver != null) NotifyIconObserver(MatchingAssistant.UPDATE_DETECTION_RESULT); + if (FindShapeModelDone != null)FindShapeModelDone(this, tImage, tResult); + + return true; + } + + /// <summary> + /// 设定图像,后续FindShapeModel使用 + /// </summary> + /// <param name="image"></param> + /// <returns></returns> + public bool SetImage_FindShapeModel(HImage image) + { + lock (someEventLock) + { + if (image != null) + { + OriginalImage = image; + + if (SetImageDone != null) + { + SetImageDone(this,OriginalImage); + } + + return OriginalImage.IsInitialized(); + } + else + { + NotifyIconObserver(MatchingAssistant.ERR_NO_IMAGE); + return false; + } + } + } + + /// <summary> + /// 使用指定的模板ID在SetImage_FindShapeModel设定的图像中查找目标 + /// </summary> + /// <param name="IDindext">指定模板ID编号</param> + /// <param name="parameterSet">参数</param> + /// <returns></returns> + public MatchingResult FindShapeModel(int IDindext, MatchingParamSave parameterSet) + { + HTuple levels; + double t2, t1; + MatchingResult result = new MatchingResult(); + + if (OriginalImage == null) + { + if (NotifyIconObserverMessage != null) + { + NotifyIconObserverMessage(MatchingAssistant.ERR_NO_IMAGE); + } + + if (NotifyIconObserver != null) + { + NotifyIconObserver(MatchingAssistant.ERR_NO_IMAGE); + } + + return result; + } + + if (parameterSet == null) + { + if (NotifyIconObserverMessage != null) + { + NotifyIconObserverMessage(MatchingAssistant.ERR_PARAMSET); + } + + if (NotifyIconObserver != null) + { + NotifyIconObserver(MatchingAssistant.ERR_PARAMSET); + } + return result; + } + + if (FindShapeModelID[IDindext] == null) + { + if (NotifyIconObserverMessage != null) + { + NotifyIconObserverMessage(MatchingAssistant.ERR_NO_MODEL_DEFINED); + } + + if (NotifyIconObserver != null) + { + NotifyIconObserver(MatchingAssistant.ERR_NO_MODEL_DEFINED); + } + + return result; + } + + try + { + lock (someEventLock) + { + result.mContour = FindShapeModelID[IDindext].GetShapeModelContours(1); + + levels = new HTuple(new int[] {parameterSet.NumLevel, + parameterSet.LastPyramidLevel}); + t1 = HSystem.CountSeconds(); + OriginalImage.FindScaledShapeModel(FindShapeModelID[IDindext], + parameterSet.StartingAngle, + parameterSet.AngleExtent, + parameterSet.MinScale, + parameterSet.MaxScale, + parameterSet.MinScore, + parameterSet.NumMatches, + parameterSet.MaxOverlap, + new HTuple(parameterSet.Subpixel), + levels, + parameterSet.Greediness, + out result.mRow, + out result.mCol, + out result.mAngle, + out result.mScaleRow, + out result.mScore); + + t2 = HSystem.CountSeconds(); + result.mTime = 1000.0 * (t2 - t1); + result.count = result.mRow.Length; + result.mScaleCol = result.mScaleRow; + } + + if (FindShapeModelDone != null) + { + FindShapeModelDone(this, OriginalImage,result); + } + } + catch (HOperatorException e) + { + if (NotifyIconObserverMessage != null) + { + NotifyIconObserverMessage(MatchingAssistant.ERR_FINDSHAPEMODEL); + } + + if (NotifyIconObserver != null) + { + NotifyIconObserver(MatchingAssistant.ERR_FINDSHAPEMODEL); + } + return result; + } + + return result; + } + + /// <summary> + /// 在指定窗体中显示匹配到的结果 + /// </summary> + /// <param name="viewPort">图像显示窗体</param> + /// <param name="CurrentImg">图像</param> + /// <param name="result">匹配结果</param> + public void FindModelGraphics(HalconDotNet.HWindowControl viewPort, HImage CurrentImg,MatchingResult result) + { + //Window control that manages visualization + HWndCtrl mView = new HWndCtrl(viewPort); + + mView.resetAll(); + mView.repaint(); + + mView.clearList(); + mView.changeGraphicSettings(GraphicsContext.GC_LINESTYLE, new HTuple()); + mView.addIconicVar(CurrentImg); + HXLD DetectionContour = result.getDetectionResults(); + if (DetectionContour != null) + { + mView.changeGraphicSettings(GraphicsContext.GC_COLOR, "green"); + mView.changeGraphicSettings(GraphicsContext.GC_LINEWIDTH, 2); + mView.addIconicVar(DetectionContour); + mView.repaint(); + } + } + + public void FindModelGraphics_1(HalconDotNet.HWindowControl hDisplayControl, HImage CurrentImg, MatchingResult result) + { + hDisplayControl.HalconWindow.ClearWindow(); + + hDisplayControl.HalconWindow.DispImage(CurrentImg); + + HXLD DetectionContour = result.getDetectionResults(); + if (DetectionContour != null) + { + hDisplayControl.HalconWindow.SetColor("green"); + hDisplayControl.HalconWindow.SetLineWidth(1); + hDisplayControl.HalconWindow.DispXld(DetectionContour); + //hDisplayControl.HalconWindow.DispObj(DetectionContour); + } + + + //ViewROI.HWndCtrl mView = new HWndCtrl(viewPort); + + //mView.resetAll(); + //mView.repaint(); + + //mView.clearList(); + //mView.changeGraphicSettings(GraphicsContext.GC_LINESTYLE, new HTuple()); + //mView.addIconicVar(CurrentImg); + //HXLD DetectionContour = result.getDetectionResults(); + //if (DetectionContour != null) + //{ + // mView.changeGraphicSettings(GraphicsContext.GC_COLOR, "green"); + // mView.changeGraphicSettings(GraphicsContext.GC_LINEWIDTH, 2); + // mView.addIconicVar(DetectionContour); + // mView.repaint(); + //} + } + + + /// <summary> + /// 读取模板文件 + /// </summary> + /// <param name="indext">模板编号</param> + /// <param name="fileName">模板文件完整路径</param> + /// <returns></returns> + public bool ReadShapeModel(int indext,string fileName) + { + FindShapeModelID[indext] = null; + try + { + FindShapeModelID[indext] = new HShapeModel(); + FindShapeModelID[indext].ReadShapeModel(fileName); + } + catch (HOperatorException e) + { + if (NotifyIconObserverMessage != null) + { + NotifyIconObserverMessage(MatchingAssistant.ERR_READ_SHAPEMODEL); + } + + if (NotifyIconObserver != null) + { + NotifyIconObserver(MatchingAssistant.ERR_READ_SHAPEMODEL); + } + + return false; + } + + return true; + } + + + /// <summary> + /// Creates the model contour. + /// </summary> + public void inspectShapeModel() + { + HRegion tmpReg; + HImage tmpImg; + + if(mImage == null) + { + NotifyIconObserver(MatchingAssistant.ERR_NO_MODEL_DEFINED); + return; + } + + PyramidImages = oImage.InspectShapeModel(out tmpReg, + (int)maxPyramidLevel, + parameterSet.mContrast); + tmpImg = mImage.InspectShapeModel(out PyramidROIs, + (int)maxPyramidLevel, + parameterSet.mContrast); + + NotifyIconObserver(MatchingAssistant.UPDATE_XLD); + NotifyIconObserver(MatchingAssistant.UPDATE_PYRAMID); + } + + /// <summary> + /// Adjusts the range of ScaleStep and AngleStep according to the + /// current set of matching parameters. + /// </summary> + public void determineStepRanges() + { + double vald = 0.0; + HTuple paramValue = new HTuple(); + HTuple paramList = new HTuple(); + string [] paramRange = {"scale_step", "angle_step"}; + + if(mImage == null) + { + NotifyIconObserver(MatchingAssistant.ERR_NO_MODEL_DEFINED); + return; + } + + try + { + paramList = mImage.DetermineShapeModelParams(parameterSet.mNumLevel, + (double)parameterSet.mStartingAngle, + (double)parameterSet.mAngleExtent, + parameterSet.mMinScale, + parameterSet.mMaxScale, + parameterSet.mOptimization, + parameterSet.mMetric, + (int)parameterSet.mContrast, + (int)parameterSet.mMinContrast, + paramRange, + out paramValue); + } + catch(HOperatorException e) + { + exceptionText = e.Message; + NotifyParamObserver(MatchingParam.H_ERR_MESSAGE); + return; + } + + for(int i =0; i<paramList.Length; i++) + { + switch ((string)paramList[i]) + { + case MatchingParam.AUTO_ANGLE_STEP: + vald = (double)paramValue[i]; + + angleStepUpB = vald * 3.0; + angleStepLowB = vald / 3.0; + parameterSet.mAngleStep = vald; + NotifyParamObserver(MatchingParam.RANGE_ANGLE_STEP); + break; + case MatchingParam.AUTO_SCALE_STEP: + vald = (double)paramValue[i]; + + scaleStepUpB = vald * 3.0; + scaleStepLowB = vald / 3.0; + parameterSet.mScaleStep = vald; + NotifyParamObserver(MatchingParam.RANGE_SCALE_STEP); + break; + default: + break; + }//end of switch + }//end of for + } + + + /// <summary> + /// Determines the values for the matching parameters + /// contained in the auto-list automatically. + /// </summary> + public void determineShapeParameter() + { + double vald; + int vali, count; + HTuple paramValue = new HTuple(); + HTuple paramList = new HTuple(); + + if(mImage == null) + { + NotifyIconObserver(MatchingAssistant.ERR_NO_MODEL_DEFINED); + return; + } + + try + { + paramList = mImage.DetermineShapeModelParams(parameterSet.mNumLevel, + (double)parameterSet.mStartingAngle, + (double)parameterSet.mAngleExtent, + parameterSet.mMinScale, + parameterSet.mMaxScale, + parameterSet.mOptimization, + parameterSet.mMetric, + (int)parameterSet.mContrast, + (int)parameterSet.mMinContrast, + parameterSet.getAutoParList(), + out paramValue); + } + catch(HOperatorException e) + { + exceptionText = e.Message; + NotifyParamObserver(MatchingParam.H_ERR_MESSAGE); + return; + } + + count = paramList.Length; + + for(int i =0; i<count; i++) + { + switch ((string)paramList[i]) + { + case MatchingParam.AUTO_ANGLE_STEP: + vald = (double)paramValue[i]; + + if(vald > angleStepUpB) + vald = angleStepUpB; + else if(vald < angleStepLowB) + vald = angleStepLowB; + + parameterSet.mAngleStep = vald; + break; + case MatchingParam.AUTO_CONTRAST: + vali = (int)paramValue[i]; + + if(vali > contrastUpB) + vali = contrastUpB; + else if (vali < contrastLowB) + vali = contrastLowB; + + minContrastUpB = vali; + parameterSet.mContrast= vali; + + inspectShapeModel(); + break; + case MatchingParam.AUTO_MIN_CONTRAST: + vali = (int)paramValue[i]; + + if(vali > minContrastUpB) + vali = minContrastUpB; + else if(vali < minContrastLowB) + vali = minContrastLowB; + + parameterSet.mMinContrast = vali; + break; + case MatchingParam.AUTO_NUM_LEVEL: + vali = (int)paramValue[i]; + + if(vali > pyramLevUpB) + vali = pyramLevUpB; + else if(vali < pyramLevLowB) + vali = pyramLevLowB; + + parameterSet.mNumLevel = vali; + break; + case MatchingParam.AUTO_OPTIMIZATION: + parameterSet.mOptimization = (string)paramValue[i]; + break; + case MatchingParam.AUTO_SCALE_STEP: + vald = (double)paramValue[i]; + + if(vald > scaleStepUpB) + vald = scaleStepUpB; + else if (vald < scaleStepLowB) + vald = scaleStepLowB; + + parameterSet.mScaleStep = vald; + break; + default: + break; + } + NotifyParamObserver((string)paramList[i]); + }//end of for + + if (count!=0) + createNewModelID = true; + } + + /// <summary> + /// Gets the range of either one of the parameters + /// AngleStep and ScaleStep, defined by <c>param</c> + /// </summary> + public int [] getStepRange(string param) + { + int [] range = new int[2]; + + switch (param) + { + case MatchingParam.RANGE_ANGLE_STEP: + range [0] = (int)(angleStepLowB * 10.0 *180.0/Math.PI); //low + range [1] = (int)(angleStepUpB * 10.0 *180.0/Math.PI); //up + break; + case MatchingParam.RANGE_SCALE_STEP: + range [0] = (int) (scaleStepLowB * 1000.0); //low + range [1] = (int) (scaleStepUpB * 1000.0); //up + break; + default: + break; + } + return range; + } + + /********************************************************************/ + /********************************************************************/ + private void dummy(int val) + { + return; + } + private void dummyS(string val) + { + return; + } + + public void LoadPara(string path) + { + MatchingParamSave paraSave = new MatchingParamSave(); + paraSave = paraSave.Load(path); + this.parameterSet = paraSave.TranParam(paraSave); + } + + }//end of class +}//end of namespace + diff --git a/HalconTools/MatchingModule/MatchingOpt.cs b/HalconTools/MatchingModule/MatchingOpt.cs new file mode 100644 index 0000000..a5be302 --- /dev/null +++ b/HalconTools/MatchingModule/MatchingOpt.cs @@ -0,0 +1,147 @@ +using System; +using System.Collections; + + + +namespace HalconTools +{ + public delegate void StatisticsDelegate(int val); + + /// <summary> + /// This class and its derived classes MatchingOptSpeed and + /// MatchingOptStatistics implement the optimization process for the + /// matching parameters in terms of the recognition speed and the + /// recognition rate. Similar to the processing in HDevelop, a timer + /// is used to be able to abort the processing during a run. + /// </summary> + public class MatchingOpt + { + + /// <summary> + /// Delegate to notify about the state of the optimization process + /// </summary> + public StatisticsDelegate NotifyStatisticsObserver; + /// <summary> + /// Information about the optimization process + /// (e.g. Success or Failure) to be displayed in the GUI + /// </summary> + public string statusString; + /// <summary> + /// Statistics for the parameter optimization + /// </summary> + public string [] recogTabOptimizationData = new string[8]; + /// <summary> + /// Statistics for the recognition rate + /// </summary> + public string [] inspectTabRecogRateData = new string[5]; + /// <summary> + /// Statistics of detection results for the optimal + /// recognition rate + /// </summary> + public string [] inspectTabStatisticsData = new string[21]; + + /// <summary> + /// Reference to instance of MatchingAssistant, + /// which triggers the optimization performance. + /// </summary> + public MatchingAssistant mAssistant; + /// <summary> + /// Result of detection + /// </summary> + public MatchingResult mResults; + /// <summary> + /// Set of matching parameters + /// </summary> + public MatchingParam mParams; + /// <summary> + /// Number of all test images to be inspected + /// </summary> + public int tImageCount; + /// <summary> + /// Index of test image, being inspected currently + /// </summary> + public int mCurrentIndex; + /// <summary> + /// Flag, indicating success or failure of optimization process + /// </summary> + public bool mOptSuccess; + + public IEnumerator iterator; + + /// <summary> + /// Constant describing a change in the status line + /// </summary> + public const int UPDATE_RECOG_STATISTICS_STATUS= 21; + /// <summary> + /// Constant describing a change in the statistics of + /// the last recognition run + /// </summary> + public const int UPDATE_RECOG_UPDATE_VALS = 22; + /// <summary> + /// Constant describing a change in the statistics of + /// the optimal recognition run + /// </summary> + public const int UPDATE_RECOG_OPTIMUM_VALS = 23; + /// <summary> + /// Constant describing an error during the optimization + /// run, concerning the test image data or matching model + /// </summary> + public const int UPDATE_TEST_ERR = 24; + /// <summary> + /// Constant describing an error, which says that there is + /// no possible combination of matching parameters to obtain + /// a detection result + /// </summary> + public const int UPDATE_RECOG_ERR = 25; + + /// <summary> + /// Constant describing a change in the statistics of + /// the recognition rate + /// </summary> + public const int UPDATE_INSP_RECOGRATE = 26; + /// <summary> + /// Constant describing a change in the statics of + /// the average recognition results + /// </summary> + public const int UPDATE_INSP_STATISTICS = 27; + /// <summary> + /// Constant describing an update of the + /// detection results + /// </summary> + public const int UPDATE_TESTVIEW = 28; + /// <summary> + /// Constant describing the success of the optimization + /// process and triggering the adjustment of the GUI + /// components to the optimal parameter setting + /// </summary> + public const int RUN_SUCCESSFUL = 29; + /// <summary> + /// Constant describing the failure of the optimization + /// process and reseting the matching parameters to the + /// initial setup + /// </summary> + public const int RUN_FAILED = 30; + + /// <summary> + /// Constructor + /// </summary> + public MatchingOpt(){} + + /// <summary> + /// Performs an optimization step. + /// </summary> + public virtual bool ExecuteStep(){ return true; } + + /// <summary> + /// Resets all parameters for evaluating the performance to their initial values. + /// </summary> + public virtual void reset(){} + + /// <summary> + /// + /// </summary> + public virtual void stop(){} + + public void dummy(int val) { } + }//class +}//end of namespace diff --git a/HalconTools/MatchingModule/MatchingOptSpeed.cs b/HalconTools/MatchingModule/MatchingOptSpeed.cs new file mode 100644 index 0000000..c71437d --- /dev/null +++ b/HalconTools/MatchingModule/MatchingOptSpeed.cs @@ -0,0 +1,245 @@ +using System; +using HalconDotNet; +using System.ComponentModel; +using System.Windows.Forms; +using System.Data; + + +namespace HalconTools +{ + /// <summary> + /// This class optimizes the performance of a defined shape-based model + /// for a given set of test images. + /// To perform an optimization of the detection parameters, the instance + /// has to know the used set of matching parameters and the calling + /// MatchingAssistant, to retrieve the set of test images and to call + /// the methods for finding the model. + /// The optimization is performed in the sense that the two detection + /// parameters ScoreMin and Greediness are iteratively increased and + /// decreased, respectively, and every new parameter combination is used + /// to detect the model in the set of test images. Each performance is + /// then measured and compared with the best performance so far. + /// The single execution steps are triggered by a timer from the + /// class MatchingAssistant, so that you can stop the optimization anytime + /// during the run. + /// </summary> + public class MatchingOptSpeed: MatchingOpt + { + // private class members + private int mCurrScoreMin; + private int mCurrGreediness; + private double mCurrMeanTime; + private int mScoreMinStep; + private int mGreedinessStep; + + private int mOptScoreMin; + private int mOptGreediness; + private double mOptMeanTime; + + private int mMatchesNum; + private int mExpMatchesNum; + + + /// <summary>Constructor</summary> + /// <param name="mAss">MatchingAssistant that created this instance</param> + /// <param name="mPars">Current set of matching parameters</param> + public MatchingOptSpeed(MatchingAssistant mAss, MatchingParam mPars) + { + mAssistant = mAss; + mParams = mPars; + NotifyStatisticsObserver = new StatisticsDelegate(dummy); + + mScoreMinStep = -10; + mGreedinessStep = 10; + reset(); + + tImageCount = mAssistant.TestImages.Count; + } + + + /// <summary> + /// In each execution step a certain parameter set is applied + /// to the whole set of test images and the performance is then + /// evaluated. + /// </summary> + public override bool ExecuteStep() + { + double cScoreMin, cGreed, recogRate; + string fileName; + int actualMatches, expectedMatches; + bool success; + + if(!iterator.MoveNext()) + return false; + + + cScoreMin = mCurrScoreMin / 100.0; + cGreed = mCurrGreediness / 100.0; + + statusString = "Testing Image " + (mCurrentIndex + 1) + + " - Minimum Score: " + cScoreMin + + " - Greediness: " + cGreed; + + NotifyStatisticsObserver(MatchingOpt.UPDATE_RECOG_STATISTICS_STATUS); + + fileName = (string)iterator.Current; + + mAssistant.setTestImage(fileName); + + mAssistant.setMinScore(cScoreMin); + mAssistant.setGreediness(cGreed); + + if(!mAssistant.applyFindModel()) + return false; + + + mResults = mAssistant.getMatchingResults(); + actualMatches = mResults.count; + + expectedMatches = 0; + + switch(mParams.mRecogSpeedMode) + { + case MatchingParam.RECOGM_MANUALSELECT: + expectedMatches = mParams.mRecogManualSel; + break; + case MatchingParam.RECOGM_ATLEASTONE: + expectedMatches = 1; + if(actualMatches > 1) + actualMatches = 1; + break; + case MatchingParam.RECOGM_MAXNUMBER: + expectedMatches = mParams.mNumMatches; + break; + default: + break; + } + + mMatchesNum += actualMatches; + mExpMatchesNum += expectedMatches; + + + recogRate = (mExpMatchesNum > 0) ? + (100.0 * mMatchesNum / mExpMatchesNum) : 0.0; + + mCurrMeanTime = mCurrMeanTime * mCurrentIndex + mResults.mTime; + mCurrMeanTime /= ++mCurrentIndex; + + //write data into strings and call for update + recogTabOptimizationData [0] = "" + Math.Round(cScoreMin, 2); + recogTabOptimizationData [1] = "" + Math.Round(cGreed, 2); + recogTabOptimizationData [2] = "" + Math.Round(recogRate, 2) + " %"; + + if( mCurrMeanTime < 1000.0 ) + recogTabOptimizationData [3] = Math.Round(mCurrMeanTime, 2) + " ms"; + else + recogTabOptimizationData [3] = Math.Round(mCurrMeanTime/1000.0, 2)+ " s"; + + NotifyStatisticsObserver(MatchingOpt.UPDATE_RECOG_UPDATE_VALS); + + if(mCurrentIndex < tImageCount) + return true; + + iterator.Reset(); + mCurrentIndex = 0; + mMatchesNum = 0; + mExpMatchesNum = 0; + + success = (mParams.mRecogRateOpt == 0) ? + (Math.Abs((double)recogRate - mParams.mRecogRate) < 0.001) + : (recogRate >= (mParams.mRecogRate - 0.000001)); + + + if(success) + { + mOptSuccess = true; + if(mCurrMeanTime < mOptMeanTime) + { + mOptScoreMin = mCurrScoreMin; + mOptGreediness = mCurrGreediness; + + this.recogTabOptimizationData[4] = "" + Math.Round(mOptScoreMin/100.0, 2); + this.recogTabOptimizationData[5] = "" + Math.Round(mOptGreediness/100.0, 2); + this.recogTabOptimizationData[6] = Math.Round(recogRate, 2) + " %"; + + mOptMeanTime = mCurrMeanTime; + recogTabOptimizationData[7] = recogTabOptimizationData[3]; + NotifyStatisticsObserver(MatchingOpt.UPDATE_RECOG_OPTIMUM_VALS); + } + mCurrGreediness += mGreedinessStep; + return (mCurrGreediness <= 100); + } + + mCurrScoreMin += mScoreMinStep; + + if(mOptSuccess) + return (mCurrScoreMin >= 10); + + return (mCurrScoreMin > 0); + } + + + /// <summary> + /// Resets all parameters for evaluating the performance to their initial values. + /// </summary> + public override void reset() + { + mOptSuccess = false; + + for(int i=0; i<8; i++) + this.recogTabOptimizationData[i]="-"; + + statusString = "Optimization Status:"; + + mCurrScoreMin = 100; + mCurrGreediness = 0; + mCurrMeanTime = 0.0; + + mOptScoreMin = 100; + mOptGreediness = 0; + mOptMeanTime = Double.MaxValue; + + mMatchesNum = 0; + mExpMatchesNum = 0; + + tImageCount = mAssistant.TestImages.Count; + iterator = mAssistant.TestImages.Keys.GetEnumerator(); + mCurrentIndex = 0; + } + + + /// <summary> + /// If the optimization has stopped, then check whether it was + /// completed successfully or whether it was aborted due to errors or + /// to user interaction. + /// Depending on the failure or success of the run, the GUI is notified + /// for visual update of the results and obtained statistics. + /// </summary> + public override void stop() + { + if(tImageCount==0) + { + NotifyStatisticsObserver(MatchingAssistant.ERR_NO_TESTIMAGE); + NotifyStatisticsObserver(MatchingOpt.RUN_FAILED); + } + else if(!mOptSuccess && (mCurrScoreMin==0.0)) + { + NotifyStatisticsObserver(MatchingOpt.UPDATE_RECOG_ERR); + NotifyStatisticsObserver(MatchingOpt.RUN_FAILED); + } + else if(!mOptSuccess) + { + NotifyStatisticsObserver(MatchingOpt.UPDATE_TEST_ERR); + NotifyStatisticsObserver(MatchingOpt.RUN_FAILED); + } + else + { + statusString = "Optimization finished successfully"; + NotifyStatisticsObserver(MatchingOpt.UPDATE_RECOG_STATISTICS_STATUS); + mAssistant.setMinScore(mOptScoreMin/100.0); + mAssistant.setGreediness(mOptGreediness/100.0); + NotifyStatisticsObserver(MatchingOpt.RUN_SUCCESSFUL); + } + } + }//end of class +}//end of namespace diff --git a/HalconTools/MatchingModule/MatchingOptStatistics.cs b/HalconTools/MatchingModule/MatchingOptStatistics.cs new file mode 100644 index 0000000..36e8bba --- /dev/null +++ b/HalconTools/MatchingModule/MatchingOptStatistics.cs @@ -0,0 +1,283 @@ +using System; +using HalconDotNet; + +namespace HalconTools +{ + /// <summary> + /// To determine the performance of a shape-based model, given + /// a parameter setup for model creation and detection, + /// this class applies a model detection for the whole set + /// of test images loaded and computes an all-over statistics. + /// </summary> + public class MatchingOptStatistics: MatchingOpt + { + // recognize - group + private int mMatchesNumProb; + private bool mModelFound; + private int mSpecMatchesNum; + private int mMaxMatchesNum; + private int mFoundMatchesNum; + private int mImagesWithOneMatchNum; + private int mImagesWithSpecMatchesNum; + private int mImagesWithMaxMatchesNum; + + // statistic - group + private double mScoreMin; + private double mScoreMax; + private double mTimeMin; + private double mTimeMax; + private double mRowMin; + private double mRowMax; + private double mColMin; + private double mColMax; + private double mAngleMin; + private double mAngleMax; + private double mScaleRowMin; + private double mScaleRowMax; + private double mScaleColMin; + private double mScaleColMax; + + + /// <summary>Constructor</summary> + /// <param name="mAss">MatchingAssistant that created this instance</param> + /// <param name="mPars">Current set of matching parameters</param> + public MatchingOptStatistics(MatchingAssistant mAss, MatchingParam mPars) + { + mAssistant = mAss; + mParams = mPars; + NotifyStatisticsObserver = new StatisticsDelegate(dummy); + + reset(); + tImageCount = mAssistant.TestImages.Count; + } + + /// <summary> + /// With each execution step the shape-based model is searched in + /// the current test image. The detection result is then compared + /// with the previous results and the overall statistics is adjusted. + /// </summary> + public override bool ExecuteStep() + { + string fileName, imgNumStr; + int val, i; + string matchFormatStr; + int actualMatches; + int expectedMatches; + int maxNumMatches; + double score, time, row, col, angle, angleB, scaleR, scaleC; + + if(!iterator.MoveNext()) + return false; + + fileName = (string)iterator.Current; + mAssistant.setTestImage(fileName); + + if(!(mOptSuccess = mAssistant.applyFindModel())) + return false; + + mResults = mAssistant.getMatchingResults(); + actualMatches = mResults.count; + + // determine recognition rate ------------------ + expectedMatches = mParams.mRecogManualSel; + maxNumMatches = mParams.mNumMatches; + + mSpecMatchesNum += expectedMatches; + mMaxMatchesNum += maxNumMatches; + mFoundMatchesNum += actualMatches; + + if(actualMatches > 0) + mImagesWithOneMatchNum++; + + if(actualMatches >= expectedMatches) + mImagesWithSpecMatchesNum++; + + if(actualMatches == maxNumMatches) + mImagesWithMaxMatchesNum++; + + mCurrentIndex++; + + this.inspectTabRecogRateData[2] = "-"; + this.inspectTabRecogRateData[3] = "-"; + this.inspectTabRecogRateData[4] = "-"; + + imgNumStr = " of " + mCurrentIndex + " images)"; + + val = mImagesWithOneMatchNum; + this.inspectTabRecogRateData[0] = Math.Round(100.0* ((double)val / mCurrentIndex), 2) + + " % (" + val + imgNumStr; + val = mImagesWithSpecMatchesNum; + this.inspectTabRecogRateData[1] = Math.Round(100.0* ((double) val / mCurrentIndex), 2) + + " % (" + val + imgNumStr; + if(mMaxMatchesNum > 0) + { + matchFormatStr = " of " + mMaxMatchesNum + " models)"; + + val = mImagesWithMaxMatchesNum; + this.inspectTabRecogRateData[2] = Math.Round(100.0* ((double)val / mCurrentIndex), 2) + + " % (" + val + imgNumStr; + val = mFoundMatchesNum; + this.inspectTabRecogRateData[3] = Math.Round(100.0*((double) val / mMaxMatchesNum), 2) + + " % (" + val + matchFormatStr; + } + + if(mSpecMatchesNum > 0) + { + matchFormatStr = " of " + mSpecMatchesNum + " models)"; + val = mFoundMatchesNum; + this.inspectTabRecogRateData[4] = Math.Round(100.0* ((double)val / mSpecMatchesNum), 2) + + " % (" + val + matchFormatStr; + } + NotifyStatisticsObserver(MatchingOpt.UPDATE_INSP_RECOGRATE); + + // determine statistics data ------------ + if(actualMatches > 0) + { + i=0; + if(!mModelFound) + { + mScoreMin = mScoreMax = mResults.mScore[0].D; + mTimeMin = mTimeMax = mResults.mTime; + mRowMin = mRowMax = mResults.mRow[0].D; + mColMin = mColMax = mResults.mCol[0].D; + mAngleMin = mAngleMax = mResults.mAngle[0].D; + mScaleRowMin= mScaleRowMax= mResults.mScaleRow[0].D; + mScaleColMin= mScaleColMax= mResults.mScaleCol[0].D; + mModelFound = true; + i++; + } + + for(; i < actualMatches; i++) + { + score = mResults.mScore[i].D; + if(score < mScoreMin) + mScoreMin = score; + else if(score > mScoreMax) + mScoreMax = score; + + row = mResults.mRow[i].D; + if(row < mRowMin) + mRowMin = row; + else if(row > mRowMax) + mRowMax = row; + + col = mResults.mCol[i].D; + if(col < mColMin) + mColMin = col; + else if(col > mColMax) + mColMax = col; + + angle = mResults.mAngle[i].D; + if(angle < mAngleMin) + mAngleMin = angle; + else if(angle > mAngleMax) + mAngleMax = angle; + + scaleR = mResults.mScaleRow[i].D; + if(scaleR < mScaleRowMin) + mScaleRowMin = scaleR; + else if(scaleR > mScaleRowMax) + mScaleRowMax = scaleR; + + scaleC = mResults.mScaleCol[i].D; + if(scaleC < mScaleColMin) + mScaleColMin = scaleC; + else if(scaleC > mScaleColMax) + mScaleColMax = scaleC; + }//end of for + + time = mResults.mTime; + if(time < mTimeMin) + mTimeMin = time; + else if(time > mTimeMax) + mTimeMax = time; + }//end of if + + + if(mModelFound) + { + this.inspectTabStatisticsData[0] = "" + Math.Round(mScoreMin, 2); + this.inspectTabStatisticsData[1] = "" + Math.Round(mScoreMax, 2); + this.inspectTabStatisticsData[2] = "" + Math.Round((mScoreMax - mScoreMin),2); + + this.inspectTabStatisticsData[3] = "" + Math.Round(mTimeMin, 2); + this.inspectTabStatisticsData[4] = "" + Math.Round(mTimeMax, 2); + this.inspectTabStatisticsData[5] = "" + Math.Round((mTimeMax - mTimeMin),2); + + this.inspectTabStatisticsData[6] = "" + Math.Round(mRowMin, 2); + this.inspectTabStatisticsData[7] = "" + Math.Round(mRowMax, 2); + this.inspectTabStatisticsData[8] = "" + Math.Round((mRowMax - mRowMin), 2); + + this.inspectTabStatisticsData[9] = "" + Math.Round(mColMin, 2); + this.inspectTabStatisticsData[10] = "" + Math.Round(mColMax, 2); + this.inspectTabStatisticsData[11] = "" + Math.Round((mColMax - mColMin), 2); + + angle = (double)mAngleMin*180.0/Math.PI; + angleB = (double)mAngleMax*180.0/Math.PI; + this.inspectTabStatisticsData[12] = "" + Math.Round(angle, 2); + this.inspectTabStatisticsData[13] = "" + Math.Round(angleB, 2) ; + this.inspectTabStatisticsData[14] = "" + Math.Round((angleB - angle), 2) ; + + this.inspectTabStatisticsData[15] = "" + Math.Round(mScaleRowMin, 2); + this.inspectTabStatisticsData[16] = "" + Math.Round(mScaleRowMax, 2); + this.inspectTabStatisticsData[17] = "" + Math.Round((mScaleRowMax - mScaleRowMin),2); + + this.inspectTabStatisticsData[18] = "" + Math.Round(mScaleColMin, 2); + this.inspectTabStatisticsData[19] = "" + Math.Round(mScaleColMax, 2); + this.inspectTabStatisticsData[20] = "" + Math.Round((mScaleColMax - mScaleColMin), 2); + + NotifyStatisticsObserver(MatchingOpt.UPDATE_INSP_STATISTICS); + } + return (mCurrentIndex < tImageCount); + } + + + /// <summary> + /// Resets all parameters for evaluating the performance to their initial values. + /// </summary> + public override void reset() + { + mMatchesNumProb = mParams.mNumMatches; + mModelFound = false; + mSpecMatchesNum = 0; + mMaxMatchesNum = 0; + mFoundMatchesNum = 0; + mImagesWithOneMatchNum = 0; + mImagesWithSpecMatchesNum = 0; + mImagesWithMaxMatchesNum = 0; + mOptSuccess = false; + + for(int i=0; i < 21;i++) + this.inspectTabStatisticsData[i]="-"; + + inspectTabRecogRateData[0] = "100.00 % (1 of 1 image)"; + inspectTabRecogRateData[1] = "100.00 % (1 of 1 image)"; + inspectTabRecogRateData[2] = "100.00 % (1 of 1 image)"; + inspectTabRecogRateData[3] = "100.00 % (1 of 1 model)"; + inspectTabRecogRateData[4] = "100.00 % (1 of 1 model)"; + + tImageCount = mAssistant.TestImages.Count; + iterator = mAssistant.TestImages.Keys.GetEnumerator(); + mCurrentIndex = 0; + } + + /// <summary> + /// If the optimization has stopped, then check whether it was + /// completed successfully or whether it was aborted + /// due to errors or to user interaction. + /// Depending on the failure or success of the run, the GUI is notified + /// for visual update of the results and obtained statistics. + /// </summary> + public override void stop() + { + if(tImageCount==0) + { + NotifyStatisticsObserver(MatchingAssistant.ERR_NO_TESTIMAGE); + } + else if(!mOptSuccess) + { + NotifyStatisticsObserver(MatchingOpt.UPDATE_TEST_ERR); + } + } + }//end of class +}//end of namespace diff --git a/HalconTools/MatchingModule/MatchingParam.cs b/HalconTools/MatchingModule/MatchingParam.cs new file mode 100644 index 0000000..56042d5 --- /dev/null +++ b/HalconTools/MatchingModule/MatchingParam.cs @@ -0,0 +1,641 @@ +using System; +using System.Collections; +using HalconDotNet; + + +namespace HalconTools +{ + + /// <summary> + /// This class contains the parameters that are used to + /// create and detect the shape-based model. + /// Besides auxiliary methods to set and get the parameters, there + /// is a set of methods to handle the parameters for 'automatic' + /// determination. + /// </summary> + public class MatchingParam + { + + // --------------- create model --------------------- + + /// <summary> + /// Defines the maximum number of pyramid levels + /// </summary> + public int mNumLevel; + /// <summary> + /// Measure for local gray value differences between + /// the object and the background and between + /// different parts of the object + /// </summary> + public int mContrast; + /// <summary> + /// Minimum scale of the model + /// </summary> + public double mMinScale; + /// <summary> + /// Maximum scale of the model + /// </summary> + public double mMaxScale; + /// <summary> + /// Step length within the selected range of scales + /// </summary> + public double mScaleStep; + /// <summary> + /// Smallest rotation of the model + /// </summary> + public double mStartingAngle; + /// <summary> + /// Extent of the rotation angles + /// </summary> + public double mAngleExtent; + /// <summary> + /// Step length within the selected range of angles + /// </summary> + public double mAngleStep; + /// <summary> + /// Used to separate the model from the noise in the image + /// </summary> + public int mMinContrast; + /// <summary> + /// Conditions determining how the model is supposed to be + /// recognized in the image + /// </summary> + public string mMetric; + /// <summary> + /// Defines the kind of optimization and optionally the + /// kind of method used for generating the model + /// </summary> + public string mOptimization; + + + // -------------------- find model ----------------------- + + /// <summary> + /// Defines the score a potential match must have at least + /// to be accepted as an instance of the model in the image + /// </summary> + public double mMinScore; + /// <summary> + /// Number of instances of the model to be found + /// </summary> + public int mNumMatches; + /// <summary> + /// 'Greediness' of the search heuristic (0 means safe but slow - + /// 1 means fast but matches may be missed). + /// </summary> + public double mGreediness; + /// <summary> + /// Defines fraction two instances may at most overlap in order + /// to consider them as different instances, and hence + /// to be returned separately + /// </summary> + public double mMaxOverlap; + /// <summary> + /// Determines whether the instances should be extracted with + /// subpixel accuracy + /// </summary> + public string mSubpixel; + /// <summary> + /// Determines the lowest pyramid level to which the + /// found matches are tracked. Mechanism is used to + /// speed up the matching. + /// </summary> + public int mLastPyramidLevel; + + //----------------- optimize recognition speed ---------------- + + /// <summary> + /// Defines heuristic for evaluating the detection results + /// </summary> + public int mRecogRateOpt; /* opt=0 => '=' und opt=1 => '>='*/ + /// <summary> + /// Defines rate for the model recognition + /// </summary> + public int mRecogRate; + /// <summary> + /// Defines mode to determine accuracy of recognition + /// </summary> + public string mRecogSpeedMode; + /// <summary> + /// Manual selection of number of matches to be found. + /// </summary> + public int mRecogManualSel; + + // ---------------------- inspect vals ----------------------- + + /// <summary> + /// Is equal to the value of the parameter mNumMatches + /// </summary> + public int mInspectMaxNoMatch; + /// <summary> + /// List of parameters to be determined automatically + /// </summary> + public ArrayList paramAuto; + + + /// <summary> + /// Constant defining the auto-mode for the parameter NumLevels + /// </summary> + public const string AUTO_NUM_LEVEL = "num_levels"; + /// <summary> + /// Constant defining the auto-mode for the parameter Contrast + /// </summary> + public const string AUTO_CONTRAST = "contrast"; + /// <summary> + /// Constant defining the auto-mode for the parameter ScaleStep + /// </summary> + public const string AUTO_SCALE_STEP = "scale_step"; + /// <summary> + /// Constant defining the auto-mode for the parameter AngleStep + /// </summary> + public const string AUTO_ANGLE_STEP = "angle_step"; + /// <summary> + /// Constant defining the auto-mode for the parameter MinContrast + /// </summary> + public const string AUTO_MIN_CONTRAST = "min_contrast"; + /// <summary> + /// Constant defining the auto-mode for the parameter Optimization + /// </summary> + public const string AUTO_OPTIMIZATION = "optimization"; + + /// <summary> + /// Constant indicating an update for the button representation of + /// AngleStart. + /// </summary> + public const string BUTTON_ANGLE_START = "angle_start"; + /// <summary> + /// Constant indicating an update for the button representation of + /// AngleExtent. + /// </summary> + public const string BUTTON_ANGLE_EXTENT = "angle_extent"; + /// <summary> + /// Constant indicating an update for the button representation of + /// ScaleMin. + /// </summary> + public const string BUTTON_SCALE_MIN = "scale_min"; + /// <summary> + /// Constant indicating an update for the button representation of + /// ScaleMax. + /// </summary> + public const string BUTTON_SCALE_MAX = "scale_max"; + /// <summary> + /// Constant indicating an update for the button representation of + /// Metric. + /// </summary> + public const string BUTTON_METRIC = "metric"; + /// <summary> + /// Constant indicating an update for the button representation of + /// MinScore. + /// </summary> + public const string BUTTON_MINSCORE = "min_score"; + /// <summary> + /// Constant indicating an update for the button representation of + /// Greediness. + /// </summary> + public const string BUTTON_GREEDINESS = "greediness"; + + /// <summary> + /// Constant defining the number of instances to be detected: + /// Find number of models specified by the user + /// </summary> + public const string RECOGM_MANUALSELECT = "RecognFindSpecifiedNumber"; + /// <summary> + /// Constant defining the number of instances to be detected: + /// Find at least one model instance per image + /// </summary> + public const string RECOGM_ATLEASTONE = "RecognAtLeast"; + /// <summary> + /// Constant defining the number of instances to be detected: + /// Find maximum number of model instances per image + /// </summary> + public const string RECOGM_MAXNUMBER = "RecognFindMaximum"; + + /// <summary> + /// Constant indicating a change of ScaleStep for + /// its GUI component representation + /// </summary> + public const string RANGE_SCALE_STEP = "RangeScaleStep"; + /// <summary> + /// Constant indicating a change of AngleStep for + /// its GUI component representation + /// </summary> + public const string RANGE_ANGLE_STEP = "RangeAngleStep"; + + /// <summary> + /// Constant indicating an error regarding the parameter set. + /// It is forwarded for HALCON errors that occur during the + /// creation of the shape-based model or detection of instances + /// of the model + /// </summary> + public const string H_ERR_MESSAGE = "Halcon Error"; + + + /// <summary>Constructor</summary> + public MatchingParam() + { + paramAuto = new ArrayList(10); + } + + /*******************************************************************/ + /* Setter-methods for the set of values, that can be determined + * automatically. If a parameter gets assigned a new value + * it can be only caused by user interaction, which means, the + * auto-modus for these particular parameters needs to be + * canceled, to avoid further automatic adjustment + /*******************************************************************/ + + /// <summary> + /// Sets the parameter <c>NumLevel</c> to the supplied value; + /// if the parameter has been in auto-mode, cancel this option + /// </summary> + public void setNumLevel(double val) + { + mNumLevel = (int)val; + if(paramAuto.Contains(AUTO_NUM_LEVEL)) + paramAuto.Remove(AUTO_NUM_LEVEL); + } + + /// <summary> + /// Sets the parameter <c>Contrast</c> to the supplied value; + /// if the parameter has been in auto-mode, cancel this option + /// </summary> + public void setContrast(int val) + { + mContrast = val; + + if(paramAuto.Contains(AUTO_CONTRAST)) + paramAuto.Remove(AUTO_CONTRAST); + } + + /// <summary> + /// Sets the parameter <c>MinScale</c> to the supplied value; + /// if the parameter has been in auto-mode, cancel this option + /// </summary> + public void setMinScale(double val) + { + mMinScale = val; + } + + /// <summary> + /// Sets the parameter <c>MaxScale</c> to the supplied value; + /// if the parameter has been in auto-mode, cancel this option + /// </summary> + public void setMaxScale(double val) + { + mMaxScale = val; + } + + /// <summary> + /// Sets the parameter <c>ScaleStep</c> to the supplied value; + /// if the parameter has been in auto-mode, cancel this option + /// </summary> + public void setScaleStep(double val) + { + mScaleStep = val; + + if(paramAuto.Contains(AUTO_SCALE_STEP)) + paramAuto.Remove(AUTO_SCALE_STEP); + + } + + /// <summary> + /// Sets the parameter <c>AngleStep</c> to the supplied value; + /// if the parameter has been in auto-mode, cancel this option + /// </summary> + public void setAngleStep(double val) + { + mAngleStep = val; + + if(paramAuto.Contains(AUTO_ANGLE_STEP)) + paramAuto.Remove(AUTO_ANGLE_STEP); + } + + /// <summary> + /// Sets the parameter <c>MinContrast</c> to the supplied value; + /// if the parameter has been in auto-mode, cancel this option + /// </summary> + public void setMinContrast(int val) + { + mMinContrast = val; + + if(paramAuto.Contains(AUTO_MIN_CONTRAST)) + paramAuto.Remove(AUTO_MIN_CONTRAST); + } + + /// <summary> + /// Sets the parameter <c>Optimization</c> to the supplied value; + /// if the parameter has been in auto-mode, cancel this option + /// </summary> + /// <param name="val"></param> + public void setOptimization(string val) + { + mOptimization = val; + + if(paramAuto.Contains(AUTO_OPTIMIZATION)) + paramAuto.Remove(AUTO_OPTIMIZATION); + } + + + /*******************************************************************/ + /* Setter-methods for the other values */ + /*******************************************************************/ + + /// <summary> + /// Sets the parameter <c>StartingAngle</c> to the supplied value + /// </summary> + public void setStartingAngle(double val) + { + mStartingAngle = val; + } + + /// <summary> + /// Sets the parameter <c>AngleExtent</c> to the supplied value + /// </summary> + public void setAngleExtent(double val) + { + mAngleExtent = val; + } + + /// <summary> + /// Sets the parameter <c>Metric</c> to the supplied value + /// </summary> + public void setMetric(string val) + { + mMetric = val; + } + + /// <summary> + /// Sets the parameter <c>MinScore</c> to the supplied value + /// </summary> + public void setMinScore(double val) + { + mMinScore = val; + } + + /// <summary> + /// Sets the parameter <c>NumMatches</c> to the supplied value + /// </summary> + public void setNumMatches(int val) + { + mNumMatches = val; + } + + + /// <summary> + /// Sets the parameter <c>Greediness</c> to the supplied value + /// </summary> + public void setGreediness(double val) + { + mGreediness = val; + } + + /// <summary> + /// Sets the parameter <c>MaxOverlap</c> to the supplied value + /// </summary> + public void setMaxOverlap(double val) + { + mMaxOverlap = val; + } + + /// <summary> + /// Sets the parameter <c>Subpixel</c> to the supplied value + /// </summary> + public void setSubPixel(string val) + { + mSubpixel = val; + } + + /// <summary> + /// Sets the parameter <c>LastPyramidLevel</c> to the supplied value + /// </summary> + public void setLastPyramLevel(int val) + { + mLastPyramidLevel = val; + } + + /*******************************************************************/ + /*******************************************************************/ + /*******************************************************************/ + + /// <summary> + /// Sets the parameter defining the options for the recognition rate + /// to the supplied value + /// </summary> + public void setRecogRateOption(int val) + { + mRecogRateOpt = val; + } + + /// <summary> + /// Sets the parameter defining the rate for the recognition to the + /// supplied value. + /// </summary> + public void setRecogitionRate(int val) + { + mRecogRate = val; + } + + /// <summary> + /// Sets the parameter to define the mode of accuracy + /// </summary> + public void setRecogSpeedMode(string val) + { + mRecogSpeedMode = val; + } + + /// <summary> + /// Sets the number of matches to be recognized to the supplied value. + /// </summary> + public void setRecogManualSelection(int val) + { + mRecogManualSel = val; + } + + /// <summary> + /// Sets the parameter <c>NumMatches</c> to the supplied value. + /// </summary> + public void setInspectMaxNoMatchValue(int val) + { + mInspectMaxNoMatch = val; + } + + + /*******************************************************************/ + /*******************************************************************/ + + + /// <summary> + /// Checks if the parameter referenced by <c>mode</c> is + /// in the auto-mode list, i.e., that it is determined automatically + /// </summary> + /// <param name="mode"> + /// Constant starting with AUTO_*, describing one of the parameters + /// for the auto-mode. + /// </param> + public bool isAuto(string mode) + { + bool isAuto = false; + + switch (mode) + { + case AUTO_ANGLE_STEP: + isAuto = paramAuto.Contains(AUTO_ANGLE_STEP); + break; + case AUTO_CONTRAST: + isAuto = paramAuto.Contains(AUTO_CONTRAST); + break; + case AUTO_MIN_CONTRAST: + isAuto = paramAuto.Contains(AUTO_MIN_CONTRAST); + break; + case AUTO_NUM_LEVEL: + isAuto = paramAuto.Contains(AUTO_NUM_LEVEL); + break; + case AUTO_OPTIMIZATION: + isAuto = paramAuto.Contains(AUTO_OPTIMIZATION); + break; + case AUTO_SCALE_STEP: + isAuto = paramAuto.Contains(AUTO_SCALE_STEP); + break; + default: break; + } + + return isAuto; + } + + /// <summary> + /// Checks if any parameter is registered for automatic + /// determination. If not, the call for automatic + /// determination can be skipped + /// </summary> + public bool isOnAuto() + { + if( paramAuto.Count > 0 ) + return true; + else + return false; + } + + /// <summary> + /// Adds the parameter <c>val</c> to the list of parameters that + /// will be determined automatically before the application. + /// </summary> + /// <param name="val"> + /// Constant starting with AUTO_*, describing one of the parameters + /// for the auto-mode. + /// </param> + /// <returns> + /// Indicates whether the variable is already in auto-mode or + /// was added to the auto-list successfully. + /// </returns> + public bool setAuto(string val) + { + string mode = ""; + + switch (val) + { + case AUTO_ANGLE_STEP: + if(!paramAuto.Contains(AUTO_ANGLE_STEP)) + mode = AUTO_ANGLE_STEP; + break; + case AUTO_CONTRAST: + if(!paramAuto.Contains(AUTO_CONTRAST)) + mode = AUTO_CONTRAST; + break; + case AUTO_MIN_CONTRAST: + if(!paramAuto.Contains(AUTO_MIN_CONTRAST)) + mode = AUTO_MIN_CONTRAST; + break; + case AUTO_NUM_LEVEL: + if(!paramAuto.Contains(AUTO_NUM_LEVEL)) + mode = AUTO_NUM_LEVEL; + break; + case AUTO_OPTIMIZATION: + if(!paramAuto.Contains(AUTO_OPTIMIZATION)) + mode = AUTO_OPTIMIZATION; + break; + case AUTO_SCALE_STEP: + if(!paramAuto.Contains(AUTO_SCALE_STEP)) + mode = AUTO_SCALE_STEP; + break; + default: break; + } + + if(mode == "") + return false; + + paramAuto.Add(mode); + return true; + } + + /// <summary> + /// Removes the parameter <c>val</c> from the list of parameters that + /// will be determined automatically. + /// </summary> + /// <param name="val"> + /// Constant starting with AUTO_*, describing one of the parameters for + /// the auto-mode. + /// </param> + /// <returns> + /// Indicates if the variable was removed from the + /// auto-list successfully. + /// </returns> + public bool removeAuto(string val) + { + string mode = ""; + + switch (val) + { + case AUTO_ANGLE_STEP: + if(paramAuto.Contains(AUTO_ANGLE_STEP)) + mode = AUTO_ANGLE_STEP; + break; + case AUTO_CONTRAST: + if(paramAuto.Contains(AUTO_CONTRAST)) + mode = AUTO_CONTRAST; + break; + case AUTO_MIN_CONTRAST: + if(paramAuto.Contains(AUTO_MIN_CONTRAST)) + mode = AUTO_MIN_CONTRAST; + break; + case AUTO_NUM_LEVEL: + if(paramAuto.Contains(AUTO_NUM_LEVEL)) + mode = AUTO_NUM_LEVEL; + break; + case AUTO_OPTIMIZATION: + if(paramAuto.Contains(AUTO_OPTIMIZATION)) + mode = AUTO_OPTIMIZATION; + break; + case AUTO_SCALE_STEP: + if(paramAuto.Contains(AUTO_SCALE_STEP)) + mode = AUTO_SCALE_STEP; + break; + default: break; + } + + if(mode == "") + return false; + + paramAuto.Remove(mode); + return true; + } + + /// <summary> + /// Gets the names of the parameters to be determined + /// automatically + /// </summary> + /// <returns> + /// List of parameter names being in auto-mode. + /// </returns> + public string [] getAutoParList() + { + int count = paramAuto.Count; + string [] paramList = new string[count]; + + for(int i=0; i<count; i++) + paramList[i] = (string)paramAuto[i]; + + return paramList; + } + + }//end of class +}//end of namespace diff --git a/HalconTools/MatchingModule/MatchingParamSave.cs b/HalconTools/MatchingModule/MatchingParamSave.cs new file mode 100644 index 0000000..c96f742 --- /dev/null +++ b/HalconTools/MatchingModule/MatchingParamSave.cs @@ -0,0 +1,113 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.IO; + +namespace HalconTools +{ + [Serializable] + public class MatchingParamSave + { + public double StartingAngle { get; set; } + public double AngleExtent { get; set; } + + public double MinScale { get; set; } + public double MaxScale { get; set; } + + public double MinScore { get; set; } + + public int NumMatches { get; set; } + + public double MaxOverlap { get; set; } + + public string Subpixel { get; set; } + + public int NumLevel { get; set; } + public int LastPyramidLevel { get; set; } + + public double Greediness { get; set; } + + private MatchingParamSave SaveParam(MatchingAssistant param)// + { + MatchingParamSave paramSave = new MatchingParamSave(); + paramSave.StartingAngle = param.getParameterSet.mStartingAngle; + paramSave.AngleExtent = param.getParameterSet.mAngleExtent; + paramSave.MinScale = param.getParameterSet.mMinScale; + paramSave.MaxScale = param.getParameterSet.mMaxScale; + paramSave.MinScore = param.getParameterSet.mMinScore; + paramSave.NumMatches = param.getParameterSet.mNumMatches; + paramSave.MaxOverlap = param.getParameterSet.mMaxOverlap; + paramSave.Subpixel = param.getParameterSet.mSubpixel; + paramSave.NumLevel = param.getParameterSet.mNumLevel; + paramSave.LastPyramidLevel = param.getParameterSet.mLastPyramidLevel; + paramSave.Greediness = param.getParameterSet.mGreediness; + + return paramSave; + } + + public MatchingParam TranParam(MatchingParamSave paramSave) + { + MatchingParam param = new MatchingParam(); + + param.mStartingAngle = paramSave.StartingAngle; + param.mAngleExtent = paramSave.AngleExtent; + param.mMinScale = paramSave.MinScale; + param.mMaxScale = paramSave.MaxScale; + param.mMinScore = paramSave.MinScore; + param.mNumMatches = paramSave.NumMatches; + param.mMaxOverlap = paramSave.MaxOverlap; + param.mSubpixel = paramSave.Subpixel; + param.mNumLevel = paramSave.NumLevel; + param.mLastPyramidLevel = paramSave.LastPyramidLevel; + param.mGreediness = paramSave.Greediness; + + return param; + } + + public bool Save(MatchingAssistant mAssistant) + { + string path = System.Windows.Forms.Application.StartupPath + "\\MatchingConfige"; + if (!Directory.Exists(path)) + { + Directory.CreateDirectory(path); + } + + System.Windows.Forms.SaveFileDialog saveMatchingConfige = new System.Windows.Forms.SaveFileDialog(); + saveMatchingConfige.InitialDirectory = System.Windows.Forms.Application.StartupPath + "\\MatchingConfige"; + saveMatchingConfige.Filter = "xml|*.xml"; + if (saveMatchingConfige.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + string files = saveMatchingConfige.FileName; + + SerializeFileTool<HalconTools.MatchingParamSave> MatchingConfige = new SerializeFileTool<HalconTools.MatchingParamSave>(); + HalconTools.MatchingParamSave param = new HalconTools.MatchingParamSave(); + + param = param.SaveParam(mAssistant); ; + MatchingConfige.SetConfig(files, param); + + return true; + } + else + { + return false; + } + } + + public MatchingParamSave Load(string path) + { + SerializeFileTool<HalconTools.MatchingParamSave> MatchingConfige = new SerializeFileTool<HalconTools.MatchingParamSave>(); + + MatchingParamSave param = new MatchingParamSave(); + //if (!path.EndsWith(".xml")) + //{ + // return param; + //} + + param = MatchingConfige.GetConfig(path); + + return param; + } + + } +} diff --git a/HalconTools/MatchingModule/MatchingResult.cs b/HalconTools/MatchingModule/MatchingResult.cs new file mode 100644 index 0000000..e455714 --- /dev/null +++ b/HalconTools/MatchingModule/MatchingResult.cs @@ -0,0 +1,101 @@ +using System; +using HalconDotNet; + + +namespace HalconTools +{ + + /// <summary> + /// This class holds the result data from a model detection. For any new + /// detection run, it also remembers the time needed + /// for the model detection. + /// </summary> + public class MatchingResult + { + + /// <summary> + /// Model contour applied for model detection + /// </summary> + public HXLDCont mContour; + /// <summary> + /// All model contours detected + /// </summary> + public HXLDCont mContResults; + + /// <summary> + /// Row coordinate of the found instances of the model + /// </summary> + public HTuple mRow; + /// <summary> + /// Column coordinate of the found instances of the model + /// </summary> + public HTuple mCol; + + /// <summary> + /// Rotation angle of the found instances of the model + /// </summary> + public HTuple mAngle; + /// <summary> + /// Scale of the found instances of the model in the row direction + /// </summary> + public HTuple mScaleRow; + /// <summary> + /// Scale of the found instances of the model in the column direction + /// </summary> + public HTuple mScaleCol; + /// <summary> + /// Score of the found instances of the model + /// </summary> + public HTuple mScore; + /// <summary> + /// Time needed to detect <c>count</c> numbers of model instances + /// </summary> + public double mTime; + /// <summary> + /// Number of model instances found + /// </summary> + public int count; + /// <summary> + /// 2D homogeneous transformation matrix that can be used to transform + /// data from the model into the test image. + /// </summary> + public HHomMat2D hmat; + + /// <summary>Constructor</summary> + public MatchingResult() + { + // hmat = new HHomMat2D(); + mContResults = new HXLDCont(); + } + + + /// <summary> + /// Gets the detected contour. + /// </summary> + /// <returns>Detected contour</returns> + public HXLDCont getDetectionResults() + { + HXLDCont rContours = new HXLDCont(); + hmat.HomMat2dIdentity(); + mContResults.GenEmptyObj(); + + for(int i = 0; i<count; i++) + { + hmat.VectorAngleToRigid(0, 0, 0, mRow[i].D, mCol[i].D, mAngle[i].D); + rContours = hmat.AffineTransContourXld(mContour); + mContResults = mContResults.ConcatObj(rContours); + } + return mContResults; + } + + + /// <summary> + /// Resets the detection results and sets count to 0. + /// </summary> + public void reset() + { + count = 0; + } + + }//end of class +}//end of namespace diff --git a/HalconTools/MeasureModule/MeasureAssistant.cs b/HalconTools/MeasureModule/MeasureAssistant.cs new file mode 100644 index 0000000..ec49558 --- /dev/null +++ b/HalconTools/MeasureModule/MeasureAssistant.cs @@ -0,0 +1,733 @@ +using System; +using HalconDotNet; +using System.Collections; + +namespace HalconTools +{ + public delegate void MeasureDelegate(int value); + + /// <summary> + /// The controller class MeasureAssistant controls + /// the communication between the GUI and the model data that + /// is used to parameterize the measuring. + /// </summary> + public class MeasureAssistant + { + /// <summary>Index of the selected ROI.</summary> + public int mActRoiIdx; + + /// <summary>Reference to the ROI controller instance.</summary> + private ROIController roiController; + + /// <summary>List of measure handles created for the list of ROIs.</summary> + private ArrayList mMeasureList; + + /// <summary>Reference to list of ROI instances.</summary> + private ArrayList mROIList; + + /// <summary>HALCON image used for measuring.</summary> + public HImage mImage; + public int mWidth; + public int mHeight; + + /// <summary>Flag indicating whether measurements are performed between + /// individual edges or edge pairs.</summary> + public bool mSelPair; + + /// <summary>Minimum edge amplitude.</summary> + public double mThresh; + + /// <summary>Sigma of Gaussian smoothing.</summary> + public double mSigma; + + /// <summary> + /// Width of the measure ROI (circular ROI: radius (half width) of the + /// annulus; linear ROI: half height of the rectangle). + /// </summary> + public double mRoiWidth; + + public double mRoiHeight; + + /// <summary>Default value for the minimum edge amplitude.</summary> + public double mInitThresh; + + /// <summary>Default value for the sigma of Gaussian smoothing.</summary> + public double mInitSigma; + + /// <summary>Default value for the ROI width.</summary> + public double mInitRoiWidth; + + /// <summary> + /// Type of gray-value transition; determines how edges are + /// selected (dark-light or light-dark transition). + /// </summary> + public string mTransition; + + /// <summary>Position of edges to select.</summary> + public string mPosition; + + /// <summary>Type of interpolation to be used.</summary> + public string mInterpolation; + + /// <summary> + /// Length of the displayed edges. + /// </summary> + public int mDispEdgeLength; + + /// <summary>Error messages for failed measure actions.</summary> + public HTuple exceptionText; + + /// <summary> + /// Flag indicating whether files with internal camera parameters + /// and camera pose are present and valid. + /// </summary> + public bool mIsCalibValid; + + /// <summary> + /// Flag indicating whether measure results should be transformed + /// into world coordinates. + /// </summary> + public bool mTransWorldCoord; + + /// <summary> + /// Flag indicating whether the ROI width should be used for + /// displaying the extracted edges (instead of mDispEdgeLength). + /// </summary> + public bool mDispROIWidth; + + /// <summary> + /// Flag to add position coordinates of the detected (and + /// selected) edges to the result table. + /// </summary> + public bool mDispPosition; + + /// <summary> + /// Flag to add the pair width of the detected edge (and + /// selected) pairs to the result table. + /// </summary> + public bool mDispPairWidth; + + /// <summary> + /// Flag to add the edge amplitude of the detected (and + /// selected) edge pairs to the result table. + /// </summary> + public bool mDispAmplitude; + + /// <summary> + /// Flag to add the distance between consecutive detected (and + /// selected) edges to the result table. + /// </summary> + public bool mDispDistance; + + /// <summary>File with internal camera parameters.</summary> + public HTuple mCamParameter; + + /// <summary>Camera pose file.</summary> + public HTuple mCamPose; + + /// <summary>Unit for transformation into world coordinates.</summary> + public string mUnit; + + /// <summary>Constant indicating an update of measure instances.</summary> + public const int EVENT_UPDATE_MEASUREMENT = 2; + + /// <summary> + /// Constant indicating the removal of measure instances from the + /// measure list mMeasureList. + /// </summary> + public const int EVENT_UPDATE_REMOVE = 3; + + /// <summary>Constant indicating an update of measure results.</summary> + public const int EVENT_UPDATE_RESULT_XLD = 4; + + /// <summary>Auxiliary constant.</summary> + public const int ALL_ROI =-1; + + /// <summary> + /// Constant indicating an error while reading an image file.</summary> + public const int ERR_READING_FILE = 10; + + + public MeasureDelegate NotifyMeasureObserver; + + + /* To create the measure controller class the ROI + controller has to be provided for initialization */ + public MeasureAssistant(ROIController CRoi) + { + exceptionText = ""; + roiController = CRoi; + mROIList = roiController.getROIList(); + mMeasureList = new ArrayList(15); + mIsCalibValid = false; + mActRoiIdx = -1; + } + + /*********************************************************/ + /* setter-methods */ + /*********************************************************/ + + /// <summary> + /// Sets a flag to determine if measure detection is calculated + /// for edges or edge pairs + /// </summary> + public void setSelPair(bool mode) + { + mSelPair = mode; + UpdateMeasure(); + mActRoiIdx = roiController.getActiveROIIdx(); + } + + /// <summary> + /// Sets the variable mThresh to the provided value and + /// triggers an update for the measure results + /// </summary> + public void setMinEdgeAmpl(double val) + { + mThresh = val; + UpdateExecute(ALL_ROI); + } + + /// <summary> + /// Sets the variable mSigma to the provided value and + /// triggers an update for the measure results + /// </summary> + public void setSigma(double val) + { + mSigma = val; + UpdateExecute(ALL_ROI); + } + + /// <summary> + /// Sets the variable mRoiWidth to the provided value and + /// triggers an update for the measure results + /// </summary> + public void setRoiWidth(double val) + { + mRoiWidth = val; + UpdateMeasure(ALL_ROI); + } + + public void setRoiHeight(double val) + { + mRoiHeight = val; + UpdateMeasure(ALL_ROI); + } + + /// <summary> + /// Sets the variable mInterpolation to the provided value and + /// triggers an update for the measure results + /// </summary> + public void setInterpolation(string mode) + { + mInterpolation = mode; + UpdateMeasure(ALL_ROI); + } + + /// <summary> + /// Sets the variable mTransition to the provided value and + /// triggers an update for the measure results + /// </summary> + public void setTransition(string mode) + { + mTransition = mode; + UpdateExecute(ALL_ROI); + } + + /// <summary> + /// Sets the position of edges to select to the provided value and + /// triggers an update od the measure results. + /// </summary> + public void setPosition(string mode) + { + mPosition = mode; + UpdateExecute(ALL_ROI); + } + + /// <summary> + /// Sets the length of the displayed edges to the provided value + /// and triggers an update of the measure results. + /// </summary> + public void setDispEdgeLength(int val) + { + mDispEdgeLength = val; + UpdateXLD(); + } + + /// <summary> + /// Sets the width of the displayed ROI to the provided value + /// and triggers an update for the measure results + /// </summary> + public void setFlagDispROIWidth(bool mode) + { + mDispROIWidth = mode; + UpdateXLD(); + } + + /********************************************************/ + /* determine list of result coordinates to be displayed */ + /********************************************************/ + + /// <summary> + /// Sets a flag to determine if the edge positions of + /// measure results are added and displayed on the + /// measure result table + /// </summary> + public void showPosition(bool mode) + { + mDispPosition = mode; + } + + /// <summary> + /// Sets a flag to determine if the intra distance for + /// measure edge pairs are added and displayed on the + /// measure result table + /// </summary> + public void showPairWidth(bool mode) + { + mDispPairWidth = mode; + } + + /// <summary> + /// Sets a flag to determine if the edge amplitude of + /// measure results are added and displayed on the + /// measure result table + /// </summary> + public void showAmplitude(bool mode) + { + mDispAmplitude = mode; + } + + /// <summary> + /// Sets a flag to determine if the edge distance of + /// measure results are added and displayed on the + /// measure result table + /// </summary> + public void showDistance(bool mode) + { + mDispDistance = mode; + } + + /// <summary> + /// Sets the unit for world coordinate transformation to + /// the provided value and triggers an update of the + /// measure results + /// </summary> + public void setUnit(string val) + { + mUnit = val; + UpdateExecute(ALL_ROI); + } + + /// <summary> + /// Sets the variable mTransWorldCoord to the provided + /// value and triggers an update for the measure results + /// </summary> + public void setTransWorldCoord(bool mode) + { + mTransWorldCoord = mode; + UpdateExecute(ALL_ROI); + } + + /// <summary> + /// Load an HALCON image from the file filename and + /// delete the list of measure handles created for the + /// previous image setup + /// </summary> + /// <param name="filename">Location of image file</param> + /// <returns>Flag depicting success of the load process</returns> + public bool setImage(string filename) + { + string tmp; + + RemoveAllMeasureObjects(); + exceptionText = ""; + try + { + mImage = new HImage(filename); + mImage.GetImagePointer1(out tmp, out mWidth, out mHeight); + } + catch (HOperatorException e) + { + mImage = null; + exceptionText = e.Message; + NotifyMeasureObserver(MeasureAssistant.ERR_READING_FILE); + return false; + } + return true; + } + + /// <summary> + /// Sets the variable mImage to the HImage provided + /// </summary> + /// <param name="img">HALCON image instance</param> + public void setImage(HImage img) + { + string tmp; + + RemoveAllMeasureObjects(); + mImage = img; + + if (mImage != null) + mImage.GetImagePointer1(out tmp, out mWidth, out mHeight); + + } + + /// <summary> + /// Returns the image currently used for measurement, described + /// by mImage + /// </summary> + public HImage getImage() + { + return mImage; + } + + /// <summary>Load camera calibration data from file</summary> + /// <param name="file">Location of *.cal file</param> + public void LoadCamParFile(string file) + { + exceptionText = ""; + try + { + mCamParameter = null; + mCamParameter = HMisc.ReadCamPar(file); + } + catch (HOperatorException e) + { + mIsCalibValid = false; + exceptionText = e.Message; + throw (e); + } + + if (mCamParameter == null || !(mCamParameter.Length > 0) || mCamPose == null || !(mCamPose.Length > 0)) + mIsCalibValid = false; + else + mIsCalibValid = true; + + if (mIsCalibValid) + UpdateExecute(ALL_ROI); + } + + /// <summary>Load camera pose data from file</summary> + /// <param name="file">Location of *.dat file</param> + public void LoadCamPoseFile(string file) + { + exceptionText = ""; + try + { + HOperatorSet.ReadPose(new HTuple(file), out mCamPose); + } + catch (HOperatorException e) + { + mIsCalibValid = false; + exceptionText = e.Message; + throw (e); + } + + if (mCamParameter == null || !(mCamParameter.Length > 0) || mCamPose == null || !(mCamPose.Length > 0)) + mIsCalibValid = false; + else + mIsCalibValid = true; + + + if (mIsCalibValid) + UpdateExecute(ALL_ROI); + } + + /// <summary> + /// Create a measure object for the new instance of an interactive + /// ROI at index mActRoiIdx + /// </summary> + public void AddMeasureObject() + { + mActRoiIdx = roiController.getActiveROIIdx(); + + if (mActRoiIdx != -1) + mMeasureList.Add(CreateMeasure((ROI)mROIList[mActRoiIdx], this)); + + NotifyMeasureObserver(EVENT_UPDATE_MEASUREMENT); + } + + /// <summary> + /// Update measure object for the selected interactive ROI + /// at index or update measure handles for the + /// entire set of interactive ROIs + /// </summary> + public void UpdateMeasure(int index) + { + + if (index == -1) + { + for (int i =0; i < mMeasureList.Count; i++) + ((Measurement)mMeasureList[i]).UpdateROI(); + } + else + { + ((Measurement)mMeasureList[index]).UpdateROI(); + } + + NotifyMeasureObserver(EVENT_UPDATE_MEASUREMENT); + } + + /// <summary> + /// Recreate the entire measure object list, if the + /// measure edge type changes from edge pose to + /// edge pairs or vice versa + /// </summary> + public void UpdateMeasure() + { + RemoveAllMeasureObjects(); + for (int i =0; i < mROIList.Count; i++) + { + ROI roi = (ROI)mROIList[i]; + mMeasureList.Add(CreateMeasure((ROI)mROIList[i], this)); + } + NotifyMeasureObserver(EVENT_UPDATE_MEASUREMENT); + } + + /// <summary> + /// Update measure results for a selected measure object instance + /// at index or the entire set of measure handles. + /// </summary> + public void UpdateExecute(int index) + { + if (index == -1) + { + for (int i =0; i < mMeasureList.Count; i++) + ((Measurement)mMeasureList[i]).UpdateResults(); + } + else + { + ((Measurement)mMeasureList[index]).UpdateResults(); + } + + NotifyMeasureObserver(EVENT_UPDATE_MEASUREMENT); + } + + /// <summary> + /// Update display objects of the measure results + /// for the entire set of measure handles + /// </summary> + public void UpdateXLD() + { + for (int i =0; i < mMeasureList.Count; i++) + ((Measurement)mMeasureList[i]).UpdateXLD(); + + NotifyMeasureObserver(EVENT_UPDATE_RESULT_XLD); + } + + /// <summary> + /// Clear the entire list of measure handles and + /// releases the resources used + /// </summary> + public void RemoveAllMeasureObjects() + { + int count = mMeasureList.Count; + for (int i=0; i < count; i++) + RemoveMeasureObjectIdx(0); + + NotifyMeasureObserver(EVENT_UPDATE_REMOVE); + } + + /// <summary> + /// Clear the measure object corresponding to the deleted + /// interactive ROI and release the resources used + /// </summary> + public void RemoveMeasureObjectActIdx() + { + int DelIdx = roiController.getDelROIIdx(); + RemoveMeasureObjectIdx(DelIdx); + + NotifyMeasureObserver(EVENT_UPDATE_REMOVE); + } + + /// <summary> + /// Clear the measure object at the index DelIdx from + /// the measure object list and release the resources used + /// </summary> + private void RemoveMeasureObjectIdx(int DelIdx) + { + Measurement m = (Measurement)mMeasureList[DelIdx]; + mMeasureList.RemoveAt(DelIdx); + m.ClearMeasurement(); + mActRoiIdx = -1; + } + + /// <summary> + /// Factory method to create measure objects + /// </summary> + /// <param name="roi">Interactive ROI</param> + /// <param name="parent"> + /// Reference to measure controller class + /// </param> + /// <returns>New measure object</returns> + public static Measurement CreateMeasure(ROI roi, MeasureAssistant parent) + { + if (parent.mSelPair) + return new MeasurementPair(roi, parent); + else + return new MeasurementEdge(roi, parent); + } + + /// <summary> + /// Composes set of HALCON iconic objects to display + /// measure edge results + /// </summary> + /// <returns>Detected measure edges</returns> + public HXLDCont getMeasureResults() + { + HXLDCont val; + HXLDCont obj = new HXLDCont(); + obj.GenEmptyObj(); + + for (int i=0; i < mMeasureList.Count; i++) + { + val = ((Measurement)mMeasureList[i]).getMeasureResults(); + if (val.IsInitialized()) + obj = obj.ConcatObj(val); + } + return obj; + } + + /// <summary> + /// Composes set of HALCON iconic objects to display + /// dimension of measure object + /// </summary> + /// <returns>Surrounding contour of measure object</returns> + public HObject getMeasureRegions() + { + HObject val; + HObject obj = new HObject(); + obj.GenEmptyObj(); + + for (int i=0; i < mMeasureList.Count; i++) + { + val = ((Measurement)mMeasureList[i]).getMeasureRegion(); + if (val.IsInitialized()) + obj = obj.ConcatObj(val); + } + return obj; + } + + /// <summary>Returns number of measure objects</summary> + /// <returns>Length of mMeasureList</returns> + public int getMeasureListCount() + { + return mMeasureList.Count; + } + + /// <summary>Change index for selected interactive ROI</summary> + public void ClickedActiveROI() + { + mActRoiIdx = roiController.getActiveROIIdx(); + } + + /// <summary> + /// Compose set of measure result data to display in the result table + /// </summary> + /// <returns>Composition of measure result information</returns> + public ArrayList getMeasureTableData() + { + MeasureResult resultData; + ArrayList table = new ArrayList(10); + + if (mMeasureList.Count == 0 || mActRoiIdx == -1) + return table; + + resultData = ((Measurement)mMeasureList[mActRoiIdx]).getMeasureResultData(); + + if (mSelPair) + { + if (mDispPosition) + { + table.Add(((PairResult)resultData).rowEdgeFirst); + table.Add(((PairResult)resultData).colEdgeFirst); + table.Add(((PairResult)resultData).rowEdgeSecond); + table.Add(((PairResult)resultData).colEdgeSecond); + } + if (mDispAmplitude) + { + table.Add(((PairResult)resultData).amplitudeFirst); + table.Add(((PairResult)resultData).amplitudeSecond); + } + if (mDispDistance) + table.Add(((PairResult)resultData).interDistance); + + if (mDispPairWidth) + table.Add(((PairResult)resultData).intraDistance); + } + else + { + if (mDispPosition) + { + table.Add(((EdgeResult)resultData).rowEdge); + table.Add(((EdgeResult)resultData).colEdge); + } + if (mDispAmplitude) + table.Add(((EdgeResult)resultData).amplitude); + if (mDispDistance) + table.Add(((EdgeResult)resultData).distance); + } + return table; + } + + /// <summary> + /// Compose the set of measure result types to be displayed + /// in the result table. The types are determined by the user, + /// who can check the corresponding flags in the GUI frontend + /// </summary> + /// <returns>Composition of measure result types</returns> + public ArrayList getMeasureResultComposition() + { + ArrayList composition = new ArrayList(5); + + if (mSelPair) + { + if (mDispPosition) + { + composition.Add("Row 1st"); + composition.Add("Col 1st"); + composition.Add("Row 2nd"); + composition.Add("Col 2nd"); + } + if (mDispAmplitude) + { + composition.Add("Amplitude 1st"); + composition.Add("Amplitude 2nd"); + } + if (mDispDistance) + composition.Add("Distance"); + if (mDispPairWidth) + composition.Add("Width"); + } + else + { + if (mDispPosition) + { + composition.Add("Row"); + composition.Add("Column"); + } + if (mDispAmplitude) + composition.Add("Amplitude"); + if (mDispDistance) + composition.Add("Distance"); + } + return composition; + } + + /// <summary> + /// Determine the gray value projection for the measure object + /// corresponding to the interactive ROI currently selected. + /// If no ROI is selected then return a null-object. + /// </summary> + /// <returns>Gray value profile</returns> + public double[] getMeasureProjection() + { + if (mActRoiIdx == -1) + return null; + else + return ((Measurement)mMeasureList[mActRoiIdx]).getGrayValueProj(); + } + + }//end of class +}//end of namespace diff --git a/HalconTools/MeasureModule/MeasureParamSave.cs b/HalconTools/MeasureModule/MeasureParamSave.cs new file mode 100644 index 0000000..9efb6f0 --- /dev/null +++ b/HalconTools/MeasureModule/MeasureParamSave.cs @@ -0,0 +1,94 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.IO; + +namespace HalconTools +{ + [Serializable] + public class MeasureParamSave + { + /// <summary> + /// ROI Height + /// </summary> + public double hv_measure_Length1 { get; set; } + + /// <summary> + /// ROI Width + /// </summary> + public double hv_measure_Length2 { get; set; } + + public double hv_measure_sigma { get; set; } + + public double hv_measure_threshold { get; set; } + + public int hv_measure_number { get; set; } + + public string hv_measure_position { get; set; } + + public string hv_measure_transition { get; set; } + + public string hv_measure_interpolation { get; set; } + + + private MeasureParamSave SaveParam(MeasureAssistant param) + { + MeasureParamSave paramSave = new MeasureParamSave(); + paramSave.hv_measure_number = 20; + paramSave.hv_measure_Length1 = param.mRoiHeight; + paramSave.hv_measure_Length2 = param.mRoiWidth; + paramSave.hv_measure_threshold = param.mThresh; + paramSave.hv_measure_sigma = param.mSigma; + paramSave.hv_measure_transition = param.mTransition; + paramSave.hv_measure_position = param.mPosition; + paramSave.hv_measure_interpolation = param.mInterpolation; + + return paramSave; + } + + public bool Save(MeasureAssistant mAssistant) + { + string path = System.Windows.Forms.Application.StartupPath + "\\MeasureConfige"; + if (!Directory.Exists(path)) + { + Directory.CreateDirectory(path); + } + + System.Windows.Forms.SaveFileDialog saveMatchingConfige = new System.Windows.Forms.SaveFileDialog(); + saveMatchingConfige.InitialDirectory = System.Windows.Forms.Application.StartupPath + "\\MeasureConfige"; + saveMatchingConfige.Filter = "xml|*.xml"; + if (saveMatchingConfige.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + string files = saveMatchingConfige.FileName; + + SerializeFileTool<HalconTools.MeasureParamSave> MeasureConfige = new SerializeFileTool<HalconTools.MeasureParamSave>(); + HalconTools.MeasureParamSave param = new HalconTools.MeasureParamSave(); + + param = param.SaveParam(mAssistant); ; + MeasureConfige.SetConfig(files, param); + + return true; + } + else + { + return false; + } + } + + public MeasureParamSave Load(string path) + { + SerializeFileTool<HalconTools.MeasureParamSave> MeasureConfige = new SerializeFileTool<HalconTools.MeasureParamSave>(); + + MeasureParamSave param = new MeasureParamSave(); + //if (!path.EndsWith(".xml")) + //{ + // return param; + //} + + param = MeasureConfige.GetConfig(path); + + return param; + } + } +} diff --git a/HalconTools/MeasureModule/Measurement.cs b/HalconTools/MeasureModule/Measurement.cs new file mode 100644 index 0000000..66c5790 --- /dev/null +++ b/HalconTools/MeasureModule/Measurement.cs @@ -0,0 +1,516 @@ +using System; +using HalconDotNet; + +namespace HalconTools +{ + /// <summary> + /// This model data class holds general information about a measure + /// object. To define more specialized measure data objects the + /// classes MeasurementEdge and MeasurementPair are derived from this + /// class to be able to distinguish the measure + /// types and results for simple edges and for edge pairs. The base + /// class contains the methods to create measure handles and to create + /// the display results of a measure action. The derived classes + /// implement the specialized methods to perform a measure operation + /// and generate the measure results. + /// </summary> + public class Measurement + { + /// <summary>HALCON measure object (handle).</summary> + protected HMeasure mHandle; + + /// <summary> + /// Flag to distinguish between a linear and circular measure object. + /// </summary> + protected int mROIType; + + /// <summary> + /// Model coordinates obtained from the ROI instance. + /// This coordinates are the base to calculate the measuring field. + /// </summary> + protected HTuple mROICoord; + + /// <summary>Reference to the ROI.</summary> + protected ROI mRoi; + + /// <summary> + /// Auxiliary information about the + /// measuring field calculated using the ROI coordinates. + /// </summary> + protected HTuple mMeasROI; + + /// <summary>Iconic object to display measure edge results.</summary> + protected HXLDCont mEdgeXLD; + + /// <summary>Iconic object to display mMeasROI.</summary> + protected HRegion mMeasureRegion; + + /// <summary> + /// Reference to controller class to obtain information about + /// the context of the measurement, e.g. image, parameter setups etc. + /// </summary> + protected MeasureAssistant mMeasAssist; + + /// <summary> + /// Creates and initializes a measure object based on information the ROI object + /// about the ROI. + /// </summary> + /// <param name="roi">ROI instance</param> + /// <param name="mAssist">Reference to controller class</param> + public Measurement(ROI roi, MeasureAssistant mAssist) + { + mRoi = roi; + mMeasAssist = mAssist; + mROICoord = mRoi.getModelData(); + mEdgeXLD = new HXLDCont(); + mMeasureRegion = new HRegion(); + + if (mRoi is ROICircularArc) + mROIType = ROI.ROI_TYPE_CIRCLEARC; + else + mROIType = ROI.ROI_TYPE_LINE; + } + + /// <summary> + /// Triggers an update of the measure object for all + /// changes concerning the shape of the ROI or the measurement + /// parameters. + /// </summary> + public void UpdateROI() + { + mROICoord = mRoi.getModelData(); + UpdateMeasure(); + } + + /// <summary> + /// Creates a measure object based on the model data + /// defined by the ROI instance and the parameters + /// describing the measure context. + /// </summary> + protected void UpdateMeasure() + { + double extent, sPhi, radius; + + if (mHandle != null) + mHandle.Dispose(); + + mMeasAssist.exceptionText = ""; + + try + { + switch (mROIType) + { + case ROI.ROI_TYPE_CIRCLEARC: + + radius = mROICoord[2].D; + sPhi = mROICoord[3].D; + extent = mROICoord[4].D; + + + mMeasROI = GenSurCircle(mROICoord, mMeasAssist.mRoiWidth); + mHandle = new HMeasure(mROICoord[0].D, mROICoord[1].D, radius, + sPhi, extent, + mMeasAssist.mRoiWidth, + mMeasAssist.mWidth, mMeasAssist.mHeight, + mMeasAssist.mInterpolation); + + break; + case ROI.ROI_TYPE_LINE: + + mMeasROI = GenSurRect2(mROICoord, mMeasAssist.mRoiWidth); + mHandle = new HMeasure(mMeasROI[0].D, mMeasROI[1].D, + mMeasROI[2].D, mMeasROI[3].D, mMeasROI[4].D, + mMeasAssist.mWidth, mMeasAssist.mHeight, + mMeasAssist.mInterpolation); + break; + //case ROI.ROI_TYPE_LINE: + + // mMeasROI = GenSurRect2(mROICoord,mMeasAssist.mRoiHeight, mMeasAssist.mRoiWidth); + // mHandle = new HMeasure(mMeasROI[0].D, mMeasROI[1].D, + // mMeasROI[2].D, mMeasROI[3].D, mMeasROI[4].D, + // mMeasAssist.mWidth, mMeasAssist.mHeight, + // mMeasAssist.mInterpolation); + break; + } + } + catch (HOperatorException e) + { + mEdgeXLD.Dispose(); + mMeasureRegion.Dispose(); + mMeasAssist.exceptionText = e.Message; + ClearResultData(); + return; + } + UpdateResults(); + UpdateMeasureRegion(); + } + + /// <summary> + /// Defines the measuring field of a linear ROI. + /// </summary> + /// <param name="line"> + /// Model data for a linear interactive ROI + /// </param> + /// <param name="width">Half width of (rectangular) measure ROI</param> + /// <returns>Model data describing a linear measuring field</returns> + private HTuple GenSurRect2(HTuple line, double width) + { + double row1 = line[0]; + double col1 = line[1]; + double row2 = line[2]; + double col2 = line[3]; + + double phi = HMisc.AngleLx(row1, col1, row2, col2); + double length1 = (HMisc.DistancePp(row1, col1, row2, col2)) / 2.0; + double length2 = width; + double rowM = (row1 + row2) / 2; + double colM = (col1 + col2) / 2; + + return new HTuple(new double[] { rowM, colM, phi, length1, length2 }); + } + + private HTuple GenSurRect2(HTuple line,double height, double width) + { + double row1 = line[0]; + double col1 = line[1]; + double row2 = line[2]; + double col2 = line[3]; + + double phi = HMisc.AngleLx(row1, col1, row2, col2); + double length1 = height / 2.0; + double length2 = width; + double rowM = (row1 + row2) / 2; + double colM = (col1 + col2) / 2; + + return new HTuple(new double[] { rowM, colM, phi, length1, length2 }); + } + + /// <summary> + /// Defines the measuring field of a circular ROI. + /// </summary> + /// <param name="circle"> + /// Model data for a circular ROI + /// </param> + /// <param name="width">Radius (half width) of the circular (ring-shaped) ROI</param> + /// <returns>Model data describing circular measuring field</returns> + private HTuple GenSurCircle(HTuple circle, double width) + { + double row1 = circle[0]; + double col1 = circle[1]; + double radius = circle[2]; + double startPhi = circle[3]; + double extent = circle[4]; + + if (radius <= width) + return new HTuple(new double[] { row1, col1, startPhi, extent, (radius + width), 0.0 }); + else + return new HTuple(new double[] { row1, col1, startPhi, extent, (radius + width), (radius - width) }); + } + + /// <summary>Releases resources used for this measure object.</summary> + public void ClearMeasurement() + { + if (mHandle != null) + { + mHandle.Dispose(); + mEdgeXLD.Dispose(); + mMeasureRegion.Dispose(); + } + } + + /// <summary> + /// Creates the iconic object for displaying a measured + /// edge in a linear ROI. + /// </summary> + /// <returns>Contour depicting the measured edge</returns> + public static HXLDCont DetermineEdgeLine(double row, double col, double phi, double width) + { + double row1, row2, col1, col2; + + row1 = row - width * Math.Sin(phi + 0.5 * Math.PI); + col1 = col + width * Math.Cos(phi + 0.5 * Math.PI); + row2 = row - width * Math.Sin(phi + 1.5 * Math.PI); + col2 = col + width * Math.Cos(phi + 1.5 * Math.PI); + return DetermineLine(row1, col1, row2, col2); + } + + /// <summary> + /// Creates the iconic object for displaying a measured + /// edge from the coordinates of the end points. + /// </summary> + /// <returns>Contour depicting the measured edge</returns> + public static HXLDCont DetermineLine(double row1, double col1, double row2, double col2) + { + HXLDCont edge = new HXLDCont(); + HTuple rows, cols; + + rows = new HTuple(new double[] { row1, row2 }); + cols = new HTuple(new double[] { col1, col2 }); + + edge.GenContourPolygonXld(rows, cols); + return edge; + } + + /// <summary> + /// Creates the iconic object for displaying a measured + /// edge in a circular ROI. + /// </summary> + /// <returns>Edge contour depicting a measured edge</returns> + public static HXLDCont DetermineEdgeCircularArc(double row, double col, double center_row, double center_col, double radius, double width) + { + double row1, row2, col1, col2; + + row1 = row + (center_row - row) / radius * width; + col1 = col + (center_col - col) / radius * width; + row2 = row - (center_row - row) / radius * width; + col2 = col - (center_col - col) / radius * width; + + return DetermineLine(row1, col1, row2, col2); + } + + /// <summary> + /// Creates the iconic object for displaying + /// the arc between edges of a pair. + /// </summary> + /// <returns>Edge contour depicting the arc between edges of a pair</returns> + public static HXLDCont DeterminePairCircularArc(double row1, double col1, double row2, double col2, double cRow, double cCol, double radius, double width, bool positive) + { + HXLDCont arc = new HXLDCont(); + double startPhi, endPhi; + + startPhi = Math.Atan2(cRow - row1, col1 - cCol); + endPhi = Math.Atan2(cRow - row2, col2 - cCol); + + arc.GenEllipseContourXld(cRow, cCol, 0.0, radius, radius, startPhi, endPhi, (positive ? "positive" : "negative"), 1.5); + return arc; + } + + /// <summary> + /// Creates an iconic object depicting the + /// measuring field. + /// </summary> + public void UpdateMeasureRegion() + { + + mMeasureRegion.Dispose(); + mMeasureRegion.GenEmptyObj(); + + if (mROIType == ROI.ROI_TYPE_CIRCLEARC) + { + double sPhi, extent, innerRad, outerRad; + HTuple innerR, outerR, innerC, outerC; + HXLDCont outCont, innerCont, contour; + + outCont = new HXLDCont(); + innerCont = new HXLDCont(); + + sPhi = mMeasROI[2].D; + extent = mMeasROI[3].D; + outerRad = mMeasROI[4].D; + innerRad = mMeasROI[5].D; + + + innerCont.GenCircleContourXld(mMeasROI[0].D, mMeasROI[1].D, innerRad, sPhi, (sPhi + extent), (extent > 0) ? "positive" : "negative", 1.0); + outCont.GenCircleContourXld(mMeasROI[0].D, mMeasROI[1].D, outerRad, (sPhi + extent), sPhi, (extent > 0) ? "negative" : "positive", 1.0); + + innerCont.GetContourXld(out innerR, out innerC); + outCont.GetContourXld(out outerR, out outerC); + innerR = innerR.TupleConcat(outerR); + innerC = innerC.TupleConcat(outerC); + + contour = new HXLDCont(innerR, innerC); + contour = contour.CloseContoursXld(); + + mMeasureRegion = contour.GenRegionContourXld("margin"); + + contour.Dispose(); + innerCont.Dispose(); + outCont.Dispose(); + } + else + { + mMeasureRegion.GenRectangle2(mMeasROI[0].D, mMeasROI[1].D, + mMeasROI[2].D, mMeasROI[3].D, + mMeasROI[4].D); + } + } + + /// <summary> + /// If calibration data is available and valid, then rectify + /// measure result coordinates, otherwise leave them the same + /// </summary> + public void Rectify(HTuple row, HTuple col, out HTuple rowRect, out HTuple colRect) + { + double unitScale=0.0; + + if (mMeasAssist.mIsCalibValid) + { + switch (mMeasAssist.mUnit) + { + case "祄": + unitScale = 0.000001; + break; + case "mm": + unitScale = 0.001; + break; + case "cm": + unitScale = 0.01; + break; + case "m": + unitScale = 1.0; + break; + default: + break; + } + + HOperatorSet.ImagePointsToWorldPlane(mMeasAssist.mCamParameter, + mMeasAssist.mCamPose, + row, col, new HTuple(unitScale), + out colRect, out rowRect); + } + else + { + rowRect = row; + colRect = col; + } + + } + + /// <summary> + /// If calibration data is available and valid, then transform the + /// distance between measure result edges into world coordinates, + /// else leave them the same. + /// </summary> + public HTuple Distance(HTuple row1, HTuple col1, HTuple row2, HTuple col2, int shift) + { + HTuple rows, cols, rowRect, colRect; + HTuple distance = new HTuple(); + HXLDCont contour; + + + if (shift == 0) + { + if (mROIType == ROI.ROI_TYPE_CIRCLEARC) + { + double cRow, cCol, radius, extent, phi1, phi2, phi, res, length, tmp; + + cRow = mROICoord[0].D; + cCol = mROICoord[1].D; + radius = mROICoord[2].D; + extent = mROICoord[4].D; + + HOperatorSet.TupleGenConst(new HTuple(row1.Length), 0.0, out distance); + + for (int i=0; i < distance.Length; i++) + { + phi1 = HMisc.AngleLx(cRow, cCol, row1[i].D, col1[i].D); + phi2 = HMisc.AngleLx(cRow, cCol, row2[i].D, col2[i].D); + + if (extent < 0) + { + tmp = phi1; + phi1 = phi2; + phi2 = tmp; + } + + phi = phi2 - phi1; + + if (phi < 0) + phi += 2 * Math.PI; + + res = 0.05 * 24.0 / (radius * phi); + + contour = new HXLDCont(); + contour.GenEllipseContourXld(cRow, cCol, 0, radius, radius, phi1, phi2, "positive", res); + contour.GetContourXld(out rows, out cols); + Rectify(rows, cols, out rowRect, out colRect); + contour.Dispose(); + contour.GenContourPolygonXld(rowRect, colRect); + length = contour.LengthXld(); + distance[i].D = length; + contour.Dispose(); + } + + } + else if (mROIType == ROI.ROI_TYPE_LINE) + { + HTuple rRect1, cRect1, rRect2, cRect2; + Rectify(row1, col1, out rRect1, out cRect1); + Rectify(row2, col2, out rRect2, out cRect2); + distance = HMisc.DistancePp(rRect1, cRect1, rRect2, cRect2); + } + return distance; + + } + else + { + HTuple rClip1, cClip1, rShift2, cShift2; + + rClip1 = row1.TupleSelectRange(new HTuple(0), new HTuple(row1.Length - shift - 1)); + cClip1 = col1.TupleSelectRange(new HTuple(0), new HTuple(col1.Length - shift - 1)); + rShift2 = row2.TupleSelectRange(new HTuple(shift), new HTuple(row2.Length - 1)); + cShift2 = col2.TupleSelectRange(new HTuple(shift), new HTuple(col2.Length - 1)); + + return this.Distance(rClip1, cClip1, rShift2, cShift2, 0); + } + } + + /// <summary> + /// Returns the iconic object describing the measuring field + /// of the measure object. + /// </summary> + public HRegion getMeasureRegion() + { + return mMeasureRegion; + } + + /// <summary> + /// Returns the iconic object depicting the measured edges. + /// </summary> + public HXLDCont getMeasureResults() + { + return mEdgeXLD; + } + + /// <summary> + /// Returns the gray-value profile obtained by the measure projection + /// operation. + /// </summary> + /// <returns>Gray-value profile</returns> + public double[] getGrayValueProj() + { + HTuple grayVal; + + if (mHandle == null || (int)mHandle.Handle < 0) + return null; + + grayVal = mHandle.MeasureProjection(mMeasAssist.mImage); + return grayVal.ToDArr(); + } + + /********************************************************/ + /********************************************************/ + /// <summary> + /// Virtual method to be implemented by the derived classes. + /// </summary> + public virtual void UpdateResults() { } + /// <summary> + /// Virtual method to be implemented by the derived classes. + /// </summary> + public virtual void UpdateXLD() { } + /// <summary> + /// Virtual method to be implemented by the derived classes. + /// </summary> + public virtual void ClearResultData() { } + /// <summary> + /// Virtual method to be implemented by the derived classes. + /// </summary> + public virtual MeasureResult getMeasureResultData() + { + return null; + } + + }//end of class +}//end of namespace + + diff --git a/HalconTools/MeasureModule/MeasurementEdge.cs b/HalconTools/MeasureModule/MeasurementEdge.cs new file mode 100644 index 0000000..a25a069 --- /dev/null +++ b/HalconTools/MeasureModule/MeasurementEdge.cs @@ -0,0 +1,134 @@ +using System; +using HalconDotNet; + +namespace HalconTools +{ + + /// <summary> + /// The class MeasurementEdge describes single-edge measurement + /// and inherits from the base class Measurement. Virtual methods + /// defined in the base class are customized here to apply + /// HALCON operators for single-edge extraction. + /// </summary> + public class MeasurementEdge : Measurement + { + /// <summary> + /// Result container for the edge information returned + /// by the HALCON measure operator. + /// </summary> + private EdgeResult mResult; + /// <summary> + /// Result container for the edge information converted + /// into world coordinates. If calibration data is not available, + /// the variable contains the same information as mResult. + /// </summary> + private EdgeResult mResultWorld; + + + /// <summary> + /// Creates a measurement object for the provided ROI instance. + /// </summary> + /// <param name="roi">ROI instance</param> + /// <param name="mAssist">Reference to controller class</param> + public MeasurementEdge(ROI roi, MeasureAssistant mAssist) + : base(roi, mAssist) + { + mResult = new EdgeResult(); + mResultWorld = new EdgeResult(); + UpdateMeasure(); + } + + /// <summary> + /// Triggers an update of the measure results because of + /// changes in the parameter setup or a recreation of the measure + /// object caused by an update in the ROI model. + /// </summary> + public override void UpdateResults() + { + if (mHandle == null) + return; + + mMeasAssist.exceptionText = ""; + + try + { + mHandle.MeasurePos(mMeasAssist.mImage, + mMeasAssist.mSigma, mMeasAssist.mThresh, + mMeasAssist.mTransition, mMeasAssist.mPosition, + out mResult.rowEdge, out mResult.colEdge, + out mResult.amplitude, out mResult.distance); + + if (mMeasAssist.mIsCalibValid && mMeasAssist.mTransWorldCoord) + { + Rectify(mResult.rowEdge, mResult.colEdge, out mResultWorld.rowEdge, out mResultWorld.colEdge); + mResultWorld.distance = Distance(mResult.rowEdge, mResult.colEdge, mResult.rowEdge, mResult.colEdge, 1); + mResultWorld.amplitude = mResult.amplitude; + } + else + { + mResultWorld = new EdgeResult(mResult); + } + } + catch (HOperatorException e) + { + mEdgeXLD.Dispose(); + mMeasAssist.exceptionText = e.Message; + mResultWorld = new EdgeResult(); + return; + } + UpdateXLD(); + } + + /// <summary>Updates display object for measured edge results</summary> + public override void UpdateXLD() + { + double width, phi, cRow, cCol, radius; + + if (mHandle == null && ((int)mHandle.Handle < 0)) + return; + + mMeasAssist.exceptionText = ""; + width = mMeasAssist.mDispROIWidth ? mMeasAssist.mRoiWidth : mMeasAssist.mDispEdgeLength; + mEdgeXLD.Dispose(); + mEdgeXLD.GenEmptyObj(); + + try + { + if (mROIType == ROI.ROI_TYPE_LINE) + { + phi = mMeasROI[2].D; + + for (int i = 0; i < mResult.rowEdge.Length; i++) + mEdgeXLD = mEdgeXLD.ConcatObj(DetermineEdgeLine(mResult.rowEdge[i].D, mResult.colEdge[i].D, phi, width)); + + } + else if (mROIType == ROI.ROI_TYPE_CIRCLEARC) + { + cRow = mROICoord[0].D; + cCol = mROICoord[1].D; + radius = mROICoord[2].D; + + for (int i = 0; i < mResult.rowEdge.Length; i++) + mEdgeXLD = mEdgeXLD.ConcatObj(DetermineEdgeCircularArc(mResult.rowEdge[i].D, mResult.colEdge[i].D, cRow, cCol, radius, width)); + } + } + catch (HOperatorException e) + { + mMeasAssist.exceptionText = e.Message; + } + } + + /// <summary>Returns measurement result.</summary> + public override MeasureResult getMeasureResultData() + { + return mResultWorld; + } + + /// <summary>Clears measurement result.</summary> + public override void ClearResultData() + { + mResultWorld = new EdgeResult(); + } + + }//end of class +}//end of namespace diff --git a/HalconTools/MeasureModule/MeasurementPair.cs b/HalconTools/MeasureModule/MeasurementPair.cs new file mode 100644 index 0000000..3d0fbb6 --- /dev/null +++ b/HalconTools/MeasureModule/MeasurementPair.cs @@ -0,0 +1,165 @@ +using System; +using HalconDotNet; + +namespace HalconTools +{ + + /// <summary> + /// The class MeasurementPair describes edge pair measurement + /// and inherits from the base class Measurement. Virtual methods + /// defined in the base class are customized here to apply + /// HALCON operators for edge pair measurement. + /// </summary> + public class MeasurementPair : Measurement + { + /// <summary> + /// Result container for the edge information returned + /// by the HALCON measure operator. + /// </summary> + private PairResult mResult; + + /// <summary> + /// Result container for the edge information converted + /// into world coordinates. If calibration data is not available, + /// the variable contains the same information as mResult. + /// </summary> + private PairResult mResultWorld; + + /// <summary> + /// Creates a measurement object for the provided ROI instance. + /// </summary> + /// <param name="roi">ROI instance</param> + /// <param name="mAssist">Reference to controller class</param> + public MeasurementPair(ROI roi, MeasureAssistant mAssist) + : base(roi, mAssist) + { + mResult = new PairResult(); + mResultWorld = new PairResult(); + UpdateMeasure(); + } + + /// <summary> + /// Triggers an update of the measure results because of + /// changes in the parameter setup or a recreation of the measure + /// object caused by an update in the ROI model. + /// </summary> + public override void UpdateResults() + { + if (mHandle == null) + return; + + mMeasAssist.exceptionText = ""; + + try + { + mHandle.MeasurePairs(mMeasAssist.mImage, + mMeasAssist.mSigma, mMeasAssist.mThresh, + mMeasAssist.mTransition, mMeasAssist.mPosition, + out mResult.rowEdgeFirst, out mResult.colEdgeFirst, out mResult.amplitudeFirst, + out mResult.rowEdgeSecond, out mResult.colEdgeSecond, out mResult.amplitudeSecond, + out mResult.intraDistance, out mResult.interDistance); + + if (mMeasAssist.mIsCalibValid && mMeasAssist.mTransWorldCoord) + { + Rectify(mResult.rowEdgeFirst, mResult.colEdgeFirst, out mResultWorld.rowEdgeFirst, out mResultWorld.colEdgeFirst); + Rectify(mResult.rowEdgeSecond, mResult.colEdgeSecond, out mResultWorld.rowEdgeSecond, out mResultWorld.colEdgeSecond); + + mResultWorld.intraDistance = Distance(mResult.rowEdgeFirst, mResult.colEdgeFirst, + mResult.rowEdgeSecond, mResult.colEdgeSecond, 0); + mResultWorld.interDistance = Distance(mResult.rowEdgeSecond, mResult.colEdgeSecond, + mResult.rowEdgeFirst, mResult.colEdgeFirst, 1); + + mResultWorld.amplitudeFirst = mResult.amplitudeFirst; + mResultWorld.amplitudeSecond = mResult.amplitudeSecond; + } + else + { + mResultWorld = new PairResult(mResult); + } + } + catch (HOperatorException e) + { + mEdgeXLD.Dispose(); + mMeasAssist.exceptionText = e.Message; + mResultWorld = new PairResult(); + return; + } + UpdateXLD(); + } + + /// <summary>Updates display object for measured edges.</summary> + public override void UpdateXLD() + { + HXLDCont val; + double width, phi, cRow, cCol, radius, extent; + + if (mHandle == null && ((int)mHandle.Handle < 0)) + return; + + mMeasAssist.exceptionText = ""; + width = mMeasAssist.mDispROIWidth ? mMeasAssist.mRoiWidth : mMeasAssist.mDispEdgeLength; + mEdgeXLD.Dispose(); + mEdgeXLD.GenEmptyObj(); + + try + { + + if (mROIType == ROI.ROI_TYPE_LINE) + { + phi = mMeasROI[2].D; + + for (int i = 0; i < mResult.rowEdgeFirst.Length; i++) + { + val = DetermineEdgeLine(mResult.rowEdgeFirst[i].D, mResult.colEdgeFirst[i].D, phi, width); + mEdgeXLD = mEdgeXLD.ConcatObj(val); + val = DetermineEdgeLine(mResult.rowEdgeSecond[i].D, mResult.colEdgeSecond[i].D, phi, width); + mEdgeXLD = mEdgeXLD.ConcatObj(val); + val = DetermineLine(mResult.rowEdgeFirst[i].D, mResult.colEdgeFirst[i].D, + mResult.rowEdgeSecond[i].D, mResult.colEdgeSecond[i].D); + mEdgeXLD = mEdgeXLD.ConcatObj(val); + } + } + else if (mROIType == ROI.ROI_TYPE_CIRCLEARC) + { + cRow = mROICoord[0].D; + cCol = mROICoord[1].D; + radius = mROICoord[2].D; + extent = mROICoord[4].D; + + for (int i = 0; i < mResult.rowEdgeFirst.Length; i++) + { + val = DetermineEdgeCircularArc(mResult.rowEdgeFirst[i].D, + mResult.colEdgeFirst[i].D, + cRow, cCol, radius, width); + mEdgeXLD = mEdgeXLD.ConcatObj(val); + val = DetermineEdgeCircularArc(mResult.rowEdgeSecond[i].D, + mResult.colEdgeSecond[i].D, + cRow, cCol, radius, width); + mEdgeXLD = mEdgeXLD.ConcatObj(val); + val = DeterminePairCircularArc(mResult.rowEdgeFirst[i].D, mResult.colEdgeFirst[i].D, + mResult.rowEdgeSecond[i].D, mResult.colEdgeSecond[i].D, + cRow, cCol, radius, width, (extent >= 0)); + mEdgeXLD = mEdgeXLD.ConcatObj(val); + } + } + } + catch (HOperatorException e) + { + mMeasAssist.exceptionText = e.Message; + } + } + + /// <summary>Returns measurement result.</summary> + public override MeasureResult getMeasureResultData() + { + return mResultWorld; + } + + /// <summary>Clears measurement result.</summary> + public override void ClearResultData() + { + mResultWorld = new PairResult(); + } + + }//end of class +}//end of namespace diff --git a/HalconTools/MeasureModule/MeasurementResult.cs b/HalconTools/MeasureModule/MeasurementResult.cs new file mode 100644 index 0000000..98b19bc --- /dev/null +++ b/HalconTools/MeasureModule/MeasurementResult.cs @@ -0,0 +1,164 @@ +using System; +using HalconDotNet; + +namespace HalconTools +{ + + /// <summary> + /// Base class to have a more abstract definition of a measure result. + /// </summary> + public class MeasureResult + { + public MeasureResult() { } + } + + /****************************************************************/ + /****************************************************************/ + + /// <summary> + /// Measure result class containing data obtained from the HALCON measure + /// operator for single-edge measurement + /// </summary> + public class EdgeResult : MeasureResult + { + /// <summary>Row coordinate of extracted edges.</summary> + public HTuple rowEdge; + + /// <summary>Column coordinate of extracted edges.</summary> + public HTuple colEdge; + + /// <summary>Amplitude of the extracted edges (with sign).</summary> + public HTuple amplitude; + + /// <summary>Distance between consecutive edges.</summary> + public HTuple distance; + + /// <summary>Creates empty instance.</summary> + public EdgeResult() { } + + /// <summary> + /// Creates an edge result instance containing data from + /// the provided result value (deep copy). + /// </summary> + public EdgeResult(EdgeResult result) + : this(result.rowEdge, result.colEdge, + result.amplitude, result.distance) + { + } + + /// <summary> + /// Creates an edge result instance using the passed values. + /// </summary> + public EdgeResult(HTuple Nrow, HTuple Ncol, + HTuple Nampl, HTuple Ndist) + { + rowEdge = new HTuple(Nrow); + colEdge = new HTuple(Ncol); + amplitude = new HTuple(Nampl); + distance = new HTuple(Ndist); + } + + /// <summary> + /// Creates an edge result instance using the passed values. + /// </summary> + public EdgeResult(double Nrow, double Ncol, + double Nampl, double Ndist) + { + rowEdge = new HTuple(Nrow); + colEdge = new HTuple(Ncol); + amplitude = new HTuple(Nampl); + distance = new HTuple(Ndist); + } + + }//end of class EdgeResult + + + /****************************************************************/ + /****************************************************************/ + + /// <summary> + /// Measure result class containing data obtained from the HALCON measure + /// operator for edge pair measurement + /// </summary> + public class PairResult : MeasureResult + { + + /// <summary> + /// Row coordinate of first extracted edges of a pair. + /// </summary> + public HTuple rowEdgeFirst; + /// <summary> + /// Column coordinate of first extracted edges of a pair. + /// </summary> + public HTuple colEdgeFirst; + /// <summary> + /// Row coordinate of second extracted edges of a pair. + /// </summary> + public HTuple rowEdgeSecond; + /// <summary> + /// Column coordinate of second extracted edges of a pair. + /// </summary> + public HTuple colEdgeSecond; + /// <summary>Amplitude of the first extracted edges of a pair (with sign).</summary> + public HTuple amplitudeFirst; + /// <summary>Amplitude of the second extracted edges of a pair (with sign).</summary> + public HTuple amplitudeSecond; + /// <summary>Distance between edges of a pair.</summary> + public HTuple intraDistance; + /// <summary>Distance between consecutive edge pairs</summary> + public HTuple interDistance; + + + /// <summary>Creates empty instance.</summary> + public PairResult() { } + + /// <summary> + /// Creates an edge result instance containing data from + /// the provided result value (deep copy). + /// </summary> + public PairResult(PairResult result) + : this(result.rowEdgeFirst, result.colEdgeFirst, + result.rowEdgeSecond, result.colEdgeSecond, + result.amplitudeFirst, result.amplitudeSecond, + result.intraDistance, result.interDistance) + { + } + + /// <summary> + /// Creates an edge result instance using the passed values. + /// </summary> + public PairResult(HTuple Nrow1, HTuple Ncol1, + HTuple Nrow2, HTuple Ncol2, + HTuple Nampl1, HTuple Nampl2, + HTuple Ndist, HTuple Nwidth) + { + rowEdgeFirst = new HTuple(Nrow1); + colEdgeFirst = new HTuple(Ncol1); + rowEdgeSecond = new HTuple(Nrow2); + colEdgeSecond = new HTuple(Ncol2); + amplitudeFirst = new HTuple(Nampl1); + amplitudeSecond = new HTuple(Nampl2); + intraDistance = new HTuple(Ndist); + interDistance = new HTuple(Nwidth); + } + + /// <summary> + /// Creates an edge result instance using the passed values. + /// </summary> + public PairResult(double Nrow1, double Ncol1, + double Nrow2, double Ncol2, + double Nampl1, double Nampl2, + double Ndist, double Nwidth) + { + rowEdgeFirst = new HTuple(Nrow1); + colEdgeFirst = new HTuple(Ncol1); + rowEdgeSecond = new HTuple(Nrow2); + colEdgeSecond = new HTuple(Ncol2); + amplitudeFirst = new HTuple(Nampl1); + amplitudeSecond = new HTuple(Nampl2); + intraDistance = new HTuple(Ndist); + interDistance = new HTuple(Nwidth); + } + + }//end of class PairResult +}//end of namespace diff --git a/HalconTools/Properties/AssemblyInfo.cs b/HalconTools/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..86adfd1 --- /dev/null +++ b/HalconTools/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +锘縰sing System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 鏈夊叧绋嬪簭闆嗙殑甯歌淇℃伅閫氳繃涓嬪垪灞炴�ч泦 +// 鎺у埗銆傛洿鏀硅繖浜涘睘鎬у�煎彲淇敼 +// 涓庣▼搴忛泦鍏宠仈鐨勪俊鎭�� +[assembly: AssemblyTitle("HalconTools")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("HalconTools")] +[assembly: AssemblyCopyright("Copyright 漏 Microsoft 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 灏� ComVisible 璁剧疆涓� false 浣挎绋嬪簭闆嗕腑鐨勭被鍨� +// 瀵� COM 缁勪欢涓嶅彲瑙併�傚鏋滈渶瑕佷粠 COM 璁块棶姝ょ▼搴忛泦涓殑绫诲瀷锛� +// 鍒欏皢璇ョ被鍨嬩笂鐨� ComVisible 灞炴�ц缃负 true銆� +[assembly: ComVisible(false)] + +// 濡傛灉姝ら」鐩悜 COM 鍏紑锛屽垯涓嬪垪 GUID 鐢ㄤ簬绫诲瀷搴撶殑 ID +[assembly: Guid("5b85ceaa-5e9a-46bd-b3a4-bf71c9e420d3")] + +// 绋嬪簭闆嗙殑鐗堟湰淇℃伅鐢变笅闈㈠洓涓�肩粍鎴�: +// +// 涓荤増鏈� +// 娆$増鏈� +// 鍐呴儴鐗堟湰鍙� +// 淇鍙� +// +// 鍙互鎸囧畾鎵�鏈夎繖浜涘�硷紝涔熷彲浠ヤ娇鐢ㄢ�滃唴閮ㄧ増鏈彿鈥濆拰鈥滀慨璁㈠彿鈥濈殑榛樿鍊硷紝 +// 鏂规硶鏄寜濡備笅鎵�绀轰娇鐢ㄢ��*鈥�: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/HalconTools/Properties/Resources.Designer.cs b/HalconTools/Properties/Resources.Designer.cs new file mode 100644 index 0000000..d46e502 --- /dev/null +++ b/HalconTools/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +锘�//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace HalconTools.Properties { + using System; + + + /// <summary> + /// A strongly-typed resource class, for looking up localized strings, etc. + /// </summary> + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// <summary> + /// Returns the cached ResourceManager instance used by this class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HalconTools.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/HalconTools/Properties/Resources.resx b/HalconTools/Properties/Resources.resx new file mode 100644 index 0000000..7080a7d --- /dev/null +++ b/HalconTools/Properties/Resources.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/HalconTools/Properties/Settings.Designer.cs b/HalconTools/Properties/Settings.Designer.cs new file mode 100644 index 0000000..7493244 --- /dev/null +++ b/HalconTools/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +锘�//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace HalconTools.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/HalconTools/Properties/Settings.settings b/HalconTools/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/HalconTools/Properties/Settings.settings @@ -0,0 +1,7 @@ +锘�<?xml version='1.0' encoding='utf-8'?> +<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> + <Profiles> + <Profile Name="(Default)" /> + </Profiles> + <Settings /> +</SettingsFile> diff --git a/HalconTools/ResourceCulture.cs b/HalconTools/ResourceCulture.cs new file mode 100644 index 0000000..c3ef354 --- /dev/null +++ b/HalconTools/ResourceCulture.cs @@ -0,0 +1,124 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Reflection; +using System.Resources; +using System.Globalization; +using System.Windows.Forms; + +namespace HalconTools +{ + class ResourceCulture + { + /// + /// Set current culture by name + /// + /// name + public static void SetCurrentCulture(string name) + { + if (string.IsNullOrEmpty(name)) + { + name = "en-US"; + } + Thread.CurrentThread.CurrentCulture = new CultureInfo(name); + } + /// + /// Get string by id + /// + /// id + /// current language string + public static string GetString(string id) + { + string strCurLanguage = ""; + try + { + ResourceManager rm = new ResourceManager("HalconTools.Resources.Resource", Assembly.GetExecutingAssembly()); + CultureInfo ci = Thread.CurrentThread.CurrentCulture; + strCurLanguage = rm.GetString(id, ci); + } + catch + { + //strCurLanguage = "No id:" + id + ", please add."; + strCurLanguage = ""; + } + return strCurLanguage; + } + + public static string formName; + + public static void SetLanguage(System.Windows.Forms.Control control) + { + if (control.GetType().BaseType.Name == "Form") + { + formName = control.Name; + control.Text = GetString(control.Name); + } + + + for (int i = 0; i < control.Controls.Count; i++) + { + switch (control.Controls[i].GetType().Name) + { + + case "Label": + + case "Button": + + case "CheckBox": + + case "RadioButton": + + case "LinkLabel": + + control.Controls[i].Text = GetString( + + formName + control.Controls[i].Name); + + break; + + case "GroupBox": + + control.Controls[i].Text = GetString( + + formName + control.Controls[i].Name); + + SetLanguage(control.Controls[i]); + + break; + + case "Panel": + + SetLanguage(control.Controls[i]); + + break; + + case "TabControl": + + TabControl tbc = (TabControl)control.Controls[i]; + + for (int j = 0; j < tbc.TabCount; j++) + { + + tbc.TabPages[j].Text = GetString( + + formName + tbc.TabPages[j].Name); + + SetLanguage(tbc.TabPages[j]); + + } + + break; + + default: + + break; + + } + + } + + } + } +} diff --git a/HalconTools/Resources/Resource.en-US.resx b/HalconTools/Resources/Resource.en-US.resx new file mode 100644 index 0000000..c0b4fea --- /dev/null +++ b/HalconTools/Resources/Resource.en-US.resx @@ -0,0 +1,330 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <data name="frmFitCircleAndLinebtnLoadImage" xml:space="preserve"> + <value>Load Image</value> + </data> + <data name="frmFitCircleAndLinebtnResetView" xml:space="preserve"> + <value>Reset View</value> + </data> + <data name="frmFitCircleAndLinefrmFitCircleAndLine" xml:space="preserve"> + <value>frmFitCircleAndLine</value> + </data> + <data name="frmFitCircleAndLineRbMove" xml:space="preserve"> + <value>Move</value> + </data> + <data name="frmFitCircleAndLineRbNone" xml:space="preserve"> + <value>None</value> + </data> + <data name="frmFitCircleAndLineRbZoom" xml:space="preserve"> + <value>Zoom</value> + </data> + <data name="frmFitCircleAndLinetabPageCircle" xml:space="preserve"> + <value>Fit Circle</value> + </data> + <data name="frmFitCircleAndLinetabPageLine" xml:space="preserve"> + <value>Fit Line</value> + </data> + <data name="frmFitCircleAndLine" xml:space="preserve"> + <value>frmFitCircleAndLinebtn</value> + </data> + <data name="frmFitCircleAndLinebtnCircleRoi" xml:space="preserve"> + <value>Add Circle</value> + </data> + <data name="frmFitCircleAndLinebtnFitCircle" xml:space="preserve"> + <value>Fit Ciecle</value> + </data> + <data name="frmFitCircleAndLinebtnFitLine" xml:space="preserve"> + <value>Fit Line</value> + </data> + <data name="frmFitCircleAndLinebtnFitZoom" xml:space="preserve"> + <value>Fit Zoom</value> + </data> + <data name="frmFitCircleAndLinebtnLineRoi" xml:space="preserve"> + <value>Add Line</value> + </data> + <data name="frmFitCircleAndLinebtnLoadConfige_Circle" xml:space="preserve"> + <value>Load Confige</value> + </data> + <data name="frmFitCircleAndLinebtnLoadConfige_Line" xml:space="preserve"> + <value>Load Config</value> + </data> + <data name="frmFitCircleAndLinebtnRoiHeightReset_Circle" xml:space="preserve"> + <value>Reset</value> + </data> + <data name="frmFitCircleAndLinebtnRoiHeightReset_Line" xml:space="preserve"> + <value>Reset</value> + </data> + <data name="frmFitCircleAndLinegbxAddType" xml:space="preserve"> + <value>Add Type</value> + </data> + <data name="frmFitCircleAndLinegbxFitCirclePara" xml:space="preserve"> + <value>Parameter</value> + </data> + <data name="frmFitCircleAndLinegbxFitLinePara" xml:space="preserve"> + <value>Parameter</value> + </data> + <data name="frmFitCircleAndLinegbxImage" xml:space="preserve"> + <value>Image</value> + </data> + <data name="frmFitCircleAndLinegbxOption" xml:space="preserve"> + <value>Option</value> + </data> + <data name="frmFitCircleAndLinelabColumnBegin" xml:space="preserve"> + <value>Column Begin</value> + </data> + <data name="frmFitCircleAndLinelabColumnEnd" xml:space="preserve"> + <value>Column End</value> + </data> + <data name="frmFitCircleAndLinelabInterpolation" xml:space="preserve"> + <value>Interpolation</value> + </data> + <data name="frmFitCircleAndLinelabInterpolation_Circle" xml:space="preserve"> + <value>ROIHeight</value> + </data> + <data name="frmFitCircleAndLinelabMinEdgeAmpl" xml:space="preserve"> + <value>Min.EdgeAmpl</value> + </data> + <data name="frmFitCircleAndLinelabMinEdgeAmpl_Circle" xml:space="preserve"> + <value>Min.EdgeAmpl</value> + </data> + <data name="frmFitCircleAndLinelabNumber" xml:space="preserve"> + <value>Number</value> + </data> + <data name="frmFitCircleAndLinelabNumber_Circle" xml:space="preserve"> + <value>Number</value> + </data> + <data name="frmFitCircleAndLinelabPosition" xml:space="preserve"> + <value>Position</value> + </data> + <data name="frmFitCircleAndLinelabPosition_Circle" xml:space="preserve"> + <value>Position</value> + </data> + <data name="frmFitCircleAndLinelabRecognition" xml:space="preserve"> + <value>Recognition</value> + </data> + <data name="frmFitCircleAndLinelabRecognitionSet" xml:space="preserve"> + <value>Recognition</value> + </data> + <data name="frmFitCircleAndLinelabRecognitionSet_Circle" xml:space="preserve"> + <value>Recognition</value> + </data> + <data name="frmFitCircleAndLinelabRecognition_Circle" xml:space="preserve"> + <value>Recognition</value> + </data> + <data name="frmFitCircleAndLinelabROIHeight" xml:space="preserve"> + <value>ROIHeight</value> + </data> + <data name="frmFitCircleAndLinelabROIHeight_Circle" xml:space="preserve"> + <value>ROIWidth</value> + </data> + <data name="frmFitCircleAndLinelabROIWidth" xml:space="preserve"> + <value>ROIWidth</value> + </data> + <data name="frmFitCircleAndLinelabROIWidth_Circle" xml:space="preserve"> + <value>ROIWidth</value> + </data> + <data name="frmFitCircleAndLinelabRowBegin" xml:space="preserve"> + <value>Row Begin</value> + </data> + <data name="frmFitCircleAndLinelabRowEnd" xml:space="preserve"> + <value>Row End</value> + </data> + <data name="frmFitCircleAndLinelabSmoothing" xml:space="preserve"> + <value>Smoothing</value> + </data> + <data name="frmFitCircleAndLinelabSmoothing_Circle" xml:space="preserve"> + <value>Smoothing</value> + </data> + <data name="frmFitCircleAndLinelabTransition" xml:space="preserve"> + <value>Transition</value> + </data> + <data name="frmFitCircleAndLinelabTransition_Circle" xml:space="preserve"> + <value>Transition</value> + </data> + <data name="frmMeasureAssistantCircArcButton" xml:space="preserve"> + <value>Add Circle</value> + </data> + <data name="frmMeasureAssistantDeleteActRoiButton" xml:space="preserve"> + <value>Delete</value> + </data> + <data name="frmMeasureAssistantgbxImage" xml:space="preserve"> + <value>Image</value> + </data> + <data name="frmMeasureAssistantgbxRois" xml:space="preserve"> + <value>ROIs</value> + </data> + <data name="frmMeasureAssistantgbxViewInteraction" xml:space="preserve"> + <value>View Interaction</value> + </data> + <data name="frmMeasureAssistantLineButton" xml:space="preserve"> + <value>Add Line</value> + </data> + <data name="frmMeasureAssistantLoadImgButton" xml:space="preserve"> + <value>Load...</value> + </data> + <data name="frmMeasureAssistantMagnifyButton" xml:space="preserve"> + <value>Magnify</value> + </data> + <data name="frmMeasureAssistantMoveButton" xml:space="preserve"> + <value>Move</value> + </data> + <data name="frmMeasureAssistantNoneButton" xml:space="preserve"> + <value>None</value> + </data> + <data name="frmMeasureAssistantResetROIButton" xml:space="preserve"> + <value>Delete All</value> + </data> + <data name="frmMeasureAssistantResetViewButton" xml:space="preserve"> + <value>Reset</value> + </data> + <data name="frmMeasureAssistanttabPageEdges" xml:space="preserve"> + <value>Edges</value> + </data> + <data name="frmMeasureAssistanttabPageLineProfile" xml:space="preserve"> + <value>Line Profile</value> + </data> + <data name="frmMeasureAssistanttabPageResults" xml:space="preserve"> + <value>Results</value> + </data> + <data name="frmMeasureAssistanttabPageSaveConfige" xml:space="preserve"> + <value>Save Parameter</value> + </data> + <data name="frmMeasureAssistantZoomButton" xml:space="preserve"> + <value>Zoom</value> + </data> + <data name="frmFitCircleAndLinebtnParaAdd" xml:space="preserve"> + <value>Para Add</value> + </data> + <data name="frmFitCircleAndLinebtnParaAdd_Circle" xml:space="preserve"> + <value>Para Add</value> + </data> + <data name="frmFitCircleAndLinelabColumn_Circle" xml:space="preserve"> + <value>Column</value> + </data> + <data name="frmFitCircleAndLinelabRadius_Circle" xml:space="preserve"> + <value>Radius</value> + </data> + <data name="frmFitCircleAndLinelabRow_Circle" xml:space="preserve"> + <value>Row</value> + </data> + <data name="frmFitCircleAndLinebtnFrmMeasure" xml:space="preserve"> + <value>Measure Form</value> + </data> +</root> \ No newline at end of file diff --git a/HalconTools/Resources/Resource.zh-CN.resx b/HalconTools/Resources/Resource.zh-CN.resx new file mode 100644 index 0000000..5a87dc1 --- /dev/null +++ b/HalconTools/Resources/Resource.zh-CN.resx @@ -0,0 +1,330 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <data name="frmFitCircleAndLinebtnLoadImage" xml:space="preserve"> + <value>杞藉叆鍥剧墖</value> + </data> + <data name="frmFitCircleAndLinebtnResetView" xml:space="preserve"> + <value>绐楀彛澶嶄綅</value> + </data> + <data name="frmFitCircleAndLinefrmFitCircleAndLine" xml:space="preserve"> + <value>鎷熷悎鍦嗗強鐩寸嚎绐楀彛</value> + </data> + <data name="frmFitCircleAndLineRbMove" xml:space="preserve"> + <value>绉诲姩</value> + </data> + <data name="frmFitCircleAndLineRbNone" xml:space="preserve"> + <value>鏃�</value> + </data> + <data name="frmFitCircleAndLineRbZoom" xml:space="preserve"> + <value>鍙樼劍</value> + </data> + <data name="frmFitCircleAndLinetabPageCircle" xml:space="preserve"> + <value>鎷熷悎鍦�</value> + </data> + <data name="frmFitCircleAndLinetabPageLine" xml:space="preserve"> + <value>鎷熷悎鐩寸嚎</value> + </data> + <data name="frmFitCircleAndLine" xml:space="preserve"> + <value>鎷熷悎鍦嗗強鐩寸嚎绐楀彛</value> + </data> + <data name="frmFitCircleAndLinebtnCircleRoi" xml:space="preserve"> + <value>娣诲姞鍦�</value> + </data> + <data name="frmFitCircleAndLinebtnFitCircle" xml:space="preserve"> + <value>鎷熷悎鍦�</value> + </data> + <data name="frmFitCircleAndLinebtnFitLine" xml:space="preserve"> + <value>鎷熷悎鐩寸嚎</value> + </data> + <data name="frmFitCircleAndLinebtnFitZoom" xml:space="preserve"> + <value>閫傚悎绐椾綋</value> + </data> + <data name="frmFitCircleAndLinebtnLineRoi" xml:space="preserve"> + <value>娣诲姞鐩寸嚎</value> + </data> + <data name="frmFitCircleAndLinebtnLoadConfige_Circle" xml:space="preserve"> + <value>杞藉叆鍙傛暟</value> + </data> + <data name="frmFitCircleAndLinebtnLoadConfige_Line" xml:space="preserve"> + <value>杞藉叆鍙傛暟</value> + </data> + <data name="frmFitCircleAndLinebtnRoiHeightReset_Circle" xml:space="preserve"> + <value>杩樺師</value> + </data> + <data name="frmFitCircleAndLinebtnRoiHeightReset_Line" xml:space="preserve"> + <value>杩樺師</value> + </data> + <data name="frmFitCircleAndLinegbxAddType" xml:space="preserve"> + <value>娣诲姞绫诲瀷</value> + </data> + <data name="frmFitCircleAndLinegbxFitCirclePara" xml:space="preserve"> + <value>鍙傛暟</value> + </data> + <data name="frmFitCircleAndLinegbxFitLinePara" xml:space="preserve"> + <value>鍙傛暟</value> + </data> + <data name="frmFitCircleAndLinegbxImage" xml:space="preserve"> + <value>鍥惧儚</value> + </data> + <data name="frmFitCircleAndLinegbxOption" xml:space="preserve"> + <value>鎿嶄綔</value> + </data> + <data name="frmFitCircleAndLinelabColumnBegin" xml:space="preserve"> + <value>璧风偣鍒�</value> + </data> + <data name="frmFitCircleAndLinelabColumnEnd" xml:space="preserve"> + <value>缁堢偣鍒�</value> + </data> + <data name="frmFitCircleAndLinelabInterpolation" xml:space="preserve"> + <value>鎻掑�兼柟娉�</value> + </data> + <data name="frmFitCircleAndLinelabInterpolation_Circle" xml:space="preserve"> + <value>鎻掑�兼柟娉�</value> + </data> + <data name="frmFitCircleAndLinelabMinEdgeAmpl" xml:space="preserve"> + <value>鏈�灏忚竟缂樺箙搴�</value> + </data> + <data name="frmFitCircleAndLinelabMinEdgeAmpl_Circle" xml:space="preserve"> + <value>鏈�灏忚竟缂樺箙搴�</value> + </data> + <data name="frmFitCircleAndLinelabNumber" xml:space="preserve"> + <value>鏁伴噺</value> + </data> + <data name="frmFitCircleAndLinelabNumber_Circle" xml:space="preserve"> + <value>鏁伴噺</value> + </data> + <data name="frmFitCircleAndLinelabPosition" xml:space="preserve"> + <value>浣嶇疆</value> + </data> + <data name="frmFitCircleAndLinelabPosition_Circle" xml:space="preserve"> + <value>浣嶇疆</value> + </data> + <data name="frmFitCircleAndLinelabRecognition" xml:space="preserve"> + <value>璇嗗埆</value> + </data> + <data name="frmFitCircleAndLinelabRecognitionSet" xml:space="preserve"> + <value>鍊�</value> + </data> + <data name="frmFitCircleAndLinelabRecognitionSet_Circle" xml:space="preserve"> + <value>鍊�</value> + </data> + <data name="frmFitCircleAndLinelabRecognition_Circle" xml:space="preserve"> + <value>璇嗗埆</value> + </data> + <data name="frmFitCircleAndLinelabROIHeight" xml:space="preserve"> + <value>ROI楂樺害</value> + </data> + <data name="frmFitCircleAndLinelabROIHeight_Circle" xml:space="preserve"> + <value>ROI楂樺害</value> + </data> + <data name="frmFitCircleAndLinelabROIWidth" xml:space="preserve"> + <value>ROI瀹藉害</value> + </data> + <data name="frmFitCircleAndLinelabROIWidth_Circle" xml:space="preserve"> + <value>ROI瀹藉害</value> + </data> + <data name="frmFitCircleAndLinelabRowBegin" xml:space="preserve"> + <value>璧风偣琛�</value> + </data> + <data name="frmFitCircleAndLinelabRowEnd" xml:space="preserve"> + <value>缁堢偣琛�</value> + </data> + <data name="frmFitCircleAndLinelabSmoothing" xml:space="preserve"> + <value>妯$硦</value> + </data> + <data name="frmFitCircleAndLinelabSmoothing_Circle" xml:space="preserve"> + <value>妯$硦</value> + </data> + <data name="frmFitCircleAndLinelabTransition" xml:space="preserve"> + <value>鍙樻崲</value> + </data> + <data name="frmFitCircleAndLinelabTransition_Circle" xml:space="preserve"> + <value>鍙樻崲</value> + </data> + <data name="frmMeasureAssistantCircArcButton" xml:space="preserve"> + <value>娣诲姞鍦�</value> + </data> + <data name="frmMeasureAssistantDeleteActRoiButton" xml:space="preserve"> + <value>鍒犻櫎褰撳墠</value> + </data> + <data name="frmMeasureAssistantgbxImage" xml:space="preserve"> + <value>鍥惧儚</value> + </data> + <data name="frmMeasureAssistantgbxRois" xml:space="preserve"> + <value>鎰熷叴瓒e尯鍩�</value> + </data> + <data name="frmMeasureAssistantgbxViewInteraction" xml:space="preserve"> + <value>鍥惧儚浜や簰</value> + </data> + <data name="frmMeasureAssistantLineButton" xml:space="preserve"> + <value>娣诲姞鐩寸嚎</value> + </data> + <data name="frmMeasureAssistantLoadImgButton" xml:space="preserve"> + <value>杞藉叆...</value> + </data> + <data name="frmMeasureAssistantMagnifyButton" xml:space="preserve"> + <value>鏀惧ぇ</value> + </data> + <data name="frmMeasureAssistantMoveButton" xml:space="preserve"> + <value>绉诲姩</value> + </data> + <data name="frmMeasureAssistantNoneButton" xml:space="preserve"> + <value>鏃�</value> + </data> + <data name="frmMeasureAssistantResetROIButton" xml:space="preserve"> + <value>鍒犻櫎鎵�鏈�</value> + </data> + <data name="frmMeasureAssistantResetViewButton" xml:space="preserve"> + <value>杩樺師</value> + </data> + <data name="frmMeasureAssistanttabPageEdges" xml:space="preserve"> + <value>杈�</value> + </data> + <data name="frmMeasureAssistanttabPageLineProfile" xml:space="preserve"> + <value>鐩寸嚎杞粨</value> + </data> + <data name="frmMeasureAssistanttabPageResults" xml:space="preserve"> + <value>缁撴灉</value> + </data> + <data name="frmMeasureAssistanttabPageSaveConfige" xml:space="preserve"> + <value>淇濆瓨鍙傛暟</value> + </data> + <data name="frmMeasureAssistantZoomButton" xml:space="preserve"> + <value>鍙樼劍</value> + </data> + <data name="frmFitCircleAndLinebtnParaAdd" xml:space="preserve"> + <value>娣诲姞鍙傛暟</value> + </data> + <data name="frmFitCircleAndLinebtnParaAdd_Circle" xml:space="preserve"> + <value>娣诲姞鍙傛暟</value> + </data> + <data name="frmFitCircleAndLinelabColumn_Circle" xml:space="preserve"> + <value>鍒�</value> + </data> + <data name="frmFitCircleAndLinelabRadius_Circle" xml:space="preserve"> + <value>鍗婂緞</value> + </data> + <data name="frmFitCircleAndLinelabRow_Circle" xml:space="preserve"> + <value>琛�</value> + </data> + <data name="frmFitCircleAndLinebtnFrmMeasure" xml:space="preserve"> + <value>娴嬮噺绐楀彛</value> + </data> +</root> \ No newline at end of file diff --git a/HalconTools/ScrewModule/ScrewAssistant.cs b/HalconTools/ScrewModule/ScrewAssistant.cs new file mode 100644 index 0000000..ee61161 --- /dev/null +++ b/HalconTools/ScrewModule/ScrewAssistant.cs @@ -0,0 +1,195 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using HalconDotNet; + +namespace HalconTools +{ + public delegate void ScrewDelegate(ScrewResult result); + + public class ScrewAssistant + { + public event ScrewDelegate ScrewDone; + + /// <summary>HALCON image used for .</summary> + public HImage mImage; + public int mWidth; + public int mHeight; + + public HWndCtrl viewController; + public ROIController roiController; + + public ScrewParam mScrewPara = new ScrewParam(); + public ScrewResult mScrewResult = new ScrewResult(); + + //涓棿鍙傛暟 + public HXLDCont XLDThresholdSubPix = new HXLDCont(); + public HXLDCont XLDSelected = new HXLDCont(); + public HXLDCont XLDRoundness = new HXLDCont(); + + public double row, col, radius; + + private HXLDCont tmpXLD = new HXLDCont(); + private HXLDCont tmpXLD2 = new HXLDCont(); + private HXLDCont tmpXLD3 = new HXLDCont(); + + public ScrewAssistant() + { + } + + public ScrewAssistant(HWindowControl viewPort) + { + viewController = new HWndCtrl(viewPort); + roiController = new ROIController(); + } + + public bool SetImage(string filename) + { + string tmp; + + try + { + mImage = new HImage(filename); + mImage.GetImagePointer1(out tmp, out mWidth, out mHeight); + } + catch (HOperatorException e) + { + mImage = null; + return false; + } + return true; + } + + public bool SetImage(HImage image) + { + string tmp; + + try + { + mImage = image; + mImage.GetImagePointer1(out tmp, out mWidth, out mHeight); + } + catch (HOperatorException e) + { + mImage = null; + return false; + } + return true; + } + + /// <summary> + /// Writes the new image to graphic window + /// </summary> + public void UpdateImage() + { + viewController.resetAll(); + viewController.useROIController(roiController); + viewController.setViewState(HWndCtrl.MODE_VIEW_NONE); + + viewController.addIconicVar(mImage); + viewController.repaint(); + } + + public void UpdateObj(HObject obj) + { + viewController.resetAll(); + viewController.repaint(); + + viewController.useROIController(roiController); + viewController.setViewState(HWndCtrl.MODE_VIEW_NONE); + + viewController.changeGraphicSettings(GraphicsContext.GC_COLOR, "blue"); + viewController.changeGraphicSettings(GraphicsContext.GC_LINEWIDTH, 2); + + viewController.addIconicVar(obj); + viewController.repaint(); + } + + public void UpdateObj(HObject obj, string color) + { + viewController.resetAll(); + viewController.repaint(); + + viewController.useROIController(roiController); + viewController.setViewState(HWndCtrl.MODE_VIEW_NONE); + + viewController.changeGraphicSettings(GraphicsContext.GC_COLOR, color); + viewController.changeGraphicSettings(GraphicsContext.GC_LINEWIDTH, 2); + + viewController.addIconicVar(obj); + viewController.repaint(); + } + + public void SetPara(ScrewParam para) + { + mScrewPara.ThresholdSubPix = para.ThresholdSubPix; + mScrewPara.RoundnessMin = para.RoundnessMin; + mScrewPara.RoundnessMax = para.RoundnessMax; + mScrewPara.RadiusMin = para.RadiusMin; + mScrewPara.RadiusMax = para.RadiusMax; + } + + public HXLDCont ThresholdSubPix(HImage image) + { + tmpXLD = image.ThresholdSubPix(mScrewPara.ThresholdSubPix); + + return tmpXLD; + } + + public HXLDCont RoundnessXLD(HXLDCont xld) + { + tmpXLD = xld.SelectShapeXld("circularity", "and", mScrewPara.RoundnessMin, mScrewPara.RoundnessMax); + + return tmpXLD; + } + + public HXLDCont SelectXLD(HXLDCont xld) + { + tmpXLD2 = xld.SelectShapeXld("width", "and", mScrewPara.RadiusMin * 2, mScrewPara.RadiusMax * 2); + tmpXLD3 = tmpXLD2.SelectShapeXld("height", "and", mScrewPara.RadiusMin * 2, mScrewPara.RadiusMax * 2); + + return tmpXLD3; + } + + public HXLDCont FitCircle(HXLDCont xld) + { + double phistart,phiend; + string tmps; + + xld.FitCircleContourXld("atukey", -1, 0, 0, 3, 2, out row, out col, out radius, out phistart, out phiend, out tmps); + + tmpXLD = new HXLDCont(); + tmpXLD.GenCircleContourXld(row, col, radius, 0, 6.28518, "positive", 1); + + return tmpXLD; + } + + public void Run() + { + try + { + mScrewResult = new ScrewResult(); + + XLDThresholdSubPix = ThresholdSubPix(mImage); + XLDRoundness = RoundnessXLD(XLDThresholdSubPix); + XLDSelected = SelectXLD(XLDRoundness); + mScrewResult.CircleCont = FitCircle(XLDSelected); + mScrewResult.row = row; + mScrewResult.col = col; + mScrewResult.radius = radius; + + if (ScrewDone != null) + { + ScrewDone(mScrewResult); + } + } + catch (Exception ex) + { + mScrewResult = null; + + if (ScrewDone != null) ScrewDone(mScrewResult); + } + } + } +} diff --git a/HalconTools/ScrewModule/ScrewParam.cs b/HalconTools/ScrewModule/ScrewParam.cs new file mode 100644 index 0000000..0b86e6c --- /dev/null +++ b/HalconTools/ScrewModule/ScrewParam.cs @@ -0,0 +1,20 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace HalconTools +{ + public class ScrewParam + { + public double ThresholdSubPix; + public double RoundnessMin; + public double RoundnessMax; + public double RadiusMin; + public double RadiusMax; + + public ScrewParam() + { + } + } +} diff --git a/HalconTools/ScrewModule/ScrewResult.cs b/HalconTools/ScrewModule/ScrewResult.cs new file mode 100644 index 0000000..6862e7e --- /dev/null +++ b/HalconTools/ScrewModule/ScrewResult.cs @@ -0,0 +1,22 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using HalconDotNet; + +namespace HalconTools +{ + public class ScrewResult + { + public HXLDCont CircleCont; + public double row; + public double col; + public double radius; + + public ScrewResult() + { + CircleCont = new HXLDCont(); + } + + } +} diff --git a/HalconTools/ToolKit/Counter.cs b/HalconTools/ToolKit/Counter.cs new file mode 100644 index 0000000..8891b56 --- /dev/null +++ b/HalconTools/ToolKit/Counter.cs @@ -0,0 +1,90 @@ +锘縩amespace HalconTools +{ + public class Counter + { + private int all; + private int ng; + private int ok; + + public Counter() + { + this.Reset(); + } + + public string GetPercent() + { + if (this.all == 0) + { + return "100.0%"; + } + if (this.ok == this.all) + { + return "100.0%"; + } + if (this.ok == 0) + { + return "0.0%"; + } + double num = (((double) this.ok) / ((double) this.all)) * 100.0; + return (num.ToString("#0.##") + "%"); + } + + public string GetPercent(int alls, int ngs) + { + if (alls == 0) + { + return "100.0%"; + } + if ((alls - ngs) == alls) + { + return "100.0%"; + } + if ((alls - ngs) == 0) + { + return "0.0%"; + } + double num = (((double) (alls - ngs)) / ((double) alls)) * 100.0; + return (num.ToString("#0.##") + "%"); + } + + public void Reset() + { + this.ok = 0; + this.ng = 0; + this.all = 0; + } + + public int All + { + get + { + return (this.ok + this.ng); + } + } + + public int NG + { + get + { + return this.ng; + } + set + { + this.ng = value; + } + } + + public int OK + { + get + { + return this.ok; + } + set + { + this.ok = value; + } + } + } +} + diff --git a/HalconTools/ToolKit/EventData.cs b/HalconTools/ToolKit/EventData.cs new file mode 100644 index 0000000..2bc24f1 --- /dev/null +++ b/HalconTools/ToolKit/EventData.cs @@ -0,0 +1,31 @@ +锘縩amespace HalconTools +{ + public class EventData + { + private object data; + + public EventData() + { + this.data = ""; + } + + public EventData(object obj) + { + this.data = ""; + this.data = obj; + } + + public object Data + { + get + { + return this.data; + } + set + { + this.data = value; + } + } + } +} + diff --git a/HalconTools/ToolKit/FileOperationResult.cs b/HalconTools/ToolKit/FileOperationResult.cs new file mode 100644 index 0000000..ed94d29 --- /dev/null +++ b/HalconTools/ToolKit/FileOperationResult.cs @@ -0,0 +1,10 @@ +锘縩amespace HalconTools +{ + public enum FileOperationResult + { + OK, + NOTEXIST, + WRITEERROR + } +} + diff --git a/HalconTools/ToolKit/IniTool.cs b/HalconTools/ToolKit/IniTool.cs new file mode 100644 index 0000000..735379c --- /dev/null +++ b/HalconTools/ToolKit/IniTool.cs @@ -0,0 +1,59 @@ +锘縰sing System; +using System.Runtime.InteropServices; +using System.Text; + +namespace HalconTools +{ + public class IniTool + { + private const int BUFF_LEN = 0x100; + private static string iniFileName = (AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "Setting.INI"); + + public IniTool(string strIniFileName) + { + iniFileName = strIniFileName; + } + + public static string GetIniSection(string lpszSection) + { + StringBuilder lpReturnedString = new StringBuilder(0x100); + uint num = GetPrivateProfileSection(lpszSection, lpReturnedString, lpReturnedString.Capacity, iniFileName); + return lpReturnedString.ToString(); + } + + public static string GetIniString(string lpszSection, string lpszEntry) + { + string lpDefault = null; + StringBuilder lpReturnedString = new StringBuilder(0x100); + uint num = GetPrivateProfileString(lpszSection, lpszEntry, lpDefault, lpReturnedString, Convert.ToUInt32(lpReturnedString.Capacity), iniFileName); + return lpReturnedString.ToString(); + } + + public static string GetIniString(string lpszSection, string lpszEntry, string lpszDefault) + { + StringBuilder lpReturnedString = new StringBuilder(0x100); + uint num = GetPrivateProfileString(lpszSection, lpszEntry, lpszDefault, lpReturnedString, Convert.ToUInt32(lpReturnedString.Capacity), iniFileName); + return lpReturnedString.ToString(); + } + + [DllImport("kernel32")] + private static extern uint GetPrivateProfileSection(string lpAppName, StringBuilder lpReturnedString, int nSize, string lpFileName); + [DllImport("kernel32.dll")] + private static extern uint GetPrivateProfileString(string lpApplicationName, string lpKeyName, string lpDefault, StringBuilder lpReturnedString, uint nSize, string lpFileName); + public static bool SetIniSection(string lpszSection, string lpszString) + { + return (WritePrivateProfileSection(lpszSection, lpszString, iniFileName) > 0); + } + + public static bool SetIniString(string lpszSection, string lpszEntry, string lpszString) + { + return (WritePrivateProfileString(lpszSection, lpszEntry, lpszString, iniFileName) > 0); + } + + [DllImport("kernel32")] + private static extern uint WritePrivateProfileSection(string lpAppName, string lpString, string lpFileName); + [DllImport("kernel32.dll")] + private static extern uint WritePrivateProfileString(string lpAppName, string lpEntryName, string lpEntryString, string lpFileName); + } +} + diff --git a/HalconTools/ToolKit/KillApplication.cs b/HalconTools/ToolKit/KillApplication.cs new file mode 100644 index 0000000..a3f2e23 --- /dev/null +++ b/HalconTools/ToolKit/KillApplication.cs @@ -0,0 +1,35 @@ +锘縩amespace HalconTools +{ + public class KillApplication + { + /// <summary> + /// 杩愯DOS鍛戒护 + /// DOS鍏抽棴杩涚▼鍛戒护(ntsd -c q -p PID )PID涓鸿繘绋嬬殑ID + /// </summary> + /// <param name="command"></param> + /// <returns></returns> + public static string RunCmd(string command) + { + //瀵︿緥涓�鍊婸rocess椤烇紝鍟熷嫊涓�鍊嬬崹绔嬮�茬▼ + System.Diagnostics.Process p = new System.Diagnostics.Process(); + + //Process椤炴湁涓�鍊婼tartInfo灞�э紝閫欏�嬫槸ProcessStartInfo椤烇紝鍖呮嫭浜嗕竴浜涘爆鎬у拰鏂规硶锛屼笅闈㈡垜鍊戠敤鍒颁簡浠栫殑骞惧�嬪爆鎬э細 + + p.StartInfo.FileName = "cmd.exe"; //瑷畾绋嬪簭鍚� + p.StartInfo.Arguments = "/c " + command; //瑷畾绋嬪紡鍩疯鍙冩暩 + p.StartInfo.UseShellExecute = false; //闂滈枆Shell鐨勪娇鐢� + p.StartInfo.RedirectStandardInput = true; //閲嶅畾鍚戞婧栬几鍏� + p.StartInfo.RedirectStandardOutput = true; //閲嶅畾鍚戞婧栬几鍑� + p.StartInfo.RedirectStandardError = true; //閲嶅畾鍚戦尟瑾よ几鍑� + p.StartInfo.CreateNoWindow = true; //瑷疆涓嶉’绀虹獥鍙� + + p.Start(); //鍟熷嫊 + + //p.StandardInput.WriteLine(command); //涔熷彲浠ョ敤閫欑ó鏂瑰紡杓稿叆瑕佸煼琛岀殑鍛戒护 + //p.StandardInput.WriteLine("exit"); //涓嶉亷瑕佽寰楀姞涓奅xit瑕佷笉鐒朵笅涓�琛岀▼寮忓煼琛岀殑鏅傚�欐渻鐣舵 + + return p.StandardOutput.ReadToEnd(); //寰炶几鍑烘祦鍙栧緱鍛戒护鍩疯绲愭灉 + + } + } +} diff --git a/HalconTools/ToolKit/ListenEventArgs.cs b/HalconTools/ToolKit/ListenEventArgs.cs new file mode 100644 index 0000000..26b3854 --- /dev/null +++ b/HalconTools/ToolKit/ListenEventArgs.cs @@ -0,0 +1,27 @@ +锘縰sing System; + +namespace HalconTools +{ + public class ListenEventArgs : EventArgs + { + private EventData iData; + + public ListenEventArgs(EventData iData) + { + this.iData = iData; + } + + public EventData IData + { + get + { + return this.iData; + } + set + { + this.iData = value; + } + } + } +} + diff --git a/HalconTools/ToolKit/ListenEventCreater.cs b/HalconTools/ToolKit/ListenEventCreater.cs new file mode 100644 index 0000000..05751a1 --- /dev/null +++ b/HalconTools/ToolKit/ListenEventCreater.cs @@ -0,0 +1,25 @@ +锘縰sing System; + +namespace HalconTools +{ + public class ListenEventCreater + { + public event EventHandler<ListenEventArgs> ListenEvent; + + public void ChangeValue(EventData iData) + { + ListenEventArgs args = new ListenEventArgs(iData); + this.SendEvent(args); + } + + protected virtual void SendEvent(ListenEventArgs args) + { + EventHandler<ListenEventArgs> listenEvent = this.ListenEvent; + if (listenEvent != null) + { + listenEvent(this, args); + } + } + } +} + diff --git a/HalconTools/ToolKit/LkSensor.cs b/HalconTools/ToolKit/LkSensor.cs new file mode 100644 index 0000000..0fecdc1 --- /dev/null +++ b/HalconTools/ToolKit/LkSensor.cs @@ -0,0 +1,403 @@ +锘縰sing System; +using System.Net; + +namespace HalconTools +{ + public class LkSensorWrapper + { + public SerialportWrapper comPort; + public const string READ_BOTH_HEAD_CMD = "M0"; + public const string READ_HEAD_A_CMD = "M1"; + public const string READ_HEAD_B_CMD = "M2"; + public const string CHANGE_PROGRAM_CMD = "PW,"; + public const string START_SYNCSTORING_CMD = "AS"; + public const string STOP_SYNCSTORING_CMD = "AP"; + public const string CLEAR_STORING_CMD = "AQ"; + public const string READ_STORING_CMD = "AO"; + public const int ONE_HEAD_RESULT_LEN = 12; + public const int TWO_HEAD_RESULT_LEN = 21; + public const int FIVE_RESULT_LEN = 48; + public const int EIGHT_RESULT_LEN = 75; + public const double TIMEOUT_SPAN = 3E7; + + public LkSensorWrapper() + { + comPort = new SerialportWrapper(); + comPort.Open(0, 9600, false); + } + + public LkSensorWrapper(int index) + { + comPort = new SerialportWrapper(); + comPort.Open(index, 9600, false); + } + + public LkSensorWrapper(string comName) + { + comPort = new SerialportWrapper(); + switch (comName) + { + case "COM1": + comPort.Open(0, 9600, false); + break; + + case "COM2": + comPort.Open(1, 9600, false); + break; + + case "COM3": + comPort.Open(2, 9600, false); + break; + + case "COM4": + comPort.Open(3, 9600, false); + break; + + case "COM5": + comPort.Open(4, 9600, false); + break; + } + } + + public void ComReadHead(int index, ref float value) + { + String measureCommand = ""; + + if (1 == index) + { + measureCommand = READ_HEAD_A_CMD; + } + else if (2 == index) + { + measureCommand = READ_HEAD_B_CMD; + } + + comPort.Send(measureCommand + "\r"); + comPort.Clear(); + + DateTime startTime = DateTime.Now; + while (comPort.builder.Length < ONE_HEAD_RESULT_LEN) + { + DateTime currentTime = DateTime.Now; + if (currentTime.Ticks - startTime.Ticks > Convert.ToInt32(TIMEOUT_SPAN)) + { + break; + } + } + + string[] LkOutput = comPort.builder.ToString().Split(','); + comPort.Clear(); + + if (measureCommand.Equals(LkOutput[0])) + { + if (LkOutput[1].Contains("FFFF")) + { + value = float.NegativeInfinity; + } + else + { + value = Convert.ToSingle(LkOutput[1]); + } + } + else + { + value = float.PositiveInfinity; + } + } + + public void ComReadHeads(ref float valueA, ref float valueB) + { + string measureCommand = READ_BOTH_HEAD_CMD; + + comPort.Send(measureCommand + "\r"); + comPort.Clear(); + + DateTime startTime = DateTime.Now; + while (comPort.builder.Length < TWO_HEAD_RESULT_LEN) + { + DateTime currentTime = DateTime.Now; + if (currentTime.Ticks - startTime.Ticks > Convert.ToInt32(TIMEOUT_SPAN)) + { + break; + } + } + + string[] LkOutput = comPort.builder.ToString().Trim().Split(','); + + if (measureCommand.Equals(LkOutput[0])) + { + if (LkOutput[1].Contains("FFFF")) + { + valueA = float.NegativeInfinity; + } + else + { + valueA = Convert.ToSingle(LkOutput[1]); + } + if (LkOutput[2].Contains("FFFF")) + { + valueB = float.NegativeInfinity; + } + else + { + valueB = Convert.ToSingle(LkOutput[2]); + } + + } + else + { + valueA = float.PositiveInfinity; + valueB = float.PositiveInfinity; + } + } + + public void ChoosePrgram(int progNo) + { + comPort.Send(CHANGE_PROGRAM_CMD + progNo.ToString() + "\r"); + comPort.Clear(); + } + + public void StartSyncStoring() + { + comPort.Send(START_SYNCSTORING_CMD + "\r"); + comPort.Clear(); + } + + public void StopSyncStoring() + { + comPort.Send(STOP_SYNCSTORING_CMD + "\r"); + comPort.Clear(); + + DateTime startTime = DateTime.Now; + while (comPort.builder.Length < 2) + { + DateTime currentTime = DateTime.Now; + if (currentTime.Ticks - startTime.Ticks > Convert.ToInt32(TIMEOUT_SPAN)) + { + break; + } + } + + string[] LkOutput = comPort.builder.ToString().Trim().Split(','); + + if (LkOutput[0].Contains(STOP_SYNCSTORING_CMD)) + { + return; + } + else + { + return; + } + } + + public void ClearStoring() + { + comPort.Send(CLEAR_STORING_CMD + "\r"); + comPort.Clear(); + } + + public void ReadStoring(ref float valueA, ref float valueB) + { + string measureCommand = READ_STORING_CMD; + + comPort.Send(measureCommand + ",01\r"); + comPort.Clear(); + + DateTime startTime = DateTime.Now; + while (comPort.builder.Length < EIGHT_RESULT_LEN) + { + DateTime currentTime = DateTime.Now; + if (currentTime.Ticks - startTime.Ticks > Convert.ToInt32(TIMEOUT_SPAN)) + { + break; + } + } + + string[] LkOutput = comPort.builder.ToString().Trim().Split(','); + + if (measureCommand.Equals(LkOutput[0])) + { + if (LkOutput.Length < 2) + return; + + if (LkOutput[1].Contains("FFFF")) + { + valueA = float.NegativeInfinity; + } + else + { + valueA = Convert.ToSingle(LkOutput[1]); + } + if (LkOutput[2].Contains("FFFF")) + { + valueB = float.NegativeInfinity; + } + else + { + valueB = Convert.ToSingle(LkOutput[2]); + } + + } + else + { + valueA = float.PositiveInfinity; + valueB = float.PositiveInfinity; + } + } + } + + public class HlSensorWrapper + { + public SerialportWrapper comPort; + public const string READ_BOTH_HEAD_CMD = "%EE#RMA5**"; + public const string READ_HEAD_A_CMD = "%EE#RMD3**"; + public const string READ_HEAD_B_CMD = "%EE#RMD4**"; + public const string READ_ONE_HEAD_REPLY = "%EE$RMD"; + public const string READ_TWO_HEADS_REPLY = "%EE$RMA"; + public const int ONE_HEAD_RESULT_LEN = 21; + public const int TWO_HEAD_RESULT_LEN = 32; + public const int HEAD_A_RESULT_STARTINDEX = 7; + public const int HEAD_B_RESULT_STARTINDEX = 18; + public const int HEAD_RESULT_LENGTH = 11; + public const double TIMEOUT_SPAN = 3E7; + + public HlSensorWrapper() + { + comPort = new SerialportWrapper(); + comPort.Open(0, 115200, false); + } + + public void ComReadHead(int index, ref float value) + { + String measureCommand = ""; + + if (1 == index) + { + measureCommand = READ_HEAD_A_CMD; + } + else if (2 == index) + { + measureCommand = READ_HEAD_B_CMD; + } + + comPort.Send(measureCommand + "\r"); + comPort.Clear(); + + DateTime startTime = DateTime.Now; + while (comPort.builder.Length < ONE_HEAD_RESULT_LEN) + { + DateTime currentTime = DateTime.Now; + if (currentTime.Ticks - startTime.Ticks > Convert.ToInt32(TIMEOUT_SPAN)) + { + break; + } + } + + string HlOutput = comPort.builder.ToString().Trim(); + comPort.Clear(); + + if (HlOutput.Contains(READ_ONE_HEAD_REPLY)) + { + if (HlOutput.Contains("FFFF")) + { + value = float.NegativeInfinity; + } + else + { + value = Convert.ToSingle(HlOutput.Substring(HEAD_A_RESULT_STARTINDEX, HEAD_RESULT_LENGTH)); + } + } + else + { + value = float.PositiveInfinity; + } + } + + public void ComReadHeads(ref float valueA, ref float valueB) + { + string measureCommand = READ_BOTH_HEAD_CMD; + + comPort.Send(measureCommand + "\r"); + comPort.Clear(); + + DateTime startTime = DateTime.Now; + while (comPort.builder.Length < TWO_HEAD_RESULT_LEN) + { + DateTime currentTime = DateTime.Now; + if (currentTime.Ticks - startTime.Ticks > Convert.ToInt32(TIMEOUT_SPAN)) + { + break; + } + } + + string[] HlOutput = comPort.builder.ToString().Trim().Split(','); + + if (HlOutput[0].Contains(READ_TWO_HEADS_REPLY)) + { + valueA = Convert.ToSingle(HlOutput[0].Substring(HEAD_A_RESULT_STARTINDEX, HEAD_RESULT_LENGTH)); + valueB = Convert.ToSingle(HlOutput[0].Substring(HEAD_B_RESULT_STARTINDEX, HEAD_RESULT_LENGTH)); + } + else + { + valueA = float.PositiveInfinity; + valueB = float.PositiveInfinity; + } + } + } + + public class ZwSensorWrapper + { + public SocketTools st; + public IPAddress remoteIpAddr; + public int remotePort; + public const string READ_HEAD_A_CMD = "M"; + public const string READ_ERROR_REPLY = "ER"; + public const string READ_INVALID_REPLY = "----"; + public const int ONE_HEAD_RESULT_LEN = 21; + public const int TWO_HEAD_RESULT_LEN = 32; + public const int HEAD_A_RESULT_STARTINDEX = 7; + public const int HEAD_B_RESULT_STARTINDEX = 18; + public const int HEAD_RESULT_LENGTH = 11; + public const double TIMEOUT_SPAN = 3E7; + + public ZwSensorWrapper(string remoteIpAddr, int remotePort) + { + this.remoteIpAddr = IPAddress.Parse(remoteIpAddr); + this.remotePort = remotePort; + + st = new SocketTools(9600, this.remotePort, this.remoteIpAddr, new System.Net.IPAddress(0)); + } + + public void ComReadHead(int index, ref float value) + { + string str = ""; + + str = READ_HEAD_A_CMD + "\r"; + + st.SendAndReceiveMessage(remoteIpAddr, 9600, ref str); + + if (!str.Contains(READ_ERROR_REPLY)) + { + if (str.Contains(READ_INVALID_REPLY)) + { + value = float.NegativeInfinity; + } + else + { + value = Convert.ToSingle(str) / 1000000; + } + } + else + { + value = float.PositiveInfinity; + } + } + + public void ComReadHeads(ref float valueA, ref float valueB) + { + ComReadHead(0, ref valueA); + valueB = valueA; + } + + } +} \ No newline at end of file diff --git a/HalconTools/ToolKit/Log.cs b/HalconTools/ToolKit/Log.cs new file mode 100644 index 0000000..b5dec9b --- /dev/null +++ b/HalconTools/ToolKit/Log.cs @@ -0,0 +1,5 @@ +锘縩amespace HalconTools +{ + public delegate void Log(string content, LogType type); +} + diff --git a/HalconTools/ToolKit/LogManager.cs b/HalconTools/ToolKit/LogManager.cs new file mode 100644 index 0000000..52783b8 --- /dev/null +++ b/HalconTools/ToolKit/LogManager.cs @@ -0,0 +1,179 @@ +锘縰sing System; +using System.IO; +using System.Text; + +namespace HalconTools +{ + public sealed class LogManager : IDisposable + { + private Type _componentType; + private FileStream _fs; + private string _logfile; + private static object mutext = new object(); + public Log WriteLog; + + private LogManager() + { + this.WriteLog = new Log(this.PrepareLogFile); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.OpenStream)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendLocalTime)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendSeperator)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendComponentType)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendSeperator)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendType)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendSeperator)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendContent)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendNewLine)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.CloseStream)); + } + + public LogManager(Type type, string file) : this() + { + this._logfile = file; + this._componentType = type; + } + + private void AppendComponentType(string content, LogType type) + { + byte[] bytes = Encoding.Default.GetBytes((this._componentType == null) ? "" : this._componentType.ToString()); + this._fs.Write(bytes, 0, bytes.Length); + } + + private void AppendContent(string content, LogType type) + { + byte[] bytes = Encoding.Default.GetBytes(content); + this._fs.Write(bytes, 0, bytes.Length); + } + + private void AppendLocalTime(string content, LogType type) + { + string s = DateTime.Now.ToLocalTime().ToString(); + byte[] bytes = Encoding.Default.GetBytes(s); + this._fs.Write(bytes, 0, bytes.Length); + } + + private void AppendNewLine(string content, LogType type) + { + byte[] bytes = Encoding.Default.GetBytes("\r\n"); + this._fs.Write(bytes, 0, bytes.Length); + } + + private void AppendSeperator(string content, LogType type) + { + byte[] bytes = Encoding.Default.GetBytes(" | "); + this._fs.Write(bytes, 0, bytes.Length); + } + + private void AppendType(string content, LogType type) + { + string s = string.Empty; + switch (type) + { + case LogType.Debug: + s = "Debug"; + break; + + case LogType.Trace: + s = "Trace"; + break; + + case LogType.Info: + s = "Info"; + break; + + case LogType.Warn: + s = "Warn"; + break; + + case LogType.Error: + s = "Error"; + break; + + default: + s = ""; + break; + } + byte[] bytes = Encoding.Default.GetBytes(s); + this._fs.Write(bytes, 0, bytes.Length); + } + + private void AppendUTCTime(string content, LogType type) + { + string s = DateTime.Now.ToUniversalTime().ToString(); + byte[] bytes = Encoding.Default.GetBytes(s); + this._fs.Write(bytes, 0, bytes.Length); + } + + private void CloseStream(string content, LogType type) + { + this._fs.Close(); + this._fs.Dispose(); + } + + public void Dispose() + { + if (this._fs != null) + { + this._fs.Dispose(); + } + GC.SuppressFinalize(this); + } + + ~LogManager() + { + if (this._fs != null) + { + this._fs.Dispose(); + } + } + + private void OpenStream(string content, LogType type) + { + this._fs = File.Open(this._logfile, FileMode.Append); + } + + private void PrepareLogFile(string content, LogType type) + { + lock (mutext) + { + if (!File.Exists(this._logfile)) + { + using (File.Create(this._logfile)) + { + } + } + } + } + + public void UseLocalTime() + { + this.WriteLog = new Log(this.PrepareLogFile); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.OpenStream)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendLocalTime)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendSeperator)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendComponentType)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendSeperator)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendType)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendSeperator)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendContent)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendNewLine)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.CloseStream)); + } + + public void UseUTCTime() + { + this.WriteLog = new Log(this.PrepareLogFile); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.OpenStream)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendUTCTime)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendSeperator)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendComponentType)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendSeperator)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendType)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendSeperator)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendContent)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.AppendNewLine)); + this.WriteLog = (Log) Delegate.Combine(this.WriteLog, new Log(this.CloseStream)); + } + } +} + diff --git a/HalconTools/ToolKit/LogType.cs b/HalconTools/ToolKit/LogType.cs new file mode 100644 index 0000000..d4355a0 --- /dev/null +++ b/HalconTools/ToolKit/LogType.cs @@ -0,0 +1,12 @@ +锘縩amespace HalconTools +{ + public enum LogType + { + Debug, + Trace, + Info, + Warn, + Error + } +} + diff --git a/HalconTools/ToolKit/NetWorkTool.cs b/HalconTools/ToolKit/NetWorkTool.cs new file mode 100644 index 0000000..2ad9e96 --- /dev/null +++ b/HalconTools/ToolKit/NetWorkTool.cs @@ -0,0 +1,20 @@ +锘縰sing System.Net.NetworkInformation; +using System.Text; + +namespace HalconTools +{ + public class NetWorkTool + { + public bool Ping(string ip) + { + System.Net.NetworkInformation.Ping ping = new System.Net.NetworkInformation.Ping(); + PingOptions options = new PingOptions(); + options.DontFragment = true; + string s = "Test Data"; + byte[] bytes = Encoding.ASCII.GetBytes(s); + int timeout = 0x3e8; + return (ping.Send(ip, timeout, bytes, options).Status == IPStatus.Success); + } + } +} + diff --git a/HalconTools/ToolKit/SerialPort.cs b/HalconTools/ToolKit/SerialPort.cs new file mode 100644 index 0000000..bdcbb49 --- /dev/null +++ b/HalconTools/ToolKit/SerialPort.cs @@ -0,0 +1,177 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; +using System.Windows.Forms; +using System.IO.Ports; +using System.Text.RegularExpressions; + +namespace HalconTools +{ + public class SerialportWrapper + { + private SerialPort comm = new SerialPort(); + string[] ports; + private long received_count = 0;//鎺ユ敹璁℃暟 + private long send_count = 0;//鍙戦�佽鏁� + + public StringBuilder builder = new StringBuilder();//閬垮厤鍦ㄤ簨浠跺鐞嗘柟娉曚腑鍙嶅鐨勫垱寤猴紝瀹氫箟鍒板闈€�� + + private bool flagHexDisplay = false; + private bool flagSendNewLine = false; + + public SerialportWrapper() + { + //鍒濆鍖栦笅鎷変覆鍙e悕绉板垪琛ㄦ + ports = SerialPort.GetPortNames(); + Array.Sort(ports); + + //鍒濆鍖朣erialPort瀵硅薄 + comm.NewLine = "/r/n"; + comm.RtsEnable = true;//鏍规嵁瀹為檯鎯呭喌鍚с�� + //娣诲姞浜嬩欢娉ㄥ唽 + comm.DataReceived += comm_DataReceived; + } + + void comm_DataReceived(object sender, SerialDataReceivedEventArgs e) + { + int n = comm.BytesToRead;//鍏堣褰曚笅鏉ワ紝閬垮厤鏌愮鍘熷洜锛屼汉涓虹殑鍘熷洜锛屾搷浣滃嚑娆′箣闂存椂闂撮暱锛岀紦瀛樹笉涓�鑷� + byte[] buf = new byte[n];//澹版槑涓�涓复鏃舵暟缁勫瓨鍌ㄥ綋鍓嶆潵鐨勪覆鍙f暟鎹� + received_count += n;//澧炲姞鎺ユ敹璁℃暟 + comm.Read(buf, 0, n);//璇诲彇缂撳啿鏁版嵁 + //builder.Remove(0, builder.Length);//娓呴櫎瀛楃涓叉瀯閫犲櫒鐨勫唴瀹� + + //鍥犱负瑕佽闂畊i璧勬簮锛屾墍浠ラ渶瑕佷娇鐢╥nvoke鏂瑰紡鍚屾ui銆� + if (flagHexDisplay) + { + //渚濇鐨勬嫾鎺ュ嚭16杩涘埗瀛楃涓� + foreach (byte b in buf) + { + builder.Append(b.ToString("X2") + " "); + } + } + else + { + //鐩存帴鎸堿SCII瑙勫垯杞崲鎴愬瓧绗︿覆 + builder.Append(Encoding.ASCII.GetString(buf)); + } + } + + public void Open(string portName, int baudRate, bool hexDisplay) + { + bool flagPortExists = false; + + foreach (string port in ports) + { + if (port.Equals(portName)) + { + flagPortExists = true; + } + } + + if (!flagPortExists) + { + MessageBox.Show("鎸囧畾涓插彛(%s)涓嶅瓨鍦�", portName); + } + + comm.PortName = portName; + comm.BaudRate = baudRate; + this.flagHexDisplay = hexDisplay; + + try + { + comm.Open(); + } + catch (Exception ex) + { + //鎹曡幏鍒板紓甯镐俊鎭紝鍒涘缓涓�涓柊鐨刢omm瀵硅薄锛屼箣鍓嶇殑涓嶈兘鐢ㄤ簡銆� + comm = new SerialPort(); + //鐜板疄寮傚父淇℃伅缁欏鎴枫�� + MessageBox.Show(ex.Message); + } + } + + public void Open(int index, int baudRate, bool hexDisplay) + { + if (index > ports.Length) + { + MessageBox.Show("鎸囧畾涓插彛(%d)涓嶅瓨鍦�", index.ToString()); + } + + comm.PortName = ports[index]; + comm.BaudRate = baudRate; + this.flagHexDisplay = hexDisplay; + + try + { + comm.Open(); + } + catch (Exception ex) + { + //鎹曡幏鍒板紓甯镐俊鎭紝鍒涘缓涓�涓柊鐨刢omm瀵硅薄锛屼箣鍓嶇殑涓嶈兘鐢ㄤ簡銆� + comm = new SerialPort(); + //鐜板疄寮傚父淇℃伅缁欏鎴枫�� + MessageBox.Show(ex.Message); + } + } + + + public void Close() + { + //鏍规嵁褰撳墠涓插彛瀵硅薄锛屾潵鍒ゆ柇鎿嶄綔 + if (comm.IsOpen) + { + //鎵撳紑鏃剁偣鍑伙紝鍒欏叧闂覆鍙� + comm.Close(); + } + } + + public void Send(string content) + { + //瀹氫箟涓�涓彉閲忥紝璁板綍鍙戦�佷簡鍑犱釜瀛楄妭 + int n = 0; + //16杩涘埗鍙戦�� + if (flagHexDisplay) + { + //鎴戜滑涓嶇瑙勫垯浜嗐�傚鏋滃啓閿欎簡涓�浜涳紝鎴戜滑鍏佽鐨勶紝鍙敤姝e垯寰楀埌鏈夋晥鐨勫崄鍏繘鍒舵暟 + MatchCollection mc = Regex.Matches(content, @"(?i)[/da-f]{2}"); + List<byte> buf = new List<byte>();//濉厖鍒拌繖涓复鏃跺垪琛ㄤ腑 + //渚濇娣诲姞鍒板垪琛ㄤ腑 + foreach (Match m in mc) + { + buf.Add(byte.Parse(m.Value)); + } + //杞崲鍒楄〃涓烘暟缁勫悗鍙戦�� + comm.Write(buf.ToArray(), 0, buf.Count); + //璁板綍鍙戦�佺殑瀛楄妭鏁� + n = buf.Count; + } + else//ascii缂栫爜鐩存帴鍙戦�� + { + //鍖呭惈鎹㈣绗� + if (flagSendNewLine) + { + comm.WriteLine(content); + n = content.Length + 2; + } + else//涓嶅寘鍚崲琛岀 + { + comm.Write(content); + n = content.Length; + } + } + send_count += n;//绱姞鍙戦�佸瓧鑺傛暟 + } + + public void Reset() + { + //澶嶄綅鎺ュ彈鍜屽彂閫佺殑瀛楄妭鏁拌鏁板櫒骞舵洿鏂扮晫闈€�� + send_count = received_count = 0; + builder.Remove(0, builder.Length); + } + + public void Clear() + { + builder.Remove(0, builder.Length); + } + } +} \ No newline at end of file diff --git a/HalconTools/ToolKit/SerializeFileTool.cs b/HalconTools/ToolKit/SerializeFileTool.cs new file mode 100644 index 0000000..e63ed5a --- /dev/null +++ b/HalconTools/ToolKit/SerializeFileTool.cs @@ -0,0 +1,70 @@ +锘縰sing System; +using System.IO; +using System.Text; + +namespace HalconTools +{ + public class SerializeFileTool<T> + { + public T GetConfig(string fileName) + { + T local = default(T); + byte[] bStr = null; + if (this.ReadBytes(fileName, out bStr) == FileOperationResult.OK) + { + local = SerializeTool<T>.XmlSerializerDeserialize(bStr); + } + return local; + } + + private FileOperationResult ReadBytes(string path, out byte[] bStr) + { + bStr = null; + if (!File.Exists(path)) + { + return FileOperationResult.NOTEXIST; + } + try + { + using (FileStream stream = new FileStream(path, FileMode.Open, FileAccess.ReadWrite)) + { + bStr = new byte[stream.Length]; + stream.Read(bStr, 0, bStr.Length); + } + } + catch + { + return FileOperationResult.WRITEERROR; + } + return FileOperationResult.OK; + } + + public void SetConfig(string fileName, T config) + { + this.WriteBytes(fileName, FileMode.Create, SerializeTool<T>.XmlSerializerSerialize(config)); + } + + private FileOperationResult WriteBytes(string path, FileMode filemode, byte[] bStr) + { + try + { + using (FileStream stream = new FileStream(path, filemode, FileAccess.ReadWrite)) + { + stream.Write(bStr, 0, bStr.Length); + } + } + catch (Exception) + { + return FileOperationResult.WRITEERROR; + } + return FileOperationResult.OK; + } + + private FileOperationResult WriteString(string path, FileMode filemode, string str) + { + byte[] bytes = Encoding.Default.GetBytes(str); + return this.WriteBytes(path, filemode, bytes); + } + } +} + diff --git a/HalconTools/ToolKit/SerializeTool.cs b/HalconTools/ToolKit/SerializeTool.cs new file mode 100644 index 0000000..33cb6d2 --- /dev/null +++ b/HalconTools/ToolKit/SerializeTool.cs @@ -0,0 +1,46 @@ +锘縰sing System.IO; +using System.Runtime.Serialization.Formatters.Soap; +using System.Xml.Serialization; + +namespace HalconTools +{ + public class SerializeTool<T> + { + public static T SoapFormatterDeserialize(byte[] data) + { + using (MemoryStream stream = new MemoryStream(data)) + { + SoapFormatter formatter = new SoapFormatter(); + return (T) formatter.Deserialize(stream); + } + } + + public static byte[] SoapFormatterSerialize(T obj) + { + using (MemoryStream stream = new MemoryStream()) + { + new SoapFormatter().Serialize(stream, obj); + return stream.ToArray(); + } + } + + public static T XmlSerializerDeserialize(byte[] data) + { + using (MemoryStream stream = new MemoryStream(data)) + { + XmlSerializer serializer = new XmlSerializer(typeof(T)); + return (T) serializer.Deserialize(stream); + } + } + + public static byte[] XmlSerializerSerialize(T obj) + { + using (MemoryStream stream = new MemoryStream()) + { + new XmlSerializer(typeof(T)).Serialize((Stream) stream, obj); + return stream.ToArray(); + } + } + } +} + diff --git a/HalconTools/ToolKit/SocketTools.cs b/HalconTools/ToolKit/SocketTools.cs new file mode 100644 index 0000000..f9835a7 --- /dev/null +++ b/HalconTools/ToolKit/SocketTools.cs @@ -0,0 +1,348 @@ +锘縰sing System; +using System.Net; +using System.Net.Sockets; +using System.Text; + +namespace HalconTools +{ + public class SocketTools + { + private int clientPort; + private NetworkStream clientStream; + private TcpListener listener; + private int listenPort; + private IPAddress localIp; + private LogManager loger = new LogManager(Type.GetType("Vision.Socket"), Environment.CurrentDirectory + @"\Socket.log"); + private TcpClient remoteClient; + private IPAddress remoteIp; + private NetworkStream remoteStream; + + public SocketTools(int listenPort, int clientPort, IPAddress remoteIp, IPAddress localIp) + { + this.remoteIp = remoteIp; + this.listenPort = listenPort; + this.clientPort = clientPort; + this.listener = new TcpListener(localIp, listenPort); + this.LocalIp = localIp; + } + + public void CloseAll() + { + this.CloseListener(); + } + + public void CloseListener() + { + if (this != null) + { + if (this.remoteStream != null) + { + this.remoteStream.Close(); + this.remoteStream.Dispose(); + } + if (this.remoteClient != null) + { + this.remoteClient.Close(); + this.remoteClient = null; + } + if (this.listener != null) + { + this.listener.Stop(); + this.listener = null; + } + } + } + + protected string GetIP() + { + IPAddress[] hostAddresses = Dns.GetHostAddresses(Dns.GetHostName()); + for (int i = 0; i < hostAddresses.Length; i++) + { + if (hostAddresses[i].ToString().Length > 3) + { + return hostAddresses[i].ToString(); + } + } + return ""; + } + + public void Listening(ListenEventCreater creater) + { + this.listener.Start(); + while (true) + { + try + { + if (this.listener == null) + { + this.listener = new TcpListener(this.LocalIp, this.listenPort); + this.listener.Start(); + } + this.remoteClient = this.listener.AcceptTcpClient(); + this.remoteStream = this.remoteClient.GetStream(); + if (this.remoteStream.CanRead) + { + byte[] buffer = new byte[this.remoteClient.ReceiveBufferSize]; + this.remoteStream.Read(buffer, 0, this.remoteClient.ReceiveBufferSize); + string str = Encoding.Default.GetString(buffer); + if (str.Contains("CLOSELISTENER")) + { + return; + } + EventData iData = new EventData(str.Trim(new char[1])); + creater.ChangeValue(iData); + } + } + catch (Exception exception) + { + this.loger.WriteLog(string.Concat(new object[] { "鐩戝惉闂锛�", exception.Source, exception.TargetSite, exception.ToString(), "\r\n" }), LogType.Info); + } + finally + { + if (this.remoteStream != null) + { + this.remoteStream.Close(); + this.remoteStream.Dispose(); + } + if (this.remoteClient != null) + { + this.remoteClient.Close(); + } + } + } + } + + public bool SendMessage(string messsge) + { + return this.SendMessage(this.remoteIp, this.clientPort, messsge); + } + + public bool SendMessage(IPAddress ip, int port, string messsge) + { + bool flag; + TcpClient client = new TcpClient(); + NetworkStream stream = null; + try + { + client.Connect(ip, port); + stream = client.GetStream(); + if (stream.CanWrite) + { + byte[] bytes = Encoding.ASCII.GetBytes(messsge + "\r\n"); + stream.Write(bytes, 0, bytes.Length); + return true; + } + flag = false; + } + catch (Exception exception) + { + this.loger.WriteLog(string.Concat(new object[] { "鍙戦�丼ocket鏁版嵁闂锛�", exception.Source, exception.TargetSite, exception.ToString(), "\r\n" }), LogType.Info); + flag = false; + } + finally + { + if (stream != null) + { + stream.Close(); + } + if (client != null) + { + client.Close(); + } + } + return flag; + } + + System.Threading.Thread receiveThread; + NetworkStream stm = null; + + public bool SendAndReceiveMessage(IPAddress ip, int port, ref string messsge) + { + bool flag = false; + TcpClient tcpClient = new TcpClient(); + + int i = 0; + int sleepInterval = 100; + + try + { + //tcpClient = TimeOutSocket.TryConnect(new IPEndPoint(ip, port), 3000);// new TcpClient(); + tcpClient.Connect(ip, port); + stm = tcpClient.GetStream(); + //receiveThread = new System.Threading.Thread(ReceiveMessage); + //receiveThread.Start(); + + if (stm.CanWrite) + { + byte[] bytes = Encoding.ASCII.GetBytes(messsge + "\n"); + byte[] readBytes = new byte[40]; + + stm.Write(bytes, 0, bytes.Length); + stm.Read(readBytes, 0, readBytes.Length); + + messsge = Encoding.GetEncoding("gb2312").GetString(readBytes); + } + } + catch (Exception exception) + { + this.loger.WriteLog(string.Concat(new object[] { "鍙戦�佹帴鏀禨ocket鏁版嵁闂锛�", exception.Source, exception.TargetSite, exception.ToString(), "\r\n" }), LogType.Info); + flag = false; + } + finally + { + if (stm != null) + { + stm.Close(); + } + if (tcpClient != null) + { + tcpClient.Close(); + } + } + return flag; + } + + // 鎺ユ敹娑堟伅鏂规硶 + private void ReceiveMessage() + { + IPEndPoint remoteIpEndPoint = new IPEndPoint(IPAddress.Any, 0); + while (true) + { + try + { + // 鍏抽棴receiveUdpClient鏃舵鏃朵細浜х敓寮傚父 + Encoding gb2312 = Encoding.GetEncoding("gb2312");//Encoding.Default ,936 + byte[] receiveBytes; + byte[] tcpreceiveBytes = new byte[4096]; + int count = 0; + + + //if (netSelected == 0) + //{ + // receiveBytes = receiveUpdClient.Receive(ref remoteIpEndPoint); + //} + //else + { + + count = stm.Read(tcpreceiveBytes, 0, 2048); + receiveBytes = tcpreceiveBytes; + + } + + string message = gb2312.GetString(receiveBytes); + + // 鏄剧ず娑堟伅鍐呭 + //ShowMessageforView(texboxMessageView, string.Format("{0}", message)); + + } + catch (Exception exception) + { + break; + } + } + } + + + public void Stop() + { + this.SendMessage(this.localIp, this.listenPort, "CLOSELISTENER"); + } + + public int ClientPort + { + get + { + return this.clientPort; + } + set + { + this.clientPort = value; + } + } + + public NetworkStream ClientStream + { + get + { + return this.clientStream; + } + set + { + this.clientStream = value; + } + } + + public int ListenPort + { + get + { + return this.listenPort; + } + set + { + this.listenPort = value; + } + } + + public TcpListener Listerner + { + get + { + return this.listener; + } + set + { + this.listener = value; + } + } + + public IPAddress LocalIp + { + get + { + return this.localIp; + } + set + { + this.localIp = value; + } + } + + public TcpClient RemoteClient + { + get + { + return this.remoteClient; + } + set + { + this.remoteClient = value; + } + } + + public IPAddress RemoteIp + { + get + { + return this.remoteIp; + } + set + { + this.remoteIp = value; + } + } + + public NetworkStream RemoteStream + { + get + { + return this.remoteStream; + } + set + { + this.remoteStream = value; + } + } + } +} + diff --git a/HalconTools/ToolKit/StarterTool.cs b/HalconTools/ToolKit/StarterTool.cs new file mode 100644 index 0000000..d64627a --- /dev/null +++ b/HalconTools/ToolKit/StarterTool.cs @@ -0,0 +1,76 @@ +锘縰sing System.Diagnostics; +using System.Threading; + +namespace HalconTools +{ + public class StarterTool + { + public static bool IsExistMutex(string mutexName, out Mutex mutex) + { + bool flag; + mutex = new Mutex(true, mutexName, out flag); + return !flag; + } + + public static bool IsSingle() + { + return (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length <= 1); + } + + public static void PowerWait(string[] args) + { + if ((((args != null) && (args.Length > 1)) && args[0].ToUpper().Equals("-S")) && (args[1] != null)) + { + int result = 0; + if (int.TryParse(args[1], out result) && (result > 0)) + { + Thread.Sleep((int) (result * 0x3e8)); + } + } + } + + //private void Form1_Load(object sender, EventArgs e) + //{ + + // string appPath = @"C:\Program Files\KEPServerEx\servermain.exe E:\MacBookTest_F2\Kep_F2.opf"; + // int sleepTime = 200; + // bool isVisible = false; + + // KillApp(appPath); + // ShowWindow(appPath, sleepTime, isVisible); + //} + + public static void ShowWindow(string appPathNargs, int sleepTime, bool isVisible) + { + int exeStart = appPathNargs.IndexOf(".exe", 0); + string appPath = appPathNargs.Substring(0, exeStart + 4); + string args = appPathNargs.Substring(exeStart + 5); + + System.Diagnostics.Process p = System.Diagnostics.Process.Start(appPath, args); + + System.Threading.Thread.Sleep(sleepTime); + string name = p.MainWindowTitle; + + System.IntPtr ptr = HalconTools.Win32API.FindWindow(null, name); + HalconTools.Win32API.ShowWindow(ptr, System.Convert.ToInt32(isVisible)); + } + + public static void KillApp(string appPath) + { + int exeStart = appPath.IndexOf(".exe", 0); + + string[] appNames = appPath.Substring(0, exeStart).Split('\\'); + string appName = appNames[appNames.Length - 1]; + + System.Diagnostics.Process[] pList = System.Diagnostics.Process.GetProcesses(); + foreach (System.Diagnostics.Process item in pList) + { + if (item.ProcessName.ToUpper().Equals(appName.ToUpper())) + { + item.Kill(); + } + } + } + } +} + diff --git a/HalconTools/ToolKit/StyleSetTools.cs b/HalconTools/ToolKit/StyleSetTools.cs new file mode 100644 index 0000000..eeb82cd --- /dev/null +++ b/HalconTools/ToolKit/StyleSetTools.cs @@ -0,0 +1,77 @@ +锘縰sing System.Drawing; +using System.Windows.Forms; + +namespace HalconTools +{ + public class StyleSetTools + { + public void SetCellColor(DataGridView dgv, int rowIndex, int columnIndex, Color col, Color back) + { + DataGridViewCellStyle style = new DataGridViewCellStyle(); + style.ForeColor = col; + style.SelectionForeColor = col; + style.BackColor = back; + style.SelectionBackColor = back; + style.Font = new Font("Arial", 10f, FontStyle.Bold); + dgv.Rows[rowIndex].Cells[columnIndex].Style = style; + } + + public void SetColumnColor(DataGridView dgv, int colIndex, Color col, Color back) + { + DataGridViewCellStyle style = new DataGridViewCellStyle(); + style.ForeColor = col; + style.SelectionForeColor = col; + style.BackColor = back; + style.SelectionBackColor = back; + style.Font = new Font("Arial", 10f, FontStyle.Bold); + dgv.Columns[colIndex].DefaultCellStyle = style; + } + + public void SetColumnWidth(DataGridView dgv, int colIndex, int width) + { + dgv.Columns[colIndex].Width = width; + } + + public void SetDefaultView(DataGridView dgv, int width, int height, int x, int y) + { + dgv.GridColor = Color.BlueViolet; + dgv.BorderStyle = BorderStyle.Fixed3D; + dgv.CellBorderStyle = DataGridViewCellBorderStyle.Sunken; + dgv.RowHeadersBorderStyle = DataGridViewHeaderBorderStyle.Sunken; + dgv.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.Sunken; + dgv.DefaultCellStyle.BackColor = Color.White; + dgv.DefaultCellStyle.SelectionBackColor = Color.White; + dgv.DefaultCellStyle.SelectionForeColor = Color.Black; + dgv.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter; + dgv.AllowUserToAddRows = false; + dgv.AllowUserToDeleteRows = false; + dgv.AllowUserToOrderColumns = true; + dgv.AllowUserToResizeColumns = false; + dgv.AllowUserToResizeRows = false; + dgv.ReadOnly = true; + dgv.RowHeadersVisible = false; + dgv.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing; + dgv.ScrollBars = ScrollBars.Vertical; + dgv.ShowEditingIcon = false; + dgv.BackgroundColor = SystemColors.Control; + dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + dgv.ColumnHeadersVisible = false; + dgv.MultiSelect = false; + dgv.AutoGenerateColumns = true; + dgv.Location = new Point(x, y); + dgv.Size = new Size(width, height); + } + + public void SetRowColor(DataGridView dgv, int rowIndex, Color col, Color back) + { + DataGridViewCellStyle style = new DataGridViewCellStyle(); + style.ForeColor = col; + style.SelectionForeColor = col; + style.BackColor = back; + style.SelectionBackColor = back; + style.Font = new Font("Arial", 10f, FontStyle.Bold); + dgv.Rows[rowIndex].DefaultCellStyle = style; + } + } +} + diff --git a/HalconTools/ToolKit/Win32API.cs b/HalconTools/ToolKit/Win32API.cs new file mode 100644 index 0000000..002f1aa --- /dev/null +++ b/HalconTools/ToolKit/Win32API.cs @@ -0,0 +1,132 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; +using System.Runtime.InteropServices; + +/******************************************************************************** +* 璧勬枡鏀堕泦:Jonny Sun ,www.csframework.com +* ******************************************************************************/ + +namespace HalconTools +{ + /// <summary> + /// 鎿嶄綔Windows绐椾綋,绯荤粺鎵樼洏鎵�鐢ㄧ殑API鍑芥暟 + /// </summary> + public class Win32API + { + public const int WM_USER = 0x400; + public const int WM_CLOSE = 0x10; + public const int WM_GETTEXT = 0x000D; + public const int WM_SETTEXT = 0x000C; + + public const int STANDARD_RIGHTS_REQUIRED = 0xF0000; + public const int SYNCHRONIZE = 0x100000; + public const int PROCESS_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0xFFF; + public const int PROCESS_TERMINATE = 0x1; + + public const int PROCESS_VM_OPERATION = 0x8; + public const int PROCESS_VM_READ = 0x10; + public const int PROCESS_VM_WRITE = 0x20; + + public const int MEM_RESERVE = 0x2000; + public const int MEM_COMMIT = 0x1000; + public const int MEM_RELEASE = 0x8000; + + public const int PAGE_READWRITE = 0x4; + + public const int TB_BUTTONCOUNT = (WM_USER + 24); + public const int TB_HIDEBUTTON = (WM_USER + 4); + public const int TB_GETBUTTON = (WM_USER + 23); + public const int TB_GETBUTTONTEXT = WM_USER + 75; + public const int TB_GETBITMAP = (WM_USER + 44); + public const int TB_DELETEBUTTON = (WM_USER + 22); + public const int TB_ADDBUTTONS = (WM_USER + 20); + public const int TB_INSERTBUTTON = (WM_USER + 21); + public const int TB_ISBUTTONHIDDEN = (WM_USER + 12); + public const int ILD_NORMAL = 0x0; + public const int TPM_NONOTIFY = 0x80; + + public const int WS_VISIBLE = 268435456;//绐椾綋鍙 + public const int WS_MINIMIZEBOX = 131072;//鏈夋渶灏忓寲鎸夐挳 + public const int WS_MAXIMIZEBOX = 65536;//鏈夋渶澶у寲鎸夐挳 + public const int WS_BORDER = 8388608;//绐椾綋鏈夎竟妗� + public const int GWL_STYLE = (-16);//绐椾綋鏍峰紡 + public const int GW_HWNDFIRST = 0; + public const int GW_HWNDNEXT = 2; + public const int SW_HIDE = 0; + public const int SW_SHOW = 5; + + [DllImport("User32.Dll")] + public static extern void GetClassName(IntPtr hwnd, StringBuilder s, int nMaxCount); + + [DllImport("user32.dll", EntryPoint = "SetForegroundWindow", SetLastError = true)] + public static extern void SetForegroundWindow(IntPtr hwnd); + + [DllImport("user32.dll", EntryPoint = "GetDlgItem", SetLastError = true)] + public static extern IntPtr GetDlgItem(int nID, IntPtr phWnd); + + [DllImport("user32.dll", CharSet = CharSet.Auto)] + public static extern int RegisterWindowMessage(string msg); + + [DllImport("kernel32", EntryPoint = "OpenProcess")] + public static extern IntPtr OpenProcess(int dwDesiredAccess, IntPtr bInheritHandle, IntPtr dwProcessId); + + [DllImport("kernel32", EntryPoint = "CloseHandle")] + public static extern int CloseHandle(IntPtr hObject); + + [DllImport("user32", EntryPoint = "GetWindowThreadProcessId")] + public static extern IntPtr GetWindowThreadProcessId(IntPtr hwnd, ref IntPtr lpdwProcessId); + + [DllImport("user32.dll")] + public static extern bool PostMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam); + + [DllImport("user32", EntryPoint = "SendMessage")] + public static extern int SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); + + [DllImport("user32", EntryPoint = "SendMessage")] + public static extern int SendMessage(IntPtr hwnd, int wMsg, int wParam, IntPtr lParam); + + [DllImport("kernel32", EntryPoint = "ReadProcessMemory")] + public static extern int ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, ref IntPtr lpBuffer, int nSize, int lpNumberOfBytesWritten); + + [DllImport("kernel32.dll", EntryPoint = "ReadProcessMemory")] + public static extern bool ReadProcessMemoryEx(IntPtr hProcess, IntPtr lpBaseAddress, IntPtr lpBuffer, int nSize, ref uint vNumberOfBytesRead); + + [DllImport("kernel32", EntryPoint = "ReadProcessMemory")] + public static extern int ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, int nSize, int lpNumberOfBytesWritten); + + [DllImport("kernel32", EntryPoint = "WriteProcessMemory")] + public static extern int WriteProcessMemory(IntPtr hProcess, ref int lpBaseAddress, ref int lpBuffer, int nSize, ref int lpNumberOfBytesWritten); + + [DllImport("kernel32", EntryPoint = "VirtualAllocEx")] + public static extern IntPtr VirtualAllocEx(IntPtr hProcess, int lpAddress, int dwSize, int flAllocationType, int flProtect); + + [DllImport("kernel32", EntryPoint = "VirtualFreeEx")] + public static extern int VirtualFreeEx(IntPtr hProcess, IntPtr lpAddress, int dwSize, int dwFreeType); + + [DllImport("User32.dll")] + public extern static int GetWindow(int hWnd, int wCmd); + + [DllImport("User32.dll")] + public extern static int GetWindowLongA(int hWnd, int wIndx); + + [DllImport("user32.dll")] + public static extern bool GetWindowText(int hWnd, StringBuilder title, int maxBufSize); + + [DllImport("user32.dll", CharSet = CharSet.Auto)] + public extern static int GetWindowTextLength(IntPtr hWnd); + + [DllImport("User32.dll", EntryPoint = "FindWindow")] + public static extern IntPtr FindWindow(string lpClassName, string lpWindowName); + + [DllImport("user32.dll", EntryPoint = "FindWindowEx", SetLastError = true)] + public static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow); + + [DllImport("user32.dll", EntryPoint = "ShowWindow", SetLastError = true)] + public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow); + + [DllImport("user32.dll", EntryPoint = "SendMessageA")] + public static extern int SendMessage(IntPtr hwnd, int wMsg, IntPtr wParam, IntPtr lParam); + + } +} diff --git a/HalconTools/ViewROI/FunctionPlot.cs b/HalconTools/ViewROI/FunctionPlot.cs new file mode 100644 index 0000000..b4a1f12 --- /dev/null +++ b/HalconTools/ViewROI/FunctionPlot.cs @@ -0,0 +1,562 @@ +using System; +using System.Drawing; +using System.Windows.Forms; +using HalconDotNet; + + +namespace HalconTools +{ + /// <summary> + /// This class allows you to print a function into a Windows.Forms.Control. + /// The function must be supplied as an array of either double, float or + /// int values. When initializing the class you must provide the control that + /// actually draws the function plot. During the initialization you + /// can also decide whether the mouse event is used to return the (x,y) + /// coordinates of the plotted function. The scaling + /// of the x-y axis is performed automatically and depent on the length + /// of the function as well as the settings for the y-axis scaling: + /// * AXIS_RANGE_FIXED + /// * AXIS_RANGE_INCREASING + /// * AXIS_RANGE_ADAPTING + /// + /// Constraints of the function plot class: + /// So far only functions containing a positive range of y-values can + /// be plotted correctly. Also only a positive and ascending x-range + /// can be plotted. The origin of the coordinate system is set to + /// be in the lower left corner of the control. Another definition + /// of the origin and hence the direction of the coordinate axis + /// is not implemented yet. + /// </summary> + public class FunctionPlot + { + // panels for display + private Graphics gPanel, backBuffer; + + // graphical settings + private Pen pen, penCurve, penCursor; + private SolidBrush brushCS, brushFuncPanel; + private Font drawFont; + private StringFormat format; + private Bitmap functionMap; + + // dimensions of panels + private float panelWidth; + private float panelHeight; + private float margin; + + // origin + private float originX; + private float originY; + + private PointF[] points; + private HFunction1D func; + + // axis + private int axisAdaption; + private float axisXLength; + private float axisYLength; + private float scaleX, scaleY; + + public const int AXIS_RANGE_FIXED = 3; + public const int AXIS_RANGE_INCREASING = 4; + public const int AXIS_RANGE_ADAPTING = 5; + + int PreX, BorderRight, BorderTop; + + + /// <summary> + /// Initializes a FunctionPlot instance by providing a GUI control + /// and a flag specifying the mouse interaction mode. + /// The control is used to determine the available space to draw + /// the axes and to plot the supplied functions. Depending on the + /// available space, the values of the function as well as the axis + /// steps are adjusted (scaled) to fit into the visible part of the + /// control. + /// </summary> + /// <param name="panel"> + /// An instance of the Windows.Forms.Control to plot the + /// supplied functions in + /// </param> + /// <param name="useMouseHandle"> + /// Flag that specifies whether or not mouse interaction should + /// be used to create a navigation bar for the plotted function + /// </param> + public FunctionPlot(Control panel, bool useMouseHandle) + { + gPanel = panel.CreateGraphics(); + + panelWidth = panel.Size.Width - 32; + panelHeight = panel.Size.Height - 22; + + originX = 32; + originY = panel.Size.Height - 22; + margin = 5.0f; + + BorderRight = (int)(panelWidth + originX - margin); + BorderTop = (int)panelHeight; + + PreX = 0; + scaleX = scaleY = 0.0f; + + + //default setting for axis scaling + axisAdaption = AXIS_RANGE_ADAPTING; + axisXLength = 10.0f; + axisYLength = 10.0f; + + pen = new Pen(System.Drawing.Color.DarkGray, 1); + penCurve = new Pen(System.Drawing.Color.Blue, 1); + penCursor = new Pen(System.Drawing.Color.LightSteelBlue, 1); + penCursor.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + + brushCS = new SolidBrush(Color.Black); + brushFuncPanel = new SolidBrush(Color.White); + drawFont = new Font("Arial", 6); + format = new StringFormat(); + format.Alignment = StringAlignment.Far; + + functionMap = new Bitmap(panel.Size.Width, panel.Size.Height); + backBuffer = Graphics.FromImage(functionMap); + resetPlot(); + + panel.Paint += new System.Windows.Forms.PaintEventHandler(this.paint); + + if (useMouseHandle) + panel.MouseMove += new System.Windows.Forms.MouseEventHandler(this.mouseMoved); + } + + /// <summary> + /// Convenience method for constructor call. For this case the + /// useMouseHandle flag is set to false by default. + /// </summary> + /// <param name="panel"> + /// An instance of the Windows.Forms.Control to plot the + /// supplied function in. + /// </param> + public FunctionPlot(Control panel) + : this(panel, false) + { + } + + + /// <summary> + /// Changes the origin of the coordinate system to be + /// at the control positions x and y. + /// </summary> + /// <param name="x"> + /// X position within the control coordinate system + /// </param> + /// <param name="y"> + /// Y position within the control coordinate system. + /// </param> + public void setOrigin(int x, int y) + { + float tmpX; + + if (x < 1 || y < 1) + return; + + tmpX = originX; + originX = x; + originY = y; + + panelWidth = panelWidth + tmpX - originX; + panelHeight = originY; + BorderRight = (int)(panelWidth + originX - margin); + BorderTop = (int)panelHeight; + } + + + /// <summary> + /// Sets the type of scaling for the y-axis. If the + /// y-axis is defined to be of fixed size, then the upper + /// limit has to be provided with val. Otherwise, + /// an 8-bit image is assumed, so the fixed size is set + /// to be 255. + /// </summary> + /// <param name="mode"> + /// Class constant starting with AXIS_RANGE_* + /// </param> + /// <param name="val"> + /// For the mode AXIS_RANGE_FIXED the value + /// val must be positive, otherwise + /// it has no meaning. + /// </param> + public void setAxisAdaption(int mode, float val) + { + switch (mode) + { + case AXIS_RANGE_FIXED: + axisAdaption = mode; + axisYLength = (val > 0) ? val : 255.0f; + break; + default: + axisAdaption = mode; + break; + } + } + + public void setAxisAdaption(int mode) + { + setAxisAdaption(mode, -1.0f); + } + + + /// <summary> + /// Plots a function of double values. + /// </summary> + /// <param name="grayValues"> + /// Y-values defined as an array of doubles + /// </param> + public void plotFunction(double[] grayValues) + { + drawFunction(new HTuple(grayValues)); + } + + + /// <summary> + /// Plots a function of float values. + /// </summary> + /// <param name="grayValues"> + /// Y-values defined as an array of floats + /// </param> + public void plotFunction(float[] grayValues) + { + drawFunction(new HTuple(grayValues)); + } + + + /// <summary> + /// Plots a function of integer values. + /// </summary> + /// <param name="grayValues"> + /// Y-values defined as an array of integers + /// </param> + public void plotFunction(int[] grayValues) + { + drawFunction(new HTuple(grayValues)); + } + + + /// <summary>Plots a function provided as an HTuple</summary> + private void drawFunction(HTuple tuple) + { + HTuple val; + int maxY,maxX; + float stepOffset; + + if (tuple.Length == 0) + { + resetPlot(); + return; + } + + val = tuple.TupleSortIndex(); + maxX = tuple.Length - 1; + maxY = (int)tuple[val[val.Length - 1].I].D; + + axisXLength = maxX; + + switch (axisAdaption) + { + case AXIS_RANGE_ADAPTING: + axisYLength = maxY; + break; + case AXIS_RANGE_INCREASING: + axisYLength = (maxY > axisYLength) ? maxY : axisYLength; + break; + } + + backBuffer.Clear(System.Drawing.Color.WhiteSmoke); + backBuffer.FillRectangle(brushFuncPanel, originX, 0, panelWidth, panelHeight); + + stepOffset = drawXYLabels(); + drawLineCurve(tuple, stepOffset); + backBuffer.Flush(); + + gPanel.DrawImageUnscaled(functionMap, 0, 0); + gPanel.Flush(); + } + + + /// <summary> + /// Clears the panel and displays only the coordinate axes. + /// </summary> + public void resetPlot() + { + backBuffer.Clear(System.Drawing.Color.WhiteSmoke); + backBuffer.FillRectangle(brushFuncPanel, originX, 0, panelWidth, panelHeight); + func = null; + drawXYLabels(); + backBuffer.Flush(); + repaint(); + } + + + /// <summary> + /// Puts (=flushes) the current content of the graphics object on screen + /// again. + /// </summary> + private void repaint() + { + gPanel.DrawImageUnscaled(functionMap, 0, 0); + gPanel.Flush(); + } + + + /// <summary>Plots the points of the function.</summary> + private void drawLineCurve(HTuple tuple, float stepOffset) + { + int length; + + if (stepOffset > 1) + points = scaleDispValue(tuple); + else + points = scaleDispBlockValue(tuple); + + length = points.Length; + + func = new HFunction1D(tuple); + + for (int i = 0; i < length - 1; i++) + backBuffer.DrawLine(penCurve, points[i], points[i + 1]); + + } + + + /// <summary> + /// Scales the function to the dimension of the graphics object + /// (provided by the control). + /// </summary> + /// <param name="tup"> + /// Function defined as a tuple of y-values + /// </param> + /// <returns> + /// Array of PointF values, containing the scaled function data + /// </returns> + private PointF[] scaleDispValue(HTuple tup) + { + PointF [] pVals; + float xMax, yMax, yV, x, y; + int length; + + xMax = axisXLength; + yMax = axisYLength; + + scaleX = (xMax != 0.0f) ? ((panelWidth - margin) / xMax) : 0.0f; + scaleY = (yMax != 0.0f) ? ((panelHeight - margin) / yMax) : 0.0f; + + length = tup.Length; + pVals = new PointF[length]; + + for (int j=0; j < length; j++) + { + yV = (float)tup[j].D; + x = originX + (float)j * scaleX; + y = panelHeight - (yV * scaleY); + pVals[j] = new PointF(x, y); + } + + return pVals; + } + + + /// <summary> + /// Scales the function to the dimension of the graphics object + /// (provided by the control). If the stepsize for the x-axis is + /// 1, the points are scaled in a block shape. + /// </summary> + /// <param name="tup"> + /// Function defined as a tuple of y-values + /// </param> + /// <returns> + /// Array of PointF values, containing the scaled function data + /// </returns> + private PointF[] scaleDispBlockValue(HTuple tup) + { + PointF [] pVals; + float xMax, yMax, yV,x,y; + int length, idx; + + xMax = axisXLength; + yMax = axisYLength; + + scaleX = (xMax != 0.0f) ? ((panelWidth - margin) / xMax) : 0.0f; + scaleY = (yMax != 0.0f) ? ((panelHeight - margin) / yMax) : 0.0f; + + length = tup.Length; + pVals = new PointF[length * 2]; + + y = 0; + idx = 0; + + for (int j=0; j < length; j++) + { + yV = (float)tup[j].D; + x = originX + (float)j * scaleX - (scaleX / 2.0f); + y = panelHeight - (yV * scaleY); + pVals[idx] = new PointF(x, y); + idx++; + + x = originX + (float)j * scaleX + (scaleX / 2.0f); + pVals[idx] = new PointF(x, y); + idx++; + } + + //trim the end points of the curve + idx--; + x = originX + (float)(length - 1) * scaleX; + pVals[idx] = new PointF(x, y); + + idx = 0; + yV = (float)tup[idx].D; + x = originX; + y = panelHeight - (yV * scaleY); + pVals[idx] = new PointF(x, y); + + return pVals; + } + + + /// <summary>Draws x- and y-axis and its labels.</summary> + /// <returns>Step size used for the x-axis</returns> + private float drawXYLabels() + { + float pX,pY,length, XStart,YStart; + float YCoord, XCoord, XEnd, YEnd, offset, offsetString, offsetStep; + float scale = 0.0f; + + offsetString = 5; + XStart = originX; + YStart = originY; + + //prepare scale data for x-axis + pX = axisXLength; + if (pX != 0.0) + scale = (panelWidth - margin) / pX; + + if (scale > 10.0) + offset = 1.0f; + else if (scale > 2) + offset = 10.0f; + else if (scale > 0.2) + offset = 100.0f; + else + offset = 1000.0f; + + + /*************** draw X-Axis ***************/ + XCoord = 0.0f; + YCoord = YStart; + XEnd = (scale * pX); + + backBuffer.DrawLine(pen, XStart, YStart, XStart + panelWidth - margin, YStart); + backBuffer.DrawLine(pen, XStart + XCoord, YCoord, XStart + XCoord, YCoord + 6); + backBuffer.DrawString(0 + "", drawFont, brushCS, XStart + XCoord + 4, YCoord + 8, format); + backBuffer.DrawLine(pen, XStart + XEnd, YCoord, XStart + XEnd, YCoord + 6); + backBuffer.DrawString(((int)pX + ""), drawFont, brushCS, XStart + XEnd + 4, YCoord + 8, format); + + length = (int)(pX / offset); + length = (offset == 10) ? length - 1 : length; + for (int i=1; i <= length; i++) + { + XCoord = (float)(offset * i * scale); + + if ((XEnd - XCoord) < 20) + continue; + + backBuffer.DrawLine(pen, XStart + XCoord, YCoord, XStart + XCoord, YCoord + 6); + backBuffer.DrawString(((int)(i * offset) + ""), drawFont, brushCS, XStart + XCoord + 5, YCoord + 8, format); + } + + offsetStep = offset; + + //prepare scale data for y-axis + pY = axisYLength; + if (pY != 0.0) + scale = ((panelHeight - margin) / pY); + + if (scale > 10.0) + offset = 1.0f; + else if (scale > 2) + offset = 10.0f; + else if (scale > 0.8) + offset = 50.0f; + else if (scale > 0.12) + offset = 100.0f; + else + offset = 1000.0f; + + /*************** draw Y-Axis ***************/ + XCoord = XStart; + YCoord = 5.0f; + YEnd = YStart - (scale * pY); + + backBuffer.DrawLine(pen, XStart, YStart, XStart, YStart - (panelHeight - margin)); + backBuffer.DrawLine(pen, XCoord, YStart, XCoord - 10, YStart); + backBuffer.DrawString(0 + "", drawFont, brushCS, XCoord - 12, YStart - offsetString, format); + backBuffer.DrawLine(pen, XCoord, YEnd, XCoord - 10, YEnd); + backBuffer.DrawString(pY + "", drawFont, brushCS, XCoord - 12, YEnd - offsetString, format); + + length = (int)(pY / offset); + length = (offset == 10) ? length - 1 : length; + for (int i=1; i <= length; i++) + { + YCoord = (YStart - ((float)offset * i * scale)); + + if ((YCoord - YEnd) < 10) + continue; + + backBuffer.DrawLine(pen, XCoord, YCoord, XCoord - 10, YCoord); + backBuffer.DrawString(((int)(i * offset) + ""), drawFont, brushCS, XCoord - 12, YCoord - offsetString, format); + } + + return offsetStep; + } + + + /// <summary> + /// Action call for the Mouse-Move event. For the x-coordinate + /// supplied by the MouseEvent, the unscaled x and y coordinates + /// of the plotted function are determined and displayed + /// on the control. + /// </summary> + private void mouseMoved(object sender, MouseEventArgs e) + { + int Xh, Xc; + HTuple Ytup; + float Yh, Yc; + + Xh = e.X; + + if (PreX == Xh || Xh < originX || Xh > BorderRight || func == null) + return; + + PreX = Xh; + + Xc = (int)Math.Round((Xh - originX) / scaleX); + Ytup = func.GetYValueFunct1d(new HTuple(Xc), "zero"); + + Yc = (float)Ytup[0].D; + Yh = panelHeight - (Yc * scaleY); + + gPanel.DrawImageUnscaled(functionMap, 0, 0); + gPanel.DrawLine(penCursor, Xh, 0, Xh, BorderTop); + gPanel.DrawLine(penCursor, originX, Yh, BorderRight + margin, Yh); + gPanel.DrawString(("X = " + Xc), drawFont, brushCS, panelWidth - margin, 10); + gPanel.DrawString(("Y = " + (int)Yc), drawFont, brushCS, panelWidth - margin, 20); + gPanel.Flush(); + } + + + /// <summary> + /// Action call for the Paint event of the control to trigger the + /// repainting of the function plot. + /// </summary> + private void paint(object sender, System.Windows.Forms.PaintEventArgs e) + { + repaint(); + } + + }//end of class +}//end of namespace diff --git a/HalconTools/ViewROI/GraphicsContext.cs b/HalconTools/ViewROI/GraphicsContext.cs new file mode 100644 index 0000000..988813b --- /dev/null +++ b/HalconTools/ViewROI/GraphicsContext.cs @@ -0,0 +1,417 @@ +using System; +using System.Collections; +using HalconDotNet; + + + +namespace HalconTools +{ + public delegate void GCDelegate(string val); + + /// <summary> + /// This class contains the graphical context of an HALCON object. The + /// set of graphical modes is defined by the hashlist 'graphicalSettings'. + /// If the list is empty, then there is no difference to the graphical + /// setting defined by the system by default. Otherwise, the provided + /// HALCON window is adjusted according to the entries of the supplied + /// graphical context (when calling applyContext()) + /// </summary> + public class GraphicsContext + { + + /// <summary> + /// Graphical mode for the output color (see dev_set_color) + /// </summary> + public const string GC_COLOR = "Color"; + + /// <summary> + /// Graphical mode for the multi-color output (see dev_set_colored) + /// </summary> + public const string GC_COLORED = "Colored"; + + /// <summary> + /// Graphical mode for the line width (see set_line_width) + /// </summary> + public const string GC_LINEWIDTH = "LineWidth"; + + /// <summary> + /// Graphical mode for the drawing (see set_draw) + /// </summary> + public const string GC_DRAWMODE = "DrawMode"; + + /// <summary> + /// Graphical mode for the drawing shape (see set_shape) + /// </summary> + public const string GC_SHAPE = "Shape"; + + /// <summary> + /// Graphical mode for the LUT (lookup table) (see set_lut) + /// </summary> + public const string GC_LUT = "Lut"; + + /// <summary> + /// Graphical mode for the painting (see set_paint) + /// </summary> + public const string GC_PAINT = "Paint"; + + /// <summary> + /// Graphical mode for the line style (see set_line_style) + /// </summary> + public const string GC_LINESTYLE = "LineStyle"; + + /// <summary> + /// Hashlist containing entries for graphical modes (defined by GC_*), + /// which is then linked to some HALCON object to describe its + /// graphical context. + /// </summary> + private Hashtable graphicalSettings; + + /// <summary> + /// Backup of the last graphical context applied to the window. + /// </summary> + public Hashtable stateOfSettings; + + private IEnumerator iterator; + + /// <summary> + /// Option to delegate messages from the graphical context + /// to some observer class + /// </summary> + public GCDelegate gcNotification; + + + /// <summary> + /// Creates a graphical context with no initial + /// graphical modes + /// </summary> + public GraphicsContext() + { + graphicalSettings = new Hashtable(10, 0.2f); + gcNotification = new GCDelegate(dummy); + stateOfSettings = new Hashtable(10, 0.2f); + } + + + /// <summary> + /// Creates an instance of the graphical context with + /// the modes defined in the hashtable 'settings' + /// </summary> + /// <param name="settings"> + /// List of modes, which describes the graphical context + /// </param> + public GraphicsContext(Hashtable settings) + { + graphicalSettings = settings; + gcNotification = new GCDelegate(dummy); + stateOfSettings = new Hashtable(10, 0.2f); + } + + /// <summary>Applies graphical context to the HALCON window</summary> + /// <param name="window">Active HALCON window</param> + /// <param name="cContext"> + /// List that contains graphical modes for window + /// </param> + public void applyContext(HWindow window, Hashtable cContext) + { + string key = ""; + string valS = ""; + int valI = -1; + HTuple valH = null; + + iterator = cContext.Keys.GetEnumerator(); + + try + { + while (iterator.MoveNext()) + { + + key = (string)iterator.Current; + + if (stateOfSettings.Contains(key) && + stateOfSettings[key] == cContext[key]) + continue; + + switch (key) + { + case GC_COLOR: + valS = (string)cContext[key]; + window.SetColor(valS); + if (stateOfSettings.Contains(GC_COLORED)) + stateOfSettings.Remove(GC_COLORED); + + break; + case GC_COLORED: + valI = (int)cContext[key]; + window.SetColored(valI); + + if (stateOfSettings.Contains(GC_COLOR)) + stateOfSettings.Remove(GC_COLOR); + + break; + case GC_DRAWMODE: + valS = (string)cContext[key]; + window.SetDraw(valS); + break; + case GC_LINEWIDTH: + valI = (int)cContext[key]; + window.SetLineWidth(valI); + break; + case GC_LUT: + valS = (string)cContext[key]; + window.SetLut(valS); + break; + case GC_PAINT: + valS = (string)cContext[key]; + window.SetPaint(valS); + break; + case GC_SHAPE: + valS = (string)cContext[key]; + window.SetShape(valS); + break; + case GC_LINESTYLE: + valH = (HTuple)cContext[key]; + window.SetLineStyle(valH); + break; + default: + break; + } + + + if (valI != -1) + { + if (stateOfSettings.Contains(key)) + stateOfSettings[key] = valI; + else + stateOfSettings.Add(key, valI); + + valI = -1; + } + else if (valS != "") + { + if (stateOfSettings.Contains(key)) + stateOfSettings[key] = valI; + else + stateOfSettings.Add(key, valI); + + valS = ""; + } + else if (valH != null) + { + if (stateOfSettings.Contains(key)) + stateOfSettings[key] = valI; + else + stateOfSettings.Add(key, valI); + + valH = null; + } + }//while + } + catch (HOperatorException e) + { + gcNotification(e.Message); + return; + } + } + + + /// <summary>Sets a value for the graphical mode GC_COLOR</summary> + /// <param name="val"> + /// A single color, e.g. "blue", "green" ...etc. + /// </param> + public void setColorAttribute(string val) + { + if (graphicalSettings.ContainsKey(GC_COLORED)) + graphicalSettings.Remove(GC_COLORED); + + addValue(GC_COLOR, val); + } + + /// <summary>Sets a value for the graphical mode GC_COLORED</summary> + /// <param name="val"> + /// The colored mode, which can be either "colored3" or "colored6" + /// or "colored12" + /// </param> + public void setColoredAttribute(int val) + { + if (graphicalSettings.ContainsKey(GC_COLOR)) + graphicalSettings.Remove(GC_COLOR); + + addValue(GC_COLORED, val); + } + + /// <summary>Sets a value for the graphical mode GC_DRAWMODE</summary> + /// <param name="val"> + /// One of the possible draw modes: "margin" or "fill" + /// </param> + public void setDrawModeAttribute(string val) + { + addValue(GC_DRAWMODE, val); + } + + /// <summary>Sets a value for the graphical mode GC_LINEWIDTH</summary> + /// <param name="val"> + /// The line width, which can range from 1 to 50 + /// </param> + public void setLineWidthAttribute(int val) + { + addValue(GC_LINEWIDTH, val); + } + + /// <summary>Sets a value for the graphical mode GC_LUT</summary> + /// <param name="val"> + /// One of the possible modes of look up tables. For + /// further information on particular setups, please refer to the + /// Reference Manual entry of the operator set_lut. + /// </param> + public void setLutAttribute(string val) + { + addValue(GC_LUT, val); + } + + + /// <summary>Sets a value for the graphical mode GC_PAINT</summary> + /// <param name="val"> + /// One of the possible paint modes. For further + /// information on particular setups, please refer refer to the + /// Reference Manual entry of the operator set_paint. + /// </param> + public void setPaintAttribute(string val) + { + addValue(GC_PAINT, val); + } + + + /// <summary>Sets a value for the graphical mode GC_SHAPE</summary> + /// <param name="val"> + /// One of the possible shape modes. For further + /// information on particular setups, please refer refer to the + /// Reference Manual entry of the operator set_shape. + /// </param> + public void setShapeAttribute(string val) + { + addValue(GC_SHAPE, val); + } + + /// <summary>Sets a value for the graphical mode GC_LINESTYLE</summary> + /// <param name="val"> + /// A line style mode, which works + /// identical to the input for the HDevelop operator + /// 'set_line_style'. For particular information on this + /// topic, please refer to the Reference Manual entry of the operator + /// set_line_style. + /// </param> + public void setLineStyleAttribute(HTuple val) + { + addValue(GC_LINESTYLE, val); + } + + /// <summary> + /// Adds a value to the hashlist 'graphicalSettings' for the + /// graphical mode described by the parameter 'key' + /// </summary> + /// <param name="key"> + /// A graphical mode defined by the constant GC_* + /// </param> + /// <param name="val"> + /// Defines the value as an int for this graphical + /// mode 'key' + /// </param> + private void addValue(string key, int val) + { + if (graphicalSettings.ContainsKey(key)) + graphicalSettings[key] = val; + else + graphicalSettings.Add(key, val); + } + + /// <summary> + /// Adds a value to the hashlist 'graphicalSettings' for the + /// graphical mode, described by the parameter 'key' + /// </summary> + /// <param name="key"> + /// A graphical mode defined by the constant GC_* + /// </param> + /// <param name="val"> + /// Defines the value as a string for this + /// graphical mode 'key' + /// </param> + private void addValue(string key, string val) + { + if (graphicalSettings.ContainsKey(key)) + graphicalSettings[key] = val; + else + graphicalSettings.Add(key, val); + } + + + /// <summary> + /// Adds a value to the hashlist 'graphicalSettings' for the + /// graphical mode, described by the parameter 'key' + /// </summary> + /// <param name="key"> + /// A graphical mode defined by the constant GC_* + /// </param> + /// <param name="val"> + /// Defines the value as a HTuple for this + /// graphical mode 'key' + /// </param> + private void addValue(string key, HTuple val) + { + if (graphicalSettings.ContainsKey(key)) + graphicalSettings[key] = val; + else + graphicalSettings.Add(key, val); + } + + /// <summary> + /// Clears the list of graphical settings. + /// There will be no graphical changes made prior + /// before drawing objects, since there are no + /// graphical entries to be applied to the window. + /// </summary> + public void clear() + { + graphicalSettings.Clear(); + } + + + /// <summary> + /// Returns an exact clone of this graphicsContext instance + /// </summary> + public GraphicsContext copy() + { + return new GraphicsContext((Hashtable)this.graphicalSettings.Clone()); + } + + + /// <summary> + /// If the hashtable contains the key, the corresponding + /// hashtable value is returned + /// </summary> + /// <param name="key"> + /// One of the graphical keys starting with GC_* + /// </param> + public object getGraphicsAttribute(string key) + { + if (graphicalSettings.ContainsKey(key)) + return graphicalSettings[key]; + + return null; + } + + /// <summary> + /// Returns a copy of the hashtable that carries the + /// entries for the current graphical context + /// </summary> + /// <returns> current graphical context </returns> + public Hashtable copyContextList() + { + return (Hashtable)graphicalSettings.Clone(); + } + + + /********************************************************************/ + public void dummy(string val) { } + + }//end of class +}//end of namespace diff --git a/HalconTools/ViewROI/HObjectEntry.cs b/HalconTools/ViewROI/HObjectEntry.cs new file mode 100644 index 0000000..4d3da44 --- /dev/null +++ b/HalconTools/ViewROI/HObjectEntry.cs @@ -0,0 +1,53 @@ +using System; +using HalconDotNet; +using System.Collections; + + + +namespace HalconTools +{ + + /// <summary> + /// This class is an auxiliary class, which is used to + /// link a graphical context to an HALCON object. The graphical + /// context is described by a hashtable, which contains a list of + /// graphical modes (e.g GC_COLOR, GC_LINEWIDTH and GC_PAINT) + /// and their corresponding values (e.g "blue", "4", "3D-plot"). These + /// graphical states are applied to the window before displaying the + /// object. + /// </summary> + public class HObjectEntry + { + /// <summary>Hashlist defining the graphical context for HObj</summary> + public Hashtable gContext; + + /// <summary>HALCON object</summary> + public HObject HObj; + + + + /// <summary>Constructor</summary> + /// <param name="obj"> + /// HALCON object that is linked to the graphical context gc. + /// </param> + /// <param name="gc"> + /// Hashlist of graphical states that are applied before the object + /// is displayed. + /// </param> + public HObjectEntry(HObject obj, Hashtable gc) + { + gContext = gc; + HObj = obj; + } + + /// <summary> + /// Clears the entries of the class members Hobj and gContext + /// </summary> + public void clear() + { + gContext.Clear(); + HObj.Dispose(); + } + + }//end of class +}//end of namespace diff --git a/HalconTools/ViewROI/HWndCtrl.cs b/HalconTools/ViewROI/HWndCtrl.cs new file mode 100644 index 0000000..bef1a8e --- /dev/null +++ b/HalconTools/ViewROI/HWndCtrl.cs @@ -0,0 +1,867 @@ +using System; +using HalconTools; +using System.Collections; +using HalconDotNet; + +namespace HalconTools +{ + public delegate void IconicDelegate(int val); + public delegate void FuncDelegate(); + + /// <summary> + /// This class works as a wrapper class for the HALCON window + /// HWindow. HWndCtrl is in charge of the visualization. + /// You can move and zoom the visible image part by using GUI component + /// inputs or with the mouse. The class HWndCtrl uses a graphics stack + /// to manage the iconic objects for the display. Each object is linked + /// to a graphical context, which determines how the object is to be drawn. + /// The context can be changed by calling changeGraphicSettings(). + /// The graphical "modes" are defined by the class GraphicsContext and + /// map most of the dev_set_* operators provided in HDevelop. + /// </summary> + public class HWndCtrl + { + /// <summary>No action is performed on mouse events</summary> + public const int MODE_VIEW_NONE = 10; + + /// <summary>Zoom is performed on mouse events</summary> + public const int MODE_VIEW_ZOOM = 11; + + /// <summary>Move is performed on mouse events</summary> + public const int MODE_VIEW_MOVE = 12; + + /// <summary>Magnification is performed on mouse events</summary> + public const int MODE_VIEW_ZOOMWINDOW = 13; + + + public const int MODE_INCLUDE_ROI = 1; + + public const int MODE_EXCLUDE_ROI = 2; + + + /// <summary> + /// Constant describes delegate message to signal new image + /// </summary> + public const int EVENT_UPDATE_IMAGE = 31; + /// <summary> + /// Constant describes delegate message to signal error + /// when reading an image from file + /// </summary> + public const int ERR_READING_IMG = 32; + /// <summary> + /// Constant describes delegate message to signal error + /// when defining a graphical context + /// </summary> + public const int ERR_DEFINING_GC = 33; + + /// <summary> + /// Maximum number of HALCON objects that can be put on the graphics + /// stack without loss. For each additional object, the first entry + /// is removed from the stack again. + /// </summary> + private const int MAXNUMOBJLIST = 50; + + + private int stateView; + private bool mousePressed = false; + private double startX,startY; + + /// <summary>HALCON window</summary> + private HWindowControl viewPort; + + /// <summary> + /// Instance of ROIController, which manages ROI interaction + /// </summary> + private ROIController roiManager; + + /* dispROI is a flag to know when to add the ROI models to the + paint routine and whether or not to respond to mouse events for + ROI objects */ + private int dispROI; + + + /* Basic parameters, like dimension of window and displayed image part */ + private int windowWidth; + private int windowHeight; + private int imageWidth; + private int imageHeight; + + private int[] CompRangeX; + private int[] CompRangeY; + + + private int prevCompX, prevCompY; + private double stepSizeX, stepSizeY; + + + /* Image coordinates, which describe the image part that is displayed + in the HALCON window */ + private double ImgRow1, ImgCol1, ImgRow2, ImgCol2; + + /// <summary>Error message when an exception is thrown</summary> + public string exceptionText = ""; + + + /* Delegates to send notification messages to other classes */ + /// <summary> + /// Delegate to add information to the HALCON window after + /// the paint routine has finished + /// </summary> + public FuncDelegate addInfoDelegate; + + /// <summary> + /// Delegate to notify about failed tasks of the HWndCtrl instance + /// </summary> + public IconicDelegate NotifyIconObserver; + + + private HWindow ZoomWindow; + private double zoomWndFactor; + private double zoomAddOn; + private int zoomWndSize; + + + /// <summary> + /// List of HALCON objects to be drawn into the HALCON window. + /// The list shouldn't contain more than MAXNUMOBJLIST objects, + /// otherwise the first entry is removed from the list. + /// </summary> + private ArrayList HObjList; + + /// <summary> + /// Instance that describes the graphical context for the + /// HALCON window. According on the graphical settings + /// attached to each HALCON object, this graphical context list + /// is updated constantly. + /// </summary> + private GraphicsContext mGC; + + + /// <summary> + /// Initializes the image dimension, mouse delegation, and the + /// graphical context setup of the instance. + /// </summary> + /// <param name="view"> HALCON window </param> + public HWndCtrl(HWindowControl view) + { + viewPort = view; + stateView = MODE_VIEW_NONE; + windowWidth = viewPort.Size.Width; + windowHeight = viewPort.Size.Height; + + zoomWndFactor = (double)imageWidth / viewPort.Width; + zoomAddOn = Math.Pow(0.9, 5); + zoomWndSize = 150; + + /*default*/ + CompRangeX = new int[] { 0, 100 }; + CompRangeY = new int[] { 0, 100 }; + + prevCompX = prevCompY = 0; + + dispROI = MODE_INCLUDE_ROI;//1; + + viewPort.HMouseUp += new HalconDotNet.HMouseEventHandler(this.mouseUp); + viewPort.HMouseDown += new HalconDotNet.HMouseEventHandler(this.mouseDown); + viewPort.HMouseMove += new HalconDotNet.HMouseEventHandler(this.mouseMoved); + + addInfoDelegate = new FuncDelegate(dummyV); + NotifyIconObserver = new IconicDelegate(dummy); + + // graphical stack + HObjList = new ArrayList(20); + mGC = new GraphicsContext(); + mGC.gcNotification = new GCDelegate(exceptionGC); + } + + + /// <summary> + /// Registers an instance of an ROIController with this window + /// controller (and vice versa). + /// </summary> + /// <param name="rC"> + /// Controller that manages interactive ROIs for the HALCON window + /// </param> + public void useROIController(ROIController rC) + { + roiManager = rC; + rC.setViewController(this); + } + + + /// <summary> + /// Read dimensions of the image to adjust own window settings + /// </summary> + /// <param name="image">HALCON image</param> + private void setImagePart(HImage image) + { + string s; + int w,h; + + image.GetImagePointer1(out s, out w, out h); + setImagePart(0, 0, h, w); + } + + + /// <summary> + /// Adjust window settings by the values supplied for the left + /// upper corner and the right lower corner + /// </summary> + /// <param name="r1">y coordinate of left upper corner</param> + /// <param name="c1">x coordinate of left upper corner</param> + /// <param name="r2">y coordinate of right lower corner</param> + /// <param name="c2">x coordinate of right lower corner</param> + private void setImagePart(int r1, int c1, int r2, int c2) + { + ImgRow1 = r1; + ImgCol1 = c1; + ImgRow2 = imageHeight = r2; + ImgCol2 = imageWidth = c2; + + System.Drawing.Rectangle rect = viewPort.ImagePart; + rect.X = (int)ImgCol1; + rect.Y = (int)ImgRow1; + rect.Height = (int)imageHeight; + rect.Width = (int)imageWidth; + viewPort.ImagePart = rect; + } + + + /// <summary> + /// Sets the view mode for mouse events in the HALCON window + /// (zoom, move, magnify or none). + /// </summary> + /// <param name="mode">One of the MODE_VIEW_* constants</param> + public void setViewState(int mode) + { + stateView = mode; + + if (roiManager != null) + roiManager.resetROI(); + } + + /********************************************************************/ + private void dummy(int val) + { + } + + private void dummyV() + { + } + + /*******************************************************************/ + private void exceptionGC(string message) + { + exceptionText = message; + NotifyIconObserver(ERR_DEFINING_GC); + } + + /// <summary> + /// Paint or don't paint the ROIs into the HALCON window by + /// defining the parameter to be equal to 1 or not equal to 1. + /// </summary> + public void setDispLevel(int mode) + { + dispROI = mode; + } + + /****************************************************************************/ + /* graphical element */ + /****************************************************************************/ + private void zoomImage(double x, double y, double scale) + { + double lengthC, lengthR; + double percentC, percentR; + int lenC, lenR; + + percentC = (x - ImgCol1) / (ImgCol2 - ImgCol1); + percentR = (y - ImgRow1) / (ImgRow2 - ImgRow1); + + lengthC = (ImgCol2 - ImgCol1) * scale; + lengthR = (ImgRow2 - ImgRow1) * scale; + + ImgCol1 = x - lengthC * percentC; + ImgCol2 = x + lengthC * (1 - percentC); + + ImgRow1 = y - lengthR * percentR; + ImgRow2 = y + lengthR * (1 - percentR); + + lenC = (int)Math.Round(lengthC); + lenR = (int)Math.Round(lengthR); + + System.Drawing.Rectangle rect = viewPort.ImagePart; + rect.X = (int)Math.Round(ImgCol1); + rect.Y = (int)Math.Round(ImgRow1); + rect.Width = (lenC > 0) ? lenC : 1; + rect.Height = (lenR > 0) ? lenR : 1; + viewPort.ImagePart = rect; + + zoomWndFactor *= scale; + repaint(); + } + + /// <summary> + /// Scales the image in the HALCON window according to the + /// value scaleFactor + /// </summary> + public void zoomImage(double scaleFactor) + { + double midPointX, midPointY; + + if (((ImgRow2 - ImgRow1) == scaleFactor * imageHeight) && + ((ImgCol2 - ImgCol1) == scaleFactor * imageWidth)) + { + repaint(); + return; + } + + ImgRow2 = ImgRow1 + imageHeight; + ImgCol2 = ImgCol1 + imageWidth; + + midPointX = ImgCol1; + midPointY = ImgRow1; + + zoomWndFactor = (double)imageWidth / viewPort.Width; + zoomImage(midPointX, midPointY, scaleFactor); + } + + + /// <summary> + /// Scales the HALCON window according to the value scale + /// </summary> + public void scaleWindow(double scale) + { + ImgRow1 = 0; + ImgCol1 = 0; + + ImgRow2 = imageHeight; + ImgCol2 = imageWidth; + + viewPort.Width = (int)(ImgCol2 * scale); + viewPort.Height = (int)(ImgRow2 * scale); + + zoomWndFactor = ((double)imageWidth / viewPort.Width); + } + + /// <summary> + /// Recalculates the image-window-factor, which needs to be added to + /// the scale factor for zooming an image. This way the zoom gets + /// adjusted to the window-image relation, expressed by the equation + /// imageWidth/viewPort.Width. + /// </summary> + public void setZoomWndFactor() + { + zoomWndFactor = ((double)imageWidth / viewPort.Width); + } + + /// <summary> + /// Sets the image-window-factor to the value zoomF + /// </summary> + public void setZoomWndFactor(double zoomF) + { + zoomWndFactor = zoomF; + } + + /*******************************************************************/ + private void moveImage(double motionX, double motionY) + { + ImgRow1 += -motionY; + ImgRow2 += -motionY; + + ImgCol1 += -motionX; + ImgCol2 += -motionX; + + System.Drawing.Rectangle rect = viewPort.ImagePart; + rect.X = (int)Math.Round(ImgCol1); + rect.Y = (int)Math.Round(ImgRow1); + viewPort.ImagePart = rect; + + repaint(); + } + + + /// <summary> + /// Resets all parameters that concern the HALCON window display + /// setup to their initial values and clears the ROI list. + /// </summary> + public void resetAll() + { + ImgRow1 = 0; + ImgCol1 = 0; + ImgRow2 = imageHeight; + ImgCol2 = imageWidth; + + zoomWndFactor = (double)imageWidth / viewPort.Width; + + System.Drawing.Rectangle rect = viewPort.ImagePart; + rect.X = (int)ImgCol1; + rect.Y = (int)ImgRow1; + rect.Width = (int)imageWidth; + rect.Height = (int)imageHeight; + viewPort.ImagePart = rect; + + + if (roiManager != null) + roiManager.reset(); + } + + public void resetWindow() + { + ImgRow1 = 0; + ImgCol1 = 0; + ImgRow2 = imageHeight; + ImgCol2 = imageWidth; + + zoomWndFactor = (double)imageWidth / viewPort.Width; + + System.Drawing.Rectangle rect = viewPort.ImagePart; + rect.X = (int)ImgCol1; + rect.Y = (int)ImgRow1; + rect.Width = (int)imageWidth; + rect.Height = (int)imageHeight; + viewPort.ImagePart = rect; + } + + + /*************************************************************************/ + /* Event handling for mouse */ + /*************************************************************************/ + private void mouseDown(object sender, HalconDotNet.HMouseEventArgs e) + { + mousePressed = true; + int activeROIidx = -1; + double scale; + + if (roiManager != null && (dispROI == MODE_INCLUDE_ROI)) + { + activeROIidx = roiManager.mouseDownAction(e.X, e.Y); + } + + if (activeROIidx == -1) + { + switch (stateView) + { + case MODE_VIEW_MOVE: + startX = e.X; + startY = e.Y; + break; + case MODE_VIEW_ZOOM: + if (e.Button == System.Windows.Forms.MouseButtons.Left) + scale = 0.9; + else + scale = 1 / 0.9; + zoomImage(e.X, e.Y, scale); + break; + case MODE_VIEW_NONE: + break; + case MODE_VIEW_ZOOMWINDOW: + activateZoomWindow((int)e.X, (int)e.Y); + break; + default: + break; + } + } + //end of if + } + + /*******************************************************************/ + private void activateZoomWindow(int X, int Y) + { + double posX, posY; + int zoomZone; + + if (ZoomWindow != null) + ZoomWindow.Dispose(); + + HOperatorSet.SetSystem("border_width", 10); + ZoomWindow = new HWindow(); + + posX = ((X - ImgCol1) / (ImgCol2 - ImgCol1)) * viewPort.Width; + posY = ((Y - ImgRow1) / (ImgRow2 - ImgRow1)) * viewPort.Height; + + zoomZone = (int)((zoomWndSize / 2) * zoomWndFactor * zoomAddOn); + ZoomWindow.OpenWindow((int)posY - (zoomWndSize / 2), (int)posX - (zoomWndSize / 2), + zoomWndSize, zoomWndSize, + viewPort.HalconID, "visible", ""); + ZoomWindow.SetPart(Y - zoomZone, X - zoomZone, Y + zoomZone, X + zoomZone); + repaint(ZoomWindow); + ZoomWindow.SetColor("black"); + } + + /*******************************************************************/ + private void mouseUp(object sender, HalconDotNet.HMouseEventArgs e) + { + mousePressed = false; + + if (roiManager != null + && (roiManager.activeROIidx != -1) + && (dispROI == MODE_INCLUDE_ROI)) + { + roiManager.NotifyRCObserver(ROIController.EVENT_UPDATE_ROI); + } + else if (stateView == MODE_VIEW_ZOOMWINDOW) + { + ZoomWindow.Dispose(); + } + } + + /*******************************************************************/ + private void mouseMoved(object sender, HalconDotNet.HMouseEventArgs e) + { + double motionX, motionY; + double posX, posY; + double zoomZone; + + + if (!mousePressed) + return; + + if (roiManager != null && (roiManager.activeROIidx != -1) && (dispROI == MODE_INCLUDE_ROI)) + { + roiManager.mouseMoveAction(e.X, e.Y); + } + else if (stateView == MODE_VIEW_MOVE) + { + motionX = ((e.X - startX)); + motionY = ((e.Y - startY)); + + if (((int)motionX != 0) || ((int)motionY != 0)) + { + moveImage(motionX, motionY); + startX = e.X - motionX; + startY = e.Y - motionY; + } + } + else if (stateView == MODE_VIEW_ZOOMWINDOW) + { + HSystem.SetSystem("flush_graphic", "false"); + ZoomWindow.ClearWindow(); + + + posX = ((e.X - ImgCol1) / (ImgCol2 - ImgCol1)) * viewPort.Width; + posY = ((e.Y - ImgRow1) / (ImgRow2 - ImgRow1)) * viewPort.Height; + zoomZone = (zoomWndSize / 2) * zoomWndFactor * zoomAddOn; + + ZoomWindow.SetWindowExtents((int)posY - (zoomWndSize / 2), + (int)posX - (zoomWndSize / 2), + zoomWndSize, zoomWndSize); + ZoomWindow.SetPart((int)(e.Y - zoomZone), (int)(e.X - zoomZone), + (int)(e.Y + zoomZone), (int)(e.X + zoomZone)); + repaint(ZoomWindow); + + HSystem.SetSystem("flush_graphic", "true"); + ZoomWindow.DispLine(-100.0, -100.0, -100.0, -100.0); + } + } + + /// <summary> + /// To initialize the move function using a GUI component, the HWndCtrl + /// first needs to know the range supplied by the GUI component. + /// For the x direction it is specified by xRange, which is + /// calculated as follows: GuiComponentX.Max()-GuiComponentX.Min(). + /// The starting value of the GUI component has to be supplied + /// by the parameter Init + /// </summary> + public void setGUICompRangeX(int[] xRange, int Init) + { + int cRangeX; + + CompRangeX = xRange; + cRangeX = xRange[1] - xRange[0]; + prevCompX = Init; + stepSizeX = ((double)imageWidth / cRangeX) * (imageWidth / windowWidth); + + } + + /// <summary> + /// To initialize the move function using a GUI component, the HWndCtrl + /// first needs to know the range supplied by the GUI component. + /// For the y direction it is specified by yRange, which is + /// calculated as follows: GuiComponentY.Max()-GuiComponentY.Min(). + /// The starting value of the GUI component has to be supplied + /// by the parameter Init + /// </summary> + public void setGUICompRangeY(int[] yRange, int Init) + { + int cRangeY; + + CompRangeY = yRange; + cRangeY = yRange[1] - yRange[0]; + prevCompY = Init; + stepSizeY = ((double)imageHeight / cRangeY) * (imageHeight / windowHeight); + } + + + /// <summary> + /// Resets to the starting value of the GUI component. + /// </summary> + public void resetGUIInitValues(int xVal, int yVal) + { + prevCompX = xVal; + prevCompY = yVal; + } + + /// <summary> + /// Moves the image by the value valX supplied by the GUI component + /// </summary> + public void moveXByGUIHandle(int valX) + { + double motionX; + + motionX = (valX - prevCompX) * stepSizeX; + + if (motionX == 0) + return; + + moveImage(motionX, 0.0); + prevCompX = valX; + } + + + /// <summary> + /// Moves the image by the value valY supplied by the GUI component + /// </summary> + public void moveYByGUIHandle(int valY) + { + double motionY; + + motionY = (valY - prevCompY) * stepSizeY; + + if (motionY == 0) + return; + + moveImage(0.0, motionY); + prevCompY = valY; + } + + /// <summary> + /// Zooms the image by the value valF supplied by the GUI component + /// </summary> + public void zoomByGUIHandle(double valF) + { + double x, y, scale; + double prevScaleC; + + + + x = (ImgCol1 + (ImgCol2 - ImgCol1) / 2); + y = (ImgRow1 + (ImgRow2 - ImgRow1) / 2); + + prevScaleC = (double)((ImgCol2 - ImgCol1) / imageWidth); + scale = ((double)1.0 / prevScaleC * (100.0 / valF)); + + zoomImage(x, y, scale); + } + + /// <summary> + /// Triggers a repaint of the HALCON window + /// </summary> + public void repaint() + { + repaint(viewPort.HalconWindow); + } + + /// <summary> + /// Repaints the HALCON window 'window' + /// </summary> + public void repaint(HalconDotNet.HWindow window) + { + int count = HObjList.Count; + HObjectEntry entry; + + HSystem.SetSystem("flush_graphic", "false"); + window.ClearWindow(); + mGC.stateOfSettings.Clear(); + + for (int i=0; i < count; i++) + { + entry = ((HObjectEntry)HObjList[i]); + mGC.applyContext(window, entry.gContext); + window.DispObj(entry.HObj); + } + + addInfoDelegate(); + + if (roiManager != null && (dispROI == MODE_INCLUDE_ROI)) + roiManager.paintData(window); + + HSystem.SetSystem("flush_graphic", "true"); + + window.SetColor("black"); + window.DispLine(-100.0, -100.0, -101.0, -101.0); + } + + + + /********************************************************************/ + /* GRAPHICSSTACK */ + /********************************************************************/ + + /// <summary> + /// Adds an iconic object to the graphics stack similar to the way + /// it is defined for the HDevelop graphics stack. + /// </summary> + /// <param name="obj">Iconic object</param> + public void addIconicVar(HObject obj) + { + HObjectEntry entry; + + if (obj == null) + return; + + if (obj is HImage) + { + double r, c; + int h, w, area; + string s; + + area = ((HImage)obj).GetDomain().AreaCenter(out r, out c); + ((HImage)obj).GetImagePointer1(out s, out w, out h); + + if (area == (w * h)) + { + clearList(); + + if ((h != imageHeight) || (w != imageWidth)) + { + imageHeight = h; + imageWidth = w; + zoomWndFactor = (double)imageWidth / viewPort.Width; + setImagePart(0, 0, h, w); + } + }//if + }//if + + entry = new HObjectEntry(obj, mGC.copyContextList()); + + HObjList.Add(entry); + + if (HObjList.Count > MAXNUMOBJLIST) + HObjList.RemoveAt(1); + } + + + /// <summary> + /// Clears all entries from the graphics stack + /// </summary> + public void clearList() + { + HObjList.Clear(); + } + + /// <summary> + /// Returns the number of items on the graphics stack + /// </summary> + public int getListCount() + { + return HObjList.Count; + } + + /// <summary> + /// Changes the current graphical context by setting the specified mode + /// (constant starting by GC_*) to the specified value. + /// </summary> + /// <param name="mode"> + /// Constant that is provided by the class GraphicsContext + /// and describes the mode that has to be changed, + /// e.g., GraphicsContext.GC_COLOR + /// </param> + /// <param name="val"> + /// Value, provided as a string, + /// the mode is to be changed to, e.g., "blue" + /// </param> + public void changeGraphicSettings(string mode, string val) + { + switch (mode) + { + case GraphicsContext.GC_COLOR: + mGC.setColorAttribute(val); + break; + case GraphicsContext.GC_DRAWMODE: + mGC.setDrawModeAttribute(val); + break; + case GraphicsContext.GC_LUT: + mGC.setLutAttribute(val); + break; + case GraphicsContext.GC_PAINT: + mGC.setPaintAttribute(val); + break; + case GraphicsContext.GC_SHAPE: + mGC.setShapeAttribute(val); + break; + default: + break; + } + } + + /// <summary> + /// Changes the current graphical context by setting the specified mode + /// (constant starting by GC_*) to the specified value. + /// </summary> + /// <param name="mode"> + /// Constant that is provided by the class GraphicsContext + /// and describes the mode that has to be changed, + /// e.g., GraphicsContext.GC_LINEWIDTH + /// </param> + /// <param name="val"> + /// Value, provided as an integer, the mode is to be changed to, + /// e.g., 5 + /// </param> + public void changeGraphicSettings(string mode, int val) + { + switch (mode) + { + case GraphicsContext.GC_COLORED: + mGC.setColoredAttribute(val); + break; + case GraphicsContext.GC_LINEWIDTH: + mGC.setLineWidthAttribute(val); + break; + default: + break; + } + } + + /// <summary> + /// Changes the current graphical context by setting the specified mode + /// (constant starting by GC_*) to the specified value. + /// </summary> + /// <param name="mode"> + /// Constant that is provided by the class GraphicsContext + /// and describes the mode that has to be changed, + /// e.g., GraphicsContext.GC_LINESTYLE + /// </param> + /// <param name="val"> + /// Value, provided as an HTuple instance, the mode is + /// to be changed to, e.g., new HTuple(new int[]{2,2}) + /// </param> + public void changeGraphicSettings(string mode, HTuple val) + { + switch (mode) + { + case GraphicsContext.GC_LINESTYLE: + mGC.setLineStyleAttribute(val); + break; + default: + break; + } + } + + /// <summary> + /// Clears all entries from the graphical context list + /// </summary> + public void clearGraphicContext() + { + mGC.clear(); + } + + /// <summary> + /// Returns a clone of the graphical context list (hashtable) + /// </summary> + public Hashtable getGraphicContext() + { + return mGC.copyContextList(); + } + + }//end of class +}//end of namespace diff --git a/HalconTools/ViewROI/ROI.cs b/HalconTools/ViewROI/ROI.cs new file mode 100644 index 0000000..37b233d --- /dev/null +++ b/HalconTools/ViewROI/ROI.cs @@ -0,0 +1,161 @@ +using System; +using HalconDotNet; + + +namespace HalconTools +{ + + /// <summary> + /// This class is a base class containing virtual methods for handling + /// ROIs. Therefore, an inheriting class needs to define/override these + /// methods to provide the ROIController with the necessary information on + /// its (= the ROIs) shape and position. The example project provides + /// derived ROI shapes for rectangles, lines, circles, and circular arcs. + /// To use other shapes you must derive a new class from the base class + /// ROI and implement its methods. + /// </summary> + public class ROI + { + + // class members of inheriting ROI classes + protected int NumHandles; + protected int activeHandleIdx; + + /// <summary> + /// Flag to define the ROI to be 'positive' or 'negative'. + /// </summary> + protected int OperatorFlag; + + /// <summary>Parameter to define the line style of the ROI.</summary> + public HTuple flagLineStyle; + + /// <summary>Constant for a positive ROI flag.</summary> + public const int POSITIVE_FLAG = ROIController.MODE_ROI_POS; + + /// <summary>Constant for a negative ROI flag.</summary> + public const int NEGATIVE_FLAG = ROIController.MODE_ROI_NEG; + + public const int ROI_TYPE_LINE = 10; + public const int ROI_TYPE_CIRCLE = 11; + public const int ROI_TYPE_CIRCLEARC = 12; + public const int ROI_TYPE_RECTANCLE1 = 13; + public const int ROI_TYPE_RECTANGLE2 = 14; + + + protected HTuple posOperation = new HTuple(); + protected HTuple negOperation = new HTuple(new int[] { 2, 2 }); + + /// <summary>Constructor of abstract ROI class.</summary> + public ROI() { } + + /// <summary>Creates a new ROI instance at the mouse position.</summary> + /// <param name="midX"> + /// x (=column) coordinate for ROI + /// </param> + /// <param name="midY"> + /// y (=row) coordinate for ROI + /// </param> + public virtual void createROI(double midX, double midY) { } + + /// <summary>Paints the ROI into the supplied window.</summary> + /// <param name="window">HALCON window</param> + public virtual void draw(HalconDotNet.HWindow window) { } + + /// <summary> + /// Returns the distance of the ROI handle being + /// closest to the image point(x,y) + /// </summary> + /// <param name="x">x (=column) coordinate</param> + /// <param name="y">y (=row) coordinate</param> + /// <returns> + /// Distance of the closest ROI handle. + /// </returns> + public virtual double distToClosestHandle(double x, double y) + { + return 0.0; + } + + /// <summary> + /// Paints the active handle of the ROI object into the supplied window. + /// </summary> + /// <param name="window">HALCON window</param> + public virtual void displayActive(HalconDotNet.HWindow window) { } + + /// <summary> + /// Recalculates the shape of the ROI. Translation is + /// performed at the active handle of the ROI object + /// for the image coordinate (x,y). + /// </summary> + /// <param name="x">x (=column) coordinate</param> + /// <param name="y">y (=row) coordinate</param> + public virtual void moveByHandle(double x, double y) { } + + /// <summary>Gets the HALCON region described by the ROI.</summary> + public virtual HRegion getRegion() + { + return null; + } + + public virtual double getDistanceFromStartPoint(double row, double col) + { + return 0.0; + } + /// <summary> + /// Gets the model information described by + /// the ROI. + /// </summary> + public virtual HTuple getModelData() + { + return null; + } + + /// <summary>Number of handles defined for the ROI.</summary> + /// <returns>Number of handles</returns> + public int getNumHandles() + { + return NumHandles; + } + + /// <summary>Gets the active handle of the ROI.</summary> + /// <returns>Index of the active handle (from the handle list)</returns> + public int getActHandleIdx() + { + return activeHandleIdx; + } + + /// <summary> + /// Gets the sign of the ROI object, being either + /// 'positive' or 'negative'. This sign is used when creating a model + /// region for matching applications from a list of ROIs. + /// </summary> + public int getOperatorFlag() + { + return OperatorFlag; + } + + /// <summary> + /// Sets the sign of a ROI object to be positive or negative. + /// The sign is used when creating a model region for matching + /// applications by summing up all positive and negative ROI models + /// created so far. + /// </summary> + /// <param name="flag">Sign of ROI object</param> + public void setOperatorFlag(int flag) + { + OperatorFlag = flag; + + switch (OperatorFlag) + { + case ROI.POSITIVE_FLAG: + flagLineStyle = posOperation; + break; + case ROI.NEGATIVE_FLAG: + flagLineStyle = negOperation; + break; + default: + flagLineStyle = posOperation; + break; + } + } + }//end of class +}//end of namespace diff --git a/HalconTools/ViewROI/ROICircle.cs b/HalconTools/ViewROI/ROICircle.cs new file mode 100644 index 0000000..a20d061 --- /dev/null +++ b/HalconTools/ViewROI/ROICircle.cs @@ -0,0 +1,155 @@ +using System; +using HalconDotNet; + +namespace HalconTools +{ + /// <summary> + /// This class demonstrates one of the possible implementations for a + /// circular ROI. ROICircle inherits from the base class ROI and + /// implements (besides other auxiliary methods) all virtual methods + /// defined in ROI.cs. + /// </summary> + public class ROICircle : ROI + { + + public double radius; + public double row1, col1; // first handle + public double midR, midC; // second handle + + + public ROICircle() + { + NumHandles = 2; // one at corner of circle + midpoint + activeHandleIdx = 1; + } + + public double hradius = 100; + + /// <summary>Creates a new ROI instance at the mouse position</summary> + public override void createROI(double midX, double midY) + { + midR = midY; + midC = midX; + + radius = hradius; + + row1 = midR; + col1 = midC + radius; + } + + /// <summary>Paints the ROI into the supplied window</summary> + /// <param name="window">HALCON window</param> + public override void draw(HalconDotNet.HWindow window) + { + window.DispCircle(midR, midC, radius); + window.DispRectangle2(row1, col1, 0, 5, 5); + window.DispRectangle2(midR, midC, 0, 5, 5); + } + + /// <summary> + /// Returns the distance of the ROI handle being + /// closest to the image point(x,y) + /// </summary> + public override double distToClosestHandle(double x, double y) + { + double max = 10000; + double [] val = new double[NumHandles]; + + val[0] = HMisc.DistancePp(y, x, row1, col1); // border handle + val[1] = HMisc.DistancePp(y, x, midR, midC); // midpoint + + for (int i=0; i < NumHandles; i++) + { + if (val[i] < max) + { + max = val[i]; + activeHandleIdx = i; + } + }// end of for + return val[activeHandleIdx]; + } + + /// <summary> + /// Paints the active handle of the ROI object into the supplied window + /// </summary> + public override void displayActive(HalconDotNet.HWindow window) + { + + switch (activeHandleIdx) + { + case 0: + window.DispRectangle2(row1, col1, 0, 5, 5); + break; + case 1: + window.DispRectangle2(midR, midC, 0, 5, 5); + break; + } + } + + /// <summary>Gets the HALCON region described by the ROI</summary> + public override HRegion getRegion() + { + HRegion region = new HRegion(); + region.GenCircle(midR, midC, radius); + return region; + } + + public override double getDistanceFromStartPoint(double row, double col) + { + double sRow = midR; // assumption: we have an angle starting at 0.0 + double sCol = midC + 1 * radius; + + double angle = HMisc.AngleLl(midR, midC, sRow, sCol, midR, midC, row, col); + + if (angle < 0) + angle += 2 * Math.PI; + + return (radius * angle); + } + + /// <summary> + /// Gets the model information described by + /// the ROI + /// </summary> + public override HTuple getModelData() + { + return new HTuple(new double[] { midR, midC, radius }); + } + + /// <summary> + /// Recalculates the shape of the ROI. Translation is + /// performed at the active handle of the ROI object + /// for the image coordinate (x,y) + /// </summary> + public override void moveByHandle(double newX, double newY) + { + HTuple distance; + double shiftX,shiftY; + + switch (activeHandleIdx) + { + case 0: // handle at circle border + + row1 = newY; + col1 = newX; + HOperatorSet.DistancePp(new HTuple(row1), new HTuple(col1), + new HTuple(midR), new HTuple(midC), + out distance); + + radius = distance[0].D; + break; + case 1: // midpoint + + shiftY = midR - newY; + shiftX = midC - newX; + + midR = newY; + midC = newX; + + row1 -= shiftY; + col1 -= shiftX; + break; + } + } + }//end of class +}//end of namespace diff --git a/HalconTools/ViewROI/ROICircularArc.cs b/HalconTools/ViewROI/ROICircularArc.cs new file mode 100644 index 0000000..47615b5 --- /dev/null +++ b/HalconTools/ViewROI/ROICircularArc.cs @@ -0,0 +1,305 @@ +using System; +using HalconDotNet; + +namespace HalconTools +{ + + /// <summary> + /// This class implements an ROI shaped as a circular + /// arc. ROICircularArc inherits from the base class ROI and + /// implements (besides other auxiliary methods) all virtual methods + /// defined in ROI.cs. + /// </summary> + public class ROICircularArc : ROI + { + //handles + private double midR, midC; // 0. handle: midpoint + private double sizeR, sizeC; // 1. handle + private double startR, startC; // 2. handle + private double extentR, extentC; // 3. handle + + //model data to specify the arc + private double radius; + private double startPhi, extentPhi; // -2*PI <= x <= 2*PI + + //display attributes + private HXLDCont contour; + private HXLDCont arrowHandleXLD; + private string circDir; + private double TwoPI; + private double PI; + + + public ROICircularArc() + { + NumHandles = 4; // midpoint handle + three handles on the arc + activeHandleIdx = 0; + contour = new HXLDCont(); + circDir = ""; + + TwoPI = 2 * Math.PI; + PI = Math.PI; + + arrowHandleXLD = new HXLDCont(); + arrowHandleXLD.GenEmptyObj(); + } + + /// <summary>Creates a new ROI instance at the mouse position</summary> + public override void createROI(double midX, double midY) + { + midR = midY; + midC = midX; + + radius = 100; + + sizeR = midR; + sizeC = midC - radius; + + startPhi = PI * 0.25; + extentPhi = PI * 1.5; + circDir = "positive"; + + determineArcHandles(); + updateArrowHandle(); + } + + /// <summary>Paints the ROI into the supplied window</summary> + /// <param name="window">HALCON window</param> + public override void draw(HalconDotNet.HWindow window) + { + contour.Dispose(); + contour.GenCircleContourXld(midR, midC, radius, startPhi, + (startPhi + extentPhi), circDir, 1.0); + window.DispObj(contour); + window.DispRectangle2(sizeR, sizeC, 0, 5, 5); + window.DispRectangle2(midR, midC, 0, 5, 5); + window.DispRectangle2(startR, startC, startPhi, 10, 2); + window.DispObj(arrowHandleXLD); + } + + /// <summary> + /// Returns the distance of the ROI handle being + /// closest to the image point(x,y) + /// </summary> + public override double distToClosestHandle(double x, double y) + { + double max = 10000; + double [] val = new double[NumHandles]; + + val[0] = HMisc.DistancePp(y, x, midR, midC); // midpoint + val[1] = HMisc.DistancePp(y, x, sizeR, sizeC); // border handle + val[2] = HMisc.DistancePp(y, x, startR, startC); // border handle + val[3] = HMisc.DistancePp(y, x, extentR, extentC); // border handle + + for (int i=0; i < NumHandles; i++) + { + if (val[i] < max) + { + max = val[i]; + activeHandleIdx = i; + } + }// end of for + return val[activeHandleIdx]; + } + + /// <summary> + /// Paints the active handle of the ROI object into the supplied window + /// </summary> + public override void displayActive(HalconDotNet.HWindow window) + { + switch (activeHandleIdx) + { + case 0: + window.DispRectangle2(midR, midC, 0, 5, 5); + break; + case 1: + window.DispRectangle2(sizeR, sizeC, 0, 5, 5); + break; + case 2: + window.DispRectangle2(startR, startC, startPhi, 10, 2); + break; + case 3: + window.DispObj(arrowHandleXLD); + break; + } + } + + /// <summary> + /// Recalculates the shape of the ROI. Translation is + /// performed at the active handle of the ROI object + /// for the image coordinate (x,y) + /// </summary> + public override void moveByHandle(double newX, double newY) + { + HTuple distance; + double dirX, dirY, prior, next, valMax, valMin; + + switch (activeHandleIdx) + { + case 0: // midpoint + dirY = midR - newY; + dirX = midC - newX; + + midR = newY; + midC = newX; + + sizeR -= dirY; + sizeC -= dirX; + + determineArcHandles(); + break; + + case 1: // handle at circle border + sizeR = newY; + sizeC = newX; + + HOperatorSet.DistancePp(new HTuple(sizeR), new HTuple(sizeC), + new HTuple(midR), new HTuple(midC), out distance); + radius = distance[0].D; + determineArcHandles(); + break; + + case 2: // start handle for arc + dirY = newY - midR; + dirX = newX - midC; + + startPhi = Math.Atan2(-dirY, dirX); + + if (startPhi < 0) + startPhi = PI + (startPhi + PI); + + setStartHandle(); + prior = extentPhi; + extentPhi = HMisc.AngleLl(midR, midC, startR, startC, midR, midC, extentR, extentC); + + if (extentPhi < 0 && prior > PI * 0.8) + extentPhi = (PI + extentPhi) + PI; + else if (extentPhi > 0 && prior < -PI * 0.7) + extentPhi = -PI - (PI - extentPhi); + + break; + + case 3: // end handle for arc + dirY = newY - midR; + dirX = newX - midC; + + prior = extentPhi; + next = Math.Atan2(-dirY, dirX); + + if (next < 0) + next = PI + (next + PI); + + if (circDir == "positive" && startPhi >= next) + extentPhi = (next + TwoPI) - startPhi; + else if (circDir == "positive" && next > startPhi) + extentPhi = next - startPhi; + else if (circDir == "negative" && startPhi >= next) + extentPhi = -1.0 * (startPhi - next); + else if (circDir == "negative" && next > startPhi) + extentPhi = -1.0 * (startPhi + TwoPI - next); + + valMax = Math.Max(Math.Abs(prior), Math.Abs(extentPhi)); + valMin = Math.Min(Math.Abs(prior), Math.Abs(extentPhi)); + + if ((valMax - valMin) >= PI) + extentPhi = (circDir == "positive") ? -1.0 * valMin : valMin; + + setExtentHandle(); + break; + } + + circDir = (extentPhi < 0) ? "negative" : "positive"; + updateArrowHandle(); + } + + /// <summary>Gets the HALCON region described by the ROI</summary> + public override HRegion getRegion() + { + HRegion region; + contour.Dispose(); + contour.GenCircleContourXld(midR, midC, radius, startPhi, (startPhi + extentPhi), circDir, 1.0); + region = new HRegion(contour); + return region; + } + + /// <summary> + /// Gets the model information described by the ROI + /// </summary> + public override HTuple getModelData() + { + return new HTuple(new double[] { midR, midC, radius, startPhi, extentPhi }); + } + + /// <summary> + /// Auxiliary method to determine the positions of the second and + /// third handle. + /// </summary> + private void determineArcHandles() + { + setStartHandle(); + setExtentHandle(); + } + + /// <summary> + /// Auxiliary method to recalculate the start handle for the arc + /// </summary> + private void setStartHandle() + { + startR = midR - radius * Math.Sin(startPhi); + startC = midC + radius * Math.Cos(startPhi); + } + + /// <summary> + /// Auxiliary method to recalculate the extent handle for the arc + /// </summary> + private void setExtentHandle() + { + extentR = midR - radius * Math.Sin(startPhi + extentPhi); + extentC = midC + radius * Math.Cos(startPhi + extentPhi); + } + + /// <summary> + /// Auxiliary method to display an arrow at the extent arc position + /// </summary> + private void updateArrowHandle() + { + double row1, col1, row2, col2; + double rowP1, colP1, rowP2, colP2; + double length,dr,dc, halfHW, sign, angleRad; + double headLength = 15; + double headWidth = 15; + + arrowHandleXLD.Dispose(); + arrowHandleXLD.GenEmptyObj(); + + row2 = extentR; + col2 = extentC; + angleRad = (startPhi + extentPhi) + Math.PI * 0.5; + + sign = (circDir == "negative") ? -1.0 : 1.0; + row1 = row2 + sign * Math.Sin(angleRad) * 20; + col1 = col2 - sign * Math.Cos(angleRad) * 20; + + length = HMisc.DistancePp(row1, col1, row2, col2); + if (length == 0) + length = -1; + + dr = (row2 - row1) / length; + dc = (col2 - col1) / length; + + halfHW = headWidth / 2.0; + rowP1 = row1 + (length - headLength) * dr + halfHW * dc; + rowP2 = row1 + (length - headLength) * dr - halfHW * dc; + colP1 = col1 + (length - headLength) * dc - halfHW * dr; + colP2 = col1 + (length - headLength) * dc + halfHW * dr; + + if (length == -1) + arrowHandleXLD.GenContourPolygonXld(row1, col1); + else + arrowHandleXLD.GenContourPolygonXld(new HTuple(new double[] { row1, row2, rowP1, row2, rowP2, row2 }), + new HTuple(new double[] { col1, col2, colP1, col2, colP2, col2 })); + } + + }//end of class +}//end of namespace + diff --git a/HalconTools/ViewROI/ROIController.cs b/HalconTools/ViewROI/ROIController.cs new file mode 100644 index 0000000..5c3d429 --- /dev/null +++ b/HalconTools/ViewROI/ROIController.cs @@ -0,0 +1,402 @@ +using System; +using HalconDotNet; +using HalconTools; +using System.Collections; + + + +namespace HalconTools +{ + + public delegate void FuncROIDelegate(); + + /// <summary> + /// This class creates and manages ROI objects. It responds + /// to mouse device inputs using the methods mouseDownAction and + /// mouseMoveAction. You don't have to know this class in detail when you + /// build your own C# project. But you must consider a few things if + /// you want to use interactive ROIs in your application: There is a + /// quite close connection between the ROIController and the HWndCtrl + /// class, which means that you must 'register' the ROIController + /// with the HWndCtrl, so the HWndCtrl knows it has to forward user input + /// (like mouse events) to the ROIController class. + /// The visualization and manipulation of the ROI objects is done + /// by the ROIController. + /// This class provides special support for the matching + /// applications by calculating a model region from the list of ROIs. For + /// this, ROIs are added and subtracted according to their sign. + /// </summary> + public class ROIController + { + + /// <summary> + /// Constant for setting the ROI mode: positive ROI sign. + /// </summary> + public const int MODE_ROI_POS = 21; + + /// <summary> + /// Constant for setting the ROI mode: negative ROI sign. + /// </summary> + public const int MODE_ROI_NEG = 22; + + /// <summary> + /// Constant for setting the ROI mode: no model region is computed as + /// the sum of all ROI objects. + /// </summary> + public const int MODE_ROI_NONE = 23; + + /// <summary>Constant describing an update of the model region</summary> + public const int EVENT_UPDATE_ROI = 50; + + public const int EVENT_CHANGED_ROI_SIGN = 51; + + /// <summary>Constant describing an update of the model region</summary> + public const int EVENT_MOVING_ROI = 52; + + public const int EVENT_DELETED_ACTROI = 53; + + public const int EVENT_DELETED_ALL_ROIS = 54; + + public const int EVENT_ACTIVATED_ROI = 55; + + public const int EVENT_CREATED_ROI = 56; + + + private ROI roiMode; + private int stateROI; + private double currX, currY; + + + /// <summary>Index of the active ROI object</summary> + public int activeROIidx; + public int deletedIdx; + + /// <summary>List containing all created ROI objects so far</summary> + public ArrayList ROIList; + + /// <summary> + /// Region obtained by summing up all negative + /// and positive ROI objects from the ROIList + /// </summary> + public HRegion ModelROI; + + private string activeCol = "green"; + private string activeHdlCol = "red"; + private string inactiveCol = "yellow"; + + /// <summary> + /// Reference to the HWndCtrl, the ROI Controller is registered to + /// </summary> + public HWndCtrl viewController; + + /// <summary> + /// Delegate that notifies about changes made in the model region + /// </summary> + public IconicDelegate NotifyRCObserver; + + /// <summary>Constructor</summary> + public ROIController() + { + stateROI = MODE_ROI_NONE; + ROIList = new ArrayList(); + activeROIidx = -1; + ModelROI = new HRegion(); + NotifyRCObserver = new IconicDelegate(dummyI); + deletedIdx = -1; + currX = currY = -1; + } + + /// <summary>Registers the HWndCtrl to this ROIController instance</summary> + public void setViewController(HWndCtrl view) + { + viewController = view; + } + + /// <summary>Gets the ModelROI object</summary> + public HRegion getModelRegion() + { + return ModelROI; + } + + /// <summary>Gets the List of ROIs created so far</summary> + public ArrayList getROIList() + { + return ROIList; + } + + /// <summary>Get the active ROI</summary> + public ROI getActiveROI() + { + if (activeROIidx != -1) + return ((ROI)ROIList[activeROIidx]); + + return null; + } + + public int getActiveROIIdx() + { + return activeROIidx; + } + + public void setActiveROIIdx(int active) + { + activeROIidx = active; + } + + public int getDelROIIdx() + { + return deletedIdx; + } + + /// <summary> + /// To create a new ROI object the application class initializes a + /// 'seed' ROI instance and passes it to the ROIController. + /// The ROIController now responds by manipulating this new ROI + /// instance. + /// </summary> + /// <param name="r"> + /// 'Seed' ROI object forwarded by the application forms class. + /// </param> + public void setROIShape(ROI r) + { + roiMode = r; + roiMode.setOperatorFlag(stateROI); + } + + + /// <summary> + /// Sets the sign of a ROI object to the value 'mode' (MODE_ROI_NONE, + /// MODE_ROI_POS,MODE_ROI_NEG) + /// </summary> + public void setROISign(int mode) + { + stateROI = mode; + + if (activeROIidx != -1) + { + ((ROI)ROIList[activeROIidx]).setOperatorFlag(stateROI); + viewController.repaint(); + NotifyRCObserver(ROIController.EVENT_CHANGED_ROI_SIGN); + } + } + + /// <summary> + /// Removes the ROI object that is marked as active. + /// If no ROI object is active, then nothing happens. + /// </summary> + public void removeActive() + { + if (activeROIidx != -1) + { + ROIList.RemoveAt(activeROIidx); + deletedIdx = activeROIidx; + activeROIidx = -1; + viewController.repaint(); + NotifyRCObserver(EVENT_DELETED_ACTROI); + } + } + + + /// <summary> + /// Calculates the ModelROI region for all objects contained + /// in ROIList, by adding and subtracting the positive and + /// negative ROI objects. + /// </summary> + public bool defineModelROI() + { + HRegion tmpAdd, tmpDiff, tmp; + double row, col; + + if (stateROI == MODE_ROI_NONE) + return true; + + tmpAdd = new HRegion(); + tmpDiff = new HRegion(); + tmpAdd.GenEmptyRegion(); + tmpDiff.GenEmptyRegion(); + + for (int i=0; i < ROIList.Count; i++) + { + switch (((ROI)ROIList[i]).getOperatorFlag()) + { + case ROI.POSITIVE_FLAG: + tmp = ((ROI)ROIList[i]).getRegion(); + tmpAdd = tmp.Union2(tmpAdd); + break; + case ROI.NEGATIVE_FLAG: + tmp = ((ROI)ROIList[i]).getRegion(); + tmpDiff = tmp.Union2(tmpDiff); + break; + default: + break; + }//end of switch + }//end of for + + ModelROI = null; + + if (tmpAdd.AreaCenter(out row, out col) > 0) + { + tmp = tmpAdd.Difference(tmpDiff); + if (tmp.AreaCenter(out row, out col) > 0) + ModelROI = tmp; + } + + //in case the set of positiv and negative ROIs dissolve + if (ModelROI == null || ROIList.Count == 0) + return false; + + return true; + } + + + /// <summary> + /// Clears all variables managing ROI objects + /// </summary> + public void reset() + { + ROIList.Clear(); + activeROIidx = -1; + ModelROI = null; + roiMode = null; + NotifyRCObserver(EVENT_DELETED_ALL_ROIS); + } + + + /// <summary> + /// Deletes this ROI instance if a 'seed' ROI object has been passed + /// to the ROIController by the application class. + /// + /// </summary> + public void resetROI() + { + activeROIidx = -1; + roiMode = null; + } + + /// <summary>Defines the colors for the ROI objects</summary> + /// <param name="aColor">Color for the active ROI object</param> + /// <param name="inaColor">Color for the inactive ROI objects</param> + /// <param name="aHdlColor"> + /// Color for the active handle of the active ROI object + /// </param> + public void setDrawColor(string aColor, + string aHdlColor, + string inaColor) + { + if (aColor != "") + activeCol = aColor; + if (aHdlColor != "") + activeHdlCol = aHdlColor; + if (inaColor != "") + inactiveCol = inaColor; + } + + + /// <summary> + /// Paints all objects from the ROIList into the HALCON window + /// </summary> + /// <param name="window">HALCON window</param> + public void paintData(HalconDotNet.HWindow window) + { + window.SetDraw("margin"); + window.SetLineWidth(1); + + if (ROIList.Count > 0) + { + window.SetColor(inactiveCol); + window.SetDraw("margin"); + + for (int i=0; i < ROIList.Count; i++) + { + window.SetLineStyle(((ROI)ROIList[i]).flagLineStyle); + ((ROI)ROIList[i]).draw(window); + } + + if (activeROIidx != -1) + { + window.SetColor(activeCol); + window.SetLineStyle(((ROI)ROIList[activeROIidx]).flagLineStyle); + ((ROI)ROIList[activeROIidx]).draw(window); + + window.SetColor(activeHdlCol); + ((ROI)ROIList[activeROIidx]).displayActive(window); + } + } + } + + /// <summary> + /// Reaction of ROI objects to the 'mouse button down' event: changing + /// the shape of the ROI and adding it to the ROIList if it is a 'seed' + /// ROI. + /// </summary> + /// <param name="imgX">x coordinate of mouse event</param> + /// <param name="imgY">y coordinate of mouse event</param> + /// <returns></returns> + public int mouseDownAction(double imgX, double imgY) + { + int idxROI= -1; + double max = 10000, dist = 0; + double epsilon = 35.0; //maximal shortest distance to one of + //the handles + + if (roiMode != null) //either a new ROI object is created + { + roiMode.createROI(imgX, imgY); + ROIList.Add(roiMode); + roiMode = null; + activeROIidx = ROIList.Count - 1; + viewController.repaint(); + + NotifyRCObserver(ROIController.EVENT_CREATED_ROI); + } + else if (ROIList.Count > 0) // ... or an existing one is manipulated + { + activeROIidx = -1; + + for (int i =0; i < ROIList.Count; i++) + { + dist = ((ROI)ROIList[i]).distToClosestHandle(imgX, imgY); + if ((dist < max) && (dist < epsilon)) + { + max = dist; + idxROI = i; + } + }//end of for + + if (idxROI >= 0) + { + activeROIidx = idxROI; + NotifyRCObserver(ROIController.EVENT_ACTIVATED_ROI); + } + + viewController.repaint(); + } + return activeROIidx; + } + + /// <summary> + /// Reaction of ROI objects to the 'mouse button move' event: moving + /// the active ROI. + /// </summary> + /// <param name="newX">x coordinate of mouse event</param> + /// <param name="newY">y coordinate of mouse event</param> + public void mouseMoveAction(double newX, double newY) + { + if ((newX == currX) && (newY == currY)) + return; + + ((ROI)ROIList[activeROIidx]).moveByHandle(newX, newY); + viewController.repaint(); + currX = newX; + currY = newY; + NotifyRCObserver(ROIController.EVENT_MOVING_ROI); + } + + + /***********************************************************/ + public void dummyI(int v) + { + } + + }//end of class +}//end of namespace diff --git a/HalconTools/ViewROI/ROILine.cs b/HalconTools/ViewROI/ROILine.cs new file mode 100644 index 0000000..6579da9 --- /dev/null +++ b/HalconTools/ViewROI/ROILine.cs @@ -0,0 +1,204 @@ +using System; +using HalconDotNet; + +namespace HalconTools +{ + /// <summary> + /// This class demonstrates one of the possible implementations for a + /// linear ROI. ROILine inherits from the base class ROI and + /// implements (besides other auxiliary methods) all virtual methods + /// defined in ROI.cs. + /// </summary> + public class ROILine : ROI + { + + public double row1, col1; // first end point of line + public double row2, col2; // second end point of line + public double midR, midC; // midPoint of line + + private HXLDCont arrowHandleXLD; + + public ROILine() + { + NumHandles = 3; // two end points of line + activeHandleIdx = 2; + arrowHandleXLD = new HXLDCont(); + arrowHandleXLD.GenEmptyObj(); + } + + public double hrow = 0; + public double hcol = 50; + + /// <summary>Creates a new ROI instance at the mouse position.</summary> + public override void createROI(double midX, double midY) + { + midR = midY; + midC = midX; + + row1 = midR - hrow; + col1 = midC - hcol; + row2 = midR + hrow; + col2 = midC + hcol; + + updateArrowHandle(); + } + + /// <summary>Paints the ROI into the supplied window.</summary> + public override void draw(HalconDotNet.HWindow window) + { + + window.DispLine(row1, col1, row2, col2); + + window.DispRectangle2(row1, col1, 0, 5, 5); + window.DispObj(arrowHandleXLD); //window.DispRectangle2( row2, col2, 0, 5, 5); + window.DispRectangle2(midR, midC, 0, 5, 5); + } + + /// <summary> + /// Returns the distance of the ROI handle being + /// closest to the image point(x,y). + /// </summary> + public override double distToClosestHandle(double x, double y) + { + + double max = 10000; + double [] val = new double[NumHandles]; + + val[0] = HMisc.DistancePp(y, x, row1, col1); // upper left + val[1] = HMisc.DistancePp(y, x, row2, col2); // upper right + val[2] = HMisc.DistancePp(y, x, midR, midC); // midpoint + + for (int i=0; i < NumHandles; i++) + { + if (val[i] < max) + { + max = val[i]; + activeHandleIdx = i; + } + }// end of for + + return val[activeHandleIdx]; + } + + /// <summary> + /// Paints the active handle of the ROI object into the supplied window. + /// </summary> + public override void displayActive(HalconDotNet.HWindow window) + { + + switch (activeHandleIdx) + { + case 0: + window.DispRectangle2(row1, col1, 0, 5, 5); + break; + case 1: + window.DispObj(arrowHandleXLD); //window.DispRectangle2(row2, col2, 0, 5, 5); + break; + case 2: + window.DispRectangle2(midR, midC, 0, 5, 5); + break; + } + } + + /// <summary>Gets the HALCON region described by the ROI.</summary> + public override HRegion getRegion() + { + HRegion region = new HRegion(); + region.GenRegionLine(row1, col1, row2, col2); + return region; + } + + public override double getDistanceFromStartPoint(double row, double col) + { + double distance = HMisc.DistancePp(row, col, row1, col1); + return distance; + } + /// <summary> + /// Gets the model information described by + /// the ROI. + /// </summary> + public override HTuple getModelData() + { + return new HTuple(new double[] { row1, col1, row2, col2 }); + } + + /// <summary> + /// Recalculates the shape of the ROI. Translation is + /// performed at the active handle of the ROI object + /// for the image coordinate (x,y). + /// </summary> + public override void moveByHandle(double newX, double newY) + { + double lenR, lenC; + + switch (activeHandleIdx) + { + case 0: // first end point + row1 = newY; + col1 = newX; + + midR = (row1 + row2) / 2; + midC = (col1 + col2) / 2; + break; + case 1: // last end point + row2 = newY; + col2 = newX; + + midR = (row1 + row2) / 2; + midC = (col1 + col2) / 2; + break; + case 2: // midpoint + lenR = row1 - midR; + lenC = col1 - midC; + + midR = newY; + midC = newX; + + row1 = midR + lenR; + col1 = midC + lenC; + row2 = midR - lenR; + col2 = midC - lenC; + break; + } + updateArrowHandle(); + } + + + /// <summary> Auxiliary method </summary> + private void updateArrowHandle() + { + double length,dr,dc, halfHW; + double rrow1, ccol1,rowP1, colP1, rowP2, colP2; + + double headLength = 15; + double headWidth = 15; + + + arrowHandleXLD.Dispose(); + arrowHandleXLD.GenEmptyObj(); + + rrow1 = row1 + (row2 - row1) * 0.8; + ccol1 = col1 + (col2 - col1) * 0.8; + + length = HMisc.DistancePp(rrow1, ccol1, row2, col2); + if (length == 0) + length = -1; + + dr = (row2 - rrow1) / length; + dc = (col2 - ccol1) / length; + + halfHW = headWidth / 2.0; + rowP1 = rrow1 + (length - headLength) * dr + halfHW * dc; + rowP2 = rrow1 + (length - headLength) * dr - halfHW * dc; + colP1 = ccol1 + (length - headLength) * dc - halfHW * dr; + colP2 = ccol1 + (length - headLength) * dc + halfHW * dr; + + if (length == -1) + arrowHandleXLD.GenContourPolygonXld(rrow1, ccol1); + else + arrowHandleXLD.GenContourPolygonXld(new HTuple(new double[] { rrow1, row2, rowP1, row2, rowP2, row2 }), + new HTuple(new double[] { ccol1, col2, colP1, col2, colP2, col2 })); + } + + }//end of class +}//end of namespace diff --git a/HalconTools/ViewROI/ROIRectangle1.cs b/HalconTools/ViewROI/ROIRectangle1.cs new file mode 100644 index 0000000..d835340 --- /dev/null +++ b/HalconTools/ViewROI/ROIRectangle1.cs @@ -0,0 +1,211 @@ +using System; +using HalconDotNet; + + +namespace HalconTools +{ + /// <summary> + /// This class demonstrates one of the possible implementations for a + /// (simple) rectangularly shaped ROI. ROIRectangle1 inherits + /// from the base class ROI and implements (besides other auxiliary + /// methods) all virtual methods defined in ROI.cs. + /// Since a simple rectangle is defined by two data points, by the upper + /// left corner and the lower right corner, we use four values (row1/col1) + /// and (row2/col2) as class members to hold these positions at + /// any time of the program. The four corners of the rectangle can be taken + /// as handles, which the user can use to manipulate the size of the ROI. + /// Furthermore, we define a midpoint as an additional handle, with which + /// the user can grab and drag the ROI. Therefore, we declare NumHandles + /// to be 5 and set the activeHandle to be 0, which will be the upper left + /// corner of our ROI. + /// </summary> + public class ROIRectangle1 : ROI + { + + private double row1, col1; // upper left + private double row2, col2; // lower right + private double midR, midC; // midpoint + + + /// <summary>Constructor</summary> + public ROIRectangle1() + { + + NumHandles = 5; // 4 corner points + midpoint + activeHandleIdx = 4; + } + + /// <summary>Creates a new ROI instance at the mouse position</summary> + /// <param name="midX"> + /// x (=column) coordinate for interactive ROI + /// </param> + /// <param name="midY"> + /// y (=row) coordinate for interactive ROI + /// </param> + public override void createROI(double midX, double midY) + { + midR = midY; + midC = midX; + + row1 = midR - 50; + col1 = midC - 50; + row2 = midR + 50; + col2 = midC + 50; + } + + /// <summary>Paints the ROI into the supplied window</summary> + /// <param name="window">HALCON window</param> + public override void draw(HalconDotNet.HWindow window) + { + window.DispRectangle1(row1, col1, row2, col2); + + window.DispRectangle2(row1, col1, 0, 5, 5); + window.DispRectangle2(row1, col2, 0, 5, 5); + window.DispRectangle2(row2, col2, 0, 5, 5); + window.DispRectangle2(row2, col1, 0, 5, 5); + window.DispRectangle2(midR, midC, 0, 5, 5); + } + + /// <summary> + /// Returns the distance of the ROI handle being + /// closest to the image point(x,y) + /// </summary> + /// <param name="x">x (=column) coordinate</param> + /// <param name="y">y (=row) coordinate</param> + /// <returns> + /// Distance of the closest ROI handle. + /// </returns> + public override double distToClosestHandle(double x, double y) + { + + double max = 10000; + double [] val = new double[NumHandles]; + + midR = ((row2 - row1) / 2) + row1; + midC = ((col2 - col1) / 2) + col1; + + val[0] = HMisc.DistancePp(y, x, row1, col1); // upper left + val[1] = HMisc.DistancePp(y, x, row1, col2); // upper right + val[2] = HMisc.DistancePp(y, x, row2, col2); // lower right + val[3] = HMisc.DistancePp(y, x, row2, col1); // lower left + val[4] = HMisc.DistancePp(y, x, midR, midC); // midpoint + + for (int i=0; i < NumHandles; i++) + { + if (val[i] < max) + { + max = val[i]; + activeHandleIdx = i; + } + }// end of for + + return val[activeHandleIdx]; + } + + /// <summary> + /// Paints the active handle of the ROI object into the supplied window + /// </summary> + /// <param name="window">HALCON window</param> + public override void displayActive(HalconDotNet.HWindow window) + { + switch (activeHandleIdx) + { + case 0: + window.DispRectangle2(row1, col1, 0, 5, 5); + break; + case 1: + window.DispRectangle2(row1, col2, 0, 5, 5); + break; + case 2: + window.DispRectangle2(row2, col2, 0, 5, 5); + break; + case 3: + window.DispRectangle2(row2, col1, 0, 5, 5); + break; + case 4: + window.DispRectangle2(midR, midC, 0, 5, 5); + break; + } + } + + /// <summary>Gets the HALCON region described by the ROI</summary> + public override HRegion getRegion() + { + HRegion region = new HRegion(); + region.GenRectangle1(row1, col1, row2, col2); + return region; + } + + /// <summary> + /// Gets the model information described by + /// the interactive ROI + /// </summary> + public override HTuple getModelData() + { + return new HTuple(new double[] { row1, col1, row2, col2 }); + } + + + /// <summary> + /// Recalculates the shape of the ROI instance. Translation is + /// performed at the active handle of the ROI object + /// for the image coordinate (x,y) + /// </summary> + /// <param name="newX">x mouse coordinate</param> + /// <param name="newY">y mouse coordinate</param> + public override void moveByHandle(double newX, double newY) + { + double len1, len2; + double tmp; + + switch (activeHandleIdx) + { + case 0: // upper left + row1 = newY; + col1 = newX; + break; + case 1: // upper right + row1 = newY; + col2 = newX; + break; + case 2: // lower right + row2 = newY; + col2 = newX; + break; + case 3: // lower left + row2 = newY; + col1 = newX; + break; + case 4: // midpoint + len1 = ((row2 - row1) / 2); + len2 = ((col2 - col1) / 2); + + row1 = newY - len1; + row2 = newY + len1; + + col1 = newX - len2; + col2 = newX + len2; + + break; + } + + if (row2 <= row1) + { + tmp = row1; + row1 = row2; + row2 = tmp; + } + + if (col2 <= col1) + { + tmp = col1; + col1 = col2; + col2 = tmp; + } + + midR = ((row2 - row1) / 2) + row1; + midC = ((col2 - col1) / 2) + col1; + + }//end of method + }//end of class +}//end of namespace diff --git a/HalconTools/ViewROI/ROIRectangle2.cs b/HalconTools/ViewROI/ROIRectangle2.cs new file mode 100644 index 0000000..d6140ba --- /dev/null +++ b/HalconTools/ViewROI/ROIRectangle2.cs @@ -0,0 +1,251 @@ +using System; +using HalconDotNet; + + + +namespace HalconTools +{ + + /// <summary> + /// This class demonstrates one of the possible implementations for a + /// (simple) rectangularly shaped ROI. To create this rectangle we use + /// a center point (midR, midC), an orientation 'phi' and the half + /// edge lengths 'length1' and 'length2', similar to the HALCON + /// operator gen_rectangle2(). + /// The class ROIRectangle2 inherits from the base class ROI and + /// implements (besides other auxiliary methods) all virtual methods + /// defined in ROI.cs. + /// </summary> + public class ROIRectangle2 : ROI + { + + /// <summary>Half length of the rectangle side, perpendicular to phi</summary> + private double length1; + + /// <summary>Half length of the rectangle side, in direction of phi</summary> + private double length2; + + /// <summary>Row coordinate of midpoint of the rectangle</summary> + private double midR; + + /// <summary>Column coordinate of midpoint of the rectangle</summary> + private double midC; + + /// <summary>Orientation of rectangle defined in radians.</summary> + private double phi; + + //auxiliary variables + HTuple rowsInit; + HTuple colsInit; + HTuple rows; + HTuple cols; + + HHomMat2D hom2D, tmp; + + /// <summary>Constructor</summary> + public ROIRectangle2() + { + NumHandles = 6; // 4 corners + 1 midpoint + 1 rotationpoint + activeHandleIdx = 4; + } + + /// <summary>Creates a new ROI instance at the mouse position</summary> + /// <param name="midX"> + /// x (=column) coordinate for interactive ROI + /// </param> + /// <param name="midY"> + /// y (=row) coordinate for interactive ROI + /// </param> + public override void createROI(double midX, double midY) + { + midR = midY; + midC = midX; + + length1 = 100; + length2 = 50; + + phi = 0.0; + + rowsInit = new HTuple(new double[] {-1.0, -1.0, 1.0, + 1.0, 0.0, 0.0 }); + colsInit = new HTuple(new double[] {-1.0, 1.0, 1.0, + -1.0, 0.0, 0.6 }); + //order ul , ur, lr, ll, mp, arrowMidpoint + hom2D = new HHomMat2D(); + tmp = new HHomMat2D(); + + updateHandlePos(); + } + + /// <summary>Paints the ROI into the supplied window</summary> + /// <param name="window">HALCON window</param> + public override void draw(HalconDotNet.HWindow window) + { + window.DispRectangle2(midR, midC, -phi, length1, length2); + for (int i =0; i < NumHandles; i++) + window.DispRectangle2(rows[i].D, cols[i].D, -phi, 5, 5); + + window.DispArrow(midR, midC, midR + (Math.Sin(phi) * length1 * 1.2), + midC + (Math.Cos(phi) * length1 * 1.2), 2.0); + + } + + /// <summary> + /// Returns the distance of the ROI handle being + /// closest to the image point(x,y) + /// </summary> + /// <param name="x">x (=column) coordinate</param> + /// <param name="y">y (=row) coordinate</param> + /// <returns> + /// Distance of the closest ROI handle. + /// </returns> + public override double distToClosestHandle(double x, double y) + { + double max = 10000; + double [] val = new double[NumHandles]; + + + for (int i=0; i < NumHandles; i++) + val[i] = HMisc.DistancePp(y, x, rows[i].D, cols[i].D); + + for (int i=0; i < NumHandles; i++) + { + if (val[i] < max) + { + max = val[i]; + activeHandleIdx = i; + } + } + return val[activeHandleIdx]; + } + + /// <summary> + /// Paints the active handle of the ROI object into the supplied window + /// </summary> + /// <param name="window">HALCON window</param> + public override void displayActive(HalconDotNet.HWindow window) + { + window.DispRectangle2(rows[activeHandleIdx].D, + cols[activeHandleIdx].D, + -phi, 5, 5); + + if (activeHandleIdx == 5) + window.DispArrow(midR, midC, + midR + (Math.Sin(phi) * length1 * 1.2), + midC + (Math.Cos(phi) * length1 * 1.2), + 2.0); + } + + + /// <summary>Gets the HALCON region described by the ROI</summary> + public override HRegion getRegion() + { + HRegion region = new HRegion(); + region.GenRectangle2(midR, midC, -phi, length1, length2); + return region; + } + + /// <summary> + /// Gets the model information described by + /// the interactive ROI + /// </summary> + public override HTuple getModelData() + { + return new HTuple(new double[] { midR, midC, phi, length1, length2 }); + } + + /// <summary> + /// Recalculates the shape of the ROI instance. Translation is + /// performed at the active handle of the ROI object + /// for the image coordinate (x,y) + /// </summary> + /// <param name="newX">x mouse coordinate</param> + /// <param name="newY">y mouse coordinate</param> + public override void moveByHandle(double newX, double newY) + { + double vX, vY, x=0, y=0; + + switch (activeHandleIdx) + { + case 0: + case 1: + case 2: + case 3: + tmp = hom2D.HomMat2dInvert(); + x = tmp.AffineTransPoint2d(newX, newY, out y); + + length2 = Math.Abs(y); + length1 = Math.Abs(x); + + checkForRange(x, y); + break; + case 4: + midC = newX; + midR = newY; + break; + case 5: + vY = newY - rows[4].D; + vX = newX - cols[4].D; + phi = Math.Atan2(vY, vX); + break; + } + updateHandlePos(); + }//end of method + + + /// <summary> + /// Auxiliary method to recalculate the contour points of + /// the rectangle by transforming the initial row and + /// column coordinates (rowsInit, colsInit) by the updated + /// homography hom2D + /// </summary> + private void updateHandlePos() + { + hom2D.HomMat2dIdentity(); + hom2D = hom2D.HomMat2dTranslate(midC, midR); + hom2D = hom2D.HomMat2dRotateLocal(phi); + tmp = hom2D.HomMat2dScaleLocal(length1, length2); + cols = tmp.AffineTransPoint2d(colsInit, rowsInit, out rows); + } + + + /* This auxiliary method checks the half lengths + * (length1, length2) using the coordinates (x,y) of the four + * rectangle corners (handles 0 to 3) to avoid 'bending' of + * the rectangular ROI at its midpoint, when it comes to a + * 'collapse' of the rectangle for length1=length2=0. + * */ + private void checkForRange(double x, double y) + { + switch (activeHandleIdx) + { + case 0: + if ((x < 0) && (y < 0)) + return; + if (x >= 0) length1 = 0.01; + if (y >= 0) length2 = 0.01; + break; + case 1: + if ((x > 0) && (y < 0)) + return; + if (x <= 0) length1 = 0.01; + if (y >= 0) length2 = 0.01; + break; + case 2: + if ((x > 0) && (y > 0)) + return; + if (x <= 0) length1 = 0.01; + if (y <= 0) length2 = 0.01; + break; + case 3: + if ((x < 0) && (y > 0)) + return; + if (x >= 0) length1 = 0.01; + if (y <= 0) length2 = 0.01; + break; + default: + break; + } + } + }//end of class +}//end of namespace diff --git a/HalconTools/frmCalibration.Designer.cs b/HalconTools/frmCalibration.Designer.cs new file mode 100644 index 0000000..b4297bb --- /dev/null +++ b/HalconTools/frmCalibration.Designer.cs @@ -0,0 +1,2958 @@ +锘縩amespace HalconTools +{ + partial class frmCalibration + { + /// <summary> + /// 蹇呴渶鐨勮璁″櫒鍙橀噺銆� + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// 娓呯悊鎵�鏈夋鍦ㄤ娇鐢ㄧ殑璧勬簮銆� + /// </summary> + /// <param name="disposing">濡傛灉搴旈噴鏀炬墭绠¤祫婧愶紝涓� true锛涘惁鍒欎负 false銆�</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows 绐椾綋璁捐鍣ㄧ敓鎴愮殑浠g爜 + + /// <summary> + /// 璁捐鍣ㄦ敮鎸佹墍闇�鐨勬柟娉� - 涓嶈 + /// 浣跨敤浠g爜缂栬緫鍣ㄤ慨鏀规鏂规硶鐨勫唴瀹广�� + /// </summary> + private void InitializeComponent() + { + this.viewPort = new HalconDotNet.HWindowControl(); + this.tabControl = new System.Windows.Forms.TabControl(); + this.tabPageCalib = new System.Windows.Forms.TabPage(); + this.ListCalibImg = new System.Windows.Forms.ListView(); + this.ColRef = new System.Windows.Forms.ColumnHeader(); + this.ColImg = new System.Windows.Forms.ColumnHeader(); + this.ColStatus = new System.Windows.Forms.ColumnHeader(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.buttonDefaultParams = new System.Windows.Forms.Button(); + this.LineScanAddPanel = new System.Windows.Forms.Panel(); + this.label72 = new System.Windows.Forms.Label(); + this.label73 = new System.Windows.Forms.Label(); + this.label74 = new System.Windows.Forms.Label(); + this.label75 = new System.Windows.Forms.Label(); + this.label76 = new System.Windows.Forms.Label(); + this.label77 = new System.Windows.Forms.Label(); + this.MotionZUpDown = new System.Windows.Forms.NumericUpDown(); + this.MotionYUpDown = new System.Windows.Forms.NumericUpDown(); + this.MotionXUpDown = new System.Windows.Forms.NumericUpDown(); + this.label71 = new System.Windows.Forms.Label(); + this.label70 = new System.Windows.Forms.Label(); + this.label69 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.TelecentricCheckBox = new System.Windows.Forms.CheckBox(); + this.FocalLengthUpDown = new System.Windows.Forms.NumericUpDown(); + this.SyUpDown = new System.Windows.Forms.NumericUpDown(); + this.SxUpDown = new System.Windows.Forms.NumericUpDown(); + this.buttonImportParams = new System.Windows.Forms.Button(); + this.textBoxDescr = new System.Windows.Forms.TextBox(); + this.CamTypComboBox = new System.Windows.Forms.ComboBox(); + this.label4 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.ThicknessUpDown = new System.Windows.Forms.NumericUpDown(); + this.label2 = new System.Windows.Forms.Label(); + this.buttonLoadDescrFile = new System.Windows.Forms.Button(); + this.buttonCalibrate = new System.Windows.Forms.Button(); + this.buttonSetReference = new System.Windows.Forms.Button(); + this.buttonDeleteAll = new System.Windows.Forms.Button(); + this.buttonDelete = new System.Windows.Forms.Button(); + this.buttonLoad = new System.Windows.Forms.Button(); + this.tabPageQualityCheck = new System.Windows.Forms.TabPage(); + this.WarnlevelUpDown = new System.Windows.Forms.NumericUpDown(); + this.ListQualityCheck = new System.Windows.Forms.ListView(); + this.ColScope = new System.Windows.Forms.ColumnHeader(); + this.ColDescr = new System.Windows.Forms.ColumnHeader(); + this.Col2Status = new System.Windows.Forms.ColumnHeader(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.MaxDiamTrackBar = new System.Windows.Forms.TrackBar(); + this.MaxDiamResetButton = new System.Windows.Forms.Button(); + this.MaxDiamUpDown = new System.Windows.Forms.NumericUpDown(); + this.label19 = new System.Windows.Forms.Label(); + this.MinContLResetButton = new System.Windows.Forms.Button(); + this.MinContLTrackBar = new System.Windows.Forms.TrackBar(); + this.MinContLUpDown = new System.Windows.Forms.NumericUpDown(); + this.label18 = new System.Windows.Forms.Label(); + this.SmootingResetButton = new System.Windows.Forms.Button(); + this.SmoothTrackBar = new System.Windows.Forms.TrackBar(); + this.SmoothUpDown = new System.Windows.Forms.NumericUpDown(); + this.label17 = new System.Windows.Forms.Label(); + this.MinThreshResetButton = new System.Windows.Forms.Button(); + this.MinThreshTrackBar = new System.Windows.Forms.TrackBar(); + this.MinThreshUpDown = new System.Windows.Forms.NumericUpDown(); + this.label16 = new System.Windows.Forms.Label(); + this.ThreshDecrResetButton = new System.Windows.Forms.Button(); + this.ThreshDecrTrackBar = new System.Windows.Forms.TrackBar(); + this.ThreshDecrUpDown = new System.Windows.Forms.NumericUpDown(); + this.label15 = new System.Windows.Forms.Label(); + this.InitThreshResetButton = new System.Windows.Forms.Button(); + this.InitThreshTrackBar = new System.Windows.Forms.TrackBar(); + this.InitThreshUpDown = new System.Windows.Forms.NumericUpDown(); + this.label14 = new System.Windows.Forms.Label(); + this.MinDiamResetButton = new System.Windows.Forms.Button(); + this.MinDiamTrackBar = new System.Windows.Forms.TrackBar(); + this.MinDiamUpDown = new System.Windows.Forms.NumericUpDown(); + this.label13 = new System.Windows.Forms.Label(); + this.MarkThreshResetButton = new System.Windows.Forms.Button(); + this.MarkThreshTrackBar = new System.Windows.Forms.TrackBar(); + this.MarkThreshUpDown = new System.Windows.Forms.NumericUpDown(); + this.label12 = new System.Windows.Forms.Label(); + this.FilterSizeResetButton = new System.Windows.Forms.Button(); + this.FilterSizeTrackBar = new System.Windows.Forms.TrackBar(); + this.FilterSizeUpDown = new System.Windows.Forms.NumericUpDown(); + this.label11 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.SeqTestsComboBox = new System.Windows.Forms.ComboBox(); + this.label8 = new System.Windows.Forms.Label(); + this.ImgTestsComboBox = new System.Windows.Forms.ComboBox(); + this.tabPageResults = new System.Windows.Forms.TabPage(); + this.label20 = new System.Windows.Forms.Label(); + this.buttonSimImg = new System.Windows.Forms.RadioButton(); + this.buttonRefImg = new System.Windows.Forms.RadioButton(); + this.groupBox6 = new System.Windows.Forms.GroupBox(); + this.checkBoxOrigImgCoord = new System.Windows.Forms.CheckBox(); + this.buttonSaveCamPose = new System.Windows.Forms.Button(); + this.label59 = new System.Windows.Forms.Label(); + this.label60 = new System.Windows.Forms.Label(); + this.label61 = new System.Windows.Forms.Label(); + this.label62 = new System.Windows.Forms.Label(); + this.CamGammaLabel = new System.Windows.Forms.Label(); + this.label64 = new System.Windows.Forms.Label(); + this.CamBetaLabel = new System.Windows.Forms.Label(); + this.label66 = new System.Windows.Forms.Label(); + this.CamAlphaLabel = new System.Windows.Forms.Label(); + this.label50 = new System.Windows.Forms.Label(); + this.label51 = new System.Windows.Forms.Label(); + this.label52 = new System.Windows.Forms.Label(); + this.label53 = new System.Windows.Forms.Label(); + this.CamPoseZLabel = new System.Windows.Forms.Label(); + this.label55 = new System.Windows.Forms.Label(); + this.CamPoseYLabel = new System.Windows.Forms.Label(); + this.label57 = new System.Windows.Forms.Label(); + this.CamPoseXLabel = new System.Windows.Forms.Label(); + this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.AreaScanPolynomPanel = new System.Windows.Forms.Panel(); + this.P2Label = new System.Windows.Forms.Label(); + this.label83 = new System.Windows.Forms.Label(); + this.label84 = new System.Windows.Forms.Label(); + this.P1Label = new System.Windows.Forms.Label(); + this.label80 = new System.Windows.Forms.Label(); + this.label81 = new System.Windows.Forms.Label(); + this.K3Label = new System.Windows.Forms.Label(); + this.K2Label = new System.Windows.Forms.Label(); + this.K1Label = new System.Windows.Forms.Label(); + this.label54 = new System.Windows.Forms.Label(); + this.label56 = new System.Windows.Forms.Label(); + this.label58 = new System.Windows.Forms.Label(); + this.label63 = new System.Windows.Forms.Label(); + this.label65 = new System.Windows.Forms.Label(); + this.label67 = new System.Windows.Forms.Label(); + this.label44 = new System.Windows.Forms.Label(); + this.label30 = new System.Windows.Forms.Label(); + this.FocalLResultLabel = new System.Windows.Forms.Label(); + this.KappaPanel = new System.Windows.Forms.Panel(); + this.LineScanPanel = new System.Windows.Forms.Panel(); + this.VzResultLabel = new System.Windows.Forms.Label(); + this.VyResultLabel = new System.Windows.Forms.Label(); + this.VxResultLabel = new System.Windows.Forms.Label(); + this.label82 = new System.Windows.Forms.Label(); + this.label85 = new System.Windows.Forms.Label(); + this.label86 = new System.Windows.Forms.Label(); + this.label87 = new System.Windows.Forms.Label(); + this.label88 = new System.Windows.Forms.Label(); + this.label89 = new System.Windows.Forms.Label(); + this.label45 = new System.Windows.Forms.Label(); + this.label32 = new System.Windows.Forms.Label(); + this.KappaResultLabel = new System.Windows.Forms.Label(); + this.buttonSaveCamParams = new System.Windows.Forms.Button(); + this.label49 = new System.Windows.Forms.Label(); + this.label48 = new System.Windows.Forms.Label(); + this.label47 = new System.Windows.Forms.Label(); + this.label46 = new System.Windows.Forms.Label(); + this.label43 = new System.Windows.Forms.Label(); + this.label42 = new System.Windows.Forms.Label(); + this.label40 = new System.Windows.Forms.Label(); + this.ImgHResultLabel = new System.Windows.Forms.Label(); + this.label38 = new System.Windows.Forms.Label(); + this.ImgWResultLabel = new System.Windows.Forms.Label(); + this.label36 = new System.Windows.Forms.Label(); + this.CyResultLabel = new System.Windows.Forms.Label(); + this.label34 = new System.Windows.Forms.Label(); + this.CxResultLabel = new System.Windows.Forms.Label(); + this.label28 = new System.Windows.Forms.Label(); + this.SyResultLabel = new System.Windows.Forms.Label(); + this.label26 = new System.Windows.Forms.Label(); + this.SxResultLabel = new System.Windows.Forms.Label(); + this.label22 = new System.Windows.Forms.Label(); + this.ErrorLabel = new System.Windows.Forms.Label(); + this.label21 = new System.Windows.Forms.Label(); + this.StatusCalibLabel = new System.Windows.Forms.Label(); + this.tabPageDistance = new System.Windows.Forms.TabPage(); + this.label33 = new System.Windows.Forms.Label(); + this.label35 = new System.Windows.Forms.Label(); + this.numericUpDownP4 = new System.Windows.Forms.NumericUpDown(); + this.numericUpDownP3 = new System.Windows.Forms.NumericUpDown(); + this.label29 = new System.Windows.Forms.Label(); + this.label31 = new System.Windows.Forms.Label(); + this.txtDistanceP3P4 = new System.Windows.Forms.TextBox(); + this.label27 = new System.Windows.Forms.Label(); + this.label25 = new System.Windows.Forms.Label(); + this.txtDistanceP1P2 = new System.Windows.Forms.TextBox(); + this.label24 = new System.Windows.Forms.Label(); + this.label23 = new System.Windows.Forms.Label(); + this.numericUpDownP2 = new System.Windows.Forms.NumericUpDown(); + this.numericUpDownP1 = new System.Windows.Forms.NumericUpDown(); + this.label1 = new System.Windows.Forms.Label(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.buttonMove = new System.Windows.Forms.RadioButton(); + this.buttonReset = new System.Windows.Forms.Button(); + this.buttonNone = new System.Windows.Forms.RadioButton(); + this.buttonMagnify = new System.Windows.Forms.RadioButton(); + this.buttonZoom = new System.Windows.Forms.RadioButton(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.upDownLineWidth = new System.Windows.Forms.NumericUpDown(); + this.label78 = new System.Windows.Forms.Label(); + this.label68 = new System.Windows.Forms.Label(); + this.checkBoxCoordSys = new System.Windows.Forms.CheckBox(); + this.checkBoxMarkCenter = new System.Windows.Forms.CheckBox(); + this.checkBoxPlateRegion = new System.Windows.Forms.CheckBox(); + this.comboBoxDraw = new System.Windows.Forms.ComboBox(); + this.comboBoxCoordSys = new System.Windows.Forms.ComboBox(); + this.comboBoxMarkCenters = new System.Windows.Forms.ComboBox(); + this.comboBoxPlateRegion = new System.Windows.Forms.ComboBox(); + this.openFileDialogImg = new System.Windows.Forms.OpenFileDialog(); + this.openFileDialogDescr = new System.Windows.Forms.OpenFileDialog(); + this.openFileDialogImportParams = new System.Windows.Forms.OpenFileDialog(); + this.StatusLabel = new System.Windows.Forms.Label(); + this.saveParamFileDialog = new System.Windows.Forms.SaveFileDialog(); + this.tabControl.SuspendLayout(); + this.tabPageCalib.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.LineScanAddPanel.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.MotionZUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MotionYUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MotionXUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.FocalLengthUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.SyUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.SxUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.ThicknessUpDown)).BeginInit(); + this.tabPageQualityCheck.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.WarnlevelUpDown)).BeginInit(); + this.groupBox4.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.MaxDiamTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MaxDiamUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinContLTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinContLUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.SmoothTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.SmoothUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinThreshTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinThreshUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.ThreshDecrTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.ThreshDecrUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.InitThreshTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.InitThreshUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinDiamTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinDiamUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MarkThreshTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MarkThreshUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.FilterSizeTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.FilterSizeUpDown)).BeginInit(); + this.tabPageResults.SuspendLayout(); + this.groupBox6.SuspendLayout(); + this.groupBox5.SuspendLayout(); + this.AreaScanPolynomPanel.SuspendLayout(); + this.KappaPanel.SuspendLayout(); + this.LineScanPanel.SuspendLayout(); + this.tabPageDistance.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownP4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownP3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownP2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownP1)).BeginInit(); + this.groupBox1.SuspendLayout(); + this.groupBox3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.upDownLineWidth)).BeginInit(); + this.SuspendLayout(); + // + // viewPort + // + this.viewPort.BackColor = System.Drawing.Color.Black; + this.viewPort.BorderColor = System.Drawing.Color.Black; + this.viewPort.ImagePart = new System.Drawing.Rectangle(0, 0, 640, 480); + this.viewPort.Location = new System.Drawing.Point(19, 43); + this.viewPort.Name = "viewPort"; + this.viewPort.Size = new System.Drawing.Size(547, 396); + this.viewPort.TabIndex = 0; + this.viewPort.WindowSize = new System.Drawing.Size(547, 396); + // + // tabControl + // + this.tabControl.Controls.Add(this.tabPageCalib); + this.tabControl.Controls.Add(this.tabPageQualityCheck); + this.tabControl.Controls.Add(this.tabPageResults); + this.tabControl.Controls.Add(this.tabPageDistance); + this.tabControl.Location = new System.Drawing.Point(595, 26); + this.tabControl.Name = "tabControl"; + this.tabControl.SelectedIndex = 0; + this.tabControl.Size = new System.Drawing.Size(519, 672); + this.tabControl.TabIndex = 1; + this.tabControl.SelectedIndexChanged += new System.EventHandler(this.tabControl_SelectedIndexChanged); + // + // tabPageCalib + // + this.tabPageCalib.Controls.Add(this.ListCalibImg); + this.tabPageCalib.Controls.Add(this.groupBox2); + this.tabPageCalib.Controls.Add(this.buttonCalibrate); + this.tabPageCalib.Controls.Add(this.buttonSetReference); + this.tabPageCalib.Controls.Add(this.buttonDeleteAll); + this.tabPageCalib.Controls.Add(this.buttonDelete); + this.tabPageCalib.Controls.Add(this.buttonLoad); + this.tabPageCalib.Location = new System.Drawing.Point(4, 22); + this.tabPageCalib.Name = "tabPageCalib"; + this.tabPageCalib.Size = new System.Drawing.Size(511, 646); + this.tabPageCalib.TabIndex = 0; + this.tabPageCalib.Text = "Calibration"; + this.tabPageCalib.UseVisualStyleBackColor = true; + // + // ListCalibImg + // + this.ListCalibImg.AutoArrange = false; + this.ListCalibImg.BackColor = System.Drawing.SystemColors.Window; + this.ListCalibImg.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.ColRef, + this.ColImg, + this.ColStatus}); + this.ListCalibImg.FullRowSelect = true; + this.ListCalibImg.Location = new System.Drawing.Point(10, 34); + this.ListCalibImg.MultiSelect = false; + this.ListCalibImg.Name = "ListCalibImg"; + this.ListCalibImg.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.ListCalibImg.Size = new System.Drawing.Size(374, 233); + this.ListCalibImg.TabIndex = 21; + this.ListCalibImg.UseCompatibleStateImageBehavior = false; + this.ListCalibImg.View = System.Windows.Forms.View.Details; + // + // ColRef + // + this.ColRef.Text = "Ref"; + this.ColRef.Width = 30; + // + // ColImg + // + this.ColImg.Text = "Image"; + this.ColImg.Width = 152; + // + // ColStatus + // + this.ColStatus.Text = "Status"; + this.ColStatus.Width = 125; + // + // groupBox2 + // + this.groupBox2.BackColor = System.Drawing.SystemColors.Control; + this.groupBox2.Controls.Add(this.buttonDefaultParams); + this.groupBox2.Controls.Add(this.LineScanAddPanel); + this.groupBox2.Controls.Add(this.label71); + this.groupBox2.Controls.Add(this.label70); + this.groupBox2.Controls.Add(this.label69); + this.groupBox2.Controls.Add(this.label7); + this.groupBox2.Controls.Add(this.label6); + this.groupBox2.Controls.Add(this.label5); + this.groupBox2.Controls.Add(this.TelecentricCheckBox); + this.groupBox2.Controls.Add(this.FocalLengthUpDown); + this.groupBox2.Controls.Add(this.SyUpDown); + this.groupBox2.Controls.Add(this.SxUpDown); + this.groupBox2.Controls.Add(this.buttonImportParams); + this.groupBox2.Controls.Add(this.textBoxDescr); + this.groupBox2.Controls.Add(this.CamTypComboBox); + this.groupBox2.Controls.Add(this.label4); + this.groupBox2.Controls.Add(this.label3); + this.groupBox2.Controls.Add(this.ThicknessUpDown); + this.groupBox2.Controls.Add(this.label2); + this.groupBox2.Controls.Add(this.buttonLoadDescrFile); + this.groupBox2.Location = new System.Drawing.Point(10, 293); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(489, 345); + this.groupBox2.TabIndex = 20; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Camera Setup"; + // + // buttonDefaultParams + // + this.buttonDefaultParams.Location = new System.Drawing.Point(326, 310); + this.buttonDefaultParams.Name = "buttonDefaultParams"; + this.buttonDefaultParams.Size = new System.Drawing.Size(144, 26); + this.buttonDefaultParams.TabIndex = 33; + this.buttonDefaultParams.Text = "Reset Parameters"; + this.buttonDefaultParams.Click += new System.EventHandler(this.buttonDefaultParams_Click); + // + // LineScanAddPanel + // + this.LineScanAddPanel.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.LineScanAddPanel.Controls.Add(this.label72); + this.LineScanAddPanel.Controls.Add(this.label73); + this.LineScanAddPanel.Controls.Add(this.label74); + this.LineScanAddPanel.Controls.Add(this.label75); + this.LineScanAddPanel.Controls.Add(this.label76); + this.LineScanAddPanel.Controls.Add(this.label77); + this.LineScanAddPanel.Controls.Add(this.MotionZUpDown); + this.LineScanAddPanel.Controls.Add(this.MotionYUpDown); + this.LineScanAddPanel.Controls.Add(this.MotionXUpDown); + this.LineScanAddPanel.Location = new System.Drawing.Point(10, 226); + this.LineScanAddPanel.Name = "LineScanAddPanel"; + this.LineScanAddPanel.Size = new System.Drawing.Size(412, 78); + this.LineScanAddPanel.TabIndex = 32; + this.LineScanAddPanel.Visible = false; + // + // label72 + // + this.label72.Location = new System.Drawing.Point(10, 52); + this.label72.Name = "label72"; + this.label72.Size = new System.Drawing.Size(105, 26); + this.label72.TabIndex = 40; + this.label72.Text = "Motion Z (Vz)"; + this.label72.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label73 + // + this.label73.Location = new System.Drawing.Point(10, 26); + this.label73.Name = "label73"; + this.label73.Size = new System.Drawing.Size(105, 26); + this.label73.TabIndex = 39; + this.label73.Text = "Motion Y (Vy)"; + this.label73.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label74 + // + this.label74.Location = new System.Drawing.Point(10, 0); + this.label74.Name = "label74"; + this.label74.Size = new System.Drawing.Size(105, 26); + this.label74.TabIndex = 38; + this.label74.Text = "Motion X (Vx)"; + this.label74.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label75 + // + this.label75.BackColor = System.Drawing.SystemColors.Control; + this.label75.Location = new System.Drawing.Point(307, 52); + this.label75.Name = "label75"; + this.label75.Size = new System.Drawing.Size(70, 26); + this.label75.TabIndex = 37; + this.label75.Text = "渭m/Pixel"; + this.label75.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label76 + // + this.label76.BackColor = System.Drawing.SystemColors.Control; + this.label76.Location = new System.Drawing.Point(307, 26); + this.label76.Name = "label76"; + this.label76.Size = new System.Drawing.Size(70, 26); + this.label76.TabIndex = 36; + this.label76.Text = "渭m/Pixel"; + this.label76.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label77 + // + this.label77.BackColor = System.Drawing.SystemColors.Control; + this.label77.Location = new System.Drawing.Point(307, 0); + this.label77.Name = "label77"; + this.label77.Size = new System.Drawing.Size(70, 26); + this.label77.TabIndex = 35; + this.label77.Text = "渭m/Pixel"; + this.label77.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // MotionZUpDown + // + this.MotionZUpDown.DecimalPlaces = 3; + this.MotionZUpDown.Increment = new decimal(new int[] { + 100, + 0, + 0, + 0}); + this.MotionZUpDown.Location = new System.Drawing.Point(125, 52); + this.MotionZUpDown.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.MotionZUpDown.Name = "MotionZUpDown"; + this.MotionZUpDown.Size = new System.Drawing.Size(163, 21); + this.MotionZUpDown.TabIndex = 34; + this.MotionZUpDown.ValueChanged += new System.EventHandler(this.MotionZUpDown_ValueChanged); + this.MotionZUpDown.Leave += new System.EventHandler(this.MotionZUpDown_Leave); + // + // MotionYUpDown + // + this.MotionYUpDown.DecimalPlaces = 3; + this.MotionYUpDown.Increment = new decimal(new int[] { + 100, + 0, + 0, + 0}); + this.MotionYUpDown.Location = new System.Drawing.Point(125, 26); + this.MotionYUpDown.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.MotionYUpDown.Name = "MotionYUpDown"; + this.MotionYUpDown.Size = new System.Drawing.Size(163, 21); + this.MotionYUpDown.TabIndex = 33; + this.MotionYUpDown.ValueChanged += new System.EventHandler(this.MotionYUpDown_ValueChanged); + this.MotionYUpDown.Leave += new System.EventHandler(this.MotionYUpDown_Leave); + // + // MotionXUpDown + // + this.MotionXUpDown.DecimalPlaces = 3; + this.MotionXUpDown.Increment = new decimal(new int[] { + 100, + 0, + 0, + 0}); + this.MotionXUpDown.Location = new System.Drawing.Point(125, 0); + this.MotionXUpDown.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.MotionXUpDown.Name = "MotionXUpDown"; + this.MotionXUpDown.Size = new System.Drawing.Size(163, 21); + this.MotionXUpDown.TabIndex = 32; + this.MotionXUpDown.ValueChanged += new System.EventHandler(this.MotionXUpDown_ValueChanged); + this.MotionXUpDown.Leave += new System.EventHandler(this.MotionXUpDown_Leave); + // + // label71 + // + this.label71.Location = new System.Drawing.Point(19, 198); + this.label71.Name = "label71"; + this.label71.Size = new System.Drawing.Size(106, 26); + this.label71.TabIndex = 22; + this.label71.Text = "Focal Length "; + this.label71.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label70 + // + this.label70.Location = new System.Drawing.Point(19, 172); + this.label70.Name = "label70"; + this.label70.Size = new System.Drawing.Size(106, 26); + this.label70.TabIndex = 21; + this.label70.Text = "Cell Height (Sy)"; + this.label70.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label69 + // + this.label69.Location = new System.Drawing.Point(19, 146); + this.label69.Name = "label69"; + this.label69.Size = new System.Drawing.Size(106, 26); + this.label69.TabIndex = 20; + this.label69.Text = "Cell Width (Sx)"; + this.label69.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label7 + // + this.label7.Location = new System.Drawing.Point(317, 198); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(50, 26); + this.label7.TabIndex = 19; + this.label7.Text = "mm"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label6 + // + this.label6.Location = new System.Drawing.Point(317, 172); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(71, 26); + this.label6.TabIndex = 18; + this.label6.Text = "渭m"; + this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label5 + // + this.label5.Location = new System.Drawing.Point(317, 146); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(71, 26); + this.label5.TabIndex = 17; + this.label5.Text = "渭m"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // TelecentricCheckBox + // + this.TelecentricCheckBox.Location = new System.Drawing.Point(374, 198); + this.TelecentricCheckBox.Name = "TelecentricCheckBox"; + this.TelecentricCheckBox.Size = new System.Drawing.Size(106, 26); + this.TelecentricCheckBox.TabIndex = 16; + this.TelecentricCheckBox.Text = "Telecentric"; + this.TelecentricCheckBox.CheckedChanged += new System.EventHandler(this.checkBoxTelecentric_CheckedChanged); + // + // FocalLengthUpDown + // + this.FocalLengthUpDown.DecimalPlaces = 3; + this.FocalLengthUpDown.Increment = new decimal(new int[] { + 100, + 0, + 0, + 0}); + this.FocalLengthUpDown.Location = new System.Drawing.Point(134, 198); + this.FocalLengthUpDown.Maximum = new decimal(new int[] { + 100000000, + 0, + 0, + 0}); + this.FocalLengthUpDown.Name = "FocalLengthUpDown"; + this.FocalLengthUpDown.Size = new System.Drawing.Size(164, 21); + this.FocalLengthUpDown.TabIndex = 15; + this.FocalLengthUpDown.ValueChanged += new System.EventHandler(this.numUpDownFocalLength_ValueChanged); + this.FocalLengthUpDown.Leave += new System.EventHandler(this.FocalLengthUpDown_Leave); + // + // SyUpDown + // + this.SyUpDown.DecimalPlaces = 3; + this.SyUpDown.Increment = new decimal(new int[] { + 100, + 0, + 0, + 0}); + this.SyUpDown.Location = new System.Drawing.Point(134, 172); + this.SyUpDown.Maximum = new decimal(new int[] { + 1000000000, + 0, + 0, + 0}); + this.SyUpDown.Name = "SyUpDown"; + this.SyUpDown.Size = new System.Drawing.Size(164, 21); + this.SyUpDown.TabIndex = 14; + this.SyUpDown.ValueChanged += new System.EventHandler(this.numUpDownSy_ValueChanged); + this.SyUpDown.Leave += new System.EventHandler(this.SyUpDown_Leave); + // + // SxUpDown + // + this.SxUpDown.DecimalPlaces = 3; + this.SxUpDown.Increment = new decimal(new int[] { + 100, + 0, + 0, + 0}); + this.SxUpDown.Location = new System.Drawing.Point(134, 146); + this.SxUpDown.Maximum = new decimal(new int[] { + 1000000000, + 0, + 0, + 0}); + this.SxUpDown.Name = "SxUpDown"; + this.SxUpDown.Size = new System.Drawing.Size(164, 21); + this.SxUpDown.TabIndex = 13; + this.SxUpDown.ValueChanged += new System.EventHandler(this.numUpDownSx_ValueChanged); + this.SxUpDown.Leave += new System.EventHandler(this.SxUpDown_Leave); + // + // buttonImportParams + // + this.buttonImportParams.Location = new System.Drawing.Point(326, 103); + this.buttonImportParams.Name = "buttonImportParams"; + this.buttonImportParams.Size = new System.Drawing.Size(144, 26); + this.buttonImportParams.TabIndex = 9; + this.buttonImportParams.Text = "Import Parameters ..."; + this.buttonImportParams.Click += new System.EventHandler(this.buttonImportParams_Click); + // + // textBoxDescr + // + this.textBoxDescr.BackColor = System.Drawing.SystemColors.InactiveBorder; + this.textBoxDescr.Location = new System.Drawing.Point(134, 34); + this.textBoxDescr.Name = "textBoxDescr"; + this.textBoxDescr.ReadOnly = true; + this.textBoxDescr.Size = new System.Drawing.Size(173, 21); + this.textBoxDescr.TabIndex = 8; + this.textBoxDescr.Text = ".descr"; + // + // CamTypComboBox + // + this.CamTypComboBox.Items.AddRange(new object[] { + "Area Scan (Division)", + "Area Scan (Polynomial)", + "Line Scan"}); + this.CamTypComboBox.Location = new System.Drawing.Point(134, 103); + this.CamTypComboBox.Name = "CamTypComboBox"; + this.CamTypComboBox.Size = new System.Drawing.Size(173, 20); + this.CamTypComboBox.TabIndex = 7; + this.CamTypComboBox.Text = "Area Scan (Division)"; + this.CamTypComboBox.SelectedIndexChanged += new System.EventHandler(this.comboBoxCamTyp_SelectedIndexChanged); + // + // label4 + // + this.label4.Location = new System.Drawing.Point(19, 103); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(106, 26); + this.label4.TabIndex = 6; + this.label4.Text = "Camera Type"; + this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label3 + // + this.label3.Location = new System.Drawing.Point(326, 60); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(96, 26); + this.label3.TabIndex = 5; + this.label3.Text = "mm"; + this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // ThicknessUpDown + // + this.ThicknessUpDown.DecimalPlaces = 3; + this.ThicknessUpDown.Location = new System.Drawing.Point(134, 60); + this.ThicknessUpDown.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.ThicknessUpDown.Name = "ThicknessUpDown"; + this.ThicknessUpDown.Size = new System.Drawing.Size(173, 21); + this.ThicknessUpDown.TabIndex = 4; + this.ThicknessUpDown.ValueChanged += new System.EventHandler(this.numUpDownThickness_ValueChanged); + this.ThicknessUpDown.Leave += new System.EventHandler(this.ThicknessUpDown_Leave); + // + // label2 + // + this.label2.Location = new System.Drawing.Point(19, 60); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(106, 26); + this.label2.TabIndex = 3; + this.label2.Text = "Thickness"; + this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // buttonLoadDescrFile + // + this.buttonLoadDescrFile.Location = new System.Drawing.Point(326, 34); + this.buttonLoadDescrFile.Name = "buttonLoadDescrFile"; + this.buttonLoadDescrFile.Size = new System.Drawing.Size(144, 26); + this.buttonLoadDescrFile.TabIndex = 2; + this.buttonLoadDescrFile.Text = "Load File"; + this.buttonLoadDescrFile.Click += new System.EventHandler(this.buttonLoadDescrFile_Click); + // + // buttonCalibrate + // + this.buttonCalibrate.Enabled = false; + this.buttonCalibrate.Location = new System.Drawing.Point(394, 241); + this.buttonCalibrate.Name = "buttonCalibrate"; + this.buttonCalibrate.Size = new System.Drawing.Size(100, 26); + this.buttonCalibrate.TabIndex = 19; + this.buttonCalibrate.Text = "Calibrate"; + this.buttonCalibrate.Click += new System.EventHandler(this.buttonCalibrate_Click); + // + // buttonSetReference + // + this.buttonSetReference.Enabled = false; + this.buttonSetReference.Location = new System.Drawing.Point(394, 207); + this.buttonSetReference.Name = "buttonSetReference"; + this.buttonSetReference.Size = new System.Drawing.Size(100, 26); + this.buttonSetReference.TabIndex = 18; + this.buttonSetReference.Text = "Set Reference"; + this.buttonSetReference.Click += new System.EventHandler(this.buttonSetReference_Click); + // + // buttonDeleteAll + // + this.buttonDeleteAll.Location = new System.Drawing.Point(394, 103); + this.buttonDeleteAll.Name = "buttonDeleteAll"; + this.buttonDeleteAll.Size = new System.Drawing.Size(100, 26); + this.buttonDeleteAll.TabIndex = 15; + this.buttonDeleteAll.Text = "Delete All"; + this.buttonDeleteAll.Click += new System.EventHandler(this.buttonDeleteAll_Click); + // + // buttonDelete + // + this.buttonDelete.Location = new System.Drawing.Point(394, 69); + this.buttonDelete.Name = "buttonDelete"; + this.buttonDelete.Size = new System.Drawing.Size(100, 26); + this.buttonDelete.TabIndex = 14; + this.buttonDelete.Text = "Delete"; + this.buttonDelete.Click += new System.EventHandler(this.buttonDelete_Click); + // + // buttonLoad + // + this.buttonLoad.Location = new System.Drawing.Point(394, 34); + this.buttonLoad.Name = "buttonLoad"; + this.buttonLoad.Size = new System.Drawing.Size(100, 26); + this.buttonLoad.TabIndex = 8; + this.buttonLoad.Text = "Load ..."; + this.buttonLoad.Click += new System.EventHandler(this.buttonLoad_Click); + // + // tabPageQualityCheck + // + this.tabPageQualityCheck.Controls.Add(this.WarnlevelUpDown); + this.tabPageQualityCheck.Controls.Add(this.ListQualityCheck); + this.tabPageQualityCheck.Controls.Add(this.groupBox4); + this.tabPageQualityCheck.Controls.Add(this.label10); + this.tabPageQualityCheck.Controls.Add(this.label9); + this.tabPageQualityCheck.Controls.Add(this.SeqTestsComboBox); + this.tabPageQualityCheck.Controls.Add(this.label8); + this.tabPageQualityCheck.Controls.Add(this.ImgTestsComboBox); + this.tabPageQualityCheck.Location = new System.Drawing.Point(4, 22); + this.tabPageQualityCheck.Name = "tabPageQualityCheck"; + this.tabPageQualityCheck.Size = new System.Drawing.Size(511, 646); + this.tabPageQualityCheck.TabIndex = 1; + this.tabPageQualityCheck.Text = "Image Quality Check"; + this.tabPageQualityCheck.UseVisualStyleBackColor = true; + // + // WarnlevelUpDown + // + this.WarnlevelUpDown.Increment = new decimal(new int[] { + 5, + 0, + 0, + 0}); + this.WarnlevelUpDown.Location = new System.Drawing.Point(394, 220); + this.WarnlevelUpDown.Maximum = new decimal(new int[] { + 99, + 0, + 0, + 0}); + this.WarnlevelUpDown.Name = "WarnlevelUpDown"; + this.WarnlevelUpDown.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.WarnlevelUpDown.Size = new System.Drawing.Size(96, 21); + this.WarnlevelUpDown.TabIndex = 23; + this.WarnlevelUpDown.ValueChanged += new System.EventHandler(this.numUpDownWarnlevel_ValueChanged); + // + // ListQualityCheck + // + this.ListQualityCheck.AutoArrange = false; + this.ListQualityCheck.BackColor = System.Drawing.SystemColors.Window; + this.ListQualityCheck.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.ColScope, + this.ColDescr, + this.Col2Status}); + this.ListQualityCheck.FullRowSelect = true; + this.ListQualityCheck.GridLines = true; + this.ListQualityCheck.LabelWrap = false; + this.ListQualityCheck.Location = new System.Drawing.Point(10, 34); + this.ListQualityCheck.MultiSelect = false; + this.ListQualityCheck.Name = "ListQualityCheck"; + this.ListQualityCheck.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.ListQualityCheck.Size = new System.Drawing.Size(374, 207); + this.ListQualityCheck.TabIndex = 22; + this.ListQualityCheck.UseCompatibleStateImageBehavior = false; + this.ListQualityCheck.View = System.Windows.Forms.View.Details; + // + // ColScope + // + this.ColScope.Text = "Scope"; + this.ColScope.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.ColScope.Width = 65; + // + // ColDescr + // + this.ColDescr.Text = "Description"; + this.ColDescr.Width = 192; + // + // Col2Status + // + this.Col2Status.Text = "Status"; + this.Col2Status.Width = 50; + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.MaxDiamTrackBar); + this.groupBox4.Controls.Add(this.MaxDiamResetButton); + this.groupBox4.Controls.Add(this.MaxDiamUpDown); + this.groupBox4.Controls.Add(this.label19); + this.groupBox4.Controls.Add(this.MinContLResetButton); + this.groupBox4.Controls.Add(this.MinContLTrackBar); + this.groupBox4.Controls.Add(this.MinContLUpDown); + this.groupBox4.Controls.Add(this.label18); + this.groupBox4.Controls.Add(this.SmootingResetButton); + this.groupBox4.Controls.Add(this.SmoothTrackBar); + this.groupBox4.Controls.Add(this.SmoothUpDown); + this.groupBox4.Controls.Add(this.label17); + this.groupBox4.Controls.Add(this.MinThreshResetButton); + this.groupBox4.Controls.Add(this.MinThreshTrackBar); + this.groupBox4.Controls.Add(this.MinThreshUpDown); + this.groupBox4.Controls.Add(this.label16); + this.groupBox4.Controls.Add(this.ThreshDecrResetButton); + this.groupBox4.Controls.Add(this.ThreshDecrTrackBar); + this.groupBox4.Controls.Add(this.ThreshDecrUpDown); + this.groupBox4.Controls.Add(this.label15); + this.groupBox4.Controls.Add(this.InitThreshResetButton); + this.groupBox4.Controls.Add(this.InitThreshTrackBar); + this.groupBox4.Controls.Add(this.InitThreshUpDown); + this.groupBox4.Controls.Add(this.label14); + this.groupBox4.Controls.Add(this.MinDiamResetButton); + this.groupBox4.Controls.Add(this.MinDiamTrackBar); + this.groupBox4.Controls.Add(this.MinDiamUpDown); + this.groupBox4.Controls.Add(this.label13); + this.groupBox4.Controls.Add(this.MarkThreshResetButton); + this.groupBox4.Controls.Add(this.MarkThreshTrackBar); + this.groupBox4.Controls.Add(this.MarkThreshUpDown); + this.groupBox4.Controls.Add(this.label12); + this.groupBox4.Controls.Add(this.FilterSizeResetButton); + this.groupBox4.Controls.Add(this.FilterSizeTrackBar); + this.groupBox4.Controls.Add(this.FilterSizeUpDown); + this.groupBox4.Controls.Add(this.label11); + this.groupBox4.Location = new System.Drawing.Point(10, 276); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(492, 362); + this.groupBox4.TabIndex = 7; + this.groupBox4.TabStop = false; + this.groupBox4.Text = "Calibration Plate Extraction Parameters"; + // + // MaxDiamTrackBar + // + this.MaxDiamTrackBar.LargeChange = 20; + this.MaxDiamTrackBar.Location = new System.Drawing.Point(192, 310); + this.MaxDiamTrackBar.Maximum = 500; + this.MaxDiamTrackBar.Name = "MaxDiamTrackBar"; + this.MaxDiamTrackBar.Size = new System.Drawing.Size(230, 45); + this.MaxDiamTrackBar.SmallChange = 10; + this.MaxDiamTrackBar.TabIndex = 34; + this.MaxDiamTrackBar.TickFrequency = 20; + this.MaxDiamTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.MaxDiamTrackBar.Scroll += new System.EventHandler(this.trackBarMaxDiam_Scroll); + // + // MaxDiamResetButton + // + this.MaxDiamResetButton.ForeColor = System.Drawing.Color.Gray; + this.MaxDiamResetButton.Location = new System.Drawing.Point(422, 310); + this.MaxDiamResetButton.Name = "MaxDiamResetButton"; + this.MaxDiamResetButton.Size = new System.Drawing.Size(58, 26); + this.MaxDiamResetButton.TabIndex = 35; + this.MaxDiamResetButton.Text = "Reset"; + this.MaxDiamResetButton.Click += new System.EventHandler(this.buttonRMaxDiam_Click); + // + // MaxDiamUpDown + // + this.MaxDiamUpDown.Location = new System.Drawing.Point(115, 310); + this.MaxDiamUpDown.Maximum = new decimal(new int[] { + 500, + 0, + 0, + 0}); + this.MaxDiamUpDown.Name = "MaxDiamUpDown"; + this.MaxDiamUpDown.Size = new System.Drawing.Size(77, 21); + this.MaxDiamUpDown.TabIndex = 33; + this.MaxDiamUpDown.ValueChanged += new System.EventHandler(this.numUpDownMaxDiam_ValueChanged); + // + // label19 + // + this.label19.Location = new System.Drawing.Point(10, 310); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(105, 26); + this.label19.TabIndex = 32; + this.label19.Text = "Max Mark Diam"; + this.label19.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // MinContLResetButton + // + this.MinContLResetButton.ForeColor = System.Drawing.Color.Gray; + this.MinContLResetButton.Location = new System.Drawing.Point(422, 276); + this.MinContLResetButton.Name = "MinContLResetButton"; + this.MinContLResetButton.Size = new System.Drawing.Size(58, 26); + this.MinContLResetButton.TabIndex = 31; + this.MinContLResetButton.Text = "Reset"; + this.MinContLResetButton.Click += new System.EventHandler(this.buttonRMinContL_Click); + // + // MinContLTrackBar + // + this.MinContLTrackBar.LargeChange = 20; + this.MinContLTrackBar.Location = new System.Drawing.Point(192, 276); + this.MinContLTrackBar.Maximum = 500; + this.MinContLTrackBar.Name = "MinContLTrackBar"; + this.MinContLTrackBar.Size = new System.Drawing.Size(230, 45); + this.MinContLTrackBar.SmallChange = 10; + this.MinContLTrackBar.TabIndex = 30; + this.MinContLTrackBar.TickFrequency = 20; + this.MinContLTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.MinContLTrackBar.Scroll += new System.EventHandler(this.trackBarMinContL_Scroll); + // + // MinContLUpDown + // + this.MinContLUpDown.Location = new System.Drawing.Point(115, 276); + this.MinContLUpDown.Maximum = new decimal(new int[] { + 500, + 0, + 0, + 0}); + this.MinContLUpDown.Name = "MinContLUpDown"; + this.MinContLUpDown.Size = new System.Drawing.Size(77, 21); + this.MinContLUpDown.TabIndex = 29; + this.MinContLUpDown.ValueChanged += new System.EventHandler(this.numUpDownMinContL_ValueChanged); + // + // label18 + // + this.label18.Location = new System.Drawing.Point(10, 276); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(105, 26); + this.label18.TabIndex = 28; + this.label18.Text = "Min Cont Length"; + this.label18.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // SmootingResetButton + // + this.SmootingResetButton.ForeColor = System.Drawing.Color.Gray; + this.SmootingResetButton.Location = new System.Drawing.Point(422, 241); + this.SmootingResetButton.Name = "SmootingResetButton"; + this.SmootingResetButton.Size = new System.Drawing.Size(58, 26); + this.SmootingResetButton.TabIndex = 27; + this.SmootingResetButton.Text = "Reset"; + this.SmootingResetButton.Click += new System.EventHandler(this.buttonRSmooting_Click); + // + // SmoothTrackBar + // + this.SmoothTrackBar.LargeChange = 10; + this.SmoothTrackBar.Location = new System.Drawing.Point(192, 241); + this.SmoothTrackBar.Maximum = 200; + this.SmoothTrackBar.Minimum = 1; + this.SmoothTrackBar.Name = "SmoothTrackBar"; + this.SmoothTrackBar.Size = new System.Drawing.Size(230, 45); + this.SmoothTrackBar.SmallChange = 5; + this.SmoothTrackBar.TabIndex = 26; + this.SmoothTrackBar.TickFrequency = 10; + this.SmoothTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.SmoothTrackBar.Value = 1; + this.SmoothTrackBar.Scroll += new System.EventHandler(this.trackBarSmooth_Scroll); + // + // SmoothUpDown + // + this.SmoothUpDown.Location = new System.Drawing.Point(115, 241); + this.SmoothUpDown.Maximum = new decimal(new int[] { + 200, + 0, + 0, + 0}); + this.SmoothUpDown.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.SmoothUpDown.Name = "SmoothUpDown"; + this.SmoothUpDown.Size = new System.Drawing.Size(77, 21); + this.SmoothUpDown.TabIndex = 25; + this.SmoothUpDown.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.SmoothUpDown.ValueChanged += new System.EventHandler(this.numUpDownSmooth_ValueChanged); + // + // label17 + // + this.label17.Location = new System.Drawing.Point(10, 241); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(105, 26); + this.label17.TabIndex = 24; + this.label17.Text = "Smoothing*100"; + this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // MinThreshResetButton + // + this.MinThreshResetButton.ForeColor = System.Drawing.Color.Gray; + this.MinThreshResetButton.Location = new System.Drawing.Point(422, 207); + this.MinThreshResetButton.Name = "MinThreshResetButton"; + this.MinThreshResetButton.Size = new System.Drawing.Size(58, 26); + this.MinThreshResetButton.TabIndex = 23; + this.MinThreshResetButton.Text = "Reset"; + this.MinThreshResetButton.Click += new System.EventHandler(this.buttonRMinThresh_Click); + // + // MinThreshTrackBar + // + this.MinThreshTrackBar.LargeChange = 10; + this.MinThreshTrackBar.Location = new System.Drawing.Point(192, 207); + this.MinThreshTrackBar.Maximum = 100; + this.MinThreshTrackBar.Name = "MinThreshTrackBar"; + this.MinThreshTrackBar.Size = new System.Drawing.Size(230, 45); + this.MinThreshTrackBar.SmallChange = 5; + this.MinThreshTrackBar.TabIndex = 22; + this.MinThreshTrackBar.TickFrequency = 10; + this.MinThreshTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.MinThreshTrackBar.Scroll += new System.EventHandler(this.trackBarMinThresh_Scroll); + // + // MinThreshUpDown + // + this.MinThreshUpDown.Location = new System.Drawing.Point(115, 207); + this.MinThreshUpDown.Name = "MinThreshUpDown"; + this.MinThreshUpDown.Size = new System.Drawing.Size(77, 21); + this.MinThreshUpDown.TabIndex = 21; + this.MinThreshUpDown.ValueChanged += new System.EventHandler(this.numUpDownMinThresh_ValueChanged); + // + // label16 + // + this.label16.Location = new System.Drawing.Point(10, 207); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(76, 26); + this.label16.TabIndex = 20; + this.label16.Text = "Min Thresh"; + this.label16.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // ThreshDecrResetButton + // + this.ThreshDecrResetButton.ForeColor = System.Drawing.Color.Gray; + this.ThreshDecrResetButton.Location = new System.Drawing.Point(422, 172); + this.ThreshDecrResetButton.Name = "ThreshDecrResetButton"; + this.ThreshDecrResetButton.Size = new System.Drawing.Size(58, 26); + this.ThreshDecrResetButton.TabIndex = 19; + this.ThreshDecrResetButton.Text = "Reset"; + this.ThreshDecrResetButton.Click += new System.EventHandler(this.buttonRThreshDecr_Click); + // + // ThreshDecrTrackBar + // + this.ThreshDecrTrackBar.LargeChange = 10; + this.ThreshDecrTrackBar.Location = new System.Drawing.Point(192, 172); + this.ThreshDecrTrackBar.Maximum = 100; + this.ThreshDecrTrackBar.Name = "ThreshDecrTrackBar"; + this.ThreshDecrTrackBar.Size = new System.Drawing.Size(230, 45); + this.ThreshDecrTrackBar.SmallChange = 5; + this.ThreshDecrTrackBar.TabIndex = 18; + this.ThreshDecrTrackBar.TickFrequency = 10; + this.ThreshDecrTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.ThreshDecrTrackBar.Scroll += new System.EventHandler(this.trackBarThreshDecr_Scroll); + // + // ThreshDecrUpDown + // + this.ThreshDecrUpDown.Location = new System.Drawing.Point(115, 172); + this.ThreshDecrUpDown.Name = "ThreshDecrUpDown"; + this.ThreshDecrUpDown.Size = new System.Drawing.Size(77, 21); + this.ThreshDecrUpDown.TabIndex = 17; + this.ThreshDecrUpDown.ValueChanged += new System.EventHandler(this.numUpDownThreshDecr_ValueChanged); + // + // label15 + // + this.label15.Location = new System.Drawing.Point(10, 172); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(86, 26); + this.label15.TabIndex = 16; + this.label15.Text = "Thresh Decr"; + this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // InitThreshResetButton + // + this.InitThreshResetButton.ForeColor = System.Drawing.Color.Gray; + this.InitThreshResetButton.Location = new System.Drawing.Point(422, 138); + this.InitThreshResetButton.Name = "InitThreshResetButton"; + this.InitThreshResetButton.Size = new System.Drawing.Size(58, 26); + this.InitThreshResetButton.TabIndex = 15; + this.InitThreshResetButton.Text = "Reset"; + this.InitThreshResetButton.Click += new System.EventHandler(this.buttonRInitThresh_Click); + // + // InitThreshTrackBar + // + this.InitThreshTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.InitThreshTrackBar.LargeChange = 10; + this.InitThreshTrackBar.Location = new System.Drawing.Point(192, 138); + this.InitThreshTrackBar.Maximum = 255; + this.InitThreshTrackBar.Name = "InitThreshTrackBar"; + this.InitThreshTrackBar.Size = new System.Drawing.Size(230, 45); + this.InitThreshTrackBar.SmallChange = 5; + this.InitThreshTrackBar.TabIndex = 14; + this.InitThreshTrackBar.TickFrequency = 10; + this.InitThreshTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.InitThreshTrackBar.Scroll += new System.EventHandler(this.trackBarInitThresh_Scroll); + // + // InitThreshUpDown + // + this.InitThreshUpDown.Location = new System.Drawing.Point(115, 138); + this.InitThreshUpDown.Maximum = new decimal(new int[] { + 255, + 0, + 0, + 0}); + this.InitThreshUpDown.Name = "InitThreshUpDown"; + this.InitThreshUpDown.Size = new System.Drawing.Size(77, 21); + this.InitThreshUpDown.TabIndex = 13; + this.InitThreshUpDown.ValueChanged += new System.EventHandler(this.numUpDownInitThresh_ValueChanged); + // + // label14 + // + this.label14.Location = new System.Drawing.Point(10, 138); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(76, 26); + this.label14.TabIndex = 12; + this.label14.Text = "Init Thresh"; + this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // MinDiamResetButton + // + this.MinDiamResetButton.ForeColor = System.Drawing.Color.Gray; + this.MinDiamResetButton.Location = new System.Drawing.Point(422, 103); + this.MinDiamResetButton.Name = "MinDiamResetButton"; + this.MinDiamResetButton.Size = new System.Drawing.Size(58, 26); + this.MinDiamResetButton.TabIndex = 11; + this.MinDiamResetButton.Text = "Reset"; + this.MinDiamResetButton.Click += new System.EventHandler(this.buttonRMinDiam_Click); + // + // MinDiamTrackBar + // + this.MinDiamTrackBar.LargeChange = 10; + this.MinDiamTrackBar.Location = new System.Drawing.Point(192, 103); + this.MinDiamTrackBar.Maximum = 100; + this.MinDiamTrackBar.Name = "MinDiamTrackBar"; + this.MinDiamTrackBar.Size = new System.Drawing.Size(230, 45); + this.MinDiamTrackBar.SmallChange = 5; + this.MinDiamTrackBar.TabIndex = 10; + this.MinDiamTrackBar.TickFrequency = 10; + this.MinDiamTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.MinDiamTrackBar.Scroll += new System.EventHandler(this.trackBarMinDiam_Scroll); + // + // MinDiamUpDown + // + this.MinDiamUpDown.Location = new System.Drawing.Point(115, 103); + this.MinDiamUpDown.Name = "MinDiamUpDown"; + this.MinDiamUpDown.Size = new System.Drawing.Size(77, 21); + this.MinDiamUpDown.TabIndex = 9; + this.MinDiamUpDown.ValueChanged += new System.EventHandler(this.numUpDownMinDiam_ValueChanged); + // + // label13 + // + this.label13.Location = new System.Drawing.Point(10, 103); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(96, 26); + this.label13.TabIndex = 8; + this.label13.Text = "Min Mark Diam"; + this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // MarkThreshResetButton + // + this.MarkThreshResetButton.ForeColor = System.Drawing.Color.Gray; + this.MarkThreshResetButton.Location = new System.Drawing.Point(422, 69); + this.MarkThreshResetButton.Name = "MarkThreshResetButton"; + this.MarkThreshResetButton.Size = new System.Drawing.Size(58, 26); + this.MarkThreshResetButton.TabIndex = 7; + this.MarkThreshResetButton.Text = "Reset"; + this.MarkThreshResetButton.Click += new System.EventHandler(this.buttonRMarkThresh_Click); + // + // MarkThreshTrackBar + // + this.MarkThreshTrackBar.LargeChange = 10; + this.MarkThreshTrackBar.Location = new System.Drawing.Point(192, 69); + this.MarkThreshTrackBar.Maximum = 255; + this.MarkThreshTrackBar.Name = "MarkThreshTrackBar"; + this.MarkThreshTrackBar.Size = new System.Drawing.Size(230, 45); + this.MarkThreshTrackBar.SmallChange = 5; + this.MarkThreshTrackBar.TabIndex = 6; + this.MarkThreshTrackBar.TickFrequency = 10; + this.MarkThreshTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.MarkThreshTrackBar.Scroll += new System.EventHandler(this.trackBarMarkThresh_Scroll); + // + // MarkThreshUpDown + // + this.MarkThreshUpDown.Location = new System.Drawing.Point(115, 69); + this.MarkThreshUpDown.Maximum = new decimal(new int[] { + 255, + 0, + 0, + 0}); + this.MarkThreshUpDown.Name = "MarkThreshUpDown"; + this.MarkThreshUpDown.Size = new System.Drawing.Size(77, 21); + this.MarkThreshUpDown.TabIndex = 5; + this.MarkThreshUpDown.ValueChanged += new System.EventHandler(this.numUpDownMarkThresh_ValueChanged); + // + // label12 + // + this.label12.Location = new System.Drawing.Point(10, 69); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(96, 26); + this.label12.TabIndex = 4; + this.label12.Text = "Mark Thresh"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // FilterSizeResetButton + // + this.FilterSizeResetButton.ForeColor = System.Drawing.Color.Gray; + this.FilterSizeResetButton.Location = new System.Drawing.Point(422, 34); + this.FilterSizeResetButton.Name = "FilterSizeResetButton"; + this.FilterSizeResetButton.Size = new System.Drawing.Size(58, 26); + this.FilterSizeResetButton.TabIndex = 3; + this.FilterSizeResetButton.Text = "Reset"; + this.FilterSizeResetButton.Click += new System.EventHandler(this.buttonRFilterSize_Click); + // + // FilterSizeTrackBar + // + this.FilterSizeTrackBar.LargeChange = 1; + this.FilterSizeTrackBar.Location = new System.Drawing.Point(192, 34); + this.FilterSizeTrackBar.Maximum = 15; + this.FilterSizeTrackBar.Minimum = 1; + this.FilterSizeTrackBar.Name = "FilterSizeTrackBar"; + this.FilterSizeTrackBar.Size = new System.Drawing.Size(230, 45); + this.FilterSizeTrackBar.TabIndex = 2; + this.FilterSizeTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.FilterSizeTrackBar.Value = 1; + this.FilterSizeTrackBar.Scroll += new System.EventHandler(this.trackBarFilterSize_Scroll); + // + // FilterSizeUpDown + // + this.FilterSizeUpDown.Location = new System.Drawing.Point(115, 34); + this.FilterSizeUpDown.Maximum = new decimal(new int[] { + 15, + 0, + 0, + 0}); + this.FilterSizeUpDown.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.FilterSizeUpDown.Name = "FilterSizeUpDown"; + this.FilterSizeUpDown.Size = new System.Drawing.Size(77, 21); + this.FilterSizeUpDown.TabIndex = 1; + this.FilterSizeUpDown.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.FilterSizeUpDown.ValueChanged += new System.EventHandler(this.numUpDownFilterSize_ValueChanged); + // + // label11 + // + this.label11.Location = new System.Drawing.Point(10, 34); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(86, 26); + this.label11.TabIndex = 0; + this.label11.Text = "Filter Size"; + this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label10 + // + this.label10.Location = new System.Drawing.Point(394, 194); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(105, 26); + this.label10.TabIndex = 6; + this.label10.Text = "Warn Level (%)"; + this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label9 + // + this.label9.Location = new System.Drawing.Point(394, 112); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(105, 26); + this.label9.TabIndex = 4; + this.label9.Text = "Sequence Tests"; + this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // SeqTestsComboBox + // + this.SeqTestsComboBox.Items.AddRange(new object[] { + "All", + "Quick", + "None"}); + this.SeqTestsComboBox.Location = new System.Drawing.Point(394, 138); + this.SeqTestsComboBox.Name = "SeqTestsComboBox"; + this.SeqTestsComboBox.Size = new System.Drawing.Size(96, 20); + this.SeqTestsComboBox.TabIndex = 3; + this.SeqTestsComboBox.Text = "All"; + this.SeqTestsComboBox.SelectedIndexChanged += new System.EventHandler(this.comboBoxSeqTests_SelectedIndexChanged); + // + // label8 + // + this.label8.Location = new System.Drawing.Point(394, 34); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(105, 26); + this.label8.TabIndex = 2; + this.label8.Text = "Image Tests"; + this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // ImgTestsComboBox + // + this.ImgTestsComboBox.Items.AddRange(new object[] { + "All", + "Quick", + "None"}); + this.ImgTestsComboBox.Location = new System.Drawing.Point(394, 60); + this.ImgTestsComboBox.Name = "ImgTestsComboBox"; + this.ImgTestsComboBox.Size = new System.Drawing.Size(96, 20); + this.ImgTestsComboBox.TabIndex = 1; + this.ImgTestsComboBox.Text = "All"; + this.ImgTestsComboBox.SelectedIndexChanged += new System.EventHandler(this.comboBoxImgTests_SelectedIndexChanged); + // + // tabPageResults + // + this.tabPageResults.Controls.Add(this.label20); + this.tabPageResults.Controls.Add(this.buttonSimImg); + this.tabPageResults.Controls.Add(this.buttonRefImg); + this.tabPageResults.Controls.Add(this.groupBox6); + this.tabPageResults.Controls.Add(this.groupBox5); + this.tabPageResults.Controls.Add(this.label22); + this.tabPageResults.Controls.Add(this.ErrorLabel); + this.tabPageResults.Controls.Add(this.label21); + this.tabPageResults.Controls.Add(this.StatusCalibLabel); + this.tabPageResults.Location = new System.Drawing.Point(4, 22); + this.tabPageResults.Name = "tabPageResults"; + this.tabPageResults.Size = new System.Drawing.Size(511, 646); + this.tabPageResults.TabIndex = 2; + this.tabPageResults.Text = "Results"; + this.tabPageResults.UseVisualStyleBackColor = true; + // + // label20 + // + this.label20.Location = new System.Drawing.Point(442, 56); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(48, 26); + this.label20.TabIndex = 21; + this.label20.Text = " pixels"; + this.label20.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // buttonSimImg + // + this.buttonSimImg.Location = new System.Drawing.Point(29, 612); + this.buttonSimImg.Name = "buttonSimImg"; + this.buttonSimImg.Size = new System.Drawing.Size(201, 26); + this.buttonSimImg.TabIndex = 9; + this.buttonSimImg.Text = " Simulated Reference Image"; + this.buttonSimImg.CheckedChanged += new System.EventHandler(this.radioSimulatedImg_CheckedChanged); + // + // buttonRefImg + // + this.buttonRefImg.Checked = true; + this.buttonRefImg.Location = new System.Drawing.Point(29, 586); + this.buttonRefImg.Name = "buttonRefImg"; + this.buttonRefImg.Size = new System.Drawing.Size(201, 26); + this.buttonRefImg.TabIndex = 8; + this.buttonRefImg.TabStop = true; + this.buttonRefImg.Text = " Original Reference Image"; + this.buttonRefImg.CheckedChanged += new System.EventHandler(this.buttonRefImg_CheckedChanged); + // + // groupBox6 + // + this.groupBox6.Controls.Add(this.checkBoxOrigImgCoord); + this.groupBox6.Controls.Add(this.buttonSaveCamPose); + this.groupBox6.Controls.Add(this.label59); + this.groupBox6.Controls.Add(this.label60); + this.groupBox6.Controls.Add(this.label61); + this.groupBox6.Controls.Add(this.label62); + this.groupBox6.Controls.Add(this.CamGammaLabel); + this.groupBox6.Controls.Add(this.label64); + this.groupBox6.Controls.Add(this.CamBetaLabel); + this.groupBox6.Controls.Add(this.label66); + this.groupBox6.Controls.Add(this.CamAlphaLabel); + this.groupBox6.Controls.Add(this.label50); + this.groupBox6.Controls.Add(this.label51); + this.groupBox6.Controls.Add(this.label52); + this.groupBox6.Controls.Add(this.label53); + this.groupBox6.Controls.Add(this.CamPoseZLabel); + this.groupBox6.Controls.Add(this.label55); + this.groupBox6.Controls.Add(this.CamPoseYLabel); + this.groupBox6.Controls.Add(this.label57); + this.groupBox6.Controls.Add(this.CamPoseXLabel); + this.groupBox6.Location = new System.Drawing.Point(10, 439); + this.groupBox6.Name = "groupBox6"; + this.groupBox6.Size = new System.Drawing.Size(489, 138); + this.groupBox6.TabIndex = 7; + this.groupBox6.TabStop = false; + this.groupBox6.Text = "Camera Pose"; + // + // checkBoxOrigImgCoord + // + this.checkBoxOrigImgCoord.Location = new System.Drawing.Point(19, 112); + this.checkBoxOrigImgCoord.Name = "checkBoxOrigImgCoord"; + this.checkBoxOrigImgCoord.Size = new System.Drawing.Size(173, 17); + this.checkBoxOrigImgCoord.TabIndex = 42; + this.checkBoxOrigImgCoord.Text = "Origin at Image Corner"; + this.checkBoxOrigImgCoord.CheckedChanged += new System.EventHandler(this.checkBoxOrigImgCoord_CheckedChanged); + // + // buttonSaveCamPose + // + this.buttonSaveCamPose.Location = new System.Drawing.Point(403, 26); + this.buttonSaveCamPose.Name = "buttonSaveCamPose"; + this.buttonSaveCamPose.Size = new System.Drawing.Size(77, 26); + this.buttonSaveCamPose.TabIndex = 41; + this.buttonSaveCamPose.Text = "Save ..."; + this.buttonSaveCamPose.Click += new System.EventHandler(this.buttonSaveCamPose_Click); + // + // label59 + // + this.label59.Location = new System.Drawing.Point(355, 78); + this.label59.Name = "label59"; + this.label59.Size = new System.Drawing.Size(29, 25); + this.label59.TabIndex = 40; + this.label59.Text = "deg"; + this.label59.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label60 + // + this.label60.Location = new System.Drawing.Point(355, 52); + this.label60.Name = "label60"; + this.label60.Size = new System.Drawing.Size(29, 26); + this.label60.TabIndex = 39; + this.label60.Text = "deg"; + this.label60.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label61 + // + this.label61.Location = new System.Drawing.Point(355, 26); + this.label61.Name = "label61"; + this.label61.Size = new System.Drawing.Size(29, 26); + this.label61.TabIndex = 38; + this.label61.Text = "deg"; + this.label61.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label62 + // + this.label62.Location = new System.Drawing.Point(192, 78); + this.label62.Name = "label62"; + this.label62.Size = new System.Drawing.Size(58, 25); + this.label62.TabIndex = 37; + this.label62.Text = "Gamma"; + this.label62.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // CamGammaLabel + // + this.CamGammaLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.CamGammaLabel.Location = new System.Drawing.Point(250, 78); + this.CamGammaLabel.Name = "CamGammaLabel"; + this.CamGammaLabel.Size = new System.Drawing.Size(105, 25); + this.CamGammaLabel.TabIndex = 36; + this.CamGammaLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label64 + // + this.label64.Location = new System.Drawing.Point(192, 52); + this.label64.Name = "label64"; + this.label64.Size = new System.Drawing.Size(38, 26); + this.label64.TabIndex = 35; + this.label64.Text = "Beta"; + this.label64.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // CamBetaLabel + // + this.CamBetaLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.CamBetaLabel.Location = new System.Drawing.Point(250, 52); + this.CamBetaLabel.Name = "CamBetaLabel"; + this.CamBetaLabel.Size = new System.Drawing.Size(105, 26); + this.CamBetaLabel.TabIndex = 34; + this.CamBetaLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label66 + // + this.label66.Location = new System.Drawing.Point(192, 26); + this.label66.Name = "label66"; + this.label66.Size = new System.Drawing.Size(48, 26); + this.label66.TabIndex = 33; + this.label66.Text = "Alpha"; + this.label66.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // CamAlphaLabel + // + this.CamAlphaLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.CamAlphaLabel.Location = new System.Drawing.Point(250, 26); + this.CamAlphaLabel.Name = "CamAlphaLabel"; + this.CamAlphaLabel.Size = new System.Drawing.Size(105, 26); + this.CamAlphaLabel.TabIndex = 32; + this.CamAlphaLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label50 + // + this.label50.Location = new System.Drawing.Point(144, 78); + this.label50.Name = "label50"; + this.label50.Size = new System.Drawing.Size(29, 25); + this.label50.TabIndex = 31; + this.label50.Text = "mm"; + this.label50.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label51 + // + this.label51.Location = new System.Drawing.Point(144, 52); + this.label51.Name = "label51"; + this.label51.Size = new System.Drawing.Size(29, 26); + this.label51.TabIndex = 30; + this.label51.Text = "mm"; + this.label51.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label52 + // + this.label52.Location = new System.Drawing.Point(144, 26); + this.label52.Name = "label52"; + this.label52.Size = new System.Drawing.Size(29, 26); + this.label52.TabIndex = 29; + this.label52.Text = "mm"; + this.label52.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label53 + // + this.label53.Location = new System.Drawing.Point(19, 78); + this.label53.Name = "label53"; + this.label53.Size = new System.Drawing.Size(19, 25); + this.label53.TabIndex = 28; + this.label53.Text = "Z"; + this.label53.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // CamPoseZLabel + // + this.CamPoseZLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.CamPoseZLabel.Location = new System.Drawing.Point(38, 78); + this.CamPoseZLabel.Name = "CamPoseZLabel"; + this.CamPoseZLabel.Size = new System.Drawing.Size(106, 25); + this.CamPoseZLabel.TabIndex = 27; + this.CamPoseZLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label55 + // + this.label55.Location = new System.Drawing.Point(19, 52); + this.label55.Name = "label55"; + this.label55.Size = new System.Drawing.Size(19, 26); + this.label55.TabIndex = 26; + this.label55.Text = "Y"; + this.label55.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // CamPoseYLabel + // + this.CamPoseYLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.CamPoseYLabel.Location = new System.Drawing.Point(38, 52); + this.CamPoseYLabel.Name = "CamPoseYLabel"; + this.CamPoseYLabel.Size = new System.Drawing.Size(106, 26); + this.CamPoseYLabel.TabIndex = 25; + this.CamPoseYLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label57 + // + this.label57.Location = new System.Drawing.Point(19, 26); + this.label57.Name = "label57"; + this.label57.Size = new System.Drawing.Size(19, 26); + this.label57.TabIndex = 24; + this.label57.Text = "X"; + this.label57.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // CamPoseXLabel + // + this.CamPoseXLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.CamPoseXLabel.Location = new System.Drawing.Point(38, 26); + this.CamPoseXLabel.Name = "CamPoseXLabel"; + this.CamPoseXLabel.Size = new System.Drawing.Size(106, 26); + this.CamPoseXLabel.TabIndex = 23; + this.CamPoseXLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // groupBox5 + // + this.groupBox5.Controls.Add(this.AreaScanPolynomPanel); + this.groupBox5.Controls.Add(this.label44); + this.groupBox5.Controls.Add(this.label30); + this.groupBox5.Controls.Add(this.FocalLResultLabel); + this.groupBox5.Controls.Add(this.KappaPanel); + this.groupBox5.Controls.Add(this.buttonSaveCamParams); + this.groupBox5.Controls.Add(this.label49); + this.groupBox5.Controls.Add(this.label48); + this.groupBox5.Controls.Add(this.label47); + this.groupBox5.Controls.Add(this.label46); + this.groupBox5.Controls.Add(this.label43); + this.groupBox5.Controls.Add(this.label42); + this.groupBox5.Controls.Add(this.label40); + this.groupBox5.Controls.Add(this.ImgHResultLabel); + this.groupBox5.Controls.Add(this.label38); + this.groupBox5.Controls.Add(this.ImgWResultLabel); + this.groupBox5.Controls.Add(this.label36); + this.groupBox5.Controls.Add(this.CyResultLabel); + this.groupBox5.Controls.Add(this.label34); + this.groupBox5.Controls.Add(this.CxResultLabel); + this.groupBox5.Controls.Add(this.label28); + this.groupBox5.Controls.Add(this.SyResultLabel); + this.groupBox5.Controls.Add(this.label26); + this.groupBox5.Controls.Add(this.SxResultLabel); + this.groupBox5.Location = new System.Drawing.Point(10, 93); + this.groupBox5.Name = "groupBox5"; + this.groupBox5.Size = new System.Drawing.Size(489, 346); + this.groupBox5.TabIndex = 6; + this.groupBox5.TabStop = false; + this.groupBox5.Text = "Camera Paramters"; + // + // AreaScanPolynomPanel + // + this.AreaScanPolynomPanel.Controls.Add(this.P2Label); + this.AreaScanPolynomPanel.Controls.Add(this.label83); + this.AreaScanPolynomPanel.Controls.Add(this.label84); + this.AreaScanPolynomPanel.Controls.Add(this.P1Label); + this.AreaScanPolynomPanel.Controls.Add(this.label80); + this.AreaScanPolynomPanel.Controls.Add(this.label81); + this.AreaScanPolynomPanel.Controls.Add(this.K3Label); + this.AreaScanPolynomPanel.Controls.Add(this.K2Label); + this.AreaScanPolynomPanel.Controls.Add(this.K1Label); + this.AreaScanPolynomPanel.Controls.Add(this.label54); + this.AreaScanPolynomPanel.Controls.Add(this.label56); + this.AreaScanPolynomPanel.Controls.Add(this.label58); + this.AreaScanPolynomPanel.Controls.Add(this.label63); + this.AreaScanPolynomPanel.Controls.Add(this.label65); + this.AreaScanPolynomPanel.Controls.Add(this.label67); + this.AreaScanPolynomPanel.Location = new System.Drawing.Point(19, 207); + this.AreaScanPolynomPanel.Name = "AreaScanPolynomPanel"; + this.AreaScanPolynomPanel.Size = new System.Drawing.Size(461, 129); + this.AreaScanPolynomPanel.TabIndex = 47; + this.AreaScanPolynomPanel.Visible = false; + // + // P2Label + // + this.P2Label.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.P2Label.Location = new System.Drawing.Point(106, 103); + this.P2Label.Name = "P2Label"; + this.P2Label.Size = new System.Drawing.Size(182, 26); + this.P2Label.TabIndex = 49; + this.P2Label.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label83 + // + this.label83.Location = new System.Drawing.Point(0, 103); + this.label83.Name = "label83"; + this.label83.Size = new System.Drawing.Size(106, 26); + this.label83.TabIndex = 48; + this.label83.Text = "Tang 2nd (P2)"; + this.label83.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label84 + // + this.label84.BackColor = System.Drawing.SystemColors.ControlLight; + this.label84.Location = new System.Drawing.Point(298, 103); + this.label84.Name = "label84"; + this.label84.Size = new System.Drawing.Size(144, 26); + this.label84.TabIndex = 47; + this.label84.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // P1Label + // + this.P1Label.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.P1Label.Location = new System.Drawing.Point(106, 78); + this.P1Label.Name = "P1Label"; + this.P1Label.Size = new System.Drawing.Size(182, 25); + this.P1Label.TabIndex = 46; + this.P1Label.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label80 + // + this.label80.Location = new System.Drawing.Point(0, 78); + this.label80.Name = "label80"; + this.label80.Size = new System.Drawing.Size(106, 25); + this.label80.TabIndex = 45; + this.label80.Text = "Tang 2nd (P1)"; + this.label80.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label81 + // + this.label81.BackColor = System.Drawing.SystemColors.ControlLight; + this.label81.Location = new System.Drawing.Point(298, 78); + this.label81.Name = "label81"; + this.label81.Size = new System.Drawing.Size(144, 25); + this.label81.TabIndex = 44; + this.label81.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // K3Label + // + this.K3Label.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.K3Label.Location = new System.Drawing.Point(106, 52); + this.K3Label.Name = "K3Label"; + this.K3Label.Size = new System.Drawing.Size(182, 26); + this.K3Label.TabIndex = 43; + this.K3Label.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // K2Label + // + this.K2Label.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.K2Label.Location = new System.Drawing.Point(106, 26); + this.K2Label.Name = "K2Label"; + this.K2Label.Size = new System.Drawing.Size(182, 26); + this.K2Label.TabIndex = 42; + this.K2Label.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // K1Label + // + this.K1Label.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.K1Label.Location = new System.Drawing.Point(106, 0); + this.K1Label.Name = "K1Label"; + this.K1Label.Size = new System.Drawing.Size(182, 26); + this.K1Label.TabIndex = 41; + this.K1Label.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label54 + // + this.label54.Location = new System.Drawing.Point(0, 52); + this.label54.Name = "label54"; + this.label54.Size = new System.Drawing.Size(106, 26); + this.label54.TabIndex = 40; + this.label54.Text = "Radial 6th (K3)"; + this.label54.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label56 + // + this.label56.Location = new System.Drawing.Point(0, 26); + this.label56.Name = "label56"; + this.label56.Size = new System.Drawing.Size(106, 26); + this.label56.TabIndex = 39; + this.label56.Text = "Radial 4th (K2)"; + this.label56.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label58 + // + this.label58.Location = new System.Drawing.Point(0, 0); + this.label58.Name = "label58"; + this.label58.Size = new System.Drawing.Size(106, 26); + this.label58.TabIndex = 38; + this.label58.Text = "Radial 2nd (K1)"; + this.label58.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label63 + // + this.label63.BackColor = System.Drawing.SystemColors.ControlLight; + this.label63.Location = new System.Drawing.Point(298, 52); + this.label63.Name = "label63"; + this.label63.Size = new System.Drawing.Size(144, 26); + this.label63.TabIndex = 37; + this.label63.Text = "m^ -6"; + this.label63.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label65 + // + this.label65.BackColor = System.Drawing.SystemColors.ControlLight; + this.label65.Location = new System.Drawing.Point(298, 26); + this.label65.Name = "label65"; + this.label65.Size = new System.Drawing.Size(144, 26); + this.label65.TabIndex = 36; + this.label65.Text = "m^ -4"; + this.label65.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label67 + // + this.label67.BackColor = System.Drawing.SystemColors.ControlLight; + this.label67.Location = new System.Drawing.Point(298, 0); + this.label67.Name = "label67"; + this.label67.Size = new System.Drawing.Size(144, 26); + this.label67.TabIndex = 35; + this.label67.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label44 + // + this.label44.Location = new System.Drawing.Point(317, 181); + this.label44.Name = "label44"; + this.label44.Size = new System.Drawing.Size(38, 26); + this.label44.TabIndex = 46; + this.label44.Text = "mm"; + this.label44.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label30 + // + this.label30.Location = new System.Drawing.Point(19, 181); + this.label30.Name = "label30"; + this.label30.Size = new System.Drawing.Size(96, 26); + this.label30.TabIndex = 43; + this.label30.Text = "Focal Length"; + this.label30.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // FocalLResultLabel + // + this.FocalLResultLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.FocalLResultLabel.Location = new System.Drawing.Point(125, 181); + this.FocalLResultLabel.Name = "FocalLResultLabel"; + this.FocalLResultLabel.Size = new System.Drawing.Size(182, 26); + this.FocalLResultLabel.TabIndex = 42; + this.FocalLResultLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // KappaPanel + // + this.KappaPanel.Controls.Add(this.LineScanPanel); + this.KappaPanel.Controls.Add(this.label45); + this.KappaPanel.Controls.Add(this.label32); + this.KappaPanel.Controls.Add(this.KappaResultLabel); + this.KappaPanel.Location = new System.Drawing.Point(19, 207); + this.KappaPanel.Name = "KappaPanel"; + this.KappaPanel.Size = new System.Drawing.Size(413, 129); + this.KappaPanel.TabIndex = 33; + // + // LineScanPanel + // + this.LineScanPanel.Controls.Add(this.VzResultLabel); + this.LineScanPanel.Controls.Add(this.VyResultLabel); + this.LineScanPanel.Controls.Add(this.VxResultLabel); + this.LineScanPanel.Controls.Add(this.label82); + this.LineScanPanel.Controls.Add(this.label85); + this.LineScanPanel.Controls.Add(this.label86); + this.LineScanPanel.Controls.Add(this.label87); + this.LineScanPanel.Controls.Add(this.label88); + this.LineScanPanel.Controls.Add(this.label89); + this.LineScanPanel.Location = new System.Drawing.Point(0, 43); + this.LineScanPanel.Name = "LineScanPanel"; + this.LineScanPanel.Size = new System.Drawing.Size(413, 78); + this.LineScanPanel.TabIndex = 51; + this.LineScanPanel.Visible = false; + // + // VzResultLabel + // + this.VzResultLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.VzResultLabel.Location = new System.Drawing.Point(106, 52); + this.VzResultLabel.Name = "VzResultLabel"; + this.VzResultLabel.Size = new System.Drawing.Size(182, 26); + this.VzResultLabel.TabIndex = 43; + this.VzResultLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // VyResultLabel + // + this.VyResultLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.VyResultLabel.Location = new System.Drawing.Point(106, 26); + this.VyResultLabel.Name = "VyResultLabel"; + this.VyResultLabel.Size = new System.Drawing.Size(182, 26); + this.VyResultLabel.TabIndex = 42; + this.VyResultLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // VxResultLabel + // + this.VxResultLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.VxResultLabel.Location = new System.Drawing.Point(106, 0); + this.VxResultLabel.Name = "VxResultLabel"; + this.VxResultLabel.Size = new System.Drawing.Size(182, 26); + this.VxResultLabel.TabIndex = 41; + this.VxResultLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label82 + // + this.label82.Location = new System.Drawing.Point(0, 52); + this.label82.Name = "label82"; + this.label82.Size = new System.Drawing.Size(106, 26); + this.label82.TabIndex = 40; + this.label82.Text = "Motion Z (Vz)"; + this.label82.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label85 + // + this.label85.Location = new System.Drawing.Point(0, 26); + this.label85.Name = "label85"; + this.label85.Size = new System.Drawing.Size(106, 26); + this.label85.TabIndex = 39; + this.label85.Text = "Motion Y (Vy)"; + this.label85.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label86 + // + this.label86.Location = new System.Drawing.Point(0, 0); + this.label86.Name = "label86"; + this.label86.Size = new System.Drawing.Size(106, 26); + this.label86.TabIndex = 38; + this.label86.Text = "Motion X (Vx)"; + this.label86.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label87 + // + this.label87.BackColor = System.Drawing.SystemColors.ControlLight; + this.label87.Location = new System.Drawing.Point(298, 52); + this.label87.Name = "label87"; + this.label87.Size = new System.Drawing.Size(57, 26); + this.label87.TabIndex = 37; + this.label87.Text = "绁�/Pixel"; + this.label87.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label88 + // + this.label88.BackColor = System.Drawing.SystemColors.ControlLight; + this.label88.Location = new System.Drawing.Point(298, 26); + this.label88.Name = "label88"; + this.label88.Size = new System.Drawing.Size(57, 26); + this.label88.TabIndex = 36; + this.label88.Text = "绁�/Pixel"; + this.label88.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label89 + // + this.label89.BackColor = System.Drawing.SystemColors.ControlLight; + this.label89.Location = new System.Drawing.Point(298, 0); + this.label89.Name = "label89"; + this.label89.Size = new System.Drawing.Size(57, 26); + this.label89.TabIndex = 35; + this.label89.Text = "绁�/Pixel"; + this.label89.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label45 + // + this.label45.Location = new System.Drawing.Point(298, 0); + this.label45.Name = "label45"; + this.label45.Size = new System.Drawing.Size(38, 26); + this.label45.TabIndex = 50; + this.label45.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label32 + // + this.label32.Location = new System.Drawing.Point(0, 0); + this.label32.Name = "label32"; + this.label32.Size = new System.Drawing.Size(77, 26); + this.label32.TabIndex = 49; + this.label32.Text = "Kappa"; + this.label32.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // KappaResultLabel + // + this.KappaResultLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.KappaResultLabel.Location = new System.Drawing.Point(106, 0); + this.KappaResultLabel.Name = "KappaResultLabel"; + this.KappaResultLabel.Size = new System.Drawing.Size(182, 26); + this.KappaResultLabel.TabIndex = 48; + this.KappaResultLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // buttonSaveCamParams + // + this.buttonSaveCamParams.Location = new System.Drawing.Point(403, 26); + this.buttonSaveCamParams.Name = "buttonSaveCamParams"; + this.buttonSaveCamParams.Size = new System.Drawing.Size(77, 26); + this.buttonSaveCamParams.TabIndex = 28; + this.buttonSaveCamParams.Text = "Save ..."; + this.buttonSaveCamParams.Click += new System.EventHandler(this.buttonSaveCamParams_Click); + // + // label49 + // + this.label49.Location = new System.Drawing.Point(317, 155); + this.label49.Name = "label49"; + this.label49.Size = new System.Drawing.Size(48, 26); + this.label49.TabIndex = 27; + this.label49.Text = "pixels"; + this.label49.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label48 + // + this.label48.Location = new System.Drawing.Point(317, 129); + this.label48.Name = "label48"; + this.label48.Size = new System.Drawing.Size(48, 26); + this.label48.TabIndex = 26; + this.label48.Text = "pixels"; + this.label48.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label47 + // + this.label47.Location = new System.Drawing.Point(317, 103); + this.label47.Name = "label47"; + this.label47.Size = new System.Drawing.Size(48, 26); + this.label47.TabIndex = 25; + this.label47.Text = "pixels"; + this.label47.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label46 + // + this.label46.Location = new System.Drawing.Point(317, 78); + this.label46.Name = "label46"; + this.label46.Size = new System.Drawing.Size(48, 25); + this.label46.TabIndex = 24; + this.label46.Text = "pixels"; + this.label46.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label43 + // + this.label43.Location = new System.Drawing.Point(317, 52); + this.label43.Name = "label43"; + this.label43.Size = new System.Drawing.Size(38, 26); + this.label43.TabIndex = 21; + this.label43.Text = "渭m"; + this.label43.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label42 + // + this.label42.Location = new System.Drawing.Point(317, 26); + this.label42.Name = "label42"; + this.label42.Size = new System.Drawing.Size(38, 26); + this.label42.TabIndex = 20; + this.label42.Text = "渭m"; + this.label42.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label40 + // + this.label40.Location = new System.Drawing.Point(19, 155); + this.label40.Name = "label40"; + this.label40.Size = new System.Drawing.Size(87, 26); + this.label40.TabIndex = 19; + this.label40.Text = "Image Height"; + this.label40.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // ImgHResultLabel + // + this.ImgHResultLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.ImgHResultLabel.Location = new System.Drawing.Point(125, 155); + this.ImgHResultLabel.Name = "ImgHResultLabel"; + this.ImgHResultLabel.Size = new System.Drawing.Size(182, 26); + this.ImgHResultLabel.TabIndex = 18; + this.ImgHResultLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label38 + // + this.label38.Location = new System.Drawing.Point(19, 129); + this.label38.Name = "label38"; + this.label38.Size = new System.Drawing.Size(87, 26); + this.label38.TabIndex = 17; + this.label38.Text = "Image Width"; + this.label38.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // ImgWResultLabel + // + this.ImgWResultLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.ImgWResultLabel.Location = new System.Drawing.Point(125, 129); + this.ImgWResultLabel.Name = "ImgWResultLabel"; + this.ImgWResultLabel.Size = new System.Drawing.Size(182, 26); + this.ImgWResultLabel.TabIndex = 16; + this.ImgWResultLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label36 + // + this.label36.Location = new System.Drawing.Point(19, 103); + this.label36.Name = "label36"; + this.label36.Size = new System.Drawing.Size(106, 26); + this.label36.TabIndex = 15; + this.label36.Text = "Center Row (Cy)"; + this.label36.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // CyResultLabel + // + this.CyResultLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.CyResultLabel.Location = new System.Drawing.Point(125, 103); + this.CyResultLabel.Name = "CyResultLabel"; + this.CyResultLabel.Size = new System.Drawing.Size(182, 26); + this.CyResultLabel.TabIndex = 14; + this.CyResultLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label34 + // + this.label34.Location = new System.Drawing.Point(19, 78); + this.label34.Name = "label34"; + this.label34.Size = new System.Drawing.Size(106, 25); + this.label34.TabIndex = 13; + this.label34.Text = "Center Col (Cx)"; + this.label34.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // CxResultLabel + // + this.CxResultLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.CxResultLabel.Location = new System.Drawing.Point(125, 78); + this.CxResultLabel.Name = "CxResultLabel"; + this.CxResultLabel.Size = new System.Drawing.Size(182, 25); + this.CxResultLabel.TabIndex = 12; + this.CxResultLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label28 + // + this.label28.Location = new System.Drawing.Point(19, 52); + this.label28.Name = "label28"; + this.label28.Size = new System.Drawing.Size(100, 26); + this.label28.TabIndex = 7; + this.label28.Text = "Cell Height (Sy)"; + this.label28.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // SyResultLabel + // + this.SyResultLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.SyResultLabel.Location = new System.Drawing.Point(125, 52); + this.SyResultLabel.Name = "SyResultLabel"; + this.SyResultLabel.Size = new System.Drawing.Size(182, 26); + this.SyResultLabel.TabIndex = 6; + this.SyResultLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label26 + // + this.label26.Location = new System.Drawing.Point(19, 26); + this.label26.Name = "label26"; + this.label26.Size = new System.Drawing.Size(96, 26); + this.label26.TabIndex = 5; + this.label26.Text = "Cell Width (Sx)"; + this.label26.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // SxResultLabel + // + this.SxResultLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.SxResultLabel.Location = new System.Drawing.Point(125, 26); + this.SxResultLabel.Name = "SxResultLabel"; + this.SxResultLabel.Size = new System.Drawing.Size(182, 26); + this.SxResultLabel.TabIndex = 4; + this.SxResultLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label22 + // + this.label22.Location = new System.Drawing.Point(19, 56); + this.label22.Name = "label22"; + this.label22.Size = new System.Drawing.Size(77, 26); + this.label22.TabIndex = 3; + this.label22.Text = "Mean Error"; + this.label22.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // ErrorLabel + // + this.ErrorLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.ErrorLabel.Location = new System.Drawing.Point(96, 56); + this.ErrorLabel.Name = "ErrorLabel"; + this.ErrorLabel.Size = new System.Drawing.Size(336, 26); + this.ErrorLabel.TabIndex = 2; + this.ErrorLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label21 + // + this.label21.Location = new System.Drawing.Point(19, 26); + this.label21.Name = "label21"; + this.label21.Size = new System.Drawing.Size(77, 26); + this.label21.TabIndex = 1; + this.label21.Text = "Status"; + this.label21.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // StatusCalibLabel + // + this.StatusCalibLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.StatusCalibLabel.Location = new System.Drawing.Point(96, 26); + this.StatusCalibLabel.Name = "StatusCalibLabel"; + this.StatusCalibLabel.Size = new System.Drawing.Size(394, 26); + this.StatusCalibLabel.TabIndex = 0; + this.StatusCalibLabel.Text = "No calibration data available"; + this.StatusCalibLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // tabPageDistance + // + this.tabPageDistance.Controls.Add(this.label33); + this.tabPageDistance.Controls.Add(this.label35); + this.tabPageDistance.Controls.Add(this.numericUpDownP4); + this.tabPageDistance.Controls.Add(this.numericUpDownP3); + this.tabPageDistance.Controls.Add(this.label29); + this.tabPageDistance.Controls.Add(this.label31); + this.tabPageDistance.Controls.Add(this.txtDistanceP3P4); + this.tabPageDistance.Controls.Add(this.label27); + this.tabPageDistance.Controls.Add(this.label25); + this.tabPageDistance.Controls.Add(this.txtDistanceP1P2); + this.tabPageDistance.Controls.Add(this.label24); + this.tabPageDistance.Controls.Add(this.label23); + this.tabPageDistance.Controls.Add(this.numericUpDownP2); + this.tabPageDistance.Controls.Add(this.numericUpDownP1); + this.tabPageDistance.Location = new System.Drawing.Point(4, 22); + this.tabPageDistance.Name = "tabPageDistance"; + this.tabPageDistance.Padding = new System.Windows.Forms.Padding(3); + this.tabPageDistance.Size = new System.Drawing.Size(511, 646); + this.tabPageDistance.TabIndex = 3; + this.tabPageDistance.Text = "Distance"; + this.tabPageDistance.UseVisualStyleBackColor = true; + // + // label33 + // + this.label33.AutoSize = true; + this.label33.Location = new System.Drawing.Point(252, 98); + this.label33.Name = "label33"; + this.label33.Size = new System.Drawing.Size(53, 12); + this.label33.TabIndex = 14; + this.label33.Text = "Point 4:"; + // + // label35 + // + this.label35.AutoSize = true; + this.label35.Location = new System.Drawing.Point(20, 98); + this.label35.Name = "label35"; + this.label35.Size = new System.Drawing.Size(53, 12); + this.label35.TabIndex = 13; + this.label35.Text = "Point 3:"; + // + // numericUpDownP4 + // + this.numericUpDownP4.Location = new System.Drawing.Point(322, 96); + this.numericUpDownP4.Maximum = new decimal(new int[] { + 49, + 0, + 0, + 0}); + this.numericUpDownP4.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDownP4.Name = "numericUpDownP4"; + this.numericUpDownP4.Size = new System.Drawing.Size(92, 21); + this.numericUpDownP4.TabIndex = 12; + this.numericUpDownP4.Value = new decimal(new int[] { + 25, + 0, + 0, + 0}); + this.numericUpDownP4.ValueChanged += new System.EventHandler(this.numericUpDownP4_ValueChanged); + // + // numericUpDownP3 + // + this.numericUpDownP3.Location = new System.Drawing.Point(79, 96); + this.numericUpDownP3.Maximum = new decimal(new int[] { + 49, + 0, + 0, + 0}); + this.numericUpDownP3.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDownP3.Name = "numericUpDownP3"; + this.numericUpDownP3.Size = new System.Drawing.Size(92, 21); + this.numericUpDownP3.TabIndex = 11; + this.numericUpDownP3.Value = new decimal(new int[] { + 18, + 0, + 0, + 0}); + this.numericUpDownP3.ValueChanged += new System.EventHandler(this.numericUpDownP3_ValueChanged); + // + // label29 + // + this.label29.AutoSize = true; + this.label29.Font = new System.Drawing.Font("瀹嬩綋", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label29.Location = new System.Drawing.Point(397, 210); + this.label29.Name = "label29"; + this.label29.Size = new System.Drawing.Size(32, 21); + this.label29.TabIndex = 10; + this.label29.Text = "mm"; + // + // label31 + // + this.label31.AutoSize = true; + this.label31.Font = new System.Drawing.Font("瀹嬩綋", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label31.Location = new System.Drawing.Point(17, 210); + this.label31.Name = "label31"; + this.label31.Size = new System.Drawing.Size(185, 21); + this.label31.TabIndex = 9; + this.label31.Text = "Distance P3-P4锛�"; + // + // txtDistanceP3P4 + // + this.txtDistanceP3P4.Font = new System.Drawing.Font("瀹嬩綋", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtDistanceP3P4.ForeColor = System.Drawing.SystemColors.WindowText; + this.txtDistanceP3P4.Location = new System.Drawing.Point(208, 207); + this.txtDistanceP3P4.Name = "txtDistanceP3P4"; + this.txtDistanceP3P4.ReadOnly = true; + this.txtDistanceP3P4.Size = new System.Drawing.Size(172, 31); + this.txtDistanceP3P4.TabIndex = 8; + this.txtDistanceP3P4.Text = "0"; + // + // label27 + // + this.label27.AutoSize = true; + this.label27.Font = new System.Drawing.Font("瀹嬩綋", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label27.Location = new System.Drawing.Point(397, 160); + this.label27.Name = "label27"; + this.label27.Size = new System.Drawing.Size(32, 21); + this.label27.TabIndex = 7; + this.label27.Text = "mm"; + // + // label25 + // + this.label25.AutoSize = true; + this.label25.Font = new System.Drawing.Font("瀹嬩綋", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label25.Location = new System.Drawing.Point(17, 160); + this.label25.Name = "label25"; + this.label25.Size = new System.Drawing.Size(185, 21); + this.label25.TabIndex = 6; + this.label25.Text = "Distance P1-P2锛�"; + // + // txtDistanceP1P2 + // + this.txtDistanceP1P2.Font = new System.Drawing.Font("瀹嬩綋", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtDistanceP1P2.ForeColor = System.Drawing.SystemColors.WindowText; + this.txtDistanceP1P2.Location = new System.Drawing.Point(208, 157); + this.txtDistanceP1P2.Name = "txtDistanceP1P2"; + this.txtDistanceP1P2.ReadOnly = true; + this.txtDistanceP1P2.Size = new System.Drawing.Size(172, 31); + this.txtDistanceP1P2.TabIndex = 5; + this.txtDistanceP1P2.Text = "0"; + // + // label24 + // + this.label24.AutoSize = true; + this.label24.Location = new System.Drawing.Point(252, 57); + this.label24.Name = "label24"; + this.label24.Size = new System.Drawing.Size(53, 12); + this.label24.TabIndex = 4; + this.label24.Text = "Point 2:"; + // + // label23 + // + this.label23.AutoSize = true; + this.label23.Location = new System.Drawing.Point(20, 57); + this.label23.Name = "label23"; + this.label23.Size = new System.Drawing.Size(53, 12); + this.label23.TabIndex = 3; + this.label23.Text = "Point 1:"; + // + // numericUpDownP2 + // + this.numericUpDownP2.Location = new System.Drawing.Point(322, 55); + this.numericUpDownP2.Maximum = new decimal(new int[] { + 49, + 0, + 0, + 0}); + this.numericUpDownP2.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDownP2.Name = "numericUpDownP2"; + this.numericUpDownP2.Size = new System.Drawing.Size(92, 21); + this.numericUpDownP2.TabIndex = 2; + this.numericUpDownP2.Value = new decimal(new int[] { + 25, + 0, + 0, + 0}); + this.numericUpDownP2.ValueChanged += new System.EventHandler(this.numericUpDownP2_ValueChanged); + // + // numericUpDownP1 + // + this.numericUpDownP1.Location = new System.Drawing.Point(79, 55); + this.numericUpDownP1.Maximum = new decimal(new int[] { + 49, + 0, + 0, + 0}); + this.numericUpDownP1.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDownP1.Name = "numericUpDownP1"; + this.numericUpDownP1.Size = new System.Drawing.Size(92, 21); + this.numericUpDownP1.TabIndex = 1; + this.numericUpDownP1.Value = new decimal(new int[] { + 24, + 0, + 0, + 0}); + this.numericUpDownP1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged); + // + // label1 + // + this.label1.Location = new System.Drawing.Point(19, 34); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(106, 26); + this.label1.TabIndex = 1; + this.label1.Text = "Description File"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.buttonMove); + this.groupBox1.Controls.Add(this.buttonReset); + this.groupBox1.Controls.Add(this.buttonNone); + this.groupBox1.Controls.Add(this.buttonMagnify); + this.groupBox1.Controls.Add(this.buttonZoom); + this.groupBox1.Location = new System.Drawing.Point(432, 474); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(134, 172); + this.groupBox1.TabIndex = 11; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "View Interaction"; + // + // buttonMove + // + this.buttonMove.Location = new System.Drawing.Point(19, 26); + this.buttonMove.Name = "buttonMove"; + this.buttonMove.Size = new System.Drawing.Size(106, 26); + this.buttonMove.TabIndex = 4; + this.buttonMove.Text = " move"; + this.buttonMove.CheckedChanged += new System.EventHandler(this.buttonMove_CheckedChanged); + // + // buttonReset + // + this.buttonReset.Location = new System.Drawing.Point(19, 138); + this.buttonReset.Name = "buttonReset"; + this.buttonReset.Size = new System.Drawing.Size(96, 24); + this.buttonReset.TabIndex = 3; + this.buttonReset.Text = "Reset"; + this.buttonReset.Click += new System.EventHandler(this.buttonReset_Click); + // + // buttonNone + // + this.buttonNone.Checked = true; + this.buttonNone.Location = new System.Drawing.Point(19, 103); + this.buttonNone.Name = "buttonNone"; + this.buttonNone.Size = new System.Drawing.Size(106, 26); + this.buttonNone.TabIndex = 2; + this.buttonNone.TabStop = true; + this.buttonNone.Text = " none"; + this.buttonNone.CheckedChanged += new System.EventHandler(this.buttonNone_CheckedChanged); + // + // buttonMagnify + // + this.buttonMagnify.Location = new System.Drawing.Point(19, 78); + this.buttonMagnify.Name = "buttonMagnify"; + this.buttonMagnify.Size = new System.Drawing.Size(106, 25); + this.buttonMagnify.TabIndex = 1; + this.buttonMagnify.Text = " magnify"; + this.buttonMagnify.CheckedChanged += new System.EventHandler(this.buttonMagnify_CheckedChanged); + // + // buttonZoom + // + this.buttonZoom.Location = new System.Drawing.Point(19, 52); + this.buttonZoom.Name = "buttonZoom"; + this.buttonZoom.Size = new System.Drawing.Size(106, 26); + this.buttonZoom.TabIndex = 0; + this.buttonZoom.Text = " zoom"; + this.buttonZoom.CheckedChanged += new System.EventHandler(this.buttonZoom_CheckedChanged); + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.upDownLineWidth); + this.groupBox3.Controls.Add(this.label78); + this.groupBox3.Controls.Add(this.label68); + this.groupBox3.Controls.Add(this.checkBoxCoordSys); + this.groupBox3.Controls.Add(this.checkBoxMarkCenter); + this.groupBox3.Controls.Add(this.checkBoxPlateRegion); + this.groupBox3.Controls.Add(this.comboBoxDraw); + this.groupBox3.Controls.Add(this.comboBoxCoordSys); + this.groupBox3.Controls.Add(this.comboBoxMarkCenters); + this.groupBox3.Controls.Add(this.comboBoxPlateRegion); + this.groupBox3.Location = new System.Drawing.Point(19, 474); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(375, 172); + this.groupBox3.TabIndex = 26; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "Display Parameters"; + // + // upDownLineWidth + // + this.upDownLineWidth.Location = new System.Drawing.Point(197, 138); + this.upDownLineWidth.Maximum = new decimal(new int[] { + 15, + 0, + 0, + 0}); + this.upDownLineWidth.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.upDownLineWidth.Name = "upDownLineWidth"; + this.upDownLineWidth.Size = new System.Drawing.Size(153, 21); + this.upDownLineWidth.TabIndex = 36; + this.upDownLineWidth.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.upDownLineWidth.ValueChanged += new System.EventHandler(this.upDownLineWidth_ValueChanged); + // + // label78 + // + this.label78.Location = new System.Drawing.Point(48, 138); + this.label78.Name = "label78"; + this.label78.Size = new System.Drawing.Size(77, 26); + this.label78.TabIndex = 35; + this.label78.Text = " LineWidth"; + this.label78.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label68 + // + this.label68.Location = new System.Drawing.Point(48, 112); + this.label68.Name = "label68"; + this.label68.Size = new System.Drawing.Size(77, 26); + this.label68.TabIndex = 33; + this.label68.Text = " Draw"; + this.label68.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // checkBoxCoordSys + // + this.checkBoxCoordSys.Checked = true; + this.checkBoxCoordSys.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBoxCoordSys.Location = new System.Drawing.Point(24, 78); + this.checkBoxCoordSys.Name = "checkBoxCoordSys"; + this.checkBoxCoordSys.Size = new System.Drawing.Size(154, 25); + this.checkBoxCoordSys.TabIndex = 32; + this.checkBoxCoordSys.Text = " Coordinate System"; + this.checkBoxCoordSys.CheckedChanged += new System.EventHandler(this.checkBoxCoordSys_CheckedChanged); + // + // checkBoxMarkCenter + // + this.checkBoxMarkCenter.Checked = true; + this.checkBoxMarkCenter.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBoxMarkCenter.Location = new System.Drawing.Point(24, 52); + this.checkBoxMarkCenter.Name = "checkBoxMarkCenter"; + this.checkBoxMarkCenter.Size = new System.Drawing.Size(154, 26); + this.checkBoxMarkCenter.TabIndex = 31; + this.checkBoxMarkCenter.Text = " Mark Centers"; + this.checkBoxMarkCenter.CheckedChanged += new System.EventHandler(this.checkBoxMarkCenter_CheckedChanged); + // + // checkBoxPlateRegion + // + this.checkBoxPlateRegion.Checked = true; + this.checkBoxPlateRegion.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBoxPlateRegion.Location = new System.Drawing.Point(24, 26); + this.checkBoxPlateRegion.Name = "checkBoxPlateRegion"; + this.checkBoxPlateRegion.Size = new System.Drawing.Size(154, 26); + this.checkBoxPlateRegion.TabIndex = 30; + this.checkBoxPlateRegion.Text = " Plate Region"; + this.checkBoxPlateRegion.CheckedChanged += new System.EventHandler(this.checkBoxPlateRegion_CheckedChanged); + // + // comboBoxDraw + // + this.comboBoxDraw.Items.AddRange(new object[] { + "margin", + "fill"}); + this.comboBoxDraw.Location = new System.Drawing.Point(197, 112); + this.comboBoxDraw.Name = "comboBoxDraw"; + this.comboBoxDraw.Size = new System.Drawing.Size(153, 20); + this.comboBoxDraw.TabIndex = 29; + this.comboBoxDraw.Text = "margin"; + this.comboBoxDraw.SelectedIndexChanged += new System.EventHandler(this.comboBoxDraw_SelectedIndexChanged); + // + // comboBoxCoordSys + // + this.comboBoxCoordSys.Items.AddRange(new object[] { + "green", + "red", + "blue", + "black", + "white", + "yellow", + "magenta", + "cyan", + "gray"}); + this.comboBoxCoordSys.Location = new System.Drawing.Point(197, 78); + this.comboBoxCoordSys.Name = "comboBoxCoordSys"; + this.comboBoxCoordSys.Size = new System.Drawing.Size(153, 20); + this.comboBoxCoordSys.TabIndex = 28; + this.comboBoxCoordSys.Text = "yellow"; + this.comboBoxCoordSys.SelectedIndexChanged += new System.EventHandler(this.comboBoxCoordSys_SelectedIndexChanged); + // + // comboBoxMarkCenters + // + this.comboBoxMarkCenters.Items.AddRange(new object[] { + "green", + "red", + "blue", + "black", + "white", + "yellow", + "magenta", + "cyan", + "gray"}); + this.comboBoxMarkCenters.Location = new System.Drawing.Point(197, 52); + this.comboBoxMarkCenters.Name = "comboBoxMarkCenters"; + this.comboBoxMarkCenters.Size = new System.Drawing.Size(153, 20); + this.comboBoxMarkCenters.TabIndex = 27; + this.comboBoxMarkCenters.Text = "cyan"; + this.comboBoxMarkCenters.SelectedIndexChanged += new System.EventHandler(this.comboBoxMarkCenters_SelectedIndexChanged); + // + // comboBoxPlateRegion + // + this.comboBoxPlateRegion.Items.AddRange(new object[] { + "green", + "red", + "blue", + "black", + "white", + "yellow", + "magenta", + "cyan", + "gray"}); + this.comboBoxPlateRegion.Location = new System.Drawing.Point(197, 26); + this.comboBoxPlateRegion.Name = "comboBoxPlateRegion"; + this.comboBoxPlateRegion.Size = new System.Drawing.Size(153, 20); + this.comboBoxPlateRegion.TabIndex = 26; + this.comboBoxPlateRegion.Text = "green"; + this.comboBoxPlateRegion.SelectedIndexChanged += new System.EventHandler(this.comboBoxPlateRegion_SelectedIndexChanged); + // + // openFileDialogImg + // + this.openFileDialogImg.Filter = "png (*.png)|*.png|tiff (*.tif)|*.tif|jpeg (*.jpg)| *.jpg|all files (*.*)|*.*"; + this.openFileDialogImg.FilterIndex = 4; + this.openFileDialogImg.Multiselect = true; + // + // openFileDialogDescr + // + this.openFileDialogDescr.Filter = " Plate Description (*.descr)|*.descr| all files (*.*)|*.*"; + // + // openFileDialogImportParams + // + this.openFileDialogImportParams.Filter = "camera parameters (*.cal)|*.cal|camera parameters (*.dat)|*dat| all files (*.*)|*" + + ".*"; + this.openFileDialogImportParams.FilterIndex = 3; + // + // StatusLabel + // + this.StatusLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.StatusLabel.Location = new System.Drawing.Point(19, 663); + this.StatusLabel.Name = "StatusLabel"; + this.StatusLabel.Size = new System.Drawing.Size(547, 26); + this.StatusLabel.TabIndex = 27; + this.StatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // saveParamFileDialog + // + this.saveParamFileDialog.Filter = "camera parameters (*.cal)|*.cal|camera parameters (*.dat)|*dat| all files (*.*)|*" + + ".*"; + // + // frmCalibration + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1132, 698); + this.Controls.Add(this.StatusLabel); + this.Controls.Add(this.groupBox3); + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.tabControl); + this.Controls.Add(this.viewPort); + this.Controls.Add(this.label1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.MaximizeBox = false; + this.MaximumSize = new System.Drawing.Size(1138, 732); + this.MinimumSize = new System.Drawing.Size(1138, 726); + this.Name = "frmCalibration"; + this.Text = "鏍囧畾"; + this.Load += new System.EventHandler(this.frmMain_Load); + this.tabControl.ResumeLayout(false); + this.tabPageCalib.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.LineScanAddPanel.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.MotionZUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MotionYUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MotionXUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.FocalLengthUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.SyUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.SxUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.ThicknessUpDown)).EndInit(); + this.tabPageQualityCheck.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.WarnlevelUpDown)).EndInit(); + this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.MaxDiamTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MaxDiamUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinContLTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinContLUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.SmoothTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.SmoothUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinThreshTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinThreshUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.ThreshDecrTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.ThreshDecrUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.InitThreshTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.InitThreshUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinDiamTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinDiamUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MarkThreshTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MarkThreshUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.FilterSizeTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.FilterSizeUpDown)).EndInit(); + this.tabPageResults.ResumeLayout(false); + this.groupBox6.ResumeLayout(false); + this.groupBox5.ResumeLayout(false); + this.AreaScanPolynomPanel.ResumeLayout(false); + this.KappaPanel.ResumeLayout(false); + this.LineScanPanel.ResumeLayout(false); + this.tabPageDistance.ResumeLayout(false); + this.tabPageDistance.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownP4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownP3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownP2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDownP1)).EndInit(); + this.groupBox1.ResumeLayout(false); + this.groupBox3.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.upDownLineWidth)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + #region 瀹氫箟 + private System.Windows.Forms.TabControl tabControl; + private System.Windows.Forms.TabPage tabPageResults; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Button buttonLoad; + private System.Windows.Forms.Button buttonDelete; + private System.Windows.Forms.Button buttonDeleteAll; + private System.Windows.Forms.Button buttonSetReference; + private System.Windows.Forms.Button buttonCalibrate; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.CheckBox checkBoxCoordSys; + private System.Windows.Forms.CheckBox checkBoxMarkCenter; + private System.Windows.Forms.CheckBox checkBoxPlateRegion; + private System.Windows.Forms.ComboBox comboBoxDraw; + private System.Windows.Forms.ComboBox comboBoxCoordSys; + private System.Windows.Forms.ComboBox comboBoxMarkCenters; + private System.Windows.Forms.ComboBox comboBoxPlateRegion; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.TabPage tabPageQualityCheck; + private System.Windows.Forms.TabPage tabPageCalib; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label18; + private System.Windows.Forms.Label label19; + private System.Windows.Forms.Label label21; + private System.Windows.Forms.Label label22; + private System.Windows.Forms.GroupBox groupBox5; + private System.Windows.Forms.Label label26; + private System.Windows.Forms.Label label28; + private System.Windows.Forms.Label label34; + private System.Windows.Forms.Label label36; + private System.Windows.Forms.Label label38; + private System.Windows.Forms.Label label40; + private System.Windows.Forms.Label label42; + private System.Windows.Forms.Label label43; + private System.Windows.Forms.Label label46; + private System.Windows.Forms.Label label47; + private System.Windows.Forms.Label label48; + private System.Windows.Forms.Label label49; + private System.Windows.Forms.GroupBox groupBox6; + private System.Windows.Forms.Label label50; + private System.Windows.Forms.Label label51; + private System.Windows.Forms.Label label52; + private System.Windows.Forms.Label label53; + private System.Windows.Forms.Label label55; + private System.Windows.Forms.Label label57; + private System.Windows.Forms.Label label59; + private System.Windows.Forms.Label label60; + private System.Windows.Forms.Label label61; + private System.Windows.Forms.Label label62; + private System.Windows.Forms.Label label64; + private System.Windows.Forms.Label label66; + private System.Windows.Forms.RadioButton buttonMove; + private System.Windows.Forms.Button buttonReset; + private System.Windows.Forms.RadioButton buttonNone; + private System.Windows.Forms.RadioButton buttonMagnify; + private System.Windows.Forms.RadioButton buttonZoom; + private System.Windows.Forms.OpenFileDialog openFileDialogImg; + private System.Windows.Forms.Label label68; + private System.Windows.Forms.Button buttonImportParams; + private System.Windows.Forms.Button buttonLoadDescrFile; + private System.Windows.Forms.Label label69; + private System.Windows.Forms.Label label70; + private System.Windows.Forms.Label label71; + private System.Windows.Forms.ListView ListCalibImg; + private System.Windows.Forms.ColumnHeader ColRef; + private System.Windows.Forms.ColumnHeader ColImg; + private System.Windows.Forms.ColumnHeader ColStatus; + private System.Windows.Forms.ListView ListQualityCheck; + private System.Windows.Forms.ColumnHeader ColScope; + private System.Windows.Forms.ColumnHeader ColDescr; + private System.Windows.Forms.ColumnHeader Col2Status; + private System.Windows.Forms.OpenFileDialog openFileDialogDescr; + private System.Windows.Forms.TextBox textBoxDescr; + private System.Windows.Forms.OpenFileDialog openFileDialogImportParams; + private System.Windows.Forms.CheckBox TelecentricCheckBox; + private System.Windows.Forms.NumericUpDown FocalLengthUpDown; + private System.Windows.Forms.NumericUpDown SyUpDown; + private System.Windows.Forms.NumericUpDown SxUpDown; + private System.Windows.Forms.ComboBox CamTypComboBox; + private System.Windows.Forms.NumericUpDown ThicknessUpDown; + private System.Windows.Forms.TrackBar MaxDiamTrackBar; + private System.Windows.Forms.NumericUpDown MaxDiamUpDown; + private System.Windows.Forms.TrackBar MinContLTrackBar; + private System.Windows.Forms.NumericUpDown MinContLUpDown; + private System.Windows.Forms.TrackBar SmoothTrackBar; + private System.Windows.Forms.NumericUpDown SmoothUpDown; + private System.Windows.Forms.TrackBar MinThreshTrackBar; + private System.Windows.Forms.NumericUpDown MinThreshUpDown; + private System.Windows.Forms.TrackBar ThreshDecrTrackBar; + private System.Windows.Forms.NumericUpDown ThreshDecrUpDown; + private System.Windows.Forms.TrackBar InitThreshTrackBar; + private System.Windows.Forms.NumericUpDown InitThreshUpDown; + private System.Windows.Forms.TrackBar MinDiamTrackBar; + private System.Windows.Forms.NumericUpDown MinDiamUpDown; + private System.Windows.Forms.TrackBar MarkThreshTrackBar; + private System.Windows.Forms.NumericUpDown MarkThreshUpDown; + private System.Windows.Forms.ComboBox SeqTestsComboBox; + private System.Windows.Forms.ComboBox ImgTestsComboBox; + private System.Windows.Forms.NumericUpDown WarnlevelUpDown; + private System.Windows.Forms.Button MaxDiamResetButton; + private System.Windows.Forms.Button MinContLResetButton; + private System.Windows.Forms.Button SmootingResetButton; + private System.Windows.Forms.Button MinThreshResetButton; + private System.Windows.Forms.Button ThreshDecrResetButton; + private System.Windows.Forms.Button InitThreshResetButton; + private System.Windows.Forms.Button MinDiamResetButton; + private System.Windows.Forms.Button MarkThreshResetButton; + private System.Windows.Forms.TrackBar FilterSizeTrackBar; + private System.Windows.Forms.NumericUpDown FilterSizeUpDown; + private System.Windows.Forms.Button FilterSizeResetButton; + private System.Windows.Forms.Label label72; + private System.Windows.Forms.Label label73; + private System.Windows.Forms.Label label74; + private System.Windows.Forms.Label label75; + private System.Windows.Forms.Label label76; + private System.Windows.Forms.Label label77; + private System.Windows.Forms.NumericUpDown MotionZUpDown; + private System.Windows.Forms.NumericUpDown MotionYUpDown; + private System.Windows.Forms.NumericUpDown MotionXUpDown; + private System.Windows.Forms.Panel LineScanAddPanel; + private System.Windows.Forms.Label label78; + private System.Windows.Forms.NumericUpDown upDownLineWidth; + private System.Windows.Forms.Button buttonSaveCamPose; + private System.Windows.Forms.Label CamGammaLabel; + private System.Windows.Forms.Label CamBetaLabel; + private System.Windows.Forms.Label CamAlphaLabel; + private System.Windows.Forms.Label CamPoseZLabel; + private System.Windows.Forms.Label CamPoseYLabel; + private System.Windows.Forms.Label CamPoseXLabel; + private System.Windows.Forms.Button buttonSaveCamParams; + private System.Windows.Forms.Label CyResultLabel; + private System.Windows.Forms.Label CxResultLabel; + private System.Windows.Forms.Label SyResultLabel; + private System.Windows.Forms.Label SxResultLabel; + private System.Windows.Forms.Label StatusCalibLabel; + private System.Windows.Forms.Label ImgHResultLabel; + private System.Windows.Forms.Label ImgWResultLabel; + private System.Windows.Forms.Label label20; + private System.Windows.Forms.CheckBox checkBoxOrigImgCoord; + private System.Windows.Forms.Label StatusLabel; + private System.Windows.Forms.RadioButton buttonRefImg; + private System.Windows.Forms.Label label44; + private System.Windows.Forms.Label label30; + private System.Windows.Forms.Label FocalLResultLabel; + private System.Windows.Forms.Label label45; + private System.Windows.Forms.Label label32; + private System.Windows.Forms.Label KappaResultLabel; + private System.Windows.Forms.Label label83; + private System.Windows.Forms.Label label84; + private System.Windows.Forms.Label label80; + private System.Windows.Forms.Label label81; + private System.Windows.Forms.Label label54; + private System.Windows.Forms.Label label56; + private System.Windows.Forms.Label label58; + private System.Windows.Forms.Label label63; + private System.Windows.Forms.Label label65; + private System.Windows.Forms.Label label67; + private System.Windows.Forms.Label P2Label; + private System.Windows.Forms.Label P1Label; + private System.Windows.Forms.Label K3Label; + private System.Windows.Forms.Label K2Label; + private System.Windows.Forms.Label K1Label; + private System.Windows.Forms.Label ErrorLabel; + private System.Windows.Forms.Label label82; + private System.Windows.Forms.Label label85; + private System.Windows.Forms.Label label86; + private System.Windows.Forms.Label label87; + private System.Windows.Forms.Label label88; + private System.Windows.Forms.Label label89; + private System.Windows.Forms.Label VzResultLabel; + private System.Windows.Forms.Label VyResultLabel; + private System.Windows.Forms.Label VxResultLabel; + private System.Windows.Forms.Panel AreaScanPolynomPanel; + private System.Windows.Forms.Panel KappaPanel; + private System.Windows.Forms.Panel LineScanPanel; + private System.Windows.Forms.SaveFileDialog saveParamFileDialog; + private System.Windows.Forms.RadioButton buttonSimImg; + private System.Windows.Forms.Button buttonDefaultParams; + private HalconDotNet.HWindowControl viewPort; + #endregion + private System.Windows.Forms.TabPage tabPageDistance; + private System.Windows.Forms.Label label24; + private System.Windows.Forms.Label label23; + private System.Windows.Forms.NumericUpDown numericUpDownP2; + private System.Windows.Forms.NumericUpDown numericUpDownP1; + private System.Windows.Forms.TextBox txtDistanceP1P2; + private System.Windows.Forms.Label label27; + private System.Windows.Forms.Label label25; + private System.Windows.Forms.Label label29; + private System.Windows.Forms.Label label31; + private System.Windows.Forms.TextBox txtDistanceP3P4; + private System.Windows.Forms.Label label33; + private System.Windows.Forms.Label label35; + private System.Windows.Forms.NumericUpDown numericUpDownP4; + private System.Windows.Forms.NumericUpDown numericUpDownP3; + } +} + diff --git a/HalconTools/frmCalibration.cs b/HalconTools/frmCalibration.cs new file mode 100644 index 0000000..69a63c2 --- /dev/null +++ b/HalconTools/frmCalibration.cs @@ -0,0 +1,1415 @@ +锘縰sing System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using HalconDotNet; + +namespace HalconTools +{ + public partial class frmCalibration : Form + { + private HWndCtrl mView; + private CalibrationAssistant mAssistant; + private int currIdx; + private int currLineW; + + private double tThickness = 0; + private double tCellWidth = 0; + private double tCellHeight = 0; + private double tFocalLength = 0; + private double tMotionX = 0; + private double tMotionY = 0; + private double tMotionZ = 0; + + private bool locked; + private bool plateRegionDisp; + private bool markCentersDisp; + private bool coordSystemDisp; + + private string plateRegionColor; + private string markCenterColor; + private string coordSystemColor; + + public frmCalibration() + { + InitializeComponent(); + } + + private void frmMain_Load(object sender, EventArgs e) + { + mView = new HWndCtrl(viewPort); + mView.setViewState(HWndCtrl.MODE_VIEW_NONE); + mView.changeGraphicSettings(GraphicsContext.GC_DRAWMODE, comboBoxDraw.Text); + mView.changeGraphicSettings(GraphicsContext.GC_LINEWIDTH, 1); + + mAssistant = new CalibrationAssistant(); + mAssistant.NotifyCalibObserver = new CalibDelegate(UpdateCalibResults); + Init(); + } + + /******************************************************************* + * Initialize the GUI front end with the values defined for the + * corresponding parameters in the Calibration Assistant + * ****************************************************************/ + private void Init() + { + currIdx = 0; + currLineW = 1; + locked = true; + + plateRegionDisp = checkBoxPlateRegion.Checked; + markCentersDisp = checkBoxMarkCenter.Checked; + coordSystemDisp = checkBoxCoordSys.Checked; + + plateRegionColor = comboBoxPlateRegion.Text; + markCenterColor = comboBoxMarkCenters.Text; + coordSystemColor = comboBoxCoordSys.Text; + + CamTypComboBox.SelectedIndex = 0; + SxUpDown.Value = (decimal)mAssistant.getCellWidth(); + SxUpDown.Increment = 0.100m; + SyUpDown.Value = (decimal)mAssistant.getCellHeight(); + SyUpDown.Increment = 0.100m; + FocalLengthUpDown.Value = (decimal)mAssistant.getFocalLength(); + FocalLengthUpDown.Increment = 0.100m; + ThicknessUpDown.Value = (decimal)(mAssistant.getThickness()); + ThicknessUpDown.Increment = 0.100m; + + + textBoxDescr.Text = mAssistant.mDescrFileName; + + FilterSizeUpDown.Value = (int)mAssistant.getFilterSize(); + MarkThreshUpDown.Value = (int)mAssistant.getMarkThresh(); + MinDiamUpDown.Value = (int)mAssistant.getMinMarkDiam(); + InitThreshUpDown.Value = (int)mAssistant.getInitThresh(); + ThreshDecrUpDown.Value = (int)mAssistant.getThreshDecr(); + MinThreshUpDown.Value = (int)mAssistant.getMinThresh(); + SmoothUpDown.Value = (int)(mAssistant.getSmoothing() * 100); + MinContLUpDown.Value = (int)mAssistant.getMinContLength(); + MaxDiamUpDown.Value = (int)mAssistant.getMaxMarkDiam(); + WarnlevelUpDown.Value = (int)mAssistant.getWarnLevel(); + + MotionXUpDown.Value = (decimal)mAssistant.getMotionX(); + MotionXUpDown.Increment = 0.100m; + MotionYUpDown.Value = (decimal)mAssistant.getMotionY(); + MotionYUpDown.Increment = 0.100m; + MotionZUpDown.Value = (decimal)mAssistant.getMotionZ(); + MotionZUpDown.Increment = 0.100m; + + string imPathValue = + (string)HSystem.GetSystem("image_dir").TupleSplit(";"); + openFileDialogImg.InitialDirectory = imPathValue + "\\calib"; + string halconPathValue = Environment.GetEnvironmentVariable( + "HALCONROOT"); + openFileDialogDescr.InitialDirectory = halconPathValue + "\\calib"; + // set initial directory to standard user's working directory + openFileDialogImportParams.InitialDirectory = + Environment.GetFolderPath( + System.Environment.SpecialFolder.Personal); + // set initial directory to standard user's working directory + saveParamFileDialog.InitialDirectory = + Environment.GetFolderPath( + System.Environment.SpecialFolder.Personal); + + locked = false; + } + + /********************************************************************/ + /* Display Parameters */ + /********************************************************************/ + private void checkBoxPlateRegion_CheckedChanged(object sender, System.EventArgs e) + { + plateRegionDisp = checkBoxPlateRegion.Checked; + UpdateView(); + } + + /****************************************************/ + private void checkBoxMarkCenter_CheckedChanged(object sender, System.EventArgs e) + { + markCentersDisp = checkBoxMarkCenter.Checked; + UpdateView(); + } + + /****************************************************/ + private void checkBoxCoordSys_CheckedChanged(object sender, System.EventArgs e) + { + coordSystemDisp = checkBoxCoordSys.Checked; + UpdateView(); + } + + /****************************************************/ + private void comboBoxPlateRegion_SelectedIndexChanged(object sender, System.EventArgs e) + { + plateRegionColor = comboBoxPlateRegion.Text; + UpdateView(); + } + + /****************************************************/ + private void comboBoxMarkCenters_SelectedIndexChanged(object sender, System.EventArgs e) + { + markCenterColor = comboBoxMarkCenters.Text; + UpdateView(); + } + + /****************************************************/ + private void comboBoxCoordSys_SelectedIndexChanged(object sender, System.EventArgs e) + { + coordSystemColor = comboBoxCoordSys.Text; + UpdateView(); + } + + /****************************************************/ + private void comboBoxDraw_SelectedIndexChanged(object sender, System.EventArgs e) + { + mView.changeGraphicSettings(GraphicsContext.GC_DRAWMODE, comboBoxDraw.Text); + UpdateView(); + } + + private void upDownLineWidth_ValueChanged(object sender, System.EventArgs e) + { + currLineW = (int)upDownLineWidth.Value; + mView.changeGraphicSettings(GraphicsContext.GC_LINEWIDTH, currLineW); + UpdateView(); + } + + + /********************************************************************/ + /* MouseInteraction Parameters */ + /********************************************************************/ + private void buttonMove_CheckedChanged(object sender, System.EventArgs e) + { + mView.setViewState(HWndCtrl.MODE_VIEW_MOVE); + } + + /****************************************************/ + private void buttonZoom_CheckedChanged(object sender, System.EventArgs e) + { + mView.setViewState(HWndCtrl.MODE_VIEW_ZOOM); + } + + /****************************************************/ + private void buttonMagnify_CheckedChanged(object sender, System.EventArgs e) + { + mView.setViewState(HWndCtrl.MODE_VIEW_ZOOMWINDOW); + } + + /****************************************************/ + private void buttonNone_CheckedChanged(object sender, System.EventArgs e) + { + mView.setViewState(HWndCtrl.MODE_VIEW_NONE); + } + + /****************************************************/ + private void buttonReset_Click(object sender, System.EventArgs e) + { + mView.resetWindow(); + UpdateView(); + } + + /********************************************************************/ + /********************************************************************/ + /* 1. Tab */ + /********************************************************************/ + /********************************************************************/ + private void buttonLoad_Click(object sender, System.EventArgs e) + { + string[] files; + ListViewItem item; + int count = 0; + CalibImage data = null; + + int idx = StatusLabel.Text.Length; + + if (openFileDialogImg.ShowDialog() == DialogResult.OK) + { + files = openFileDialogImg.FileNames; + count = files.Length; + + + for (int i = 0; i < count; i++) + { + if ((data = mAssistant.addImage(files[i])) != null) + { + item = new ListViewItem(""); + item.SubItems.Add(files[i]); + item.SubItems.Add(data.getPlateStatus()); + ListCalibImg.Items.AddRange(new ListViewItem[] { item }); + } + }//for + + mAssistant.UpdateSequenceIssues(); + + buttonCalibrate.Enabled = (mAssistant.mCanCalib && (mAssistant.mReferenceIndex != -1)); + buttonSetReference.Enabled = true; + + if (data != null) + { + ListCalibImg.Items[currIdx].BackColor = System.Drawing.SystemColors.Window; + currIdx = ListCalibImg.Items.Count - 1; + UpdateCalibResults(CalibrationAssistant.UPDATE_MARKS_POSE); + UpdateCalibResults(CalibrationAssistant.UPDATE_QUALITY_TABLE); + UpdateCalibResults(CalibrationAssistant.UPDATE_CALIBRATION_RESULTS); + } + }//if + } + + /****************************************************/ + private void ListCalibImg_SelectedIndexChanged(object sender, System.EventArgs e) + { + string path = ""; + ListView.SelectedListViewItemCollection items = ListCalibImg.SelectedItems; + + foreach (ListViewItem item in items) + { + path = item.SubItems[1].Text; + if (path != "") + { + ListCalibImg.Items[currIdx].BackColor = System.Drawing.SystemColors.Window; + currIdx = ListCalibImg.Items.IndexOf(item); + ListCalibImg.Items[currIdx].BackColor = System.Drawing.SystemColors.Control; + + showLabelErrMessage(); + UpdateView(); + UpdateQualityIssueTable(); + break; + }//if + }//foreach + } + + /****************************************************/ + private void showLabelErrMessage() + { + string message = mAssistant.getCalibDataAt(currIdx).mErrorMessage; + showLabelErrMessage(message); + } + + /****************************************************/ + private void showLabelErrMessage(string message) + { + int idx = message.IndexOf(":"); + string tmp; + + if (idx > 0) + { + message = "Error" + message.Remove(0, idx); + + if (message.Length > 90) + { + idx = message.LastIndexOf(" ", 80); + tmp = message.Substring(0, idx) + "\n " + message.Substring(idx + 1); + message = tmp; + } + StatusLabel.Text = message; + } + else + { + StatusLabel.Text = ""; + } + } + + /****************************************************/ + private void buttonDelete_Click(object sender, System.EventArgs e) + { + int cIdx = -1; + int refIdx = -1; + string path = ""; + + ListView.SelectedListViewItemCollection items = ListCalibImg.SelectedItems; + + currIdx = 0; + foreach (ListViewItem item in items) + { + path = item.SubItems[1].Text; + if (path != "") + { + refIdx = mAssistant.mReferenceIndex; + + if ((cIdx = ListCalibImg.Items.IndexOf(item)) == refIdx) + refIdx = -1; + else if (cIdx < refIdx) + refIdx--; + + mAssistant.setReferenceIdx(refIdx); + mAssistant.removeImage(cIdx); + buttonCalibrate.Enabled = (mAssistant.mCanCalib && (refIdx != -1)); + ListCalibImg.Items.Remove(item); + ListQualityCheck.Items.Clear(); + break; + }//if + }//foreach + + if (ListCalibImg.Items.Count == 0) + buttonSetReference.Enabled = false; + else + UpdateView(); + + } + + /****************************************************/ + private void buttonDeleteAll_Click(object sender, System.EventArgs e) + { + mAssistant.removeImage(); + mView.resetWindow(); + mView.clearList(); + currIdx = 0; + + ListCalibImg.Items.Clear(); + ListQualityCheck.Items.Clear(); + + buttonSetReference.Enabled = false; + buttonCalibrate.Enabled = false; + mAssistant.setReferenceIdx(-1); + mAssistant.resetCanCalib(); + + UpdateView(); + } + + /****************************************************/ + private void buttonSetReference_Click(object sender, System.EventArgs e) + { + int val = mAssistant.mReferenceIndex; + + if (val > -1) + ListCalibImg.Items[val].SubItems[0].Text = ""; + + mAssistant.setReferenceIdx(currIdx); + ListCalibImg.Items[currIdx].SubItems[0].Text = " *"; + buttonCalibrate.Enabled = mAssistant.mCanCalib; + } + + /*************************************************************/ + private void buttonCalibrate_Click(object sender, System.EventArgs e) + { + StatusLabel.Text = " Calibrating ... "; + StatusLabel.Refresh(); + + mAssistant.applyCalibration(); + tabControl.SelectedTab = tabControl.TabPages[2]; + + } + + /**************************************************************/ + private void buttonLoadDescrFile_Click(object sender, System.EventArgs e) + { + string file; + string[] val; + if (openFileDialogDescr.ShowDialog() == DialogResult.OK) + { + file = openFileDialogDescr.FileNames[0]; + if (file.EndsWith(".descr")) + { + mAssistant.setDesrcFile(file); + val = file.Split(new Char[] { '\\' }); + file = val[val.Length - 1]; + textBoxDescr.Text = file; + } + else + { + MessageBox.Show("Fileformat is wrong, it's not a description file!", + "Calibration Assistant", + MessageBoxButtons.OK, + MessageBoxIcon.Information); + } + } + } + + /**************************************************************/ + private void buttonImportParams_Click(object sender, System.EventArgs e) + { + string file; + bool success; + + + if (openFileDialogImportParams.ShowDialog() == DialogResult.OK) + { + file = openFileDialogImportParams.FileNames[0]; + if (file.EndsWith(".cal") || file.EndsWith(".dat")) + { + success = mAssistant.importCamParams(file); + + if (success) + { + locked = true; + resetGUICameraSetup(); + locked = false; + } + } + else + { + UpdateCalibResults(CalibrationAssistant.ERR_READING_FILE); + } + } + } + + /**************************************************************/ + private void resetGUICameraSetup() + { + int camType, val; + + try + { + camType = mAssistant.getCameraType(); + if (camType == CalibrationAssistant.CAMERA_TYP_AREA_SCAN_DIV) + val = 0; + else if (camType == CalibrationAssistant.CAMERA_TYP_AREA_SCAN_POLY) + val = 1; + else if (camType == CalibrationAssistant.CAMERA_TYP_LINE_SCAN) + val = 2; + else + throw (new ArgumentException()); + + + CamTypComboBox.SelectedIndex = val; + SxUpDown.Value = (decimal)mAssistant.getCellWidth(); + SyUpDown.Value = (decimal)mAssistant.getCellHeight(); + FocalLengthUpDown.Value = (decimal)mAssistant.getFocalLength(); + TelecentricCheckBox.Checked = mAssistant.isTelecentric; + + MotionXUpDown.Value = (decimal)mAssistant.getMotionX(); + MotionYUpDown.Value = (decimal)mAssistant.getMotionY(); + MotionZUpDown.Value = (decimal)mAssistant.getMotionZ(); + + } + catch (ArgumentException) + { + locked = false; + } + } + + + /**************************************************************/ + private void buttonDefaultParams_Click(object sender, System.EventArgs e) + { + mAssistant.resetCameraSetup(false); + locked = true; + resetGUICameraSetup(); + locked = false; + } + + /**************************************************************/ + private void numUpDownThickness_ValueChanged(object sender, System.EventArgs e) + { + tThickness = (double)ThicknessUpDown.Value; + mAssistant.setThickness((double)ThicknessUpDown.Value); + } + + /**************************************************************/ + private void comboBoxCamTyp_SelectedIndexChanged(object sender, System.EventArgs e) + { + int val = 0; + + AreaScanPolynomPanel.Visible = false; + KappaPanel.Visible = false; + LineScanPanel.Visible = false; + + LineScanAddPanel.Visible = false; + + switch ((int)CamTypComboBox.SelectedIndex) + { + case 0: + val = CalibrationAssistant.CAMERA_TYP_AREA_SCAN_DIV; + KappaPanel.Visible = true; + TelecentricCheckBox.Enabled = true; + break; + case 1: + val = CalibrationAssistant.CAMERA_TYP_AREA_SCAN_POLY; + AreaScanPolynomPanel.Visible = true; + TelecentricCheckBox.Enabled = true; + break; + case 2: + val = CalibrationAssistant.CAMERA_TYP_LINE_SCAN; + KappaPanel.Visible = true; + LineScanPanel.Visible = true; + LineScanAddPanel.Visible = true; + TelecentricCheckBox.Checked = false; + TelecentricCheckBox.Enabled = false; + break; + } + + if (!locked) + mAssistant.setCameraType(val); + + } + + /**************************************************************/ + private void numUpDownSx_ValueChanged(object sender, System.EventArgs e) + { + tCellWidth = (double)SxUpDown.Value; + + if (!locked) + mAssistant.setCellWidth((double)SxUpDown.Value); + } + + /**************************************************************/ + private void numUpDownSy_ValueChanged(object sender, System.EventArgs e) + { + tCellHeight = (double)SyUpDown.Value; + + if (!locked) + mAssistant.setCellHeight((double)SyUpDown.Value); + } + + /**************************************************************/ + private void numUpDownFocalLength_ValueChanged(object sender, System.EventArgs e) + { + tFocalLength = (double)FocalLengthUpDown.Value; + + if (!locked) + mAssistant.setFocalLength((double)FocalLengthUpDown.Value); + } + + /**************************************************************/ + private void checkBoxTelecentric_CheckedChanged(object sender, System.EventArgs e) + { + bool check = TelecentricCheckBox.Checked; + + if (check) + FocalLengthUpDown.Enabled = false; + else + FocalLengthUpDown.Enabled = true; + + if (!locked) + mAssistant.setIsTelecentric(check); + } + + /**************************************************************/ + private void MotionXUpDown_ValueChanged(object sender, System.EventArgs e) + { + tMotionX = (double)MotionXUpDown.Value; + + if (!locked) + mAssistant.setMotionX((double)MotionXUpDown.Value); + } + + /**************************************************************/ + private void MotionYUpDown_ValueChanged(object sender, System.EventArgs e) + { + tMotionY = (double)MotionYUpDown.Value; + + if (!locked) + mAssistant.setMotionY((double)MotionYUpDown.Value); + } + + /**************************************************************/ + private void MotionZUpDown_ValueChanged(object sender, System.EventArgs e) + { + tMotionZ = (double)MotionZUpDown.Value; + + if (!locked) + mAssistant.setMotionZ((double)MotionZUpDown.Value); + } + + /*************************************************************************/ + /*************************************************************************/ + /* 2. Tab */ + /*************************************************************************/ + /*************************************************************************/ + private void comboBoxImgTests_SelectedIndexChanged(object sender, System.EventArgs e) + { + if (!locked) + mAssistant.setImageTests(ImgTestsComboBox.SelectedIndex); + } + + /**************************************************************/ + private void comboBoxSeqTests_SelectedIndexChanged(object sender, System.EventArgs e) + { + if (!locked) + mAssistant.setSequenceTests(SeqTestsComboBox.SelectedIndex); + } + + /**************************************************************/ + private void numUpDownWarnlevel_ValueChanged(object sender, System.EventArgs e) + { + if (!locked) + mAssistant.setWarnLevel((int)WarnlevelUpDown.Value); + } + + /**************************************************************/ + /******************** FillSize ***************************/ + private void numUpDownFilterSize_ValueChanged(object sender, System.EventArgs e) + { + int val = (int)FilterSizeUpDown.Value; + FilterSizeTrackBar.Value = val; + + if (!locked) + setFilterSize(val); + + } + private void trackBarFilterSize_Scroll(object sender, System.EventArgs e) + { + FilterSizeUpDown.Value = FilterSizeTrackBar.Value; + FilterSizeUpDown.Refresh(); + } + private void buttonRFilterSize_Click(object sender, System.EventArgs e) + { + FilterSizeUpDown.Value = mAssistant.resetFilterSize; + FilterSizeResetButton.ForeColor = System.Drawing.Color.Gray; + } + private void setFilterSize(int val) + { + FilterSizeResetButton.ForeColor = System.Drawing.Color.Black; + mAssistant.setFilterSize((double)val); + } + + /**************************************************************/ + /********************** Mark Threshold ************************/ + private void numUpDownMarkThresh_ValueChanged(object sender, System.EventArgs e) + { + int val = (int)MarkThreshUpDown.Value; + MarkThreshTrackBar.Value = val; + + if (!locked) + setMarkThresh(val); + + } + private void trackBarMarkThresh_Scroll(object sender, System.EventArgs e) + { + MarkThreshUpDown.Value = (int)MarkThreshTrackBar.Value; + MarkThreshUpDown.Refresh(); + } + private void buttonRMarkThresh_Click(object sender, System.EventArgs e) + { + MarkThreshUpDown.Value = mAssistant.resetMarkThresh; + MarkThreshResetButton.ForeColor = System.Drawing.Color.Gray; + + } + private void setMarkThresh(int val) + { + MarkThreshResetButton.ForeColor = System.Drawing.Color.Black; + mAssistant.setMarkThresh((double)val); + } + + /**************************************************************/ + /*********************** Min Diameter ***********************/ + private void numUpDownMinDiam_ValueChanged(object sender, System.EventArgs e) + { + int val = (int)MinDiamUpDown.Value; + MinDiamTrackBar.Value = val; + + if (!locked) + setMinDiam(val); + + } + private void trackBarMinDiam_Scroll(object sender, System.EventArgs e) + { + MinDiamUpDown.Value = MinDiamTrackBar.Value; + MinDiamUpDown.Refresh(); + } + private void buttonRMinDiam_Click(object sender, System.EventArgs e) + { + MinDiamUpDown.Value = mAssistant.resetMinMarkDiam; + MinDiamResetButton.ForeColor = System.Drawing.Color.Gray; + } + private void setMinDiam(int val) + { + MinDiamResetButton.ForeColor = System.Drawing.Color.Black; + mAssistant.setMinMarkDiam((double)val); + } + + /**************************************************************/ + /******************** Init Threshold ************************/ + private void numUpDownInitThresh_ValueChanged(object sender, System.EventArgs e) + { + int val = (int)InitThreshUpDown.Value; + InitThreshTrackBar.Value = val; + + if (!locked) + setInitThresh(val); + + } + private void trackBarInitThresh_Scroll(object sender, System.EventArgs e) + { + InitThreshUpDown.Value = InitThreshTrackBar.Value; + InitThreshUpDown.Refresh(); + } + private void buttonRInitThresh_Click(object sender, System.EventArgs e) + { + InitThreshUpDown.Value = mAssistant.resetInitThresh; + InitThreshResetButton.ForeColor = System.Drawing.Color.Gray; + } + private void setInitThresh(int val) + { + InitThreshResetButton.ForeColor = System.Drawing.Color.Black; + mAssistant.setInitThresh((double)val); + } + + /**************************************************************/ + /****************** Threshold Decrement **********************/ + private void numUpDownThreshDecr_ValueChanged(object sender, System.EventArgs e) + { + int val = (int)ThreshDecrUpDown.Value; + ThreshDecrTrackBar.Value = val; + + if (!locked) + setThreshDecr(val); + + } + private void trackBarThreshDecr_Scroll(object sender, System.EventArgs e) + { + ThreshDecrUpDown.Value = (int)ThreshDecrTrackBar.Value; + ThreshDecrUpDown.Refresh(); + } + private void buttonRThreshDecr_Click(object sender, System.EventArgs e) + { + ThreshDecrUpDown.Value = mAssistant.resetThreshDecr; + ThreshDecrResetButton.ForeColor = System.Drawing.Color.Gray; + + } + private void setThreshDecr(int val) + { + ThreshDecrResetButton.ForeColor = System.Drawing.Color.Black; + mAssistant.setThreshDecr((double)val); + } + + /**************************************************************/ + /****************** Minimum Threshold ************************/ + private void numUpDownMinThresh_ValueChanged(object sender, System.EventArgs e) + { + int val = (int)MinThreshUpDown.Value; + MinThreshTrackBar.Value = val; + + if (!locked) + setMinThresh(val); + + } + private void trackBarMinThresh_Scroll(object sender, System.EventArgs e) + { + MinThreshUpDown.Value = MinThreshTrackBar.Value; + MinThreshUpDown.Refresh(); + } + private void buttonRMinThresh_Click(object sender, System.EventArgs e) + { + MinThreshUpDown.Value = mAssistant.resetMinThresh; + MinThreshResetButton.ForeColor = System.Drawing.Color.Gray; + + } + private void setMinThresh(int val) + { + MinThreshResetButton.ForeColor = System.Drawing.Color.Black; + mAssistant.setMinThresh((double)val); + } + + /**************************************************************/ + /******************** Smoothing *****************************/ + private void numUpDownSmooth_ValueChanged(object sender, System.EventArgs e) + { + int val = (int)SmoothUpDown.Value; + SmoothTrackBar.Value = val; + + if (!locked) + setSmoothing(val); + + } + private void trackBarSmooth_Scroll(object sender, System.EventArgs e) + { + SmoothUpDown.Value = SmoothTrackBar.Value; + SmoothUpDown.Refresh(); + } + private void buttonRSmooting_Click(object sender, System.EventArgs e) + { + SmoothUpDown.Value = (int)(mAssistant.resetSmoothing * 100); + SmootingResetButton.ForeColor = System.Drawing.Color.Gray; + + } + private void setSmoothing(int val) + { + SmootingResetButton.ForeColor = System.Drawing.Color.Black; + mAssistant.setSmoothing((double)val / 100.0); + } + + /**************************************************************/ + /***************** Min Contour Length ************************/ + private void numUpDownMinContL_ValueChanged(object sender, System.EventArgs e) + { + int val = (int)MinContLUpDown.Value; + MinContLTrackBar.Value = val; + + if (!locked) + setMinContLength(val); + + } + private void trackBarMinContL_Scroll(object sender, System.EventArgs e) + { + MinContLUpDown.Value = (int)MinContLTrackBar.Value; + MinContLUpDown.Refresh(); + } + private void buttonRMinContL_Click(object sender, System.EventArgs e) + { + MinContLUpDown.Value = mAssistant.resetMinContL; + MinContLResetButton.ForeColor = System.Drawing.Color.Gray; + + } + private void setMinContLength(int val) + { + MinContLResetButton.ForeColor = System.Drawing.Color.Black; + mAssistant.setMinContLength((double)val); + } + + /**************************************************************/ + /******************** Max Diameter ***************************/ + private void numUpDownMaxDiam_ValueChanged(object sender, System.EventArgs e) + { + int val = (int)MaxDiamUpDown.Value; + MaxDiamTrackBar.Value = val; + + if (!locked) + setMaxDiam(val); + } + private void trackBarMaxDiam_Scroll(object sender, System.EventArgs e) + { + MaxDiamUpDown.Value = MaxDiamTrackBar.Value; + MaxDiamUpDown.Refresh(); + } + private void buttonRMaxDiam_Click(object sender, System.EventArgs e) + { + MaxDiamUpDown.Value = mAssistant.resetMaxMarkDiam; + MaxDiamResetButton.ForeColor = System.Drawing.Color.Gray; + } + private void setMaxDiam(int val) + { + MaxDiamResetButton.ForeColor = System.Drawing.Color.Black; + mAssistant.setMaxMarkDiam((double)val); + } + + /*************************************************************************/ + /*************************************************************************/ + /* 3. Tab */ + /*************************************************************************/ + /*************************************************************************/ + private void checkBoxOrigImgCoord_CheckedChanged(object sender, System.EventArgs e) + { + mAssistant.setAtImgCoord(checkBoxOrigImgCoord.Checked); + UpdateView(); + } + + + private void buttonSaveCamParams_Click(object sender, System.EventArgs e) + { + string files; + + if (saveParamFileDialog.ShowDialog() == DialogResult.OK) + { + files = saveParamFileDialog.FileName; + + if (!files.EndsWith(".cal") && !files.EndsWith(".CAL")) + files += ".cal"; + + if (mAssistant.mCalibValid) + mAssistant.saveCamParams(files); + } + } + + /*************************************************************************/ + /*************************************************************************/ + private void buttonSaveCamPose_Click(object sender, System.EventArgs e) + { + + string files; + + if (saveParamFileDialog.ShowDialog() == DialogResult.OK) + { + files = saveParamFileDialog.FileName; + + if (!files.EndsWith(".dat") && !files.EndsWith(".DAT")) + files += ".dat"; + + if (mAssistant.mCalibValid) + mAssistant.saveCamPose(files); + } + } + + /*************************************************************************/ + private void buttonRefImg_CheckedChanged(object sender, System.EventArgs e) + { + UpdateView(); + } + + /*************************************************************************/ + private void radioSimulatedImg_CheckedChanged(object sender, System.EventArgs e) + { + UpdateView(); + } + + + + /********************************************************************/ + /* Update methods invoked by delegates */ + /********************************************************************/ + + /// <summary> + /// This update method is invoked for all changes occurring in the + /// CalibrationAssistant that need to be forwarded to the GUI. The + /// referring delegate invokes an update for changes in the model + /// data, which leads to an update in the graphics view. Also, errors + /// that occur during IO functions and for single calibration steps + /// are mapped here. + /// </summary> + /// <param name="mode"> + /// Constant of the class CalibrationAssistant, which starts with + /// UPDATE_* or ERR_* and which describes an update of the model + /// data or an HALCON error, respectively. + /// </param> + public void UpdateCalibResults(int mode) + { + switch (mode) + { + case CalibrationAssistant.UPDATE_MARKS_POSE: + UpdateView(); + break; + case CalibrationAssistant.UPDATE_QUALITY_TABLE: + UpdateQualityIssueTable(); + break; + case CalibrationAssistant.UPDATE_CALTAB_STATUS: + UpdateImageStatus(); + break; + case CalibrationAssistant.UPDATE_CALIBRATION_RESULTS: + UpdateResultTab(mAssistant.mCalibValid); + StatusLabel.Text = " "; + break; + case CalibrationAssistant.ERR_READING_FILE: + MessageBox.Show("Problem occured while reading file! \n" + mAssistant.mErrorMessage, + "Calibration Assistant", + MessageBoxButtons.OK, + MessageBoxIcon.Information); + break; + case CalibrationAssistant.ERR_QUALITY_ISSUES: + MessageBox.Show("Error occured while testing for quality issues \n" + mAssistant.mErrorMessage, + "Calibration Assistant", + MessageBoxButtons.OK, + MessageBoxIcon.Information); + ListQualityCheck.Items.Clear(); + break; + case CalibrationAssistant.ERR_IN_CALIBRATION: + MessageBox.Show("Problem occured while calibrating", + "Calibration Assistant", + MessageBoxButtons.OK, + MessageBoxIcon.Information); + UpdateResultTab(mAssistant.mCalibValid); + showLabelErrMessage(mAssistant.mErrorMessage); + break; + case CalibrationAssistant.ERR_REFINDEX_INVALID: + MessageBox.Show("Problem occured: \n" + + "Please check, whether your reference index is valid", + "Calibration Assistant", + MessageBoxButtons.OK, + MessageBoxIcon.Information); + break; + case CalibrationAssistant.ERR_WRITE_CALIB_RESULTS: + MessageBox.Show("Problem occured while ! \n" + mAssistant.mErrorMessage, + "Calibration Assistant", + MessageBoxButtons.OK, + MessageBoxIcon.Information); + break; + default: + break; + } + } + + + HObject mObj; + /// <summary> + /// Update the graphical window, by adding all objects of either + /// the training data set or the test data set, including the + /// reference world coordinate system and the calibrated world + /// coordinate system. + /// </summary> + public void UpdateView() + { + HImage img = null; + CalibImage data = mAssistant.getCalibDataAt(currIdx); + + + if (data == null) + { + mView.clearList(); + } + else + { + if (tabControl.SelectedIndex == 2 && mAssistant.mCalibValid) + { + if (buttonRefImg.Checked) + img = mAssistant.getRefImage(); + else + img = (HImage)mAssistant.getSimulatedImage(); + + + mView.addIconicVar(img); + if (coordSystemDisp && mAssistant.getReferenceWCS().IsInitialized()) + { + mView.changeGraphicSettings(GraphicsContext.GC_COLOR, coordSystemColor); + mView.changeGraphicSettings(GraphicsContext.GC_LINEWIDTH, currLineW + 1); + mView.addIconicVar(mAssistant.getReferenceWCS()); + } + } + else if (tabControl.SelectedIndex == 3 && mAssistant.mCalibValid) + { + mView.addIconicVar(data.getImage()); + mView.changeGraphicSettings(GraphicsContext.GC_LINEWIDTH, currLineW + 1); + mView.changeGraphicSettings(GraphicsContext.GC_COLOR, coordSystemColor); + + HTuple dis = new HTuple(); + HTuple worldRow = data.getWorldY(); + HTuple worldCol = data.getWorldX(); + HTuple Rows = data.getMarkCenterRows(); + HTuple Cols = data.getMarkCenterColumns(); + + HTuple tmprows = new HTuple(); + HTuple tmpcols = new HTuple(); + + int i, j; + + #region P1-P2 + i = (int)numericUpDownP1.Value; + j = (int)numericUpDownP2.Value; + + tmprows.Append(Rows.ToDArr()[i - 1]); + tmprows.Append(Rows.ToDArr()[j - 1]); + tmpcols.Append(Cols.ToDArr()[i - 1]); + tmpcols.Append(Cols.ToDArr()[j - 1]); + + HOperatorSet.DistancePp((HTuple)worldRow.ToDArr()[i - 1], (HTuple)worldCol.ToDArr()[i - 1], (HTuple)worldRow.ToDArr()[j - 1], (HTuple)worldCol.ToDArr()[j - 1], out dis); + + txtDistanceP1P2.Text = dis.D.ToString("0.0000"); + #endregion + + HOperatorSet.GenEmptyObj(out mObj); + HOperatorSet.GenContourPolygonXld(out mObj, tmprows, tmpcols); + mView.addIconicVar(mObj); + + tmprows = new HTuple(); + tmpcols = new HTuple(); + + #region P3-P4 + i = (int)numericUpDownP3.Value; + j = (int)numericUpDownP4.Value; + + tmprows.Append(Rows.ToDArr()[i - 1]); + tmprows.Append(Rows.ToDArr()[j - 1]); + tmpcols.Append(Cols.ToDArr()[i - 1]); + tmpcols.Append(Cols.ToDArr()[j - 1]); + + HOperatorSet.DistancePp((HTuple)worldRow.ToDArr()[i - 1], (HTuple)worldCol.ToDArr()[i - 1], (HTuple)worldRow.ToDArr()[j - 1], (HTuple)worldCol.ToDArr()[j - 1], out dis); + + txtDistanceP3P4.Text = dis.D.ToString("0.0000"); + #endregion + + HOperatorSet.GenEmptyObj(out mObj); + HOperatorSet.GenContourPolygonXld(out mObj, tmprows, tmpcols); + mView.addIconicVar(mObj); + } + else + { + mView.addIconicVar(data.getImage()); + mView.changeGraphicSettings(GraphicsContext.GC_LINEWIDTH, currLineW); + + if (plateRegionDisp && data.getCaltabRegion().IsInitialized()) + { + mView.changeGraphicSettings(GraphicsContext.GC_COLOR, plateRegionColor); + mView.addIconicVar(data.getCaltabRegion()); + } + + if (markCentersDisp && data.getMarkCenters().IsInitialized()) + { + mView.changeGraphicSettings(GraphicsContext.GC_COLOR, markCenterColor); + mView.addIconicVar(data.getMarkCenters()); + } + if (coordSystemDisp && data.getEstimatedWCS().IsInitialized()) + { + mView.changeGraphicSettings(GraphicsContext.GC_COLOR, coordSystemColor); + mView.changeGraphicSettings(GraphicsContext.GC_LINEWIDTH, currLineW + 1); + mView.addIconicVar(data.getEstimatedWCS()); + + } + } + + } + mView.repaint(); + } + + /// <summary> + /// If the quality issues are recalculated for all calibration + /// images, the information table depicting the quality + /// measure for each image must be updated. + /// </summary> + public void UpdateQualityIssueTable() + { + ListViewItem item; + QualityIssue issue; + int count; + string text = ""; + ArrayList qList; + + qList = (mAssistant.getCalibDataAt(currIdx)).getQualityIssueList(); + count = qList.Count; + ListQualityCheck.Items.Clear(); + + for (int i = 0; i < count; i++) + { + issue = (QualityIssue)qList[i]; + item = new ListViewItem("Image"); + + //Images + switch (issue.getIssueType()) + { + case CalibrationAssistant.QUALITY_ISSUE_FAILURE: + text = "Quality assessment failed"; + break; + case CalibrationAssistant.QUALITY_ISSUE_IMG_CALTAB_SIZE: + text = "Plate in image is too small"; + break; + case CalibrationAssistant.QUALITY_ISSUE_IMG_CONTRAST: + text = "Contrast is too low"; + break; + case CalibrationAssistant.QUALITY_ISSUE_IMG_EXPOSURE: + text = "Plate is too overexposed"; + break; + case CalibrationAssistant.QUALITY_ISSUE_IMG_FOCUS: + text = "Marks on plate are out of focus"; + break; + case CalibrationAssistant.QUALITY_ISSUE_IMG_HOMOGENEITY: + text = "Illumination is inhomogeneous"; + break; + } + + item.SubItems.Add(text); + item.SubItems.Add(((int)(issue.getScore() * 100.0)) + " %"); + ListQualityCheck.Items.AddRange(new ListViewItem[] { item }); + }//for + + + qList = mAssistant.mSeqQualityList; + count = qList.Count; + + for (int i = 0; i < count; i++) + { + issue = (QualityIssue)qList[i]; + item = new ListViewItem("Sequence"); + + //Sequences + switch (issue.getIssueType()) + { + case CalibrationAssistant.QUALITY_ISSUE_FAILURE: + text = "Quality assessment failed"; + break; + case CalibrationAssistant.QUALITY_ISSUE_SEQ_ALL_OVER: + text = "Quality issues detected for some images"; + break; + case CalibrationAssistant.QUALITY_ISSUE_SEQ_CALTAB_TILT: + text = "Tilt angles are not covered by sequence"; + break; + case CalibrationAssistant.QUALITY_ISSUE_SEQ_MARKS_DISTR: + text = "Field of view is not covered by plate images"; + break; + case CalibrationAssistant.QUALITY_ISSUE_SEQ_NUMBER: + text = "Number of images is too low"; + break; + case CalibrationAssistant.QUALITY_ISSUE_SEQ_ERROR: + text = "Mark extraction failed for some images"; + break; + default: + text = "unknown issue"; + break; + } + + item.SubItems.Add(text); + item.SubItems.Add(((int)(issue.getScore() * 100.0)) + " %"); + ListQualityCheck.Items.AddRange(new ListViewItem[] { item }); + }//for + + }//end of method + + + /// <summary> + /// For each change in the calibration parameter set the basic parts, + /// like finding the calibration plate and the marks, need to be + /// recalculated. + /// The success or failure for detecting each of these basic parts + /// are described for each calibration image by one of the following + /// status messages: + /// ["Plate not found", "Marks not found", + /// "Quality issues detected", "Ok"] + /// </summary> + public void UpdateImageStatus() + { + ListViewItem item; + int count = ListCalibImg.Items.Count; + + for (int i = 0; i < count; i++) + { + item = ListCalibImg.Items[i]; + item.SubItems[2].Text = ((CalibImage)mAssistant.getCalibDataAt(i)).getPlateStatus(); + } + + showLabelErrMessage(); + buttonCalibrate.Enabled = (mAssistant.mCanCalib && (mAssistant.mReferenceIndex != -1)); + } + + + /// <summary>Displays the calibration results</summary> + /// <param name="CalibSuccess"> + /// Depicts success or failure of the calibration process + /// </param> + public void UpdateResultTab(bool CalibSuccess) + { + HTuple campar, reference; + HTuple from = new HTuple(7 * mAssistant.mReferenceIndex); + HTuple to = new HTuple(7 * mAssistant.mReferenceIndex + 6); + + if (CalibSuccess) + { + int offset = 0; + + mAssistant.getCalibrationResult(out campar, out reference); + + StatusCalibLabel.Text = "Calibration successful"; + ErrorLabel.Text = mAssistant.mErrorMean.ToString("f5"); + FocalLResultLabel.Text = (campar[0].D * 1000.0).ToString("f4"); + + if (mAssistant.getCameraType() == CalibrationAssistant.CAMERA_TYP_AREA_SCAN_POLY) + { + offset = 4; + K1Label.Text = campar[1].D.ToString("f2"); + K2Label.Text = campar[2].D.ToString("e10"); + K3Label.Text = campar[3].D.ToString("e10"); + P1Label.Text = campar[4].D.ToString("f6"); + P2Label.Text = campar[5].D.ToString("f6"); + } + else + { + KappaResultLabel.Text = campar[1].D.ToString("f2"); + } + + SxResultLabel.Text = (campar[2 + offset].D * 1000000.0).ToString("f3"); + SyResultLabel.Text = (campar[3 + offset].D * 1000000.0).ToString("f3"); + CxResultLabel.Text = campar[4 + offset].D.ToString("f3"); + CyResultLabel.Text = campar[5 + offset].D.ToString("f3"); + ImgWResultLabel.Text = campar[6 + offset].I + ""; + ImgHResultLabel.Text = campar[7 + offset].I + ""; + + if (campar.Length == 11) + { + VxResultLabel.Text = (campar[8].D * 1000000.0).ToString("f3"); + VyResultLabel.Text = (campar[9].D * 1000000.0).ToString("f3"); + VzResultLabel.Text = (campar[10].D * 1000000.0).ToString("f3"); + } + + + if (reference.Length >= 6) + { + CamPoseXLabel.Text = (reference[0].D * 1000).ToString("f3"); + CamPoseYLabel.Text = (reference[1].D * 1000).ToString("f3"); + CamPoseZLabel.Text = (reference[2].D * 1000).ToString("f3"); + CamAlphaLabel.Text = (reference[3].D).ToString("f3"); + CamBetaLabel.Text = (reference[4].D).ToString("f3"); + CamGammaLabel.Text = (reference[5].D).ToString("f3"); + } + } + else //leave all fields empty + { + StatusCalibLabel.Text = "No calibration data available"; + ErrorLabel.Text = ""; + SxResultLabel.Text = ""; + SyResultLabel.Text = ""; + FocalLResultLabel.Text = ""; + KappaResultLabel.Text = ""; + CxResultLabel.Text = ""; + CyResultLabel.Text = ""; + ImgWResultLabel.Text = ""; + ImgHResultLabel.Text = ""; + VxResultLabel.Text = ""; + VyResultLabel.Text = ""; + VzResultLabel.Text = ""; + CamPoseXLabel.Text = ""; + CamPoseYLabel.Text = ""; + CamPoseZLabel.Text = ""; + CamAlphaLabel.Text = ""; + CamBetaLabel.Text = ""; + CamGammaLabel.Text = ""; + K1Label.Text = ""; + K2Label.Text = ""; + K3Label.Text = ""; + P1Label.Text = ""; + P2Label.Text = ""; + } + } + + + /**************************************************************/ + private void tabControl_SelectedIndexChanged(object sender, System.EventArgs e) + { + UpdateView(); + } + + + /**************************************************************/ + /********* Event on leave - for not to miss on changes *******/ + /**************************************************************/ + private void FocalLengthUpDown_Leave(object sender, System.EventArgs e) + { + if ((double)FocalLengthUpDown.Value != tFocalLength) + mAssistant.setFocalLength((double)FocalLengthUpDown.Value); + } + + private void ThicknessUpDown_Leave(object sender, System.EventArgs e) + { + if ((double)ThicknessUpDown.Value != tThickness) + mAssistant.setThickness((double)ThicknessUpDown.Value); + } + + private void SxUpDown_Leave(object sender, System.EventArgs e) + { + if ((double)SxUpDown.Value != tCellWidth) + mAssistant.setCellWidth((double)SxUpDown.Value); + } + + private void SyUpDown_Leave(object sender, System.EventArgs e) + { + if ((double)SyUpDown.Value != tCellHeight) + mAssistant.setCellHeight((double)SyUpDown.Value); + } + + private void MotionXUpDown_Leave(object sender, System.EventArgs e) + { + if ((double)MotionXUpDown.Value != tMotionX) + mAssistant.setMotionX((double)MotionXUpDown.Value); + } + + private void MotionYUpDown_Leave(object sender, System.EventArgs e) + { + if ((double)MotionYUpDown.Value != tMotionY) + mAssistant.setMotionY((double)MotionYUpDown.Value); + } + + private void MotionZUpDown_Leave(object sender, System.EventArgs e) + { + if ((double)MotionZUpDown.Value != tMotionZ) + mAssistant.setMotionZ((double)MotionZUpDown.Value); + } + + private void numericUpDown1_ValueChanged(object sender, EventArgs e) + { + UpdateView(); + } + + private void numericUpDownP2_ValueChanged(object sender, EventArgs e) + { + UpdateView(); + } + + private void numericUpDownP4_ValueChanged(object sender, EventArgs e) + { + UpdateView(); + } + + private void numericUpDownP3_ValueChanged(object sender, EventArgs e) + { + UpdateView(); + } + + } +} diff --git a/HalconTools/frmCalibration.resx b/HalconTools/frmCalibration.resx new file mode 100644 index 0000000..fb33be2 --- /dev/null +++ b/HalconTools/frmCalibration.resx @@ -0,0 +1,132 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="openFileDialogImg.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>415, 17</value> + </metadata> + <metadata name="openFileDialogDescr.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>579, 17</value> + </metadata> + <metadata name="openFileDialogImportParams.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="saveParamFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>241, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/HalconTools/frmContourAssistant.Designer.cs b/HalconTools/frmContourAssistant.Designer.cs new file mode 100644 index 0000000..b9065c1 --- /dev/null +++ b/HalconTools/frmContourAssistant.Designer.cs @@ -0,0 +1,528 @@ +锘縩amespace HalconTools +{ + partial class frmContourAssistant + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.viewport1 = new HalconDotNet.HWindowControl(); + this.viewport2 = new HalconDotNet.HWindowControl(); + this.viewport4 = new HalconDotNet.HWindowControl(); + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.btnResetAll = new System.Windows.Forms.Button(); + this.btnLoadImage = new System.Windows.Forms.Button(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.btnFitZoom = new System.Windows.Forms.Button(); + this.RBZoom = new System.Windows.Forms.RadioButton(); + this.RBmove = new System.Windows.Forms.RadioButton(); + this.RBnone = new System.Windows.Forms.RadioButton(); + this.viewport3 = new HalconDotNet.HWindowControl(); + this.label4 = new System.Windows.Forms.Label(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.labArea = new System.Windows.Forms.Label(); + this.btnSelect = new System.Windows.Forms.Button(); + this.btnSelectShape = new System.Windows.Forms.Button(); + this.btnThreshold = new System.Windows.Forms.Button(); + this.nUDAreaMax = new System.Windows.Forms.NumericUpDown(); + this.nUDAreaMin = new System.Windows.Forms.NumericUpDown(); + this.nUDThresholdMax = new System.Windows.Forms.NumericUpDown(); + this.nUDThresholdMin = new System.Windows.Forms.NumericUpDown(); + this.label9 = new System.Windows.Forms.Label(); + this.cmbSelectObj = new System.Windows.Forms.ComboBox(); + this.label8 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.btnRun = new System.Windows.Forms.Button(); + this.btnParaSave = new System.Windows.Forms.Button(); + this.groupBox1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nUDAreaMax)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nUDAreaMin)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nUDThresholdMax)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nUDThresholdMin)).BeginInit(); + this.SuspendLayout(); + // + // viewport1 + // + this.viewport1.BackColor = System.Drawing.Color.Black; + this.viewport1.BorderColor = System.Drawing.Color.Black; + this.viewport1.ImagePart = new System.Drawing.Rectangle(0, 0, 640, 480); + this.viewport1.Location = new System.Drawing.Point(12, 24); + this.viewport1.Name = "viewport1"; + this.viewport1.Size = new System.Drawing.Size(320, 240); + this.viewport1.TabIndex = 0; + this.viewport1.WindowSize = new System.Drawing.Size(320, 240); + // + // viewport2 + // + this.viewport2.BackColor = System.Drawing.Color.Black; + this.viewport2.BorderColor = System.Drawing.Color.Black; + this.viewport2.ImagePart = new System.Drawing.Rectangle(0, 0, 640, 480); + this.viewport2.Location = new System.Drawing.Point(338, 24); + this.viewport2.Name = "viewport2"; + this.viewport2.Size = new System.Drawing.Size(320, 240); + this.viewport2.TabIndex = 1; + this.viewport2.WindowSize = new System.Drawing.Size(320, 240); + // + // viewport4 + // + this.viewport4.BackColor = System.Drawing.Color.Black; + this.viewport4.BorderColor = System.Drawing.Color.Black; + this.viewport4.ImagePart = new System.Drawing.Rectangle(0, 0, 640, 480); + this.viewport4.Location = new System.Drawing.Point(338, 282); + this.viewport4.Name = "viewport4"; + this.viewport4.Size = new System.Drawing.Size(320, 240); + this.viewport4.TabIndex = 2; + this.viewport4.WindowSize = new System.Drawing.Size(320, 240); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(12, 9); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(29, 12); + this.label1.TabIndex = 3; + this.label1.Text = "鍘熷浘"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(336, 9); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(41, 12); + this.label2.TabIndex = 4; + this.label2.Text = "浜屽�煎寲"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(336, 267); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(41, 12); + this.label3.TabIndex = 5; + this.label3.Text = "閫夋嫨鍚�"; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.btnResetAll); + this.groupBox1.Controls.Add(this.btnLoadImage); + this.groupBox1.Location = new System.Drawing.Point(672, 12); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(307, 88); + this.groupBox1.TabIndex = 6; + this.groupBox1.TabStop = false; + // + // btnResetAll + // + this.btnResetAll.Location = new System.Drawing.Point(183, 20); + this.btnResetAll.Name = "btnResetAll"; + this.btnResetAll.Size = new System.Drawing.Size(92, 49); + this.btnResetAll.TabIndex = 1; + this.btnResetAll.Text = "鎵�鏈夎繕鍘�"; + this.btnResetAll.UseVisualStyleBackColor = true; + this.btnResetAll.Click += new System.EventHandler(this.btnResetAll_Click); + // + // btnLoadImage + // + this.btnLoadImage.Location = new System.Drawing.Point(21, 20); + this.btnLoadImage.Name = "btnLoadImage"; + this.btnLoadImage.Size = new System.Drawing.Size(94, 49); + this.btnLoadImage.TabIndex = 0; + this.btnLoadImage.Text = "鍥剧墖杞藉叆"; + this.btnLoadImage.UseVisualStyleBackColor = true; + this.btnLoadImage.Click += new System.EventHandler(this.btnLoadImage_Click); + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.btnFitZoom); + this.groupBox2.Controls.Add(this.RBZoom); + this.groupBox2.Controls.Add(this.RBmove); + this.groupBox2.Controls.Add(this.RBnone); + this.groupBox2.Location = new System.Drawing.Point(672, 106); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(307, 78); + this.groupBox2.TabIndex = 7; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "鍥剧墖鎿嶄綔"; + // + // btnFitZoom + // + this.btnFitZoom.Location = new System.Drawing.Point(206, 28); + this.btnFitZoom.Name = "btnFitZoom"; + this.btnFitZoom.Size = new System.Drawing.Size(75, 31); + this.btnFitZoom.TabIndex = 3; + this.btnFitZoom.Text = "閫傚悎绐椾綋"; + this.btnFitZoom.UseVisualStyleBackColor = true; + this.btnFitZoom.Click += new System.EventHandler(this.btnFitZoom_Click); + // + // RBZoom + // + this.RBZoom.AutoSize = true; + this.RBZoom.Location = new System.Drawing.Point(140, 35); + this.RBZoom.Name = "RBZoom"; + this.RBZoom.Size = new System.Drawing.Size(47, 16); + this.RBZoom.TabIndex = 2; + this.RBZoom.Text = "Zoom"; + this.RBZoom.UseVisualStyleBackColor = true; + this.RBZoom.CheckedChanged += new System.EventHandler(this.RBZoom_CheckedChanged); + // + // RBmove + // + this.RBmove.AutoSize = true; + this.RBmove.Location = new System.Drawing.Point(75, 35); + this.RBmove.Name = "RBmove"; + this.RBmove.Size = new System.Drawing.Size(47, 16); + this.RBmove.TabIndex = 1; + this.RBmove.Text = "Move"; + this.RBmove.UseVisualStyleBackColor = true; + this.RBmove.CheckedChanged += new System.EventHandler(this.RBmove_CheckedChanged); + // + // RBnone + // + this.RBnone.AutoSize = true; + this.RBnone.Checked = true; + this.RBnone.Location = new System.Drawing.Point(6, 35); + this.RBnone.Name = "RBnone"; + this.RBnone.Size = new System.Drawing.Size(47, 16); + this.RBnone.TabIndex = 0; + this.RBnone.TabStop = true; + this.RBnone.Text = "None"; + this.RBnone.UseVisualStyleBackColor = true; + this.RBnone.CheckedChanged += new System.EventHandler(this.RBnone_CheckedChanged); + // + // viewport3 + // + this.viewport3.BackColor = System.Drawing.Color.Black; + this.viewport3.BorderColor = System.Drawing.Color.Black; + this.viewport3.ImagePart = new System.Drawing.Rectangle(0, 0, 640, 480); + this.viewport3.Location = new System.Drawing.Point(12, 282); + this.viewport3.Name = "viewport3"; + this.viewport3.Size = new System.Drawing.Size(320, 240); + this.viewport3.TabIndex = 8; + this.viewport3.WindowSize = new System.Drawing.Size(320, 240); + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(12, 267); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(41, 12); + this.label4.TabIndex = 9; + this.label4.Text = "鍘绘潅鍚�"; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.labArea); + this.groupBox3.Controls.Add(this.btnSelect); + this.groupBox3.Controls.Add(this.btnSelectShape); + this.groupBox3.Controls.Add(this.btnThreshold); + this.groupBox3.Controls.Add(this.nUDAreaMax); + this.groupBox3.Controls.Add(this.nUDAreaMin); + this.groupBox3.Controls.Add(this.nUDThresholdMax); + this.groupBox3.Controls.Add(this.nUDThresholdMin); + this.groupBox3.Controls.Add(this.label9); + this.groupBox3.Controls.Add(this.cmbSelectObj); + this.groupBox3.Controls.Add(this.label8); + this.groupBox3.Controls.Add(this.label7); + this.groupBox3.Controls.Add(this.label6); + this.groupBox3.Controls.Add(this.label5); + this.groupBox3.Location = new System.Drawing.Point(672, 190); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(307, 171); + this.groupBox3.TabIndex = 10; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "鍙傛暟"; + // + // labArea + // + this.labArea.AutoSize = true; + this.labArea.Location = new System.Drawing.Point(142, 144); + this.labArea.Name = "labArea"; + this.labArea.Size = new System.Drawing.Size(29, 12); + this.labArea.TabIndex = 13; + this.labArea.Text = "闈㈢Н"; + // + // btnSelect + // + this.btnSelect.Location = new System.Drawing.Point(225, 139); + this.btnSelect.Name = "btnSelect"; + this.btnSelect.Size = new System.Drawing.Size(66, 23); + this.btnSelect.TabIndex = 12; + this.btnSelect.Text = "閫夋嫨"; + this.btnSelect.UseVisualStyleBackColor = true; + this.btnSelect.Click += new System.EventHandler(this.btnSelect_Click); + // + // btnSelectShape + // + this.btnSelectShape.Location = new System.Drawing.Point(225, 101); + this.btnSelectShape.Name = "btnSelectShape"; + this.btnSelectShape.Size = new System.Drawing.Size(66, 23); + this.btnSelectShape.TabIndex = 11; + this.btnSelectShape.Text = "鍘绘潅"; + this.btnSelectShape.UseVisualStyleBackColor = true; + this.btnSelectShape.Click += new System.EventHandler(this.btnSelectShape_Click); + // + // btnThreshold + // + this.btnThreshold.Location = new System.Drawing.Point(225, 50); + this.btnThreshold.Name = "btnThreshold"; + this.btnThreshold.Size = new System.Drawing.Size(66, 23); + this.btnThreshold.TabIndex = 10; + this.btnThreshold.Text = "浜屽�煎寲"; + this.btnThreshold.UseVisualStyleBackColor = true; + this.btnThreshold.Click += new System.EventHandler(this.btnThreshold_Click); + // + // nUDAreaMax + // + this.nUDAreaMax.Location = new System.Drawing.Point(124, 104); + this.nUDAreaMax.Maximum = new decimal(new int[] { + 10000000, + 0, + 0, + 0}); + this.nUDAreaMax.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nUDAreaMax.Name = "nUDAreaMax"; + this.nUDAreaMax.Size = new System.Drawing.Size(76, 21); + this.nUDAreaMax.TabIndex = 9; + this.nUDAreaMax.Value = new decimal(new int[] { + 9999999, + 0, + 0, + 0}); + // + // nUDAreaMin + // + this.nUDAreaMin.Location = new System.Drawing.Point(14, 104); + this.nUDAreaMin.Maximum = new decimal(new int[] { + 10000000, + 0, + 0, + 0}); + this.nUDAreaMin.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nUDAreaMin.Name = "nUDAreaMin"; + this.nUDAreaMin.Size = new System.Drawing.Size(75, 21); + this.nUDAreaMin.TabIndex = 8; + this.nUDAreaMin.Value = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + // + // nUDThresholdMax + // + this.nUDThresholdMax.Location = new System.Drawing.Point(124, 53); + this.nUDThresholdMax.Maximum = new decimal(new int[] { + 255, + 0, + 0, + 0}); + this.nUDThresholdMax.Name = "nUDThresholdMax"; + this.nUDThresholdMax.Size = new System.Drawing.Size(76, 21); + this.nUDThresholdMax.TabIndex = 7; + this.nUDThresholdMax.Value = new decimal(new int[] { + 255, + 0, + 0, + 0}); + // + // nUDThresholdMin + // + this.nUDThresholdMin.Location = new System.Drawing.Point(14, 53); + this.nUDThresholdMin.Maximum = new decimal(new int[] { + 255, + 0, + 0, + 0}); + this.nUDThresholdMin.Name = "nUDThresholdMin"; + this.nUDThresholdMin.Size = new System.Drawing.Size(75, 21); + this.nUDThresholdMin.TabIndex = 6; + this.nUDThresholdMin.Value = new decimal(new int[] { + 128, + 0, + 0, + 0}); + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(12, 144); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(53, 12); + this.label9.TabIndex = 5; + this.label9.Text = "閫夋嫨鐗╀綋"; + // + // cmbSelectObj + // + this.cmbSelectObj.FormattingEnabled = true; + this.cmbSelectObj.Items.AddRange(new object[] { + "1"}); + this.cmbSelectObj.Location = new System.Drawing.Point(71, 141); + this.cmbSelectObj.Name = "cmbSelectObj"; + this.cmbSelectObj.Size = new System.Drawing.Size(65, 20); + this.cmbSelectObj.TabIndex = 4; + this.cmbSelectObj.SelectedIndexChanged += new System.EventHandler(this.cmbSelectObj_SelectedIndexChanged); + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(123, 84); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(89, 12); + this.label8.TabIndex = 3; + this.label8.Text = "鍘绘潅闈㈢Н鏈�澶у��"; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(12, 84); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(89, 12); + this.label7.TabIndex = 2; + this.label7.Text = "鍘绘潅闈㈢Н鏈�灏忓��"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(123, 31); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(77, 12); + this.label6.TabIndex = 1; + this.label6.Text = "浜屽�煎寲鏈�澶у��"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(12, 31); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(77, 12); + this.label5.TabIndex = 0; + this.label5.Text = "浜屽�煎寲鏈�灏忓��"; + // + // btnRun + // + this.btnRun.Location = new System.Drawing.Point(672, 386); + this.btnRun.Name = "btnRun"; + this.btnRun.Size = new System.Drawing.Size(115, 56); + this.btnRun.TabIndex = 11; + this.btnRun.Text = "杩愯"; + this.btnRun.UseVisualStyleBackColor = true; + this.btnRun.Click += new System.EventHandler(this.btnRun_Click); + // + // btnParaSave + // + this.btnParaSave.Location = new System.Drawing.Point(812, 386); + this.btnParaSave.Name = "btnParaSave"; + this.btnParaSave.Size = new System.Drawing.Size(118, 56); + this.btnParaSave.TabIndex = 12; + this.btnParaSave.Text = "鍙傛暟淇濆瓨"; + this.btnParaSave.UseVisualStyleBackColor = true; + this.btnParaSave.Click += new System.EventHandler(this.btnParaSave_Click); + // + // frmContourAssistant + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(991, 532); + this.Controls.Add(this.btnParaSave); + this.Controls.Add(this.btnRun); + this.Controls.Add(this.groupBox3); + this.Controls.Add(this.label4); + this.Controls.Add(this.viewport3); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Controls.Add(this.viewport4); + this.Controls.Add(this.viewport2); + this.Controls.Add(this.viewport1); + this.Name = "frmContourAssistant"; + this.Text = "frmContourAssistant"; + this.Load += new System.EventHandler(this.frmContourAssistant_Load); + this.groupBox1.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nUDAreaMax)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nUDAreaMin)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nUDThresholdMax)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nUDThresholdMin)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private HalconDotNet.HWindowControl viewport1; + private HalconDotNet.HWindowControl viewport2; + private HalconDotNet.HWindowControl viewport4; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Button btnLoadImage; + private System.Windows.Forms.Button btnResetAll; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.RadioButton RBZoom; + private System.Windows.Forms.RadioButton RBmove; + private System.Windows.Forms.RadioButton RBnone; + private System.Windows.Forms.Button btnFitZoom; + private HalconDotNet.HWindowControl viewport3; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.ComboBox cmbSelectObj; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.NumericUpDown nUDAreaMin; + private System.Windows.Forms.NumericUpDown nUDThresholdMax; + private System.Windows.Forms.NumericUpDown nUDThresholdMin; + private System.Windows.Forms.NumericUpDown nUDAreaMax; + private System.Windows.Forms.Button btnSelectShape; + private System.Windows.Forms.Button btnThreshold; + private System.Windows.Forms.Button btnSelect; + private System.Windows.Forms.Button btnRun; + private System.Windows.Forms.Button btnParaSave; + private System.Windows.Forms.Label labArea; + } +} \ No newline at end of file diff --git a/HalconTools/frmContourAssistant.cs b/HalconTools/frmContourAssistant.cs new file mode 100644 index 0000000..2190aff --- /dev/null +++ b/HalconTools/frmContourAssistant.cs @@ -0,0 +1,240 @@ +锘縰sing System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using System.IO; +using HalconDotNet; + +namespace HalconTools +{ + public partial class frmContourAssistant : Form + { + public frmContourAssistant() + { + InitializeComponent(); + } + + public HImage MainImage1; + public HImage MainImage2; + public HImage MainImage3; + public HImage MainImage4; + public ContourAssistant mContourAssistant1; + public ContourAssistant mContourAssistant2; + public ContourAssistant mContourAssistant3; + public ContourAssistant mContourAssistant4; + public HObject ThresholdObj; + public HObject ConnectRegion; + public HObject ObjsSelect; + public HObject SelectedObj; + + //鍙傛暟 + public ContourParam para = new ContourParam(); + + public void init() + { + mContourAssistant1 = new ContourAssistant(viewport1); + mContourAssistant2 = new ContourAssistant(viewport2); + mContourAssistant3 = new ContourAssistant(viewport3); + mContourAssistant4 = new ContourAssistant(viewport4); + + cmbSelectObj.SelectedIndex = 0; + } + + private void RBnone_CheckedChanged(object sender, EventArgs e) + { + mContourAssistant1.viewController.setViewState(HWndCtrl.MODE_VIEW_NONE); + mContourAssistant2.viewController.setViewState(HWndCtrl.MODE_VIEW_NONE); + mContourAssistant3.viewController.setViewState(HWndCtrl.MODE_VIEW_NONE); + mContourAssistant4.viewController.setViewState(HWndCtrl.MODE_VIEW_NONE); + } + + private void RBmove_CheckedChanged(object sender, EventArgs e) + { + mContourAssistant1.viewController.setViewState(HWndCtrl.MODE_VIEW_MOVE); + mContourAssistant2.viewController.setViewState(HWndCtrl.MODE_VIEW_MOVE); + mContourAssistant3.viewController.setViewState(HWndCtrl.MODE_VIEW_MOVE); + mContourAssistant4.viewController.setViewState(HWndCtrl.MODE_VIEW_MOVE); + } + + private void RBZoom_CheckedChanged(object sender, EventArgs e) + { + mContourAssistant1.viewController.setViewState(HWndCtrl.MODE_VIEW_ZOOM); + mContourAssistant2.viewController.setViewState(HWndCtrl.MODE_VIEW_ZOOM); + mContourAssistant3.viewController.setViewState(HWndCtrl.MODE_VIEW_ZOOM); + mContourAssistant4.viewController.setViewState(HWndCtrl.MODE_VIEW_ZOOM); + } + + private void btnFitZoom_Click(object sender, EventArgs e) + { + mContourAssistant1.viewController.resetWindow(); + mContourAssistant1.viewController.repaint(); + mContourAssistant2.viewController.resetWindow(); + mContourAssistant2.viewController.repaint(); + mContourAssistant3.viewController.resetWindow(); + mContourAssistant3.viewController.repaint(); + mContourAssistant4.viewController.resetWindow(); + mContourAssistant4.viewController.repaint(); + } + + private void btnResetAll_Click(object sender, EventArgs e) + { + mContourAssistant1.viewController.resetAll(); + mContourAssistant1.viewController.repaint(); + mContourAssistant2.viewController.resetAll(); + mContourAssistant2.viewController.repaint(); + mContourAssistant3.viewController.resetAll(); + mContourAssistant3.viewController.repaint(); + mContourAssistant4.viewController.resetAll(); + mContourAssistant4.viewController.repaint(); + } + + private void frmContourAssistant_Load(object sender, EventArgs e) + { + init(); + } + + private void btnLoadImage_Click(object sender, EventArgs e) + { + OpenFileDialog imagePath = new OpenFileDialog(); + imagePath.Filter = "*.jpg,*.jpeg,*.bmp,*.gif,*.ico,*.png,*.tif,*.wmf|*.jpg;*.jpeg;*.bmp;*.gif;*.ico;*.png;*.tif;*.wmf"; + + if (imagePath.ShowDialog() == DialogResult.OK) + { + if (!mContourAssistant1.SetImage(imagePath.FileName)) + { + return; + } + + MainImage1 = mContourAssistant1.GetImage(); + mContourAssistant1.UpdateImage(); + } + } + + private void btnThreshold_Click(object sender, EventArgs e) + { + HOperatorSet.GenEmptyObj(out ThresholdObj); + ThresholdObj.Dispose(); + HOperatorSet.Threshold(MainImage1, out ThresholdObj, + Convert.ToInt32(nUDThresholdMin.Value), Convert.ToInt32(nUDThresholdMax.Value)); + + mContourAssistant2.SetImage(MainImage1); + MainImage2 = mContourAssistant2.GetImage(); + mContourAssistant2.UpdateImage(); + + mContourAssistant2.UpdateObj(ThresholdObj); + } + + private void btnSelectShape_Click(object sender, EventArgs e) + { + //鍏堝皢鐗╀綋鍒嗗紑 + HOperatorSet.GenEmptyObj(out ConnectRegion); + ConnectRegion.Dispose(); + HOperatorSet.Connection(ThresholdObj, out ConnectRegion); + //閫夋嫨鐗╀綋 + HOperatorSet.GenEmptyObj(out ObjsSelect); + ObjsSelect.Dispose(); + HOperatorSet.SelectShape(ConnectRegion, out ObjsSelect, "area", "and", + Convert.ToInt32(nUDAreaMin.Value), Convert.ToInt32(nUDAreaMax.Value)); + + mContourAssistant3.SetImage(MainImage1); + MainImage3 = mContourAssistant3.GetImage(); + mContourAssistant3.UpdateImage(); + + mContourAssistant3.UpdateObj(ObjsSelect, "green"); + + //灏嗗緱鍒扮殑缁撴灉杞藉叆鍒癱omboBox涓� + if (ObjsSelect.CountObj() == 0) return; + cmbSelectObj.Items.Clear(); + for (int i = 0; i < ObjsSelect.CountObj(); i++) + { + cmbSelectObj.Items.Add(i + 1); + } + cmbSelectObj.SelectedIndex = 0; + } + + private void btnSelect_Click(object sender, EventArgs e) + { + HOperatorSet.GenEmptyObj(out SelectedObj); + SelectedObj.Dispose(); + HOperatorSet.SelectObj(ObjsSelect, out SelectedObj, cmbSelectObj.SelectedIndex + 1); + + mContourAssistant4.SetImage(MainImage1); + MainImage4 = mContourAssistant4.GetImage(); + mContourAssistant4.UpdateImage(); + + mContourAssistant4.UpdateObj(SelectedObj, "red"); + + HTuple area = null, row = null, col = null; + HOperatorSet.AreaCenter(SelectedObj, out area, out row, out col); + labArea.Text = area.ToString(); + } + + private void btnRun_Click(object sender, EventArgs e) + { + para = new ContourParam(Convert.ToInt32(nUDThresholdMin.Value), Convert.ToInt32(nUDThresholdMax.Value), + Convert.ToInt32(nUDAreaMin.Value), Convert.ToInt32(nUDAreaMax.Value), + cmbSelectObj.SelectedIndex + 1); + + mContourAssistant1.SetPara(para); + if (mContourAssistant1.mImage == null) return; + mContourAssistant1.Run(); + + //绐楀彛2鏄剧ず + mContourAssistant2.SetImage(MainImage1); + MainImage2 = mContourAssistant2.GetImage(); + mContourAssistant2.UpdateImage(); + + mContourAssistant2.UpdateObj(mContourAssistant1.mThresholdObj); + ThresholdObj = mContourAssistant1.mThresholdObj; + + //绐楀彛3鏄剧ず + mContourAssistant3.SetImage(MainImage1); + MainImage3 = mContourAssistant3.GetImage(); + mContourAssistant3.UpdateImage(); + + mContourAssistant3.UpdateObj(mContourAssistant1.mSelectObj, "green"); + ObjsSelect = mContourAssistant1.mSelectObj; + + if (mContourAssistant1.mSelectObj.CountObj() == 0) return; + cmbSelectObj.Items.Clear(); + for (int i = 0; i < mContourAssistant1.mSelectObj.CountObj(); i++) + { + cmbSelectObj.Items.Add(i + 1); + } + + //绐楀彛4鏄剧ず + mContourAssistant4.SetImage(MainImage1); + MainImage4 = mContourAssistant4.GetImage(); + mContourAssistant4.UpdateImage(); + + mContourAssistant4.UpdateObj(mContourAssistant1.mObject, "red"); + SelectedObj = mContourAssistant1.mObject; + } + + private void btnParaSave_Click(object sender, EventArgs e) + { + para = new ContourParam(Convert.ToInt32(nUDThresholdMin.Value), Convert.ToInt32(nUDThresholdMax.Value), + Convert.ToInt32(nUDAreaMin.Value), Convert.ToInt32(nUDAreaMax.Value), + cmbSelectObj.SelectedIndex + 1); + + string path = System.Windows.Forms.Application.StartupPath + "\\ContourConfige"; + if (!Directory.Exists(path)) + { + Directory.CreateDirectory(path); + } + path += "\\ContourConfige.xml"; + + SerializeFileTool<ContourParam> sft = new SerializeFileTool<ContourParam>(); + sft.SetConfig(path, para); + } + + private void cmbSelectObj_SelectedIndexChanged(object sender, EventArgs e) + { + + } + } +} diff --git a/HalconTools/frmContourAssistant.resx b/HalconTools/frmContourAssistant.resx new file mode 100644 index 0000000..19dc0dd --- /dev/null +++ b/HalconTools/frmContourAssistant.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/HalconTools/frmFitCircleAndLine.Designer.cs b/HalconTools/frmFitCircleAndLine.Designer.cs new file mode 100644 index 0000000..2693f04 --- /dev/null +++ b/HalconTools/frmFitCircleAndLine.Designer.cs @@ -0,0 +1,1254 @@ +锘縩amespace HalconTools +{ + partial class frmFitCircleAndLine + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.plnBottom = new System.Windows.Forms.Panel(); + this.pnlBtMiddle = new System.Windows.Forms.Panel(); + this.gbxOption = new System.Windows.Forms.GroupBox(); + this.btnFitZoom = new System.Windows.Forms.Button(); + this.RbZoom = new System.Windows.Forms.RadioButton(); + this.RbMove = new System.Windows.Forms.RadioButton(); + this.RbNone = new System.Windows.Forms.RadioButton(); + this.pnlBtRight = new System.Windows.Forms.Panel(); + this.gbxAddType = new System.Windows.Forms.GroupBox(); + this.btnCircleRoi = new System.Windows.Forms.Button(); + this.btnLineRoi = new System.Windows.Forms.Button(); + this.pnlBtLeft = new System.Windows.Forms.Panel(); + this.gbxImage = new System.Windows.Forms.GroupBox(); + this.btnFrmMeasure = new System.Windows.Forms.Button(); + this.btnResetView = new System.Windows.Forms.Button(); + this.btnLoadImage = new System.Windows.Forms.Button(); + this.plnLeft = new System.Windows.Forms.Panel(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPageLine = new System.Windows.Forms.TabPage(); + this.btnLoadConfige_Line = new System.Windows.Forms.Button(); + this.gbxFitLinePara = new System.Windows.Forms.GroupBox(); + this.btnParaAdd = new System.Windows.Forms.Button(); + this.labColumnEnd = new System.Windows.Forms.Label(); + this.labColumnEndSet = new System.Windows.Forms.Label(); + this.labRowEnd = new System.Windows.Forms.Label(); + this.labRowEndSet = new System.Windows.Forms.Label(); + this.labColumnBegin = new System.Windows.Forms.Label(); + this.labColumnBeginSet = new System.Windows.Forms.Label(); + this.labRowBegin = new System.Windows.Forms.Label(); + this.labRowBeginSet = new System.Windows.Forms.Label(); + this.labNumber = new System.Windows.Forms.Label(); + this.labNumberSet = new System.Windows.Forms.Label(); + this.btnRoiHeightReset_Line = new System.Windows.Forms.Button(); + this.tBroiHeight = new System.Windows.Forms.TrackBar(); + this.numUDRoiHeight = new System.Windows.Forms.NumericUpDown(); + this.labPosition = new System.Windows.Forms.Label(); + this.labPositionSet = new System.Windows.Forms.Label(); + this.labTransition = new System.Windows.Forms.Label(); + this.labTransitionSet = new System.Windows.Forms.Label(); + this.labInterpolation = new System.Windows.Forms.Label(); + this.labInterpolationSet = new System.Windows.Forms.Label(); + this.labROIHeight = new System.Windows.Forms.Label(); + this.labROIWidth = new System.Windows.Forms.Label(); + this.labROIWidthSet = new System.Windows.Forms.Label(); + this.labSmoothing = new System.Windows.Forms.Label(); + this.labSmoothingSet = new System.Windows.Forms.Label(); + this.labMinEdgeAmpl = new System.Windows.Forms.Label(); + this.labRecognitionSet = new System.Windows.Forms.Label(); + this.labMinEdgeAmplSet = new System.Windows.Forms.Label(); + this.labRecognition = new System.Windows.Forms.Label(); + this.btnFitLine = new System.Windows.Forms.Button(); + this.tabPageCircle = new System.Windows.Forms.TabPage(); + this.btnLoadConfige_Circle = new System.Windows.Forms.Button(); + this.gbxFitCirclePara = new System.Windows.Forms.GroupBox(); + this.labRadius_Circle = new System.Windows.Forms.Label(); + this.labRadiusSet_Circle = new System.Windows.Forms.Label(); + this.labColumn_Circle = new System.Windows.Forms.Label(); + this.labColumnSet_Circle = new System.Windows.Forms.Label(); + this.labRow_Circle = new System.Windows.Forms.Label(); + this.labRowSet_Circle = new System.Windows.Forms.Label(); + this.btnParaAdd_Circle = new System.Windows.Forms.Button(); + this.labNumber_Circle = new System.Windows.Forms.Label(); + this.labNumberSet_Circle = new System.Windows.Forms.Label(); + this.btnRoiHeightReset_Circle = new System.Windows.Forms.Button(); + this.trackBar1 = new System.Windows.Forms.TrackBar(); + this.numUDRoiHeight_Circle = new System.Windows.Forms.NumericUpDown(); + this.labPosition_Circle = new System.Windows.Forms.Label(); + this.labPositionSet_Circle = new System.Windows.Forms.Label(); + this.labTransition_Circle = new System.Windows.Forms.Label(); + this.labTransitionSet_Circle = new System.Windows.Forms.Label(); + this.labInterpolation_Circle = new System.Windows.Forms.Label(); + this.labInterpolationSet_Circle = new System.Windows.Forms.Label(); + this.labROIHeight_Circle = new System.Windows.Forms.Label(); + this.labROIWidth_Circle = new System.Windows.Forms.Label(); + this.labROIWidthSet_Circle = new System.Windows.Forms.Label(); + this.labSmoothing_Circle = new System.Windows.Forms.Label(); + this.labSmoothingSet_Circle = new System.Windows.Forms.Label(); + this.labMinEdgeAmpl_Circle = new System.Windows.Forms.Label(); + this.labRecognitionSet_Circle = new System.Windows.Forms.Label(); + this.labMinEdgeAmplSet_Circle = new System.Windows.Forms.Label(); + this.labRecognition_Circle = new System.Windows.Forms.Label(); + this.btnFitCircle = new System.Windows.Forms.Button(); + this.pnlMiddle = new System.Windows.Forms.Panel(); + this.viewPort = new HalconDotNet.HWindowControl(); + this.txtMinEdgeAmplSet = new System.Windows.Forms.TextBox(); + this.txtSmoothingSet = new System.Windows.Forms.TextBox(); + this.txtInterpolationSet = new System.Windows.Forms.TextBox(); + this.txtNumberSet = new System.Windows.Forms.TextBox(); + this.txtPositionSet = new System.Windows.Forms.TextBox(); + this.txtTransitionSet = new System.Windows.Forms.TextBox(); + this.txtROIWidthSet = new System.Windows.Forms.TextBox(); + this.plnBottom.SuspendLayout(); + this.pnlBtMiddle.SuspendLayout(); + this.gbxOption.SuspendLayout(); + this.pnlBtRight.SuspendLayout(); + this.gbxAddType.SuspendLayout(); + this.pnlBtLeft.SuspendLayout(); + this.gbxImage.SuspendLayout(); + this.plnLeft.SuspendLayout(); + this.tabControl1.SuspendLayout(); + this.tabPageLine.SuspendLayout(); + this.gbxFitLinePara.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.tBroiHeight)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numUDRoiHeight)).BeginInit(); + this.tabPageCircle.SuspendLayout(); + this.gbxFitCirclePara.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numUDRoiHeight_Circle)).BeginInit(); + this.pnlMiddle.SuspendLayout(); + this.SuspendLayout(); + // + // plnBottom + // + this.plnBottom.Controls.Add(this.pnlBtMiddle); + this.plnBottom.Controls.Add(this.pnlBtRight); + this.plnBottom.Controls.Add(this.pnlBtLeft); + this.plnBottom.Dock = System.Windows.Forms.DockStyle.Bottom; + this.plnBottom.Location = new System.Drawing.Point(0, 622); + this.plnBottom.Name = "plnBottom"; + this.plnBottom.Size = new System.Drawing.Size(1183, 92); + this.plnBottom.TabIndex = 2; + // + // pnlBtMiddle + // + this.pnlBtMiddle.Controls.Add(this.gbxOption); + this.pnlBtMiddle.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlBtMiddle.Location = new System.Drawing.Point(361, 0); + this.pnlBtMiddle.Name = "pnlBtMiddle"; + this.pnlBtMiddle.Size = new System.Drawing.Size(462, 92); + this.pnlBtMiddle.TabIndex = 2; + // + // gbxOption + // + this.gbxOption.Controls.Add(this.btnFitZoom); + this.gbxOption.Controls.Add(this.RbZoom); + this.gbxOption.Controls.Add(this.RbMove); + this.gbxOption.Controls.Add(this.RbNone); + this.gbxOption.Dock = System.Windows.Forms.DockStyle.Fill; + this.gbxOption.Location = new System.Drawing.Point(0, 0); + this.gbxOption.Name = "gbxOption"; + this.gbxOption.Size = new System.Drawing.Size(462, 92); + this.gbxOption.TabIndex = 16; + this.gbxOption.TabStop = false; + this.gbxOption.Text = "groupBox3"; + // + // btnFitZoom + // + this.btnFitZoom.Location = new System.Drawing.Point(298, 20); + this.btnFitZoom.Name = "btnFitZoom"; + this.btnFitZoom.Size = new System.Drawing.Size(117, 65); + this.btnFitZoom.TabIndex = 15; + this.btnFitZoom.Text = "Fit Zoom"; + this.btnFitZoom.Click += new System.EventHandler(this.btnFitZoom_Click); + // + // RbZoom + // + this.RbZoom.Location = new System.Drawing.Point(179, 44); + this.RbZoom.Name = "RbZoom"; + this.RbZoom.Size = new System.Drawing.Size(68, 18); + this.RbZoom.TabIndex = 13; + this.RbZoom.Text = "zoom"; + this.RbZoom.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RbZoom.CheckedChanged += new System.EventHandler(this.RbZoom_CheckedChanged); + // + // RbMove + // + this.RbMove.Location = new System.Drawing.Point(106, 44); + this.RbMove.Name = "RbMove"; + this.RbMove.Size = new System.Drawing.Size(67, 18); + this.RbMove.TabIndex = 12; + this.RbMove.Text = "move"; + this.RbMove.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RbMove.CheckedChanged += new System.EventHandler(this.RbMove_CheckedChanged); + // + // RbNone + // + this.RbNone.Checked = true; + this.RbNone.Location = new System.Drawing.Point(33, 44); + this.RbNone.Name = "RbNone"; + this.RbNone.Size = new System.Drawing.Size(67, 18); + this.RbNone.TabIndex = 11; + this.RbNone.TabStop = true; + this.RbNone.Text = "none"; + this.RbNone.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.RbNone.CheckedChanged += new System.EventHandler(this.RbNone_CheckedChanged); + // + // pnlBtRight + // + this.pnlBtRight.Controls.Add(this.gbxAddType); + this.pnlBtRight.Dock = System.Windows.Forms.DockStyle.Right; + this.pnlBtRight.Location = new System.Drawing.Point(823, 0); + this.pnlBtRight.Name = "pnlBtRight"; + this.pnlBtRight.Size = new System.Drawing.Size(360, 92); + this.pnlBtRight.TabIndex = 1; + // + // gbxAddType + // + this.gbxAddType.Controls.Add(this.btnCircleRoi); + this.gbxAddType.Controls.Add(this.btnLineRoi); + this.gbxAddType.Dock = System.Windows.Forms.DockStyle.Fill; + this.gbxAddType.Location = new System.Drawing.Point(0, 0); + this.gbxAddType.Name = "gbxAddType"; + this.gbxAddType.Size = new System.Drawing.Size(360, 92); + this.gbxAddType.TabIndex = 11; + this.gbxAddType.TabStop = false; + this.gbxAddType.Text = "groupBox2"; + // + // btnCircleRoi + // + this.btnCircleRoi.Location = new System.Drawing.Point(206, 36); + this.btnCircleRoi.Name = "btnCircleRoi"; + this.btnCircleRoi.Size = new System.Drawing.Size(117, 50); + this.btnCircleRoi.TabIndex = 11; + this.btnCircleRoi.Text = "Circle"; + this.btnCircleRoi.Click += new System.EventHandler(this.btnCircleRoi_Click); + // + // btnLineRoi + // + this.btnLineRoi.Location = new System.Drawing.Point(29, 36); + this.btnLineRoi.Name = "btnLineRoi"; + this.btnLineRoi.Size = new System.Drawing.Size(117, 49); + this.btnLineRoi.TabIndex = 10; + this.btnLineRoi.Text = "Line"; + this.btnLineRoi.Click += new System.EventHandler(this.BtnLineRoi_Click); + // + // pnlBtLeft + // + this.pnlBtLeft.Controls.Add(this.gbxImage); + this.pnlBtLeft.Dock = System.Windows.Forms.DockStyle.Left; + this.pnlBtLeft.Location = new System.Drawing.Point(0, 0); + this.pnlBtLeft.Name = "pnlBtLeft"; + this.pnlBtLeft.Size = new System.Drawing.Size(361, 92); + this.pnlBtLeft.TabIndex = 0; + // + // gbxImage + // + this.gbxImage.Controls.Add(this.btnFrmMeasure); + this.gbxImage.Controls.Add(this.btnResetView); + this.gbxImage.Controls.Add(this.btnLoadImage); + this.gbxImage.Dock = System.Windows.Forms.DockStyle.Fill; + this.gbxImage.Location = new System.Drawing.Point(0, 0); + this.gbxImage.Name = "gbxImage"; + this.gbxImage.Size = new System.Drawing.Size(361, 92); + this.gbxImage.TabIndex = 15; + this.gbxImage.TabStop = false; + this.gbxImage.Text = "groupBox1"; + // + // btnFrmMeasure + // + this.btnFrmMeasure.Location = new System.Drawing.Point(249, 20); + this.btnFrmMeasure.Name = "btnFrmMeasure"; + this.btnFrmMeasure.Size = new System.Drawing.Size(95, 60); + this.btnFrmMeasure.TabIndex = 15; + this.btnFrmMeasure.Text = "Measure Form"; + this.btnFrmMeasure.UseVisualStyleBackColor = true; + this.btnFrmMeasure.Click += new System.EventHandler(this.btnFrmMeasure_Click); + // + // btnResetView + // + this.btnResetView.Location = new System.Drawing.Point(124, 20); + this.btnResetView.Name = "btnResetView"; + this.btnResetView.Size = new System.Drawing.Size(89, 60); + this.btnResetView.TabIndex = 14; + this.btnResetView.Text = "Reset View"; + this.btnResetView.Click += new System.EventHandler(this.BtnResetView_Click); + // + // btnLoadImage + // + this.btnLoadImage.Location = new System.Drawing.Point(12, 20); + this.btnLoadImage.Name = "btnLoadImage"; + this.btnLoadImage.Size = new System.Drawing.Size(83, 60); + this.btnLoadImage.TabIndex = 0; + this.btnLoadImage.Text = "Load Image"; + this.btnLoadImage.UseVisualStyleBackColor = true; + this.btnLoadImage.Click += new System.EventHandler(this.btnLoadImage_Click); + // + // plnLeft + // + this.plnLeft.Controls.Add(this.tabControl1); + this.plnLeft.Dock = System.Windows.Forms.DockStyle.Right; + this.plnLeft.Location = new System.Drawing.Point(823, 0); + this.plnLeft.Name = "plnLeft"; + this.plnLeft.Size = new System.Drawing.Size(360, 622); + this.plnLeft.TabIndex = 3; + // + // tabControl1 + // + this.tabControl1.Controls.Add(this.tabPageLine); + this.tabControl1.Controls.Add(this.tabPageCircle); + this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControl1.Location = new System.Drawing.Point(0, 0); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(360, 622); + this.tabControl1.TabIndex = 0; + // + // tabPageLine + // + this.tabPageLine.Controls.Add(this.btnLoadConfige_Line); + this.tabPageLine.Controls.Add(this.gbxFitLinePara); + this.tabPageLine.Controls.Add(this.btnFitLine); + this.tabPageLine.Location = new System.Drawing.Point(4, 22); + this.tabPageLine.Name = "tabPageLine"; + this.tabPageLine.Padding = new System.Windows.Forms.Padding(3); + this.tabPageLine.Size = new System.Drawing.Size(352, 596); + this.tabPageLine.TabIndex = 0; + this.tabPageLine.Text = "Fit Line"; + this.tabPageLine.UseVisualStyleBackColor = true; + // + // btnLoadConfige_Line + // + this.btnLoadConfige_Line.Location = new System.Drawing.Point(202, 526); + this.btnLoadConfige_Line.Name = "btnLoadConfige_Line"; + this.btnLoadConfige_Line.Size = new System.Drawing.Size(117, 55); + this.btnLoadConfige_Line.TabIndex = 52; + this.btnLoadConfige_Line.Text = "Load Confige"; + this.btnLoadConfige_Line.UseVisualStyleBackColor = true; + this.btnLoadConfige_Line.Click += new System.EventHandler(this.btnLoadConfige_Line_Click); + // + // gbxFitLinePara + // + this.gbxFitLinePara.Controls.Add(this.txtROIWidthSet); + this.gbxFitLinePara.Controls.Add(this.txtNumberSet); + this.gbxFitLinePara.Controls.Add(this.txtPositionSet); + this.gbxFitLinePara.Controls.Add(this.txtTransitionSet); + this.gbxFitLinePara.Controls.Add(this.txtInterpolationSet); + this.gbxFitLinePara.Controls.Add(this.txtSmoothingSet); + this.gbxFitLinePara.Controls.Add(this.txtMinEdgeAmplSet); + this.gbxFitLinePara.Controls.Add(this.btnParaAdd); + this.gbxFitLinePara.Controls.Add(this.labColumnEnd); + this.gbxFitLinePara.Controls.Add(this.labColumnEndSet); + this.gbxFitLinePara.Controls.Add(this.labRowEnd); + this.gbxFitLinePara.Controls.Add(this.labRowEndSet); + this.gbxFitLinePara.Controls.Add(this.labColumnBegin); + this.gbxFitLinePara.Controls.Add(this.labColumnBeginSet); + this.gbxFitLinePara.Controls.Add(this.labRowBegin); + this.gbxFitLinePara.Controls.Add(this.labRowBeginSet); + this.gbxFitLinePara.Controls.Add(this.labNumber); + this.gbxFitLinePara.Controls.Add(this.labNumberSet); + this.gbxFitLinePara.Controls.Add(this.btnRoiHeightReset_Line); + this.gbxFitLinePara.Controls.Add(this.tBroiHeight); + this.gbxFitLinePara.Controls.Add(this.numUDRoiHeight); + this.gbxFitLinePara.Controls.Add(this.labPosition); + this.gbxFitLinePara.Controls.Add(this.labPositionSet); + this.gbxFitLinePara.Controls.Add(this.labTransition); + this.gbxFitLinePara.Controls.Add(this.labTransitionSet); + this.gbxFitLinePara.Controls.Add(this.labInterpolation); + this.gbxFitLinePara.Controls.Add(this.labInterpolationSet); + this.gbxFitLinePara.Controls.Add(this.labROIHeight); + this.gbxFitLinePara.Controls.Add(this.labROIWidth); + this.gbxFitLinePara.Controls.Add(this.labROIWidthSet); + this.gbxFitLinePara.Controls.Add(this.labSmoothing); + this.gbxFitLinePara.Controls.Add(this.labSmoothingSet); + this.gbxFitLinePara.Controls.Add(this.labMinEdgeAmpl); + this.gbxFitLinePara.Controls.Add(this.labRecognitionSet); + this.gbxFitLinePara.Controls.Add(this.labMinEdgeAmplSet); + this.gbxFitLinePara.Controls.Add(this.labRecognition); + this.gbxFitLinePara.Location = new System.Drawing.Point(6, 6); + this.gbxFitLinePara.Name = "gbxFitLinePara"; + this.gbxFitLinePara.Size = new System.Drawing.Size(338, 514); + this.gbxFitLinePara.TabIndex = 51; + this.gbxFitLinePara.TabStop = false; + this.gbxFitLinePara.Text = "groupBox10"; + // + // btnParaAdd + // + this.btnParaAdd.Location = new System.Drawing.Point(222, 448); + this.btnParaAdd.Name = "btnParaAdd"; + this.btnParaAdd.Size = new System.Drawing.Size(103, 49); + this.btnParaAdd.TabIndex = 60; + this.btnParaAdd.Text = "Para Add"; + this.btnParaAdd.UseVisualStyleBackColor = true; + this.btnParaAdd.Visible = false; + this.btnParaAdd.Click += new System.EventHandler(this.btnParaAdd_Click); + // + // labColumnEnd + // + this.labColumnEnd.BackColor = System.Drawing.SystemColors.Control; + this.labColumnEnd.Location = new System.Drawing.Point(14, 390); + this.labColumnEnd.Name = "labColumnEnd"; + this.labColumnEnd.Size = new System.Drawing.Size(115, 21); + this.labColumnEnd.TabIndex = 59; + this.labColumnEnd.Text = "Transition"; + this.labColumnEnd.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labColumnEndSet + // + this.labColumnEndSet.BackColor = System.Drawing.Color.White; + this.labColumnEndSet.Location = new System.Drawing.Point(135, 389); + this.labColumnEndSet.Name = "labColumnEndSet"; + this.labColumnEndSet.Size = new System.Drawing.Size(115, 21); + this.labColumnEndSet.TabIndex = 58; + this.labColumnEndSet.Text = "-"; + this.labColumnEndSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labRowEnd + // + this.labRowEnd.BackColor = System.Drawing.SystemColors.Control; + this.labRowEnd.Location = new System.Drawing.Point(14, 365); + this.labRowEnd.Name = "labRowEnd"; + this.labRowEnd.Size = new System.Drawing.Size(115, 21); + this.labRowEnd.TabIndex = 57; + this.labRowEnd.Text = "Interpolation"; + this.labRowEnd.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labRowEndSet + // + this.labRowEndSet.BackColor = System.Drawing.Color.White; + this.labRowEndSet.Location = new System.Drawing.Point(135, 364); + this.labRowEndSet.Name = "labRowEndSet"; + this.labRowEndSet.Size = new System.Drawing.Size(115, 21); + this.labRowEndSet.TabIndex = 56; + this.labRowEndSet.Text = "-"; + this.labRowEndSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labColumnBegin + // + this.labColumnBegin.BackColor = System.Drawing.SystemColors.Control; + this.labColumnBegin.Location = new System.Drawing.Point(14, 340); + this.labColumnBegin.Name = "labColumnBegin"; + this.labColumnBegin.Size = new System.Drawing.Size(115, 21); + this.labColumnBegin.TabIndex = 55; + this.labColumnBegin.Text = "Smoothing"; + this.labColumnBegin.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labColumnBeginSet + // + this.labColumnBeginSet.BackColor = System.Drawing.Color.White; + this.labColumnBeginSet.Location = new System.Drawing.Point(135, 339); + this.labColumnBeginSet.Name = "labColumnBeginSet"; + this.labColumnBeginSet.Size = new System.Drawing.Size(115, 21); + this.labColumnBeginSet.TabIndex = 54; + this.labColumnBeginSet.Text = "-"; + this.labColumnBeginSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labRowBegin + // + this.labRowBegin.BackColor = System.Drawing.SystemColors.Control; + this.labRowBegin.Location = new System.Drawing.Point(14, 315); + this.labRowBegin.Name = "labRowBegin"; + this.labRowBegin.Size = new System.Drawing.Size(115, 21); + this.labRowBegin.TabIndex = 53; + this.labRowBegin.Text = "StartRow"; + this.labRowBegin.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labRowBeginSet + // + this.labRowBeginSet.BackColor = System.Drawing.Color.White; + this.labRowBeginSet.Location = new System.Drawing.Point(135, 314); + this.labRowBeginSet.Name = "labRowBeginSet"; + this.labRowBeginSet.Size = new System.Drawing.Size(115, 21); + this.labRowBeginSet.TabIndex = 52; + this.labRowBeginSet.Text = "-"; + this.labRowBeginSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labNumber + // + this.labNumber.BackColor = System.Drawing.SystemColors.Control; + this.labNumber.Location = new System.Drawing.Point(14, 180); + this.labNumber.Name = "labNumber"; + this.labNumber.Size = new System.Drawing.Size(115, 21); + this.labNumber.TabIndex = 51; + this.labNumber.Text = "Number"; + this.labNumber.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labNumberSet + // + this.labNumberSet.BackColor = System.Drawing.Color.White; + this.labNumberSet.Location = new System.Drawing.Point(135, 179); + this.labNumberSet.Name = "labNumberSet"; + this.labNumberSet.Size = new System.Drawing.Size(115, 21); + this.labNumberSet.TabIndex = 50; + this.labNumberSet.Text = "-"; + this.labNumberSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btnRoiHeightReset_Line + // + this.btnRoiHeightReset_Line.Location = new System.Drawing.Point(256, 233); + this.btnRoiHeightReset_Line.Name = "btnRoiHeightReset_Line"; + this.btnRoiHeightReset_Line.Size = new System.Drawing.Size(69, 31); + this.btnRoiHeightReset_Line.TabIndex = 49; + this.btnRoiHeightReset_Line.Text = "Reset"; + // + // tBroiHeight + // + this.tBroiHeight.Location = new System.Drawing.Point(137, 260); + this.tBroiHeight.Maximum = 2000; + this.tBroiHeight.Minimum = 5; + this.tBroiHeight.Name = "tBroiHeight"; + this.tBroiHeight.Size = new System.Drawing.Size(113, 45); + this.tBroiHeight.TabIndex = 48; + this.tBroiHeight.TickFrequency = 10; + this.tBroiHeight.TickStyle = System.Windows.Forms.TickStyle.None; + this.tBroiHeight.Value = 20; + // + // numUDRoiHeight + // + this.numUDRoiHeight.Location = new System.Drawing.Point(137, 233); + this.numUDRoiHeight.Maximum = new decimal(new int[] { + 2000, + 0, + 0, + 0}); + this.numUDRoiHeight.Name = "numUDRoiHeight"; + this.numUDRoiHeight.Size = new System.Drawing.Size(113, 21); + this.numUDRoiHeight.TabIndex = 47; + this.numUDRoiHeight.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.numUDRoiHeight.Value = new decimal(new int[] { + 20, + 0, + 0, + 0}); + this.numUDRoiHeight.ValueChanged += new System.EventHandler(this.numUDRoiHeight_ValueChanged); + // + // labPosition + // + this.labPosition.BackColor = System.Drawing.SystemColors.Control; + this.labPosition.Location = new System.Drawing.Point(14, 155); + this.labPosition.Name = "labPosition"; + this.labPosition.Size = new System.Drawing.Size(115, 21); + this.labPosition.TabIndex = 46; + this.labPosition.Text = "Position"; + this.labPosition.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labPositionSet + // + this.labPositionSet.BackColor = System.Drawing.Color.White; + this.labPositionSet.Location = new System.Drawing.Point(135, 154); + this.labPositionSet.Name = "labPositionSet"; + this.labPositionSet.Size = new System.Drawing.Size(115, 21); + this.labPositionSet.TabIndex = 45; + this.labPositionSet.Text = "-"; + this.labPositionSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labTransition + // + this.labTransition.BackColor = System.Drawing.SystemColors.Control; + this.labTransition.Location = new System.Drawing.Point(14, 130); + this.labTransition.Name = "labTransition"; + this.labTransition.Size = new System.Drawing.Size(115, 21); + this.labTransition.TabIndex = 44; + this.labTransition.Text = "Transition"; + this.labTransition.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labTransitionSet + // + this.labTransitionSet.BackColor = System.Drawing.Color.White; + this.labTransitionSet.Location = new System.Drawing.Point(135, 129); + this.labTransitionSet.Name = "labTransitionSet"; + this.labTransitionSet.Size = new System.Drawing.Size(115, 21); + this.labTransitionSet.TabIndex = 43; + this.labTransitionSet.Text = "-"; + this.labTransitionSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labInterpolation + // + this.labInterpolation.BackColor = System.Drawing.SystemColors.Control; + this.labInterpolation.Location = new System.Drawing.Point(14, 105); + this.labInterpolation.Name = "labInterpolation"; + this.labInterpolation.Size = new System.Drawing.Size(115, 21); + this.labInterpolation.TabIndex = 42; + this.labInterpolation.Text = "Interpolation"; + this.labInterpolation.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labInterpolationSet + // + this.labInterpolationSet.BackColor = System.Drawing.Color.White; + this.labInterpolationSet.Location = new System.Drawing.Point(135, 104); + this.labInterpolationSet.Name = "labInterpolationSet"; + this.labInterpolationSet.Size = new System.Drawing.Size(115, 21); + this.labInterpolationSet.TabIndex = 41; + this.labInterpolationSet.Text = "-"; + this.labInterpolationSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labROIHeight + // + this.labROIHeight.BackColor = System.Drawing.SystemColors.Control; + this.labROIHeight.Location = new System.Drawing.Point(14, 231); + this.labROIHeight.Name = "labROIHeight"; + this.labROIHeight.Size = new System.Drawing.Size(115, 21); + this.labROIHeight.TabIndex = 40; + this.labROIHeight.Text = "ROI Height"; + this.labROIHeight.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labROIWidth + // + this.labROIWidth.BackColor = System.Drawing.SystemColors.Control; + this.labROIWidth.Location = new System.Drawing.Point(14, 206); + this.labROIWidth.Name = "labROIWidth"; + this.labROIWidth.Size = new System.Drawing.Size(115, 21); + this.labROIWidth.TabIndex = 38; + this.labROIWidth.Text = "ROI Width"; + this.labROIWidth.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labROIWidthSet + // + this.labROIWidthSet.BackColor = System.Drawing.Color.White; + this.labROIWidthSet.Location = new System.Drawing.Point(135, 205); + this.labROIWidthSet.Name = "labROIWidthSet"; + this.labROIWidthSet.Size = new System.Drawing.Size(115, 21); + this.labROIWidthSet.TabIndex = 37; + this.labROIWidthSet.Text = "-"; + this.labROIWidthSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labSmoothing + // + this.labSmoothing.BackColor = System.Drawing.SystemColors.Control; + this.labSmoothing.Location = new System.Drawing.Point(14, 80); + this.labSmoothing.Name = "labSmoothing"; + this.labSmoothing.Size = new System.Drawing.Size(115, 21); + this.labSmoothing.TabIndex = 36; + this.labSmoothing.Text = "Smoothing"; + this.labSmoothing.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labSmoothingSet + // + this.labSmoothingSet.BackColor = System.Drawing.Color.White; + this.labSmoothingSet.Location = new System.Drawing.Point(135, 79); + this.labSmoothingSet.Name = "labSmoothingSet"; + this.labSmoothingSet.Size = new System.Drawing.Size(115, 21); + this.labSmoothingSet.TabIndex = 35; + this.labSmoothingSet.Text = "-"; + this.labSmoothingSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labMinEdgeAmpl + // + this.labMinEdgeAmpl.BackColor = System.Drawing.SystemColors.Control; + this.labMinEdgeAmpl.Location = new System.Drawing.Point(14, 55); + this.labMinEdgeAmpl.Name = "labMinEdgeAmpl"; + this.labMinEdgeAmpl.Size = new System.Drawing.Size(115, 21); + this.labMinEdgeAmpl.TabIndex = 34; + this.labMinEdgeAmpl.Text = "Min.EdgeAmpl"; + this.labMinEdgeAmpl.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labRecognitionSet + // + this.labRecognitionSet.BackColor = System.Drawing.SystemColors.Control; + this.labRecognitionSet.Location = new System.Drawing.Point(135, 29); + this.labRecognitionSet.Name = "labRecognitionSet"; + this.labRecognitionSet.Size = new System.Drawing.Size(115, 21); + this.labRecognitionSet.TabIndex = 33; + this.labRecognitionSet.Text = "Recognition"; + this.labRecognitionSet.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labMinEdgeAmplSet + // + this.labMinEdgeAmplSet.BackColor = System.Drawing.Color.White; + this.labMinEdgeAmplSet.Location = new System.Drawing.Point(135, 54); + this.labMinEdgeAmplSet.Name = "labMinEdgeAmplSet"; + this.labMinEdgeAmplSet.Size = new System.Drawing.Size(115, 21); + this.labMinEdgeAmplSet.TabIndex = 32; + this.labMinEdgeAmplSet.Text = "-"; + this.labMinEdgeAmplSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labRecognition + // + this.labRecognition.BackColor = System.Drawing.SystemColors.Control; + this.labRecognition.Location = new System.Drawing.Point(14, 29); + this.labRecognition.Name = "labRecognition"; + this.labRecognition.Size = new System.Drawing.Size(115, 21); + this.labRecognition.TabIndex = 31; + this.labRecognition.Text = "Recognition"; + this.labRecognition.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // btnFitLine + // + this.btnFitLine.Location = new System.Drawing.Point(35, 526); + this.btnFitLine.Name = "btnFitLine"; + this.btnFitLine.Size = new System.Drawing.Size(117, 55); + this.btnFitLine.TabIndex = 3; + this.btnFitLine.Text = "Fit Line"; + this.btnFitLine.UseVisualStyleBackColor = true; + this.btnFitLine.Click += new System.EventHandler(this.btnFitLine_Click); + // + // tabPageCircle + // + this.tabPageCircle.Controls.Add(this.btnLoadConfige_Circle); + this.tabPageCircle.Controls.Add(this.gbxFitCirclePara); + this.tabPageCircle.Controls.Add(this.btnFitCircle); + this.tabPageCircle.Location = new System.Drawing.Point(4, 22); + this.tabPageCircle.Name = "tabPageCircle"; + this.tabPageCircle.Padding = new System.Windows.Forms.Padding(3); + this.tabPageCircle.Size = new System.Drawing.Size(352, 596); + this.tabPageCircle.TabIndex = 1; + this.tabPageCircle.Text = "Fit Circle"; + this.tabPageCircle.UseVisualStyleBackColor = true; + // + // btnLoadConfige_Circle + // + this.btnLoadConfige_Circle.Location = new System.Drawing.Point(202, 525); + this.btnLoadConfige_Circle.Name = "btnLoadConfige_Circle"; + this.btnLoadConfige_Circle.Size = new System.Drawing.Size(117, 65); + this.btnLoadConfige_Circle.TabIndex = 54; + this.btnLoadConfige_Circle.Text = "Load Confige"; + this.btnLoadConfige_Circle.UseVisualStyleBackColor = true; + this.btnLoadConfige_Circle.Click += new System.EventHandler(this.btnLoadConfige_Circle_Click); + // + // gbxFitCirclePara + // + this.gbxFitCirclePara.Controls.Add(this.labRadius_Circle); + this.gbxFitCirclePara.Controls.Add(this.labRadiusSet_Circle); + this.gbxFitCirclePara.Controls.Add(this.labColumn_Circle); + this.gbxFitCirclePara.Controls.Add(this.labColumnSet_Circle); + this.gbxFitCirclePara.Controls.Add(this.labRow_Circle); + this.gbxFitCirclePara.Controls.Add(this.labRowSet_Circle); + this.gbxFitCirclePara.Controls.Add(this.btnParaAdd_Circle); + this.gbxFitCirclePara.Controls.Add(this.labNumber_Circle); + this.gbxFitCirclePara.Controls.Add(this.labNumberSet_Circle); + this.gbxFitCirclePara.Controls.Add(this.btnRoiHeightReset_Circle); + this.gbxFitCirclePara.Controls.Add(this.trackBar1); + this.gbxFitCirclePara.Controls.Add(this.numUDRoiHeight_Circle); + this.gbxFitCirclePara.Controls.Add(this.labPosition_Circle); + this.gbxFitCirclePara.Controls.Add(this.labPositionSet_Circle); + this.gbxFitCirclePara.Controls.Add(this.labTransition_Circle); + this.gbxFitCirclePara.Controls.Add(this.labTransitionSet_Circle); + this.gbxFitCirclePara.Controls.Add(this.labInterpolation_Circle); + this.gbxFitCirclePara.Controls.Add(this.labInterpolationSet_Circle); + this.gbxFitCirclePara.Controls.Add(this.labROIHeight_Circle); + this.gbxFitCirclePara.Controls.Add(this.labROIWidth_Circle); + this.gbxFitCirclePara.Controls.Add(this.labROIWidthSet_Circle); + this.gbxFitCirclePara.Controls.Add(this.labSmoothing_Circle); + this.gbxFitCirclePara.Controls.Add(this.labSmoothingSet_Circle); + this.gbxFitCirclePara.Controls.Add(this.labMinEdgeAmpl_Circle); + this.gbxFitCirclePara.Controls.Add(this.labRecognitionSet_Circle); + this.gbxFitCirclePara.Controls.Add(this.labMinEdgeAmplSet_Circle); + this.gbxFitCirclePara.Controls.Add(this.labRecognition_Circle); + this.gbxFitCirclePara.Location = new System.Drawing.Point(6, 6); + this.gbxFitCirclePara.Name = "gbxFitCirclePara"; + this.gbxFitCirclePara.Size = new System.Drawing.Size(338, 494); + this.gbxFitCirclePara.TabIndex = 53; + this.gbxFitCirclePara.TabStop = false; + this.gbxFitCirclePara.Text = "groupBox4"; + // + // labRadius_Circle + // + this.labRadius_Circle.BackColor = System.Drawing.SystemColors.Control; + this.labRadius_Circle.Location = new System.Drawing.Point(14, 366); + this.labRadius_Circle.Name = "labRadius_Circle"; + this.labRadius_Circle.Size = new System.Drawing.Size(115, 21); + this.labRadius_Circle.TabIndex = 58; + this.labRadius_Circle.Text = "Number"; + this.labRadius_Circle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labRadiusSet_Circle + // + this.labRadiusSet_Circle.BackColor = System.Drawing.Color.White; + this.labRadiusSet_Circle.Location = new System.Drawing.Point(135, 365); + this.labRadiusSet_Circle.Name = "labRadiusSet_Circle"; + this.labRadiusSet_Circle.Size = new System.Drawing.Size(115, 21); + this.labRadiusSet_Circle.TabIndex = 57; + this.labRadiusSet_Circle.Text = "-"; + this.labRadiusSet_Circle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labColumn_Circle + // + this.labColumn_Circle.BackColor = System.Drawing.SystemColors.Control; + this.labColumn_Circle.Location = new System.Drawing.Point(14, 341); + this.labColumn_Circle.Name = "labColumn_Circle"; + this.labColumn_Circle.Size = new System.Drawing.Size(115, 21); + this.labColumn_Circle.TabIndex = 56; + this.labColumn_Circle.Text = "Position"; + this.labColumn_Circle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labColumnSet_Circle + // + this.labColumnSet_Circle.BackColor = System.Drawing.Color.White; + this.labColumnSet_Circle.Location = new System.Drawing.Point(135, 340); + this.labColumnSet_Circle.Name = "labColumnSet_Circle"; + this.labColumnSet_Circle.Size = new System.Drawing.Size(115, 21); + this.labColumnSet_Circle.TabIndex = 55; + this.labColumnSet_Circle.Text = "-"; + this.labColumnSet_Circle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labRow_Circle + // + this.labRow_Circle.BackColor = System.Drawing.SystemColors.Control; + this.labRow_Circle.Location = new System.Drawing.Point(14, 316); + this.labRow_Circle.Name = "labRow_Circle"; + this.labRow_Circle.Size = new System.Drawing.Size(115, 21); + this.labRow_Circle.TabIndex = 54; + this.labRow_Circle.Text = "Transition"; + this.labRow_Circle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labRowSet_Circle + // + this.labRowSet_Circle.BackColor = System.Drawing.Color.White; + this.labRowSet_Circle.Location = new System.Drawing.Point(135, 315); + this.labRowSet_Circle.Name = "labRowSet_Circle"; + this.labRowSet_Circle.Size = new System.Drawing.Size(115, 21); + this.labRowSet_Circle.TabIndex = 53; + this.labRowSet_Circle.Text = "-"; + this.labRowSet_Circle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btnParaAdd_Circle + // + this.btnParaAdd_Circle.Location = new System.Drawing.Point(247, 434); + this.btnParaAdd_Circle.Name = "btnParaAdd_Circle"; + this.btnParaAdd_Circle.Size = new System.Drawing.Size(78, 43); + this.btnParaAdd_Circle.TabIndex = 52; + this.btnParaAdd_Circle.Text = "Para Add"; + this.btnParaAdd_Circle.UseVisualStyleBackColor = true; + this.btnParaAdd_Circle.Visible = false; + this.btnParaAdd_Circle.Click += new System.EventHandler(this.btnParaAdd_Circle_Click); + // + // labNumber_Circle + // + this.labNumber_Circle.BackColor = System.Drawing.SystemColors.Control; + this.labNumber_Circle.Location = new System.Drawing.Point(14, 180); + this.labNumber_Circle.Name = "labNumber_Circle"; + this.labNumber_Circle.Size = new System.Drawing.Size(115, 21); + this.labNumber_Circle.TabIndex = 51; + this.labNumber_Circle.Text = "Number"; + this.labNumber_Circle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labNumberSet_Circle + // + this.labNumberSet_Circle.BackColor = System.Drawing.Color.White; + this.labNumberSet_Circle.Location = new System.Drawing.Point(135, 179); + this.labNumberSet_Circle.Name = "labNumberSet_Circle"; + this.labNumberSet_Circle.Size = new System.Drawing.Size(115, 21); + this.labNumberSet_Circle.TabIndex = 50; + this.labNumberSet_Circle.Text = "-"; + this.labNumberSet_Circle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btnRoiHeightReset_Circle + // + this.btnRoiHeightReset_Circle.Location = new System.Drawing.Point(256, 233); + this.btnRoiHeightReset_Circle.Name = "btnRoiHeightReset_Circle"; + this.btnRoiHeightReset_Circle.Size = new System.Drawing.Size(69, 31); + this.btnRoiHeightReset_Circle.TabIndex = 49; + this.btnRoiHeightReset_Circle.Text = "Reset"; + // + // trackBar1 + // + this.trackBar1.Location = new System.Drawing.Point(137, 260); + this.trackBar1.Maximum = 2000; + this.trackBar1.Minimum = 5; + this.trackBar1.Name = "trackBar1"; + this.trackBar1.Size = new System.Drawing.Size(113, 45); + this.trackBar1.TabIndex = 48; + this.trackBar1.TickFrequency = 10; + this.trackBar1.TickStyle = System.Windows.Forms.TickStyle.None; + this.trackBar1.Value = 20; + // + // numUDRoiHeight_Circle + // + this.numUDRoiHeight_Circle.Location = new System.Drawing.Point(137, 233); + this.numUDRoiHeight_Circle.Maximum = new decimal(new int[] { + 2000, + 0, + 0, + 0}); + this.numUDRoiHeight_Circle.Name = "numUDRoiHeight_Circle"; + this.numUDRoiHeight_Circle.Size = new System.Drawing.Size(113, 21); + this.numUDRoiHeight_Circle.TabIndex = 47; + this.numUDRoiHeight_Circle.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.numUDRoiHeight_Circle.Value = new decimal(new int[] { + 20, + 0, + 0, + 0}); + // + // labPosition_Circle + // + this.labPosition_Circle.BackColor = System.Drawing.SystemColors.Control; + this.labPosition_Circle.Location = new System.Drawing.Point(14, 155); + this.labPosition_Circle.Name = "labPosition_Circle"; + this.labPosition_Circle.Size = new System.Drawing.Size(115, 21); + this.labPosition_Circle.TabIndex = 46; + this.labPosition_Circle.Text = "Position"; + this.labPosition_Circle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labPositionSet_Circle + // + this.labPositionSet_Circle.BackColor = System.Drawing.Color.White; + this.labPositionSet_Circle.Location = new System.Drawing.Point(135, 154); + this.labPositionSet_Circle.Name = "labPositionSet_Circle"; + this.labPositionSet_Circle.Size = new System.Drawing.Size(115, 21); + this.labPositionSet_Circle.TabIndex = 45; + this.labPositionSet_Circle.Text = "-"; + this.labPositionSet_Circle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labTransition_Circle + // + this.labTransition_Circle.BackColor = System.Drawing.SystemColors.Control; + this.labTransition_Circle.Location = new System.Drawing.Point(14, 130); + this.labTransition_Circle.Name = "labTransition_Circle"; + this.labTransition_Circle.Size = new System.Drawing.Size(115, 21); + this.labTransition_Circle.TabIndex = 44; + this.labTransition_Circle.Text = "Transition"; + this.labTransition_Circle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labTransitionSet_Circle + // + this.labTransitionSet_Circle.BackColor = System.Drawing.Color.White; + this.labTransitionSet_Circle.Location = new System.Drawing.Point(135, 129); + this.labTransitionSet_Circle.Name = "labTransitionSet_Circle"; + this.labTransitionSet_Circle.Size = new System.Drawing.Size(115, 21); + this.labTransitionSet_Circle.TabIndex = 43; + this.labTransitionSet_Circle.Text = "-"; + this.labTransitionSet_Circle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labInterpolation_Circle + // + this.labInterpolation_Circle.BackColor = System.Drawing.SystemColors.Control; + this.labInterpolation_Circle.Location = new System.Drawing.Point(14, 105); + this.labInterpolation_Circle.Name = "labInterpolation_Circle"; + this.labInterpolation_Circle.Size = new System.Drawing.Size(115, 21); + this.labInterpolation_Circle.TabIndex = 42; + this.labInterpolation_Circle.Text = "Interpolation"; + this.labInterpolation_Circle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labInterpolationSet_Circle + // + this.labInterpolationSet_Circle.BackColor = System.Drawing.Color.White; + this.labInterpolationSet_Circle.Location = new System.Drawing.Point(135, 104); + this.labInterpolationSet_Circle.Name = "labInterpolationSet_Circle"; + this.labInterpolationSet_Circle.Size = new System.Drawing.Size(115, 21); + this.labInterpolationSet_Circle.TabIndex = 41; + this.labInterpolationSet_Circle.Text = "-"; + this.labInterpolationSet_Circle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labROIHeight_Circle + // + this.labROIHeight_Circle.BackColor = System.Drawing.SystemColors.Control; + this.labROIHeight_Circle.Location = new System.Drawing.Point(14, 231); + this.labROIHeight_Circle.Name = "labROIHeight_Circle"; + this.labROIHeight_Circle.Size = new System.Drawing.Size(115, 21); + this.labROIHeight_Circle.TabIndex = 40; + this.labROIHeight_Circle.Text = "ROI Height"; + this.labROIHeight_Circle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labROIWidth_Circle + // + this.labROIWidth_Circle.BackColor = System.Drawing.SystemColors.Control; + this.labROIWidth_Circle.Location = new System.Drawing.Point(14, 206); + this.labROIWidth_Circle.Name = "labROIWidth_Circle"; + this.labROIWidth_Circle.Size = new System.Drawing.Size(115, 21); + this.labROIWidth_Circle.TabIndex = 38; + this.labROIWidth_Circle.Text = "ROI Width"; + this.labROIWidth_Circle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labROIWidthSet_Circle + // + this.labROIWidthSet_Circle.BackColor = System.Drawing.Color.White; + this.labROIWidthSet_Circle.Location = new System.Drawing.Point(135, 205); + this.labROIWidthSet_Circle.Name = "labROIWidthSet_Circle"; + this.labROIWidthSet_Circle.Size = new System.Drawing.Size(115, 21); + this.labROIWidthSet_Circle.TabIndex = 37; + this.labROIWidthSet_Circle.Text = "-"; + this.labROIWidthSet_Circle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labSmoothing_Circle + // + this.labSmoothing_Circle.BackColor = System.Drawing.SystemColors.Control; + this.labSmoothing_Circle.Location = new System.Drawing.Point(14, 80); + this.labSmoothing_Circle.Name = "labSmoothing_Circle"; + this.labSmoothing_Circle.Size = new System.Drawing.Size(115, 21); + this.labSmoothing_Circle.TabIndex = 36; + this.labSmoothing_Circle.Text = "Smoothing"; + this.labSmoothing_Circle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labSmoothingSet_Circle + // + this.labSmoothingSet_Circle.BackColor = System.Drawing.Color.White; + this.labSmoothingSet_Circle.Location = new System.Drawing.Point(135, 79); + this.labSmoothingSet_Circle.Name = "labSmoothingSet_Circle"; + this.labSmoothingSet_Circle.Size = new System.Drawing.Size(115, 21); + this.labSmoothingSet_Circle.TabIndex = 35; + this.labSmoothingSet_Circle.Text = "-"; + this.labSmoothingSet_Circle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labMinEdgeAmpl_Circle + // + this.labMinEdgeAmpl_Circle.BackColor = System.Drawing.SystemColors.Control; + this.labMinEdgeAmpl_Circle.Location = new System.Drawing.Point(14, 55); + this.labMinEdgeAmpl_Circle.Name = "labMinEdgeAmpl_Circle"; + this.labMinEdgeAmpl_Circle.Size = new System.Drawing.Size(115, 21); + this.labMinEdgeAmpl_Circle.TabIndex = 34; + this.labMinEdgeAmpl_Circle.Text = "Min.EdgeAmpl"; + this.labMinEdgeAmpl_Circle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labRecognitionSet_Circle + // + this.labRecognitionSet_Circle.BackColor = System.Drawing.SystemColors.Control; + this.labRecognitionSet_Circle.Location = new System.Drawing.Point(135, 29); + this.labRecognitionSet_Circle.Name = "labRecognitionSet_Circle"; + this.labRecognitionSet_Circle.Size = new System.Drawing.Size(115, 21); + this.labRecognitionSet_Circle.TabIndex = 33; + this.labRecognitionSet_Circle.Text = "Recognition"; + this.labRecognitionSet_Circle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labMinEdgeAmplSet_Circle + // + this.labMinEdgeAmplSet_Circle.BackColor = System.Drawing.Color.White; + this.labMinEdgeAmplSet_Circle.Location = new System.Drawing.Point(135, 54); + this.labMinEdgeAmplSet_Circle.Name = "labMinEdgeAmplSet_Circle"; + this.labMinEdgeAmplSet_Circle.Size = new System.Drawing.Size(115, 21); + this.labMinEdgeAmplSet_Circle.TabIndex = 32; + this.labMinEdgeAmplSet_Circle.Text = "-"; + this.labMinEdgeAmplSet_Circle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labRecognition_Circle + // + this.labRecognition_Circle.BackColor = System.Drawing.SystemColors.Control; + this.labRecognition_Circle.Location = new System.Drawing.Point(14, 29); + this.labRecognition_Circle.Name = "labRecognition_Circle"; + this.labRecognition_Circle.Size = new System.Drawing.Size(115, 21); + this.labRecognition_Circle.TabIndex = 31; + this.labRecognition_Circle.Text = "Recognition"; + this.labRecognition_Circle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // btnFitCircle + // + this.btnFitCircle.Location = new System.Drawing.Point(39, 525); + this.btnFitCircle.Name = "btnFitCircle"; + this.btnFitCircle.Size = new System.Drawing.Size(117, 65); + this.btnFitCircle.TabIndex = 3; + this.btnFitCircle.Text = "Fit Circle"; + this.btnFitCircle.UseVisualStyleBackColor = true; + this.btnFitCircle.Click += new System.EventHandler(this.btnFitCircle_Click); + // + // pnlMiddle + // + this.pnlMiddle.Controls.Add(this.viewPort); + this.pnlMiddle.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlMiddle.Location = new System.Drawing.Point(0, 0); + this.pnlMiddle.Name = "pnlMiddle"; + this.pnlMiddle.Size = new System.Drawing.Size(823, 622); + this.pnlMiddle.TabIndex = 4; + // + // viewPort + // + this.viewPort.BackColor = System.Drawing.Color.Black; + this.viewPort.BorderColor = System.Drawing.Color.Black; + this.viewPort.Dock = System.Windows.Forms.DockStyle.Fill; + this.viewPort.ImagePart = new System.Drawing.Rectangle(0, 0, 640, 480); + this.viewPort.Location = new System.Drawing.Point(0, 0); + this.viewPort.Name = "viewPort"; + this.viewPort.Size = new System.Drawing.Size(823, 622); + this.viewPort.TabIndex = 0; + this.viewPort.WindowSize = new System.Drawing.Size(823, 622); + this.viewPort.HMouseDown += new HalconDotNet.HMouseEventHandler(this.viewPort_HMouseDown); + // + // txtMinEdgeAmplSet + // + this.txtMinEdgeAmplSet.Location = new System.Drawing.Point(246, 55); + this.txtMinEdgeAmplSet.Name = "txtMinEdgeAmplSet"; + this.txtMinEdgeAmplSet.Size = new System.Drawing.Size(86, 21); + this.txtMinEdgeAmplSet.TabIndex = 61; + // + // txtSmoothingSet + // + this.txtSmoothingSet.Location = new System.Drawing.Point(246, 81); + this.txtSmoothingSet.Name = "txtSmoothingSet"; + this.txtSmoothingSet.Size = new System.Drawing.Size(86, 21); + this.txtSmoothingSet.TabIndex = 62; + // + // txtInterpolationSet + // + this.txtInterpolationSet.Location = new System.Drawing.Point(246, 106); + this.txtInterpolationSet.Name = "txtInterpolationSet"; + this.txtInterpolationSet.Size = new System.Drawing.Size(86, 21); + this.txtInterpolationSet.TabIndex = 63; + // + // txtNumberSet + // + this.txtNumberSet.Location = new System.Drawing.Point(246, 181); + this.txtNumberSet.Name = "txtNumberSet"; + this.txtNumberSet.Size = new System.Drawing.Size(86, 21); + this.txtNumberSet.TabIndex = 66; + // + // txtPositionSet + // + this.txtPositionSet.Location = new System.Drawing.Point(246, 155); + this.txtPositionSet.Name = "txtPositionSet"; + this.txtPositionSet.Size = new System.Drawing.Size(86, 21); + this.txtPositionSet.TabIndex = 65; + // + // txtTransitionSet + // + this.txtTransitionSet.Location = new System.Drawing.Point(246, 130); + this.txtTransitionSet.Name = "txtTransitionSet"; + this.txtTransitionSet.Size = new System.Drawing.Size(86, 21); + this.txtTransitionSet.TabIndex = 64; + // + // txtROIWidthSet + // + this.txtROIWidthSet.Location = new System.Drawing.Point(246, 207); + this.txtROIWidthSet.Name = "txtROIWidthSet"; + this.txtROIWidthSet.Size = new System.Drawing.Size(86, 21); + this.txtROIWidthSet.TabIndex = 67; + // + // frmFitCircleAndLine + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1183, 714); + this.Controls.Add(this.pnlMiddle); + this.Controls.Add(this.plnLeft); + this.Controls.Add(this.plnBottom); + this.Name = "frmFitCircleAndLine"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "frmFitCircleAndLine"; + this.Load += new System.EventHandler(this.frmFitCircleAndLine_Load); + this.plnBottom.ResumeLayout(false); + this.pnlBtMiddle.ResumeLayout(false); + this.gbxOption.ResumeLayout(false); + this.pnlBtRight.ResumeLayout(false); + this.gbxAddType.ResumeLayout(false); + this.pnlBtLeft.ResumeLayout(false); + this.gbxImage.ResumeLayout(false); + this.plnLeft.ResumeLayout(false); + this.tabControl1.ResumeLayout(false); + this.tabPageLine.ResumeLayout(false); + this.gbxFitLinePara.ResumeLayout(false); + this.gbxFitLinePara.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.tBroiHeight)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numUDRoiHeight)).EndInit(); + this.tabPageCircle.ResumeLayout(false); + this.gbxFitCirclePara.ResumeLayout(false); + this.gbxFitCirclePara.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numUDRoiHeight_Circle)).EndInit(); + this.pnlMiddle.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel plnBottom; + private System.Windows.Forms.Panel plnLeft; + private System.Windows.Forms.Panel pnlMiddle; + private System.Windows.Forms.Panel pnlBtMiddle; + private System.Windows.Forms.Panel pnlBtRight; + private System.Windows.Forms.Panel pnlBtLeft; + private System.Windows.Forms.Button btnLoadImage; + private System.Windows.Forms.Button btnResetView; + private System.Windows.Forms.RadioButton RbZoom; + private System.Windows.Forms.RadioButton RbMove; + private System.Windows.Forms.RadioButton RbNone; + public HalconDotNet.HWindowControl viewPort; + private System.Windows.Forms.Button btnLineRoi; + private System.Windows.Forms.Button btnFitZoom; + private System.Windows.Forms.GroupBox gbxImage; + private System.Windows.Forms.GroupBox gbxOption; + private System.Windows.Forms.GroupBox gbxAddType; + private System.Windows.Forms.Button btnCircleRoi; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPageLine; + private System.Windows.Forms.Button btnLoadConfige_Line; + private System.Windows.Forms.GroupBox gbxFitLinePara; + private System.Windows.Forms.Label labColumnEnd; + private System.Windows.Forms.Label labColumnEndSet; + private System.Windows.Forms.Label labRowEnd; + private System.Windows.Forms.Label labRowEndSet; + private System.Windows.Forms.Label labColumnBegin; + private System.Windows.Forms.Label labColumnBeginSet; + private System.Windows.Forms.Label labRowBegin; + private System.Windows.Forms.Label labRowBeginSet; + private System.Windows.Forms.Label labNumber; + private System.Windows.Forms.Label labNumberSet; + private System.Windows.Forms.Button btnRoiHeightReset_Line; + private System.Windows.Forms.TrackBar tBroiHeight; + private System.Windows.Forms.NumericUpDown numUDRoiHeight; + private System.Windows.Forms.Label labPosition; + private System.Windows.Forms.Label labPositionSet; + private System.Windows.Forms.Label labTransition; + private System.Windows.Forms.Label labTransitionSet; + private System.Windows.Forms.Label labInterpolation; + private System.Windows.Forms.Label labInterpolationSet; + private System.Windows.Forms.Label labROIHeight; + private System.Windows.Forms.Label labROIWidth; + private System.Windows.Forms.Label labROIWidthSet; + private System.Windows.Forms.Label labSmoothing; + private System.Windows.Forms.Label labSmoothingSet; + private System.Windows.Forms.Label labMinEdgeAmpl; + private System.Windows.Forms.Label labRecognitionSet; + private System.Windows.Forms.Label labMinEdgeAmplSet; + private System.Windows.Forms.Label labRecognition; + private System.Windows.Forms.Button btnFitLine; + private System.Windows.Forms.TabPage tabPageCircle; + private System.Windows.Forms.Button btnLoadConfige_Circle; + private System.Windows.Forms.GroupBox gbxFitCirclePara; + private System.Windows.Forms.Label labNumber_Circle; + private System.Windows.Forms.Label labNumberSet_Circle; + private System.Windows.Forms.Button btnRoiHeightReset_Circle; + private System.Windows.Forms.TrackBar trackBar1; + private System.Windows.Forms.NumericUpDown numUDRoiHeight_Circle; + private System.Windows.Forms.Label labPosition_Circle; + private System.Windows.Forms.Label labPositionSet_Circle; + private System.Windows.Forms.Label labTransition_Circle; + private System.Windows.Forms.Label labTransitionSet_Circle; + private System.Windows.Forms.Label labInterpolation_Circle; + private System.Windows.Forms.Label labInterpolationSet_Circle; + private System.Windows.Forms.Label labROIHeight_Circle; + private System.Windows.Forms.Label labROIWidth_Circle; + private System.Windows.Forms.Label labROIWidthSet_Circle; + private System.Windows.Forms.Label labSmoothing_Circle; + private System.Windows.Forms.Label labSmoothingSet_Circle; + private System.Windows.Forms.Label labMinEdgeAmpl_Circle; + private System.Windows.Forms.Label labRecognitionSet_Circle; + private System.Windows.Forms.Label labMinEdgeAmplSet_Circle; + private System.Windows.Forms.Label labRecognition_Circle; + private System.Windows.Forms.Button btnFitCircle; + private System.Windows.Forms.Button btnParaAdd; + private System.Windows.Forms.Button btnParaAdd_Circle; + private System.Windows.Forms.Label labRadius_Circle; + private System.Windows.Forms.Label labRadiusSet_Circle; + private System.Windows.Forms.Label labColumn_Circle; + private System.Windows.Forms.Label labColumnSet_Circle; + private System.Windows.Forms.Label labRow_Circle; + private System.Windows.Forms.Label labRowSet_Circle; + private System.Windows.Forms.Button btnFrmMeasure; + private System.Windows.Forms.TextBox txtROIWidthSet; + private System.Windows.Forms.TextBox txtNumberSet; + private System.Windows.Forms.TextBox txtPositionSet; + private System.Windows.Forms.TextBox txtTransitionSet; + private System.Windows.Forms.TextBox txtInterpolationSet; + private System.Windows.Forms.TextBox txtSmoothingSet; + private System.Windows.Forms.TextBox txtMinEdgeAmplSet; + } +} \ No newline at end of file diff --git a/HalconTools/frmFitCircleAndLine.cs b/HalconTools/frmFitCircleAndLine.cs new file mode 100644 index 0000000..1c2e364 --- /dev/null +++ b/HalconTools/frmFitCircleAndLine.cs @@ -0,0 +1,512 @@ +锘縰sing System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.IO; +using System.Text; +using System.Windows.Forms; +using HalconDotNet; + +namespace HalconTools +{ + public partial class frmFitCircleAndLine : Form + { + public frmFitCircleAndLine() + { + InitializeComponent(); + Init(); + } + + ROICircle roi = new ROICircle(); + ROILine roi2 = new ROILine(); + + private HImage mImage; + public frmFitCircleAndLine(JobTool tool,HImage image) + { + InitializeComponent(); + + Init(); + + //鍥介檯鍖� + ResourceCulture.SetCurrentCulture("zh-CN"); + ResourceCulture.SetLanguage((Control)this); + + mImage = image; + mFitAssistant.SetImage(image); + mFitAssistant.UpdateImage(); + + switch (tool.type) + { + case ToolType.FindCircle: + + if (tool.fitCircleParam == null) + { + fitCircleParamSet = new HalconTools.MeasureParamSave(); + fitCircleParamSet = fitCircleParamSet.Load(System.Windows.Forms.Application.StartupPath + "\\MeasureConfige\\MeasureConfige.xml"); + + showFitCircleParam(fitCircleParamSet); + } + else + { + CircleParam = tool.fitCircleParam; + + fitCircleParamSet = new MeasureParamSave(); + + fitCircleParamSet.hv_measure_Length1 = tool.fitCircleParam.hv_measure_Length1; + fitCircleParamSet.hv_measure_Length2 = tool.fitCircleParam.hv_measure_Length2; + fitCircleParamSet.hv_measure_sigma = tool.fitCircleParam.hv_measure_sigma; + fitCircleParamSet.hv_measure_position = tool.fitCircleParam.hv_measure_position; + fitCircleParamSet.hv_measure_transition = tool.fitCircleParam.hv_measure_transition; + fitCircleParamSet.hv_measure_number = (int)tool.fitCircleParam.hv_measure_number; + fitCircleParamSet.hv_measure_threshold = tool.fitCircleParam.hv_measure_threshold; + fitCircleParamSet.hv_measure_interpolation = tool.fitCircleParam.hv_measure_interpolation; + + showFitCircleParam(fitCircleParamSet); + + mFitAssistant.viewController.resetAll(); + mFitAssistant.viewController.repaint(); + + mFitAssistant.roiController.setROIShape(roi); + roi.hradius = tool.fitCircleParam.hv_Radius; + roi.midR = tool.fitCircleParam.hv_RowCenter; + roi.midC = tool.fitCircleParam.hv_ColumnCenter; + + try + { + mFitAssistant.roiController.mouseDownAction(roi.midC, roi.midR); + } + catch (Exception ex) + { + + } + } + + break; + + case ToolType.FindLine: + + if (tool.fitLineParam == null) + { + fitLineParamSet = new HalconTools.MeasureParamSave(); + fitLineParamSet = fitLineParamSet.Load(System.Windows.Forms.Application.StartupPath + "\\MeasureConfige\\MeasureConfige.xml"); + + showFitLineParam(fitLineParamSet); + } + else + { + LineParam = tool.fitLineParam; + + fitLineParamSet = new MeasureParamSave(); + + fitLineParamSet.hv_measure_Length1 = tool.fitLineParam.hv_measure_Length1; + fitLineParamSet.hv_measure_Length2 = tool.fitLineParam.hv_measure_Length2; + fitLineParamSet.hv_measure_sigma = tool.fitLineParam.hv_measure_sigma; + fitLineParamSet.hv_measure_position = tool.fitLineParam.hv_measure_position; + fitLineParamSet.hv_measure_transition = tool.fitLineParam.hv_measure_transition; + fitLineParamSet.hv_measure_number = (int)tool.fitLineParam.hv_measure_number; + fitLineParamSet.hv_measure_threshold = tool.fitLineParam.hv_measure_threshold; + fitLineParamSet.hv_measure_interpolation = tool.fitLineParam.hv_measure_interpolation; + + showFitLineParam(fitLineParamSet); + + mFitAssistant.viewController.resetAll(); + mFitAssistant.viewController.repaint(); + mFitAssistant.roiController.setROIShape(roi2); + + roi2.hcol = (tool.fitLineParam.hv_ColumnEnd - tool.fitLineParam.hv_ColumnBegin) / 2; + roi2.hrow = (tool.fitLineParam.hv_RowEnd - tool.fitLineParam.hv_RowBegin) / 2; + roi2.midR = (tool.fitLineParam.hv_RowBegin + tool.fitLineParam.hv_RowEnd) / 2; + roi2.midC = (tool.fitLineParam.hv_ColumnBegin + tool.fitLineParam.hv_ColumnEnd) / 2; + + try + { + mFitAssistant.roiController.mouseDownAction(roi2.midC, roi2.midR); + } + catch (Exception ex) + { + + } + + } + + break; + } + } + + public frmFitCircleAndLine(string name) + { + InitializeComponent(); + ResourceCulture.SetCurrentCulture(name); + ResourceCulture.SetLanguage((Control)this); + + Init(); + } + + /* base variables */ + //public HWndCtrl viewController; + //public ROIController roiController; + + private HalconTools.FitAssistant mFitAssistant; + + + private void frmFitCircleAndLine_Load(object sender, EventArgs e) + { + + } + + private void btnLoadImage_Click(object sender, EventArgs e) + { + OpenFileDialog imagePath = new OpenFileDialog(); + imagePath.Filter = "*.jpg,*.jpeg,*.bmp,*.gif,*.ico,*.png,*.tif,*.wmf|*.jpg;*.jpeg;*.bmp;*.gif;*.ico;*.png;*.tif;*.wmf"; + + if (imagePath.ShowDialog() == DialogResult.OK) + { + if (!mFitAssistant.SetImage(imagePath.FileName)) + { + return; + } + + mFitAssistant.UpdateImage(); + + } + } + + private void Init() + { + mFitAssistant = new FitAssistant(viewPort); + + mFitAssistant.FitLineDone += new FitLineDelegate(mFitAssistant_FitLineDone); + + mFitAssistant.FitCircleDone += new FitCircleDelegate(mFitAssistant_FitCircleDone); + } + + void mFitAssistant_FitCircleDone(object sender, HImage image, FitCircleResult result) + { + mFitAssistant.FitCircleGraphics(mFitAssistant.viewController, image, result); + } + + void mFitAssistant_FitLineDone(object sender, HImage image, FitLineResult result) + { + //throw new NotImplementedException(); + + mFitAssistant.FitLineGraphics(mFitAssistant.viewController, image, result); + } + + private void RbNone_CheckedChanged(object sender, EventArgs e) + { + mFitAssistant.viewController.setViewState(HWndCtrl.MODE_VIEW_NONE); + } + + private void RbMove_CheckedChanged(object sender, EventArgs e) + { + mFitAssistant.viewController.setViewState(HWndCtrl.MODE_VIEW_MOVE); + } + + private void RbZoom_CheckedChanged(object sender, EventArgs e) + { + mFitAssistant.viewController.setViewState(HWndCtrl.MODE_VIEW_ZOOM); + } + + private void btnFitZoom_Click(object sender, EventArgs e) + { + mFitAssistant.viewController.resetWindow(); + mFitAssistant.viewController.repaint(); + } + + private void BtnResetView_Click(object sender, EventArgs e) + { + mFitAssistant.viewController.resetAll(); + mFitAssistant.viewController.repaint(); + } + + private void BtnLineRoi_Click(object sender, EventArgs e) + { + //鍏堟竻闄ゆ墍鏈塕OI + mFitAssistant.viewController.resetAll(); + mFitAssistant.viewController.repaint(); + + mFitAssistant.roiController.setROIShape(roi2); + } + + private void btnCircleRoi_Click(object sender, EventArgs e) + { + //鍏堟竻闄ゆ墍鏈塕OI + mFitAssistant.viewController.resetAll(); + mFitAssistant.viewController.repaint(); + + mFitAssistant.roiController.setROIShape(roi); + } + + public FitLineParam LineParam = new FitLineParam(); + + private void btnFitLine_Click(object sender, EventArgs e) + { + LinePosition linePosition = mFitAssistant.GetLinePosition(); + + if (linePosition == null) + { + linePosition = new LinePosition(); + linePosition.hv_ColumnBegin = roi2.col1; + linePosition.hv_ColumnEnd = roi2.col2; + linePosition.hv_RowBegin = roi2.row1; + linePosition.hv_RowEnd = roi2.row2; + } + + labRowBeginSet.Text = linePosition.hv_RowBegin.ToString(); + labColumnBeginSet.Text = linePosition.hv_ColumnBegin.ToString(); + labRowEndSet.Text = linePosition.hv_RowEnd.ToString(); + labColumnEndSet.Text = linePosition.hv_ColumnEnd.ToString(); + + LineParam.hv_RowBegin = linePosition.hv_RowBegin; + LineParam.hv_ColumnBegin = linePosition.hv_ColumnBegin; + LineParam.hv_RowEnd = linePosition.hv_RowEnd; + LineParam.hv_ColumnEnd = linePosition.hv_ColumnEnd; + + //LineParam.hv_measure_Length1 = fitLineParamSet.hv_measure_Length1; + //LineParam.hv_measure_Length2 = fitLineParamSet.hv_measure_Length2; + //LineParam.hv_measure_sigma = fitLineParamSet.hv_measure_sigma; + //LineParam.hv_measure_position = fitLineParamSet.hv_measure_position; + //LineParam.hv_measure_transition = fitLineParamSet.hv_measure_transition; + //LineParam.hv_measure_number = fitLineParamSet.hv_measure_number; + //LineParam.hv_measure_threshold = fitLineParamSet.hv_measure_threshold; + //LineParam.hv_measure_interpolation = fitLineParamSet.hv_measure_interpolation; + + LineParam.hv_measure_Length1 = fitLineParamSet.hv_measure_Length1; + LineParam.hv_measure_Length2 = Convert.ToDouble(txtROIWidthSet.Text); + LineParam.hv_measure_sigma = Convert.ToDouble(txtSmoothingSet.Text); + LineParam.hv_measure_position = txtPositionSet.Text; + LineParam.hv_measure_transition = txtTransitionSet.Text; + LineParam.hv_measure_number = Convert.ToDouble(txtNumberSet.Text); + LineParam.hv_measure_threshold = Convert.ToDouble(txtMinEdgeAmplSet.Text); + LineParam.hv_measure_interpolation = txtInterpolationSet.Text; + + + //FitLineResult result; + + mFitAssistant.FitLine(LineParam); + } + + public FitCircleParam CircleParam = new FitCircleParam(); + + private void btnFitCircle_Click(object sender, EventArgs e) + { + CirclePosition circlePosition = mFitAssistant.GetCirClePosition(); + + if (circlePosition == null) + { + circlePosition = new CirclePosition(); + circlePosition.hv_Column = roi.col1; + circlePosition.hv_Row = roi.row1; + circlePosition.hv_Radius = roi.radius; + } + + labRowSet_Circle.Text = circlePosition.hv_Row.ToString(); + labColumnSet_Circle.Text = circlePosition.hv_Column.ToString(); + labRadiusSet_Circle.Text = circlePosition.hv_Radius.ToString(); + + CircleParam.hv_ColumnCenter = circlePosition.hv_Column; + CircleParam.hv_RowCenter = circlePosition.hv_Row; + CircleParam.hv_Radius = circlePosition.hv_Radius; + + CircleParam.hv_measure_Length1 = fitCircleParamSet.hv_measure_Length1; + CircleParam.hv_measure_Length2 = fitCircleParamSet.hv_measure_Length2; + CircleParam.hv_measure_sigma = fitCircleParamSet.hv_measure_sigma; + CircleParam.hv_measure_position = fitCircleParamSet.hv_measure_position; + CircleParam.hv_measure_transition = fitCircleParamSet.hv_measure_transition; + CircleParam.hv_measure_number = fitCircleParamSet.hv_measure_number; + CircleParam.hv_measure_threshold = fitCircleParamSet.hv_measure_threshold; + CircleParam.hv_measure_interpolation = fitCircleParamSet.hv_measure_interpolation; + + mFitAssistant.FitCircle(CircleParam); + } + + HalconTools.MeasureParamSave fitLineParamSet; + private void btnLoadConfige_Line_Click(object sender, EventArgs e) + { + fitLineParamSet = new HalconTools.MeasureParamSave(); + OpenFileDialog imagePath = new OpenFileDialog(); + imagePath.Filter = "*.xml|*.xml"; + + if (imagePath.ShowDialog() == DialogResult.OK) + { + + fitLineParamSet = fitLineParamSet.Load(imagePath.FileName); + + showFitLineParam(fitLineParamSet); + } + } + + + private void showFitLineParam(HalconTools.MeasureParamSave param) + { + this.labMinEdgeAmplSet.Text = param.hv_measure_threshold.ToString(); + this.labSmoothingSet.Text = param.hv_measure_sigma.ToString(); + this.labInterpolationSet.Text = param.hv_measure_interpolation; + this.labTransitionSet.Text = param.hv_measure_transition; + this.labPositionSet.Text = param.hv_measure_position; + this.labNumberSet.Text = param.hv_measure_number.ToString(); + this.labROIWidthSet.Text = param.hv_measure_Length2.ToString(); + this.numUDRoiHeight.Value = Convert.ToDecimal( param.hv_measure_Length1); + + this.txtMinEdgeAmplSet.Text = param.hv_measure_threshold.ToString(); + this.txtSmoothingSet.Text = param.hv_measure_sigma.ToString(); + this.txtInterpolationSet.Text = param.hv_measure_interpolation; + this.txtTransitionSet.Text = param.hv_measure_transition; + this.txtPositionSet.Text = param.hv_measure_position; + this.txtNumberSet.Text = param.hv_measure_number.ToString(); + this.txtROIWidthSet.Text = param.hv_measure_Length2.ToString(); + } + + private void viewPort_HMouseDown(object sender, HMouseEventArgs e) + { + LinePosition linePosition = mFitAssistant.GetLinePosition(); + CirclePosition circlePosition = mFitAssistant.GetCirClePosition(); + + if (linePosition != null && tabControl1.SelectedIndex == 0) + { + labRowBeginSet.Text = linePosition.hv_RowBegin.ToString(); + labColumnBeginSet.Text = linePosition.hv_ColumnBegin.ToString(); + labRowEndSet.Text = linePosition.hv_RowEnd.ToString(); + labColumnEndSet.Text = linePosition.hv_ColumnEnd.ToString(); + } + else + { + labRowBeginSet.Text = "-"; + labColumnBeginSet.Text = "-"; + labRowEndSet.Text = "-"; + labColumnEndSet.Text = "-"; + } + + if (circlePosition != null && tabControl1.SelectedIndex == 1) + { + //labRowBeginSet.Text = linePosition.hv_RowBegin.ToString(); + //labColumnBeginSet.Text = linePosition.hv_ColumnBegin.ToString(); + //labRowEndSet.Text = linePosition.hv_RowEnd.ToString(); + //labColumnEndSet.Text = linePosition.hv_ColumnEnd.ToString(); + } + else + { + labRowBeginSet.Text = "-"; + labColumnBeginSet.Text = "-"; + labRowEndSet.Text = "-"; + labColumnEndSet.Text = "-"; + } + + } + + HalconTools.MeasureParamSave fitCircleParamSet; + private void btnLoadConfige_Circle_Click(object sender, EventArgs e) + { + fitCircleParamSet = new HalconTools.MeasureParamSave(); + OpenFileDialog imagePath = new OpenFileDialog(); + imagePath.Filter = "*.xml|*.xml"; + + if (imagePath.ShowDialog() == DialogResult.OK) + { + fitCircleParamSet = fitCircleParamSet.Load(imagePath.FileName); + + showFitCircleParam(fitCircleParamSet); + } + } + + private void showFitCircleParam(HalconTools.MeasureParamSave param) + { + this.labMinEdgeAmplSet_Circle.Text = param.hv_measure_threshold.ToString(); + this.labSmoothingSet_Circle.Text = param.hv_measure_sigma.ToString(); + this.labInterpolationSet_Circle.Text = param.hv_measure_interpolation; + this.labTransitionSet_Circle.Text = param.hv_measure_transition; + this.labPositionSet_Circle.Text = param.hv_measure_position; + this.labNumberSet_Circle.Text = param.hv_measure_number.ToString(); + this.labROIWidthSet_Circle.Text = param.hv_measure_Length2.ToString(); + this.numUDRoiHeight_Circle.Value = Convert.ToDecimal(param.hv_measure_Length1); + } + + private void numUDRoiHeight_ValueChanged(object sender, EventArgs e) + { + + } + + private void btnParaAdd_Click(object sender, EventArgs e) + { + string Path = Application.StartupPath + "\\FitConfig"; + if (!Directory.Exists(Path)) + { + Directory.CreateDirectory(Path); + } + Path += "\\fitLineConfig.xml"; + + List<FitLineParam> flp = new List<FitLineParam>(); + SerializeFileTool<List<FitLineParam>> cfg = new SerializeFileTool<List<FitLineParam>>(); + flp = cfg.GetConfig(Path); + + #region 鑾峰彇鍙傛暟 + FitLineParam LineParam = new FitLineParam(); + + LineParam.hv_RowBegin = Convert.ToDouble(labRowBeginSet.Text); + LineParam.hv_ColumnBegin = Convert.ToDouble(labColumnBeginSet.Text); + LineParam.hv_RowEnd = Convert.ToDouble(labRowEndSet.Text); + LineParam.hv_ColumnEnd = Convert.ToDouble(labColumnEndSet.Text); + + LineParam.hv_measure_Length1 = fitLineParamSet.hv_measure_Length1; + LineParam.hv_measure_Length2 = fitLineParamSet.hv_measure_Length2; + LineParam.hv_measure_sigma = fitLineParamSet.hv_measure_sigma; + LineParam.hv_measure_position = fitLineParamSet.hv_measure_position; + LineParam.hv_measure_transition = fitLineParamSet.hv_measure_transition; + LineParam.hv_measure_number = fitLineParamSet.hv_measure_number; + LineParam.hv_measure_threshold = fitLineParamSet.hv_measure_threshold; + LineParam.hv_measure_interpolation = fitLineParamSet.hv_measure_interpolation; + #endregion + + if (flp == null) flp = new List<FitLineParam>(); + flp.Add(LineParam); + + cfg.SetConfig(Path, flp); + } + + private void btnParaAdd_Circle_Click(object sender, EventArgs e) + { + string Path = Application.StartupPath + "\\FitConfig"; + if (!Directory.Exists(Path)) + { + Directory.CreateDirectory(Path); + } + Path += "\\fitCircleConfig.xml"; + + List<FitCircleParam> fcp = new List<FitCircleParam>(); + SerializeFileTool<List<FitCircleParam>> cfg = new SerializeFileTool<List<FitCircleParam>>(); + fcp = cfg.GetConfig(Path); + + #region 鑾峰彇鍙傛暟 + CirclePosition circlePosition = mFitAssistant.GetCirClePosition(); + FitCircleParam CircleParam = new FitCircleParam(); + + CircleParam.hv_ColumnCenter = Convert.ToDouble(labColumnSet_Circle.Text); + CircleParam.hv_RowCenter = Convert.ToDouble(labRowSet_Circle.Text); + CircleParam.hv_Radius = Convert.ToDouble(labRadiusSet_Circle.Text); + + CircleParam.hv_measure_Length1 = fitCircleParamSet.hv_measure_Length1; + CircleParam.hv_measure_Length2 = fitCircleParamSet.hv_measure_Length2; + CircleParam.hv_measure_sigma = fitCircleParamSet.hv_measure_sigma; + CircleParam.hv_measure_position = fitCircleParamSet.hv_measure_position; + CircleParam.hv_measure_transition = fitCircleParamSet.hv_measure_transition; + CircleParam.hv_measure_number = fitCircleParamSet.hv_measure_number; + CircleParam.hv_measure_threshold = fitCircleParamSet.hv_measure_threshold; + CircleParam.hv_measure_interpolation = fitCircleParamSet.hv_measure_interpolation; + #endregion + + if (fcp == null) fcp = new List<FitCircleParam>(); + fcp.Add(CircleParam); + + cfg.SetConfig(Path, fcp); + } + + private void btnFrmMeasure_Click(object sender, EventArgs e) + { + frmMeasureAssistant frmMeasure = new frmMeasureAssistant(mImage); + frmMeasure.ShowDialog(); + } + + } +} diff --git a/HalconTools/frmFitCircleAndLine.resx b/HalconTools/frmFitCircleAndLine.resx new file mode 100644 index 0000000..19dc0dd --- /dev/null +++ b/HalconTools/frmFitCircleAndLine.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/HalconTools/frmJobManager.Designer.cs b/HalconTools/frmJobManager.Designer.cs new file mode 100644 index 0000000..e087db7 --- /dev/null +++ b/HalconTools/frmJobManager.Designer.cs @@ -0,0 +1,270 @@ +锘縩amespace HalconTools +{ + partial class frmJobManager + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.labTools = new System.Windows.Forms.Label(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.btnParaModify = new System.Windows.Forms.Button(); + this.cmbToolType = new System.Windows.Forms.ComboBox(); + this.label3 = new System.Windows.Forms.Label(); + this.cmbTools = new System.Windows.Forms.ComboBox(); + this.label2 = new System.Windows.Forms.Label(); + this.btnSaveJobs = new System.Windows.Forms.Button(); + this.btnDelTool = new System.Windows.Forms.Button(); + this.btnAddTool = new System.Windows.Forms.Button(); + this.cmbJobName = new System.Windows.Forms.ComboBox(); + this.hWindowControl1 = new HalconDotNet.HWindowControl(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.btnAddJob = new System.Windows.Forms.Button(); + this.txtJobName = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.btnLoadImage = new System.Windows.Forms.Button(); + this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + this.groupBox1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.SuspendLayout(); + // + // labTools + // + this.labTools.AutoSize = true; + this.labTools.Location = new System.Drawing.Point(18, 64); + this.labTools.Name = "labTools"; + this.labTools.Size = new System.Drawing.Size(35, 12); + this.labTools.TabIndex = 1; + this.labTools.Text = "Tools"; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.btnParaModify); + this.groupBox1.Controls.Add(this.cmbToolType); + this.groupBox1.Controls.Add(this.label3); + this.groupBox1.Controls.Add(this.cmbTools); + this.groupBox1.Controls.Add(this.label2); + this.groupBox1.Controls.Add(this.btnSaveJobs); + this.groupBox1.Controls.Add(this.btnDelTool); + this.groupBox1.Controls.Add(this.btnAddTool); + this.groupBox1.Controls.Add(this.cmbJobName); + this.groupBox1.Controls.Add(this.labTools); + this.groupBox1.Location = new System.Drawing.Point(375, 17); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(320, 203); + this.groupBox1.TabIndex = 2; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Jobs"; + // + // btnParaModify + // + this.btnParaModify.Location = new System.Drawing.Point(20, 136); + this.btnParaModify.Name = "btnParaModify"; + this.btnParaModify.Size = new System.Drawing.Size(75, 34); + this.btnParaModify.TabIndex = 10; + this.btnParaModify.Text = "鍙傛暟淇敼"; + this.btnParaModify.UseVisualStyleBackColor = true; + this.btnParaModify.Click += new System.EventHandler(this.btnParaModify_Click); + // + // cmbToolType + // + this.cmbToolType.FormattingEnabled = true; + this.cmbToolType.Location = new System.Drawing.Point(84, 100); + this.cmbToolType.Name = "cmbToolType"; + this.cmbToolType.Size = new System.Drawing.Size(121, 20); + this.cmbToolType.TabIndex = 9; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(18, 103); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(53, 12); + this.label3.TabIndex = 8; + this.label3.Text = "ToolType"; + // + // cmbTools + // + this.cmbTools.FormattingEnabled = true; + this.cmbTools.Location = new System.Drawing.Point(84, 61); + this.cmbTools.Name = "cmbTools"; + this.cmbTools.Size = new System.Drawing.Size(121, 20); + this.cmbTools.TabIndex = 7; + this.cmbTools.SelectedIndexChanged += new System.EventHandler(this.cmbTools_SelectedIndexChanged); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(18, 23); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(23, 12); + this.label2.TabIndex = 6; + this.label2.Text = "Job"; + // + // btnSaveJobs + // + this.btnSaveJobs.Location = new System.Drawing.Point(119, 136); + this.btnSaveJobs.Name = "btnSaveJobs"; + this.btnSaveJobs.Size = new System.Drawing.Size(75, 34); + this.btnSaveJobs.TabIndex = 5; + this.btnSaveJobs.Text = "淇濆瓨淇敼"; + this.btnSaveJobs.UseVisualStyleBackColor = true; + this.btnSaveJobs.Click += new System.EventHandler(this.btnSaveJobs_Click); + // + // btnDelTool + // + this.btnDelTool.Location = new System.Drawing.Point(223, 65); + this.btnDelTool.Name = "btnDelTool"; + this.btnDelTool.Size = new System.Drawing.Size(75, 35); + this.btnDelTool.TabIndex = 4; + this.btnDelTool.Text = "Del Tool"; + this.btnDelTool.UseVisualStyleBackColor = true; + this.btnDelTool.Click += new System.EventHandler(this.btnDelTool_Click); + // + // btnAddTool + // + this.btnAddTool.Location = new System.Drawing.Point(223, 23); + this.btnAddTool.Name = "btnAddTool"; + this.btnAddTool.Size = new System.Drawing.Size(75, 36); + this.btnAddTool.TabIndex = 3; + this.btnAddTool.Text = "Add Tool"; + this.btnAddTool.UseVisualStyleBackColor = true; + this.btnAddTool.Click += new System.EventHandler(this.btnAddTool_Click); + // + // cmbJobName + // + this.cmbJobName.FormattingEnabled = true; + this.cmbJobName.Location = new System.Drawing.Point(84, 23); + this.cmbJobName.Name = "cmbJobName"; + this.cmbJobName.Size = new System.Drawing.Size(121, 20); + this.cmbJobName.TabIndex = 2; + this.cmbJobName.SelectedIndexChanged += new System.EventHandler(this.cmbJobName_SelectedIndexChanged); + // + // hWindowControl1 + // + this.hWindowControl1.BackColor = System.Drawing.Color.Black; + this.hWindowControl1.BorderColor = System.Drawing.Color.Black; + this.hWindowControl1.ImagePart = new System.Drawing.Rectangle(0, 0, 640, 480); + this.hWindowControl1.Location = new System.Drawing.Point(12, 17); + this.hWindowControl1.Name = "hWindowControl1"; + this.hWindowControl1.Size = new System.Drawing.Size(357, 315); + this.hWindowControl1.TabIndex = 3; + this.hWindowControl1.WindowSize = new System.Drawing.Size(357, 315); + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.btnAddJob); + this.groupBox2.Controls.Add(this.txtJobName); + this.groupBox2.Controls.Add(this.label1); + this.groupBox2.Location = new System.Drawing.Point(375, 232); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(320, 100); + this.groupBox2.TabIndex = 4; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "new Job"; + // + // btnAddJob + // + this.btnAddJob.Location = new System.Drawing.Point(223, 38); + this.btnAddJob.Name = "btnAddJob"; + this.btnAddJob.Size = new System.Drawing.Size(75, 23); + this.btnAddJob.TabIndex = 2; + this.btnAddJob.Text = "Add Job"; + this.btnAddJob.UseVisualStyleBackColor = true; + this.btnAddJob.Click += new System.EventHandler(this.btnAddJob_Click); + // + // txtJobName + // + this.txtJobName.Location = new System.Drawing.Point(94, 40); + this.txtJobName.Name = "txtJobName"; + this.txtJobName.Size = new System.Drawing.Size(100, 21); + this.txtJobName.TabIndex = 1; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(21, 43); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(53, 12); + this.label1.TabIndex = 0; + this.label1.Text = "Job Name"; + // + // btnLoadImage + // + this.btnLoadImage.Location = new System.Drawing.Point(12, 349); + this.btnLoadImage.Name = "btnLoadImage"; + this.btnLoadImage.Size = new System.Drawing.Size(75, 23); + this.btnLoadImage.TabIndex = 5; + this.btnLoadImage.Text = "鍔犺浇鍥剧墖"; + this.btnLoadImage.UseVisualStyleBackColor = true; + this.btnLoadImage.Click += new System.EventHandler(this.btnLoadImage_Click); + // + // openFileDialog1 + // + this.openFileDialog1.FileName = "openFileDialog1"; + // + // frmJobManager + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(745, 399); + this.Controls.Add(this.btnLoadImage); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.hWindowControl1); + this.Controls.Add(this.groupBox1); + this.Name = "frmJobManager"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "frmJobManager"; + this.Load += new System.EventHandler(this.frmJobManager_Load); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label labTools; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.ComboBox cmbJobName; + private System.Windows.Forms.Button btnDelTool; + private System.Windows.Forms.Button btnAddTool; + private HalconDotNet.HWindowControl hWindowControl1; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button btnAddJob; + private System.Windows.Forms.TextBox txtJobName; + private System.Windows.Forms.Button btnSaveJobs; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.ComboBox cmbTools; + private System.Windows.Forms.ComboBox cmbToolType; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Button btnParaModify; + private System.Windows.Forms.Button btnLoadImage; + private System.Windows.Forms.OpenFileDialog openFileDialog1; + } +} \ No newline at end of file diff --git a/HalconTools/frmJobManager.cs b/HalconTools/frmJobManager.cs new file mode 100644 index 0000000..adbfa89 --- /dev/null +++ b/HalconTools/frmJobManager.cs @@ -0,0 +1,237 @@ +锘縰sing System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using System.IO; +using HalconDotNet; + + +namespace HalconTools +{ + public partial class frmJobManager : Form + { + public SerializeFileTool<List<Job>> sft = new SerializeFileTool<List<Job>>(); + public List<Job> jobs = new List<Job>(); + public HImage MainImage = null; + + public frmJobManager() + { + InitializeComponent(); + } + + private void btnAddJob_Click(object sender, EventArgs e) + { + Job job = new Job(); + job.name = txtJobName.Text; + job.tools = new List<JobTool>(); + JobTool jobTool = new JobTool(); + jobTool.type = ToolType.FindLine; + job.tools.Add(jobTool); + jobs.Add(job); + + string path = Application.StartupPath + "\\JobConfige"; + if (!Directory.Exists(path)) Directory.CreateDirectory(path); + path += "\\JobConfige.xml"; + + sft.SetConfig(path, jobs); + + InitData(); + } + + private void InitData() + { + cmbTools.Items.Clear(); + cmbToolType.Items.Clear(); + cmbJobName.Items.Clear(); + + for (int i = 0; i < 4; i++) + { + cmbToolType.Items.Add((ToolType)i); + } + + jobs = sft.GetConfig(Application.StartupPath + "\\JobConfige\\JobConfige.xml"); + for (int i = 0; i < jobs.Count; i++) + { + cmbJobName.Items.Add(jobs[i].name); + } + for (int i = 0; i < jobs[0].tools.Count; i++) + { + cmbTools.Items.Add(i); + } + + cmbJobName.SelectedIndex = 0; + cmbTools.SelectedIndex = 0; + + cmbToolType.SelectedIndex = (int)jobs[0].tools[0].type; + } + + private void InitData(int jobNo,int toolNo) + { + cmbTools.Items.Clear(); + cmbToolType.Items.Clear(); + cmbJobName.Items.Clear(); + + for (int i = 0; i < 4; i++) + { + cmbToolType.Items.Add((ToolType)i); + } + jobs = sft.GetConfig(Application.StartupPath + "\\JobConfige\\JobConfige.xml"); + + for (int i = 0; i < jobs.Count; i++) + { + cmbJobName.Items.Add(jobs[i].name); + } + for (int i = 0; i < jobs[0].tools.Count; i++) + { + cmbTools.Items.Add(i); + } + + cmbJobName.SelectedIndex = jobNo; + cmbTools.SelectedIndex = toolNo; + + cmbToolType.SelectedIndex = (int)jobs[jobNo].tools[toolNo].type; + } + + private void frmJobManager_Load(object sender, EventArgs e) + { + InitData(); + } + + private void cmbTools_SelectedIndexChanged(object sender, EventArgs e) + { + int JobNo = cmbJobName.SelectedIndex; + int ToolNo = cmbTools.SelectedIndex; + cmbToolType .SelectedIndex =(int)jobs[JobNo].tools[ToolNo].type ; + } + + private void cmbJobName_SelectedIndexChanged(object sender, EventArgs e) + { + int JobNo = cmbJobName.SelectedIndex; + + cmbTools.Items.Clear(); + for (int i = 0; i < jobs[JobNo].tools.Count; i++) + { + cmbTools.Items.Add(i); + } + cmbTools.SelectedIndex = 0; + cmbToolType.SelectedIndex = (int)jobs[JobNo].tools[0].type; + } + + private void btnParaModify_Click(object sender, EventArgs e) + { + int JobNo = cmbJobName.SelectedIndex; + int ToolNo = cmbTools.SelectedIndex; + JobTool tmpTool = new JobTool(); + tmpTool.type = (ToolType)cmbToolType.SelectedIndex; + tmpTool.fitCircleParam = jobs[JobNo].tools[ToolNo].fitCircleParam; + tmpTool.fitLineParam = jobs[JobNo].tools[ToolNo].fitLineParam; + tmpTool.matchingParam = jobs[JobNo].tools[ToolNo].matchingParam; + tmpTool.modelPath = jobs[JobNo].tools[ToolNo].modelPath; + tmpTool.screwParam = jobs[JobNo].tools[ToolNo].screwParam; + + switch (tmpTool.type) + { + case ToolType.FindLine: + + if (MainImage == null) return; + frmFitCircleAndLine frmfit = new frmFitCircleAndLine(tmpTool, MainImage); + frmfit.ShowDialog(); + + tmpTool.fitCircleParam = null; + tmpTool.fitLineParam = null; + tmpTool.matchingParam = null; + tmpTool.modelPath = null; + tmpTool.fitLineParam = frmfit.LineParam; + tmpTool.screwParam = null; + + break; + + case ToolType.FindCircle: + + if (MainImage == null) return; + frmFitCircleAndLine frmfit1 = new frmFitCircleAndLine(tmpTool, MainImage); + frmfit1.ShowDialog(); + + tmpTool.fitCircleParam = null; + tmpTool.fitLineParam = null; + tmpTool.matchingParam = null; + tmpTool.modelPath = null; + tmpTool.fitCircleParam = frmfit1.CircleParam; + tmpTool.screwParam = null; + + break; + + case ToolType.Matching: + break; + + case ToolType.Screw : + + if (MainImage == null) return; + frmScrewAssistant frmScrew = new frmScrewAssistant(tmpTool, MainImage); + frmScrew.ShowDialog(); + + tmpTool.fitCircleParam = null; + tmpTool.fitLineParam = null; + tmpTool.matchingParam = null; + tmpTool.modelPath = null; + tmpTool.fitCircleParam = null; + tmpTool.screwParam = frmScrew.mScrewPara; + + break; + } + + jobs[JobNo].tools[ToolNo] = tmpTool; + } + + private void btnSaveJobs_Click(object sender, EventArgs e) + { + sft.SetConfig(Application.StartupPath + "\\JobConfige\\JobConfige.xml", jobs); + } + + private void btnAddTool_Click(object sender, EventArgs e) + { + JobTool tool = new JobTool(); + tool.type = ToolType.FindLine; + + int JobNo = cmbJobName.SelectedIndex; + jobs[JobNo].tools.Add(tool); + + sft.SetConfig(Application.StartupPath + "\\JobConfige\\JobConfige.xml", jobs); + + InitData(JobNo, jobs[JobNo].tools.Count - 1); + } + + private void btnDelTool_Click(object sender, EventArgs e) + { + int JobNo = cmbJobName.SelectedIndex; + int ToolNo = cmbTools.SelectedIndex; + + jobs[JobNo].tools.RemoveAt(ToolNo); + + sft.SetConfig(Application.StartupPath + "\\JobConfige\\JobConfige.xml", jobs); + + InitData(); + } + + private void btnLoadImage_Click(object sender, EventArgs e) + { + OpenFileDialog imagePath = new OpenFileDialog(); + imagePath.Filter = "*.jpg,*.jpeg,*.bmp,*.gif,*.ico,*.png,*.tif,*.wmf|*.jpg;*.jpeg;*.bmp;*.gif;*.ico;*.png;*.tif;*.wmf"; + + if (imagePath.ShowDialog() == DialogResult.OK) + { + MainImage = new HImage(imagePath.FileName); + + HTuple imageWidth = null, imageHeight = null; + HOperatorSet.GetImageSize(MainImage, out imageWidth, out imageHeight); + HOperatorSet.SetPart(hWindowControl1.HalconWindow, 0, 0, imageHeight - 1, imageWidth - 1); + HOperatorSet.DispObj(MainImage, hWindowControl1.HalconWindow); + } + + } + } +} diff --git a/HalconTools/frmJobManager.resx b/HalconTools/frmJobManager.resx new file mode 100644 index 0000000..6e58fa8 --- /dev/null +++ b/HalconTools/frmJobManager.resx @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root> \ No newline at end of file diff --git a/HalconTools/frmMain.Designer.cs b/HalconTools/frmMain.Designer.cs new file mode 100644 index 0000000..08fe566 --- /dev/null +++ b/HalconTools/frmMain.Designer.cs @@ -0,0 +1,194 @@ +锘縩amespace HalconTools +{ + partial class frmMain + { + /// <summary> + /// 蹇呴渶鐨勮璁″櫒鍙橀噺銆� + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// 娓呯悊鎵�鏈夋鍦ㄤ娇鐢ㄧ殑璧勬簮銆� + /// </summary> + /// <param name="disposing">濡傛灉搴旈噴鏀炬墭绠¤祫婧愶紝涓� true锛涘惁鍒欎负 false銆�</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows 绐椾綋璁捐鍣ㄧ敓鎴愮殑浠g爜 + + /// <summary> + /// 璁捐鍣ㄦ敮鎸佹墍闇�鐨勬柟娉� - 涓嶈 + /// 浣跨敤浠g爜缂栬緫鍣ㄤ慨鏀规鏂规硶鐨勫唴瀹广�� + /// </summary> + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain)); + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.rbChinese = new System.Windows.Forms.RadioButton(); + this.rbEnglish = new System.Windows.Forms.RadioButton(); + this.hWindowControl1 = new HalconDotNet.HWindowControl(); + this.button4 = new System.Windows.Forms.Button(); + this.button5 = new System.Windows.Forms.Button(); + this.button6 = new System.Windows.Forms.Button(); + this.button7 = new System.Windows.Forms.Button(); + this.button8 = new System.Windows.Forms.Button(); + this.button9 = new System.Windows.Forms.Button(); + this.btnCalibrationForm = new System.Windows.Forms.Button(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // button1 + // + resources.ApplyResources(this.button1, "button1"); + this.button1.Name = "button1"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + resources.ApplyResources(this.button2, "button2"); + this.button2.Name = "button2"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // button3 + // + resources.ApplyResources(this.button3, "button3"); + this.button3.Name = "button3"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.rbChinese); + this.groupBox1.Controls.Add(this.rbEnglish); + resources.ApplyResources(this.groupBox1, "groupBox1"); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.TabStop = false; + // + // rbChinese + // + resources.ApplyResources(this.rbChinese, "rbChinese"); + this.rbChinese.Checked = true; + this.rbChinese.Name = "rbChinese"; + this.rbChinese.TabStop = true; + this.rbChinese.UseVisualStyleBackColor = true; + this.rbChinese.CheckedChanged += new System.EventHandler(this.rbChinese_CheckedChanged); + // + // rbEnglish + // + resources.ApplyResources(this.rbEnglish, "rbEnglish"); + this.rbEnglish.Name = "rbEnglish"; + this.rbEnglish.UseVisualStyleBackColor = true; + this.rbEnglish.CheckedChanged += new System.EventHandler(this.rbEnglish_CheckedChanged); + // + // hWindowControl1 + // + this.hWindowControl1.BackColor = System.Drawing.Color.Black; + this.hWindowControl1.BorderColor = System.Drawing.Color.Black; + this.hWindowControl1.ImagePart = new System.Drawing.Rectangle(0, 0, 640, 480); + resources.ApplyResources(this.hWindowControl1, "hWindowControl1"); + this.hWindowControl1.Name = "hWindowControl1"; + this.hWindowControl1.WindowSize = new System.Drawing.Size(592, 448); + // + // button4 + // + resources.ApplyResources(this.button4, "button4"); + this.button4.Name = "button4"; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button4_Click); + // + // button5 + // + resources.ApplyResources(this.button5, "button5"); + this.button5.Name = "button5"; + this.button5.UseVisualStyleBackColor = true; + this.button5.Click += new System.EventHandler(this.button5_Click); + // + // button6 + // + resources.ApplyResources(this.button6, "button6"); + this.button6.Name = "button6"; + this.button6.UseVisualStyleBackColor = true; + this.button6.Click += new System.EventHandler(this.button6_Click); + // + // button7 + // + resources.ApplyResources(this.button7, "button7"); + this.button7.Name = "button7"; + this.button7.UseVisualStyleBackColor = true; + this.button7.Click += new System.EventHandler(this.button7_Click); + // + // button8 + // + resources.ApplyResources(this.button8, "button8"); + this.button8.Name = "button8"; + this.button8.UseVisualStyleBackColor = true; + this.button8.Click += new System.EventHandler(this.button8_Click); + // + // button9 + // + resources.ApplyResources(this.button9, "button9"); + this.button9.Name = "button9"; + this.button9.UseVisualStyleBackColor = true; + this.button9.Click += new System.EventHandler(this.button9_Click); + // + // btnCalibrationForm + // + resources.ApplyResources(this.btnCalibrationForm, "btnCalibrationForm"); + this.btnCalibrationForm.Name = "btnCalibrationForm"; + this.btnCalibrationForm.UseVisualStyleBackColor = true; + this.btnCalibrationForm.Click += new System.EventHandler(this.btnCalibrationForm_Click); + // + // frmMain + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.btnCalibrationForm); + this.Controls.Add(this.button9); + this.Controls.Add(this.button8); + this.Controls.Add(this.button7); + this.Controls.Add(this.button6); + this.Controls.Add(this.button5); + this.Controls.Add(this.button4); + this.Controls.Add(this.hWindowControl1); + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.button3); + this.Controls.Add(this.button2); + this.Controls.Add(this.button1); + this.Name = "frmMain"; + this.Load += new System.EventHandler(this.frmMain_Load); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.RadioButton rbChinese; + private System.Windows.Forms.RadioButton rbEnglish; + private HalconDotNet.HWindowControl hWindowControl1; + private System.Windows.Forms.Button button4; + private System.Windows.Forms.Button button5; + private System.Windows.Forms.Button button6; + private System.Windows.Forms.Button button7; + private System.Windows.Forms.Button button8; + private System.Windows.Forms.Button button9; + private System.Windows.Forms.Button btnCalibrationForm; + } +} + diff --git a/HalconTools/frmMain.cs b/HalconTools/frmMain.cs new file mode 100644 index 0000000..fb0848c --- /dev/null +++ b/HalconTools/frmMain.cs @@ -0,0 +1,159 @@ +锘縰sing System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using HalconDotNet; + +namespace HalconTools +{ + public partial class frmMain : Form + { + public HImage mainImage; + public HWndCtrl viewController; + + public HalconTool ht = new HalconTool(); + + public frmMain() + { + InitializeComponent(); + } + + private void frmMain_Load(object sender, EventArgs e) + { + //mainImage = new HImage(); + //viewController = new HWndCtrl(hWindowControl1); + //viewController.resetAll(); + //viewController.setViewState(HWndCtrl.MODE_VIEW_NONE); + //viewController.addIconicVar(mainImage); + //viewController.repaint(); + + ht.resultCreater.ListenEvent += new EventHandler<ListenEventArgs>(resultCreater_ListenEvent); + } + + void resultCreater_ListenEvent(object sender, ListenEventArgs e) + { + string str = e.IData.Data.ToString(); + + switch (str) + { + case "MatchDone": + MessageBox.Show("Match Successfully"); + break; + + case "FindLineDone": + MessageBox.Show("Fit Line Successfully"); + break; + + case "FindCircleDone": + MessageBox.Show("Fit Circle Successfully"); + break; + } + } + + private void button1_Click(object sender, EventArgs e) + { + frmFitCircleAndLine fitForm = new frmFitCircleAndLine(Language); + fitForm.ShowDialog(); + } + + private void button2_Click(object sender, EventArgs e) + { + frmMeasureAssistant measureForm = new frmMeasureAssistant(); + measureForm.ShowDialog(); + } + + private void button3_Click(object sender, EventArgs e) + { + frmMatchingAssistant matchForm = new frmMatchingAssistant(); + matchForm.ShowDialog(); + } + + string Language = "zh-CN"; + private void rbChinese_CheckedChanged(object sender, EventArgs e) + { + Language = "zh-CN"; + } + + private void rbEnglish_CheckedChanged(object sender, EventArgs e) + { + Language = "en-US"; + } + + private void button4_Click(object sender, EventArgs e) + { + ht.LoadMatchingParameter(Application.StartupPath + "\\MatchingConfige\\MatchingConfige.xml"); + ht.PatterMatchWithModule("test1", mainImage, ht.matchingPara, @"C:\Users\Swbuild\Desktop\1111.shm"); + } + + private void button5_Click(object sender, EventArgs e) + { + ht.LoadFitLineParameter(Application.StartupPath + "\\MeasureConfige\\MeasureConfige.xml"); + + //---------------------------------------------------------------------------------- + MessageBox.Show("璇风敾鐩寸嚎"); + + hWindowControl1.Focus(); + HTuple hv_Row1 = null, hv_Column1 = null, hv_Row2 = null, hv_Column2 = null; + HOperatorSet.DrawLine(hWindowControl1.HalconWindow, out hv_Row1, out hv_Column1, out hv_Row2, out hv_Column2); + + MessageBox.Show(hv_Row1.ToString() + "," + hv_Column1.ToString() + "," + hv_Row2.ToString() + "," + hv_Column2.ToString()); + //----------------------------------------------------------------------------------- + + ht.fitLinePara.hv_RowBegin = hv_Row1.D; + ht.fitLinePara.hv_RowEnd = hv_Row2.D; + ht.fitLinePara.hv_ColumnBegin = hv_Column1.D; + ht.fitLinePara.hv_ColumnEnd = hv_Column2.D; + + ht.ThreadFindLine("test", mainImage, ht.fitLinePara); + + } + + private void button6_Click(object sender, EventArgs e) + { + ht.LoadFitCircleParameter(Application.StartupPath + "\\MeasureConfige\\MeasureConfige.xml"); + + //---------------------------------------------------------------------------------- + MessageBox.Show("璇风敾鍦�"); + + hWindowControl1.Focus(); + HTuple hv_Row = null, hv_Column = null, hv_Radius = null; + HOperatorSet.DrawCircle(hWindowControl1.HalconWindow, out hv_Row, out hv_Column,out hv_Radius); + + MessageBox.Show(hv_Row.ToString() + "," + hv_Column.ToString() + "," + hv_Radius.ToString()); + //----------------------------------------------------------------------------------- + + ht.fitCirclePara.hv_ColumnCenter = hv_Column; + ht.fitCirclePara.hv_RowCenter = hv_Row; + ht.fitCirclePara.hv_Radius = hv_Radius; + + ht.FindCircle("test", mainImage, ht.fitCirclePara); + } + + private void button7_Click(object sender, EventArgs e) + { + frmJobManager frmJob = new frmJobManager(); + frmJob.ShowDialog(); + } + + private void button8_Click(object sender, EventArgs e) + { + frmContourAssistant frmContour = new frmContourAssistant(); + frmContour.ShowDialog(); + } + + private void button9_Click(object sender, EventArgs e) + { + frmScrewAssistant frmScrew = new frmScrewAssistant(); + frmScrew.ShowDialog(); + } + + private void btnCalibrationForm_Click(object sender, EventArgs e) + { + frmCalibration frmCalib = new frmCalibration(); + frmCalib.ShowDialog(); + } + } +} diff --git a/HalconTools/frmMain.resx b/HalconTools/frmMain.resx new file mode 100644 index 0000000..3aeb6ff --- /dev/null +++ b/HalconTools/frmMain.resx @@ -0,0 +1,479 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="button1.Location" type="System.Drawing.Point, System.Drawing"> + <value>620, 72</value> + </data> + <data name="button1.Size" type="System.Drawing.Size, System.Drawing"> + <value>80, 40</value> + </data> + <assembly alias="mscorlib" name="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> + <data name="button1.TabIndex" type="System.Int32, mscorlib"> + <value>0</value> + </data> + <data name="button1.Text" xml:space="preserve"> + <value>Fit Form</value> + </data> + <data name=">>button1.Name" xml:space="preserve"> + <value>button1</value> + </data> + <data name=">>button1.Type" xml:space="preserve"> + <value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> + <data name=">>button1.Parent" xml:space="preserve"> + <value>$this</value> + </data> + <data name=">>button1.ZOrder" xml:space="preserve"> + <value>11</value> + </data> + <data name="button2.Location" type="System.Drawing.Point, System.Drawing"> + <value>706, 72</value> + </data> + <data name="button2.Size" type="System.Drawing.Size, System.Drawing"> + <value>80, 40</value> + </data> + <data name="button2.TabIndex" type="System.Int32, mscorlib"> + <value>1</value> + </data> + <data name="button2.Text" xml:space="preserve"> + <value>Measure Form</value> + </data> + <data name=">>button2.Name" xml:space="preserve"> + <value>button2</value> + </data> + <data name=">>button2.Type" xml:space="preserve"> + <value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> + <data name=">>button2.Parent" xml:space="preserve"> + <value>$this</value> + </data> + <data name=">>button2.ZOrder" xml:space="preserve"> + <value>10</value> + </data> + <data name="button3.Location" type="System.Drawing.Point, System.Drawing"> + <value>792, 72</value> + </data> + <data name="button3.Size" type="System.Drawing.Size, System.Drawing"> + <value>80, 40</value> + </data> + <data name="button3.TabIndex" type="System.Int32, mscorlib"> + <value>2</value> + </data> + <data name="button3.Text" xml:space="preserve"> + <value>Match Form</value> + </data> + <data name=">>button3.Name" xml:space="preserve"> + <value>button3</value> + </data> + <data name=">>button3.Type" xml:space="preserve"> + <value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> + <data name=">>button3.Parent" xml:space="preserve"> + <value>$this</value> + </data> + <data name=">>button3.ZOrder" xml:space="preserve"> + <value>9</value> + </data> + <data name="rbChinese.AutoSize" type="System.Boolean, mscorlib"> + <value>True</value> + </data> + <data name="rbChinese.Location" type="System.Drawing.Point, System.Drawing"> + <value>152, 27</value> + </data> + <data name="rbChinese.Size" type="System.Drawing.Size, System.Drawing"> + <value>47, 16</value> + </data> + <data name="rbChinese.TabIndex" type="System.Int32, mscorlib"> + <value>1</value> + </data> + <data name="rbChinese.Text" xml:space="preserve"> + <value>涓枃</value> + </data> + <data name=">>rbChinese.Name" xml:space="preserve"> + <value>rbChinese</value> + </data> + <data name=">>rbChinese.Type" xml:space="preserve"> + <value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> + <data name=">>rbChinese.Parent" xml:space="preserve"> + <value>groupBox1</value> + </data> + <data name=">>rbChinese.ZOrder" xml:space="preserve"> + <value>0</value> + </data> + <data name="rbEnglish.AutoSize" type="System.Boolean, mscorlib"> + <value>True</value> + </data> + <data name="rbEnglish.Location" type="System.Drawing.Point, System.Drawing"> + <value>33, 27</value> + </data> + <data name="rbEnglish.Size" type="System.Drawing.Size, System.Drawing"> + <value>65, 16</value> + </data> + <data name="rbEnglish.TabIndex" type="System.Int32, mscorlib"> + <value>0</value> + </data> + <data name="rbEnglish.Text" xml:space="preserve"> + <value>English</value> + </data> + <data name=">>rbEnglish.Name" xml:space="preserve"> + <value>rbEnglish</value> + </data> + <data name=">>rbEnglish.Type" xml:space="preserve"> + <value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> + <data name=">>rbEnglish.Parent" xml:space="preserve"> + <value>groupBox1</value> + </data> + <data name=">>rbEnglish.ZOrder" xml:space="preserve"> + <value>1</value> + </data> + <data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing"> + <value>620, 12</value> + </data> + <data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing"> + <value>252, 54</value> + </data> + <data name="groupBox1.TabIndex" type="System.Int32, mscorlib"> + <value>3</value> + </data> + <data name="groupBox1.Text" xml:space="preserve"> + <value>Language</value> + </data> + <data name=">>groupBox1.Name" xml:space="preserve"> + <value>groupBox1</value> + </data> + <data name=">>groupBox1.Type" xml:space="preserve"> + <value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> + <data name=">>groupBox1.Parent" xml:space="preserve"> + <value>$this</value> + </data> + <data name=">>groupBox1.ZOrder" xml:space="preserve"> + <value>8</value> + </data> + <data name="hWindowControl1.Location" type="System.Drawing.Point, System.Drawing"> + <value>12, 12</value> + </data> + <data name="hWindowControl1.Size" type="System.Drawing.Size, System.Drawing"> + <value>592, 448</value> + </data> + <data name="hWindowControl1.TabIndex" type="System.Int32, mscorlib"> + <value>4</value> + </data> + <data name=">>hWindowControl1.Name" xml:space="preserve"> + <value>hWindowControl1</value> + </data> + <data name=">>hWindowControl1.Type" xml:space="preserve"> + <value>HalconDotNet.HWindowControl, halcondotnetxl, Version=11.0.1.0, Culture=neutral, PublicKeyToken=4973bed59ddbf2b8</value> + </data> + <data name=">>hWindowControl1.Parent" xml:space="preserve"> + <value>$this</value> + </data> + <data name=">>hWindowControl1.ZOrder" xml:space="preserve"> + <value>7</value> + </data> + <data name="button4.Location" type="System.Drawing.Point, System.Drawing"> + <value>776, 423</value> + </data> + <data name="button4.Size" type="System.Drawing.Size, System.Drawing"> + <value>94, 40</value> + </data> + <data name="button4.TabIndex" type="System.Int32, mscorlib"> + <value>5</value> + </data> + <data name="button4.Text" xml:space="preserve"> + <value>鍖归厤</value> + </data> + <data name=">>button4.Name" xml:space="preserve"> + <value>button4</value> + </data> + <data name=">>button4.Type" xml:space="preserve"> + <value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> + <data name=">>button4.Parent" xml:space="preserve"> + <value>$this</value> + </data> + <data name=">>button4.ZOrder" xml:space="preserve"> + <value>6</value> + </data> + <data name="button5.Location" type="System.Drawing.Point, System.Drawing"> + <value>776, 377</value> + </data> + <data name="button5.Size" type="System.Drawing.Size, System.Drawing"> + <value>94, 40</value> + </data> + <data name="button5.TabIndex" type="System.Int32, mscorlib"> + <value>6</value> + </data> + <data name="button5.Text" xml:space="preserve"> + <value>鎵剧洿绾�</value> + </data> + <data name=">>button5.Name" xml:space="preserve"> + <value>button5</value> + </data> + <data name=">>button5.Type" xml:space="preserve"> + <value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> + <data name=">>button5.Parent" xml:space="preserve"> + <value>$this</value> + </data> + <data name=">>button5.ZOrder" xml:space="preserve"> + <value>5</value> + </data> + <data name="button6.Location" type="System.Drawing.Point, System.Drawing"> + <value>776, 331</value> + </data> + <data name="button6.Size" type="System.Drawing.Size, System.Drawing"> + <value>96, 40</value> + </data> + <data name="button6.TabIndex" type="System.Int32, mscorlib"> + <value>7</value> + </data> + <data name="button6.Text" xml:space="preserve"> + <value>鎵惧渾</value> + </data> + <data name=">>button6.Name" xml:space="preserve"> + <value>button6</value> + </data> + <data name=">>button6.Type" xml:space="preserve"> + <value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> + <data name=">>button6.Parent" xml:space="preserve"> + <value>$this</value> + </data> + <data name=">>button6.ZOrder" xml:space="preserve"> + <value>4</value> + </data> + <data name="button7.Location" type="System.Drawing.Point, System.Drawing"> + <value>620, 131</value> + </data> + <data name="button7.Size" type="System.Drawing.Size, System.Drawing"> + <value>80, 41</value> + </data> + <data name="button7.TabIndex" type="System.Int32, mscorlib"> + <value>8</value> + </data> + <data name="button7.Text" xml:space="preserve"> + <value>Jobs Form</value> + </data> + <data name=">>button7.Name" xml:space="preserve"> + <value>button7</value> + </data> + <data name=">>button7.Type" xml:space="preserve"> + <value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> + <data name=">>button7.Parent" xml:space="preserve"> + <value>$this</value> + </data> + <data name=">>button7.ZOrder" xml:space="preserve"> + <value>3</value> + </data> + <data name="button8.Location" type="System.Drawing.Point, System.Drawing"> + <value>706, 131</value> + </data> + <data name="button8.Size" type="System.Drawing.Size, System.Drawing"> + <value>80, 41</value> + </data> + <data name="button8.TabIndex" type="System.Int32, mscorlib"> + <value>9</value> + </data> + <data name="button8.Text" xml:space="preserve"> + <value>Contour Form</value> + </data> + <data name=">>button8.Name" xml:space="preserve"> + <value>button8</value> + </data> + <data name=">>button8.Type" xml:space="preserve"> + <value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> + <data name=">>button8.Parent" xml:space="preserve"> + <value>$this</value> + </data> + <data name=">>button8.ZOrder" xml:space="preserve"> + <value>2</value> + </data> + <data name="button9.Location" type="System.Drawing.Point, System.Drawing"> + <value>795, 131</value> + </data> + <data name="button9.Size" type="System.Drawing.Size, System.Drawing"> + <value>75, 41</value> + </data> + <data name="button9.TabIndex" type="System.Int32, mscorlib"> + <value>10</value> + </data> + <data name="button9.Text" xml:space="preserve"> + <value>Screw Form</value> + </data> + <data name=">>button9.Name" xml:space="preserve"> + <value>button9</value> + </data> + <data name=">>button9.Type" xml:space="preserve"> + <value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> + <data name=">>button9.Parent" xml:space="preserve"> + <value>$this</value> + </data> + <data name=">>button9.ZOrder" xml:space="preserve"> + <value>1</value> + </data> + <data name="btnCalibrationForm.Location" type="System.Drawing.Point, System.Drawing"> + <value>620, 191</value> + </data> + <data name="btnCalibrationForm.Size" type="System.Drawing.Size, System.Drawing"> + <value>80, 52</value> + </data> + <data name="btnCalibrationForm.TabIndex" type="System.Int32, mscorlib"> + <value>11</value> + </data> + <data name="btnCalibrationForm.Text" xml:space="preserve"> + <value>Calibration Form</value> + </data> + <data name=">>btnCalibrationForm.Name" xml:space="preserve"> + <value>btnCalibrationForm</value> + </data> + <data name=">>btnCalibrationForm.Type" xml:space="preserve"> + <value>System.Windows.Forms.Button, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> + <data name=">>btnCalibrationForm.Parent" xml:space="preserve"> + <value>$this</value> + </data> + <data name=">>btnCalibrationForm.ZOrder" xml:space="preserve"> + <value>0</value> + </data> + <metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing"> + <value>6, 12</value> + </data> + <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing"> + <value>877, 472</value> + </data> + <data name="$this.Text" xml:space="preserve"> + <value>Main Form</value> + </data> + <data name=">>$this.Name" xml:space="preserve"> + <value>frmMain</value> + </data> + <data name=">>$this.Type" xml:space="preserve"> + <value>System.Windows.Forms.Form, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </data> +</root> \ No newline at end of file diff --git a/HalconTools/frmMain.zh-CHS.resx b/HalconTools/frmMain.zh-CHS.resx new file mode 100644 index 0000000..19dc0dd --- /dev/null +++ b/HalconTools/frmMain.zh-CHS.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/HalconTools/frmMatchingAssistant.cs b/HalconTools/frmMatchingAssistant.cs new file mode 100644 index 0000000..ccc141b --- /dev/null +++ b/HalconTools/frmMatchingAssistant.cs @@ -0,0 +1,4774 @@ +using System; +using System.Drawing; +using System.Collections; +using System.ComponentModel; +using System.Windows.Forms; +using System.Data; +using HalconDotNet; + +namespace HalconTools +{ + /// <summary> + /// This project provides you with the functionality of the HDevelop + /// Matching Assistant, as a stand alone application. It contains + /// most of the data structures and menus that are offered with the + /// HDevelop Assistant. + /// It uses the ROI classes to create interactive ROI objects, + /// as introduced with the project InteractiveROI. + /// MatchingForm provides the graphical user interface, i.e., it contains + /// all display handles, GUI components, and event handles. It uses the + /// ROI class to create interactive ROI objects (see also the project + /// InteractiveROI). The class Matching Assistant is used as the + /// controller, which connects the GUI instance with the models. Changes + /// in the model are forwarded to the GUI by event delegates. + /// </summary> + public class frmMatchingAssistant : System.Windows.Forms.Form + { + // Main Panel + private System.Windows.Forms.TabControl tabControl; + private System.Windows.Forms.TabPage tabPageCreateModel; + private System.Windows.Forms.TabPage tabPageFindModel; + private System.Windows.Forms.TabPage tabPageInspectModel; + private System.Windows.Forms.Button loadImagebutton; + private System.Windows.Forms.OpenFileDialog openFileDialog1; + private System.Windows.Forms.Button saveModelbutton; + private System.Windows.Forms.RadioButton addToROIButton; + private System.Windows.Forms.RadioButton subFromROIButton; + private System.Windows.Forms.Button rect1Button; + private System.Windows.Forms.Button rect2Button; + private System.Windows.Forms.RadioButton moveButton; + private System.Windows.Forms.RadioButton zoomButton; + private System.ComponentModel.IContainer components; + /// <summary>Window control that manages visualization</summary> + public HWndCtrl mView; + /// <summary>ROI control that manages ROI objects</summary> + public ROIController roiController; + + private HImage CurrentImg; + private HRegion ModelRegion; + private HXLD ModelContour; + private HXLD DetectionContour; + private MatchingAssistant mAssistant; + private MatchingParam parameterSet; + private MatchingOpt optInstance; + private MatchingOptSpeed speedOptHandler; + private MatchingOptStatistics inspectOptHandler; + private Color createModelWindowMode; + private Color trainModelWindowMode; + + + private System.Windows.Forms.OpenFileDialog openFileDialog2; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label18; + private System.Windows.Forms.Button loadTestImgButton; + private System.Windows.Forms.Button deleteTestImgButton; + private System.Windows.Forms.Button deleteAllTestImgButton; + private System.Windows.Forms.Button findModelButton; + private System.Windows.Forms.Button displayTestImgButton; + private System.Windows.Forms.TrackBar MinScoreTrackBar; + private System.Windows.Forms.NumericUpDown MinScoreUpDown; + private System.Windows.Forms.TrackBar NumMatchesTrackBar; + private System.Windows.Forms.NumericUpDown NumMatchesUpDown; + private System.Windows.Forms.TrackBar MaxOverlapTrackBar; + private System.Windows.Forms.NumericUpDown MaxOverlapUpDown; + private System.Windows.Forms.TrackBar GreedinessTrackBar; + private System.Windows.Forms.NumericUpDown GreedinessUpDown; + private System.Windows.Forms.ComboBox SubPixelBox; + private System.Windows.Forms.TrackBar LastPyrLevTrackBar; + private System.Windows.Forms.NumericUpDown LastPyrLevUpDown; + private System.Windows.Forms.ListBox testImgListBox; + private System.Windows.Forms.TabPage tabPageOptimRecognition; + private System.Windows.Forms.CheckBox FindAlwaysCheckBox; + private System.Windows.Forms.Button DisplayDataButton; + private System.Windows.Forms.GroupBox groupBoxCreateROI; + private System.Windows.Forms.Label label19; + private System.Windows.Forms.Label label20; + private System.Windows.Forms.RadioButton FindNoOfInstButton; + private System.Windows.Forms.RadioButton FindAtLeastOneModelButton; + private System.Windows.Forms.RadioButton FindMaxNoOfModelButton; + private System.Windows.Forms.TrackBar recogRateTrackBar; + private System.Windows.Forms.NumericUpDown recogRateUpDown; + private System.Windows.Forms.ComboBox RecognRateComboBox; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Label label29; + private System.Windows.Forms.Label label30; + private System.Windows.Forms.Label label31; + private System.Windows.Forms.Label label32; + private System.Windows.Forms.Label label33; + private System.Windows.Forms.Label label34; + private System.Windows.Forms.Label label35; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Label labelRecogn21; + private System.Windows.Forms.Label labelRecogn24; + private System.Windows.Forms.Label labelRecogn14; + private System.Windows.Forms.Label labelRecogn23; + private System.Windows.Forms.Label labelRecogn13; + private System.Windows.Forms.Label labelRecogn22; + private System.Windows.Forms.Label labelRecogn12; + private System.Windows.Forms.Label labelRecogn11; + private System.Windows.Forms.Label labelOptStatus; + private System.Windows.Forms.Timer timer; + private System.Windows.Forms.Button StatisticsButton; + private System.Windows.Forms.NumericUpDown RecogNoManSelUpDown; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.Label label26; + private System.Windows.Forms.Label label27; + private System.Windows.Forms.Label label28; + private System.Windows.Forms.Label label36; + private System.Windows.Forms.Label label37; + private System.Windows.Forms.Label label38; + private System.Windows.Forms.Label label39; + private System.Windows.Forms.Label label43; + private System.Windows.Forms.Label label62; + private System.Windows.Forms.Label label63; + private System.Windows.Forms.Label label64; + private System.Windows.Forms.Label label65; + private System.Windows.Forms.Label label66; + private System.Windows.Forms.Label label67; + private System.Windows.Forms.Label label68; + private System.Windows.Forms.Label label69; + private System.Windows.Forms.Label label70; + private System.Windows.Forms.Label label71; + private System.Windows.Forms.Label label72; + private System.Windows.Forms.Label labelInspect11; + private System.Windows.Forms.Label labelInspect21; + private System.Windows.Forms.Label labelInspect31; + private System.Windows.Forms.Label labelInspect32; + private System.Windows.Forms.Label labelInspect22; + private System.Windows.Forms.Label labelInspect12; + private System.Windows.Forms.Label labelInspect33; + private System.Windows.Forms.Label labelInspect23; + private System.Windows.Forms.Label labelInspect13; + private System.Windows.Forms.Label labelInspect34; + private System.Windows.Forms.Label labelInspect24; + private System.Windows.Forms.Label labelInspect14; + private System.Windows.Forms.Label labelInspect35; + private System.Windows.Forms.Label labelInspect25; + private System.Windows.Forms.Label labelInspect15; + private System.Windows.Forms.Label labelInspect36; + private System.Windows.Forms.Label labelInspect26; + private System.Windows.Forms.Label labelInspect16; + private System.Windows.Forms.Label labelInspect37; + private System.Windows.Forms.Label labelInspect27; + private System.Windows.Forms.Label labelInspect17; + private System.Windows.Forms.Label labelInspect05; + private System.Windows.Forms.Label labelInspect04; + private System.Windows.Forms.Label labelInspect03; + private System.Windows.Forms.Label labelInspect02; + private System.Windows.Forms.Label labelInspect01; + private System.Windows.Forms.NumericUpDown InspectMaxNoMatchUpDown; + private System.Windows.Forms.Label label21; + private System.Windows.Forms.Button OptimizeButton; + private System.Windows.Forms.Button loadModelbutton; + private System.Windows.Forms.SaveFileDialog saveFileDialog1; + private System.Windows.Forms.OpenFileDialog openFileDialog3; + private System.Windows.Forms.GroupBox groupBoxCreateModel; + private System.Windows.Forms.NumericUpDown DispPyramidUpDown; + private System.Windows.Forms.TrackBar DispPyramidTrackBar; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button ContrastAutoButton; + private System.Windows.Forms.NumericUpDown ContrastUpDown; + private System.Windows.Forms.TrackBar ContrastTrackBar; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.NumericUpDown MinScaleUpDown; + private System.Windows.Forms.TrackBar MinScaleTrackBar; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.NumericUpDown MaxScaleUpDown; + private System.Windows.Forms.TrackBar MaxScaleTrackBar; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Button ScaleStepAutoButton; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.NumericUpDown ScaleStepUpDown; + private System.Windows.Forms.TrackBar ScaleStepTrackBar; + private System.Windows.Forms.TrackBar StartingAngleTrackBar; + private System.Windows.Forms.NumericUpDown StartingAngleUpDown; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.TrackBar AngleExtentTrackBar; + private System.Windows.Forms.NumericUpDown AngleExtentUpDown; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TrackBar AngleStepTrackBar; + private System.Windows.Forms.Button AngleStepAutoButton; + private System.Windows.Forms.NumericUpDown AngleStepUpDown; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.TrackBar PyramidLevelTrackBar; + private System.Windows.Forms.Button PyramidLevelAutoButton; + private System.Windows.Forms.NumericUpDown PyramidLevelUpDown; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.ComboBox MetricBox; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.ComboBox OptimizationBox; + private System.Windows.Forms.Button OptimizationAutoButton; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.TrackBar MinContrastTrackBar; + private System.Windows.Forms.Button MinContrastAutoButton; + private System.Windows.Forms.NumericUpDown MinContrastUpDown; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Button resetModelbutton; + private System.Windows.Forms.Button delROIButton; + private System.Windows.Forms.RadioButton noneButton; + private System.Windows.Forms.Button circleButton; + private System.Windows.Forms.Button delAllROIButton; + private System.Windows.Forms.Button resetViewButton; + private Panel pnlBottom; + private GroupBox groupBox5; + private GroupBox groupBox6; + private Panel pnlRight; + private Panel WindowModePanel; + private TabPage tabPageSaveConfige; + private GroupBox groupBox2; + private Label label22; + private Label label23; + private Label label24; + private Label label25; + private Label label40; + private Label labScale; + private Label labAngle; + private Label labGreediness; + private Label labNumLevels; + private Label labMatches; + private Label labScore; + private Label labOverlapExt; + private Label labOverlapMax; + private Label labOverlapMin; + private Label labScaleExt; + private Label labScaleMax; + private Label labScaleMin; + private Label labAngleExt; + private Label labAngleMax; + private Label labAngleMin; + private Label labGreedinessExt; + private Label labGreedinessMax; + private Label labGreedinessMin; + private Label labNumLevelsExt; + private Label labNumLevelsMax; + private Label labNumLevelsMin; + private Label labMatchesMax; + private Label labMatchesMin; + private Label labScoreMin; + private Label labMatchesExt; + private Label labScoreExt; + private Label labScoreMax; + private Label labSubPixelSelect; + private Label labSubPixel; + private Button butSaveConfige; + private Label labLastPyramidLevel; + private Label labLastPyramidLevelExt; + private Label labLastPyramidLevelMax; + private Label label45; + private HWindowControl viewPort; + public bool locked; + + + /// <summary> + /// In the beginning, some initialization tasks are performed. + /// The control instances, like ROIController and WindowController, + /// are initialized and registered with each other. Also, the + /// delegates of the models are linked to update methods + /// to get notified about changes. + /// </summary> + public frmMatchingAssistant() + { + InitializeComponent(); + + initP(); + } + + public frmMatchingAssistant(string name) + { + InitializeComponent(); + + initP(); + + ResourceCulture.SetCurrentCulture(name); + ResourceCulture.SetLanguage((Control)this); + } + + public void initP() + { + mView = new HWndCtrl(viewPort); + + createModelWindowMode = Color.RoyalBlue; + trainModelWindowMode = Color.Chartreuse; + + roiController = new ROIController(); + mView.useROIController(roiController); + + roiController.setROISign(ROIController.MODE_ROI_POS); + + mView.NotifyIconObserver = new IconicDelegate(UpdateViewData); + roiController.NotifyRCObserver = new IconicDelegate(UpdateViewData); + + mView.setViewState(HWndCtrl.MODE_VIEW_NONE); + + locked = true; + parameterSet = new MatchingParam(); + Init(parameterSet); + locked = false; + + mAssistant = new MatchingAssistant(parameterSet); + mAssistant.NotifyIconObserver = new MatchingDelegate(UpdateMatching); + mAssistant.NotifyParamObserver = new AutoParamDelegate(UpdateButton); + + speedOptHandler = new MatchingOptSpeed(mAssistant, parameterSet); + speedOptHandler.NotifyStatisticsObserver = new StatisticsDelegate(UpdateStatisticsData); + + inspectOptHandler = new MatchingOptStatistics(mAssistant, parameterSet); + inspectOptHandler.NotifyStatisticsObserver = new StatisticsDelegate(UpdateStatisticsData); + } + + + /********************************************************************/ + /********************************************************************/ + protected override void Dispose( bool disposing ) + { + if( disposing ) + { + if (components != null) + { + components.Dispose(); + } + } + base.Dispose( disposing ); + } + + #region Windows Form Designer generated code + + /********************************************************************/ + /********************************************************************/ + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.tabControl = new System.Windows.Forms.TabControl(); + this.tabPageCreateModel = new System.Windows.Forms.TabPage(); + this.groupBoxCreateModel = new System.Windows.Forms.GroupBox(); + this.MinContrastTrackBar = new System.Windows.Forms.TrackBar(); + this.MinContrastAutoButton = new System.Windows.Forms.Button(); + this.MinContrastUpDown = new System.Windows.Forms.NumericUpDown(); + this.label12 = new System.Windows.Forms.Label(); + this.OptimizationBox = new System.Windows.Forms.ComboBox(); + this.OptimizationAutoButton = new System.Windows.Forms.Button(); + this.label10 = new System.Windows.Forms.Label(); + this.MetricBox = new System.Windows.Forms.ComboBox(); + this.label9 = new System.Windows.Forms.Label(); + this.PyramidLevelTrackBar = new System.Windows.Forms.TrackBar(); + this.PyramidLevelAutoButton = new System.Windows.Forms.Button(); + this.PyramidLevelUpDown = new System.Windows.Forms.NumericUpDown(); + this.label8 = new System.Windows.Forms.Label(); + this.AngleStepTrackBar = new System.Windows.Forms.TrackBar(); + this.AngleStepAutoButton = new System.Windows.Forms.Button(); + this.AngleStepUpDown = new System.Windows.Forms.NumericUpDown(); + this.label7 = new System.Windows.Forms.Label(); + this.AngleExtentTrackBar = new System.Windows.Forms.TrackBar(); + this.AngleExtentUpDown = new System.Windows.Forms.NumericUpDown(); + this.label6 = new System.Windows.Forms.Label(); + this.StartingAngleTrackBar = new System.Windows.Forms.TrackBar(); + this.StartingAngleUpDown = new System.Windows.Forms.NumericUpDown(); + this.label5 = new System.Windows.Forms.Label(); + this.ScaleStepAutoButton = new System.Windows.Forms.Button(); + this.label11 = new System.Windows.Forms.Label(); + this.ScaleStepUpDown = new System.Windows.Forms.NumericUpDown(); + this.ScaleStepTrackBar = new System.Windows.Forms.TrackBar(); + this.MaxScaleUpDown = new System.Windows.Forms.NumericUpDown(); + this.MaxScaleTrackBar = new System.Windows.Forms.TrackBar(); + this.label4 = new System.Windows.Forms.Label(); + this.MinScaleUpDown = new System.Windows.Forms.NumericUpDown(); + this.MinScaleTrackBar = new System.Windows.Forms.TrackBar(); + this.label3 = new System.Windows.Forms.Label(); + this.ContrastAutoButton = new System.Windows.Forms.Button(); + this.ContrastUpDown = new System.Windows.Forms.NumericUpDown(); + this.ContrastTrackBar = new System.Windows.Forms.TrackBar(); + this.label2 = new System.Windows.Forms.Label(); + this.DispPyramidUpDown = new System.Windows.Forms.NumericUpDown(); + this.DispPyramidTrackBar = new System.Windows.Forms.TrackBar(); + this.label1 = new System.Windows.Forms.Label(); + this.tabPageFindModel = new System.Windows.Forms.TabPage(); + this.FindAlwaysCheckBox = new System.Windows.Forms.CheckBox(); + this.testImgListBox = new System.Windows.Forms.ListBox(); + this.findModelButton = new System.Windows.Forms.Button(); + this.displayTestImgButton = new System.Windows.Forms.Button(); + this.deleteAllTestImgButton = new System.Windows.Forms.Button(); + this.deleteTestImgButton = new System.Windows.Forms.Button(); + this.LastPyrLevTrackBar = new System.Windows.Forms.TrackBar(); + this.LastPyrLevUpDown = new System.Windows.Forms.NumericUpDown(); + this.label18 = new System.Windows.Forms.Label(); + this.SubPixelBox = new System.Windows.Forms.ComboBox(); + this.label17 = new System.Windows.Forms.Label(); + this.MaxOverlapTrackBar = new System.Windows.Forms.TrackBar(); + this.MaxOverlapUpDown = new System.Windows.Forms.NumericUpDown(); + this.label15 = new System.Windows.Forms.Label(); + this.GreedinessTrackBar = new System.Windows.Forms.TrackBar(); + this.GreedinessUpDown = new System.Windows.Forms.NumericUpDown(); + this.label16 = new System.Windows.Forms.Label(); + this.NumMatchesTrackBar = new System.Windows.Forms.TrackBar(); + this.NumMatchesUpDown = new System.Windows.Forms.NumericUpDown(); + this.label14 = new System.Windows.Forms.Label(); + this.MinScoreTrackBar = new System.Windows.Forms.TrackBar(); + this.MinScoreUpDown = new System.Windows.Forms.NumericUpDown(); + this.label13 = new System.Windows.Forms.Label(); + this.loadTestImgButton = new System.Windows.Forms.Button(); + this.tabPageOptimRecognition = new System.Windows.Forms.TabPage(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.RecogNoManSelUpDown = new System.Windows.Forms.NumericUpDown(); + this.label19 = new System.Windows.Forms.Label(); + this.FindAtLeastOneModelButton = new System.Windows.Forms.RadioButton(); + this.FindMaxNoOfModelButton = new System.Windows.Forms.RadioButton(); + this.FindNoOfInstButton = new System.Windows.Forms.RadioButton(); + this.recogRateTrackBar = new System.Windows.Forms.TrackBar(); + this.recogRateUpDown = new System.Windows.Forms.NumericUpDown(); + this.RecognRateComboBox = new System.Windows.Forms.ComboBox(); + this.label20 = new System.Windows.Forms.Label(); + this.panel1 = new System.Windows.Forms.Panel(); + this.labelOptStatus = new System.Windows.Forms.Label(); + this.label35 = new System.Windows.Forms.Label(); + this.label34 = new System.Windows.Forms.Label(); + this.label33 = new System.Windows.Forms.Label(); + this.label32 = new System.Windows.Forms.Label(); + this.label31 = new System.Windows.Forms.Label(); + this.labelRecogn21 = new System.Windows.Forms.Label(); + this.labelRecogn24 = new System.Windows.Forms.Label(); + this.labelRecogn14 = new System.Windows.Forms.Label(); + this.labelRecogn23 = new System.Windows.Forms.Label(); + this.labelRecogn13 = new System.Windows.Forms.Label(); + this.labelRecogn22 = new System.Windows.Forms.Label(); + this.labelRecogn12 = new System.Windows.Forms.Label(); + this.labelRecogn11 = new System.Windows.Forms.Label(); + this.label29 = new System.Windows.Forms.Label(); + this.label30 = new System.Windows.Forms.Label(); + this.OptimizeButton = new System.Windows.Forms.Button(); + this.tabPageInspectModel = new System.Windows.Forms.TabPage(); + this.label21 = new System.Windows.Forms.Label(); + this.InspectMaxNoMatchUpDown = new System.Windows.Forms.NumericUpDown(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.label72 = new System.Windows.Forms.Label(); + this.label71 = new System.Windows.Forms.Label(); + this.label70 = new System.Windows.Forms.Label(); + this.label69 = new System.Windows.Forms.Label(); + this.label68 = new System.Windows.Forms.Label(); + this.label67 = new System.Windows.Forms.Label(); + this.label66 = new System.Windows.Forms.Label(); + this.label65 = new System.Windows.Forms.Label(); + this.label64 = new System.Windows.Forms.Label(); + this.label63 = new System.Windows.Forms.Label(); + this.label62 = new System.Windows.Forms.Label(); + this.label43 = new System.Windows.Forms.Label(); + this.labelInspect37 = new System.Windows.Forms.Label(); + this.labelInspect27 = new System.Windows.Forms.Label(); + this.labelInspect17 = new System.Windows.Forms.Label(); + this.labelInspect36 = new System.Windows.Forms.Label(); + this.labelInspect26 = new System.Windows.Forms.Label(); + this.labelInspect16 = new System.Windows.Forms.Label(); + this.labelInspect35 = new System.Windows.Forms.Label(); + this.labelInspect25 = new System.Windows.Forms.Label(); + this.labelInspect15 = new System.Windows.Forms.Label(); + this.labelInspect34 = new System.Windows.Forms.Label(); + this.labelInspect24 = new System.Windows.Forms.Label(); + this.labelInspect14 = new System.Windows.Forms.Label(); + this.labelInspect33 = new System.Windows.Forms.Label(); + this.labelInspect23 = new System.Windows.Forms.Label(); + this.labelInspect13 = new System.Windows.Forms.Label(); + this.labelInspect32 = new System.Windows.Forms.Label(); + this.labelInspect22 = new System.Windows.Forms.Label(); + this.labelInspect12 = new System.Windows.Forms.Label(); + this.labelInspect31 = new System.Windows.Forms.Label(); + this.labelInspect21 = new System.Windows.Forms.Label(); + this.labelInspect11 = new System.Windows.Forms.Label(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.label39 = new System.Windows.Forms.Label(); + this.label38 = new System.Windows.Forms.Label(); + this.label37 = new System.Windows.Forms.Label(); + this.label36 = new System.Windows.Forms.Label(); + this.label28 = new System.Windows.Forms.Label(); + this.label27 = new System.Windows.Forms.Label(); + this.label26 = new System.Windows.Forms.Label(); + this.labelInspect05 = new System.Windows.Forms.Label(); + this.labelInspect04 = new System.Windows.Forms.Label(); + this.labelInspect03 = new System.Windows.Forms.Label(); + this.labelInspect02 = new System.Windows.Forms.Label(); + this.labelInspect01 = new System.Windows.Forms.Label(); + this.StatisticsButton = new System.Windows.Forms.Button(); + this.tabPageSaveConfige = new System.Windows.Forms.TabPage(); + this.butSaveConfige = new System.Windows.Forms.Button(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.labLastPyramidLevel = new System.Windows.Forms.Label(); + this.labLastPyramidLevelExt = new System.Windows.Forms.Label(); + this.labLastPyramidLevelMax = new System.Windows.Forms.Label(); + this.label45 = new System.Windows.Forms.Label(); + this.labSubPixelSelect = new System.Windows.Forms.Label(); + this.label22 = new System.Windows.Forms.Label(); + this.label23 = new System.Windows.Forms.Label(); + this.label24 = new System.Windows.Forms.Label(); + this.label25 = new System.Windows.Forms.Label(); + this.label40 = new System.Windows.Forms.Label(); + this.labScale = new System.Windows.Forms.Label(); + this.labAngle = new System.Windows.Forms.Label(); + this.labGreediness = new System.Windows.Forms.Label(); + this.labNumLevels = new System.Windows.Forms.Label(); + this.labSubPixel = new System.Windows.Forms.Label(); + this.labMatches = new System.Windows.Forms.Label(); + this.labScore = new System.Windows.Forms.Label(); + this.labOverlapExt = new System.Windows.Forms.Label(); + this.labOverlapMax = new System.Windows.Forms.Label(); + this.labOverlapMin = new System.Windows.Forms.Label(); + this.labScaleExt = new System.Windows.Forms.Label(); + this.labScaleMax = new System.Windows.Forms.Label(); + this.labScaleMin = new System.Windows.Forms.Label(); + this.labAngleExt = new System.Windows.Forms.Label(); + this.labAngleMax = new System.Windows.Forms.Label(); + this.labAngleMin = new System.Windows.Forms.Label(); + this.labGreedinessExt = new System.Windows.Forms.Label(); + this.labGreedinessMax = new System.Windows.Forms.Label(); + this.labGreedinessMin = new System.Windows.Forms.Label(); + this.labNumLevelsExt = new System.Windows.Forms.Label(); + this.labNumLevelsMax = new System.Windows.Forms.Label(); + this.labNumLevelsMin = new System.Windows.Forms.Label(); + this.labMatchesExt = new System.Windows.Forms.Label(); + this.labMatchesMax = new System.Windows.Forms.Label(); + this.labMatchesMin = new System.Windows.Forms.Label(); + this.labScoreExt = new System.Windows.Forms.Label(); + this.labScoreMax = new System.Windows.Forms.Label(); + this.labScoreMin = new System.Windows.Forms.Label(); + this.groupBoxCreateROI = new System.Windows.Forms.GroupBox(); + this.circleButton = new System.Windows.Forms.Button(); + this.delROIButton = new System.Windows.Forms.Button(); + this.delAllROIButton = new System.Windows.Forms.Button(); + this.rect2Button = new System.Windows.Forms.Button(); + this.subFromROIButton = new System.Windows.Forms.RadioButton(); + this.addToROIButton = new System.Windows.Forms.RadioButton(); + this.rect1Button = new System.Windows.Forms.Button(); + this.loadImagebutton = new System.Windows.Forms.Button(); + this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); + this.saveModelbutton = new System.Windows.Forms.Button(); + this.loadModelbutton = new System.Windows.Forms.Button(); + this.resetViewButton = new System.Windows.Forms.Button(); + this.noneButton = new System.Windows.Forms.RadioButton(); + this.zoomButton = new System.Windows.Forms.RadioButton(); + this.moveButton = new System.Windows.Forms.RadioButton(); + this.openFileDialog2 = new System.Windows.Forms.OpenFileDialog(); + this.DisplayDataButton = new System.Windows.Forms.Button(); + this.timer = new System.Windows.Forms.Timer(this.components); + this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); + this.openFileDialog3 = new System.Windows.Forms.OpenFileDialog(); + this.resetModelbutton = new System.Windows.Forms.Button(); + this.pnlBottom = new System.Windows.Forms.Panel(); + this.groupBox6 = new System.Windows.Forms.GroupBox(); + this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.pnlRight = new System.Windows.Forms.Panel(); + this.WindowModePanel = new System.Windows.Forms.Panel(); + this.viewPort = new HalconDotNet.HWindowControl(); + this.tabControl.SuspendLayout(); + this.tabPageCreateModel.SuspendLayout(); + this.groupBoxCreateModel.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.MinContrastTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinContrastUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.PyramidLevelTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.PyramidLevelUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.AngleStepTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.AngleStepUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.AngleExtentTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.AngleExtentUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.StartingAngleTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.StartingAngleUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.ScaleStepUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.ScaleStepTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MaxScaleUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MaxScaleTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinScaleUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinScaleTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.ContrastUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.ContrastTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.DispPyramidUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.DispPyramidTrackBar)).BeginInit(); + this.tabPageFindModel.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.LastPyrLevTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.LastPyrLevUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MaxOverlapTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MaxOverlapUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.GreedinessTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.GreedinessUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NumMatchesTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.NumMatchesUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinScoreTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinScoreUpDown)).BeginInit(); + this.tabPageOptimRecognition.SuspendLayout(); + this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.RecogNoManSelUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.recogRateTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.recogRateUpDown)).BeginInit(); + this.panel1.SuspendLayout(); + this.tabPageInspectModel.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.InspectMaxNoMatchUpDown)).BeginInit(); + this.groupBox4.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.tabPageSaveConfige.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBoxCreateROI.SuspendLayout(); + this.pnlBottom.SuspendLayout(); + this.groupBox6.SuspendLayout(); + this.groupBox5.SuspendLayout(); + this.pnlRight.SuspendLayout(); + this.WindowModePanel.SuspendLayout(); + this.SuspendLayout(); + // + // tabControl + // + this.tabControl.Controls.Add(this.tabPageCreateModel); + this.tabControl.Controls.Add(this.tabPageFindModel); + this.tabControl.Controls.Add(this.tabPageOptimRecognition); + this.tabControl.Controls.Add(this.tabPageInspectModel); + this.tabControl.Controls.Add(this.tabPageSaveConfige); + this.tabControl.Location = new System.Drawing.Point(6, 15); + this.tabControl.Name = "tabControl"; + this.tabControl.SelectedIndex = 0; + this.tabControl.Size = new System.Drawing.Size(490, 594); + this.tabControl.TabIndex = 1; + this.tabControl.SelectedIndexChanged += new System.EventHandler(this.tabControl_SelectedIndexChanged); + // + // tabPageCreateModel + // + this.tabPageCreateModel.Controls.Add(this.groupBoxCreateModel); + this.tabPageCreateModel.Location = new System.Drawing.Point(4, 22); + this.tabPageCreateModel.Name = "tabPageCreateModel"; + this.tabPageCreateModel.Size = new System.Drawing.Size(482, 568); + this.tabPageCreateModel.TabIndex = 0; + this.tabPageCreateModel.Text = " 创建模板 "; + this.tabPageCreateModel.UseVisualStyleBackColor = true; + // + // groupBoxCreateModel + // + this.groupBoxCreateModel.Controls.Add(this.MinContrastTrackBar); + this.groupBoxCreateModel.Controls.Add(this.MinContrastAutoButton); + this.groupBoxCreateModel.Controls.Add(this.MinContrastUpDown); + this.groupBoxCreateModel.Controls.Add(this.label12); + this.groupBoxCreateModel.Controls.Add(this.OptimizationBox); + this.groupBoxCreateModel.Controls.Add(this.OptimizationAutoButton); + this.groupBoxCreateModel.Controls.Add(this.label10); + this.groupBoxCreateModel.Controls.Add(this.MetricBox); + this.groupBoxCreateModel.Controls.Add(this.label9); + this.groupBoxCreateModel.Controls.Add(this.PyramidLevelTrackBar); + this.groupBoxCreateModel.Controls.Add(this.PyramidLevelAutoButton); + this.groupBoxCreateModel.Controls.Add(this.PyramidLevelUpDown); + this.groupBoxCreateModel.Controls.Add(this.label8); + this.groupBoxCreateModel.Controls.Add(this.AngleStepTrackBar); + this.groupBoxCreateModel.Controls.Add(this.AngleStepAutoButton); + this.groupBoxCreateModel.Controls.Add(this.AngleStepUpDown); + this.groupBoxCreateModel.Controls.Add(this.label7); + this.groupBoxCreateModel.Controls.Add(this.AngleExtentTrackBar); + this.groupBoxCreateModel.Controls.Add(this.AngleExtentUpDown); + this.groupBoxCreateModel.Controls.Add(this.label6); + this.groupBoxCreateModel.Controls.Add(this.StartingAngleTrackBar); + this.groupBoxCreateModel.Controls.Add(this.StartingAngleUpDown); + this.groupBoxCreateModel.Controls.Add(this.label5); + this.groupBoxCreateModel.Controls.Add(this.ScaleStepAutoButton); + this.groupBoxCreateModel.Controls.Add(this.label11); + this.groupBoxCreateModel.Controls.Add(this.ScaleStepUpDown); + this.groupBoxCreateModel.Controls.Add(this.ScaleStepTrackBar); + this.groupBoxCreateModel.Controls.Add(this.MaxScaleUpDown); + this.groupBoxCreateModel.Controls.Add(this.MaxScaleTrackBar); + this.groupBoxCreateModel.Controls.Add(this.label4); + this.groupBoxCreateModel.Controls.Add(this.MinScaleUpDown); + this.groupBoxCreateModel.Controls.Add(this.MinScaleTrackBar); + this.groupBoxCreateModel.Controls.Add(this.label3); + this.groupBoxCreateModel.Controls.Add(this.ContrastAutoButton); + this.groupBoxCreateModel.Controls.Add(this.ContrastUpDown); + this.groupBoxCreateModel.Controls.Add(this.ContrastTrackBar); + this.groupBoxCreateModel.Controls.Add(this.label2); + this.groupBoxCreateModel.Controls.Add(this.DispPyramidUpDown); + this.groupBoxCreateModel.Controls.Add(this.DispPyramidTrackBar); + this.groupBoxCreateModel.Controls.Add(this.label1); + this.groupBoxCreateModel.Location = new System.Drawing.Point(0, 0); + this.groupBoxCreateModel.Name = "groupBoxCreateModel"; + this.groupBoxCreateModel.Size = new System.Drawing.Size(470, 526); + this.groupBoxCreateModel.TabIndex = 55; + this.groupBoxCreateModel.TabStop = false; + // + // MinContrastTrackBar + // + this.MinContrastTrackBar.Location = new System.Drawing.Point(221, 474); + this.MinContrastTrackBar.Maximum = 30; + this.MinContrastTrackBar.Name = "MinContrastTrackBar"; + this.MinContrastTrackBar.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.MinContrastTrackBar.Size = new System.Drawing.Size(173, 45); + this.MinContrastTrackBar.TabIndex = 80; + this.MinContrastTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.MinContrastTrackBar.Value = 10; + this.MinContrastTrackBar.Scroll += new System.EventHandler(this.MinContrastTrackBar_Scroll); + // + // MinContrastAutoButton + // + this.MinContrastAutoButton.Location = new System.Drawing.Point(394, 474); + this.MinContrastAutoButton.Name = "MinContrastAutoButton"; + this.MinContrastAutoButton.Size = new System.Drawing.Size(57, 26); + this.MinContrastAutoButton.TabIndex = 79; + this.MinContrastAutoButton.Text = "Auto"; + this.MinContrastAutoButton.Click += new System.EventHandler(this.MinContrastAutoButton_Click); + // + // MinContrastUpDown + // + this.MinContrastUpDown.Location = new System.Drawing.Point(144, 474); + this.MinContrastUpDown.Maximum = new decimal(new int[] { + 30, + 0, + 0, + 0}); + this.MinContrastUpDown.Name = "MinContrastUpDown"; + this.MinContrastUpDown.Size = new System.Drawing.Size(58, 21); + this.MinContrastUpDown.TabIndex = 78; + this.MinContrastUpDown.Value = new decimal(new int[] { + 10, + 0, + 0, + 0}); + this.MinContrastUpDown.ValueChanged += new System.EventHandler(this.MinContrastUpDown_ValueChanged); + // + // label12 + // + this.label12.Location = new System.Drawing.Point(38, 465); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(96, 43); + this.label12.TabIndex = 77; + this.label12.Text = "MinContrast"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // OptimizationBox + // + this.OptimizationBox.Items.AddRange(new object[] { + "none", + "point_reduction_low", + "point_reduction_medium", + "point_reduction_high"}); + this.OptimizationBox.Location = new System.Drawing.Point(144, 439); + this.OptimizationBox.Name = "OptimizationBox"; + this.OptimizationBox.Size = new System.Drawing.Size(240, 20); + this.OptimizationBox.TabIndex = 76; + this.OptimizationBox.SelectedIndexChanged += new System.EventHandler(this.OptimizationBox_SelectedIndexChanged); + // + // OptimizationAutoButton + // + this.OptimizationAutoButton.Location = new System.Drawing.Point(394, 439); + this.OptimizationAutoButton.Name = "OptimizationAutoButton"; + this.OptimizationAutoButton.Size = new System.Drawing.Size(57, 26); + this.OptimizationAutoButton.TabIndex = 75; + this.OptimizationAutoButton.Text = "Auto"; + this.OptimizationAutoButton.Click += new System.EventHandler(this.OptimizationAutoButton_Click); + // + // label10 + // + this.label10.Location = new System.Drawing.Point(38, 431); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(96, 43); + this.label10.TabIndex = 74; + this.label10.Text = "Optimization"; + this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // MetricBox + // + this.MetricBox.Items.AddRange(new object[] { + "use_polarity", + "ignore_global_polarity", + "ignore_local_polarity", + "ignore_color_polarity"}); + this.MetricBox.Location = new System.Drawing.Point(144, 405); + this.MetricBox.Name = "MetricBox"; + this.MetricBox.Size = new System.Drawing.Size(240, 20); + this.MetricBox.TabIndex = 73; + this.MetricBox.SelectedIndexChanged += new System.EventHandler(this.MetricBox_SelectedIndexChanged); + // + // label9 + // + this.label9.Location = new System.Drawing.Point(38, 396); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(96, 43); + this.label9.TabIndex = 72; + this.label9.Text = "Metric"; + this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // PyramidLevelTrackBar + // + this.PyramidLevelTrackBar.Location = new System.Drawing.Point(221, 336); + this.PyramidLevelTrackBar.Maximum = 6; + this.PyramidLevelTrackBar.Minimum = 1; + this.PyramidLevelTrackBar.Name = "PyramidLevelTrackBar"; + this.PyramidLevelTrackBar.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.PyramidLevelTrackBar.Size = new System.Drawing.Size(173, 45); + this.PyramidLevelTrackBar.TabIndex = 71; + this.PyramidLevelTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.PyramidLevelTrackBar.Value = 5; + this.PyramidLevelTrackBar.Scroll += new System.EventHandler(this.PyramidLevelTrackBar_Scroll); + // + // PyramidLevelAutoButton + // + this.PyramidLevelAutoButton.Location = new System.Drawing.Point(394, 336); + this.PyramidLevelAutoButton.Name = "PyramidLevelAutoButton"; + this.PyramidLevelAutoButton.Size = new System.Drawing.Size(57, 26); + this.PyramidLevelAutoButton.TabIndex = 70; + this.PyramidLevelAutoButton.Text = "Auto"; + this.PyramidLevelAutoButton.Click += new System.EventHandler(this.PyramidLevelAutoButton_Click); + // + // PyramidLevelUpDown + // + this.PyramidLevelUpDown.Location = new System.Drawing.Point(144, 336); + this.PyramidLevelUpDown.Maximum = new decimal(new int[] { + 6, + 0, + 0, + 0}); + this.PyramidLevelUpDown.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.PyramidLevelUpDown.Name = "PyramidLevelUpDown"; + this.PyramidLevelUpDown.Size = new System.Drawing.Size(58, 21); + this.PyramidLevelUpDown.TabIndex = 69; + this.PyramidLevelUpDown.Value = new decimal(new int[] { + 5, + 0, + 0, + 0}); + this.PyramidLevelUpDown.ValueChanged += new System.EventHandler(this.PyramidLevelUpDown_ValueChanged); + // + // label8 + // + this.label8.Location = new System.Drawing.Point(38, 327); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(96, 43); + this.label8.TabIndex = 68; + this.label8.Text = "PyramidLevel"; + this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // AngleStepTrackBar + // + this.AngleStepTrackBar.Location = new System.Drawing.Point(221, 302); + this.AngleStepTrackBar.Maximum = 112; + this.AngleStepTrackBar.Name = "AngleStepTrackBar"; + this.AngleStepTrackBar.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.AngleStepTrackBar.Size = new System.Drawing.Size(173, 45); + this.AngleStepTrackBar.TabIndex = 67; + this.AngleStepTrackBar.TickFrequency = 10; + this.AngleStepTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.AngleStepTrackBar.Value = 10; + this.AngleStepTrackBar.Scroll += new System.EventHandler(this.AngleStepTrackBar_Scroll); + // + // AngleStepAutoButton + // + this.AngleStepAutoButton.Location = new System.Drawing.Point(394, 302); + this.AngleStepAutoButton.Name = "AngleStepAutoButton"; + this.AngleStepAutoButton.Size = new System.Drawing.Size(57, 25); + this.AngleStepAutoButton.TabIndex = 66; + this.AngleStepAutoButton.Text = "Auto"; + this.AngleStepAutoButton.Click += new System.EventHandler(this.AngleStepAutoButton_Click); + // + // AngleStepUpDown + // + this.AngleStepUpDown.Location = new System.Drawing.Point(144, 302); + this.AngleStepUpDown.Maximum = new decimal(new int[] { + 112, + 0, + 0, + 0}); + this.AngleStepUpDown.Name = "AngleStepUpDown"; + this.AngleStepUpDown.Size = new System.Drawing.Size(58, 21); + this.AngleStepUpDown.TabIndex = 65; + this.AngleStepUpDown.Value = new decimal(new int[] { + 10, + 0, + 0, + 0}); + this.AngleStepUpDown.ValueChanged += new System.EventHandler(this.AngleStepUpDown_ValueChanged); + // + // label7 + // + this.label7.Location = new System.Drawing.Point(38, 293); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(96, 43); + this.label7.TabIndex = 64; + this.label7.Text = "AngleStep*10"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // AngleExtentTrackBar + // + this.AngleExtentTrackBar.Location = new System.Drawing.Point(221, 267); + this.AngleExtentTrackBar.Maximum = 360; + this.AngleExtentTrackBar.Name = "AngleExtentTrackBar"; + this.AngleExtentTrackBar.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.AngleExtentTrackBar.Size = new System.Drawing.Size(173, 45); + this.AngleExtentTrackBar.TabIndex = 63; + this.AngleExtentTrackBar.TickFrequency = 20; + this.AngleExtentTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.AngleExtentTrackBar.Value = 360; + this.AngleExtentTrackBar.Scroll += new System.EventHandler(this.AngleExtentTrackBar_Scroll); + // + // AngleExtentUpDown + // + this.AngleExtentUpDown.Location = new System.Drawing.Point(144, 267); + this.AngleExtentUpDown.Maximum = new decimal(new int[] { + 360, + 0, + 0, + 0}); + this.AngleExtentUpDown.Name = "AngleExtentUpDown"; + this.AngleExtentUpDown.Size = new System.Drawing.Size(58, 21); + this.AngleExtentUpDown.TabIndex = 62; + this.AngleExtentUpDown.Value = new decimal(new int[] { + 360, + 0, + 0, + 0}); + this.AngleExtentUpDown.ValueChanged += new System.EventHandler(this.AngleExtentUpDown_ValueChanged); + // + // label6 + // + this.label6.Location = new System.Drawing.Point(38, 258); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(96, 44); + this.label6.TabIndex = 61; + this.label6.Text = "AngleExtent"; + this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // StartingAngleTrackBar + // + this.StartingAngleTrackBar.Location = new System.Drawing.Point(221, 233); + this.StartingAngleTrackBar.Maximum = 180; + this.StartingAngleTrackBar.Minimum = -180; + this.StartingAngleTrackBar.Name = "StartingAngleTrackBar"; + this.StartingAngleTrackBar.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.StartingAngleTrackBar.Size = new System.Drawing.Size(173, 45); + this.StartingAngleTrackBar.TabIndex = 60; + this.StartingAngleTrackBar.TickFrequency = 20; + this.StartingAngleTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.StartingAngleTrackBar.Scroll += new System.EventHandler(this.StartingAngleTrackBar_Scroll); + // + // StartingAngleUpDown + // + this.StartingAngleUpDown.Location = new System.Drawing.Point(144, 233); + this.StartingAngleUpDown.Maximum = new decimal(new int[] { + 180, + 0, + 0, + 0}); + this.StartingAngleUpDown.Minimum = new decimal(new int[] { + 180, + 0, + 0, + -2147483648}); + this.StartingAngleUpDown.Name = "StartingAngleUpDown"; + this.StartingAngleUpDown.Size = new System.Drawing.Size(58, 21); + this.StartingAngleUpDown.TabIndex = 59; + this.StartingAngleUpDown.ValueChanged += new System.EventHandler(this.StartingAngleUpDown_ValueChanged); + // + // label5 + // + this.label5.Location = new System.Drawing.Point(38, 224); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(96, 43); + this.label5.TabIndex = 58; + this.label5.Text = "StartingAngle"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // ScaleStepAutoButton + // + this.ScaleStepAutoButton.Location = new System.Drawing.Point(394, 198); + this.ScaleStepAutoButton.Name = "ScaleStepAutoButton"; + this.ScaleStepAutoButton.Size = new System.Drawing.Size(57, 26); + this.ScaleStepAutoButton.TabIndex = 50; + this.ScaleStepAutoButton.Text = "Auto"; + this.ScaleStepAutoButton.Click += new System.EventHandler(this.ScaleStepAutoButton_Click); + // + // label11 + // + this.label11.Location = new System.Drawing.Point(38, 190); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(106, 43); + this.label11.TabIndex = 49; + this.label11.Text = "ScaleStep*1000"; + this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // ScaleStepUpDown + // + this.ScaleStepUpDown.Location = new System.Drawing.Point(144, 198); + this.ScaleStepUpDown.Maximum = new decimal(new int[] { + 190, + 0, + 0, + 0}); + this.ScaleStepUpDown.Name = "ScaleStepUpDown"; + this.ScaleStepUpDown.Size = new System.Drawing.Size(58, 21); + this.ScaleStepUpDown.TabIndex = 48; + this.ScaleStepUpDown.Value = new decimal(new int[] { + 10, + 0, + 0, + 0}); + this.ScaleStepUpDown.ValueChanged += new System.EventHandler(this.ScaleStepUpDown_ValueChanged); + // + // ScaleStepTrackBar + // + this.ScaleStepTrackBar.Location = new System.Drawing.Point(221, 198); + this.ScaleStepTrackBar.Maximum = 190; + this.ScaleStepTrackBar.Name = "ScaleStepTrackBar"; + this.ScaleStepTrackBar.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.ScaleStepTrackBar.Size = new System.Drawing.Size(173, 45); + this.ScaleStepTrackBar.TabIndex = 47; + this.ScaleStepTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.ScaleStepTrackBar.Value = 10; + this.ScaleStepTrackBar.Scroll += new System.EventHandler(this.ScaleStepTrackBar_Scroll); + // + // MaxScaleUpDown + // + this.MaxScaleUpDown.Location = new System.Drawing.Point(144, 164); + this.MaxScaleUpDown.Maximum = new decimal(new int[] { + 200, + 0, + 0, + 0}); + this.MaxScaleUpDown.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.MaxScaleUpDown.Name = "MaxScaleUpDown"; + this.MaxScaleUpDown.Size = new System.Drawing.Size(58, 21); + this.MaxScaleUpDown.TabIndex = 46; + this.MaxScaleUpDown.Value = new decimal(new int[] { + 100, + 0, + 0, + 0}); + this.MaxScaleUpDown.ValueChanged += new System.EventHandler(this.MaxScaleUpDown_ValueChanged); + // + // MaxScaleTrackBar + // + this.MaxScaleTrackBar.Location = new System.Drawing.Point(221, 164); + this.MaxScaleTrackBar.Maximum = 200; + this.MaxScaleTrackBar.Minimum = 1; + this.MaxScaleTrackBar.Name = "MaxScaleTrackBar"; + this.MaxScaleTrackBar.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.MaxScaleTrackBar.Size = new System.Drawing.Size(173, 45); + this.MaxScaleTrackBar.TabIndex = 45; + this.MaxScaleTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.MaxScaleTrackBar.Value = 100; + this.MaxScaleTrackBar.Scroll += new System.EventHandler(this.MaxScaleTrackBar_Scroll); + // + // label4 + // + this.label4.Location = new System.Drawing.Point(38, 155); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(96, 43); + this.label4.TabIndex = 44; + this.label4.Text = "MaxScale*100"; + this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // MinScaleUpDown + // + this.MinScaleUpDown.Location = new System.Drawing.Point(144, 129); + this.MinScaleUpDown.Maximum = new decimal(new int[] { + 200, + 0, + 0, + 0}); + this.MinScaleUpDown.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.MinScaleUpDown.Name = "MinScaleUpDown"; + this.MinScaleUpDown.Size = new System.Drawing.Size(58, 21); + this.MinScaleUpDown.TabIndex = 43; + this.MinScaleUpDown.Value = new decimal(new int[] { + 100, + 0, + 0, + 0}); + this.MinScaleUpDown.ValueChanged += new System.EventHandler(this.MinScaleUpDown_ValueChanged); + // + // MinScaleTrackBar + // + this.MinScaleTrackBar.Location = new System.Drawing.Point(221, 129); + this.MinScaleTrackBar.Maximum = 200; + this.MinScaleTrackBar.Minimum = 1; + this.MinScaleTrackBar.Name = "MinScaleTrackBar"; + this.MinScaleTrackBar.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.MinScaleTrackBar.Size = new System.Drawing.Size(173, 45); + this.MinScaleTrackBar.TabIndex = 42; + this.MinScaleTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.MinScaleTrackBar.Value = 100; + this.MinScaleTrackBar.Scroll += new System.EventHandler(this.MinScaleTrackBar_Scroll); + // + // label3 + // + this.label3.Location = new System.Drawing.Point(38, 121); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(96, 43); + this.label3.TabIndex = 41; + this.label3.Text = "MinScale*100"; + this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // ContrastAutoButton + // + this.ContrastAutoButton.BackColor = System.Drawing.SystemColors.Control; + this.ContrastAutoButton.ForeColor = System.Drawing.SystemColors.ControlText; + this.ContrastAutoButton.Location = new System.Drawing.Point(394, 95); + this.ContrastAutoButton.Name = "ContrastAutoButton"; + this.ContrastAutoButton.Size = new System.Drawing.Size(57, 26); + this.ContrastAutoButton.TabIndex = 40; + this.ContrastAutoButton.Text = "Auto"; + this.ContrastAutoButton.UseVisualStyleBackColor = false; + this.ContrastAutoButton.Click += new System.EventHandler(this.ContrastAutoButton_Click); + // + // ContrastUpDown + // + this.ContrastUpDown.Location = new System.Drawing.Point(144, 95); + this.ContrastUpDown.Maximum = new decimal(new int[] { + 255, + 0, + 0, + 0}); + this.ContrastUpDown.Name = "ContrastUpDown"; + this.ContrastUpDown.Size = new System.Drawing.Size(58, 21); + this.ContrastUpDown.TabIndex = 39; + this.ContrastUpDown.Value = new decimal(new int[] { + 30, + 0, + 0, + 0}); + this.ContrastUpDown.ValueChanged += new System.EventHandler(this.ContrastUpDown_ValueChanged); + // + // ContrastTrackBar + // + this.ContrastTrackBar.Location = new System.Drawing.Point(221, 95); + this.ContrastTrackBar.Maximum = 255; + this.ContrastTrackBar.Name = "ContrastTrackBar"; + this.ContrastTrackBar.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.ContrastTrackBar.Size = new System.Drawing.Size(173, 45); + this.ContrastTrackBar.TabIndex = 38; + this.ContrastTrackBar.TickFrequency = 15; + this.ContrastTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.ContrastTrackBar.Value = 30; + this.ContrastTrackBar.Scroll += new System.EventHandler(this.ContrastTrackBar_Scroll); + // + // label2 + // + this.label2.Location = new System.Drawing.Point(38, 86); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(96, 43); + this.label2.TabIndex = 37; + this.label2.Text = "Contrast"; + this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // DispPyramidUpDown + // + this.DispPyramidUpDown.Location = new System.Drawing.Point(154, 34); + this.DispPyramidUpDown.Maximum = new decimal(new int[] { + 6, + 0, + 0, + 0}); + this.DispPyramidUpDown.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.DispPyramidUpDown.Name = "DispPyramidUpDown"; + this.DispPyramidUpDown.Size = new System.Drawing.Size(48, 21); + this.DispPyramidUpDown.TabIndex = 30; + this.DispPyramidUpDown.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.DispPyramidUpDown.ValueChanged += new System.EventHandler(this.DispPyramidUpDown_ValueChanged); + // + // DispPyramidTrackBar + // + this.DispPyramidTrackBar.Enabled = false; + this.DispPyramidTrackBar.Location = new System.Drawing.Point(221, 34); + this.DispPyramidTrackBar.Maximum = 6; + this.DispPyramidTrackBar.Minimum = 1; + this.DispPyramidTrackBar.Name = "DispPyramidTrackBar"; + this.DispPyramidTrackBar.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.DispPyramidTrackBar.Size = new System.Drawing.Size(173, 45); + this.DispPyramidTrackBar.TabIndex = 29; + this.DispPyramidTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.DispPyramidTrackBar.Value = 1; + this.DispPyramidTrackBar.Scroll += new System.EventHandler(this.DispPyramidTrackBar_Scroll); + // + // label1 + // + this.label1.Location = new System.Drawing.Point(38, 26); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(96, 43); + this.label1.TabIndex = 28; + this.label1.Text = "Display Image Pyramid"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // tabPageFindModel + // + this.tabPageFindModel.Controls.Add(this.FindAlwaysCheckBox); + this.tabPageFindModel.Controls.Add(this.testImgListBox); + this.tabPageFindModel.Controls.Add(this.findModelButton); + this.tabPageFindModel.Controls.Add(this.displayTestImgButton); + this.tabPageFindModel.Controls.Add(this.deleteAllTestImgButton); + this.tabPageFindModel.Controls.Add(this.deleteTestImgButton); + this.tabPageFindModel.Controls.Add(this.LastPyrLevTrackBar); + this.tabPageFindModel.Controls.Add(this.LastPyrLevUpDown); + this.tabPageFindModel.Controls.Add(this.label18); + this.tabPageFindModel.Controls.Add(this.SubPixelBox); + this.tabPageFindModel.Controls.Add(this.label17); + this.tabPageFindModel.Controls.Add(this.MaxOverlapTrackBar); + this.tabPageFindModel.Controls.Add(this.MaxOverlapUpDown); + this.tabPageFindModel.Controls.Add(this.label15); + this.tabPageFindModel.Controls.Add(this.GreedinessTrackBar); + this.tabPageFindModel.Controls.Add(this.GreedinessUpDown); + this.tabPageFindModel.Controls.Add(this.label16); + this.tabPageFindModel.Controls.Add(this.NumMatchesTrackBar); + this.tabPageFindModel.Controls.Add(this.NumMatchesUpDown); + this.tabPageFindModel.Controls.Add(this.label14); + this.tabPageFindModel.Controls.Add(this.MinScoreTrackBar); + this.tabPageFindModel.Controls.Add(this.MinScoreUpDown); + this.tabPageFindModel.Controls.Add(this.label13); + this.tabPageFindModel.Controls.Add(this.loadTestImgButton); + this.tabPageFindModel.Location = new System.Drawing.Point(4, 22); + this.tabPageFindModel.Name = "tabPageFindModel"; + this.tabPageFindModel.Size = new System.Drawing.Size(482, 568); + this.tabPageFindModel.TabIndex = 0; + this.tabPageFindModel.Text = " 查找模板 "; + this.tabPageFindModel.UseVisualStyleBackColor = true; + // + // FindAlwaysCheckBox + // + this.FindAlwaysCheckBox.Location = new System.Drawing.Point(346, 228); + this.FindAlwaysCheckBox.Name = "FindAlwaysCheckBox"; + this.FindAlwaysCheckBox.Size = new System.Drawing.Size(105, 35); + this.FindAlwaysCheckBox.TabIndex = 68; + this.FindAlwaysCheckBox.Text = "Always Find"; + this.FindAlwaysCheckBox.CheckedChanged += new System.EventHandler(this.findAlwaysCheckBox_CheckedChanged); + // + // testImgListBox + // + this.testImgListBox.HorizontalScrollbar = true; + this.testImgListBox.ItemHeight = 12; + this.testImgListBox.Location = new System.Drawing.Point(38, 26); + this.testImgListBox.Name = "testImgListBox"; + this.testImgListBox.Size = new System.Drawing.Size(288, 220); + this.testImgListBox.TabIndex = 67; + this.testImgListBox.SelectedIndexChanged += new System.EventHandler(this.testImgListBox_SelectedIndexChanged); + // + // findModelButton + // + this.findModelButton.Location = new System.Drawing.Point(346, 192); + this.findModelButton.Name = "findModelButton"; + this.findModelButton.Size = new System.Drawing.Size(105, 30); + this.findModelButton.TabIndex = 66; + this.findModelButton.Text = "Find Model"; + this.findModelButton.Click += new System.EventHandler(this.findModelButton_Click); + // + // displayTestImgButton + // + this.displayTestImgButton.Location = new System.Drawing.Point(346, 157); + this.displayTestImgButton.Name = "displayTestImgButton"; + this.displayTestImgButton.Size = new System.Drawing.Size(105, 30); + this.displayTestImgButton.TabIndex = 65; + this.displayTestImgButton.Text = "Display"; + this.displayTestImgButton.Click += new System.EventHandler(this.displayTestImgButton_Click); + // + // deleteAllTestImgButton + // + this.deleteAllTestImgButton.Location = new System.Drawing.Point(346, 95); + this.deleteAllTestImgButton.Name = "deleteAllTestImgButton"; + this.deleteAllTestImgButton.Size = new System.Drawing.Size(105, 30); + this.deleteAllTestImgButton.TabIndex = 64; + this.deleteAllTestImgButton.Text = "Delete All"; + this.deleteAllTestImgButton.Click += new System.EventHandler(this.deleteAllTestImgButton_Click); + // + // deleteTestImgButton + // + this.deleteTestImgButton.Location = new System.Drawing.Point(346, 60); + this.deleteTestImgButton.Name = "deleteTestImgButton"; + this.deleteTestImgButton.Size = new System.Drawing.Size(105, 30); + this.deleteTestImgButton.TabIndex = 63; + this.deleteTestImgButton.Text = "Delete Image"; + this.deleteTestImgButton.Click += new System.EventHandler(this.deleteTestImgButton_Click); + // + // LastPyrLevTrackBar + // + this.LastPyrLevTrackBar.Location = new System.Drawing.Point(230, 474); + this.LastPyrLevTrackBar.Maximum = 5; + this.LastPyrLevTrackBar.Minimum = 1; + this.LastPyrLevTrackBar.Name = "LastPyrLevTrackBar"; + this.LastPyrLevTrackBar.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.LastPyrLevTrackBar.Size = new System.Drawing.Size(231, 45); + this.LastPyrLevTrackBar.TabIndex = 62; + this.LastPyrLevTrackBar.TickFrequency = 20; + this.LastPyrLevTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.LastPyrLevTrackBar.Value = 1; + this.LastPyrLevTrackBar.Scroll += new System.EventHandler(this.LastPyrLevTrackBar_Scroll); + // + // LastPyrLevUpDown + // + this.LastPyrLevUpDown.Location = new System.Drawing.Point(154, 474); + this.LastPyrLevUpDown.Maximum = new decimal(new int[] { + 5, + 0, + 0, + 0}); + this.LastPyrLevUpDown.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.LastPyrLevUpDown.Name = "LastPyrLevUpDown"; + this.LastPyrLevUpDown.Size = new System.Drawing.Size(57, 21); + this.LastPyrLevUpDown.TabIndex = 61; + this.LastPyrLevUpDown.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.LastPyrLevUpDown.ValueChanged += new System.EventHandler(this.LastPyrLevUpDown_ValueChanged); + // + // label18 + // + this.label18.Location = new System.Drawing.Point(38, 465); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(107, 43); + this.label18.TabIndex = 60; + this.label18.Text = "Last Pyramid Level"; + this.label18.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // SubPixelBox + // + this.SubPixelBox.Items.AddRange(new object[] { + "none", + "interpolation", + "least_squares", + "least_squares_high", + "least_squares_very_high"}); + this.SubPixelBox.Location = new System.Drawing.Point(154, 437); + this.SubPixelBox.Name = "SubPixelBox"; + this.SubPixelBox.Size = new System.Drawing.Size(297, 20); + this.SubPixelBox.TabIndex = 59; + this.SubPixelBox.SelectedIndexChanged += new System.EventHandler(this.SubPixelBox_SelectedIndexChanged); + // + // label17 + // + this.label17.Location = new System.Drawing.Point(38, 429); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(107, 43); + this.label17.TabIndex = 58; + this.label17.Text = "Subpixel"; + this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // MaxOverlapTrackBar + // + this.MaxOverlapTrackBar.LargeChange = 10; + this.MaxOverlapTrackBar.Location = new System.Drawing.Point(230, 388); + this.MaxOverlapTrackBar.Maximum = 100; + this.MaxOverlapTrackBar.Name = "MaxOverlapTrackBar"; + this.MaxOverlapTrackBar.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.MaxOverlapTrackBar.Size = new System.Drawing.Size(231, 45); + this.MaxOverlapTrackBar.TabIndex = 57; + this.MaxOverlapTrackBar.TickFrequency = 20; + this.MaxOverlapTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.MaxOverlapTrackBar.Value = 50; + this.MaxOverlapTrackBar.Scroll += new System.EventHandler(this.MaxOverlapTrackBar_Scroll); + // + // MaxOverlapUpDown + // + this.MaxOverlapUpDown.Location = new System.Drawing.Point(154, 388); + this.MaxOverlapUpDown.Name = "MaxOverlapUpDown"; + this.MaxOverlapUpDown.Size = new System.Drawing.Size(57, 21); + this.MaxOverlapUpDown.TabIndex = 56; + this.MaxOverlapUpDown.Value = new decimal(new int[] { + 50, + 0, + 0, + 0}); + this.MaxOverlapUpDown.ValueChanged += new System.EventHandler(this.MaxOverlapUpDown_ValueChanged); + // + // label15 + // + this.label15.Location = new System.Drawing.Point(38, 379); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(107, 43); + this.label15.TabIndex = 55; + this.label15.Text = "MaxOverlap*100"; + this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // GreedinessTrackBar + // + this.GreedinessTrackBar.LargeChange = 10; + this.GreedinessTrackBar.Location = new System.Drawing.Point(230, 362); + this.GreedinessTrackBar.Maximum = 100; + this.GreedinessTrackBar.Name = "GreedinessTrackBar"; + this.GreedinessTrackBar.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.GreedinessTrackBar.Size = new System.Drawing.Size(231, 45); + this.GreedinessTrackBar.TabIndex = 54; + this.GreedinessTrackBar.TickFrequency = 20; + this.GreedinessTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.GreedinessTrackBar.Value = 75; + this.GreedinessTrackBar.Scroll += new System.EventHandler(this.GreedinessTrackBar_Scroll); + // + // GreedinessUpDown + // + this.GreedinessUpDown.Location = new System.Drawing.Point(154, 362); + this.GreedinessUpDown.Name = "GreedinessUpDown"; + this.GreedinessUpDown.Size = new System.Drawing.Size(57, 21); + this.GreedinessUpDown.TabIndex = 53; + this.GreedinessUpDown.Value = new decimal(new int[] { + 75, + 0, + 0, + 0}); + this.GreedinessUpDown.ValueChanged += new System.EventHandler(this.GreedinessUpDown_ValueChanged); + // + // label16 + // + this.label16.Location = new System.Drawing.Point(38, 353); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(107, 43); + this.label16.TabIndex = 52; + this.label16.Text = "Greediness*100"; + this.label16.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // NumMatchesTrackBar + // + this.NumMatchesTrackBar.LargeChange = 10; + this.NumMatchesTrackBar.Location = new System.Drawing.Point(230, 310); + this.NumMatchesTrackBar.Maximum = 100; + this.NumMatchesTrackBar.Name = "NumMatchesTrackBar"; + this.NumMatchesTrackBar.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.NumMatchesTrackBar.Size = new System.Drawing.Size(231, 45); + this.NumMatchesTrackBar.TabIndex = 51; + this.NumMatchesTrackBar.TickFrequency = 20; + this.NumMatchesTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.NumMatchesTrackBar.Value = 1; + this.NumMatchesTrackBar.Scroll += new System.EventHandler(this.NumMatchesTrackBar_Scroll); + // + // NumMatchesUpDown + // + this.NumMatchesUpDown.Location = new System.Drawing.Point(154, 310); + this.NumMatchesUpDown.Name = "NumMatchesUpDown"; + this.NumMatchesUpDown.Size = new System.Drawing.Size(57, 21); + this.NumMatchesUpDown.TabIndex = 50; + this.NumMatchesUpDown.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.NumMatchesUpDown.ValueChanged += new System.EventHandler(this.NumMatchesUpDown_ValueChanged); + // + // label14 + // + this.label14.Location = new System.Drawing.Point(38, 302); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(107, 43); + this.label14.TabIndex = 49; + this.label14.Text = "NumMatches"; + this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // MinScoreTrackBar + // + this.MinScoreTrackBar.LargeChange = 10; + this.MinScoreTrackBar.Location = new System.Drawing.Point(230, 284); + this.MinScoreTrackBar.Maximum = 100; + this.MinScoreTrackBar.Name = "MinScoreTrackBar"; + this.MinScoreTrackBar.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.MinScoreTrackBar.Size = new System.Drawing.Size(231, 45); + this.MinScoreTrackBar.TabIndex = 48; + this.MinScoreTrackBar.TickFrequency = 20; + this.MinScoreTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.MinScoreTrackBar.Value = 50; + this.MinScoreTrackBar.Scroll += new System.EventHandler(this.MinScoreTrackBar_Scroll); + // + // MinScoreUpDown + // + this.MinScoreUpDown.Location = new System.Drawing.Point(154, 284); + this.MinScoreUpDown.Name = "MinScoreUpDown"; + this.MinScoreUpDown.Size = new System.Drawing.Size(57, 21); + this.MinScoreUpDown.TabIndex = 47; + this.MinScoreUpDown.Value = new decimal(new int[] { + 50, + 0, + 0, + 0}); + this.MinScoreUpDown.ValueChanged += new System.EventHandler(this.MinScoreUpDown_ValueChanged); + // + // label13 + // + this.label13.Location = new System.Drawing.Point(38, 276); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(107, 43); + this.label13.TabIndex = 46; + this.label13.Text = "MinScore*100"; + this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // loadTestImgButton + // + this.loadTestImgButton.Location = new System.Drawing.Point(346, 26); + this.loadTestImgButton.Name = "loadTestImgButton"; + this.loadTestImgButton.Size = new System.Drawing.Size(105, 30); + this.loadTestImgButton.TabIndex = 0; + this.loadTestImgButton.Text = "Load Images"; + this.loadTestImgButton.Click += new System.EventHandler(this.LoadTestImgButton_Click); + // + // tabPageOptimRecognition + // + this.tabPageOptimRecognition.Controls.Add(this.groupBox1); + this.tabPageOptimRecognition.Controls.Add(this.panel1); + this.tabPageOptimRecognition.Controls.Add(this.OptimizeButton); + this.tabPageOptimRecognition.Location = new System.Drawing.Point(4, 22); + this.tabPageOptimRecognition.Name = "tabPageOptimRecognition"; + this.tabPageOptimRecognition.Size = new System.Drawing.Size(482, 568); + this.tabPageOptimRecognition.TabIndex = 1; + this.tabPageOptimRecognition.Text = " 优化识别 "; + this.tabPageOptimRecognition.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.RecogNoManSelUpDown); + this.groupBox1.Controls.Add(this.label19); + this.groupBox1.Controls.Add(this.FindAtLeastOneModelButton); + this.groupBox1.Controls.Add(this.FindMaxNoOfModelButton); + this.groupBox1.Controls.Add(this.FindNoOfInstButton); + this.groupBox1.Controls.Add(this.recogRateTrackBar); + this.groupBox1.Controls.Add(this.recogRateUpDown); + this.groupBox1.Controls.Add(this.RecognRateComboBox); + this.groupBox1.Controls.Add(this.label20); + this.groupBox1.Location = new System.Drawing.Point(19, 26); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(437, 198); + this.groupBox1.TabIndex = 56; + this.groupBox1.TabStop = false; + // + // RecogNoManSelUpDown + // + this.RecogNoManSelUpDown.Location = new System.Drawing.Point(365, 39); + this.RecogNoManSelUpDown.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.RecogNoManSelUpDown.Name = "RecogNoManSelUpDown"; + this.RecogNoManSelUpDown.Size = new System.Drawing.Size(57, 21); + this.RecogNoManSelUpDown.TabIndex = 54; + this.RecogNoManSelUpDown.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.RecogNoManSelUpDown.ValueChanged += new System.EventHandler(this.RecogNoManSelUpDown_ValueChanged); + // + // label19 + // + this.label19.Location = new System.Drawing.Point(19, 43); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(67, 52); + this.label19.TabIndex = 1; + this.label19.Text = "Mode"; + this.label19.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // FindAtLeastOneModelButton + // + this.FindAtLeastOneModelButton.Location = new System.Drawing.Point(86, 60); + this.FindAtLeastOneModelButton.Name = "FindAtLeastOneModelButton"; + this.FindAtLeastOneModelButton.Size = new System.Drawing.Size(336, 22); + this.FindAtLeastOneModelButton.TabIndex = 2; + this.FindAtLeastOneModelButton.Text = " Find at least one model instance per image"; + this.FindAtLeastOneModelButton.CheckedChanged += new System.EventHandler(this.FindAtLeastOneModelButton_CheckedChanged); + // + // FindMaxNoOfModelButton + // + this.FindMaxNoOfModelButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.FindMaxNoOfModelButton.Location = new System.Drawing.Point(86, 86); + this.FindMaxNoOfModelButton.Name = "FindMaxNoOfModelButton"; + this.FindMaxNoOfModelButton.Size = new System.Drawing.Size(346, 17); + this.FindMaxNoOfModelButton.TabIndex = 3; + this.FindMaxNoOfModelButton.Text = " Find maximum number of model instances per image"; + this.FindMaxNoOfModelButton.CheckedChanged += new System.EventHandler(this.FindMaxNoOfModelButton_CheckedChanged); + // + // FindNoOfInstButton + // + this.FindNoOfInstButton.Checked = true; + this.FindNoOfInstButton.ForeColor = System.Drawing.SystemColors.ControlText; + this.FindNoOfInstButton.Location = new System.Drawing.Point(86, 34); + this.FindNoOfInstButton.Name = "FindNoOfInstButton"; + this.FindNoOfInstButton.Size = new System.Drawing.Size(298, 26); + this.FindNoOfInstButton.TabIndex = 0; + this.FindNoOfInstButton.TabStop = true; + this.FindNoOfInstButton.Text = " Find number of instances specified"; + this.FindNoOfInstButton.CheckedChanged += new System.EventHandler(this.FindNoOfInstButton_CheckedChanged); + // + // recogRateTrackBar + // + this.recogRateTrackBar.LargeChange = 10; + this.recogRateTrackBar.Location = new System.Drawing.Point(221, 138); + this.recogRateTrackBar.Maximum = 100; + this.recogRateTrackBar.Name = "recogRateTrackBar"; + this.recogRateTrackBar.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.recogRateTrackBar.Size = new System.Drawing.Size(201, 45); + this.recogRateTrackBar.TabIndex = 53; + this.recogRateTrackBar.TickFrequency = 20; + this.recogRateTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.recogRateTrackBar.Value = 100; + this.recogRateTrackBar.Scroll += new System.EventHandler(this.recogRateTrackBar_Scroll); + // + // recogRateUpDown + // + this.recogRateUpDown.Location = new System.Drawing.Point(154, 138); + this.recogRateUpDown.Name = "recogRateUpDown"; + this.recogRateUpDown.Size = new System.Drawing.Size(57, 21); + this.recogRateUpDown.TabIndex = 52; + this.recogRateUpDown.Value = new decimal(new int[] { + 100, + 0, + 0, + 0}); + this.recogRateUpDown.ValueChanged += new System.EventHandler(this.recogRateUpDown_ValueChanged); + // + // RecognRateComboBox + // + this.RecognRateComboBox.Items.AddRange(new object[] { + "=", + ">="}); + this.RecognRateComboBox.Location = new System.Drawing.Point(86, 138); + this.RecognRateComboBox.Name = "RecognRateComboBox"; + this.RecognRateComboBox.Size = new System.Drawing.Size(48, 20); + this.RecognRateComboBox.TabIndex = 5; + this.RecognRateComboBox.SelectedIndexChanged += new System.EventHandler(this.RecognRateComboBox_SelectedIndexChanged); + // + // label20 + // + this.label20.Location = new System.Drawing.Point(19, 129); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(58, 43); + this.label20.TabIndex = 4; + this.label20.Text = "Recogn Rate"; + this.label20.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // panel1 + // + this.panel1.Controls.Add(this.labelOptStatus); + this.panel1.Controls.Add(this.label35); + this.panel1.Controls.Add(this.label34); + this.panel1.Controls.Add(this.label33); + this.panel1.Controls.Add(this.label32); + this.panel1.Controls.Add(this.label31); + this.panel1.Controls.Add(this.labelRecogn21); + this.panel1.Controls.Add(this.labelRecogn24); + this.panel1.Controls.Add(this.labelRecogn14); + this.panel1.Controls.Add(this.labelRecogn23); + this.panel1.Controls.Add(this.labelRecogn13); + this.panel1.Controls.Add(this.labelRecogn22); + this.panel1.Controls.Add(this.labelRecogn12); + this.panel1.Controls.Add(this.labelRecogn11); + this.panel1.Controls.Add(this.label29); + this.panel1.Controls.Add(this.label30); + this.panel1.Location = new System.Drawing.Point(19, 233); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(442, 232); + this.panel1.TabIndex = 55; + // + // labelOptStatus + // + this.labelOptStatus.BackColor = System.Drawing.Color.White; + this.labelOptStatus.Location = new System.Drawing.Point(10, 17); + this.labelOptStatus.Name = "labelOptStatus"; + this.labelOptStatus.Size = new System.Drawing.Size(422, 26); + this.labelOptStatus.TabIndex = 63; + this.labelOptStatus.Text = " Optimization Status: "; + this.labelOptStatus.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label35 + // + this.label35.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label35.Location = new System.Drawing.Point(10, 190); + this.label35.Name = "label35"; + this.label35.Size = new System.Drawing.Size(134, 34); + this.label35.TabIndex = 62; + this.label35.Text = "Average Time"; + this.label35.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label34 + // + this.label34.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label34.Location = new System.Drawing.Point(10, 155); + this.label34.Name = "label34"; + this.label34.Size = new System.Drawing.Size(134, 35); + this.label34.TabIndex = 61; + this.label34.Text = "Recognition Rate"; + this.label34.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label33 + // + this.label33.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label33.Location = new System.Drawing.Point(10, 121); + this.label33.Name = "label33"; + this.label33.Size = new System.Drawing.Size(134, 34); + this.label33.TabIndex = 60; + this.label33.Text = "Greediness"; + this.label33.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label32 + // + this.label32.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label32.Location = new System.Drawing.Point(10, 43); + this.label32.Name = "label32"; + this.label32.Size = new System.Drawing.Size(105, 35); + this.label32.TabIndex = 59; + this.label32.Text = "Statistics"; + this.label32.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label31 + // + this.label31.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label31.Location = new System.Drawing.Point(10, 86); + this.label31.Name = "label31"; + this.label31.Size = new System.Drawing.Size(134, 35); + this.label31.TabIndex = 58; + this.label31.Text = "Minimum Score"; + this.label31.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labelRecogn21 + // + this.labelRecogn21.BackColor = System.Drawing.Color.White; + this.labelRecogn21.Location = new System.Drawing.Point(307, 78); + this.labelRecogn21.Name = "labelRecogn21"; + this.labelRecogn21.Size = new System.Drawing.Size(125, 34); + this.labelRecogn21.TabIndex = 8; + this.labelRecogn21.Text = "-"; + this.labelRecogn21.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelRecogn24 + // + this.labelRecogn24.BackColor = System.Drawing.Color.White; + this.labelRecogn24.Location = new System.Drawing.Point(307, 194); + this.labelRecogn24.Name = "labelRecogn24"; + this.labelRecogn24.Size = new System.Drawing.Size(125, 34); + this.labelRecogn24.TabIndex = 7; + this.labelRecogn24.Text = "-"; + this.labelRecogn24.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelRecogn14 + // + this.labelRecogn14.BackColor = System.Drawing.Color.White; + this.labelRecogn14.Location = new System.Drawing.Point(173, 194); + this.labelRecogn14.Name = "labelRecogn14"; + this.labelRecogn14.Size = new System.Drawing.Size(125, 34); + this.labelRecogn14.TabIndex = 6; + this.labelRecogn14.Text = "-"; + this.labelRecogn14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelRecogn23 + // + this.labelRecogn23.BackColor = System.Drawing.Color.White; + this.labelRecogn23.Location = new System.Drawing.Point(307, 155); + this.labelRecogn23.Name = "labelRecogn23"; + this.labelRecogn23.Size = new System.Drawing.Size(125, 35); + this.labelRecogn23.TabIndex = 5; + this.labelRecogn23.Text = "-"; + this.labelRecogn23.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelRecogn13 + // + this.labelRecogn13.BackColor = System.Drawing.Color.White; + this.labelRecogn13.Location = new System.Drawing.Point(173, 155); + this.labelRecogn13.Name = "labelRecogn13"; + this.labelRecogn13.Size = new System.Drawing.Size(125, 35); + this.labelRecogn13.TabIndex = 4; + this.labelRecogn13.Text = "-"; + this.labelRecogn13.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelRecogn22 + // + this.labelRecogn22.BackColor = System.Drawing.Color.White; + this.labelRecogn22.Location = new System.Drawing.Point(307, 116); + this.labelRecogn22.Name = "labelRecogn22"; + this.labelRecogn22.Size = new System.Drawing.Size(125, 35); + this.labelRecogn22.TabIndex = 3; + this.labelRecogn22.Text = "-"; + this.labelRecogn22.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelRecogn12 + // + this.labelRecogn12.BackColor = System.Drawing.Color.White; + this.labelRecogn12.Location = new System.Drawing.Point(173, 116); + this.labelRecogn12.Name = "labelRecogn12"; + this.labelRecogn12.Size = new System.Drawing.Size(125, 35); + this.labelRecogn12.TabIndex = 2; + this.labelRecogn12.Text = "-"; + this.labelRecogn12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelRecogn11 + // + this.labelRecogn11.BackColor = System.Drawing.Color.White; + this.labelRecogn11.Location = new System.Drawing.Point(173, 78); + this.labelRecogn11.Name = "labelRecogn11"; + this.labelRecogn11.Size = new System.Drawing.Size(125, 34); + this.labelRecogn11.TabIndex = 0; + this.labelRecogn11.Text = "-"; + this.labelRecogn11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label29 + // + this.label29.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label29.Location = new System.Drawing.Point(163, 43); + this.label29.Name = "label29"; + this.label29.Size = new System.Drawing.Size(135, 35); + this.label29.TabIndex = 56; + this.label29.Text = "Last Test Run"; + this.label29.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label30 + // + this.label30.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label30.Location = new System.Drawing.Point(298, 43); + this.label30.Name = "label30"; + this.label30.Size = new System.Drawing.Size(134, 35); + this.label30.TabIndex = 57; + this.label30.Text = "Optimum Test Run"; + this.label30.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // OptimizeButton + // + this.OptimizeButton.Location = new System.Drawing.Point(326, 470); + this.OptimizeButton.Name = "OptimizeButton"; + this.OptimizeButton.Size = new System.Drawing.Size(125, 34); + this.OptimizeButton.TabIndex = 54; + this.OptimizeButton.Text = "Optimize"; + this.OptimizeButton.Click += new System.EventHandler(this.runOptimizeSpeedButton_Click); + // + // tabPageInspectModel + // + this.tabPageInspectModel.Controls.Add(this.label21); + this.tabPageInspectModel.Controls.Add(this.InspectMaxNoMatchUpDown); + this.tabPageInspectModel.Controls.Add(this.groupBox4); + this.tabPageInspectModel.Controls.Add(this.groupBox3); + this.tabPageInspectModel.Controls.Add(this.StatisticsButton); + this.tabPageInspectModel.Location = new System.Drawing.Point(4, 22); + this.tabPageInspectModel.Name = "tabPageInspectModel"; + this.tabPageInspectModel.Size = new System.Drawing.Size(482, 568); + this.tabPageInspectModel.TabIndex = 0; + this.tabPageInspectModel.Text = " 模板检测 "; + this.tabPageInspectModel.UseVisualStyleBackColor = true; + // + // label21 + // + this.label21.Location = new System.Drawing.Point(19, 482); + this.label21.Name = "label21"; + this.label21.Size = new System.Drawing.Size(192, 26); + this.label21.TabIndex = 4; + this.label21.Text = "Maximum Number of Matches"; + // + // InspectMaxNoMatchUpDown + // + this.InspectMaxNoMatchUpDown.Location = new System.Drawing.Point(211, 482); + this.InspectMaxNoMatchUpDown.Name = "InspectMaxNoMatchUpDown"; + this.InspectMaxNoMatchUpDown.Size = new System.Drawing.Size(58, 21); + this.InspectMaxNoMatchUpDown.TabIndex = 3; + this.InspectMaxNoMatchUpDown.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.InspectMaxNoMatchUpDown.ValueChanged += new System.EventHandler(this.InspectMaxNoMatchUpDown_ValueChanged); + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.label72); + this.groupBox4.Controls.Add(this.label71); + this.groupBox4.Controls.Add(this.label70); + this.groupBox4.Controls.Add(this.label69); + this.groupBox4.Controls.Add(this.label68); + this.groupBox4.Controls.Add(this.label67); + this.groupBox4.Controls.Add(this.label66); + this.groupBox4.Controls.Add(this.label65); + this.groupBox4.Controls.Add(this.label64); + this.groupBox4.Controls.Add(this.label63); + this.groupBox4.Controls.Add(this.label62); + this.groupBox4.Controls.Add(this.label43); + this.groupBox4.Controls.Add(this.labelInspect37); + this.groupBox4.Controls.Add(this.labelInspect27); + this.groupBox4.Controls.Add(this.labelInspect17); + this.groupBox4.Controls.Add(this.labelInspect36); + this.groupBox4.Controls.Add(this.labelInspect26); + this.groupBox4.Controls.Add(this.labelInspect16); + this.groupBox4.Controls.Add(this.labelInspect35); + this.groupBox4.Controls.Add(this.labelInspect25); + this.groupBox4.Controls.Add(this.labelInspect15); + this.groupBox4.Controls.Add(this.labelInspect34); + this.groupBox4.Controls.Add(this.labelInspect24); + this.groupBox4.Controls.Add(this.labelInspect14); + this.groupBox4.Controls.Add(this.labelInspect33); + this.groupBox4.Controls.Add(this.labelInspect23); + this.groupBox4.Controls.Add(this.labelInspect13); + this.groupBox4.Controls.Add(this.labelInspect32); + this.groupBox4.Controls.Add(this.labelInspect22); + this.groupBox4.Controls.Add(this.labelInspect12); + this.groupBox4.Controls.Add(this.labelInspect31); + this.groupBox4.Controls.Add(this.labelInspect21); + this.groupBox4.Controls.Add(this.labelInspect11); + this.groupBox4.Location = new System.Drawing.Point(19, 215); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(432, 250); + this.groupBox4.TabIndex = 2; + this.groupBox4.TabStop = false; + this.groupBox4.Text = "Statistics"; + // + // label72 + // + this.label72.BackColor = System.Drawing.SystemColors.Control; + this.label72.Location = new System.Drawing.Point(326, 26); + this.label72.Name = "label72"; + this.label72.Size = new System.Drawing.Size(77, 21); + this.label72.TabIndex = 33; + this.label72.Text = "Extent"; + this.label72.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label71 + // + this.label71.BackColor = System.Drawing.SystemColors.Control; + this.label71.Location = new System.Drawing.Point(230, 26); + this.label71.Name = "label71"; + this.label71.Size = new System.Drawing.Size(96, 21); + this.label71.TabIndex = 32; + this.label71.Text = "Maximum"; + this.label71.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label70 + // + this.label70.BackColor = System.Drawing.SystemColors.Control; + this.label70.Location = new System.Drawing.Point(134, 26); + this.label70.Name = "label70"; + this.label70.Size = new System.Drawing.Size(96, 21); + this.label70.TabIndex = 31; + this.label70.Text = "Minimum"; + this.label70.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label69 + // + this.label69.BackColor = System.Drawing.SystemColors.Control; + this.label69.Location = new System.Drawing.Point(19, 26); + this.label69.Name = "label69"; + this.label69.Size = new System.Drawing.Size(115, 21); + this.label69.TabIndex = 30; + this.label69.Text = "Recognition"; + this.label69.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label68 + // + this.label68.BackColor = System.Drawing.SystemColors.Control; + this.label68.Location = new System.Drawing.Point(19, 218); + this.label68.Name = "label68"; + this.label68.Size = new System.Drawing.Size(115, 21); + this.label68.TabIndex = 29; + this.label68.Text = "Column Scale"; + this.label68.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label67 + // + this.label67.BackColor = System.Drawing.SystemColors.Control; + this.label67.Location = new System.Drawing.Point(19, 194); + this.label67.Name = "label67"; + this.label67.Size = new System.Drawing.Size(115, 21); + this.label67.TabIndex = 28; + this.label67.Text = "Row Scale"; + this.label67.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label66 + // + this.label66.BackColor = System.Drawing.SystemColors.Control; + this.label66.Location = new System.Drawing.Point(19, 170); + this.label66.Name = "label66"; + this.label66.Size = new System.Drawing.Size(115, 22); + this.label66.TabIndex = 27; + this.label66.Text = "Angle"; + this.label66.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label65 + // + this.label65.BackColor = System.Drawing.SystemColors.Control; + this.label65.Location = new System.Drawing.Point(19, 146); + this.label65.Name = "label65"; + this.label65.Size = new System.Drawing.Size(115, 22); + this.label65.TabIndex = 26; + this.label65.Text = "Column"; + this.label65.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label64 + // + this.label64.BackColor = System.Drawing.SystemColors.Control; + this.label64.Location = new System.Drawing.Point(19, 123); + this.label64.Name = "label64"; + this.label64.Size = new System.Drawing.Size(115, 21); + this.label64.TabIndex = 25; + this.label64.Text = "Row"; + this.label64.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label63 + // + this.label63.BackColor = System.Drawing.SystemColors.Control; + this.label63.Location = new System.Drawing.Point(19, 99); + this.label63.Name = "label63"; + this.label63.Size = new System.Drawing.Size(115, 22); + this.label63.TabIndex = 24; + this.label63.Text = "Pose Bounds"; + this.label63.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label62 + // + this.label62.BackColor = System.Drawing.SystemColors.Control; + this.label62.Location = new System.Drawing.Point(19, 75); + this.label62.Name = "label62"; + this.label62.Size = new System.Drawing.Size(115, 22); + this.label62.TabIndex = 23; + this.label62.Text = "Time (ms)"; + this.label62.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label43 + // + this.label43.BackColor = System.Drawing.SystemColors.Control; + this.label43.Location = new System.Drawing.Point(19, 52); + this.label43.Name = "label43"; + this.label43.Size = new System.Drawing.Size(115, 21); + this.label43.TabIndex = 22; + this.label43.Text = "Score"; + this.label43.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labelInspect37 + // + this.labelInspect37.BackColor = System.Drawing.Color.White; + this.labelInspect37.Location = new System.Drawing.Point(326, 218); + this.labelInspect37.Name = "labelInspect37"; + this.labelInspect37.Size = new System.Drawing.Size(92, 21); + this.labelInspect37.TabIndex = 21; + this.labelInspect37.Text = "-"; + this.labelInspect37.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect27 + // + this.labelInspect27.BackColor = System.Drawing.Color.White; + this.labelInspect27.Location = new System.Drawing.Point(230, 218); + this.labelInspect27.Name = "labelInspect27"; + this.labelInspect27.Size = new System.Drawing.Size(92, 21); + this.labelInspect27.TabIndex = 20; + this.labelInspect27.Text = "-"; + this.labelInspect27.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect17 + // + this.labelInspect17.BackColor = System.Drawing.Color.White; + this.labelInspect17.Location = new System.Drawing.Point(134, 218); + this.labelInspect17.Name = "labelInspect17"; + this.labelInspect17.Size = new System.Drawing.Size(92, 21); + this.labelInspect17.TabIndex = 19; + this.labelInspect17.Text = "-"; + this.labelInspect17.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect36 + // + this.labelInspect36.BackColor = System.Drawing.Color.White; + this.labelInspect36.Location = new System.Drawing.Point(326, 194); + this.labelInspect36.Name = "labelInspect36"; + this.labelInspect36.Size = new System.Drawing.Size(92, 21); + this.labelInspect36.TabIndex = 18; + this.labelInspect36.Text = "-"; + this.labelInspect36.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect26 + // + this.labelInspect26.BackColor = System.Drawing.Color.White; + this.labelInspect26.Location = new System.Drawing.Point(230, 194); + this.labelInspect26.Name = "labelInspect26"; + this.labelInspect26.Size = new System.Drawing.Size(92, 21); + this.labelInspect26.TabIndex = 17; + this.labelInspect26.Text = "-"; + this.labelInspect26.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect16 + // + this.labelInspect16.BackColor = System.Drawing.Color.White; + this.labelInspect16.Location = new System.Drawing.Point(134, 194); + this.labelInspect16.Name = "labelInspect16"; + this.labelInspect16.Size = new System.Drawing.Size(92, 21); + this.labelInspect16.TabIndex = 16; + this.labelInspect16.Text = "-"; + this.labelInspect16.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect35 + // + this.labelInspect35.BackColor = System.Drawing.Color.White; + this.labelInspect35.Location = new System.Drawing.Point(326, 170); + this.labelInspect35.Name = "labelInspect35"; + this.labelInspect35.Size = new System.Drawing.Size(92, 22); + this.labelInspect35.TabIndex = 15; + this.labelInspect35.Text = "-"; + this.labelInspect35.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect25 + // + this.labelInspect25.BackColor = System.Drawing.Color.White; + this.labelInspect25.Location = new System.Drawing.Point(230, 170); + this.labelInspect25.Name = "labelInspect25"; + this.labelInspect25.Size = new System.Drawing.Size(92, 22); + this.labelInspect25.TabIndex = 14; + this.labelInspect25.Text = "-"; + this.labelInspect25.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect15 + // + this.labelInspect15.BackColor = System.Drawing.Color.White; + this.labelInspect15.Location = new System.Drawing.Point(134, 170); + this.labelInspect15.Name = "labelInspect15"; + this.labelInspect15.Size = new System.Drawing.Size(92, 22); + this.labelInspect15.TabIndex = 13; + this.labelInspect15.Text = "-"; + this.labelInspect15.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect34 + // + this.labelInspect34.BackColor = System.Drawing.Color.White; + this.labelInspect34.Location = new System.Drawing.Point(326, 146); + this.labelInspect34.Name = "labelInspect34"; + this.labelInspect34.Size = new System.Drawing.Size(92, 22); + this.labelInspect34.TabIndex = 12; + this.labelInspect34.Text = "-"; + this.labelInspect34.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect24 + // + this.labelInspect24.BackColor = System.Drawing.Color.White; + this.labelInspect24.Location = new System.Drawing.Point(230, 146); + this.labelInspect24.Name = "labelInspect24"; + this.labelInspect24.Size = new System.Drawing.Size(92, 22); + this.labelInspect24.TabIndex = 11; + this.labelInspect24.Text = "-"; + this.labelInspect24.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect14 + // + this.labelInspect14.BackColor = System.Drawing.Color.White; + this.labelInspect14.Location = new System.Drawing.Point(134, 146); + this.labelInspect14.Name = "labelInspect14"; + this.labelInspect14.Size = new System.Drawing.Size(92, 22); + this.labelInspect14.TabIndex = 10; + this.labelInspect14.Text = "-"; + this.labelInspect14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect33 + // + this.labelInspect33.BackColor = System.Drawing.Color.White; + this.labelInspect33.Location = new System.Drawing.Point(326, 123); + this.labelInspect33.Name = "labelInspect33"; + this.labelInspect33.Size = new System.Drawing.Size(92, 21); + this.labelInspect33.TabIndex = 9; + this.labelInspect33.Text = "-"; + this.labelInspect33.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect23 + // + this.labelInspect23.BackColor = System.Drawing.Color.White; + this.labelInspect23.Location = new System.Drawing.Point(230, 123); + this.labelInspect23.Name = "labelInspect23"; + this.labelInspect23.Size = new System.Drawing.Size(92, 21); + this.labelInspect23.TabIndex = 8; + this.labelInspect23.Text = "-"; + this.labelInspect23.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect13 + // + this.labelInspect13.BackColor = System.Drawing.Color.White; + this.labelInspect13.Location = new System.Drawing.Point(134, 123); + this.labelInspect13.Name = "labelInspect13"; + this.labelInspect13.Size = new System.Drawing.Size(92, 21); + this.labelInspect13.TabIndex = 7; + this.labelInspect13.Text = "-"; + this.labelInspect13.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect32 + // + this.labelInspect32.BackColor = System.Drawing.Color.White; + this.labelInspect32.Location = new System.Drawing.Point(326, 75); + this.labelInspect32.Name = "labelInspect32"; + this.labelInspect32.Size = new System.Drawing.Size(92, 22); + this.labelInspect32.TabIndex = 6; + this.labelInspect32.Text = "-"; + this.labelInspect32.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect22 + // + this.labelInspect22.BackColor = System.Drawing.Color.White; + this.labelInspect22.Location = new System.Drawing.Point(230, 75); + this.labelInspect22.Name = "labelInspect22"; + this.labelInspect22.Size = new System.Drawing.Size(92, 22); + this.labelInspect22.TabIndex = 5; + this.labelInspect22.Text = "-"; + this.labelInspect22.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect12 + // + this.labelInspect12.BackColor = System.Drawing.Color.White; + this.labelInspect12.Location = new System.Drawing.Point(134, 75); + this.labelInspect12.Name = "labelInspect12"; + this.labelInspect12.Size = new System.Drawing.Size(92, 22); + this.labelInspect12.TabIndex = 4; + this.labelInspect12.Text = "-"; + this.labelInspect12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect31 + // + this.labelInspect31.BackColor = System.Drawing.Color.White; + this.labelInspect31.Location = new System.Drawing.Point(326, 52); + this.labelInspect31.Name = "labelInspect31"; + this.labelInspect31.Size = new System.Drawing.Size(92, 21); + this.labelInspect31.TabIndex = 2; + this.labelInspect31.Text = "-"; + this.labelInspect31.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect21 + // + this.labelInspect21.BackColor = System.Drawing.Color.White; + this.labelInspect21.Location = new System.Drawing.Point(230, 52); + this.labelInspect21.Name = "labelInspect21"; + this.labelInspect21.Size = new System.Drawing.Size(92, 21); + this.labelInspect21.TabIndex = 1; + this.labelInspect21.Text = "-"; + this.labelInspect21.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect11 + // + this.labelInspect11.BackColor = System.Drawing.Color.White; + this.labelInspect11.Location = new System.Drawing.Point(134, 52); + this.labelInspect11.Name = "labelInspect11"; + this.labelInspect11.Size = new System.Drawing.Size(92, 21); + this.labelInspect11.TabIndex = 0; + this.labelInspect11.Text = "-"; + this.labelInspect11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.label39); + this.groupBox3.Controls.Add(this.label38); + this.groupBox3.Controls.Add(this.label37); + this.groupBox3.Controls.Add(this.label36); + this.groupBox3.Controls.Add(this.label28); + this.groupBox3.Controls.Add(this.label27); + this.groupBox3.Controls.Add(this.label26); + this.groupBox3.Controls.Add(this.labelInspect05); + this.groupBox3.Controls.Add(this.labelInspect04); + this.groupBox3.Controls.Add(this.labelInspect03); + this.groupBox3.Controls.Add(this.labelInspect02); + this.groupBox3.Controls.Add(this.labelInspect01); + this.groupBox3.Location = new System.Drawing.Point(19, 17); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(432, 190); + this.groupBox3.TabIndex = 1; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "Recognition Rate"; + // + // label39 + // + this.label39.Location = new System.Drawing.Point(67, 146); + this.label39.Name = "label39"; + this.label39.Size = new System.Drawing.Size(144, 35); + this.label39.TabIndex = 11; + this.label39.Text = "in rel. to maximum No. of matches"; + this.label39.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label38 + // + this.label38.Location = new System.Drawing.Point(67, 112); + this.label38.Name = "label38"; + this.label38.Size = new System.Drawing.Size(144, 34); + this.label38.TabIndex = 10; + this.label38.Text = "in rel. to specified No. of vis. models"; + this.label38.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label37 + // + this.label37.Location = new System.Drawing.Point(67, 78); + this.label37.Name = "label37"; + this.label37.Size = new System.Drawing.Size(144, 34); + this.label37.TabIndex = 9; + this.label37.Text = "with the maximum number of matches"; + this.label37.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label36 + // + this.label36.Location = new System.Drawing.Point(67, 43); + this.label36.Name = "label36"; + this.label36.Size = new System.Drawing.Size(144, 35); + this.label36.TabIndex = 8; + this.label36.Text = "with at least the spec. number of models"; + this.label36.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label28 + // + this.label28.Location = new System.Drawing.Point(67, 17); + this.label28.Name = "label28"; + this.label28.Size = new System.Drawing.Size(144, 26); + this.label28.TabIndex = 7; + this.label28.Text = "with at least one match"; + this.label28.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label27 + // + this.label27.Location = new System.Drawing.Point(10, 121); + this.label27.Name = "label27"; + this.label27.Size = new System.Drawing.Size(67, 25); + this.label27.TabIndex = 6; + this.label27.Text = "Matches:"; + // + // label26 + // + this.label26.Location = new System.Drawing.Point(10, 17); + this.label26.Name = "label26"; + this.label26.Size = new System.Drawing.Size(57, 26); + this.label26.TabIndex = 5; + this.label26.Text = "Images:"; + this.label26.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect05 + // + this.labelInspect05.BackColor = System.Drawing.Color.White; + this.labelInspect05.Location = new System.Drawing.Point(211, 151); + this.labelInspect05.Name = "labelInspect05"; + this.labelInspect05.Size = new System.Drawing.Size(207, 26); + this.labelInspect05.TabIndex = 4; + this.labelInspect05.Text = "100.00 % (1 of 1 model)"; + this.labelInspect05.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect04 + // + this.labelInspect04.BackColor = System.Drawing.Color.White; + this.labelInspect04.Location = new System.Drawing.Point(209, 121); + this.labelInspect04.Name = "labelInspect04"; + this.labelInspect04.Size = new System.Drawing.Size(209, 25); + this.labelInspect04.TabIndex = 3; + this.labelInspect04.Text = "100.00 % (1 of 1 model)"; + this.labelInspect04.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect03 + // + this.labelInspect03.BackColor = System.Drawing.Color.White; + this.labelInspect03.Location = new System.Drawing.Point(209, 80); + this.labelInspect03.Name = "labelInspect03"; + this.labelInspect03.Size = new System.Drawing.Size(209, 26); + this.labelInspect03.TabIndex = 2; + this.labelInspect03.Text = "100.00 % (1 of 1 image)"; + this.labelInspect03.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect02 + // + this.labelInspect02.BackColor = System.Drawing.Color.White; + this.labelInspect02.Location = new System.Drawing.Point(209, 50); + this.labelInspect02.Name = "labelInspect02"; + this.labelInspect02.Size = new System.Drawing.Size(209, 25); + this.labelInspect02.TabIndex = 1; + this.labelInspect02.Text = "100.00 % (1 of 1 image)"; + this.labelInspect02.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labelInspect01 + // + this.labelInspect01.BackColor = System.Drawing.Color.White; + this.labelInspect01.Location = new System.Drawing.Point(209, 19); + this.labelInspect01.Name = "labelInspect01"; + this.labelInspect01.Size = new System.Drawing.Size(209, 26); + this.labelInspect01.TabIndex = 0; + this.labelInspect01.Text = "100.00 % (1 of 1 image)"; + this.labelInspect01.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // StatisticsButton + // + this.StatisticsButton.Location = new System.Drawing.Point(326, 474); + this.StatisticsButton.Name = "StatisticsButton"; + this.StatisticsButton.Size = new System.Drawing.Size(125, 34); + this.StatisticsButton.TabIndex = 0; + this.StatisticsButton.Text = "Run"; + this.StatisticsButton.Click += new System.EventHandler(this.runStatisticsButton_Click); + // + // tabPageSaveConfige + // + this.tabPageSaveConfige.Controls.Add(this.butSaveConfige); + this.tabPageSaveConfige.Controls.Add(this.groupBox2); + this.tabPageSaveConfige.Location = new System.Drawing.Point(4, 22); + this.tabPageSaveConfige.Name = "tabPageSaveConfige"; + this.tabPageSaveConfige.Padding = new System.Windows.Forms.Padding(3); + this.tabPageSaveConfige.Size = new System.Drawing.Size(482, 568); + this.tabPageSaveConfige.TabIndex = 2; + this.tabPageSaveConfige.Text = " 参数保存 "; + this.tabPageSaveConfige.UseVisualStyleBackColor = true; + // + // butSaveConfige + // + this.butSaveConfige.Location = new System.Drawing.Point(351, 442); + this.butSaveConfige.Name = "butSaveConfige"; + this.butSaveConfige.Size = new System.Drawing.Size(101, 49); + this.butSaveConfige.TabIndex = 35; + this.butSaveConfige.Text = "SaveConfige"; + this.butSaveConfige.UseVisualStyleBackColor = true; + this.butSaveConfige.Click += new System.EventHandler(this.butSaveConfige_Click); + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.labLastPyramidLevel); + this.groupBox2.Controls.Add(this.labLastPyramidLevelExt); + this.groupBox2.Controls.Add(this.labLastPyramidLevelMax); + this.groupBox2.Controls.Add(this.label45); + this.groupBox2.Controls.Add(this.labSubPixelSelect); + this.groupBox2.Controls.Add(this.label22); + this.groupBox2.Controls.Add(this.label23); + this.groupBox2.Controls.Add(this.label24); + this.groupBox2.Controls.Add(this.label25); + this.groupBox2.Controls.Add(this.label40); + this.groupBox2.Controls.Add(this.labScale); + this.groupBox2.Controls.Add(this.labAngle); + this.groupBox2.Controls.Add(this.labGreediness); + this.groupBox2.Controls.Add(this.labNumLevels); + this.groupBox2.Controls.Add(this.labSubPixel); + this.groupBox2.Controls.Add(this.labMatches); + this.groupBox2.Controls.Add(this.labScore); + this.groupBox2.Controls.Add(this.labOverlapExt); + this.groupBox2.Controls.Add(this.labOverlapMax); + this.groupBox2.Controls.Add(this.labOverlapMin); + this.groupBox2.Controls.Add(this.labScaleExt); + this.groupBox2.Controls.Add(this.labScaleMax); + this.groupBox2.Controls.Add(this.labScaleMin); + this.groupBox2.Controls.Add(this.labAngleExt); + this.groupBox2.Controls.Add(this.labAngleMax); + this.groupBox2.Controls.Add(this.labAngleMin); + this.groupBox2.Controls.Add(this.labGreedinessExt); + this.groupBox2.Controls.Add(this.labGreedinessMax); + this.groupBox2.Controls.Add(this.labGreedinessMin); + this.groupBox2.Controls.Add(this.labNumLevelsExt); + this.groupBox2.Controls.Add(this.labNumLevelsMax); + this.groupBox2.Controls.Add(this.labNumLevelsMin); + this.groupBox2.Controls.Add(this.labMatchesExt); + this.groupBox2.Controls.Add(this.labMatchesMax); + this.groupBox2.Controls.Add(this.labMatchesMin); + this.groupBox2.Controls.Add(this.labScoreExt); + this.groupBox2.Controls.Add(this.labScoreMax); + this.groupBox2.Controls.Add(this.labScoreMin); + this.groupBox2.Location = new System.Drawing.Point(20, 21); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(432, 394); + this.groupBox2.TabIndex = 3; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Statistics"; + // + // labLastPyramidLevel + // + this.labLastPyramidLevel.BackColor = System.Drawing.SystemColors.Control; + this.labLastPyramidLevel.Location = new System.Drawing.Point(19, 235); + this.labLastPyramidLevel.Name = "labLastPyramidLevel"; + this.labLastPyramidLevel.Size = new System.Drawing.Size(115, 22); + this.labLastPyramidLevel.TabIndex = 38; + this.labLastPyramidLevel.Text = "LastPyramidLevel"; + this.labLastPyramidLevel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labLastPyramidLevelExt + // + this.labLastPyramidLevelExt.BackColor = System.Drawing.Color.White; + this.labLastPyramidLevelExt.Location = new System.Drawing.Point(326, 235); + this.labLastPyramidLevelExt.Name = "labLastPyramidLevelExt"; + this.labLastPyramidLevelExt.Size = new System.Drawing.Size(92, 22); + this.labLastPyramidLevelExt.TabIndex = 37; + this.labLastPyramidLevelExt.Text = "-"; + this.labLastPyramidLevelExt.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labLastPyramidLevelMax + // + this.labLastPyramidLevelMax.BackColor = System.Drawing.Color.White; + this.labLastPyramidLevelMax.Location = new System.Drawing.Point(230, 235); + this.labLastPyramidLevelMax.Name = "labLastPyramidLevelMax"; + this.labLastPyramidLevelMax.Size = new System.Drawing.Size(92, 22); + this.labLastPyramidLevelMax.TabIndex = 36; + this.labLastPyramidLevelMax.Text = "-"; + this.labLastPyramidLevelMax.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label45 + // + this.label45.BackColor = System.Drawing.Color.White; + this.label45.Location = new System.Drawing.Point(134, 235); + this.label45.Name = "label45"; + this.label45.Size = new System.Drawing.Size(92, 22); + this.label45.TabIndex = 35; + this.label45.Text = "-"; + this.label45.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labSubPixelSelect + // + this.labSubPixelSelect.BackColor = System.Drawing.Color.White; + this.labSubPixelSelect.Location = new System.Drawing.Point(230, 185); + this.labSubPixelSelect.Name = "labSubPixelSelect"; + this.labSubPixelSelect.Size = new System.Drawing.Size(92, 21); + this.labSubPixelSelect.TabIndex = 34; + this.labSubPixelSelect.Text = "-"; + this.labSubPixelSelect.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label22 + // + this.label22.BackColor = System.Drawing.SystemColors.Control; + this.label22.Location = new System.Drawing.Point(326, 26); + this.label22.Name = "label22"; + this.label22.Size = new System.Drawing.Size(77, 21); + this.label22.TabIndex = 33; + this.label22.Text = "Extent"; + this.label22.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label23 + // + this.label23.BackColor = System.Drawing.SystemColors.Control; + this.label23.Location = new System.Drawing.Point(230, 26); + this.label23.Name = "label23"; + this.label23.Size = new System.Drawing.Size(96, 21); + this.label23.TabIndex = 32; + this.label23.Text = "Maximum"; + this.label23.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label24 + // + this.label24.BackColor = System.Drawing.SystemColors.Control; + this.label24.Location = new System.Drawing.Point(134, 26); + this.label24.Name = "label24"; + this.label24.Size = new System.Drawing.Size(96, 21); + this.label24.TabIndex = 31; + this.label24.Text = "Minimum"; + this.label24.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label25 + // + this.label25.BackColor = System.Drawing.SystemColors.Control; + this.label25.Location = new System.Drawing.Point(19, 26); + this.label25.Name = "label25"; + this.label25.Size = new System.Drawing.Size(115, 21); + this.label25.TabIndex = 30; + this.label25.Text = "Recognition"; + this.label25.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label40 + // + this.label40.BackColor = System.Drawing.SystemColors.Control; + this.label40.Location = new System.Drawing.Point(19, 159); + this.label40.Name = "label40"; + this.label40.Size = new System.Drawing.Size(115, 21); + this.label40.TabIndex = 29; + this.label40.Text = "MaxOverlap"; + this.label40.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labScale + // + this.labScale.BackColor = System.Drawing.SystemColors.Control; + this.labScale.Location = new System.Drawing.Point(19, 83); + this.labScale.Name = "labScale"; + this.labScale.Size = new System.Drawing.Size(115, 21); + this.labScale.TabIndex = 28; + this.labScale.Text = "Scale"; + this.labScale.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labAngle + // + this.labAngle.BackColor = System.Drawing.SystemColors.Control; + this.labAngle.Location = new System.Drawing.Point(19, 57); + this.labAngle.Name = "labAngle"; + this.labAngle.Size = new System.Drawing.Size(115, 22); + this.labAngle.TabIndex = 27; + this.labAngle.Text = "Angle"; + this.labAngle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labGreediness + // + this.labGreediness.BackColor = System.Drawing.SystemColors.Control; + this.labGreediness.Location = new System.Drawing.Point(19, 285); + this.labGreediness.Name = "labGreediness"; + this.labGreediness.Size = new System.Drawing.Size(115, 22); + this.labGreediness.TabIndex = 26; + this.labGreediness.Text = "Greediness"; + this.labGreediness.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labNumLevels + // + this.labNumLevels.BackColor = System.Drawing.SystemColors.Control; + this.labNumLevels.Location = new System.Drawing.Point(19, 210); + this.labNumLevels.Name = "labNumLevels"; + this.labNumLevels.Size = new System.Drawing.Size(115, 21); + this.labNumLevels.TabIndex = 25; + this.labNumLevels.Text = "NumLevels"; + this.labNumLevels.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labSubPixel + // + this.labSubPixel.BackColor = System.Drawing.SystemColors.Control; + this.labSubPixel.Location = new System.Drawing.Point(19, 184); + this.labSubPixel.Name = "labSubPixel"; + this.labSubPixel.Size = new System.Drawing.Size(115, 22); + this.labSubPixel.TabIndex = 24; + this.labSubPixel.Text = "SubPixel"; + this.labSubPixel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labMatches + // + this.labMatches.BackColor = System.Drawing.SystemColors.Control; + this.labMatches.Location = new System.Drawing.Point(19, 133); + this.labMatches.Name = "labMatches"; + this.labMatches.Size = new System.Drawing.Size(115, 22); + this.labMatches.TabIndex = 23; + this.labMatches.Text = "NumMatches"; + this.labMatches.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labScore + // + this.labScore.BackColor = System.Drawing.SystemColors.Control; + this.labScore.Location = new System.Drawing.Point(19, 108); + this.labScore.Name = "labScore"; + this.labScore.Size = new System.Drawing.Size(115, 21); + this.labScore.TabIndex = 22; + this.labScore.Text = "Score"; + this.labScore.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labOverlapExt + // + this.labOverlapExt.BackColor = System.Drawing.Color.White; + this.labOverlapExt.Location = new System.Drawing.Point(326, 159); + this.labOverlapExt.Name = "labOverlapExt"; + this.labOverlapExt.Size = new System.Drawing.Size(92, 21); + this.labOverlapExt.TabIndex = 21; + this.labOverlapExt.Text = "-"; + this.labOverlapExt.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labOverlapMax + // + this.labOverlapMax.BackColor = System.Drawing.Color.White; + this.labOverlapMax.Location = new System.Drawing.Point(230, 159); + this.labOverlapMax.Name = "labOverlapMax"; + this.labOverlapMax.Size = new System.Drawing.Size(92, 21); + this.labOverlapMax.TabIndex = 20; + this.labOverlapMax.Text = "-"; + this.labOverlapMax.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labOverlapMin + // + this.labOverlapMin.BackColor = System.Drawing.Color.White; + this.labOverlapMin.Location = new System.Drawing.Point(134, 159); + this.labOverlapMin.Name = "labOverlapMin"; + this.labOverlapMin.Size = new System.Drawing.Size(92, 21); + this.labOverlapMin.TabIndex = 19; + this.labOverlapMin.Text = "-"; + this.labOverlapMin.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labScaleExt + // + this.labScaleExt.BackColor = System.Drawing.Color.White; + this.labScaleExt.Location = new System.Drawing.Point(326, 83); + this.labScaleExt.Name = "labScaleExt"; + this.labScaleExt.Size = new System.Drawing.Size(92, 21); + this.labScaleExt.TabIndex = 18; + this.labScaleExt.Text = "-"; + this.labScaleExt.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labScaleMax + // + this.labScaleMax.BackColor = System.Drawing.Color.White; + this.labScaleMax.Location = new System.Drawing.Point(230, 83); + this.labScaleMax.Name = "labScaleMax"; + this.labScaleMax.Size = new System.Drawing.Size(92, 21); + this.labScaleMax.TabIndex = 17; + this.labScaleMax.Text = "-"; + this.labScaleMax.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labScaleMin + // + this.labScaleMin.BackColor = System.Drawing.Color.White; + this.labScaleMin.Location = new System.Drawing.Point(134, 83); + this.labScaleMin.Name = "labScaleMin"; + this.labScaleMin.Size = new System.Drawing.Size(92, 21); + this.labScaleMin.TabIndex = 16; + this.labScaleMin.Text = "-"; + this.labScaleMin.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labAngleExt + // + this.labAngleExt.BackColor = System.Drawing.Color.White; + this.labAngleExt.Location = new System.Drawing.Point(326, 57); + this.labAngleExt.Name = "labAngleExt"; + this.labAngleExt.Size = new System.Drawing.Size(92, 22); + this.labAngleExt.TabIndex = 15; + this.labAngleExt.Text = "-"; + this.labAngleExt.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labAngleMax + // + this.labAngleMax.BackColor = System.Drawing.Color.White; + this.labAngleMax.Location = new System.Drawing.Point(230, 57); + this.labAngleMax.Name = "labAngleMax"; + this.labAngleMax.Size = new System.Drawing.Size(92, 22); + this.labAngleMax.TabIndex = 14; + this.labAngleMax.Text = "-"; + this.labAngleMax.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labAngleMin + // + this.labAngleMin.BackColor = System.Drawing.Color.White; + this.labAngleMin.Location = new System.Drawing.Point(134, 57); + this.labAngleMin.Name = "labAngleMin"; + this.labAngleMin.Size = new System.Drawing.Size(92, 22); + this.labAngleMin.TabIndex = 13; + this.labAngleMin.Text = "-"; + this.labAngleMin.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labGreedinessExt + // + this.labGreedinessExt.BackColor = System.Drawing.Color.White; + this.labGreedinessExt.Location = new System.Drawing.Point(326, 285); + this.labGreedinessExt.Name = "labGreedinessExt"; + this.labGreedinessExt.Size = new System.Drawing.Size(92, 22); + this.labGreedinessExt.TabIndex = 12; + this.labGreedinessExt.Text = "-"; + this.labGreedinessExt.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labGreedinessMax + // + this.labGreedinessMax.BackColor = System.Drawing.Color.White; + this.labGreedinessMax.Location = new System.Drawing.Point(230, 285); + this.labGreedinessMax.Name = "labGreedinessMax"; + this.labGreedinessMax.Size = new System.Drawing.Size(92, 22); + this.labGreedinessMax.TabIndex = 11; + this.labGreedinessMax.Text = "-"; + this.labGreedinessMax.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labGreedinessMin + // + this.labGreedinessMin.BackColor = System.Drawing.Color.White; + this.labGreedinessMin.Location = new System.Drawing.Point(134, 285); + this.labGreedinessMin.Name = "labGreedinessMin"; + this.labGreedinessMin.Size = new System.Drawing.Size(92, 22); + this.labGreedinessMin.TabIndex = 10; + this.labGreedinessMin.Text = "-"; + this.labGreedinessMin.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labNumLevelsExt + // + this.labNumLevelsExt.BackColor = System.Drawing.Color.White; + this.labNumLevelsExt.Location = new System.Drawing.Point(326, 210); + this.labNumLevelsExt.Name = "labNumLevelsExt"; + this.labNumLevelsExt.Size = new System.Drawing.Size(92, 21); + this.labNumLevelsExt.TabIndex = 9; + this.labNumLevelsExt.Text = "-"; + this.labNumLevelsExt.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labNumLevelsMax + // + this.labNumLevelsMax.BackColor = System.Drawing.Color.White; + this.labNumLevelsMax.Location = new System.Drawing.Point(230, 210); + this.labNumLevelsMax.Name = "labNumLevelsMax"; + this.labNumLevelsMax.Size = new System.Drawing.Size(92, 21); + this.labNumLevelsMax.TabIndex = 8; + this.labNumLevelsMax.Text = "-"; + this.labNumLevelsMax.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labNumLevelsMin + // + this.labNumLevelsMin.BackColor = System.Drawing.Color.White; + this.labNumLevelsMin.Location = new System.Drawing.Point(134, 210); + this.labNumLevelsMin.Name = "labNumLevelsMin"; + this.labNumLevelsMin.Size = new System.Drawing.Size(92, 21); + this.labNumLevelsMin.TabIndex = 7; + this.labNumLevelsMin.Text = "-"; + this.labNumLevelsMin.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labMatchesExt + // + this.labMatchesExt.BackColor = System.Drawing.Color.White; + this.labMatchesExt.Location = new System.Drawing.Point(326, 133); + this.labMatchesExt.Name = "labMatchesExt"; + this.labMatchesExt.Size = new System.Drawing.Size(92, 22); + this.labMatchesExt.TabIndex = 6; + this.labMatchesExt.Text = "-"; + this.labMatchesExt.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labMatchesMax + // + this.labMatchesMax.BackColor = System.Drawing.Color.White; + this.labMatchesMax.Location = new System.Drawing.Point(230, 133); + this.labMatchesMax.Name = "labMatchesMax"; + this.labMatchesMax.Size = new System.Drawing.Size(92, 22); + this.labMatchesMax.TabIndex = 5; + this.labMatchesMax.Text = "-"; + this.labMatchesMax.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labMatchesMin + // + this.labMatchesMin.BackColor = System.Drawing.Color.White; + this.labMatchesMin.Location = new System.Drawing.Point(134, 133); + this.labMatchesMin.Name = "labMatchesMin"; + this.labMatchesMin.Size = new System.Drawing.Size(92, 22); + this.labMatchesMin.TabIndex = 4; + this.labMatchesMin.Text = "-"; + this.labMatchesMin.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labScoreExt + // + this.labScoreExt.BackColor = System.Drawing.Color.White; + this.labScoreExt.Location = new System.Drawing.Point(326, 108); + this.labScoreExt.Name = "labScoreExt"; + this.labScoreExt.Size = new System.Drawing.Size(92, 21); + this.labScoreExt.TabIndex = 2; + this.labScoreExt.Text = "-"; + this.labScoreExt.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labScoreMax + // + this.labScoreMax.BackColor = System.Drawing.Color.White; + this.labScoreMax.Location = new System.Drawing.Point(230, 108); + this.labScoreMax.Name = "labScoreMax"; + this.labScoreMax.Size = new System.Drawing.Size(92, 21); + this.labScoreMax.TabIndex = 1; + this.labScoreMax.Text = "-"; + this.labScoreMax.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labScoreMin + // + this.labScoreMin.BackColor = System.Drawing.Color.White; + this.labScoreMin.Location = new System.Drawing.Point(134, 108); + this.labScoreMin.Name = "labScoreMin"; + this.labScoreMin.Size = new System.Drawing.Size(92, 21); + this.labScoreMin.TabIndex = 0; + this.labScoreMin.Text = "-"; + this.labScoreMin.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // groupBoxCreateROI + // + this.groupBoxCreateROI.Controls.Add(this.circleButton); + this.groupBoxCreateROI.Controls.Add(this.delROIButton); + this.groupBoxCreateROI.Controls.Add(this.delAllROIButton); + this.groupBoxCreateROI.Controls.Add(this.rect2Button); + this.groupBoxCreateROI.Controls.Add(this.subFromROIButton); + this.groupBoxCreateROI.Controls.Add(this.addToROIButton); + this.groupBoxCreateROI.Controls.Add(this.rect1Button); + this.groupBoxCreateROI.Dock = System.Windows.Forms.DockStyle.Right; + this.groupBoxCreateROI.Enabled = false; + this.groupBoxCreateROI.Location = new System.Drawing.Point(759, 0); + this.groupBoxCreateROI.Name = "groupBoxCreateROI"; + this.groupBoxCreateROI.Size = new System.Drawing.Size(500, 163); + this.groupBoxCreateROI.TabIndex = 2; + this.groupBoxCreateROI.TabStop = false; + this.groupBoxCreateROI.Text = "Create ROI"; + // + // circleButton + // + this.circleButton.Location = new System.Drawing.Point(375, 16); + this.circleButton.Name = "circleButton"; + this.circleButton.Size = new System.Drawing.Size(101, 49); + this.circleButton.TabIndex = 12; + this.circleButton.Text = "Circle"; + this.circleButton.Click += new System.EventHandler(this.circleButton_Click); + // + // delROIButton + // + this.delROIButton.Location = new System.Drawing.Point(102, 86); + this.delROIButton.Name = "delROIButton"; + this.delROIButton.Size = new System.Drawing.Size(101, 49); + this.delROIButton.TabIndex = 11; + this.delROIButton.Text = "Del ActROI "; + this.delROIButton.Click += new System.EventHandler(this.delROIButton_Click); + // + // delAllROIButton + // + this.delAllROIButton.Location = new System.Drawing.Point(235, 86); + this.delAllROIButton.Name = "delAllROIButton"; + this.delAllROIButton.Size = new System.Drawing.Size(101, 49); + this.delAllROIButton.TabIndex = 10; + this.delAllROIButton.Text = "Del All ROI"; + this.delAllROIButton.Click += new System.EventHandler(this.delAllROIButton_Click); + // + // rect2Button + // + this.rect2Button.Location = new System.Drawing.Point(237, 16); + this.rect2Button.Name = "rect2Button"; + this.rect2Button.Size = new System.Drawing.Size(101, 49); + this.rect2Button.TabIndex = 9; + this.rect2Button.Text = "Rect2"; + this.rect2Button.Click += new System.EventHandler(this.rect2Button_Click); + // + // subFromROIButton + // + this.subFromROIButton.Location = new System.Drawing.Point(15, 86); + this.subFromROIButton.Name = "subFromROIButton"; + this.subFromROIButton.Size = new System.Drawing.Size(57, 36); + this.subFromROIButton.TabIndex = 8; + this.subFromROIButton.Text = "( - )"; + this.subFromROIButton.Click += new System.EventHandler(this.subFromROIButton_Click); + // + // addToROIButton + // + this.addToROIButton.Checked = true; + this.addToROIButton.Location = new System.Drawing.Point(16, 26); + this.addToROIButton.Name = "addToROIButton"; + this.addToROIButton.Size = new System.Drawing.Size(56, 36); + this.addToROIButton.TabIndex = 7; + this.addToROIButton.TabStop = true; + this.addToROIButton.Text = "( + )"; + this.addToROIButton.Click += new System.EventHandler(this.addToROIButton_Click); + // + // rect1Button + // + this.rect1Button.Location = new System.Drawing.Point(102, 16); + this.rect1Button.Name = "rect1Button"; + this.rect1Button.Size = new System.Drawing.Size(101, 49); + this.rect1Button.TabIndex = 5; + this.rect1Button.Text = "Rect1"; + this.rect1Button.Click += new System.EventHandler(this.rect1Button_Click); + // + // loadImagebutton + // + this.loadImagebutton.Location = new System.Drawing.Point(12, 20); + this.loadImagebutton.Name = "loadImagebutton"; + this.loadImagebutton.Size = new System.Drawing.Size(101, 49); + this.loadImagebutton.TabIndex = 0; + this.loadImagebutton.Text = "Load Image"; + this.loadImagebutton.Click += new System.EventHandler(this.loadImage); + // + // openFileDialog1 + // + this.openFileDialog1.Filter = "png (*.png)|*.png|tiff (*.tif)|*.tif|jpeg (*.jpg)| *.jpg|all files (*.*)|*.*"; + this.openFileDialog1.FilterIndex = 4; + this.openFileDialog1.RestoreDirectory = true; + // + // saveModelbutton + // + this.saveModelbutton.ForeColor = System.Drawing.SystemColors.ControlText; + this.saveModelbutton.Location = new System.Drawing.Point(12, 86); + this.saveModelbutton.Name = "saveModelbutton"; + this.saveModelbutton.Size = new System.Drawing.Size(101, 49); + this.saveModelbutton.TabIndex = 3; + this.saveModelbutton.Text = "Save Model"; + this.saveModelbutton.Click += new System.EventHandler(this.saveModelbutton_Click); + // + // loadModelbutton + // + this.loadModelbutton.ForeColor = System.Drawing.SystemColors.ControlText; + this.loadModelbutton.Location = new System.Drawing.Point(143, 86); + this.loadModelbutton.Name = "loadModelbutton"; + this.loadModelbutton.Size = new System.Drawing.Size(101, 49); + this.loadModelbutton.TabIndex = 4; + this.loadModelbutton.Text = "Load Model"; + this.loadModelbutton.Click += new System.EventHandler(this.loadModelbutton_Click); + // + // resetViewButton + // + this.resetViewButton.Location = new System.Drawing.Point(109, 86); + this.resetViewButton.Name = "resetViewButton"; + this.resetViewButton.Size = new System.Drawing.Size(101, 49); + this.resetViewButton.TabIndex = 3; + this.resetViewButton.Text = "Reset View"; + this.resetViewButton.Click += new System.EventHandler(this.resetViewButton_Click); + // + // noneButton + // + this.noneButton.Checked = true; + this.noneButton.Location = new System.Drawing.Point(14, 27); + this.noneButton.Name = "noneButton"; + this.noneButton.Size = new System.Drawing.Size(87, 35); + this.noneButton.TabIndex = 2; + this.noneButton.TabStop = true; + this.noneButton.Text = "none"; + this.noneButton.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.noneButton.CheckedChanged += new System.EventHandler(this.noneButton_CheckedChanged); + // + // zoomButton + // + this.zoomButton.Location = new System.Drawing.Point(238, 27); + this.zoomButton.Name = "zoomButton"; + this.zoomButton.Size = new System.Drawing.Size(87, 35); + this.zoomButton.TabIndex = 1; + this.zoomButton.Text = "zoom"; + this.zoomButton.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.zoomButton.CheckedChanged += new System.EventHandler(this.zoomButton_CheckedChanged); + // + // moveButton + // + this.moveButton.Location = new System.Drawing.Point(123, 27); + this.moveButton.Name = "moveButton"; + this.moveButton.Size = new System.Drawing.Size(87, 34); + this.moveButton.TabIndex = 0; + this.moveButton.Text = "move"; + this.moveButton.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.moveButton.CheckedChanged += new System.EventHandler(this.moveButton_CheckedChanged); + // + // openFileDialog2 + // + this.openFileDialog2.Filter = "png (*.png)|*.png|tiff (*.tif)|*.tif|jpeg (*.jpg)| *.jpg|all files (*.*)|*.*"; + this.openFileDialog2.FilterIndex = 4; + this.openFileDialog2.Multiselect = true; + // + // DisplayDataButton + // + this.DisplayDataButton.BackColor = System.Drawing.SystemColors.Control; + this.DisplayDataButton.Location = new System.Drawing.Point(143, 20); + this.DisplayDataButton.Name = "DisplayDataButton"; + this.DisplayDataButton.Size = new System.Drawing.Size(101, 49); + this.DisplayDataButton.TabIndex = 7; + this.DisplayDataButton.Text = "Display"; + this.DisplayDataButton.UseVisualStyleBackColor = false; + this.DisplayDataButton.Click += new System.EventHandler(this.DisplayDataButton_Click); + // + // timer + // + this.timer.Interval = 10; + this.timer.Tick += new System.EventHandler(this.timer_ticked); + // + // saveFileDialog1 + // + this.saveFileDialog1.Filter = "HALCON ShapeModel File|*.shm|All files|*.*"; + this.saveFileDialog1.RestoreDirectory = true; + // + // openFileDialog3 + // + this.openFileDialog3.Filter = "HALCON ShapeModel File|*.shm|All files|*.*"; + // + // resetModelbutton + // + this.resetModelbutton.Enabled = false; + this.resetModelbutton.Location = new System.Drawing.Point(273, 86); + this.resetModelbutton.Name = "resetModelbutton"; + this.resetModelbutton.Size = new System.Drawing.Size(101, 49); + this.resetModelbutton.TabIndex = 8; + this.resetModelbutton.Text = "Clear Model"; + this.resetModelbutton.Click += new System.EventHandler(this.resetModelbutton_Click); + // + // pnlBottom + // + this.pnlBottom.Controls.Add(this.groupBox6); + this.pnlBottom.Controls.Add(this.groupBox5); + this.pnlBottom.Controls.Add(this.groupBoxCreateROI); + this.pnlBottom.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnlBottom.Location = new System.Drawing.Point(0, 589); + this.pnlBottom.Name = "pnlBottom"; + this.pnlBottom.Size = new System.Drawing.Size(1259, 163); + this.pnlBottom.TabIndex = 11; + // + // groupBox6 + // + this.groupBox6.Controls.Add(this.resetViewButton); + this.groupBox6.Controls.Add(this.moveButton); + this.groupBox6.Controls.Add(this.noneButton); + this.groupBox6.Controls.Add(this.zoomButton); + this.groupBox6.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox6.Location = new System.Drawing.Point(406, 0); + this.groupBox6.Name = "groupBox6"; + this.groupBox6.Size = new System.Drawing.Size(353, 163); + this.groupBox6.TabIndex = 10; + this.groupBox6.TabStop = false; + this.groupBox6.Text = "View Interaction"; + // + // groupBox5 + // + this.groupBox5.Controls.Add(this.resetModelbutton); + this.groupBox5.Controls.Add(this.DisplayDataButton); + this.groupBox5.Controls.Add(this.loadModelbutton); + this.groupBox5.Controls.Add(this.saveModelbutton); + this.groupBox5.Controls.Add(this.loadImagebutton); + this.groupBox5.Dock = System.Windows.Forms.DockStyle.Left; + this.groupBox5.Location = new System.Drawing.Point(0, 0); + this.groupBox5.Name = "groupBox5"; + this.groupBox5.Size = new System.Drawing.Size(406, 163); + this.groupBox5.TabIndex = 9; + this.groupBox5.TabStop = false; + this.groupBox5.Text = "groupBox5"; + // + // pnlRight + // + this.pnlRight.Controls.Add(this.tabControl); + this.pnlRight.Dock = System.Windows.Forms.DockStyle.Right; + this.pnlRight.Location = new System.Drawing.Point(759, 0); + this.pnlRight.Name = "pnlRight"; + this.pnlRight.Size = new System.Drawing.Size(500, 589); + this.pnlRight.TabIndex = 14; + // + // WindowModePanel + // + this.WindowModePanel.BackColor = System.Drawing.Color.RoyalBlue; + this.WindowModePanel.Controls.Add(this.viewPort); + this.WindowModePanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.WindowModePanel.Location = new System.Drawing.Point(0, 0); + this.WindowModePanel.Name = "WindowModePanel"; + this.WindowModePanel.Size = new System.Drawing.Size(759, 589); + this.WindowModePanel.TabIndex = 15; + // + // viewPort + // + this.viewPort.BackColor = System.Drawing.Color.Black; + this.viewPort.BorderColor = System.Drawing.Color.Black; + this.viewPort.Dock = System.Windows.Forms.DockStyle.Fill; + this.viewPort.ImagePart = new System.Drawing.Rectangle(0, 0, 640, 480); + this.viewPort.Location = new System.Drawing.Point(0, 0); + this.viewPort.Name = "viewPort"; + this.viewPort.Size = new System.Drawing.Size(759, 589); + this.viewPort.TabIndex = 5; + this.viewPort.WindowSize = new System.Drawing.Size(759, 589); + // + // frmMatchingAssistant + // + this.AutoScaleBaseSize = new System.Drawing.Size(6, 14); + this.ClientSize = new System.Drawing.Size(1259, 752); + this.Controls.Add(this.WindowModePanel); + this.Controls.Add(this.pnlRight); + this.Controls.Add(this.pnlBottom); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.MaximizeBox = false; + this.Name = "frmMatchingAssistant"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Matching Assistant"; + this.Load += new System.EventHandler(this.frmMatchingAssistant_Load); + this.tabControl.ResumeLayout(false); + this.tabPageCreateModel.ResumeLayout(false); + this.groupBoxCreateModel.ResumeLayout(false); + this.groupBoxCreateModel.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.MinContrastTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinContrastUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.PyramidLevelTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.PyramidLevelUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.AngleStepTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.AngleStepUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.AngleExtentTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.AngleExtentUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.StartingAngleTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.StartingAngleUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.ScaleStepUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.ScaleStepTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MaxScaleUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MaxScaleTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinScaleUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinScaleTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.ContrastUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.ContrastTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.DispPyramidUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.DispPyramidTrackBar)).EndInit(); + this.tabPageFindModel.ResumeLayout(false); + this.tabPageFindModel.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.LastPyrLevTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.LastPyrLevUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MaxOverlapTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MaxOverlapUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.GreedinessTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.GreedinessUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NumMatchesTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.NumMatchesUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinScoreTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinScoreUpDown)).EndInit(); + this.tabPageOptimRecognition.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.RecogNoManSelUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.recogRateTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.recogRateUpDown)).EndInit(); + this.panel1.ResumeLayout(false); + this.tabPageInspectModel.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.InspectMaxNoMatchUpDown)).EndInit(); + this.groupBox4.ResumeLayout(false); + this.groupBox3.ResumeLayout(false); + this.tabPageSaveConfige.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBoxCreateROI.ResumeLayout(false); + this.pnlBottom.ResumeLayout(false); + this.groupBox6.ResumeLayout(false); + this.groupBox5.ResumeLayout(false); + this.pnlRight.ResumeLayout(false); + this.WindowModePanel.ResumeLayout(false); + this.ResumeLayout(false); + + } + #endregion + + /// <summary> + /// Updates all model parameters to the initial settings of the GUI + /// components. + /// </summary> + /// <param name="parSet">holds all necessary parameter values</param> + private void Init(MatchingParam parSet) + { + this.PyramidLevelUpDown.Value = 5; + this.MinContrastUpDown.Maximum = this.ContrastUpDown.Value; + this.MinContrastTrackBar.Maximum = (int)this.ContrastUpDown.Value; + this.MetricBox.SelectedIndex = 0; + this.OptimizationBox.SelectedIndex = 0; + this.SubPixelBox.SelectedIndex = 2; + this.RecognRateComboBox.SelectedIndex = 0; + + parSet.mAngleExtent = (double)(AngleExtentUpDown.Value)*Math.PI/180.0; + parSet.mAngleStep = ((double)AngleStepUpDown.Value /10.0)*Math.PI/180.0; + parSet.mContrast = (int) ContrastUpDown.Value; + parSet.mMaxScale = (double)MaxScaleUpDown.Value/100.0; + parSet.mMetric = (string)MetricBox.Items[MetricBox.SelectedIndex]; + parSet.mMinContrast = (int) MinContrastUpDown.Value; + parSet.mMinScale = (double)MinScaleUpDown.Value/100.0; + parSet.mNumLevel = (int)PyramidLevelUpDown.Value; + parSet.mOptimization = (string)OptimizationBox.Items[OptimizationBox.SelectedIndex]; + parSet.mScaleStep = (double)ScaleStepUpDown.Value/1000.0; + parSet.mStartingAngle = (double)(StartingAngleUpDown.Value)*Math.PI/180.0; + + parSet.mMinScore = (double)MinScoreUpDown.Value/100.0; + parSet.mNumMatches = (int)NumMatchesUpDown.Value; + parSet.mGreediness = (double)GreedinessUpDown.Value/100.0; + parSet.mMaxOverlap = (double)MaxOverlapUpDown.Value/100.0; + parSet.mSubpixel = (string)SubPixelBox.Items[SubPixelBox.SelectedIndex]; + parSet.mLastPyramidLevel= (int)LastPyrLevUpDown.Value; + + parSet.mRecogRateOpt = (int)RecognRateComboBox.SelectedIndex; + parSet.mRecogRate = (int)recogRateUpDown.Value; + parSet.mRecogSpeedMode = MatchingParam.RECOGM_MANUALSELECT; + parSet.mRecogManualSel = (int)RecogNoManSelUpDown.Value; + parSet.mInspectMaxNoMatch = (int)InspectMaxNoMatchUpDown.Value; + + string imPathValue = (string)(HSystem.GetSystem("image_dir").TupleSplit(";")); + openFileDialog1.InitialDirectory = imPathValue; + + openFileDialog2.InitialDirectory = imPathValue; + + openFileDialog3.InitialDirectory = + Environment.GetFolderPath(System.Environment.SpecialFolder.Personal); + + saveFileDialog1.InitialDirectory = + Environment.GetFolderPath(System.Environment.SpecialFolder.Personal); + } + + /********************************************************************/ + /********************************************************************/ + private void loadImage(object sender, System.EventArgs e) + { + if(openFileDialog1.ShowDialog() == DialogResult.OK) + { + locked = true; + + DetectionContour = null; + DispPyramidTrackBar.Enabled = false; + DispPyramidTrackBar.Value = 1; + DispPyramidUpDown.Enabled = false; + DispPyramidUpDown.Value = 1; + + locked = false; + + FindAlwaysCheckBox.Checked = false; + + if(!mAssistant.setImage(openFileDialog1.FileName)) + return; + + mView.resetAll(); + + if(mAssistant.onExternalModelID) + ModelContour = mAssistant.getLoadedModelContour(); + + // to add ROI instances to the display as well + if(tabControl.SelectedIndex != 0) + { + tabControl.SelectedIndex = 0; + } + else + { + changeWindowMode(1); + CreateModelGraphics(); + mView.repaint(); + } + } + } + + /********************************************************************/ + /********************************************************************/ + private void DisplayDataButton_Click(object sender, System.EventArgs e) + { + changeWindowMode(1); + CreateModelGraphics(); + mView.repaint(); + } + + /********************************************************************/ + /********************************************************************/ + private void saveModelbutton_Click(object sender, System.EventArgs e) + { + string files; + + if(saveFileDialog1.ShowDialog() == DialogResult.OK) + { + files = saveFileDialog1.FileName; + + if(!files.EndsWith(".shm") && !files.EndsWith(".SHM")) + files += ".shm"; + + mAssistant.saveShapeModel(files); + }/* if */ + } + + /********************************************************************/ + /********************************************************************/ + private void loadModelbutton_Click(object sender, System.EventArgs e) + { + string file; + + if(openFileDialog3.ShowDialog() == DialogResult.OK) + { + file = openFileDialog3.FileName; + + if(!file.EndsWith(".shm") || !file.EndsWith(".shm")) + { + UpdateMatching(MatchingAssistant.ERR_NO_VALID_FILE); + return; + } + + roiController.reset(); + DetectionContour = null; + mAssistant.reset(); + FindAlwaysCheckBox.Checked = false; + + if(mAssistant.loadShapeModel(file)) + { + groupBoxCreateROI.Enabled = false; + groupBoxCreateModel.Enabled = false; + resetModelbutton.Enabled = true; + saveModelbutton.Enabled = false; + + + ModelContour = mAssistant.getLoadedModelContour(); + + if(tabControl.SelectedIndex != 0) + { + tabControl.SelectedIndex = 0; + } + else + { + changeWindowMode(1); + CreateModelGraphics(); + mView.repaint(); + } + } + }/* if */ + } + + /********************************************************************/ + /********************************************************************/ + private void resetModelbutton_Click(object sender, System.EventArgs e) + { + + groupBoxCreateModel.Enabled = true; + mAssistant.onExternalModelID = false; + FindAlwaysCheckBox.Checked = false; + resetModelbutton.Enabled = false; + saveModelbutton.Enabled = true; + + DetectionContour = null; + ModelContour = null; + + if(mAssistant.getDispImage()!=null) + groupBoxCreateROI.Enabled = true; + + speedOptHandler.reset(); + optInstance = speedOptHandler; + UpdateStatisticsData(MatchingOpt.UPDATE_RECOG_UPDATE_VALS); + UpdateStatisticsData(MatchingOpt.UPDATE_RECOG_OPTIMUM_VALS); + UpdateStatisticsData(MatchingOpt.UPDATE_RECOG_STATISTICS_STATUS); + + inspectOptHandler.reset(); + optInstance = inspectOptHandler; + UpdateStatisticsData(MatchingOpt.UPDATE_INSP_STATISTICS); + UpdateStatisticsData(MatchingOpt.UPDATE_INSP_RECOGRATE); + + //reset Model parameters + mAssistant.resetCachedModelParams(); + + if(tabControl.SelectedIndex != 0) + { + tabControl.SelectedIndex = 0; + } + else + { + changeWindowMode(1); + CreateModelGraphics(); + mView.repaint(); + } + } + + /********************************************************************/ + /********************************************************************/ + private void rect1Button_Click(object sender, System.EventArgs e) + { + roiController.setROIShape(new ROIRectangle1()); + } + + /********************************************************************/ + /********************************************************************/ + private void rect2Button_Click(object sender, System.EventArgs e) + { + roiController.setROIShape(new ROIRectangle2()); + } + + + private void circleButton_Click(object sender, System.EventArgs e) + { + roiController.setROIShape(new ROICircle()); + } + /********************************************************************/ + /********************************************************************/ + private void moveButton_CheckedChanged(object sender, System.EventArgs e) + { + mView.setViewState(HWndCtrl.MODE_VIEW_MOVE); + } + + /********************************************************************/ + /********************************************************************/ + private void zoomButton_CheckedChanged(object sender, System.EventArgs e) + { + mView.setViewState(HWndCtrl.MODE_VIEW_ZOOM); + } + + /********************************************************************/ + /********************************************************************/ + private void noneButton_CheckedChanged(object sender, System.EventArgs e) + { + mView.setViewState(HWndCtrl.MODE_VIEW_NONE); + } + + /********************************************************************/ + /********************************************************************/ + private void delROIButton_Click(object sender, System.EventArgs e) + { + roiController.removeActive(); + } + + /********************************************************************/ + /********************************************************************/ + private void delAllROIButton_Click(object sender, System.EventArgs e) + { + roiController.reset(); + DetectionContour = null; + mAssistant.reset(); + + DispPyramidTrackBar.Value = 1; + DispPyramidTrackBar.Enabled = false; + DispPyramidUpDown.Value = 1; + DispPyramidUpDown.Enabled = false; + } + + /********************************************************************/ + /********************************************************************/ + private void resetViewButton_Click(object sender, System.EventArgs e) + { + locked = true; + mView.resetWindow(); + locked = false; + mView.repaint(); + + } + + /********************************************************************/ + /********************************************************************/ + private void addToROIButton_Click(object sender, System.EventArgs e) + { + if(addToROIButton.Checked) + roiController.setROISign(ROIController.MODE_ROI_POS); + + } + + /********************************************************************/ + /********************************************************************/ + private void subFromROIButton_Click(object sender, System.EventArgs e) + { + if(subFromROIButton.Checked) + roiController.setROISign(ROIController.MODE_ROI_NEG); + + } + + + /****************************************************************************/ + /****************** 1. Tab: CREATE MODEL ***********************************/ + /********************** Eventhandling ***************************************/ + /****************************************************************************/ + + /********************************************************************/ + /* DispPyramid */ + /********************************************************************/ + private void DispPyramidUpDown_ValueChanged(object sender, System.EventArgs e) + { + int val = (int)DispPyramidUpDown.Value; + DispPyramidTrackBar.Value = val; + + + mView.setDispLevel(1); + + if(!locked) + setDisplayLevel(val); + } + + private void DispPyramidTrackBar_Scroll(object sender, System.EventArgs e) + { + DispPyramidUpDown.Value = DispPyramidTrackBar.Value; + DispPyramidUpDown.Refresh(); + } + + private void setDisplayLevel(int val) + { + mAssistant.setDispLevel(val); + } + + /********************************************************************/ + /* Auto Contrast */ + /********************************************************************/ + private void ContrastUpDown_ValueChanged(object sender, System.EventArgs e) + { + + int val = (int)ContrastUpDown.Value; + ContrastTrackBar.Value = val; + MinContrastTrackBar.Maximum = val; + MinContrastUpDown.Maximum = val; + + if(!locked) + setContrast(val); + + if(!parameterSet.isAuto(MatchingParam.AUTO_CONTRAST)) + { + ContrastAutoButton.ForeColor = System.Drawing.SystemColors.ControlText; + ContrastAutoButton.Text = "Auto"; + } + } + + + private void ContrastTrackBar_Scroll(object sender, System.EventArgs e) + { + ContrastUpDown.Value = ContrastTrackBar.Value; + ContrastUpDown.Refresh(); + } + + + private void ContrastAutoButton_Click(object sender, System.EventArgs e) + { + if(mAssistant.removeAuto(MatchingParam.AUTO_CONTRAST)) + { + ContrastAutoButton.ForeColor = System.Drawing.SystemColors.ControlText; + ContrastAutoButton.Text = "Auto"; + } + else + { + ContrastAutoButton.ForeColor = System.Drawing.SystemColors.ControlLightLight; + ContrastAutoButton.Text = "Auto!"; + mAssistant.setAuto(MatchingParam.AUTO_CONTRAST); + } + } + + private void setContrast(int val) + { + mAssistant.setContrast(val); + } + + /********************************************************************/ + /* MinScale */ + /********************************************************************/ + private void MinScaleUpDown_ValueChanged(object sender, System.EventArgs e) + { + int val = (int)MinScaleUpDown.Value; + MinScaleTrackBar.Value = val; + + if(val >= MaxScaleUpDown.Value) + MaxScaleUpDown.Value = val; + + if(!locked) + setMinScale(val); + } + + private void MinScaleTrackBar_Scroll(object sender, System.EventArgs e) + { + MinScaleUpDown.Value = MinScaleTrackBar.Value; + MinScaleUpDown.Refresh(); + } + + private void setMinScale(int val) + { + mAssistant.setMinScale((double)val/100); + } + + /********************************************************************/ + /* MaxScale */ + /********************************************************************/ + private void MaxScaleUpDown_ValueChanged(object sender, System.EventArgs e) + { + int val = (int)MaxScaleUpDown.Value; + MaxScaleTrackBar.Value = val; + + if(val<= MinScaleUpDown.Value) + MinScaleUpDown.Value = val; + + if(!locked) + setMaxScale(val); + } + + private void MaxScaleTrackBar_Scroll(object sender, System.EventArgs e) + { + MaxScaleUpDown.Value = MaxScaleTrackBar.Value; + MaxScaleUpDown.Refresh(); + } + + private void setMaxScale(int val) + { + mAssistant.setMaxScale((double)val/100); + } + + /********************************************************************/ + /* Auto scaleStep */ + /********************************************************************/ + private void ScaleStepUpDown_ValueChanged(object sender, System.EventArgs e) + { + int val = (int)ScaleStepUpDown.Value; + ScaleStepTrackBar.Value = val; + + if(!locked) + setScaleStep(val); + + if(!parameterSet.isAuto(MatchingParam.AUTO_SCALE_STEP)) + { + ScaleStepAutoButton.ForeColor = System.Drawing.SystemColors.ControlText; + ScaleStepAutoButton.Text = "Auto"; + } + } + + private void ScaleStepTrackBar_Scroll(object sender, System.EventArgs e) + { + ScaleStepUpDown.Value = ScaleStepTrackBar.Value; + ScaleStepUpDown.Refresh(); + } + + private void ScaleStepAutoButton_Click(object sender, System.EventArgs e) + { + if(mAssistant.removeAuto(MatchingParam.AUTO_SCALE_STEP)) + { + ScaleStepAutoButton.ForeColor = System.Drawing.SystemColors.ControlText; + ScaleStepAutoButton.Text = "Auto"; + } + else + { + ScaleStepAutoButton.ForeColor = System.Drawing.SystemColors.ControlLightLight; + ScaleStepAutoButton.Text = "Auto!"; + mAssistant.setAuto(MatchingParam.AUTO_SCALE_STEP); + } + } + + + private void setScaleStep(int val) + { + mAssistant.setScaleStep((double)val/1000); + } + + /********************************************************************/ + /* startingAngle */ + /********************************************************************/ + private void StartingAngleUpDown_ValueChanged(object sender, System.EventArgs e) + { + int val = (int)StartingAngleUpDown.Value; + StartingAngleTrackBar.Value = val; + + if(!locked) + setStartingAngle(val); + } + + private void StartingAngleTrackBar_Scroll(object sender, System.EventArgs e) + { + StartingAngleUpDown.Value = StartingAngleTrackBar.Value; + StartingAngleUpDown.Refresh(); + } + + private void setStartingAngle(int val) + { + double rad = val*Math.PI/180; + mAssistant.setStartingAngle(rad); + } + + /********************************************************************/ + /* angleExtent */ + /********************************************************************/ + private void AngleExtentUpDown_ValueChanged(object sender, System.EventArgs e) + { + int val = (int) AngleExtentUpDown.Value; + AngleExtentTrackBar.Value = val; + + if(!locked) + setAngleExtent(val); + } + + private void AngleExtentTrackBar_Scroll(object sender, System.EventArgs e) + { + AngleExtentUpDown.Value = AngleExtentTrackBar.Value; + AngleExtentUpDown.Refresh(); + } + + private void setAngleExtent(int val) + { + double rad = val*Math.PI/180; + mAssistant.setAngleExtent(rad); + } + + /********************************************************************/ + /* Auto angleStep */ + /********************************************************************/ + private void AngleStepUpDown_ValueChanged(object sender, System.EventArgs e) + { + int val = (int)AngleStepUpDown.Value; + AngleStepTrackBar.Value = val; + + if(!locked) + setAngleStep(val); + + if(!parameterSet.isAuto(MatchingParam.AUTO_ANGLE_STEP)) + { + AngleStepAutoButton.ForeColor = System.Drawing.SystemColors.ControlText; + AngleStepAutoButton.Text = "Auto"; + } + } + + private void AngleStepTrackBar_Scroll(object sender, System.EventArgs e) + { + AngleStepUpDown.Value = AngleStepTrackBar.Value; + AngleStepUpDown.Refresh(); + } + + private void AngleStepAutoButton_Click(object sender, System.EventArgs e) + { + if(mAssistant.removeAuto(MatchingParam.AUTO_ANGLE_STEP)) + { + AngleStepAutoButton.ForeColor = System.Drawing.SystemColors.ControlText; + AngleStepAutoButton.Text = "Auto"; + } + else + { + AngleStepAutoButton.ForeColor = System.Drawing.SystemColors.ControlLightLight; + AngleStepAutoButton.Text = "Auto!"; + mAssistant.setAuto(MatchingParam.AUTO_ANGLE_STEP); + } + } + + private void setAngleStep(int val) + { + double rad = (double)(val/10.0)*Math.PI/180.0; + mAssistant.setAngleStep(rad); + } + + /********************************************************************/ + /* Auto pyramidLevel */ + /********************************************************************/ + private void PyramidLevelUpDown_ValueChanged(object sender, System.EventArgs e) + { + int val = (int)PyramidLevelUpDown.Value; + PyramidLevelTrackBar.Value = val; + + if(!locked) + setPyramidLevel(val); + + if(!parameterSet.isAuto(MatchingParam.AUTO_NUM_LEVEL)) + { + PyramidLevelAutoButton.ForeColor = System.Drawing.SystemColors.ControlText; + PyramidLevelAutoButton.Text = "Auto"; + } + } + + private void PyramidLevelTrackBar_Scroll(object sender, System.EventArgs e) + { + PyramidLevelUpDown.Value = PyramidLevelTrackBar.Value; + PyramidLevelUpDown.Refresh(); + } + + private void PyramidLevelAutoButton_Click(object sender, System.EventArgs e) + { + if(mAssistant.removeAuto(MatchingParam.AUTO_NUM_LEVEL)) + { + PyramidLevelAutoButton.ForeColor = System.Drawing.SystemColors.ControlText; + PyramidLevelAutoButton.Text = "Auto"; + } + else + { + PyramidLevelAutoButton.ForeColor = System.Drawing.SystemColors.ControlLightLight; + PyramidLevelAutoButton.Text = "Auto!"; + mAssistant.setAuto(MatchingParam.AUTO_NUM_LEVEL); + } + } + + private void setPyramidLevel(int val) + { + mAssistant.setPyramidLevel(val); + } + + /********************************************************************/ + /* metricBox */ + /********************************************************************/ + private void MetricBox_SelectedIndexChanged(object sender, System.EventArgs e) + { + if(!locked) + mAssistant.setMetric(MetricBox.Text); + } + + + /********************************************************************/ + /* Auto optimizationBox */ + /********************************************************************/ + private void OptimizationBox_SelectedIndexChanged(object sender, System.EventArgs e) + { + if(!locked) + mAssistant.setOptimization((string)OptimizationBox.Text); + + if(!parameterSet.isAuto(MatchingParam.AUTO_OPTIMIZATION)) + { + OptimizationAutoButton.ForeColor = System.Drawing.SystemColors.ControlText; + OptimizationAutoButton.Text = "Auto"; + } + } + private void OptimizationAutoButton_Click(object sender, System.EventArgs e) + { + if(mAssistant.removeAuto(MatchingParam.AUTO_OPTIMIZATION)) + { + OptimizationAutoButton.ForeColor = System.Drawing.SystemColors.ControlText; + OptimizationAutoButton.Text = "Auto"; + } + else + { + OptimizationAutoButton.ForeColor = System.Drawing.SystemColors.ControlLightLight; + OptimizationAutoButton.Text = "Auto!"; + mAssistant.setAuto(MatchingParam.AUTO_OPTIMIZATION); + } + + } + + /********************************************************************/ + /* Auto minContrast */ + /********************************************************************/ + private void MinContrastUpDown_ValueChanged(object sender, System.EventArgs e) + { + int val = (int)MinContrastUpDown.Value; + MinContrastTrackBar.Value = val; + + if(!locked) + setMinContrast(val); + + if(!parameterSet.isAuto(MatchingParam.AUTO_MIN_CONTRAST)) + { + MinContrastAutoButton.ForeColor = System.Drawing.SystemColors.ControlText; + MinContrastAutoButton.Text = "Auto"; + } + } + + private void MinContrastTrackBar_Scroll(object sender, System.EventArgs e) + { + MinContrastUpDown.Value = MinContrastTrackBar.Value; + MinContrastUpDown.Refresh(); + } + + private void MinContrastAutoButton_Click(object sender, System.EventArgs e) + { + if(mAssistant.removeAuto(MatchingParam.AUTO_MIN_CONTRAST)) + { + MinContrastAutoButton.ForeColor = System.Drawing.SystemColors.ControlText; + MinContrastAutoButton.Text = "Auto"; + } + else + { + MinContrastAutoButton.ForeColor = System.Drawing.SystemColors.ControlLightLight; + MinContrastAutoButton.Text = "Auto!"; + mAssistant.setAuto(MatchingParam.AUTO_MIN_CONTRAST); + } + } + + + private void setMinContrast(int val) + { + mAssistant.setMinContrast(val); + } + + + /**********************************************************************/ + /************ 2. Tab: USE MODEL **************************************/ + /**************** Eventhandling ***************************************/ + /**********************************************************************/ + + private void LoadTestImgButton_Click(object sender, System.EventArgs e) + { + string [] files; + int count = 0; + + if(openFileDialog2.ShowDialog() == DialogResult.OK) + { + files = openFileDialog2.FileNames; + count = files.Length; + + for(int i=0; i<count; i++) + { + if(mAssistant.addTestImages(files[i])) + testImgListBox.Items.Add(files[i]); + } + + if(testImgListBox.SelectedIndex<0 && testImgListBox.Items.Count != 0) + { + CurrentImg = mAssistant.getTestImage((string)testImgListBox.Items[0]); + testImgListBox.SelectedIndex = 0; + FindModelGraphics(); + } + }//if + } + + /********************************************************************/ + /********************************************************************/ + private void deleteTestImgButton_Click(object sender, System.EventArgs e) + { + int count; + if((count = testImgListBox.SelectedIndex) < 0) + return; + + string fileName = (string)testImgListBox.SelectedItem; + + if((--count) < 0) + count+=2; + + if((count < testImgListBox.Items.Count)) + { + testImgListBox.SelectedIndex = count; + } + + mAssistant.removeTestImage(fileName); + testImgListBox.Items.Remove(fileName); + } + + + /********************************************************************/ + /********************************************************************/ + private void deleteAllTestImgButton_Click(object sender, System.EventArgs e) + { + if(testImgListBox.Items.Count>0) + { + testImgListBox.Items.Clear(); + mAssistant.removeTestImage(); + DetectionContour = null; + + mView.clearList(); + changeWindowMode(2); + mView.repaint(); + } + } + + /********************************************************************/ + /********************************************************************/ + private void testImgListBox_SelectedIndexChanged(object sender, System.EventArgs e) + { + string file; + + if(testImgListBox.SelectedIndex < 0) + { + mView.clearList(); + changeWindowMode(2); + mView.repaint(); + return; + } + + DetectionContour = null; + file = (string)testImgListBox.SelectedItem; + mAssistant.setTestImage(file); + + changeWindowMode(2); + + if(FindAlwaysCheckBox.Checked + && (mAssistant.onExternalModelID || (ModelRegion != null))) + { + mAssistant.applyFindModel(); + } + else + { + mView.repaint(); + } + } + + /********************************************************************/ + /********************************************************************/ + private void displayTestImgButton_Click(object sender, System.EventArgs e) + { + string file; + + if(testImgListBox.Items.Count == 0) + { + mView.clearList(); + changeWindowMode(2); + mView.repaint(); + + UpdateMatching(MatchingAssistant.ERR_NO_TESTIMAGE); + return; + } + + + file = (string)testImgListBox.SelectedItem; + CurrentImg = mAssistant.getTestImage(file); + + changeWindowMode(2, CurrentImg); + + if(!FindAlwaysCheckBox.Checked) + DetectionContour = null; + + FindModelGraphics(); + + if(ModelContour != null && FindAlwaysCheckBox.Checked) + { + mAssistant.applyFindModel(); + } + else + { + mView.repaint(); + } + } + + /********************************************************************/ + /********************************************************************/ + private void findModelButton_Click(object sender, System.EventArgs e) + { + + if(testImgListBox.Items.Count!=0) + changeWindowMode(2); + + mAssistant.applyFindModel(); + } + + private void findAlwaysCheckBox_CheckedChanged(object sender, System.EventArgs e) + { + bool flag = FindAlwaysCheckBox.Checked; + + if(flag && testImgListBox.Items.Count!=0) + changeWindowMode(2); + + mAssistant.setFindAlways(flag); + } + + /********************************************************************/ + /* minScore */ + /********************************************************************/ + private void MinScoreUpDown_ValueChanged(object sender, System.EventArgs e) + { + int val = (int)MinScoreUpDown.Value; + MinScoreTrackBar.Value = val; + + if(!locked) + setMinScore(val); + } + + private void MinScoreTrackBar_Scroll(object sender, System.EventArgs e) + { + MinScoreUpDown.Value = MinScoreTrackBar.Value; + MinScoreUpDown.Refresh(); + + } + + private void setMinScore(int val) + { + if(testImgListBox.Items.Count!=0 && FindAlwaysCheckBox.Checked) + changeWindowMode(2); + + mAssistant.setMinScore((double)val/100.0); + } + + /********************************************************************/ + /* numMatches */ + /********************************************************************/ + private void NumMatchesUpDown_ValueChanged(object sender, System.EventArgs e) + { + int val = (int) NumMatchesUpDown.Value; + NumMatchesTrackBar.Value = val; + InspectMaxNoMatchUpDown.Value = val; + + if(!locked) + setNumMatches(val); + } + + private void NumMatchesTrackBar_Scroll(object sender, System.EventArgs e) + { + NumMatchesUpDown.Value = NumMatchesTrackBar.Value; + NumMatchesUpDown.Refresh(); + } + + private void setNumMatches(int val) + { + if(testImgListBox.Items.Count!=0 && FindAlwaysCheckBox.Checked) + changeWindowMode(2); + + if(val==0) + { + if(FindMaxNoOfModelButton.Checked==true) + FindAtLeastOneModelButton.Checked=true; + + FindMaxNoOfModelButton.Enabled=false; + } + else + { + FindMaxNoOfModelButton.Enabled=true; + } + + + mAssistant.setNumMatches(val); + } + + /********************************************************************/ + /* greediness */ + /********************************************************************/ + private void GreedinessUpDown_ValueChanged(object sender, System.EventArgs e) + { + int val = (int) GreedinessUpDown.Value; + GreedinessTrackBar.Value = val; + + if(!locked) + setGreediness(val); + } + + private void GreedinessTrackBar_Scroll(object sender, System.EventArgs e) + { + GreedinessUpDown.Value = GreedinessTrackBar.Value; + GreedinessUpDown.Refresh(); + } + + private void setGreediness(int val) + { + if(testImgListBox.Items.Count!=0 && FindAlwaysCheckBox.Checked) + changeWindowMode(2); + + mAssistant.setGreediness((double)val/100.0); + } + + /********************************************************************/ + /* maxOverlap */ + /********************************************************************/ + private void MaxOverlapUpDown_ValueChanged(object sender, System.EventArgs e) + { + int val = (int) MaxOverlapUpDown.Value; + MaxOverlapTrackBar.Value = val; + + if(!locked) + setMaxOverlap(val); + } + + private void MaxOverlapTrackBar_Scroll(object sender, System.EventArgs e) + { + MaxOverlapUpDown.Value = MaxOverlapTrackBar.Value; + MaxOverlapUpDown.Refresh(); + } + + private void setMaxOverlap(int val) + { + if(testImgListBox.Items.Count!=0 && FindAlwaysCheckBox.Checked) + changeWindowMode(2); + + mAssistant.setMaxOverlap((double)val/100.0); + } + + /********************************************************************/ + /* subpixelBox */ + /********************************************************************/ + private void SubPixelBox_SelectedIndexChanged(object sender, System.EventArgs e) + { + if(!locked) + { + if(testImgListBox.Items.Count!=0 && FindAlwaysCheckBox.Checked) + changeWindowMode(2); + + mAssistant.setSubPixel(SubPixelBox.Text); + } + } + + /********************************************************************/ + /* lastPyramidLevel */ + /********************************************************************/ + private void LastPyrLevUpDown_ValueChanged(object sender, System.EventArgs e) + { + int val = (int) LastPyrLevUpDown.Value; + LastPyrLevTrackBar.Value = val; + + if(!locked) + setLastPyramidLevel(val); + } + + private void LastPyrLevTrackBar_Scroll(object sender, System.EventArgs e) + { + LastPyrLevUpDown.Value = LastPyrLevTrackBar.Value; + LastPyrLevUpDown.Refresh(); + } + + private void setLastPyramidLevel(int val) + { + if(testImgListBox.Items.Count!=0 && FindAlwaysCheckBox.Checked) + changeWindowMode(2); + + mAssistant.setLastPyramLevel(val); + } + + + /*************************************************************************/ + /******** 3. Tab: Optimize Recognition Speed ****************************/ + /******************* Eventhandling ***************************************/ + /*************************************************************************/ + private void FindNoOfInstButton_CheckedChanged(object sender, System.EventArgs e) + { + if(!locked && FindNoOfInstButton.Checked) + mAssistant.setRecogSpeedMode(MatchingParam.RECOGM_MANUALSELECT); + } + + private void FindAtLeastOneModelButton_CheckedChanged(object sender, System.EventArgs e) + { + if(!locked && FindAtLeastOneModelButton.Checked) + mAssistant.setRecogSpeedMode(MatchingParam.RECOGM_ATLEASTONE); + } + + private void FindMaxNoOfModelButton_CheckedChanged(object sender, System.EventArgs e) + { + if(!locked && FindMaxNoOfModelButton.Checked) + mAssistant.setRecogSpeedMode(MatchingParam.RECOGM_MAXNUMBER); + } + + /********************************************************************/ + /* RecognitionRate */ + /********************************************************************/ + private void RecognRateComboBox_SelectedIndexChanged(object sender, System.EventArgs e) + { + int val = RecognRateComboBox.SelectedIndex; + + if(!locked) + mAssistant.setRecogRateOption(val); + } + + private void recogRateUpDown_ValueChanged(object sender, System.EventArgs e) + { + int val = (int)recogRateUpDown.Value; + recogRateTrackBar.Value = val; + mAssistant.setRecogitionRate(val); + } + + private void recogRateTrackBar_Scroll(object sender, System.EventArgs e) + { + recogRateUpDown.Value = recogRateTrackBar.Value; + recogRateUpDown.Refresh(); + } + + private void RecogNoManSelUpDown_ValueChanged(object sender, System.EventArgs e) + { + int val = (int)RecogNoManSelUpDown.Value; + if(!locked) + mAssistant.setRecogManualSelection(val); + } + + /*******************************************************************/ + /*******************************************************************/ + private void runOptimizeSpeedButton_Click(object sender, System.EventArgs e) + { + if(testImgListBox.Items.Count!=0) + changeWindowMode(2); + + if(!timer.Enabled) + { + FindAlwaysCheckBox.Checked = false; + optInstance = speedOptHandler; + optInstance.reset(); + UpdateStatisticsData(MatchingOpt.UPDATE_RECOG_UPDATE_VALS); + UpdateStatisticsData(MatchingOpt.UPDATE_RECOG_OPTIMUM_VALS); + UpdateStatisticsData(MatchingOpt.UPDATE_RECOG_STATISTICS_STATUS); + + OptimizeButton.Text = "Stop"; + mAssistant.onTimer = true; + timer.Enabled = true; + } + else + { + timer.Enabled = false; + OptimizeButton.Text = "Run Optimization"; + mAssistant.onTimer = false; + UpdateStatisticsData(MatchingOpt.RUN_FAILED); + } + } + + /*******************************************************************/ + /*******************************************************************/ + private void runStatisticsButton_Click(object sender, System.EventArgs e) + { + if(testImgListBox.Items.Count!=0) + changeWindowMode(2); + + if(!timer.Enabled) + { + FindAlwaysCheckBox.Checked = false; + optInstance = inspectOptHandler; + optInstance.reset(); + UpdateStatisticsData(MatchingOpt.UPDATE_INSP_RECOGRATE); + UpdateStatisticsData(MatchingOpt.UPDATE_INSP_STATISTICS); + + StatisticsButton.Text = "Stop"; + timer.Enabled = true; + mAssistant.onTimer = true; + } + else + { + timer.Enabled = false; + StatisticsButton.Text = "Run Inspect"; + mAssistant.onTimer = false; + } + } + + private void InspectMaxNoMatchUpDown_ValueChanged(object sender, System.EventArgs e) + { + if(InspectMaxNoMatchUpDown.Value != NumMatchesUpDown.Value) + NumMatchesUpDown.Value = (int)InspectMaxNoMatchUpDown.Value; + } + + /*******************************************************************/ + /*******************************************************************/ + private void timer_ticked(object sender, System.EventArgs e) + { + bool run; + run = optInstance.ExecuteStep(); + + if(!run) + { + timer.Enabled = false; + optInstance.stop(); + mAssistant.onTimer = false; + + OptimizeButton.Text = "Run Optimization"; + StatisticsButton.Text = "Run Inspect"; + } + } + + /**********************************************************************/ + /**********************************************************************/ + /* Delegate Routines */ + /**********************************************************************/ + /**********************************************************************/ + + /// <summary> + /// This method is invoked if changes occur in the HWndCtrl instance + /// or the ROIController. In either case, the HALCON + /// window needs to be updated/repainted. + /// </summary> + public void UpdateViewData(int val) + { + + switch(val) + { + case ROIController.EVENT_CHANGED_ROI_SIGN: + case ROIController.EVENT_DELETED_ACTROI: + case ROIController.EVENT_DELETED_ALL_ROIS: + case ROIController.EVENT_UPDATE_ROI: + ModelContour = null; + DetectionContour = null; + bool genROI = roiController.defineModelROI(); + ModelRegion = roiController.getModelRegion(); + mAssistant.setModelROI(ModelRegion); + CreateModelGraphics(); + if(!genROI) + mView.repaint(); + + break; + case HWndCtrl.ERR_READING_IMG: + MessageBox.Show("Problem occured while reading file! \n" + mView.exceptionText, + "Matching assistant", + MessageBoxButtons.OK, + MessageBoxIcon.Information); + break; + default: + break; + } + } + + /// <summary> + /// This method is invoked for any changes in the + /// MatchingAssistant, concerning the model creation and + /// the model finding. Also changes in the display mode + /// (e.g., pyramid level) are mapped here. + /// </summary> + public void UpdateMatching(int val) + { + bool paint=false; + switch(val) + { + case MatchingAssistant.UPDATE_XLD: + ModelContour = mAssistant.getModelContour(); + CreateModelGraphics(); + paint = true; + break; + case MatchingAssistant.UPDATE_DISPLEVEL: + CurrentImg = mAssistant.getDispImage(); + ModelContour = mAssistant.getModelContour(); + CreateModelGraphics(); + paint = true; + break; + case MatchingAssistant.UPDATE_PYRAMID: + DispPyramidTrackBar.Enabled = true; + DispPyramidUpDown.Enabled = true; + break; + case MatchingAssistant.UPDATE_DETECTION_RESULT: + DetectionContour = mAssistant.getDetectionResults(); + FindModelGraphics(); + paint = true; + break; + case MatchingAssistant.UPDATE_TESTVIEW: + CurrentImg = mAssistant.getCurrTestImage(); + FindModelGraphics(); + break; + case MatchingAssistant.ERR_WRITE_SHAPEMODEL: + MessageBox.Show("Problem occured while writing into file \n" + mAssistant.exceptionText, + "Matching Wizard", + MessageBoxButtons.OK, + MessageBoxIcon.Error); + break; + case MatchingAssistant.ERR_READ_SHAPEMODEL: + MessageBox.Show("Problem occured while reading from file \n" + mAssistant.exceptionText, + "Matching Wizard", + MessageBoxButtons.OK, + MessageBoxIcon.Error); + break; + case MatchingAssistant.ERR_NO_MODEL_DEFINED: + MessageBox.Show("Please define a Model!", + "Matching Wizard", + MessageBoxButtons.OK, + MessageBoxIcon.Information); + paint = true; + break; + case MatchingAssistant.ERR_NO_IMAGE: + MessageBox.Show("Please load an image", + "Matching Wizard", + MessageBoxButtons.OK, + MessageBoxIcon.Information); + break; + case MatchingAssistant.ERR_NO_TESTIMAGE: + MessageBox.Show("Please load a testimage", + "Matching Wizard", + MessageBoxButtons.OK, + MessageBoxIcon.Information); + paint = true; + break; + case MatchingAssistant.ERR_NO_VALID_FILE: + MessageBox.Show("Selected file is not a HALCON ShapeModel file .shm", + "Matching Wizard", + MessageBoxButtons.OK, + MessageBoxIcon.Information); + break; + case MatchingAssistant.ERR_READING_IMG: + UpdateViewData(HWndCtrl.ERR_READING_IMG); + break; + case MatchingAssistant.ERR_FINDSHAPEMODEL: + MessageBox.Show("模板匹配失败", + "Matching Wizard", + MessageBoxButtons.OK, + MessageBoxIcon.Information); + break; + case MatchingAssistant.ERR_PARAMSET: + MessageBox.Show("错误的参数设置", + "Matching Wizard", + MessageBoxButtons.OK, + MessageBoxIcon.Information); + break; + default: + break; + } + if(paint) + mView.repaint(); + } + + + /// <summary> + /// Calculates new optimal values for a parameter, if the parameter is + /// in the auto-mode list. The new settings are forwarded to the GUI + /// components to update the display. + /// </summary> + public void UpdateButton(string mode) + { + int [] r; + locked = true; + switch (mode) + { + case MatchingParam.AUTO_ANGLE_STEP: + AngleStepUpDown.Value = (int)((parameterSet.mAngleStep*10.0)*180.0/Math.PI); + break; + case MatchingParam.AUTO_CONTRAST: + ContrastUpDown.Value = (int)parameterSet.mContrast; + break; + case MatchingParam.AUTO_MIN_CONTRAST: + MinContrastUpDown.Value = (int)parameterSet.mMinContrast; + break; + case MatchingParam.AUTO_NUM_LEVEL: + PyramidLevelUpDown.Value = (int)parameterSet.mNumLevel; + break; + case MatchingParam.AUTO_OPTIMIZATION: + OptimizationBox.Text = parameterSet.mOptimization; + break; + case MatchingParam.AUTO_SCALE_STEP: + ScaleStepUpDown.Value = (int)(parameterSet.mScaleStep*1000); + break; + case MatchingParam.BUTTON_ANGLE_EXTENT: + AngleExtentUpDown.Value = (int)(parameterSet.mAngleExtent*180.0/Math.PI); + break; + case MatchingParam.BUTTON_ANGLE_START: + StartingAngleUpDown.Value = (int)(parameterSet.mStartingAngle*180.0/Math.PI); + break; + case MatchingParam.BUTTON_METRIC: + MetricBox.Text = parameterSet.mMetric; + break; + case MatchingParam.BUTTON_SCALE_MAX: + MaxScaleUpDown.Value = (int)(parameterSet.mMaxScale*100.0); + break; + case MatchingParam.BUTTON_SCALE_MIN: + MinScaleUpDown.Value = (int)(parameterSet.mMinScale*100.0); + break; + case MatchingParam.BUTTON_MINSCORE: + MinScoreUpDown.Value = (int)(parameterSet.mMinScore*100); + break; + case MatchingParam.BUTTON_GREEDINESS: + GreedinessUpDown.Value = (int)(parameterSet.mGreediness*100); + break; + case MatchingParam.H_ERR_MESSAGE: + MessageBox.Show("Bad Parameters! \n" + mAssistant.exceptionText, + "Matching Wizard", + MessageBoxButtons.OK, + MessageBoxIcon.Exclamation); + break; + case MatchingParam.RANGE_ANGLE_STEP: + r = mAssistant.getStepRange(MatchingParam.RANGE_ANGLE_STEP); + AngleStepTrackBar.Minimum = r[0]; + AngleStepUpDown.Minimum = r[0]; + AngleStepTrackBar.Maximum = r[1]; + AngleStepUpDown.Maximum = r[1]; + + AngleStepUpDown.Value = (int)((parameterSet.mAngleStep*10.0)*180.0/Math.PI); + break; + case MatchingParam.RANGE_SCALE_STEP: + r = mAssistant.getStepRange(MatchingParam.RANGE_SCALE_STEP); + ScaleStepTrackBar.Minimum = r[0]; + ScaleStepUpDown.Minimum = r[0]; + ScaleStepTrackBar.Maximum = r[1]; + ScaleStepUpDown.Maximum = r[1]; + + ScaleStepUpDown.Value = (int)(parameterSet.mScaleStep*1000); + break; + default: + break; + } + locked = false; + } + + + /// <summary> + /// This method is invoked when the inspection tab or the + /// recognition tab are triggered to compute the optimized values + /// and to forward the results to the display. + /// </summary> + public void UpdateStatisticsData(int mode) + { + + switch (mode) + { + case MatchingOpt.UPDATE_RECOG_STATISTICS_STATUS: + labelOptStatus.Text = optInstance.statusString; + break; + case MatchingOpt.UPDATE_RECOG_UPDATE_VALS: + labelRecogn11.Text = optInstance.recogTabOptimizationData[0]; + labelRecogn12.Text = optInstance.recogTabOptimizationData[1]; + labelRecogn13.Text = optInstance.recogTabOptimizationData[2]; + labelRecogn14.Text = optInstance.recogTabOptimizationData[3]; + break; + case MatchingOpt.UPDATE_RECOG_OPTIMUM_VALS: + labelRecogn21.Text = optInstance.recogTabOptimizationData[4]; + labelRecogn22.Text = optInstance.recogTabOptimizationData[5]; + labelRecogn23.Text = optInstance.recogTabOptimizationData[6]; + labelRecogn24.Text = optInstance.recogTabOptimizationData[7]; + break; + case MatchingOpt.UPDATE_INSP_RECOGRATE: + labelInspect01.Text = optInstance.inspectTabRecogRateData[0]; + labelInspect02.Text = optInstance.inspectTabRecogRateData[1]; + labelInspect03.Text = optInstance.inspectTabRecogRateData[2]; + labelInspect04.Text = optInstance.inspectTabRecogRateData[3]; + labelInspect05.Text = optInstance.inspectTabRecogRateData[4]; + break; + case MatchingOpt.UPDATE_INSP_STATISTICS: + labelInspect11.Text = optInstance.inspectTabStatisticsData[0]; + labelInspect21.Text = optInstance.inspectTabStatisticsData[1]; + labelInspect31.Text = optInstance.inspectTabStatisticsData[2]; + + labelInspect12.Text = optInstance.inspectTabStatisticsData[3]; + labelInspect22.Text = optInstance.inspectTabStatisticsData[4]; + labelInspect32.Text = optInstance.inspectTabStatisticsData[5]; + + labelInspect13.Text = optInstance.inspectTabStatisticsData[6]; + labelInspect23.Text = optInstance.inspectTabStatisticsData[7]; + labelInspect33.Text = optInstance.inspectTabStatisticsData[8]; + + labelInspect14.Text = optInstance.inspectTabStatisticsData[9]; + labelInspect24.Text = optInstance.inspectTabStatisticsData[10]; + labelInspect34.Text = optInstance.inspectTabStatisticsData[11]; + + labelInspect15.Text = optInstance.inspectTabStatisticsData[12]; + labelInspect25.Text = optInstance.inspectTabStatisticsData[13]; + labelInspect35.Text = optInstance.inspectTabStatisticsData[14]; + + labelInspect16.Text = optInstance.inspectTabStatisticsData[15]; + labelInspect26.Text = optInstance.inspectTabStatisticsData[16]; + labelInspect36.Text = optInstance.inspectTabStatisticsData[17]; + + labelInspect17.Text = optInstance.inspectTabStatisticsData[18]; + labelInspect27.Text = optInstance.inspectTabStatisticsData[19]; + labelInspect37.Text = optInstance.inspectTabStatisticsData[20]; + break; + case MatchingOpt.UPDATE_TEST_ERR: + MessageBox.Show("Optimization failed! \n Please check if your model is well defined\n(e.g contains some model contours)!?", + "Shapebases Matching Assistant", + MessageBoxButtons.OK, + MessageBoxIcon.Exclamation); + break; + case MatchingOpt.UPDATE_RECOG_ERR: + labelOptStatus.Text = "Optimization failed"; + MessageBox.Show("There was no appropriate set of parameters to match - \n" + + "Check if your model is well defined and the parameters\nfor model creation are set appropriately!", + "Shapebases Matching Assistant", + MessageBoxButtons.OK, + MessageBoxIcon.Exclamation); + break; + case MatchingAssistant.ERR_NO_TESTIMAGE: + UpdateMatching(MatchingAssistant.ERR_NO_TESTIMAGE); + break; + case MatchingOpt.RUN_SUCCESSFUL: + UpdateButton(MatchingParam.BUTTON_GREEDINESS); + UpdateButton(MatchingParam.BUTTON_MINSCORE); + break; + case MatchingOpt.RUN_FAILED: + setMinScore((int)MinScoreUpDown.Value); + setGreediness((int)GreedinessUpDown.Value); + break; + default: + break; + } + } + + + /********************************************************************/ + /********************************************************************/ + private void CreateModelGraphics() + { + mView.clearList(); + mView.changeGraphicSettings(GraphicsContext.GC_LINESTYLE, new HTuple()); + mView.addIconicVar(CurrentImg); + if(ModelRegion != null) + { + mView.changeGraphicSettings(GraphicsContext.GC_COLOR, "blue"); + mView.changeGraphicSettings(GraphicsContext.GC_LINEWIDTH, 3); + mView.addIconicVar(ModelRegion); + } + if(ModelContour != null) + { + mView.changeGraphicSettings(GraphicsContext.GC_COLOR, "red"); + mView.changeGraphicSettings(GraphicsContext.GC_LINEWIDTH, 1); + mView.addIconicVar(ModelContour); + } + } + + private void FindModelGraphics() + { + mView.clearList(); + mView.changeGraphicSettings(GraphicsContext.GC_LINESTYLE, new HTuple()); + mView.addIconicVar(CurrentImg); + if(DetectionContour != null) + { + mView.changeGraphicSettings(GraphicsContext.GC_COLOR, "green"); + mView.changeGraphicSettings(GraphicsContext.GC_LINEWIDTH, 3); + mView.addIconicVar(DetectionContour); + } + } + + + /********************************************************************/ + /********************************************************************/ + private void tabControl_SelectedIndexChanged(object sender, System.EventArgs e) + { + if(tabControl.SelectedIndex == 0) + { + changeWindowMode(1); + CreateModelGraphics(); + } + else if (tabControl.SelectedIndex == 4) + { + this.labAngleMin.Text = mAssistant.getParameterSet.mStartingAngle.ToString(); + this.labAngleExt.Text = mAssistant.getParameterSet.mAngleExtent.ToString(); + + this.labScaleMin.Text = mAssistant.getParameterSet.mMinScale.ToString(); + this.labScaleMax.Text = mAssistant.getParameterSet.mMaxScale.ToString(); + + this.labScoreMin.Text = mAssistant.getParameterSet.mMinScore.ToString(); + + this.labMatchesMax.Text = mAssistant.getParameterSet.mNumMatches.ToString(); + + this.labOverlapMax.Text = mAssistant.getParameterSet.mMaxOverlap.ToString(); + + this.labSubPixelSelect.Text = mAssistant.getParameterSet.mSubpixel.ToString(); + + this.labNumLevelsMax.Text = mAssistant.getParameterSet.mNumLevel.ToString(); + + this.labGreedinessMax.Text = mAssistant.getParameterSet.mGreediness.ToString(); + + } + else + { + changeWindowMode(2); + FindModelGraphics(); + } + mView.repaint(); + } + + /********************************************************************/ + /********************************************************************/ + private void changeWindowMode(int mode) + { + HImage img = null; + + if(mode==2) + img = mAssistant.getCurrTestImage(); + + changeWindowMode(mode, img); + } + + private void changeWindowMode(int mode, HImage testImage) + { + mView.setDispLevel(mode); + + switch(mode) + { + case 1: + CurrentImg = mAssistant.getDispImage(); + if(mAssistant.onExternalModelID) + { + WindowModePanel.BackColor = System.Drawing.SystemColors.ControlDark; + } + else if(CurrentImg==null) + { + WindowModePanel.BackColor = createModelWindowMode; + } + else + { + WindowModePanel.BackColor = createModelWindowMode; + groupBoxCreateROI.Enabled = true; + } + break; + + case 2: + WindowModePanel.BackColor = trainModelWindowMode; + CurrentImg = testImage; + groupBoxCreateROI.Enabled = false; + break; + } + } + + private void butSaveConfige_Click(object sender, EventArgs e) + { + MatchingParamSave param = new MatchingParamSave(); + + param.Save(mAssistant); + } + + private void frmMatchingAssistant_Load(object sender, EventArgs e) + { + + } + + }//end of class +}//end of namespace diff --git a/HalconTools/frmMatchingAssistant.resx b/HalconTools/frmMatchingAssistant.resx new file mode 100644 index 0000000..2446714 --- /dev/null +++ b/HalconTools/frmMatchingAssistant.resx @@ -0,0 +1,138 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="openFileDialog2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>165, 17</value> + </metadata> + <metadata name="timer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>461, 17</value> + </metadata> + <metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>544, 17</value> + </metadata> + <metadata name="openFileDialog3.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>313, 17</value> + </metadata> + <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>55</value> + </metadata> +</root> \ No newline at end of file diff --git a/HalconTools/frmMeasureAssistant.cs b/HalconTools/frmMeasureAssistant.cs new file mode 100644 index 0000000..ba9b77d --- /dev/null +++ b/HalconTools/frmMeasureAssistant.cs @@ -0,0 +1,2649 @@ +using System; +using System.Drawing; +using System.Collections; +using System.ComponentModel; +using System.Windows.Forms; +using System.Data; +using HalconDotNet; + +namespace HalconTools +{ + /// <summary> + /// This project provides the main functionality of HDevelop's Measure Assistant, + /// with the main exception of fuzzy measure. + /// In the first tab you can adjust the parameters for edge + /// detection. The second tab displays the measure results and the + /// third tab plots the gray value profile of the selected ROI. + /// The project is composed of several classes for paremeterizing + /// the measurements (like MeasurementEdge, MeasurementPair or + /// MeasurementResult) and the controller class MeasureAssistant, + /// which is in charge of the communication between the GUI-frontend + /// and the model classes. + /// </summary> + public class frmMeasureAssistant : System.Windows.Forms.Form + { + + /* base variables */ + private HWindowControl viewPort; + private HWndCtrl mView; + private ROIController roiController; + private MeasureAssistant mAssistant; + private HXLDCont mShadow; + private FunctionPlot plotGraphWindow; + private HImage currImage; + + /* display parameters */ + private string regionColor; + private string edgeColor; + private int lineWidth; + + private bool displayRegion; + private bool useShadow; + private bool updateLineProfile; + + + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Button LoadImgButton; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.RadioButton NoneButton; + private System.Windows.Forms.RadioButton MoveButton; + private System.Windows.Forms.RadioButton ZoomButton; + private System.Windows.Forms.Button LineButton; + private System.Windows.Forms.Button DeleteActRoiButton; + private System.Windows.Forms.Button ResetROIButton; + private System.Windows.Forms.TabControl tabControl; + private System.Windows.Forms.TabPage tabPageEdges; + private System.Windows.Forms.TabPage tabPageResults; + private System.Windows.Forms.OpenFileDialog openImageFileDialog; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.GroupBox groupBox5; + private System.Windows.Forms.CheckBox EdgeToPaircheckBox; + private System.Windows.Forms.RadioButton MagnifyButton; + private System.Windows.Forms.GroupBox groupBox6; + private System.Windows.Forms.ComboBox TransitionComboBox; + private System.Windows.Forms.ComboBox PositionComboBox; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.ComboBox RegionColorComboBox; + private System.Windows.Forms.ComboBox EdgeColorComboBox; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.NumericUpDown EdgeLengthUpDown; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.NumericUpDown LineWidthDown; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.CheckBox ShowRegionCheckBox; + private System.Windows.Forms.CheckBox UseShadowsCheckBox; + private System.Windows.Forms.CheckBox UseROIWidthCheckBox; + private System.Windows.Forms.NumericUpDown ROIWidthUpDown; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.NumericUpDown SmoothingUpDown; + private System.Windows.Forms.NumericUpDown MinEdgAmplUpDown; + private System.Windows.Forms.ComboBox InterpolationComboBox; + private System.Windows.Forms.Button ResetViewButton; + private System.Windows.Forms.TrackBar MinEdgAmplTrackBar; + private System.Windows.Forms.TrackBar SmoothingTrackBar; + private System.Windows.Forms.TrackBar ROIWidthTrackBar; + private System.Windows.Forms.Button ResetMinEdgAmplButton; + private System.Windows.Forms.Label StatusLabel; + private System.Windows.Forms.Button ResetSmoothingButton; + private System.Windows.Forms.Button ResetROIWidthButton; + private System.Windows.Forms.GroupBox groupBox7; + private System.Windows.Forms.CheckBox PositionCheckBox; + private System.Windows.Forms.CheckBox PairWidthCheckBox; + private System.Windows.Forms.CheckBox AmplitudeCheckBox; + private System.Windows.Forms.CheckBox DistanceCheckBox; + private System.Windows.Forms.GroupBox groupBox8; + private System.Windows.Forms.CheckBox TransWCoordCheckBox; + private System.Windows.Forms.Button LoadPoseButton; + private System.Windows.Forms.Button LoadCalibButton; + private System.Windows.Forms.TextBox CalibCamTextBox; + private System.Windows.Forms.TextBox CalibPoseTextBox; + private System.Windows.Forms.ListView EdgeResultListView; + private System.Windows.Forms.OpenFileDialog openCamparFileDialog; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.ComboBox UnitComboBox; + private System.Windows.Forms.Panel UnitPanel; + private System.Windows.Forms.ListBox ActiveROIListBox; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.CheckBox ShowROIcheckBox; + private System.Windows.Forms.Button CircArcButton; + private System.Windows.Forms.TabPage tabPageLineProfile; + private System.Windows.Forms.GroupBox groupBox9; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.Label label18; + private System.Windows.Forms.Label label19; + private System.Windows.Forms.Label label22; + private System.Windows.Forms.Label label23; + private System.Windows.Forms.Label label24; + private System.Windows.Forms.Label label25; + private System.Windows.Forms.Panel panelAxis; + private System.Windows.Forms.Label labelDeviation; + private System.Windows.Forms.Label labelMean; + private System.Windows.Forms.Label labelRange; + private System.Windows.Forms.Label labelPeak; + private System.Windows.Forms.Label labelRangeX; + private System.Windows.Forms.Label labelPeakX; + private System.Windows.Forms.Label label20; + private System.Windows.Forms.ComboBox CSScaleComboBox; + private GroupBox groupBox3; + private TabPage tabPageSaveConfige; + private Button btnSaveConfige; + private Label label11; + private Label labMinEdgeAmpl; + private Label label12; + private Label labMinEdgeAmplSet; + private Label labROIWidth; + private Label labROIWidthSet; + private Label labSmoothing; + private Label labSmoothingSet; + private Label labROIHeightSet; + private Label labTransition; + private Label labTransitionSet; + private Label labInterpolation; + private Label labInterpolationSet; + private Label labPosition; + private Label labPositionSet; + private GroupBox groupBox10; + private Button butRoiHeightReset; + private TrackBar tBroiHeight; + private NumericUpDown numUDRoiHeight; + private Label labROIHeight1; + private Label labROIHeight; + + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.Container components = null; + + public frmMeasureAssistant() + { + // + // Required for Windows Form Designer support + // + InitializeComponent(); + + // + // TODO: Add any constructor code after InitializeComponent call + // + } + + private HImage mImage; + public frmMeasureAssistant(HImage image) + { + InitializeComponent(); + mImage = image; + initLoadImage(); + } + + private void initLoadImage() + { + InitViewer(); + + int dispROI = HWndCtrl.MODE_INCLUDE_ROI; + + roiController.reset(); + mView.resetWindow(); + + mAssistant.setImage(mImage); + + currImage = mAssistant.getImage(); + + mView.setDispLevel(dispROI); + UpdateView(); + } + + public frmMeasureAssistant(string name) + { + InitializeComponent(); + ResourceCulture.SetCurrentCulture(name); + ResourceCulture.SetLanguage((Control)this); + } + + /// <summary> + /// Cleans up the used resources. + /// </summary> + protected override void Dispose(bool disposing) + { + if (disposing) + { + if (components != null) + { + components.Dispose(); + } + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.viewPort = new HalconDotNet.HWindowControl(); + this.tabControl = new System.Windows.Forms.TabControl(); + this.tabPageEdges = new System.Windows.Forms.TabPage(); + this.groupBox6 = new System.Windows.Forms.GroupBox(); + this.ShowROIcheckBox = new System.Windows.Forms.CheckBox(); + this.UseROIWidthCheckBox = new System.Windows.Forms.CheckBox(); + this.UseShadowsCheckBox = new System.Windows.Forms.CheckBox(); + this.ShowRegionCheckBox = new System.Windows.Forms.CheckBox(); + this.label6 = new System.Windows.Forms.Label(); + this.LineWidthDown = new System.Windows.Forms.NumericUpDown(); + this.label5 = new System.Windows.Forms.Label(); + this.EdgeLengthUpDown = new System.Windows.Forms.NumericUpDown(); + this.label4 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.EdgeColorComboBox = new System.Windows.Forms.ComboBox(); + this.RegionColorComboBox = new System.Windows.Forms.ComboBox(); + this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.PositionComboBox = new System.Windows.Forms.ComboBox(); + this.TransitionComboBox = new System.Windows.Forms.ComboBox(); + this.EdgeToPaircheckBox = new System.Windows.Forms.CheckBox(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.butRoiHeightReset = new System.Windows.Forms.Button(); + this.tBroiHeight = new System.Windows.Forms.TrackBar(); + this.numUDRoiHeight = new System.Windows.Forms.NumericUpDown(); + this.labROIHeight1 = new System.Windows.Forms.Label(); + this.ResetROIWidthButton = new System.Windows.Forms.Button(); + this.ResetSmoothingButton = new System.Windows.Forms.Button(); + this.ResetMinEdgAmplButton = new System.Windows.Forms.Button(); + this.ROIWidthTrackBar = new System.Windows.Forms.TrackBar(); + this.SmoothingTrackBar = new System.Windows.Forms.TrackBar(); + this.MinEdgAmplTrackBar = new System.Windows.Forms.TrackBar(); + this.label10 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.MinEdgAmplUpDown = new System.Windows.Forms.NumericUpDown(); + this.SmoothingUpDown = new System.Windows.Forms.NumericUpDown(); + this.InterpolationComboBox = new System.Windows.Forms.ComboBox(); + this.ROIWidthUpDown = new System.Windows.Forms.NumericUpDown(); + this.tabPageResults = new System.Windows.Forms.TabPage(); + this.label15 = new System.Windows.Forms.Label(); + this.ActiveROIListBox = new System.Windows.Forms.ListBox(); + this.EdgeResultListView = new System.Windows.Forms.ListView(); + this.groupBox8 = new System.Windows.Forms.GroupBox(); + this.UnitPanel = new System.Windows.Forms.Panel(); + this.label14 = new System.Windows.Forms.Label(); + this.UnitComboBox = new System.Windows.Forms.ComboBox(); + this.CalibPoseTextBox = new System.Windows.Forms.TextBox(); + this.CalibCamTextBox = new System.Windows.Forms.TextBox(); + this.LoadPoseButton = new System.Windows.Forms.Button(); + this.LoadCalibButton = new System.Windows.Forms.Button(); + this.TransWCoordCheckBox = new System.Windows.Forms.CheckBox(); + this.groupBox7 = new System.Windows.Forms.GroupBox(); + this.DistanceCheckBox = new System.Windows.Forms.CheckBox(); + this.AmplitudeCheckBox = new System.Windows.Forms.CheckBox(); + this.PairWidthCheckBox = new System.Windows.Forms.CheckBox(); + this.PositionCheckBox = new System.Windows.Forms.CheckBox(); + this.tabPageLineProfile = new System.Windows.Forms.TabPage(); + this.label20 = new System.Windows.Forms.Label(); + this.CSScaleComboBox = new System.Windows.Forms.ComboBox(); + this.panelAxis = new System.Windows.Forms.Panel(); + this.groupBox9 = new System.Windows.Forms.GroupBox(); + this.labelDeviation = new System.Windows.Forms.Label(); + this.labelMean = new System.Windows.Forms.Label(); + this.labelRange = new System.Windows.Forms.Label(); + this.labelPeak = new System.Windows.Forms.Label(); + this.label24 = new System.Windows.Forms.Label(); + this.label25 = new System.Windows.Forms.Label(); + this.labelRangeX = new System.Windows.Forms.Label(); + this.labelPeakX = new System.Windows.Forms.Label(); + this.label23 = new System.Windows.Forms.Label(); + this.label22 = new System.Windows.Forms.Label(); + this.label19 = new System.Windows.Forms.Label(); + this.label18 = new System.Windows.Forms.Label(); + this.label17 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.tabPageSaveConfige = new System.Windows.Forms.TabPage(); + this.groupBox10 = new System.Windows.Forms.GroupBox(); + this.labROIHeight = new System.Windows.Forms.Label(); + this.labROIHeightSet = new System.Windows.Forms.Label(); + this.labPosition = new System.Windows.Forms.Label(); + this.labPositionSet = new System.Windows.Forms.Label(); + this.labTransition = new System.Windows.Forms.Label(); + this.labTransitionSet = new System.Windows.Forms.Label(); + this.labInterpolation = new System.Windows.Forms.Label(); + this.labInterpolationSet = new System.Windows.Forms.Label(); + this.labROIWidth = new System.Windows.Forms.Label(); + this.labROIWidthSet = new System.Windows.Forms.Label(); + this.labSmoothing = new System.Windows.Forms.Label(); + this.labSmoothingSet = new System.Windows.Forms.Label(); + this.labMinEdgeAmpl = new System.Windows.Forms.Label(); + this.label12 = new System.Windows.Forms.Label(); + this.labMinEdgeAmplSet = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.btnSaveConfige = new System.Windows.Forms.Button(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.CircArcButton = new System.Windows.Forms.Button(); + this.LineButton = new System.Windows.Forms.Button(); + this.DeleteActRoiButton = new System.Windows.Forms.Button(); + this.ResetROIButton = new System.Windows.Forms.Button(); + this.LoadImgButton = new System.Windows.Forms.Button(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.ResetViewButton = new System.Windows.Forms.Button(); + this.MagnifyButton = new System.Windows.Forms.RadioButton(); + this.ZoomButton = new System.Windows.Forms.RadioButton(); + this.MoveButton = new System.Windows.Forms.RadioButton(); + this.NoneButton = new System.Windows.Forms.RadioButton(); + this.openImageFileDialog = new System.Windows.Forms.OpenFileDialog(); + this.StatusLabel = new System.Windows.Forms.Label(); + this.openCamparFileDialog = new System.Windows.Forms.OpenFileDialog(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.tabControl.SuspendLayout(); + this.tabPageEdges.SuspendLayout(); + this.groupBox6.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.LineWidthDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.EdgeLengthUpDown)).BeginInit(); + this.groupBox5.SuspendLayout(); + this.groupBox4.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.tBroiHeight)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numUDRoiHeight)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.ROIWidthTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.SmoothingTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinEdgAmplTrackBar)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinEdgAmplUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.SmoothingUpDown)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.ROIWidthUpDown)).BeginInit(); + this.tabPageResults.SuspendLayout(); + this.groupBox8.SuspendLayout(); + this.UnitPanel.SuspendLayout(); + this.groupBox7.SuspendLayout(); + this.tabPageLineProfile.SuspendLayout(); + this.groupBox9.SuspendLayout(); + this.tabPageSaveConfige.SuspendLayout(); + this.groupBox10.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.SuspendLayout(); + // + // viewPort + // + this.viewPort.BackColor = System.Drawing.Color.Black; + this.viewPort.BorderColor = System.Drawing.Color.Black; + this.viewPort.ImagePart = new System.Drawing.Rectangle(0, 0, 640, 480); + this.viewPort.Location = new System.Drawing.Point(10, 55); + this.viewPort.Name = "viewPort"; + this.viewPort.Size = new System.Drawing.Size(785, 545); + this.viewPort.TabIndex = 0; + this.viewPort.WindowSize = new System.Drawing.Size(785, 545); + this.viewPort.HMouseMove += new HalconDotNet.HMouseEventHandler(this.viewPort_HMouseMove); + // + // tabControl + // + this.tabControl.Controls.Add(this.tabPageEdges); + this.tabControl.Controls.Add(this.tabPageResults); + this.tabControl.Controls.Add(this.tabPageLineProfile); + this.tabControl.Controls.Add(this.tabPageSaveConfige); + this.tabControl.Location = new System.Drawing.Point(801, 12); + this.tabControl.Name = "tabControl"; + this.tabControl.SelectedIndex = 0; + this.tabControl.Size = new System.Drawing.Size(430, 593); + this.tabControl.TabIndex = 1; + this.tabControl.SelectedIndexChanged += new System.EventHandler(this.tabControl_SelectedIndexChanged); + // + // tabPageEdges + // + this.tabPageEdges.Controls.Add(this.groupBox6); + this.tabPageEdges.Controls.Add(this.groupBox5); + this.tabPageEdges.Controls.Add(this.groupBox4); + this.tabPageEdges.Location = new System.Drawing.Point(4, 22); + this.tabPageEdges.Name = "tabPageEdges"; + this.tabPageEdges.Size = new System.Drawing.Size(422, 567); + this.tabPageEdges.TabIndex = 1; + this.tabPageEdges.Text = " Edges "; + this.tabPageEdges.UseVisualStyleBackColor = true; + // + // groupBox6 + // + this.groupBox6.Controls.Add(this.ShowROIcheckBox); + this.groupBox6.Controls.Add(this.UseROIWidthCheckBox); + this.groupBox6.Controls.Add(this.UseShadowsCheckBox); + this.groupBox6.Controls.Add(this.ShowRegionCheckBox); + this.groupBox6.Controls.Add(this.label6); + this.groupBox6.Controls.Add(this.LineWidthDown); + this.groupBox6.Controls.Add(this.label5); + this.groupBox6.Controls.Add(this.EdgeLengthUpDown); + this.groupBox6.Controls.Add(this.label4); + this.groupBox6.Controls.Add(this.label3); + this.groupBox6.Controls.Add(this.EdgeColorComboBox); + this.groupBox6.Controls.Add(this.RegionColorComboBox); + this.groupBox6.Location = new System.Drawing.Point(10, 392); + this.groupBox6.Name = "groupBox6"; + this.groupBox6.Size = new System.Drawing.Size(403, 172); + this.groupBox6.TabIndex = 3; + this.groupBox6.TabStop = false; + this.groupBox6.Text = "Display Parameters"; + // + // ShowROIcheckBox + // + this.ShowROIcheckBox.Location = new System.Drawing.Point(259, 138); + this.ShowROIcheckBox.Name = "ShowROIcheckBox"; + this.ShowROIcheckBox.Size = new System.Drawing.Size(125, 26); + this.ShowROIcheckBox.TabIndex = 11; + this.ShowROIcheckBox.Text = " Show ROIs"; + this.ShowROIcheckBox.CheckedChanged += new System.EventHandler(this.ShowROIcheckBox_CheckedChanged); + // + // UseROIWidthCheckBox + // + this.UseROIWidthCheckBox.Location = new System.Drawing.Point(259, 103); + this.UseROIWidthCheckBox.Name = "UseROIWidthCheckBox"; + this.UseROIWidthCheckBox.Size = new System.Drawing.Size(125, 26); + this.UseROIWidthCheckBox.TabIndex = 10; + this.UseROIWidthCheckBox.Text = "Use ROI Width"; + this.UseROIWidthCheckBox.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.UseROIWidthCheckBox.CheckedChanged += new System.EventHandler(this.UseROIWidthCheckBox_CheckedChanged); + // + // UseShadowsCheckBox + // + this.UseShadowsCheckBox.Location = new System.Drawing.Point(259, 69); + this.UseShadowsCheckBox.Name = "UseShadowsCheckBox"; + this.UseShadowsCheckBox.Size = new System.Drawing.Size(115, 26); + this.UseShadowsCheckBox.TabIndex = 9; + this.UseShadowsCheckBox.Text = "Use Shadows"; + this.UseShadowsCheckBox.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.UseShadowsCheckBox.CheckedChanged += new System.EventHandler(this.UseShadowsCheckBox_CheckedChanged); + // + // ShowRegionCheckBox + // + this.ShowRegionCheckBox.Location = new System.Drawing.Point(259, 34); + this.ShowRegionCheckBox.Name = "ShowRegionCheckBox"; + this.ShowRegionCheckBox.Size = new System.Drawing.Size(115, 26); + this.ShowRegionCheckBox.TabIndex = 8; + this.ShowRegionCheckBox.Text = "Show Region"; + this.ShowRegionCheckBox.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.ShowRegionCheckBox.CheckedChanged += new System.EventHandler(this.ShowRegionCheckBox_CheckedChanged); + // + // label6 + // + this.label6.Location = new System.Drawing.Point(10, 138); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(86, 26); + this.label6.TabIndex = 7; + this.label6.Text = "Line Width"; + this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // LineWidthDown + // + this.LineWidthDown.Location = new System.Drawing.Point(106, 138); + this.LineWidthDown.Maximum = new decimal(new int[] { + 9, + 0, + 0, + 0}); + this.LineWidthDown.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.LineWidthDown.Name = "LineWidthDown"; + this.LineWidthDown.Size = new System.Drawing.Size(134, 21); + this.LineWidthDown.TabIndex = 6; + this.LineWidthDown.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + this.LineWidthDown.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.LineWidthDown.ValueChanged += new System.EventHandler(this.LineWidthDown_ValueChanged); + // + // label5 + // + this.label5.Location = new System.Drawing.Point(10, 103); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(86, 26); + this.label5.TabIndex = 5; + this.label5.Text = "Edge Length"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // EdgeLengthUpDown + // + this.EdgeLengthUpDown.Location = new System.Drawing.Point(106, 103); + this.EdgeLengthUpDown.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.EdgeLengthUpDown.Name = "EdgeLengthUpDown"; + this.EdgeLengthUpDown.Size = new System.Drawing.Size(134, 21); + this.EdgeLengthUpDown.TabIndex = 4; + this.EdgeLengthUpDown.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + this.EdgeLengthUpDown.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.EdgeLengthUpDown.ValueChanged += new System.EventHandler(this.EdgeLengthUpDown_ValueChanged); + // + // label4 + // + this.label4.Location = new System.Drawing.Point(10, 69); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(86, 26); + this.label4.TabIndex = 3; + this.label4.Text = "Edge Color"; + this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label3 + // + this.label3.Location = new System.Drawing.Point(10, 34); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(86, 26); + this.label3.TabIndex = 2; + this.label3.Text = "Region Color"; + this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // EdgeColorComboBox + // + this.EdgeColorComboBox.Items.AddRange(new object[] { + "green", + "red", + "blue", + "black", + "white", + "yellow", + "magenta", + "cyan", + "gray"}); + this.EdgeColorComboBox.Location = new System.Drawing.Point(106, 69); + this.EdgeColorComboBox.Name = "EdgeColorComboBox"; + this.EdgeColorComboBox.Size = new System.Drawing.Size(134, 20); + this.EdgeColorComboBox.TabIndex = 1; + this.EdgeColorComboBox.Text = "EdgeColor"; + this.EdgeColorComboBox.SelectedIndexChanged += new System.EventHandler(this.EdgeColorComboBox_SelectedIndexChanged); + // + // RegionColorComboBox + // + this.RegionColorComboBox.Items.AddRange(new object[] { + "green", + "red", + "blue", + "black", + "white", + "yellow", + "magenta", + "cyan", + "gray"}); + this.RegionColorComboBox.Location = new System.Drawing.Point(106, 34); + this.RegionColorComboBox.Name = "RegionColorComboBox"; + this.RegionColorComboBox.Size = new System.Drawing.Size(134, 20); + this.RegionColorComboBox.TabIndex = 0; + this.RegionColorComboBox.Text = "RegionColor"; + this.RegionColorComboBox.SelectedIndexChanged += new System.EventHandler(this.RegionColorComboBox_SelectedIndexChanged); + // + // groupBox5 + // + this.groupBox5.Controls.Add(this.label2); + this.groupBox5.Controls.Add(this.label1); + this.groupBox5.Controls.Add(this.PositionComboBox); + this.groupBox5.Controls.Add(this.TransitionComboBox); + this.groupBox5.Controls.Add(this.EdgeToPaircheckBox); + this.groupBox5.Location = new System.Drawing.Point(10, 252); + this.groupBox5.Name = "groupBox5"; + this.groupBox5.Size = new System.Drawing.Size(403, 134); + this.groupBox5.TabIndex = 2; + this.groupBox5.TabStop = false; + this.groupBox5.Text = "Edge Selection"; + // + // label2 + // + this.label2.Location = new System.Drawing.Point(21, 93); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(76, 26); + this.label2.TabIndex = 5; + this.label2.Text = "Position"; + this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label1 + // + this.label1.Location = new System.Drawing.Point(21, 50); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(76, 26); + this.label1.TabIndex = 4; + this.label1.Text = "Transition"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // PositionComboBox + // + this.PositionComboBox.Items.AddRange(new object[] { + "all", + "first", + "last"}); + this.PositionComboBox.Location = new System.Drawing.Point(117, 93); + this.PositionComboBox.Name = "PositionComboBox"; + this.PositionComboBox.Size = new System.Drawing.Size(192, 20); + this.PositionComboBox.TabIndex = 3; + this.PositionComboBox.Text = "Position"; + this.PositionComboBox.SelectedIndexChanged += new System.EventHandler(this.PositionComboBox_SelectedIndexChanged); + // + // TransitionComboBox + // + this.TransitionComboBox.Items.AddRange(new object[] { + "all", + "positive", + "negative"}); + this.TransitionComboBox.Location = new System.Drawing.Point(117, 50); + this.TransitionComboBox.Name = "TransitionComboBox"; + this.TransitionComboBox.Size = new System.Drawing.Size(192, 20); + this.TransitionComboBox.TabIndex = 2; + this.TransitionComboBox.Text = "Transition"; + this.TransitionComboBox.SelectedIndexChanged += new System.EventHandler(this.TransitionComboBox_SelectedIndexChanged); + // + // EdgeToPaircheckBox + // + this.EdgeToPaircheckBox.Location = new System.Drawing.Point(117, 16); + this.EdgeToPaircheckBox.Name = "EdgeToPaircheckBox"; + this.EdgeToPaircheckBox.Size = new System.Drawing.Size(172, 26); + this.EdgeToPaircheckBox.TabIndex = 1; + this.EdgeToPaircheckBox.Text = "Group Edges to Pairs"; + this.EdgeToPaircheckBox.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.EdgeToPaircheckBox.CheckedChanged += new System.EventHandler(this.EdgeToPaircheckBox_CheckedChanged); + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.butRoiHeightReset); + this.groupBox4.Controls.Add(this.tBroiHeight); + this.groupBox4.Controls.Add(this.numUDRoiHeight); + this.groupBox4.Controls.Add(this.labROIHeight1); + this.groupBox4.Controls.Add(this.ResetROIWidthButton); + this.groupBox4.Controls.Add(this.ResetSmoothingButton); + this.groupBox4.Controls.Add(this.ResetMinEdgAmplButton); + this.groupBox4.Controls.Add(this.ROIWidthTrackBar); + this.groupBox4.Controls.Add(this.SmoothingTrackBar); + this.groupBox4.Controls.Add(this.MinEdgAmplTrackBar); + this.groupBox4.Controls.Add(this.label10); + this.groupBox4.Controls.Add(this.label9); + this.groupBox4.Controls.Add(this.label8); + this.groupBox4.Controls.Add(this.label7); + this.groupBox4.Controls.Add(this.MinEdgAmplUpDown); + this.groupBox4.Controls.Add(this.SmoothingUpDown); + this.groupBox4.Controls.Add(this.InterpolationComboBox); + this.groupBox4.Controls.Add(this.ROIWidthUpDown); + this.groupBox4.Location = new System.Drawing.Point(10, 17); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(403, 229); + this.groupBox4.TabIndex = 1; + this.groupBox4.TabStop = false; + this.groupBox4.Text = "Edge Extraction"; + // + // butRoiHeightReset + // + this.butRoiHeightReset.Location = new System.Drawing.Point(339, 141); + this.butRoiHeightReset.Name = "butRoiHeightReset"; + this.butRoiHeightReset.Size = new System.Drawing.Size(58, 26); + this.butRoiHeightReset.TabIndex = 53; + this.butRoiHeightReset.Text = "Reset"; + this.butRoiHeightReset.Click += new System.EventHandler(this.butRoiHeightReset_Click); + // + // tBroiHeight + // + this.tBroiHeight.Location = new System.Drawing.Point(163, 127); + this.tBroiHeight.Maximum = 2000; + this.tBroiHeight.Minimum = 5; + this.tBroiHeight.Name = "tBroiHeight"; + this.tBroiHeight.Size = new System.Drawing.Size(173, 45); + this.tBroiHeight.TabIndex = 52; + this.tBroiHeight.TickFrequency = 10; + this.tBroiHeight.TickStyle = System.Windows.Forms.TickStyle.None; + this.tBroiHeight.Value = 20; + this.tBroiHeight.ValueChanged += new System.EventHandler(this.tBroiHeight_ValueChanged); + // + // numUDRoiHeight + // + this.numUDRoiHeight.Location = new System.Drawing.Point(106, 127); + this.numUDRoiHeight.Maximum = new decimal(new int[] { + 2000, + 0, + 0, + 0}); + this.numUDRoiHeight.Minimum = new decimal(new int[] { + 5, + 0, + 0, + 0}); + this.numUDRoiHeight.Name = "numUDRoiHeight"; + this.numUDRoiHeight.Size = new System.Drawing.Size(57, 21); + this.numUDRoiHeight.TabIndex = 51; + this.numUDRoiHeight.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.numUDRoiHeight.Value = new decimal(new int[] { + 20, + 0, + 0, + 0}); + this.numUDRoiHeight.ValueChanged += new System.EventHandler(this.numUDRoiHeight_ValueChanged); + // + // labROIHeight1 + // + this.labROIHeight1.BackColor = System.Drawing.SystemColors.Control; + this.labROIHeight1.Location = new System.Drawing.Point(10, 127); + this.labROIHeight1.Name = "labROIHeight1"; + this.labROIHeight1.Size = new System.Drawing.Size(96, 26); + this.labROIHeight1.TabIndex = 50; + this.labROIHeight1.Text = "ROI Height"; + this.labROIHeight1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // ResetROIWidthButton + // + this.ResetROIWidthButton.Location = new System.Drawing.Point(336, 95); + this.ResetROIWidthButton.Name = "ResetROIWidthButton"; + this.ResetROIWidthButton.Size = new System.Drawing.Size(58, 26); + this.ResetROIWidthButton.TabIndex = 14; + this.ResetROIWidthButton.Text = "Reset"; + this.ResetROIWidthButton.Click += new System.EventHandler(this.ResetROIWidthButton_Click); + // + // ResetSmoothingButton + // + this.ResetSmoothingButton.Location = new System.Drawing.Point(336, 60); + this.ResetSmoothingButton.Name = "ResetSmoothingButton"; + this.ResetSmoothingButton.Size = new System.Drawing.Size(58, 26); + this.ResetSmoothingButton.TabIndex = 13; + this.ResetSmoothingButton.Text = "Reset"; + this.ResetSmoothingButton.Click += new System.EventHandler(this.ResetSmoothingButton_Click); + // + // ResetMinEdgAmplButton + // + this.ResetMinEdgAmplButton.Location = new System.Drawing.Point(336, 26); + this.ResetMinEdgAmplButton.Name = "ResetMinEdgAmplButton"; + this.ResetMinEdgAmplButton.Size = new System.Drawing.Size(58, 26); + this.ResetMinEdgAmplButton.TabIndex = 12; + this.ResetMinEdgAmplButton.Text = "Reset"; + this.ResetMinEdgAmplButton.Click += new System.EventHandler(this.ResetMinEdgAmplButton_Click); + // + // ROIWidthTrackBar + // + this.ROIWidthTrackBar.Location = new System.Drawing.Point(163, 93); + this.ROIWidthTrackBar.Maximum = 255; + this.ROIWidthTrackBar.Minimum = 1; + this.ROIWidthTrackBar.Name = "ROIWidthTrackBar"; + this.ROIWidthTrackBar.Size = new System.Drawing.Size(173, 45); + this.ROIWidthTrackBar.TabIndex = 11; + this.ROIWidthTrackBar.TickFrequency = 10; + this.ROIWidthTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.ROIWidthTrackBar.Value = 1; + this.ROIWidthTrackBar.Scroll += new System.EventHandler(this.ROIWidthTrackBar_Scroll); + // + // SmoothingTrackBar + // + this.SmoothingTrackBar.Location = new System.Drawing.Point(163, 58); + this.SmoothingTrackBar.Maximum = 250; + this.SmoothingTrackBar.Minimum = 4; + this.SmoothingTrackBar.Name = "SmoothingTrackBar"; + this.SmoothingTrackBar.Size = new System.Drawing.Size(173, 45); + this.SmoothingTrackBar.TabIndex = 10; + this.SmoothingTrackBar.TickFrequency = 10; + this.SmoothingTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.SmoothingTrackBar.Value = 4; + this.SmoothingTrackBar.Scroll += new System.EventHandler(this.SmoothingTrackBar_Scroll); + // + // MinEdgAmplTrackBar + // + this.MinEdgAmplTrackBar.Location = new System.Drawing.Point(163, 22); + this.MinEdgAmplTrackBar.Maximum = 255; + this.MinEdgAmplTrackBar.Minimum = 1; + this.MinEdgAmplTrackBar.Name = "MinEdgAmplTrackBar"; + this.MinEdgAmplTrackBar.Size = new System.Drawing.Size(173, 45); + this.MinEdgAmplTrackBar.TabIndex = 9; + this.MinEdgAmplTrackBar.TickFrequency = 10; + this.MinEdgAmplTrackBar.TickStyle = System.Windows.Forms.TickStyle.None; + this.MinEdgAmplTrackBar.Value = 1; + this.MinEdgAmplTrackBar.Scroll += new System.EventHandler(this.MinEdgAmplTrackBar_Scroll); + // + // label10 + // + this.label10.Location = new System.Drawing.Point(10, 93); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(96, 26); + this.label10.TabIndex = 8; + this.label10.Text = "ROI Width"; + this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label9 + // + this.label9.Location = new System.Drawing.Point(10, 60); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(96, 26); + this.label9.TabIndex = 7; + this.label9.Text = "Smoothing*10"; + this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label8 + // + this.label8.Location = new System.Drawing.Point(7, 184); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(87, 40); + this.label8.TabIndex = 6; + this.label8.Text = "Interpolation Method"; + this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label7 + // + this.label7.Location = new System.Drawing.Point(10, 26); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(96, 26); + this.label7.TabIndex = 5; + this.label7.Text = "Min.EdgeAmpl"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // MinEdgAmplUpDown + // + this.MinEdgAmplUpDown.Location = new System.Drawing.Point(106, 26); + this.MinEdgAmplUpDown.Maximum = new decimal(new int[] { + 255, + 0, + 0, + 0}); + this.MinEdgAmplUpDown.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.MinEdgAmplUpDown.Name = "MinEdgAmplUpDown"; + this.MinEdgAmplUpDown.Size = new System.Drawing.Size(57, 21); + this.MinEdgAmplUpDown.TabIndex = 3; + this.MinEdgAmplUpDown.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + this.MinEdgAmplUpDown.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.MinEdgAmplUpDown.ValueChanged += new System.EventHandler(this.MinEdgAmplUpDown_ValueChanged); + // + // SmoothingUpDown + // + this.SmoothingUpDown.Location = new System.Drawing.Point(106, 60); + this.SmoothingUpDown.Maximum = new decimal(new int[] { + 250, + 0, + 0, + 0}); + this.SmoothingUpDown.Minimum = new decimal(new int[] { + 4, + 0, + 0, + 0}); + this.SmoothingUpDown.Name = "SmoothingUpDown"; + this.SmoothingUpDown.Size = new System.Drawing.Size(57, 21); + this.SmoothingUpDown.TabIndex = 2; + this.SmoothingUpDown.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + this.SmoothingUpDown.Value = new decimal(new int[] { + 4, + 0, + 0, + 0}); + this.SmoothingUpDown.ValueChanged += new System.EventHandler(this.SmoothingUpDown_ValueChanged); + // + // InterpolationComboBox + // + this.InterpolationComboBox.Items.AddRange(new object[] { + "nearest_neighbor", + "bilinear", + "bicubic"}); + this.InterpolationComboBox.Location = new System.Drawing.Point(106, 194); + this.InterpolationComboBox.Name = "InterpolationComboBox"; + this.InterpolationComboBox.Size = new System.Drawing.Size(192, 20); + this.InterpolationComboBox.TabIndex = 1; + this.InterpolationComboBox.Text = "Interpolation"; + this.InterpolationComboBox.SelectedIndexChanged += new System.EventHandler(this.InterpolationComboBox_SelectedIndexChanged); + // + // ROIWidthUpDown + // + this.ROIWidthUpDown.Location = new System.Drawing.Point(106, 95); + this.ROIWidthUpDown.Maximum = new decimal(new int[] { + 255, + 0, + 0, + 0}); + this.ROIWidthUpDown.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.ROIWidthUpDown.Name = "ROIWidthUpDown"; + this.ROIWidthUpDown.Size = new System.Drawing.Size(57, 21); + this.ROIWidthUpDown.TabIndex = 0; + this.ROIWidthUpDown.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + this.ROIWidthUpDown.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.ROIWidthUpDown.ValueChanged += new System.EventHandler(this.ROIWidthUpDown_ValueChanged); + // + // tabPageResults + // + this.tabPageResults.Controls.Add(this.label15); + this.tabPageResults.Controls.Add(this.ActiveROIListBox); + this.tabPageResults.Controls.Add(this.EdgeResultListView); + this.tabPageResults.Controls.Add(this.groupBox8); + this.tabPageResults.Controls.Add(this.groupBox7); + this.tabPageResults.Location = new System.Drawing.Point(4, 22); + this.tabPageResults.Name = "tabPageResults"; + this.tabPageResults.Size = new System.Drawing.Size(422, 567); + this.tabPageResults.TabIndex = 2; + this.tabPageResults.Text = " Results "; + this.tabPageResults.UseVisualStyleBackColor = true; + // + // label15 + // + this.label15.Location = new System.Drawing.Point(48, 207); + this.label15.Name = "label15"; + this.label15.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.label15.Size = new System.Drawing.Size(86, 26); + this.label15.TabIndex = 16; + this.label15.Text = "Active ROI"; + this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // ActiveROIListBox + // + this.ActiveROIListBox.ItemHeight = 12; + this.ActiveROIListBox.Location = new System.Drawing.Point(137, 207); + this.ActiveROIListBox.Name = "ActiveROIListBox"; + this.ActiveROIListBox.Size = new System.Drawing.Size(276, 76); + this.ActiveROIListBox.TabIndex = 15; + this.ActiveROIListBox.SelectedIndexChanged += new System.EventHandler(this.ActiveROIListBox_SelectedIndexChanged); + // + // EdgeResultListView + // + this.EdgeResultListView.AutoArrange = false; + this.EdgeResultListView.FullRowSelect = true; + this.EdgeResultListView.GridLines = true; + this.EdgeResultListView.Location = new System.Drawing.Point(12, 312); + this.EdgeResultListView.Name = "EdgeResultListView"; + this.EdgeResultListView.Size = new System.Drawing.Size(401, 205); + this.EdgeResultListView.TabIndex = 14; + this.EdgeResultListView.UseCompatibleStateImageBehavior = false; + this.EdgeResultListView.View = System.Windows.Forms.View.Details; + // + // groupBox8 + // + this.groupBox8.Controls.Add(this.UnitPanel); + this.groupBox8.Controls.Add(this.CalibPoseTextBox); + this.groupBox8.Controls.Add(this.CalibCamTextBox); + this.groupBox8.Controls.Add(this.LoadPoseButton); + this.groupBox8.Controls.Add(this.LoadCalibButton); + this.groupBox8.Controls.Add(this.TransWCoordCheckBox); + this.groupBox8.Location = new System.Drawing.Point(10, 78); + this.groupBox8.Name = "groupBox8"; + this.groupBox8.Size = new System.Drawing.Size(403, 116); + this.groupBox8.TabIndex = 12; + this.groupBox8.TabStop = false; + this.groupBox8.Text = "Feature Processing"; + // + // UnitPanel + // + this.UnitPanel.Controls.Add(this.label14); + this.UnitPanel.Controls.Add(this.UnitComboBox); + this.UnitPanel.Location = new System.Drawing.Point(259, 17); + this.UnitPanel.Name = "UnitPanel"; + this.UnitPanel.Size = new System.Drawing.Size(135, 35); + this.UnitPanel.TabIndex = 16; + // + // label14 + // + this.label14.Location = new System.Drawing.Point(10, 9); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(48, 25); + this.label14.TabIndex = 4; + this.label14.Text = "Unit"; + this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // UnitComboBox + // + this.UnitComboBox.Items.AddRange(new object[] { + "m", + "cm", + "mm", + "祄"}); + this.UnitComboBox.Location = new System.Drawing.Point(67, 9); + this.UnitComboBox.Name = "UnitComboBox"; + this.UnitComboBox.Size = new System.Drawing.Size(67, 20); + this.UnitComboBox.TabIndex = 3; + this.UnitComboBox.Text = "unit"; + this.UnitComboBox.SelectedIndexChanged += new System.EventHandler(this.UnitComboBox_SelectedIndexChanged); + // + // CalibPoseTextBox + // + this.CalibPoseTextBox.Location = new System.Drawing.Point(144, 84); + this.CalibPoseTextBox.Name = "CalibPoseTextBox"; + this.CalibPoseTextBox.ReadOnly = true; + this.CalibPoseTextBox.Size = new System.Drawing.Size(250, 21); + this.CalibPoseTextBox.TabIndex = 15; + this.CalibPoseTextBox.Text = " *.dat"; + // + // CalibCamTextBox + // + this.CalibCamTextBox.Location = new System.Drawing.Point(144, 60); + this.CalibCamTextBox.Name = "CalibCamTextBox"; + this.CalibCamTextBox.ReadOnly = true; + this.CalibCamTextBox.Size = new System.Drawing.Size(250, 21); + this.CalibCamTextBox.TabIndex = 14; + this.CalibCamTextBox.Text = " *.cal"; + // + // LoadPoseButton + // + this.LoadPoseButton.Location = new System.Drawing.Point(19, 84); + this.LoadPoseButton.Name = "LoadPoseButton"; + this.LoadPoseButton.Size = new System.Drawing.Size(106, 22); + this.LoadPoseButton.TabIndex = 13; + this.LoadPoseButton.Text = " Load Pose"; + this.LoadPoseButton.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.LoadPoseButton.Click += new System.EventHandler(this.LoadCamParamButton_Click); + // + // LoadCalibButton + // + this.LoadCalibButton.Location = new System.Drawing.Point(19, 60); + this.LoadCalibButton.Name = "LoadCalibButton"; + this.LoadCalibButton.Size = new System.Drawing.Size(106, 22); + this.LoadCalibButton.TabIndex = 12; + this.LoadCalibButton.Text = " Load CamPar"; + this.LoadCalibButton.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.LoadCalibButton.Click += new System.EventHandler(this.LoadCamParamButton_Click); + // + // TransWCoordCheckBox + // + this.TransWCoordCheckBox.Location = new System.Drawing.Point(19, 26); + this.TransWCoordCheckBox.Name = "TransWCoordCheckBox"; + this.TransWCoordCheckBox.Size = new System.Drawing.Size(234, 26); + this.TransWCoordCheckBox.TabIndex = 0; + this.TransWCoordCheckBox.Text = "Transform into World Coordinates"; + this.TransWCoordCheckBox.CheckedChanged += new System.EventHandler(this.TransWCoordCheckBox_CheckedChanged); + // + // groupBox7 + // + this.groupBox7.Controls.Add(this.DistanceCheckBox); + this.groupBox7.Controls.Add(this.AmplitudeCheckBox); + this.groupBox7.Controls.Add(this.PairWidthCheckBox); + this.groupBox7.Controls.Add(this.PositionCheckBox); + this.groupBox7.Location = new System.Drawing.Point(10, 17); + this.groupBox7.Name = "groupBox7"; + this.groupBox7.Size = new System.Drawing.Size(403, 52); + this.groupBox7.TabIndex = 11; + this.groupBox7.TabStop = false; + this.groupBox7.Text = "Feature Selection"; + // + // DistanceCheckBox + // + this.DistanceCheckBox.Location = new System.Drawing.Point(206, 20); + this.DistanceCheckBox.Name = "DistanceCheckBox"; + this.DistanceCheckBox.Size = new System.Drawing.Size(87, 26); + this.DistanceCheckBox.TabIndex = 3; + this.DistanceCheckBox.Text = "Distance"; + this.DistanceCheckBox.CheckedChanged += new System.EventHandler(this.DistanceCheckBox_CheckedChanged); + // + // AmplitudeCheckBox + // + this.AmplitudeCheckBox.Location = new System.Drawing.Point(108, 20); + this.AmplitudeCheckBox.Name = "AmplitudeCheckBox"; + this.AmplitudeCheckBox.Size = new System.Drawing.Size(96, 26); + this.AmplitudeCheckBox.TabIndex = 2; + this.AmplitudeCheckBox.Text = "Amplitude"; + this.AmplitudeCheckBox.CheckedChanged += new System.EventHandler(this.AmplitudeCheckBox_CheckedChanged); + // + // PairWidthCheckBox + // + this.PairWidthCheckBox.Enabled = false; + this.PairWidthCheckBox.Location = new System.Drawing.Point(300, 20); + this.PairWidthCheckBox.Name = "PairWidthCheckBox"; + this.PairWidthCheckBox.Size = new System.Drawing.Size(96, 26); + this.PairWidthCheckBox.TabIndex = 1; + this.PairWidthCheckBox.Text = "Pair Width"; + this.PairWidthCheckBox.CheckedChanged += new System.EventHandler(this.PairWidthCheckBox_CheckedChanged); + // + // PositionCheckBox + // + this.PositionCheckBox.Location = new System.Drawing.Point(19, 20); + this.PositionCheckBox.Name = "PositionCheckBox"; + this.PositionCheckBox.Size = new System.Drawing.Size(77, 26); + this.PositionCheckBox.TabIndex = 0; + this.PositionCheckBox.Text = "Position"; + this.PositionCheckBox.CheckedChanged += new System.EventHandler(this.PositionCheckBox_CheckedChanged); + // + // tabPageLineProfile + // + this.tabPageLineProfile.Controls.Add(this.label20); + this.tabPageLineProfile.Controls.Add(this.CSScaleComboBox); + this.tabPageLineProfile.Controls.Add(this.panelAxis); + this.tabPageLineProfile.Controls.Add(this.groupBox9); + this.tabPageLineProfile.Location = new System.Drawing.Point(4, 22); + this.tabPageLineProfile.Name = "tabPageLineProfile"; + this.tabPageLineProfile.Size = new System.Drawing.Size(422, 567); + this.tabPageLineProfile.TabIndex = 3; + this.tabPageLineProfile.Text = " LineProfile "; + this.tabPageLineProfile.UseVisualStyleBackColor = true; + // + // label20 + // + this.label20.Location = new System.Drawing.Point(192, 43); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(96, 26); + this.label20.TabIndex = 6; + this.label20.Text = "Y-axis scale:"; + this.label20.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // CSScaleComboBox + // + this.CSScaleComboBox.Items.AddRange(new object[] { + "Adaptive", + "Increasing", + "Fixed"}); + this.CSScaleComboBox.Location = new System.Drawing.Point(298, 43); + this.CSScaleComboBox.Name = "CSScaleComboBox"; + this.CSScaleComboBox.Size = new System.Drawing.Size(115, 20); + this.CSScaleComboBox.TabIndex = 5; + this.CSScaleComboBox.Text = "Scale Y-Axis"; + this.CSScaleComboBox.SelectedIndexChanged += new System.EventHandler(this.CSScaleComboBox_SelectedIndexChanged); + // + // panelAxis + // + this.panelAxis.Location = new System.Drawing.Point(10, 95); + this.panelAxis.Name = "panelAxis"; + this.panelAxis.Size = new System.Drawing.Size(403, 250); + this.panelAxis.TabIndex = 4; + // + // groupBox9 + // + this.groupBox9.Controls.Add(this.labelDeviation); + this.groupBox9.Controls.Add(this.labelMean); + this.groupBox9.Controls.Add(this.labelRange); + this.groupBox9.Controls.Add(this.labelPeak); + this.groupBox9.Controls.Add(this.label24); + this.groupBox9.Controls.Add(this.label25); + this.groupBox9.Controls.Add(this.labelRangeX); + this.groupBox9.Controls.Add(this.labelPeakX); + this.groupBox9.Controls.Add(this.label23); + this.groupBox9.Controls.Add(this.label22); + this.groupBox9.Controls.Add(this.label19); + this.groupBox9.Controls.Add(this.label18); + this.groupBox9.Controls.Add(this.label17); + this.groupBox9.Controls.Add(this.label16); + this.groupBox9.Location = new System.Drawing.Point(10, 370); + this.groupBox9.Name = "groupBox9"; + this.groupBox9.Size = new System.Drawing.Size(403, 121); + this.groupBox9.TabIndex = 2; + this.groupBox9.TabStop = false; + this.groupBox9.Text = "Statistics"; + // + // labelDeviation + // + this.labelDeviation.Location = new System.Drawing.Point(269, 95); + this.labelDeviation.Name = "labelDeviation"; + this.labelDeviation.Size = new System.Drawing.Size(86, 17); + this.labelDeviation.TabIndex = 18; + this.labelDeviation.Text = "0"; + this.labelDeviation.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labelMean + // + this.labelMean.Location = new System.Drawing.Point(269, 78); + this.labelMean.Name = "labelMean"; + this.labelMean.Size = new System.Drawing.Size(86, 17); + this.labelMean.TabIndex = 17; + this.labelMean.Text = "0"; + this.labelMean.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labelRange + // + this.labelRange.Location = new System.Drawing.Point(269, 60); + this.labelRange.Name = "labelRange"; + this.labelRange.Size = new System.Drawing.Size(115, 18); + this.labelRange.TabIndex = 15; + this.labelRange.Text = "0 ... 0"; + this.labelRange.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labelPeak + // + this.labelPeak.Location = new System.Drawing.Point(269, 43); + this.labelPeak.Name = "labelPeak"; + this.labelPeak.Size = new System.Drawing.Size(86, 17); + this.labelPeak.TabIndex = 14; + this.labelPeak.Text = "0"; + this.labelPeak.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label24 + // + this.label24.Location = new System.Drawing.Point(154, 95); + this.label24.Name = "label24"; + this.label24.Size = new System.Drawing.Size(86, 17); + this.label24.TabIndex = 13; + this.label24.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label25 + // + this.label25.Location = new System.Drawing.Point(154, 78); + this.label25.Name = "label25"; + this.label25.Size = new System.Drawing.Size(86, 17); + this.label25.TabIndex = 12; + this.label25.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labelRangeX + // + this.labelRangeX.Location = new System.Drawing.Point(154, 60); + this.labelRangeX.Name = "labelRangeX"; + this.labelRangeX.Size = new System.Drawing.Size(86, 18); + this.labelRangeX.TabIndex = 9; + this.labelRangeX.Text = "0 ... 0"; + this.labelRangeX.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labelPeakX + // + this.labelPeakX.Location = new System.Drawing.Point(154, 43); + this.labelPeakX.Name = "labelPeakX"; + this.labelPeakX.Size = new System.Drawing.Size(86, 17); + this.labelPeakX.TabIndex = 8; + this.labelPeakX.Text = "0"; + this.labelPeakX.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label23 + // + this.label23.Location = new System.Drawing.Point(19, 95); + this.label23.Name = "label23"; + this.label23.Size = new System.Drawing.Size(106, 17); + this.label23.TabIndex = 7; + this.label23.Text = "Deviation:"; + this.label23.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label22 + // + this.label22.Location = new System.Drawing.Point(19, 78); + this.label22.Name = "label22"; + this.label22.Size = new System.Drawing.Size(106, 17); + this.label22.TabIndex = 6; + this.label22.Text = "Mean:"; + this.label22.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label19 + // + this.label19.Location = new System.Drawing.Point(19, 60); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(106, 18); + this.label19.TabIndex = 3; + this.label19.Text = "Range:"; + this.label19.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label18 + // + this.label18.Location = new System.Drawing.Point(19, 43); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(106, 17); + this.label18.TabIndex = 2; + this.label18.Text = "Peak:"; + this.label18.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label17 + // + this.label17.Location = new System.Drawing.Point(269, 17); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(105, 17); + this.label17.TabIndex = 1; + this.label17.Text = "Gray Values"; + this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label16 + // + this.label16.Location = new System.Drawing.Point(154, 17); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(105, 17); + this.label16.TabIndex = 0; + this.label16.Text = "x-Value"; + this.label16.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // tabPageSaveConfige + // + this.tabPageSaveConfige.Controls.Add(this.groupBox10); + this.tabPageSaveConfige.Controls.Add(this.btnSaveConfige); + this.tabPageSaveConfige.Location = new System.Drawing.Point(4, 22); + this.tabPageSaveConfige.Name = "tabPageSaveConfige"; + this.tabPageSaveConfige.Padding = new System.Windows.Forms.Padding(3); + this.tabPageSaveConfige.Size = new System.Drawing.Size(422, 567); + this.tabPageSaveConfige.TabIndex = 4; + this.tabPageSaveConfige.Text = "参数保存"; + this.tabPageSaveConfige.UseVisualStyleBackColor = true; + // + // groupBox10 + // + this.groupBox10.Controls.Add(this.labROIHeight); + this.groupBox10.Controls.Add(this.labROIHeightSet); + this.groupBox10.Controls.Add(this.labPosition); + this.groupBox10.Controls.Add(this.labPositionSet); + this.groupBox10.Controls.Add(this.labTransition); + this.groupBox10.Controls.Add(this.labTransitionSet); + this.groupBox10.Controls.Add(this.labInterpolation); + this.groupBox10.Controls.Add(this.labInterpolationSet); + this.groupBox10.Controls.Add(this.labROIWidth); + this.groupBox10.Controls.Add(this.labROIWidthSet); + this.groupBox10.Controls.Add(this.labSmoothing); + this.groupBox10.Controls.Add(this.labSmoothingSet); + this.groupBox10.Controls.Add(this.labMinEdgeAmpl); + this.groupBox10.Controls.Add(this.label12); + this.groupBox10.Controls.Add(this.labMinEdgeAmplSet); + this.groupBox10.Controls.Add(this.label11); + this.groupBox10.Location = new System.Drawing.Point(7, 24); + this.groupBox10.Name = "groupBox10"; + this.groupBox10.Size = new System.Drawing.Size(356, 321); + this.groupBox10.TabIndex = 50; + this.groupBox10.TabStop = false; + this.groupBox10.Text = "groupBox10"; + // + // labROIHeight + // + this.labROIHeight.BackColor = System.Drawing.SystemColors.Control; + this.labROIHeight.Location = new System.Drawing.Point(14, 206); + this.labROIHeight.Name = "labROIHeight"; + this.labROIHeight.Size = new System.Drawing.Size(115, 21); + this.labROIHeight.TabIndex = 47; + this.labROIHeight.Text = "ROI Height"; + this.labROIHeight.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labROIHeightSet + // + this.labROIHeightSet.BackColor = System.Drawing.Color.White; + this.labROIHeightSet.Location = new System.Drawing.Point(135, 206); + this.labROIHeightSet.Name = "labROIHeightSet"; + this.labROIHeightSet.Size = new System.Drawing.Size(115, 21); + this.labROIHeightSet.TabIndex = 39; + this.labROIHeightSet.Text = "-"; + this.labROIHeightSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labPosition + // + this.labPosition.BackColor = System.Drawing.SystemColors.Control; + this.labPosition.Location = new System.Drawing.Point(14, 155); + this.labPosition.Name = "labPosition"; + this.labPosition.Size = new System.Drawing.Size(115, 21); + this.labPosition.TabIndex = 46; + this.labPosition.Text = "Position"; + this.labPosition.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labPositionSet + // + this.labPositionSet.BackColor = System.Drawing.Color.White; + this.labPositionSet.Location = new System.Drawing.Point(135, 154); + this.labPositionSet.Name = "labPositionSet"; + this.labPositionSet.Size = new System.Drawing.Size(115, 21); + this.labPositionSet.TabIndex = 45; + this.labPositionSet.Text = "-"; + this.labPositionSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labTransition + // + this.labTransition.BackColor = System.Drawing.SystemColors.Control; + this.labTransition.Location = new System.Drawing.Point(14, 130); + this.labTransition.Name = "labTransition"; + this.labTransition.Size = new System.Drawing.Size(115, 21); + this.labTransition.TabIndex = 44; + this.labTransition.Text = "Transition"; + this.labTransition.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labTransitionSet + // + this.labTransitionSet.BackColor = System.Drawing.Color.White; + this.labTransitionSet.Location = new System.Drawing.Point(135, 129); + this.labTransitionSet.Name = "labTransitionSet"; + this.labTransitionSet.Size = new System.Drawing.Size(115, 21); + this.labTransitionSet.TabIndex = 43; + this.labTransitionSet.Text = "-"; + this.labTransitionSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labInterpolation + // + this.labInterpolation.BackColor = System.Drawing.SystemColors.Control; + this.labInterpolation.Location = new System.Drawing.Point(14, 105); + this.labInterpolation.Name = "labInterpolation"; + this.labInterpolation.Size = new System.Drawing.Size(115, 21); + this.labInterpolation.TabIndex = 42; + this.labInterpolation.Text = "Interpolation"; + this.labInterpolation.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labInterpolationSet + // + this.labInterpolationSet.BackColor = System.Drawing.Color.White; + this.labInterpolationSet.Location = new System.Drawing.Point(135, 104); + this.labInterpolationSet.Name = "labInterpolationSet"; + this.labInterpolationSet.Size = new System.Drawing.Size(115, 21); + this.labInterpolationSet.TabIndex = 41; + this.labInterpolationSet.Text = "-"; + this.labInterpolationSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labROIWidth + // + this.labROIWidth.BackColor = System.Drawing.SystemColors.Control; + this.labROIWidth.Location = new System.Drawing.Point(14, 180); + this.labROIWidth.Name = "labROIWidth"; + this.labROIWidth.Size = new System.Drawing.Size(115, 21); + this.labROIWidth.TabIndex = 38; + this.labROIWidth.Text = "ROI Width"; + this.labROIWidth.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labROIWidthSet + // + this.labROIWidthSet.BackColor = System.Drawing.Color.White; + this.labROIWidthSet.Location = new System.Drawing.Point(135, 179); + this.labROIWidthSet.Name = "labROIWidthSet"; + this.labROIWidthSet.Size = new System.Drawing.Size(115, 21); + this.labROIWidthSet.TabIndex = 37; + this.labROIWidthSet.Text = "-"; + this.labROIWidthSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labSmoothing + // + this.labSmoothing.BackColor = System.Drawing.SystemColors.Control; + this.labSmoothing.Location = new System.Drawing.Point(14, 80); + this.labSmoothing.Name = "labSmoothing"; + this.labSmoothing.Size = new System.Drawing.Size(115, 21); + this.labSmoothing.TabIndex = 36; + this.labSmoothing.Text = "Smoothing"; + this.labSmoothing.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labSmoothingSet + // + this.labSmoothingSet.BackColor = System.Drawing.Color.White; + this.labSmoothingSet.Location = new System.Drawing.Point(135, 79); + this.labSmoothingSet.Name = "labSmoothingSet"; + this.labSmoothingSet.Size = new System.Drawing.Size(115, 21); + this.labSmoothingSet.TabIndex = 35; + this.labSmoothingSet.Text = "-"; + this.labSmoothingSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // labMinEdgeAmpl + // + this.labMinEdgeAmpl.BackColor = System.Drawing.SystemColors.Control; + this.labMinEdgeAmpl.Location = new System.Drawing.Point(14, 55); + this.labMinEdgeAmpl.Name = "labMinEdgeAmpl"; + this.labMinEdgeAmpl.Size = new System.Drawing.Size(115, 21); + this.labMinEdgeAmpl.TabIndex = 34; + this.labMinEdgeAmpl.Text = "Min.EdgeAmpl"; + this.labMinEdgeAmpl.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label12 + // + this.label12.BackColor = System.Drawing.SystemColors.Control; + this.label12.Location = new System.Drawing.Point(135, 29); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(115, 21); + this.label12.TabIndex = 33; + this.label12.Text = "Recognition"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // labMinEdgeAmplSet + // + this.labMinEdgeAmplSet.BackColor = System.Drawing.Color.White; + this.labMinEdgeAmplSet.Location = new System.Drawing.Point(135, 54); + this.labMinEdgeAmplSet.Name = "labMinEdgeAmplSet"; + this.labMinEdgeAmplSet.Size = new System.Drawing.Size(115, 21); + this.labMinEdgeAmplSet.TabIndex = 32; + this.labMinEdgeAmplSet.Text = "-"; + this.labMinEdgeAmplSet.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label11 + // + this.label11.BackColor = System.Drawing.SystemColors.Control; + this.label11.Location = new System.Drawing.Point(14, 29); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(115, 21); + this.label11.TabIndex = 31; + this.label11.Text = "Recognition"; + this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // btnSaveConfige + // + this.btnSaveConfige.Location = new System.Drawing.Point(277, 451); + this.btnSaveConfige.Name = "btnSaveConfige"; + this.btnSaveConfige.Size = new System.Drawing.Size(106, 42); + this.btnSaveConfige.TabIndex = 0; + this.btnSaveConfige.Text = "保存参数"; + this.btnSaveConfige.UseVisualStyleBackColor = true; + this.btnSaveConfige.Click += new System.EventHandler(this.btnSaveConfige_Click); + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.CircArcButton); + this.groupBox2.Controls.Add(this.LineButton); + this.groupBox2.Controls.Add(this.DeleteActRoiButton); + this.groupBox2.Controls.Add(this.ResetROIButton); + this.groupBox2.Location = new System.Drawing.Point(12, 610); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(614, 70); + this.groupBox2.TabIndex = 3; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "ROIs"; + // + // CircArcButton + // + this.CircArcButton.Location = new System.Drawing.Point(154, 17); + this.CircArcButton.Name = "CircArcButton"; + this.CircArcButton.Size = new System.Drawing.Size(120, 47); + this.CircArcButton.TabIndex = 10; + this.CircArcButton.Text = "Create Circular Arc"; + this.CircArcButton.Click += new System.EventHandler(this.CircArcButton_Click); + // + // LineButton + // + this.LineButton.Location = new System.Drawing.Point(19, 17); + this.LineButton.Name = "LineButton"; + this.LineButton.Size = new System.Drawing.Size(120, 47); + this.LineButton.TabIndex = 1; + this.LineButton.Text = "Create Line"; + this.LineButton.Click += new System.EventHandler(this.LineButton_Click); + // + // DeleteActRoiButton + // + this.DeleteActRoiButton.Location = new System.Drawing.Point(365, 17); + this.DeleteActRoiButton.Name = "DeleteActRoiButton"; + this.DeleteActRoiButton.Size = new System.Drawing.Size(120, 47); + this.DeleteActRoiButton.TabIndex = 2; + this.DeleteActRoiButton.Text = "Delete"; + this.DeleteActRoiButton.Click += new System.EventHandler(this.DeleteActRoiButton_Click); + // + // ResetROIButton + // + this.ResetROIButton.Location = new System.Drawing.Point(490, 17); + this.ResetROIButton.Name = "ResetROIButton"; + this.ResetROIButton.Size = new System.Drawing.Size(120, 47); + this.ResetROIButton.TabIndex = 3; + this.ResetROIButton.Text = "Delete All"; + this.ResetROIButton.Click += new System.EventHandler(this.ResetROIButton_Click); + // + // LoadImgButton + // + this.LoadImgButton.Location = new System.Drawing.Point(107, 13); + this.LoadImgButton.Name = "LoadImgButton"; + this.LoadImgButton.Size = new System.Drawing.Size(95, 28); + this.LoadImgButton.TabIndex = 4; + this.LoadImgButton.Text = "Load ..."; + this.LoadImgButton.Click += new System.EventHandler(this.LoadImgButton_Click); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.ResetViewButton); + this.groupBox1.Controls.Add(this.MagnifyButton); + this.groupBox1.Controls.Add(this.ZoomButton); + this.groupBox1.Controls.Add(this.MoveButton); + this.groupBox1.Controls.Add(this.NoneButton); + this.groupBox1.Location = new System.Drawing.Point(239, 0); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(529, 48); + this.groupBox1.TabIndex = 8; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "View Interaction"; + // + // ResetViewButton + // + this.ResetViewButton.Location = new System.Drawing.Point(403, 13); + this.ResetViewButton.Name = "ResetViewButton"; + this.ResetViewButton.Size = new System.Drawing.Size(111, 28); + this.ResetViewButton.TabIndex = 10; + this.ResetViewButton.Text = "Reset "; + this.ResetViewButton.Click += new System.EventHandler(this.ResetViewButton_Click); + // + // MagnifyButton + // + this.MagnifyButton.Location = new System.Drawing.Point(298, 20); + this.MagnifyButton.Name = "MagnifyButton"; + this.MagnifyButton.Size = new System.Drawing.Size(76, 18); + this.MagnifyButton.TabIndex = 4; + this.MagnifyButton.Text = "magnify"; + this.MagnifyButton.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.MagnifyButton.CheckedChanged += new System.EventHandler(this.MagnifyButton_CheckedChanged); + // + // ZoomButton + // + this.ZoomButton.Location = new System.Drawing.Point(218, 20); + this.ZoomButton.Name = "ZoomButton"; + this.ZoomButton.Size = new System.Drawing.Size(68, 18); + this.ZoomButton.TabIndex = 2; + this.ZoomButton.Text = "zoom"; + this.ZoomButton.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.ZoomButton.CheckedChanged += new System.EventHandler(this.ZoomButton_CheckedChanged); + // + // MoveButton + // + this.MoveButton.Location = new System.Drawing.Point(125, 20); + this.MoveButton.Name = "MoveButton"; + this.MoveButton.Size = new System.Drawing.Size(67, 18); + this.MoveButton.TabIndex = 1; + this.MoveButton.Text = "move"; + this.MoveButton.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.MoveButton.CheckedChanged += new System.EventHandler(this.MoveButton_CheckedChanged); + // + // NoneButton + // + this.NoneButton.Checked = true; + this.NoneButton.Location = new System.Drawing.Point(29, 20); + this.NoneButton.Name = "NoneButton"; + this.NoneButton.Size = new System.Drawing.Size(67, 18); + this.NoneButton.TabIndex = 0; + this.NoneButton.TabStop = true; + this.NoneButton.Text = "none"; + this.NoneButton.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.NoneButton.CheckedChanged += new System.EventHandler(this.NoneButton_CheckedChanged); + // + // openImageFileDialog + // + this.openImageFileDialog.Filter = "png (*.png)|*.png|tiff (*.tif)|*.tif|jpeg (*.jpg)| *.jpg|all files (*.*)|*.*"; + this.openImageFileDialog.RestoreDirectory = true; + // + // StatusLabel + // + this.StatusLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.StatusLabel.Location = new System.Drawing.Point(799, 618); + this.StatusLabel.Name = "StatusLabel"; + this.StatusLabel.Size = new System.Drawing.Size(428, 56); + this.StatusLabel.TabIndex = 9; + this.StatusLabel.Text = "Status"; + this.StatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // openCamparFileDialog + // + this.openCamparFileDialog.Filter = "camera parameters (*.cal)|*.cal|camera parameters (*.dat)|*dat|all files (*.*)|*." + + "*"; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.LoadImgButton); + this.groupBox3.Location = new System.Drawing.Point(10, 0); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(211, 48); + this.groupBox3.TabIndex = 11; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "Image"; + // + // frmMeasureAssistant + // + this.AutoScaleBaseSize = new System.Drawing.Size(6, 14); + this.ClientSize = new System.Drawing.Size(1253, 679); + this.Controls.Add(this.groupBox3); + this.Controls.Add(this.StatusLabel); + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.tabControl); + this.Controls.Add(this.viewPort); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.MaximizeBox = false; + this.Name = "frmMeasureAssistant"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Measure Assistant"; + this.Load += new System.EventHandler(this.MeasureForm_Load); + this.tabControl.ResumeLayout(false); + this.tabPageEdges.ResumeLayout(false); + this.groupBox6.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.LineWidthDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.EdgeLengthUpDown)).EndInit(); + this.groupBox5.ResumeLayout(false); + this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.tBroiHeight)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numUDRoiHeight)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.ROIWidthTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.SmoothingTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinEdgAmplTrackBar)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.MinEdgAmplUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.SmoothingUpDown)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.ROIWidthUpDown)).EndInit(); + this.tabPageResults.ResumeLayout(false); + this.groupBox8.ResumeLayout(false); + this.groupBox8.PerformLayout(); + this.UnitPanel.ResumeLayout(false); + this.groupBox7.ResumeLayout(false); + this.tabPageLineProfile.ResumeLayout(false); + this.groupBox9.ResumeLayout(false); + this.tabPageSaveConfige.ResumeLayout(false); + this.groupBox10.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + this.groupBox3.ResumeLayout(false); + this.ResumeLayout(false); + + } + #endregion + + + /// <summary> + /// Loads MeasureForm and initializes view functions + /// to include in the MeasureAssistant. + /// </summary> + private void MeasureForm_Load(object sender, System.EventArgs e) + { + InitViewer(); + } + + private void InitViewer() + { + mView = new HWndCtrl(viewPort); + roiController = new ROIController(); + mView.useROIController(roiController); + mAssistant = new MeasureAssistant(roiController); + mShadow = new HXLDCont(); + + mView.setViewState(HWndCtrl.MODE_VIEW_NONE); + mView.changeGraphicSettings(GraphicsContext.GC_LINEWIDTH, 1); + + roiController.NotifyRCObserver = new IconicDelegate(UpdateROIData); + mAssistant.NotifyMeasureObserver = new MeasureDelegate(UpdateMeasureResults); + + plotGraphWindow = new FunctionPlot(panelAxis, true); + + openImageFileDialog.InitialDirectory = + (string)(HSystem.GetSystem("image_dir").TupleSplit(";")); + Init(); + + mView.setDispLevel(HWndCtrl.MODE_EXCLUDE_ROI); + } + + /// <summary> + /// Initializes the parameters for the edges measurement and + /// sets up the measure assistant. + /// </summary> + private void Init() + { + MinEdgAmplUpDown.Value = 40; + SmoothingUpDown.Value = 10; + ROIWidthUpDown.Value = 10; + InterpolationComboBox.SelectedIndex = 0; + EdgeToPaircheckBox.Checked = false; + TransitionComboBox.SelectedIndex = 0; + PositionComboBox.SelectedIndex = 0; + EdgeLengthUpDown.Value = 30; + UseROIWidthCheckBox.Checked = true; + ShowRegionCheckBox.Checked = true; + ShowROIcheckBox.Checked = true; + UseShadowsCheckBox.Checked = false; + ResetMinEdgAmplButton.ForeColor = System.Drawing.Color.Gray; + ResetROIWidthButton.ForeColor = System.Drawing.Color.Gray; + ResetSmoothingButton.ForeColor = System.Drawing.Color.Gray; + + PositionCheckBox.Checked = true; + PairWidthCheckBox.Checked = true; + AmplitudeCheckBox.Checked = true; + DistanceCheckBox.Checked = true; + TransWCoordCheckBox.Enabled = false; + TransWCoordCheckBox.Checked = false; + UnitComboBox.SelectedIndex = 1; + UnitPanel.Enabled = false; + + mAssistant.mThresh = 40.0; + mAssistant.mSigma = 1.0; + mAssistant.mRoiWidth = 10; + mAssistant.mRoiHeight = 50; + mAssistant.mInterpolation = "nearest_neighbor"; + mAssistant.mSelPair = false; + mAssistant.mTransition = "all"; + mAssistant.mPosition = "all"; + mAssistant.mDispEdgeLength = 30; + mAssistant.mDispROIWidth = true; + mAssistant.setUnit(UnitComboBox.Text); + + mAssistant.mInitThresh = 40.0; + mAssistant.mInitSigma = 1.0; + mAssistant.mInitRoiWidth = 10; + + RegionColorComboBox.SelectedIndex = 2; + EdgeColorComboBox.SelectedIndex = 7; + LineWidthDown.Value = 1; + + CSScaleComboBox.SelectedIndex = 0; + + regionColor = "blue"; + edgeColor = "cyan"; + lineWidth = 1; + useShadow = false; + } + + + + /********************************************************************/ + /* Display Parameters */ + /********************************************************************/ + + /// <summary> + /// Loads image and passes it to the controller class. Only images of + /// type "byte" are allowed. + /// </summary> + private void LoadImgButton_Click(object sender, System.EventArgs e) + { + string file,info; + + int dispROI = HWndCtrl.MODE_INCLUDE_ROI; + + + if (openImageFileDialog.ShowDialog() == DialogResult.OK) + { + file = openImageFileDialog.FileName; + + roiController.reset(); + mView.resetWindow(); + + if (mAssistant.setImage(file)) + { + currImage = mAssistant.getImage(); + info = currImage.GetChannelInfo("type", 1); + } + else + { + info = "wrong file type"; + } + + if (info != "byte") + { + currImage = null; + mAssistant.setImage(currImage); + dispROI = HWndCtrl.MODE_EXCLUDE_ROI; + + MessageBox.Show("Problem occured: The Image is of type \"" + info + "\".\nOnly byte images are supported by this Measure Assistant!", + "Measure assistant", + MessageBoxButtons.OK, + MessageBoxIcon.Information); + + } + mView.setDispLevel(dispROI); + UpdateView(); + } + } + + + + /* ******************************************************* + * Window Interaction + * *******************************************************/ + + + private void NoneButton_CheckedChanged(object sender, System.EventArgs e) + { + mView.setViewState(HWndCtrl.MODE_VIEW_NONE); + } + + + private void MoveButton_CheckedChanged(object sender, System.EventArgs e) + { + mView.setViewState(HWndCtrl.MODE_VIEW_MOVE); + } + + private void ZoomButton_CheckedChanged(object sender, System.EventArgs e) + { + mView.setViewState(HWndCtrl.MODE_VIEW_ZOOM); + } + + private void MagnifyButton_CheckedChanged(object sender, System.EventArgs e) + { + mView.setViewState(HWndCtrl.MODE_VIEW_ZOOMWINDOW); + } + + private void ResetViewButton_Click(object sender, System.EventArgs e) + { + mView.resetWindow(); + UpdateView(); + } + + + /* ******************************************************* + * ROI Interaction + * *******************************************************/ + + + /// <summary> + /// Creates linear ROI. + /// </summary> + private void LineButton_Click(object sender, System.EventArgs e) + { + if (ShowROIcheckBox.Checked) + roiController.setROIShape(new ROILine()); + } + + /// <summary> + /// Creates circular ROI. + /// </summary> + private void CircArcButton_Click(object sender, System.EventArgs e) + { + if (ShowROIcheckBox.Checked) + roiController.setROIShape(new ROICircularArc()); + } + + /// <summary>Deletes selected ROI.</summary> + private void DeleteActRoiButton_Click(object sender, System.EventArgs e) + { + roiController.removeActive(); + } + + /// <summary>Deletes all ROIs.</summary> + private void ResetROIButton_Click(object sender, System.EventArgs e) + { + roiController.reset(); + UpdateView(); + } + + /********************************************************************/ + /* Edges Tab */ + /********************************************************************/ + + /* Edge Extraction */ + + private void ROIWidthUpDown_ValueChanged(object sender, System.EventArgs e) + { + int val = (int)ROIWidthUpDown.Value; + ROIWidthTrackBar.Value = val; + + setRoiWidth(val); + } + + private void ROIWidthTrackBar_Scroll(object sender, System.EventArgs e) + { + ROIWidthUpDown.Value = ROIWidthTrackBar.Value; + ROIWidthUpDown.Refresh(); + } + + private void ResetROIWidthButton_Click(object sender, System.EventArgs e) + { + ROIWidthUpDown.Value = (int)mAssistant.mInitRoiWidth; + ResetROIWidthButton.ForeColor = System.Drawing.Color.Gray; + } + + private void setRoiWidth(int val) + { + ResetROIWidthButton.ForeColor = System.Drawing.Color.Black; + mAssistant.setRoiWidth((double)val); + } + + private void setRoiHeight(int val) + { + butRoiHeightReset.ForeColor = System.Drawing.Color.Gray; + mAssistant.setRoiHeight((double)val); + } + + /********************************************************************/ + private void SmoothingUpDown_ValueChanged(object sender, System.EventArgs e) + { + int val = (int)SmoothingUpDown.Value; + SmoothingTrackBar.Value = val; + + setSigma(val); + } + + private void SmoothingTrackBar_Scroll(object sender, System.EventArgs e) + { + SmoothingUpDown.Value = SmoothingTrackBar.Value; + SmoothingUpDown.Refresh(); + } + + private void ResetSmoothingButton_Click(object sender, System.EventArgs e) + { + SmoothingUpDown.Value = (int)mAssistant.mInitSigma * 10; + ResetSmoothingButton.ForeColor = System.Drawing.Color.Gray; + } + + private void setSigma(int val) + { + double valD = (double)val / 10.0; + + ResetSmoothingButton.ForeColor = System.Drawing.Color.Black; + mAssistant.setSigma(valD); + } + + /********************************************************************/ + private void MinEdgAmplUpDown_ValueChanged(object sender, System.EventArgs e) + { + int val = (int)MinEdgAmplUpDown.Value; + MinEdgAmplTrackBar.Value = val; + + setMinEdgeAmpl(val); + } + + private void MinEdgAmplTrackBar_Scroll(object sender, System.EventArgs e) + { + MinEdgAmplUpDown.Value = MinEdgAmplTrackBar.Value; + MinEdgAmplUpDown.Refresh(); + } + + private void ResetMinEdgAmplButton_Click(object sender, System.EventArgs e) + { + MinEdgAmplUpDown.Value = (int)mAssistant.mInitThresh; + ResetMinEdgAmplButton.ForeColor = System.Drawing.Color.Gray; + } + + private void setMinEdgeAmpl(int val) + { + ResetMinEdgAmplButton.ForeColor = System.Drawing.Color.Black; + mAssistant.setMinEdgeAmpl((double)val); + } + + + /********************************************************************/ + private void InterpolationComboBox_SelectedIndexChanged(object sender, System.EventArgs e) + { + mAssistant.setInterpolation((string)InterpolationComboBox.Text); + } + + + /********************************************************************/ + /********************************************************************/ + /* Define Edge Selection */ + + private void EdgeToPaircheckBox_CheckedChanged(object sender, System.EventArgs e) + { + mAssistant.setSelPair(EdgeToPaircheckBox.Checked); + UpdateMeasureResultComposition(); + + if (EdgeToPaircheckBox.Checked) + { + PairWidthCheckBox.Enabled = true; + TransitionComboBox.Items.AddRange(new object[] {"all_strongest", + "positive_strongest", + "negative_strongest"}); + + + } + else + { + PairWidthCheckBox.Enabled = false; + TransitionComboBox.Items.Clear(); + TransitionComboBox.Items.AddRange(new object[] { "all", "positive", "negative" }); + TransitionComboBox.SelectedIndex = 0; + } + } + + private void TransitionComboBox_SelectedIndexChanged(object sender, System.EventArgs e) + { + mAssistant.setTransition((string)TransitionComboBox.Text); + } + + private void PositionComboBox_SelectedIndexChanged(object sender, System.EventArgs e) + { + mAssistant.setPosition((string)PositionComboBox.Text); + } + + /********************************************************************/ + /********************************************************************/ + /* Define Edge Display Parameters */ + + private void RegionColorComboBox_SelectedIndexChanged(object sender, System.EventArgs e) + { + regionColor = (string)RegionColorComboBox.SelectedItem; + UpdateView(); + } + + private void EdgeColorComboBox_SelectedIndexChanged(object sender, System.EventArgs e) + { + edgeColor = (string)EdgeColorComboBox.SelectedItem; + UpdateView(); + } + + private void LineWidthDown_ValueChanged(object sender, System.EventArgs e) + { + lineWidth = (int)LineWidthDown.Value; + UpdateView(); + } + + private void ShowRegionCheckBox_CheckedChanged(object sender, System.EventArgs e) + { + displayRegion = ShowRegionCheckBox.Checked; + UpdateView(); + } + + private void UseShadowsCheckBox_CheckedChanged(object sender, System.EventArgs e) + { + useShadow = UseShadowsCheckBox.Checked; + UpdateView(); + } + + /********************************************************************/ + /********************************************************************/ + /* Definition for Result EdgeXLD Format */ + + private void EdgeLengthUpDown_ValueChanged(object sender, System.EventArgs e) + { + mAssistant.setDispEdgeLength((int)EdgeLengthUpDown.Value); + } + + private void UseROIWidthCheckBox_CheckedChanged(object sender, System.EventArgs e) + { + mAssistant.setFlagDispROIWidth(UseROIWidthCheckBox.Checked); + + if (UseROIWidthCheckBox.Checked) + EdgeLengthUpDown.Enabled = false; + else + EdgeLengthUpDown.Enabled = true; + + } + + private void ShowROIcheckBox_CheckedChanged(object sender, System.EventArgs e) + { + + int mode; + + if (ShowROIcheckBox.Checked) + mode = HWndCtrl.MODE_INCLUDE_ROI; + else + mode = HWndCtrl.MODE_EXCLUDE_ROI; + + mView.setDispLevel(mode); + UpdateView(); + } + + /********************************************************************/ + /* Edges Results */ + /********************************************************************/ + + private void PositionCheckBox_CheckedChanged(object sender, System.EventArgs e) + { + mAssistant.showPosition(PositionCheckBox.Checked); + UpdateMeasureResultComposition(); + } + + private void PairWidthCheckBox_CheckedChanged(object sender, System.EventArgs e) + { + mAssistant.showPairWidth(PairWidthCheckBox.Checked); + UpdateMeasureResultComposition(); + } + + private void AmplitudeCheckBox_CheckedChanged(object sender, System.EventArgs e) + { + mAssistant.showAmplitude(AmplitudeCheckBox.Checked); + UpdateMeasureResultComposition(); + } + + private void DistanceCheckBox_CheckedChanged(object sender, System.EventArgs e) + { + mAssistant.showDistance(DistanceCheckBox.Checked); + UpdateMeasureResultComposition(); + } + + private void TransWCoordCheckBox_CheckedChanged(object sender, System.EventArgs e) + { + if (TransWCoordCheckBox.Checked) + UnitPanel.Enabled = true; + else + UnitPanel.Enabled = false; + + mAssistant.setTransWorldCoord(TransWCoordCheckBox.Checked); + + } + + private void UnitComboBox_SelectedIndexChanged(object sender, System.EventArgs e) + { + mAssistant.setUnit((string)UnitComboBox.SelectedItem); + } + + /// <summary>Loads HALCON calibration data.</summary> + private void LoadCamParamButton_Click(object sender, System.EventArgs e) + { + HTuple buttonType, valType; + string file; + string [] val; + bool isCalFile; + + + StatusLabel.Text = ""; + buttonType = new HTuple(sender.ToString()); + valType = buttonType.TupleStrrstr(new HTuple("CamPar")); + + if (valType[0].I > 0) + openCamparFileDialog.FilterIndex = 1; + else + openCamparFileDialog.FilterIndex = 2; + + openCamparFileDialog.FileName = ""; + + if (openCamparFileDialog.ShowDialog() == DialogResult.OK) + { + file = openCamparFileDialog.FileName; + StatusLabel.Text = ""; + + if ((isCalFile = file.EndsWith(".cal")) || file.EndsWith(".dat")) + { + + try + { + if (valType[0].I > 0) + { + mAssistant.LoadCamParFile(file); + val = file.Split(new Char[] { '\\' }); + file = val[val.Length - 1]; + CalibCamTextBox.Text = file; + + } + else + { + mAssistant.LoadCamPoseFile(file); + val = file.Split(new Char[] { '\\' }); + file = val[val.Length - 1]; + CalibPoseTextBox.Text = file; + } + } + catch (HOperatorException) + { + if (valType[0].I > 0) + CalibCamTextBox.Text = "*.cal"; + else + CalibPoseTextBox.Text = "*.dat"; + + StatusLabel.Text = mAssistant.exceptionText; + valType = mAssistant.exceptionText.TupleSplit(":"); + MessageBox.Show("File is corrupted or has a wrong format:\nPlease check if you chose a valid calibration file (or format)!", + "Measure Assistant", + MessageBoxButtons.OK, + MessageBoxIcon.Information); + + } + + } + else + { + MessageBox.Show("Fileformat is wrong: Data is not a calibration file!", + "Measure Assistant", + MessageBoxButtons.OK, + MessageBoxIcon.Information); + } + + + if (mAssistant.mIsCalibValid) + { + TransWCoordCheckBox.Enabled = true; + } + else + { + TransWCoordCheckBox.Enabled = false; + TransWCoordCheckBox.Checked = false; + } + } + } + + /// <summary> + /// Changes index of the selected ROI displayed in the listbox. + /// </summary> + private void ActiveROIListBox_SelectedIndexChanged(object sender, System.EventArgs e) + { + roiController.activeROIidx = ActiveROIListBox.SelectedIndex; + mAssistant.mActRoiIdx = roiController.activeROIidx; + UpdateCodeTable(); + UpdateView(); + } + + + /********************************************************************/ + /* Update methods invoked by delegates */ + /********************************************************************/ + + /// <summary> + /// Updates HALCON display and result table according to new measure + /// results. + /// </summary> + /// <param name="mode">Type of measure update</param> + public void UpdateMeasureResults(int mode) + { + StatusLabel.Text = ""; + + switch (mode) + { + case MeasureAssistant.ERR_READING_FILE: + MessageBox.Show("Problem occured while reading file! \n" + mAssistant.exceptionText, + "Measure assistant", + MessageBoxButtons.OK, + MessageBoxIcon.Information); + mAssistant.exceptionText = ""; + break; + case MeasureAssistant.EVENT_UPDATE_MEASUREMENT: + case MeasureAssistant.EVENT_UPDATE_RESULT_XLD: + case MeasureAssistant.EVENT_UPDATE_REMOVE: + UpdateView(); + break; + default: + break; + } + + if (mAssistant.exceptionText != "") + { + HTuple segment = mAssistant.exceptionText.TupleSplit(":"); + StatusLabel.Text = " Measure failed: " + mAssistant.exceptionText; + } + UpdateCodeTable(); + } + + + /// <summary> + /// Responds to changes in the selected ROI. + /// </summary> + /// <param name="mode">Type of ROI update</param> + public void UpdateROIData(int mode) + { + switch (mode) + { + case ROIController.EVENT_CREATED_ROI: + mAssistant.AddMeasureObject(); + UpdateROIClickList("new"); + break; + case ROIController.EVENT_ACTIVATED_ROI: + mAssistant.ClickedActiveROI(); + UpdateROIClickList("active"); + break; + case ROIController.EVENT_MOVING_ROI: + mAssistant.UpdateMeasure(roiController.getActiveROIIdx()); + break; + case ROIController.EVENT_DELETED_ACTROI: + mAssistant.RemoveMeasureObjectActIdx(); + UpdateROIClickList("removeIdx"); + break; + case ROIController.EVENT_DELETED_ALL_ROIS: + mAssistant.RemoveAllMeasureObjects(); + UpdateROIClickList("removeAll"); + break; + } + + if (updateLineProfile) + PaintGraph(); + + } + + + /// <summary> + /// Triggers an update of the HALCON window. Displays all valid iconic + /// objects. + /// </summary> + public void UpdateView() + { + HObject edges, regions; + + if (currImage == null) + { + mView.clearList(); + } + else + { + mView.addIconicVar(currImage); + + if (roiController.getROIList().Count > 0) + { + edges = mAssistant.getMeasureResults(); + + if (edges.IsInitialized()) + { + if (useShadow) + { + UpdateShadowContours(edges); + mView.changeGraphicSettings(GraphicsContext.GC_COLOR, "black"); + mView.addIconicVar(mShadow); + } + + mView.changeGraphicSettings(GraphicsContext.GC_COLOR, edgeColor); + mView.changeGraphicSettings(GraphicsContext.GC_LINEWIDTH, lineWidth); + mView.addIconicVar(edges); + } + + regions = mAssistant.getMeasureRegions(); + + if (displayRegion && regions.IsInitialized()) + { + mView.changeGraphicSettings(GraphicsContext.GC_COLOR, regionColor); + mView.addIconicVar(regions); + } + } + } + mView.repaint(); + } + + + /// <summary> + /// Adds visual effects (shadows) + /// to the measure results. + /// </summary> + /// <param name="edges"> + /// Add shadows along the edges provided + /// </param> + public void UpdateShadowContours(HObject edges) + { + double shift; + HXLDCont shadow1, shadow2; + HHomMat2D hom2D = new HHomMat2D(); + + mShadow.Dispose(); + mShadow.GenEmptyObj(); + + shift = Math.Min(0.5 * lineWidth, 2.0); + + hom2D.HomMat2dIdentity(); + hom2D = hom2D.HomMat2dTranslate(shift, 1); + shadow1 = ((HXLDCont)edges).AffineTransContourXld(hom2D); + + hom2D.HomMat2dIdentity(); + hom2D = hom2D.HomMat2dTranslate(1, shift); + shadow2 = ((HXLDCont)edges).AffineTransContourXld(hom2D); + + mShadow = mShadow.ConcatObj(shadow1); + mShadow = mShadow.ConcatObj(shadow2); + + shadow1.Dispose(); + shadow2.Dispose(); + } + + + /// <summary> + /// Adapts column header for measure result table. + /// </summary> + public void UpdateMeasureResultComposition() + { + ArrayList composition; + ColumnHeader header; + int length; + int size = -1; + + composition = mAssistant.getMeasureResultComposition(); + length = composition.Count; + EdgeResultListView.Columns.Clear(); + + if (length <= 5 && length > 0) + size = (EdgeResultListView.Size.Width / length) - 1; + + for (int i=0; i < length; i++) + { + header = new ColumnHeader(); + header.Text = (string)composition[i]; + header.Width = (size != -1) ? size : 20 + header.Text.Length * 5; + EdgeResultListView.Columns.Add(header); + } + + UpdateCodeTable(); + } + + + /// <summary>Creates table for measure results.</summary> + public void UpdateCodeTable() + { + ArrayList table; + ListViewItem item; + int rowCount,colCount; + string val; + rowCount = 0; + + table = mAssistant.getMeasureTableData(); + EdgeResultListView.Items.Clear(); + + if ((colCount = table.Count) == 0 || (table[0] == null)) + return; + + for (int i=0; i < colCount; i++) + rowCount = Math.Max(rowCount, ((HTuple)table[i]).Length); + + for (int i=0; i < rowCount; i++) + { + val = (i >= ((HTuple)table[0]).Length) ? "" : ((HTuple)table[0])[i].D.ToString("f6"); + item = new ListViewItem(val); + + for (int j=1; j < colCount; j++) + { + val = (i >= ((HTuple)table[j]).Length) ? "" : ((HTuple)table[j])[i].D.ToString("f6"); + item.SubItems.Add(val); + } + EdgeResultListView.Items.Add(item); + } + } + + + /// <summary> + /// Updates listbox displaying current set of ROIs. + /// </summary> + public void UpdateROIClickList(string mode) + { + int count = roiController.ROIList.Count; + + switch (mode) + { + case "active": + ActiveROIListBox.SelectedIndex = mAssistant.mActRoiIdx; + break; + case "new": + ActiveROIListBox.Items.Add(" InterActive ROI " + (mAssistant.mActRoiIdx + 1).ToString("d2")); + ActiveROIListBox.SelectedIndex = mAssistant.mActRoiIdx; + break; + case "removeIdx": + ActiveROIListBox.Items.Clear(); + for (int i=1; i <= count; i++) + ActiveROIListBox.Items.Add(" InterActive ROI " + i.ToString("d2")); + break; + case "removeAll": + ActiveROIListBox.Items.Clear(); + break; + } + } + + + /// <summary> + /// Updates function plot (line profile) of measure projection for the + /// selected ROI. + /// </summary> + public void PaintGraph() + { + double [] grayVals; + + grayVals = mAssistant.getMeasureProjection(); + plotGraphWindow.plotFunction(grayVals); + ComputeStatistics(grayVals); + } + + + /// <summary>Adjusts statistics of measure projection (line profile).</summary> + public void ComputeStatistics(double[] grayVals) + { + HTuple tuple, val; + int max =0; + + if (grayVals != null) + { + tuple = new HTuple(grayVals); + + val = tuple.TupleMean(); + labelMean.Text = val[0].D.ToString("f2"); + val = tuple.TupleDeviation(); + labelDeviation.Text = val[0].D.ToString("f2"); + + val = tuple.TupleSortIndex(); + labelPeakX.Text = val[val.Length - 1].I + ""; + max = (int)tuple[val[val.Length - 1].I].D; + labelPeak.Text = max + ""; + + labelRange.Text = (int)tuple[0].D + " ... " + (int)tuple[tuple.Length - 1].D; + labelRangeX.Text = "0 ... " + (tuple.Length - 1); + } + else + { + labelMean.Text = "0"; + labelDeviation.Text = "0"; + + labelPeakX.Text = "0"; + labelPeak.Text = "0"; + + labelRange.Text = "0 ... 0"; + labelRangeX.Text = "0 ... 0"; + } + } + + /// <summary>Activates update for function plot (line profile).</summary> + private void tabControl_SelectedIndexChanged(object sender, System.EventArgs e) + { + int tab = tabControl.SelectedIndex; + updateLineProfile = false; + + if (tab == 2) + { + updateLineProfile = true; + PaintGraph(); + } + else if (tab == 3) + { + //显示当前设定的参数 + labMinEdgeAmplSet.Text = mAssistant.mThresh.ToString(); + labSmoothingSet.Text = mAssistant.mSigma.ToString(); + labROIWidthSet.Text = mAssistant.mRoiWidth.ToString(); + labROIHeightSet.Text = mAssistant.mRoiHeight.ToString(); + + labInterpolationSet.Text = mAssistant.mInterpolation; + labTransitionSet.Text = mAssistant.mTransition; + labPositionSet.Text = mAssistant.mPosition; + } + } + + + /// <summary> + /// Adapts mode for scaling the y-axis in the plot (line profile) window. + /// </summary> + private void CSScaleComboBox_SelectedIndexChanged(object sender, System.EventArgs e) + { + switch (CSScaleComboBox.SelectedIndex) + { + case 0: // Adaptive + plotGraphWindow.setAxisAdaption(FunctionPlot.AXIS_RANGE_ADAPTING); + break; + case 1: // Increasing + plotGraphWindow.setAxisAdaption(FunctionPlot.AXIS_RANGE_INCREASING); + break; + case 2: // Fixed + plotGraphWindow.setAxisAdaption(FunctionPlot.AXIS_RANGE_FIXED, 255.0f); + break; + } + PaintGraph(); + } + + private void butRoiHeightReset_Click(object sender, EventArgs e) + { + this.numUDRoiHeight.Value = Convert.ToDecimal(20); + butRoiHeightReset.ForeColor = System.Drawing.Color.Gray; + } + + private void numUDRoiHeight_ValueChanged(object sender, EventArgs e) + { + this.tBroiHeight.Value = Convert.ToInt16(this.numUDRoiHeight.Value); + + int val = (int)this.numUDRoiHeight.Value; + this.tBroiHeight.Value = val; + + setRoiHeight(val); + } + + private void tBroiHeight_ValueChanged(object sender, EventArgs e) + { + numUDRoiHeight.Value = this.tBroiHeight.Value; + numUDRoiHeight.Refresh(); + } + + private void btnSaveConfige_Click(object sender, EventArgs e) + { + HalconTools.MeasureParamSave param = new MeasureParamSave(); + param.Save(mAssistant); + + } + + private void viewPort_HMouseMove(object sender, HMouseEventArgs e) + { + + } + + + + }//end of class +}//end of namespace diff --git a/HalconTools/frmMeasureAssistant.resx b/HalconTools/frmMeasureAssistant.resx new file mode 100644 index 0000000..e386287 --- /dev/null +++ b/HalconTools/frmMeasureAssistant.resx @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="openImageFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="openCamparFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>173, 17</value> + </metadata> + <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>25</value> + </metadata> +</root> \ No newline at end of file diff --git a/HalconTools/frmScrewAssistant.Designer.cs b/HalconTools/frmScrewAssistant.Designer.cs new file mode 100644 index 0000000..23516e9 --- /dev/null +++ b/HalconTools/frmScrewAssistant.Designer.cs @@ -0,0 +1,354 @@ +锘縩amespace HalconTools +{ + partial class frmScrewAssistant + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.hWindowControl1 = new HalconDotNet.HWindowControl(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.btnLoadImage = new System.Windows.Forms.Button(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.btnReset = new System.Windows.Forms.Button(); + this.rbZoom = new System.Windows.Forms.RadioButton(); + this.rbMove = new System.Windows.Forms.RadioButton(); + this.rbNone = new System.Windows.Forms.RadioButton(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.btnRadius = new System.Windows.Forms.Button(); + this.txtRadiusMax = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.txtRadiusMin = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); + this.btnRoundness = new System.Windows.Forms.Button(); + this.txtRoundnessMax = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.txtRoundnessMin = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.btnThresholdSubPix = new System.Windows.Forms.Button(); + this.txtThresholdSubPix = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.btnRun = new System.Windows.Forms.Button(); + this.btnSavePara = new System.Windows.Forms.Button(); + this.groupBox1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.SuspendLayout(); + // + // hWindowControl1 + // + this.hWindowControl1.BackColor = System.Drawing.Color.Black; + this.hWindowControl1.BorderColor = System.Drawing.Color.Black; + this.hWindowControl1.ImagePart = new System.Drawing.Rectangle(0, 0, 640, 480); + this.hWindowControl1.Location = new System.Drawing.Point(11, 12); + this.hWindowControl1.Name = "hWindowControl1"; + this.hWindowControl1.Size = new System.Drawing.Size(621, 488); + this.hWindowControl1.TabIndex = 0; + this.hWindowControl1.WindowSize = new System.Drawing.Size(621, 488); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.btnLoadImage); + this.groupBox1.Location = new System.Drawing.Point(640, 9); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(332, 86); + this.groupBox1.TabIndex = 1; + this.groupBox1.TabStop = false; + // + // btnLoadImage + // + this.btnLoadImage.Location = new System.Drawing.Point(22, 20); + this.btnLoadImage.Name = "btnLoadImage"; + this.btnLoadImage.Size = new System.Drawing.Size(117, 53); + this.btnLoadImage.TabIndex = 0; + this.btnLoadImage.Text = "鍔犺浇鍥剧墖"; + this.btnLoadImage.UseVisualStyleBackColor = true; + this.btnLoadImage.Click += new System.EventHandler(this.btnLoadImage_Click); + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.btnReset); + this.groupBox2.Controls.Add(this.rbZoom); + this.groupBox2.Controls.Add(this.rbMove); + this.groupBox2.Controls.Add(this.rbNone); + this.groupBox2.Location = new System.Drawing.Point(640, 99); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(332, 59); + this.groupBox2.TabIndex = 2; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "鍥剧墖鎿嶄綔"; + // + // btnReset + // + this.btnReset.Location = new System.Drawing.Point(234, 20); + this.btnReset.Name = "btnReset"; + this.btnReset.Size = new System.Drawing.Size(83, 29); + this.btnReset.TabIndex = 3; + this.btnReset.Text = "杩樺師"; + this.btnReset.UseVisualStyleBackColor = true; + this.btnReset.Click += new System.EventHandler(this.btnReset_Click); + // + // rbZoom + // + this.rbZoom.AutoSize = true; + this.rbZoom.Location = new System.Drawing.Point(160, 26); + this.rbZoom.Name = "rbZoom"; + this.rbZoom.Size = new System.Drawing.Size(47, 16); + this.rbZoom.TabIndex = 2; + this.rbZoom.TabStop = true; + this.rbZoom.Text = "Zoom"; + this.rbZoom.UseVisualStyleBackColor = true; + this.rbZoom.CheckedChanged += new System.EventHandler(this.rbZoom_CheckedChanged); + // + // rbMove + // + this.rbMove.AutoSize = true; + this.rbMove.Location = new System.Drawing.Point(92, 26); + this.rbMove.Name = "rbMove"; + this.rbMove.Size = new System.Drawing.Size(47, 16); + this.rbMove.TabIndex = 1; + this.rbMove.TabStop = true; + this.rbMove.Text = "Move"; + this.rbMove.UseVisualStyleBackColor = true; + this.rbMove.CheckedChanged += new System.EventHandler(this.rbMove_CheckedChanged); + // + // rbNone + // + this.rbNone.AutoSize = true; + this.rbNone.Checked = true; + this.rbNone.Location = new System.Drawing.Point(22, 26); + this.rbNone.Name = "rbNone"; + this.rbNone.Size = new System.Drawing.Size(47, 16); + this.rbNone.TabIndex = 0; + this.rbNone.TabStop = true; + this.rbNone.Text = "None"; + this.rbNone.UseVisualStyleBackColor = true; + this.rbNone.CheckedChanged += new System.EventHandler(this.rbNone_CheckedChanged); + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.btnRadius); + this.groupBox3.Controls.Add(this.txtRadiusMax); + this.groupBox3.Controls.Add(this.label4); + this.groupBox3.Controls.Add(this.txtRadiusMin); + this.groupBox3.Controls.Add(this.label5); + this.groupBox3.Controls.Add(this.btnRoundness); + this.groupBox3.Controls.Add(this.txtRoundnessMax); + this.groupBox3.Controls.Add(this.label3); + this.groupBox3.Controls.Add(this.txtRoundnessMin); + this.groupBox3.Controls.Add(this.label2); + this.groupBox3.Controls.Add(this.btnThresholdSubPix); + this.groupBox3.Controls.Add(this.txtThresholdSubPix); + this.groupBox3.Controls.Add(this.label1); + this.groupBox3.Location = new System.Drawing.Point(642, 171); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(330, 171); + this.groupBox3.TabIndex = 3; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "鍙傛暟"; + // + // btnRadius + // + this.btnRadius.Location = new System.Drawing.Point(257, 120); + this.btnRadius.Name = "btnRadius"; + this.btnRadius.Size = new System.Drawing.Size(48, 23); + this.btnRadius.TabIndex = 12; + this.btnRadius.Text = "娴嬭瘯"; + this.btnRadius.UseVisualStyleBackColor = true; + this.btnRadius.Click += new System.EventHandler(this.btnRadius_Click); + // + // txtRadiusMax + // + this.txtRadiusMax.Location = new System.Drawing.Point(160, 122); + this.txtRadiusMax.Name = "txtRadiusMax"; + this.txtRadiusMax.Size = new System.Drawing.Size(60, 21); + this.txtRadiusMax.TabIndex = 11; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(143, 125); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(11, 12); + this.label4.TabIndex = 10; + this.label4.Text = "-"; + // + // txtRadiusMin + // + this.txtRadiusMin.Location = new System.Drawing.Point(77, 122); + this.txtRadiusMin.Name = "txtRadiusMin"; + this.txtRadiusMin.Size = new System.Drawing.Size(60, 21); + this.txtRadiusMin.TabIndex = 9; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(6, 125); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(65, 12); + this.label5.TabIndex = 8; + this.label5.Text = "鍦嗗崐寰勮寖鍥�"; + // + // btnRoundness + // + this.btnRoundness.Location = new System.Drawing.Point(257, 70); + this.btnRoundness.Name = "btnRoundness"; + this.btnRoundness.Size = new System.Drawing.Size(48, 23); + this.btnRoundness.TabIndex = 7; + this.btnRoundness.Text = "娴嬭瘯"; + this.btnRoundness.UseVisualStyleBackColor = true; + this.btnRoundness.Click += new System.EventHandler(this.btnRoundness_Click); + // + // txtRoundnessMax + // + this.txtRoundnessMax.Location = new System.Drawing.Point(160, 72); + this.txtRoundnessMax.Name = "txtRoundnessMax"; + this.txtRoundnessMax.Size = new System.Drawing.Size(60, 21); + this.txtRoundnessMax.TabIndex = 6; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(143, 75); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(11, 12); + this.label3.TabIndex = 5; + this.label3.Text = "-"; + // + // txtRoundnessMin + // + this.txtRoundnessMin.Location = new System.Drawing.Point(77, 72); + this.txtRoundnessMin.Name = "txtRoundnessMin"; + this.txtRoundnessMin.Size = new System.Drawing.Size(60, 21); + this.txtRoundnessMin.TabIndex = 4; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(6, 75); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(65, 12); + this.label2.TabIndex = 3; + this.label2.Text = "鐪熷渾搴﹁寖鍥�"; + // + // btnThresholdSubPix + // + this.btnThresholdSubPix.Location = new System.Drawing.Point(257, 23); + this.btnThresholdSubPix.Name = "btnThresholdSubPix"; + this.btnThresholdSubPix.Size = new System.Drawing.Size(48, 23); + this.btnThresholdSubPix.TabIndex = 2; + this.btnThresholdSubPix.Text = "娴嬭瘯"; + this.btnThresholdSubPix.UseVisualStyleBackColor = true; + this.btnThresholdSubPix.Click += new System.EventHandler(this.btnThresholdSubPix_Click); + // + // txtThresholdSubPix + // + this.txtThresholdSubPix.Location = new System.Drawing.Point(77, 25); + this.txtThresholdSubPix.Name = "txtThresholdSubPix"; + this.txtThresholdSubPix.Size = new System.Drawing.Size(60, 21); + this.txtThresholdSubPix.TabIndex = 1; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(6, 28); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(65, 12); + this.label1.TabIndex = 0; + this.label1.Text = "杈圭紭浜屽�煎寲"; + // + // btnRun + // + this.btnRun.Font = new System.Drawing.Font("瀹嬩綋", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnRun.Location = new System.Drawing.Point(640, 378); + this.btnRun.Name = "btnRun"; + this.btnRun.Size = new System.Drawing.Size(133, 68); + this.btnRun.TabIndex = 4; + this.btnRun.Text = "杩愯"; + this.btnRun.UseVisualStyleBackColor = true; + this.btnRun.Click += new System.EventHandler(this.btnRun_Click); + // + // btnSavePara + // + this.btnSavePara.Font = new System.Drawing.Font("瀹嬩綋", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnSavePara.Location = new System.Drawing.Point(819, 378); + this.btnSavePara.Name = "btnSavePara"; + this.btnSavePara.Size = new System.Drawing.Size(128, 68); + this.btnSavePara.TabIndex = 5; + this.btnSavePara.Text = "淇濆瓨鍙傛暟"; + this.btnSavePara.UseVisualStyleBackColor = true; + this.btnSavePara.Click += new System.EventHandler(this.btnSavePara_Click); + // + // frmScrewAssistant + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(984, 515); + this.Controls.Add(this.btnSavePara); + this.Controls.Add(this.btnRun); + this.Controls.Add(this.groupBox3); + this.Controls.Add(this.groupBox2); + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.hWindowControl1); + this.Name = "frmScrewAssistant"; + this.Text = "frmScrewAssistant"; + this.Load += new System.EventHandler(this.frmScrewAssistant_Load); + this.groupBox1.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private HalconDotNet.HWindowControl hWindowControl1; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Button btnLoadImage; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.RadioButton rbNone; + private System.Windows.Forms.Button btnReset; + private System.Windows.Forms.RadioButton rbZoom; + private System.Windows.Forms.RadioButton rbMove; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox txtThresholdSubPix; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Button btnThresholdSubPix; + private System.Windows.Forms.TextBox txtRoundnessMax; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox txtRoundnessMin; + private System.Windows.Forms.Button btnRadius; + private System.Windows.Forms.TextBox txtRadiusMax; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox txtRadiusMin; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Button btnRoundness; + private System.Windows.Forms.Button btnRun; + private System.Windows.Forms.Button btnSavePara; + } +} \ No newline at end of file diff --git a/HalconTools/frmScrewAssistant.cs b/HalconTools/frmScrewAssistant.cs new file mode 100644 index 0000000..2ec29bc --- /dev/null +++ b/HalconTools/frmScrewAssistant.cs @@ -0,0 +1,202 @@ +锘縰sing System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using System.IO; +using HalconDotNet; + +namespace HalconTools +{ + public partial class frmScrewAssistant : Form + { + HImage MainImage = new HImage(); + ScrewAssistant mScrewAssistant; + public ScrewParam mScrewPara = new ScrewParam(); + ScrewResult mScrewResult = new ScrewResult(); + HXLDCont thresholdXLD = new HXLDCont(); + HXLDCont roundnessXLD = new HXLDCont(); + HXLDCont selectedXLD = new HXLDCont(); + + SerializeFileTool<ScrewParam> sft = new SerializeFileTool<ScrewParam>(); + + public frmScrewAssistant() + { + InitializeComponent(); + + init(); + } + + public frmScrewAssistant(JobTool tool ,HImage image) + { + InitializeComponent(); + + init(); + + MainImage = image; + mScrewAssistant.SetImage(MainImage); + mScrewAssistant.UpdateImage(); + + if (tool.screwParam == null) + { + mScrewPara.ThresholdSubPix = 200; + mScrewPara.RoundnessMin = 0.8; + mScrewPara.RoundnessMax = 1; + mScrewPara.RadiusMin = 100; + mScrewPara.RadiusMax = 200; + } + else + { + mScrewPara = tool.screwParam; + } + } + + private void frmScrewAssistant_Load(object sender, EventArgs e) + { + if (mScrewPara.ThresholdSubPix == null) + { + string path = System.Windows.Forms.Application.StartupPath + "\\ScrewConfige"; + if (!Directory.Exists(path)) + { + Directory.CreateDirectory(path); + } + path += "\\ScrewConfige.xml"; + + if (!File.Exists(path)) + { + mScrewPara.ThresholdSubPix = 200; + mScrewPara.RoundnessMin = 0.8; + mScrewPara.RoundnessMax = 1; + mScrewPara.RadiusMin = 100; + mScrewPara.RadiusMax = 200; + + sft.SetConfig(path, mScrewPara); + } + + mScrewPara = sft.GetConfig(path); + } + + txtThresholdSubPix.Text = mScrewPara.ThresholdSubPix.ToString(); + txtRoundnessMin.Text = mScrewPara.RoundnessMin.ToString(); + txtRoundnessMax.Text = mScrewPara.RoundnessMax.ToString(); + txtRadiusMin.Text = mScrewPara.RadiusMin.ToString(); + txtRadiusMax.Text = mScrewPara.RadiusMax.ToString(); + } + + private void init() + { + mScrewAssistant = new ScrewAssistant(hWindowControl1); + mScrewAssistant.SetPara(mScrewPara); + + mScrewAssistant.ScrewDone += new ScrewDelegate(mScrewAssistant_ScrewDone); + } + + void mScrewAssistant_ScrewDone(ScrewResult result) + { + if (result == null) + { + MessageBox.Show("娌℃壘鍒�"); + } + else + { + HOperatorSet.DispCircle(hWindowControl1.HalconWindow, result.row, result.col, result.radius); + } + } + + private void rbNone_CheckedChanged(object sender, EventArgs e) + { + mScrewAssistant.viewController.setViewState(HWndCtrl.MODE_VIEW_NONE); + } + + private void rbMove_CheckedChanged(object sender, EventArgs e) + { + mScrewAssistant.viewController.setViewState(HWndCtrl.MODE_VIEW_MOVE); + } + + private void rbZoom_CheckedChanged(object sender, EventArgs e) + { + mScrewAssistant.viewController.setViewState(HWndCtrl.MODE_VIEW_ZOOM); + } + + private void btnReset_Click(object sender, EventArgs e) + { + mScrewAssistant.viewController.resetWindow(); + mScrewAssistant.viewController.repaint(); + } + + private void btnThresholdSubPix_Click(object sender, EventArgs e) + { + mScrewPara.ThresholdSubPix = Convert.ToDouble(txtThresholdSubPix.Text); + mScrewAssistant.SetPara(mScrewPara); + + thresholdXLD = mScrewAssistant.ThresholdSubPix(mScrewAssistant.mImage); + mScrewAssistant.UpdateObj((HObject)thresholdXLD, "green"); + } + + private void btnRoundness_Click(object sender, EventArgs e) + { + mScrewPara.RoundnessMin = Convert.ToDouble(txtRoundnessMin.Text); + mScrewPara.RoundnessMax = Convert.ToDouble(txtRoundnessMax.Text); + mScrewAssistant.SetPara(mScrewPara); + + roundnessXLD = mScrewAssistant.RoundnessXLD(thresholdXLD); + mScrewAssistant.UpdateObj((HObject)roundnessXLD, "red"); + } + + private void btnRadius_Click(object sender, EventArgs e) + { + mScrewPara.RadiusMin = Convert.ToDouble(txtRadiusMin.Text); + mScrewPara.RadiusMax = Convert.ToDouble(txtRadiusMax.Text); + mScrewAssistant.SetPara(mScrewPara); + + selectedXLD = mScrewAssistant.SelectXLD(roundnessXLD); + mScrewAssistant.UpdateObj((HObject)selectedXLD, "black"); + } + + private void btnRun_Click(object sender, EventArgs e) + { + mScrewAssistant.UpdateImage(); + mScrewAssistant.Run(); + } + + private void btnSavePara_Click(object sender, EventArgs e) + { + mScrewPara.RadiusMax = Convert.ToDouble(txtRadiusMax.Text); + mScrewPara.RadiusMin = Convert.ToDouble(txtRadiusMin.Text); + mScrewPara.RoundnessMax = Convert.ToDouble(txtRoundnessMax.Text); + mScrewPara.RoundnessMin = Convert.ToDouble(txtRoundnessMin.Text); + mScrewPara.ThresholdSubPix = Convert.ToDouble(txtThresholdSubPix.Text); + + mScrewAssistant.SetPara(mScrewPara); + + string path = System.Windows.Forms.Application.StartupPath + "\\ScrewConfige"; + if (!Directory.Exists(path)) + { + Directory.CreateDirectory(path); + } + path += "\\ScrewConfige.xml"; + + sft.SetConfig(path, mScrewPara); + } + + private void btnLoadImage_Click(object sender, EventArgs e) + { + OpenFileDialog imagePath = new OpenFileDialog(); + imagePath.Filter = "*.jpg,*.jpeg,*.bmp,*.gif,*.ico,*.png,*.tif,*.wmf|*.jpg;*.jpeg;*.bmp;*.gif;*.ico;*.png;*.tif;*.wmf"; + + if (imagePath.ShowDialog() == DialogResult.OK) + { + if (!mScrewAssistant.SetImage(imagePath.FileName)) + { + return; + } + + MainImage = mScrewAssistant.mImage; + mScrewAssistant.UpdateImage(); + } + } + } +} diff --git a/HalconTools/frmScrewAssistant.resx b/HalconTools/frmScrewAssistant.resx new file mode 100644 index 0000000..19dc0dd --- /dev/null +++ b/HalconTools/frmScrewAssistant.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/LLMF.sln b/LLMF.sln new file mode 100644 index 0000000..6ce6ed4 --- /dev/null +++ b/LLMF.sln @@ -0,0 +1,52 @@ +锘� +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2046 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LLMF", "LLMF\LLMF.csproj", "{2D99C0F2-ACB1-4985-BC17-27AA52F881E1}" + ProjectSection(ProjectDependencies) = postProject + {461F5DE4-F558-41B7-9494-F76854E0E7C7} = {461F5DE4-F558-41B7-9494-F76854E0E7C7} + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EventTool", "EventTool\EventTool.csproj", "{2EBB374F-7C87-4A83-8AF4-503CDF0D1B0E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileToolkit", "FileToolkit\FileToolkit.csproj", "{EC3A7C8F-C3FB-461C-9AF1-2456E1CBEC46}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HalconTools", "HalconTools\HalconTools.csproj", "{461F5DE4-F558-41B7-9494-F76854E0E7C7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PointGreyAndHalcon", "PointGreyAndHalcon\PointGreyAndHalcon\PointGreyAndHalcon.csproj", "{91B96D0B-F745-4850-9166-63A07917AC04}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2D99C0F2-ACB1-4985-BC17-27AA52F881E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2D99C0F2-ACB1-4985-BC17-27AA52F881E1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2D99C0F2-ACB1-4985-BC17-27AA52F881E1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2D99C0F2-ACB1-4985-BC17-27AA52F881E1}.Release|Any CPU.Build.0 = Release|Any CPU + {2EBB374F-7C87-4A83-8AF4-503CDF0D1B0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2EBB374F-7C87-4A83-8AF4-503CDF0D1B0E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2EBB374F-7C87-4A83-8AF4-503CDF0D1B0E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2EBB374F-7C87-4A83-8AF4-503CDF0D1B0E}.Release|Any CPU.Build.0 = Release|Any CPU + {EC3A7C8F-C3FB-461C-9AF1-2456E1CBEC46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EC3A7C8F-C3FB-461C-9AF1-2456E1CBEC46}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC3A7C8F-C3FB-461C-9AF1-2456E1CBEC46}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EC3A7C8F-C3FB-461C-9AF1-2456E1CBEC46}.Release|Any CPU.Build.0 = Release|Any CPU + {461F5DE4-F558-41B7-9494-F76854E0E7C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {461F5DE4-F558-41B7-9494-F76854E0E7C7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {461F5DE4-F558-41B7-9494-F76854E0E7C7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {461F5DE4-F558-41B7-9494-F76854E0E7C7}.Release|Any CPU.Build.0 = Release|Any CPU + {91B96D0B-F745-4850-9166-63A07917AC04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {91B96D0B-F745-4850-9166-63A07917AC04}.Debug|Any CPU.Build.0 = Debug|Any CPU + {91B96D0B-F745-4850-9166-63A07917AC04}.Release|Any CPU.ActiveCfg = Release|Any CPU + {91B96D0B-F745-4850-9166-63A07917AC04}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {B5F06DB0-60BB-4339-BA90-BC309153D291} + EndGlobalSection +EndGlobal diff --git a/LLMF/FrmActive.cs b/LLMF/FrmActive.cs new file mode 100644 index 0000000..dfe0fb2 --- /dev/null +++ b/LLMF/FrmActive.cs @@ -0,0 +1,251 @@ +锘縰sing Microsoft.Win32; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace LLMF +{ + public partial class FrmActive : Form + { + RegistryHelper registryHelper = new RegistryHelper(); + RegistryKey localMachineRegistry + = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, + Environment.Is64BitOperatingSystem + ? RegistryView.Registry64 + : RegistryView.Registry32); + + public FrmActive() + { + InitializeComponent(); + } + + private void btnActive_Click(object sender, EventArgs e) + { + string softTime = registryHelper.GetRegistryData(localMachineRegistry, "SOFTWARE\\TagReceiver", "SoftTime"); + string softLastTime = registryHelper.GetRegistryData(localMachineRegistry, "SOFTWARE\\TagReceiver", "SoftLastTime"); + string softParam6 = registryHelper.GetRegistryData(localMachineRegistry, "SOFTWARE\\TagReceiver", "SoftParam6"); + string softParam1 = registryHelper.GetRegistryData(localMachineRegistry, "SOFTWARE\\TagReceiver", "SoftParam1"); + string softParam2 = registryHelper.GetRegistryData(localMachineRegistry, "SOFTWARE\\TagReceiver", "SoftParam2"); + string softParam3 = registryHelper.GetRegistryData(localMachineRegistry, "SOFTWARE\\TagReceiver", "SoftParam3"); + string softParam4 = registryHelper.GetRegistryData(localMachineRegistry, "SOFTWARE\\TagReceiver", "SoftParam4"); + string softParam5 = registryHelper.GetRegistryData(localMachineRegistry, "SOFTWARE\\TagReceiver", "SoftParam5"); + string active = txtActive.Text; + if (string.IsNullOrEmpty(active)) + { + return; + } + if (active == "7418259015") + { + if (softParam1 == "0") + { + if (softParam2 == "1") + { + SetOver("SoftParam2"); + } + if (softParam3 == "1") + { + SetOver("SoftParam3"); + } + if (softParam4 == "1") + { + SetOver("SoftParam4"); + } + if (softParam5 == "1") + { + SetOver("SoftParam5"); + } + Set("SoftParam1"); + Close(); + } + else + { + MessageBox.Show("璇ユ縺娲荤爜宸蹭娇鐢�"); + return; + } + } + if (active == "7886093651") + { + if (softParam2 == "0") + { + if (softParam1 == "1") + { + SetOver("SoftParam1"); + } + if (softParam3 == "1") + { + SetOver("SoftParam3"); + } + if (softParam4 == "1") + { + SetOver("SoftParam4"); + } + if (softParam5 == "1") + { + SetOver("SoftParam5"); + } + Set("SoftParam2"); + Close(); + } + else + { + MessageBox.Show("璇ユ縺娲荤爜宸蹭娇鐢�"); + return; + } + } + if (active == "3051805492") + { + if (softParam3 == "0") + { + if (softParam1 == "1") + { + SetOver("SoftParam1"); + } + if (softParam2 == "1") + { + SetOver("SoftParam2"); + } + if (softParam4 == "1") + { + SetOver("SoftParam4"); + } + if (softParam5 == "1") + { + SetOver("SoftParam5"); + } + Set("SoftParam3"); + Close(); + } + else + { + MessageBox.Show("璇ユ縺娲荤爜宸蹭娇鐢�"); + return; + } + } + if (active == "3085803765") + { + if (softParam4 == "0") + { + if (softParam1 == "1") + { + SetOver("SoftParam1"); + } + if (softParam2 == "1") + { + SetOver("SoftParam2"); + } + if (softParam3 == "1") + { + SetOver("SoftParam3"); + } + if (softParam5 == "1") + { + SetOver("SoftParam5"); + } + Set("SoftParam4"); + Close(); + } + else + { + MessageBox.Show("璇ユ縺娲荤爜宸蹭娇鐢�"); + return; + } + } + if (active == "3067035900") + { + if (softParam5 == "0") + { + if (softParam1 == "1") + { + SetOver("SoftParam1"); + } + if (softParam2 == "1") + { + SetOver("SoftParam2"); + } + if (softParam3 == "1") + { + SetOver("SoftParam3"); + } + if (softParam4 == "1") + { + SetOver("SoftParam4"); + } + Set("SoftParam5"); + Close(); + } + else + { + MessageBox.Show("璇ユ縺娲荤爜宸蹭娇鐢�"); + return; + } + } + if (active == "9975640068") + { + if (softParam6 == "0") + { + if (softParam1 == "1") + { + SetOver("SoftParam1"); + } + if (softParam2 == "1") + { + SetOver("SoftParam2"); + } + if (softParam3 == "1") + { + SetOver("SoftParam3"); + } + if (softParam4 == "1") + { + SetOver("SoftParam4"); + } + if (softParam5 == "1") + { + SetOver("SoftParam5"); + } + Set("SoftParam6"); + Close(); + } + else + { + MessageBox.Show("璇ユ縺娲荤爜宸蹭娇鐢�"); + return; + } + } + if (active == "9966775500") + { + Init(); + Close(); + } + } + + public void Init() + { + registryHelper.SetRegistryData(localMachineRegistry, "SOFTWARE\\TagReceiver", "SoftTime", DateTime.Now.ToString()); + registryHelper.SetRegistryData(localMachineRegistry, "SOFTWARE\\TagReceiver", "SoftLastTime", DateTime.Now.ToString()); + registryHelper.SetRegistryData(localMachineRegistry, "SOFTWARE\\TagReceiver", "SoftParam1", "0"); + registryHelper.SetRegistryData(localMachineRegistry, "SOFTWARE\\TagReceiver", "SoftParam2", "0"); + registryHelper.SetRegistryData(localMachineRegistry, "SOFTWARE\\TagReceiver", "SoftParam3", "0"); + registryHelper.SetRegistryData(localMachineRegistry, "SOFTWARE\\TagReceiver", "SoftParam4", "0"); + registryHelper.SetRegistryData(localMachineRegistry, "SOFTWARE\\TagReceiver", "SoftParam5", "0"); + registryHelper.SetRegistryData(localMachineRegistry, "SOFTWARE\\TagReceiver", "SoftParam6", "0"); + } + + public void Set(string name) + { + registryHelper.SetRegistryData(localMachineRegistry, "SOFTWARE\\TagReceiver", name, "1"); + registryHelper.SetRegistryData(localMachineRegistry, "SOFTWARE\\TagReceiver", "SoftLastTime", DateTime.Now.ToString()); + } + + public void SetOver(string name) + { + registryHelper.SetRegistryData(localMachineRegistry, "SOFTWARE\\TagReceiver", name, "2"); + } + } +} diff --git a/LLMF/FrmActive.designer.cs b/LLMF/FrmActive.designer.cs new file mode 100644 index 0000000..07c67a5 --- /dev/null +++ b/LLMF/FrmActive.designer.cs @@ -0,0 +1,86 @@ +锘縩amespace LLMF +{ + partial class FrmActive + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.txtActive = new System.Windows.Forms.TextBox(); + this.btnActive = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(21, 38); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(62, 18); + this.label1.TabIndex = 0; + this.label1.Text = "婵�娲荤爜"; + // + // txtActive + // + this.txtActive.Location = new System.Drawing.Point(89, 33); + this.txtActive.Name = "txtActive"; + this.txtActive.Size = new System.Drawing.Size(351, 28); + this.txtActive.TabIndex = 1; + // + // btnActive + // + this.btnActive.Location = new System.Drawing.Point(458, 33); + this.btnActive.Name = "btnActive"; + this.btnActive.Size = new System.Drawing.Size(89, 34); + this.btnActive.TabIndex = 2; + this.btnActive.Text = "纭畾"; + this.btnActive.UseVisualStyleBackColor = true; + this.btnActive.Click += new System.EventHandler(this.btnActive_Click); + // + // FrmActive + // + this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(559, 93); + this.Controls.Add(this.btnActive); + this.Controls.Add(this.txtActive); + this.Controls.Add(this.label1); + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "FrmActive"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "婵�娲�"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox txtActive; + private System.Windows.Forms.Button btnActive; + } +} \ No newline at end of file diff --git a/LLMF/FrmActive.resx b/LLMF/FrmActive.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/LLMF/FrmActive.resx @@ -0,0 +1,120 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/LLMF/LLMF.csproj b/LLMF/LLMF.csproj new file mode 100644 index 0000000..1c67bb5 --- /dev/null +++ b/LLMF/LLMF.csproj @@ -0,0 +1,186 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>9.0.21022</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{2D99C0F2-ACB1-4985-BC17-27AA52F881E1}</ProjectGuid> + <OutputType>WinExe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>LLMF</RootNamespace> + <AssemblyName>LLMF</AssemblyName> + <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <ApplicationIcon>ico.ico</ApplicationIcon> + <FileUpgradeFlags> + </FileUpgradeFlags> + <UpgradeBackupLocation> + </UpgradeBackupLocation> + <OldToolsVersion>3.5</OldToolsVersion> + <TargetFrameworkProfile /> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <PlatformTarget>x86</PlatformTarget> + <Prefer32Bit>false</Prefer32Bit> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> + </PropertyGroup> + <ItemGroup> + <Reference Include="dog_net_windows"> + <HintPath>..\Lib\SuperDog\dog_net_windows.dll</HintPath> + </Reference> + <Reference Include="halcondotnet, Version=11.0.1.0, Culture=neutral, PublicKeyToken=4973bed59ddbf2b8, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\Lib\halcon\halcondotnet.dll</HintPath> + </Reference> + <Reference Include="HalconTools, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\HalconTools\bin\Debug\HalconTools.dll</HintPath> + </Reference> + <Reference Include="Interop.OPCAutomation, Version=1.0.0.0, Culture=neutral"> + <SpecificVersion>False</SpecificVersion> + <HintPath>C:\Program Files\KEPServerEx\Examples\Simple VB .NET OPC Example\bin\Interop.OPCAutomation.dll</HintPath> + </Reference> + <Reference Include="PresentationCore"> + <RequiredTargetFramework>3.0</RequiredTargetFramework> + </Reference> + <Reference Include="PresentationFramework"> + <RequiredTargetFramework>3.0</RequiredTargetFramework> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Core"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> + <Reference Include="System.Xml.Linq"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> + <Reference Include="System.Data.DataSetExtensions"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> + <Reference Include="System.Data" /> + <Reference Include="System.Deployment" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + <Reference Include="WindowsBase"> + <RequiredTargetFramework>3.0</RequiredTargetFramework> + </Reference> + </ItemGroup> + <ItemGroup> + <Compile Include="FrmActive.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="FrmActive.designer.cs"> + <DependentUpon>FrmActive.cs</DependentUpon> + </Compile> + <Compile Include="frmConfig.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="frmConfig.Designer.cs"> + <DependentUpon>frmConfig.cs</DependentUpon> + </Compile> + <Compile Include="frmMain.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="frmMain.Designer.cs"> + <DependentUpon>frmMain.cs</DependentUpon> + </Compile> + <Compile Include="frmPassword.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="frmPassword.Designer.cs"> + <DependentUpon>frmPassword.cs</DependentUpon> + </Compile> + <Compile Include="Log.cs" /> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="RegistryHelper.cs" /> + <Compile Include="WelcomeUser.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="WelcomeUser.Designer.cs"> + <DependentUpon>WelcomeUser.cs</DependentUpon> + </Compile> + <EmbeddedResource Include="FrmActive.resx"> + <DependentUpon>FrmActive.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="frmConfig.resx"> + <DependentUpon>frmConfig.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="frmMain.resx"> + <DependentUpon>frmMain.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="frmPassword.resx"> + <DependentUpon>frmPassword.cs</DependentUpon> + <SubType>Designer</SubType> + </EmbeddedResource> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + <SubType>Designer</SubType> + </EmbeddedResource> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Resources.resx</DependentUpon> + <DesignTime>True</DesignTime> + </Compile> + <EmbeddedResource Include="WelcomeUser.resx"> + <DependentUpon>WelcomeUser.cs</DependentUpon> + </EmbeddedResource> + <None Include="app.config" /> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + <Compile Include="Toolkit\ConfigStruct.cs" /> + <Compile Include="Toolkit\OPC.cs" /> + <Compile Include="Toolkit\StarterTool.cs" /> + </ItemGroup> + <ItemGroup> + <Content Include="ico.ico" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\EventTool\EventTool.csproj"> + <Project>{2EBB374F-7C87-4A83-8AF4-503CDF0D1B0E}</Project> + <Name>EventTool</Name> + </ProjectReference> + <ProjectReference Include="..\FileToolkit\FileToolkit.csproj"> + <Project>{EC3A7C8F-C3FB-461C-9AF1-2456E1CBEC46}</Project> + <Name>FileToolkit</Name> + </ProjectReference> + <ProjectReference Include="..\PointGreyAndHalcon\PointGreyAndHalcon\PointGreyAndHalcon.csproj"> + <Project>{91b96d0b-f745-4850-9166-63a07917ac04}</Project> + <Name>PointGreyAndHalcon</Name> + </ProjectReference> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/LLMF/Log.cs b/LLMF/Log.cs new file mode 100644 index 0000000..7b6d50a --- /dev/null +++ b/LLMF/Log.cs @@ -0,0 +1,92 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.IO; +using System.Windows.Forms; + +namespace LLMF +{ + public class Log + { + private static string logPath = string.Empty; + private static string resultPath = string.Empty; + private static object _lock = new object(); + + public static string LogPath + { + get + { + if (logPath == string.Empty) + { + //logPath = System.AppDomain.CurrentDomain.BaseDirectory+"\\Log\\"; + //logPath = Application.StartupPath + "\\"; + logPath = "D:\\Log\\"; + } + return logPath; + } + set { Log.logPath = value; } + } + public static string ResultPath + { + get + { + if (resultPath == string.Empty) + { + resultPath = System.AppDomain.CurrentDomain.BaseDirectory + "\\Result\\"; + //logPath = Application.StartupPath + "\\"; + } + return resultPath; + } + set { Log.resultPath = value; } + } + public static void WriteLog(string text) + { + System.IO.StreamWriter sw = null; + if (!Directory.Exists(LogPath)) + { + Directory.CreateDirectory(LogPath); + } + string fileFullFileName = LogPath + DateTime.Now.ToString("yyyyMMdd") + ".Log"; + try + { + lock (_lock) + { + using (sw = System.IO.File.AppendText(fileFullFileName)) + { + sw.WriteLine(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss: ") + text); + } + } + } + catch (Exception e) + { + MessageBox.Show(e.Message); + } + + } + + public static void WriteExcel(string name, string str1, string str2, string str3, string flag) + { + + string stringpath = resultPath + name + ".csv"; + + if (!File.Exists(stringpath)) + { + StringBuilder tile = new StringBuilder(); + + tile.Append("Time" + "," + "Row" + "," + "Column" + "," + "Radius"); + File.AppendAllText(stringpath, tile.ToString()); + File.AppendAllText(stringpath, "\r\n"); + } + + StringBuilder Result = new StringBuilder(); + Result.Append(DateTime.Now.ToString("MM-dd HH:mm:ss")); + + + Result.Append("," + str1 + "," + str2 + "," + str3 + "," + flag); + + File.AppendAllText(stringpath, Result.ToString()); + File.AppendAllText(stringpath, "\r\n"); + } + } +} diff --git a/LLMF/Program.cs b/LLMF/Program.cs new file mode 100644 index 0000000..d285f55 --- /dev/null +++ b/LLMF/Program.cs @@ -0,0 +1,51 @@ +锘縰sing Microsoft.Win32; +using SuperDog; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; + +namespace LLMF +{ + static class Program + { + public const string defaultScope = "<dogscope />"; + /// <summary> + /// 搴旂敤绋嬪簭鐨勪富鍏ュ彛鐐广�� + /// </summary> + [STAThread] + static void Main() + { + DogFeature feature = new DogFeature(1); + using (var dog = new Dog(feature)) + { + string vendorcodes = "tn+2bpxTE0MhQDarbNvbJEPpez6LfT6oB2DjZLKQMs0H2ap3YfmDIzYaLqDsZliOKL677L28ZbDhxwdP3Mq2xIbi/5zkXQ7ybvG9HLKaYXN3ql8yY5XJ1WHn7ISI+m7M9t1SzzQaUwnW/NV2VUslx/PdI5hZ1VVwsIaus042E5u8QGCSPJcDOXBeGIJeJSezvM+scip87hDujXsrubV0n+xCAdrTAs/WU5O1JwpgYNArqrFCpYSV4nO5ZveQRcPchUuED+gaNpHfsKZYAtW/43ud3IYcnTg6HuQPo+9fRu8iDpi18+j8USasj6M8EY9g7x3YjwO1DHCPpNEWB3IrHA0rhWG+c2emcCc3q8r8Qx8yHBCAUdZV7F8CTar/co5NbVv3FNObKULZxqrESWkPhoIKBtuCutspoGkTBHger+2A5qtfEMy6ZHt6MRvmgmiIO23AQGQ3yXKHXkq6HsDtrl1P+8coQTFnqopDOGaPi6C+Pb7qIqCJx+IBnWnjuZEfawKMcR+1hB9m1rSfhY+UQ0crh8jYr5a+tOAbSU9tPw3ZmKLQYbm6m8gLAHIv+EOq1rRfH5XxhUUbL4Lv4mrTFcmWl1Ibnaiz7140PqVqaquI8h8Mj4tL/5u/f1iJTKvnUywmPUDZXAecu6FmwDeQpvGJwa+q1Fgn3WXqBitT/lnEox7pp8deMpT/ol0wpcmlU40Cq5XsvnLmbGdK/qcXYBa+ZYhLYnXpzTe4XUDbatIFKfNVwZsSgXaMPpRLghEMQupv/H9uJ2vtlRYjt0ysoFDgzb3W0qr3bK7T55a8bhiptfh/dq7Q5hHZUolRprjXTbcUlmyhjzrH+bAz+BdmwiHJInx/najqyflknUUuOdO8IrMFAh0zWiICkijghbvWUwjg/DTpLKRO2e6hTaWtvCHTBHfBRV0/0EVW0kMmdx/huL1k1BBo11Fv/X7feCskl0m5rot1ubw/T/shAAvVBg=="; + var status = dog.Login(vendorcodes, defaultScope); + if (status != DogStatus.StatusOk) + { + if (status == DogStatus.TimeError) + { + MessageBox.Show("绂佹绡℃敼鏃堕棿!"); + return; + } + else + { + MessageBox.Show("璇锋彃鍏ユ湁鏁堢殑鍔犲瘑鐙�!"); + return; + } + } + } + + System.Threading.Mutex mutex = new System.Threading.Mutex(); + if (ToolKit.StarterTool.IsExistMutex("LLMF",out mutex )) + { + MessageBox.Show("绋嬪簭宸插惎鍔紝璇峰嬁閲嶅鍚姩锛�"); + Application.Exit(); + return; + } + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new frmMain()); + } + } +} diff --git a/LLMF/Properties/AssemblyInfo.cs b/LLMF/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..c9fbe60 --- /dev/null +++ b/LLMF/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +锘縰sing System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 鏈夊叧绋嬪簭闆嗙殑甯歌淇℃伅閫氳繃涓嬪垪灞炴�ч泦 +// 鎺у埗銆傛洿鏀硅繖浜涘睘鎬у�煎彲淇敼 +// 涓庣▼搴忛泦鍏宠仈鐨勪俊鎭�� +[assembly: AssemblyTitle("LLMF")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("BroConcentric")] +[assembly: AssemblyProduct("LLMF")] +[assembly: AssemblyCopyright("Copyright 漏 BroConcentric 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 灏� ComVisible 璁剧疆涓� false 浣挎绋嬪簭闆嗕腑鐨勭被鍨� +// 瀵� COM 缁勪欢涓嶅彲瑙併�傚鏋滈渶瑕佷粠 COM 璁块棶姝ょ▼搴忛泦涓殑绫诲瀷锛� +// 鍒欏皢璇ョ被鍨嬩笂鐨� ComVisible 灞炴�ц缃负 true銆� +[assembly: ComVisible(false)] + +// 濡傛灉姝ら」鐩悜 COM 鍏紑锛屽垯涓嬪垪 GUID 鐢ㄤ簬绫诲瀷搴撶殑 ID +[assembly: Guid("920ff02f-5730-4f56-9944-d7bfdb85c698")] + +// 绋嬪簭闆嗙殑鐗堟湰淇℃伅鐢变笅闈㈠洓涓�肩粍鎴�: +// +// 涓荤増鏈� +// 娆$増鏈� +// 鍐呴儴鐗堟湰鍙� +// 淇鍙� +// +// 鍙互鎸囧畾鎵�鏈夎繖浜涘�硷紝涔熷彲浠ヤ娇鐢ㄢ�滃唴閮ㄧ増鏈彿鈥濆拰鈥滀慨璁㈠彿鈥濈殑榛樿鍊硷紝 +// 鏂规硶鏄寜濡備笅鎵�绀轰娇鐢ㄢ��*鈥�: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("3.4.0.0")] +[assembly: AssemblyFileVersion("3.4.0.0")] diff --git a/LLMF/Properties/Resources.Designer.cs b/LLMF/Properties/Resources.Designer.cs new file mode 100644 index 0000000..535a2bb --- /dev/null +++ b/LLMF/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +锘�//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace LLMF.Properties { + using System; + + + /// <summary> + /// A strongly-typed resource class, for looking up localized strings, etc. + /// </summary> + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// <summary> + /// Returns the cached ResourceManager instance used by this class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LLMF.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/LLMF/Properties/Resources.resx b/LLMF/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/LLMF/Properties/Resources.resx @@ -0,0 +1,117 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/LLMF/Properties/Settings.Designer.cs b/LLMF/Properties/Settings.Designer.cs new file mode 100644 index 0000000..b902679 --- /dev/null +++ b/LLMF/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +锘�//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace LLMF.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/LLMF/Properties/Settings.settings b/LLMF/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/LLMF/Properties/Settings.settings @@ -0,0 +1,7 @@ +锘�<?xml version='1.0' encoding='utf-8'?> +<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> + <Profiles> + <Profile Name="(Default)" /> + </Profiles> + <Settings /> +</SettingsFile> diff --git a/LLMF/RegistryHelper.cs b/LLMF/RegistryHelper.cs new file mode 100644 index 0000000..aa1c696 --- /dev/null +++ b/LLMF/RegistryHelper.cs @@ -0,0 +1,79 @@ +锘縰sing Microsoft.Win32; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace LLMF +{ + class RegistryHelper + { + /// <summary> + /// 璇诲彇鎸囧畾鍚嶇О鐨勬敞鍐岃〃鐨勫�� + /// </summary> + /// <param name="name"></param> + /// <returns></returns> + public string GetRegistryData(RegistryKey root, string subkey, string name) + { + string registData = ""; + RegistryKey myKey = root.OpenSubKey(subkey, true); + if (myKey != null) + { + registData = myKey.GetValue(name).ToString(); + } + + return registData; + } + + /// <summary> + /// 鍚戞敞鍐岃〃涓啓鏁版嵁 + /// </summary> + /// <param name="name"></param> + /// <param name="tovalue"></param> + public void SetRegistryData(RegistryKey root, string subkey, string name, string value) + { + RegistryKey aimdir = root.CreateSubKey(subkey); + aimdir.SetValue(name, value); + } + + /// <summary> + /// 鍒犻櫎娉ㄥ唽琛ㄤ腑鎸囧畾鐨勬敞鍐岃〃椤� + /// </summary> + /// <param name="name"></param> + public void DeleteRegist(RegistryKey root, string subkey, string name) + { + string[] subkeyNames; + RegistryKey myKey = root.OpenSubKey(subkey, true); + subkeyNames = myKey.GetSubKeyNames(); + foreach (string aimKey in subkeyNames) + { + if (aimKey == name) + myKey.DeleteSubKeyTree(name); + } + } + + /// <summary> + /// 鍒ゆ柇鎸囧畾娉ㄥ唽琛ㄩ」鏄惁瀛樺湪 + /// </summary> + /// <param name="name"></param> + /// <returns></returns> + public bool IsRegistryExist(RegistryKey root, string subkey, string name) + { + bool _exit = false; + string[] valueNames; + RegistryKey myKey = root.OpenSubKey(subkey, true); + valueNames = myKey.GetValueNames(); + foreach (string valueName in valueNames) + { + if (valueName == name) + { + _exit = true; + return _exit; + } + } + + return _exit; + } + } +} diff --git a/LLMF/Toolkit/ConfigStruct.cs b/LLMF/Toolkit/ConfigStruct.cs new file mode 100644 index 0000000..843eaf1 --- /dev/null +++ b/LLMF/Toolkit/ConfigStruct.cs @@ -0,0 +1,208 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace LLMF +{ + #region 杩愯鐘舵�� + public enum RunStatus + { + /// <summary> + /// 姝e父鐘舵�� + /// </summary> + Normal = 0, + + /// <summary> + /// 璋冩暣鐘舵�� + /// </summary> + adjustMent = 1, + + /// <summary> + /// 绗竴娆℃媿鐓� + /// </summary> + firstCapture = 2, + + /// <summary> + /// 鏍囧畾 + /// </summary> + calibration = 3, + + /// <summary> + /// 鎸佺画鎷嶇収 + /// </summary> + continueCapture = 4, + + /// <summary> + /// 娴嬭瘯鐘舵�� + /// </summary> + testMent = 5, + } + #endregion + + #region OPC Parameters + public struct OPCConfig + { + public string serverName; + public string serverIP; + public int itmHandleClient; + public GroupProperty groupProperty; + } + + public struct GroupProperty + { + public bool defaultGroupIsActive; + public int defaultGroupDeadband; + public int updateRate; + public bool isActive; + public bool isSubscribed; + } + #endregion OPC Parameters + + public struct CamerasConfig + { + public uint[] SerialNumber; + } + + [Serializable] + public class ConfigStruct + { + public string title; + public OPCConfig opcConfig; + public double angleOffset; + public double angleOffset_Left; + public CamerasConfig cams; + public string password; + public double minAngle; + public double maxAngle; + public int pulsePerDegree; + public int pulsePerDegree_Left; + public double calAngle; + public bool leftUsed; + public bool rightUsed; + public bool saveImage; + public long inch13; + public long inch15; + public long inch16; + public int selectedSizeIndex; + } + + #region OPC Tags + public class InputTag + { + /* Command */ + public const string Alarm = "LLMF.Green.Input.Alarm"; + public const string Start = "LLMF.Green.Input.Start"; + public const string Capture = "LLMF.Green.Input.Capture"; + public const string Position = "LLMF.Green.Input.Position"; + + public const string Alarm_left = "LLMF.Left.Input.Alarm"; + public const string Start_left = "LLMF.Left.Input.Start"; + public const string Capture_left = "LLMF.Left.Input.Capture"; + public const string Position_left = "LLMF.Left.Input.Position"; + //input 鏄剧ず + public const string X_JinDian = "LLMF.Green.Input.X_JinDian"; + public const string Z_JinDian = "LLMF.Green.Input.Z_JinDian"; + public const string X_Alarm = "LLMF.Green.Input.X_Alarm"; + public const string Z_Alarm = "LLMF.Green.Input.Z_Alarm"; + + public const string X_CW = "LLMF.Green.Input.X_CW"; + public const string X_CCW = "LLMF.Green.Input.X_CCW"; + public const string Z_CW = "LLMF.Green.Input.Z_CW"; + public const string Z_CCW = "LLMF.Green.Input.Z_CCW"; + public const string DingWei_CW = "LLMF.Green.Input.DingWei_CW"; + public const string DingWei_CCW = "LLMF.Green.Input.DingWei_CCW"; + public const string DingWei_JinDian = "LLMF.Green.Input.DingWei_JinDian"; + public const string DingWei_Alarm = "LLMF.Green.Input.DingWei_Alarm"; + + + + + public const string Start1 = "LLMF.Green.Input.Start1"; + public const string Start2 = "LLMF.Green.Input.Start2"; + public const string Reset = "LLMF.Green.Input.Reset"; + public const string E_Stop = "LLMF.Green.Input.E_Stop"; + public const string SafeCurtain = "LLMF.Green.Input.SafeCurtain"; + public const string OpenJieJin = "LLMF.Green.Input.OpenJieJin"; + public const string CeBianQian = "LLMF.Green.Input.CeBianQian"; + public const string CeBianHou = "LLMF.Green.Input.CeBianHou"; + + public const string WuGanQian = "LLMF.Green.Input.WuGanQian"; + public const string WuGanHou = "LLMF.Green.Input.WuGanHou"; + + + } + + public class OutputTag + { + /* Command */ + public const string Move_Distance = "LLMF.Green.Output.Move_Distance"; + public const string Move = "LLMF.Green.Output.Move"; + public const string Move_OK = "LLMF.Green.Output.Move_OK"; + public const string CameraLight = "LLMF.Green.Output.CameraLight"; + public const string Move_Test = "LLMF.Green.Output.Move_Test"; + public const string ORI = "LLMF.Green.Output.ORI"; + public const string CaptureFail_Right = "LLMF.Green.Output.CaptureFail_Right"; + public const string Start = "LLMF.Green.Output.Start"; + + public const string Manual = "LLMF.Green.Output.Manual"; + public const string qigangjiajin = "LLMF.Green.Output.qigangjiajin"; + public const string qigangsongkai = "LLMF.Green.Output.qigangsongkai"; + public const string guanmen = "LLMF.Green.Output.guanmen"; + public const string kaimen = "LLMF.Green.Output.kaimen"; + public const string huataiqigang = "LLMF.Green.Output.huataiqigang"; + public const string songliao = "LLMF.Green.Output.songliao"; + public const string chuliao = "LLMF.Green.Output.chuliao"; + public const string shoudongdingwei = "LLMF.Green.Output.shoudongdingwei"; + + public const string X_Start = "LLMF.Green.Output.X_Start"; + public const string X_Work = "LLMF.Green.Output.X_Work"; + public const string Z_Start = "LLMF.Green.Output.Z_Start"; + public const string Z_Work = "LLMF.Green.Output.Z_Work"; + + + public const string Move_Distance_left = "LLMF.Left.Output.Move_Distance"; + public const string Move_left = "LLMF.Left.Output.Move"; + public const string Move_OK_left = "LLMF.Left.Output.Move_OK"; + public const string CameraLight_left = "LLMF.Left.Output.CameraLight"; + public const string Move_Test_left = "LLMF.Left.Output.Move_Test"; + public const string ORI_left = "LLMF.Left.Output.ORI"; + public const string CaptureFail_left = "LLMF.Left.Output.CaptureFail_Left"; + public const string Start_left = "LLMF.Left.Output.Start"; + + public const string Manual_left = "LLMF.Left.Output.Manual"; + public const string qigangjiajin_left = "LLMF.Left.Output.qigangjiajin"; + public const string qigangsongkai_left = "LLMF.Left.Output.qigangsongkai"; + public const string guanmen_left = "LLMF.Left.Output.guanmen"; + public const string kaimen_left = "LLMF.Left.Output.kaimen"; + public const string huataiqigang_left = "LLMF.Left.Output.huataiqigang"; + public const string songliao_left = "LLMF.Left.Output.songliao"; + public const string chuliao_left = "LLMF.Left.Output.chuliao"; + public const string shoudongdingwei_left = "LLMF.Left.Output.shoudongdingwei"; + + public const string X_Start_left = "LLMF.Left.Output.X_Start"; + public const string X_Work_left = "LLMF.Left.Output.X_Work"; + public const string Z_Start_left = "LLMF.Left.Output.Z_Start"; + public const string Z_Work_left = "LLMF.Left.Output.Z_Work"; + //Output鏄剧ず + public const string Red = "LLMF.Green.Output.Red"; + public const string Yellow = "LLMF.Green.Output.Yellow"; + public const string Green = "LLMF.Green.Output.Green"; + public const string Buzzer = "LLMF.Green.Output.Buzzer"; + public const string CeBianCylider = "LLMF.Green.Output.CeBianCylider"; + public const string ZhengBianCylider = "LLMF.Green.Output.ZhengBianCylider"; + public const string WuGanCylider = "LLMF.Green.Output.WuGanCylider"; + public const string HuaTaiCylider = "LLMF.Green.Output.HuaTaiCylider"; + public const string SiFuPowerOn = "LLMF.Green.Output.SiFuPowerOn"; + + public const string X_SRV_ON = "LLMF.Green.Output.X_SRV_ON"; + public const string Z_SRV_ON = "LLMF.Green.Output.Z_SRV_ON"; + public const string DingWei_SRV_ON = "LLMF.Green.Output.DingWei_SRV_ON"; + public const string Z_ShaChe = "LLMF.Green.Output.Z_ShaChe"; + public const string ForApple = "LLMF.Green.Output.ForApple"; + public const string CameraLighto = "LLMF.Green.Output.CameraLighto"; + public const string WuGanCylider2 = "LLMF.Green.Output.WuGanCylider2"; + } + + #endregion OPC Tags +} diff --git a/LLMF/Toolkit/OPC.cs b/LLMF/Toolkit/OPC.cs new file mode 100644 index 0000000..8766f6d --- /dev/null +++ b/LLMF/Toolkit/OPC.cs @@ -0,0 +1,483 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Windows.Forms; +using OPCAutomation; +using EventTool; + +namespace LLMF +{ + public class OPC + { + public const int TransIDMainform = 2012; + public const int TransIDSetttings = 2013; + public const int ReadTagNum = 3; + + private OPCServer opcServer; + private OPCGroups opcGroups; + public OPCGroup opcReadGroup; + public OPCGroup opcWriteGroup; + public OPCGroup opcRobotGroup; + + private int itmHandleClient; + private string serverIP; + private string serverName; + private GroupProperty groupProperty; + + public ListenEventCreater listenEventCreater; + + public class Item + { + public string name; + public int clientHandle; + public int serverHandle; + public object value; + public Control control; + public string onText; + public string offText; + + //鎶ヨ鐘舵�� + public AlarmState alarmState; + } + + public Dictionary<string, Item> itemReadDict; + public Dictionary<string, Item> itemWriteDict; + public Dictionary<string, Item> itemRobotDict; + + public OPC(OPCConfig opcConfig) + { + serverIP = opcConfig.serverIP; + serverName = opcConfig.serverName; + itmHandleClient = opcConfig.itmHandleClient; + groupProperty = opcConfig.groupProperty; + } + + public enum AlarmState + { + Ready, + NReady, + Alarm, + Warning + } + + /// <summary> + /// 杩炴帴OPC鏈嶅姟鍣� + /// </summary> + public bool Connect() + { + try + { + opcServer = new OPCServer(); + opcServer.Connect(serverName, serverIP); + if (opcServer.ServerState == (int) OPCServerState.OPCRunning) + { + return true; + } + else + { + return false; + } + } + catch (Exception err) + { + MessageBox.Show("杩炴帴 OPC-Server 鍑虹幇閿欒锛�" + err.Message, "鎻愮ず淇℃伅", MessageBoxButtons.OK, MessageBoxIcon.Warning); + return false; + } + } + + /// <summary> + /// 鍒楀嚭OPC鏈嶅姟鍣ㄤ腑鎵�鏈塗ag 骞跺姞鍏ュ埌opcBrowser涓� + /// </summary> + /// <param name="opcBrowser"></param> + private void RecurBrowse(OPCBrowser opcBrowser) + { + //灞曞紑鍒嗘敮 + opcBrowser.ShowBranches(); + //灞曞紑鍙跺瓙 + opcBrowser.ShowLeafs(true); + // 鍒濆鍖杋tem鍒楄〃 + itemReadDict = new Dictionary<string, Item>(); + itemWriteDict = new Dictionary<string, Item>(); + itemRobotDict = new Dictionary<string, Item>(); + + foreach (object turn in opcBrowser) + { + Item item = new Item(); + + item.name = turn.ToString(); + if (turn.ToString().Contains("Input")) + { + itemReadDict.Add(item.name, item); + } + else if (turn.ToString().Contains("Output")) + { + itemWriteDict.Add(item.name, item); + } + } + } + + /// <summary> + /// 鏁版嵁鏀瑰彉鏃惰繍琛� + /// </summary> + /// <param name="TransactionID"></param> + /// <param name="NumItems"></param> + /// <param name="ClientHandles"></param> + /// <param name="ItemValues"></param> + /// <param name="Qualities"></param> + /// <param name="TimeStamps"></param> + private void opcReadGroup_DataChange(int TransactionID, int NumItems, ref Array ClientHandles, ref Array ItemValues, ref Array Qualities, ref Array TimeStamps) + { + for (int i = 1; i <= NumItems; i++) + { + foreach (Item item in itemReadDict.Values) + { + if (item.clientHandle == Convert.ToInt32(ClientHandles.GetValue(i))) + { + itemReadDict[item.name].value = Convert.ToInt32(ItemValues.GetValue(i)); + string state = item.name; // 鏀瑰彉鐨刬tem鐨勫悕绉� + item.value = ItemValues.GetValue(i); + listenEventCreater.ChangeValue(new EventData(item)); + switch (state) + { + + //I/O鐣岄潰杈撳叆鏄剧ず + case InputTag.X_JinDian: + case InputTag.Z_JinDian: + + case InputTag.X_CW: + case InputTag.X_CCW: + case InputTag.Z_CW: + case InputTag.Z_CCW: + case InputTag.DingWei_CW: + case InputTag.DingWei_CCW: + case InputTag.DingWei_JinDian: + + case InputTag.Reset: + + + case InputTag.OpenJieJin: + case InputTag.CeBianQian: + case InputTag.CeBianHou: + case InputTag.WuGanQian: + case InputTag.WuGanHou: + SignalSensorAndElse(item,true); + break; //浼犳劅鍣ㄣ�佽酱鍜屽叾浠栦俊鍙� + case InputTag.Start1: + case InputTag.Start2: + SignalSensorAndElse(item, false); + break; //浼犳劅鍣ㄣ�佽酱鍜屽叾浠栦俊鍙� + case InputTag.X_Alarm: + case InputTag.Z_Alarm: + case InputTag.E_Stop: + case InputTag.SafeCurtain: + case InputTag.DingWei_Alarm: + SignalAlarm(item); + break; //鎶ヨ淇″彿 + + } + } + } + } + } + public void SignalSensorAndElse(Item item, bool IsPlus) + { + if (item.control != null) + { + if (IsPlus) + { + if (Convert.ToBoolean(item.value)) + { + item.control.BackColor = System.Drawing.Color.Green; + } + else + { + item.control.BackColor = System.Drawing.Color.Gray; + } + } + else + { + if (Convert.ToBoolean(item.value)) + { + item.control.BackColor = System.Drawing.Color.Gray; + } + else + { + item.control.BackColor = System.Drawing.Color.Green; + } + + } + } + } + public void SignalAlarm(Item item) + { + if (item.control != null) + { + + if (Convert.ToBoolean(item.value)) + { + item.control.BackColor = System.Drawing.Color.Gray; + } + else + { + item.control.BackColor = System.Drawing.Color.Red; + } + } + + } + private void opcRobotGroup_DataChange(int TransactionID, int NumItems, ref Array ClientHandles, ref Array ItemValues, ref Array Qualities, ref Array TimeStamps) + { + for (int i = 1; i <= NumItems; i++) + { + foreach (Item item in itemRobotDict.Values) + { + if (item.clientHandle == Convert.ToInt32(ClientHandles.GetValue(i))) + { + itemRobotDict[item.name].value = Convert.ToInt32(ItemValues.GetValue(i)); + string state = item.name; // 鏀瑰彉鐨刬tem鐨勫悕绉� + item.value = ItemValues.GetValue(i); + listenEventCreater.ChangeValue(new EventData(item)); + } + } + } + } + + private void opcWriteGroup_DataChange(int TransactionID, int NumItems, ref Array ClientHandles, ref Array ItemValues, ref Array Qualities, ref Array TimeStamps) + { + for (int i = 1; i <= NumItems; i++) + { + foreach (Item item in itemWriteDict.Values) + { + if (item.clientHandle == Convert.ToInt32(ClientHandles.GetValue(i))) + { + itemWriteDict[item.name].value = Convert.ToInt32(ItemValues.GetValue(i)); + item.value = ItemValues.GetValue(i); + listenEventCreater.ChangeValue(new EventData(item)); + string state = item.name; // 鏀瑰彉鐨刬tem鐨勫悕绉� + switch (state) + { + //I/O鐣岄潰杈撳嚭鏄剧ず + case OutputTag.Red: + case OutputTag.Yellow: + case OutputTag.Green: + case OutputTag.Buzzer: + case OutputTag.CeBianCylider: + case OutputTag.ZhengBianCylider: + case OutputTag.WuGanCylider: + case OutputTag.HuaTaiCylider +: + case OutputTag.SiFuPowerOn: + case OutputTag.X_SRV_ON: + case OutputTag.Z_SRV_ON: + case OutputTag.DingWei_SRV_ON +: + + case OutputTag.Z_ShaChe: + case OutputTag.ForApple +: + case OutputTag.CameraLighto: + case OutputTag.WuGanCylider2: + + SignalSensorAndElse(item, true); + break; + } + + } + } + } + + } + + /// <summary> + /// 鍒涘缓Group + /// </summary> + /// <returns></returns> + public bool CreateGroup() + { + try + { + OPCBrowser browser = opcServer.CreateBrowser(); + RecurBrowse(browser); // 寤虹珛璇诲瓧鍏稿拰鍐欏瓧鍏� + + opcGroups = opcServer.OPCGroups; + opcReadGroup = opcGroups.Add("ReadGroup"); + opcWriteGroup = opcGroups.Add("WriteGroup"); + opcRobotGroup = opcGroups.Add("RobotGroup"); + + /* 璁剧疆鐩戝惉鐩稿叧灞炴�� */ + SetGroupProperty(opcReadGroup); + SetGroupProperty(opcWriteGroup); + SetGroupProperty(opcRobotGroup); + + listenEventCreater = new ListenEventCreater(); // 鍒濆鍖栫洃鍚� + opcReadGroup.DataChange += new DIOPCGroupEvent_DataChangeEventHandler(opcReadGroup_DataChange); // 璇诲尯鍩熸暟鎹彉鍖� + opcWriteGroup.DataChange += new DIOPCGroupEvent_DataChangeEventHandler(opcWriteGroup_DataChange); // 鍐欏尯鍩熸暟鎹彉鍖� + + /* 璁剧疆handles */ + SetHandles(opcReadGroup, itemReadDict); + SetHandles(opcWriteGroup, itemWriteDict); + } + catch (Exception err) + { + MessageBox.Show("鍒涘缓缁勫嚭鐜伴敊璇細" + err.Message, "鎻愮ず淇℃伅", MessageBoxButtons.OK, MessageBoxIcon.Warning); + return false; + } + return true; + } + + + /// <summary> + /// 璁剧疆灞炴�� + /// </summary> + private void SetGroupProperty(OPCGroup opcGroup) + { + opcServer.OPCGroups.DefaultGroupIsActive = groupProperty.defaultGroupIsActive; + opcServer.OPCGroups.DefaultGroupDeadband = groupProperty.defaultGroupDeadband; + opcGroup.UpdateRate = groupProperty.updateRate; + opcGroup.IsActive = groupProperty.isActive; + opcGroup.IsSubscribed = groupProperty.isSubscribed; + } + + /// <summary> + /// 璁剧疆ClientHandles鍜孲erverHandles + /// </summary> + /// <param name="opcGroup"></param> + /// <returns></returns> + public bool SetHandles(OPCGroup opcGroup, Dictionary<string, Item> itemDict) + { + + OPCItems opcItems; + OPCItem opcItem; + + opcItems = opcGroup.OPCItems; + + foreach (var item in itemDict.Values) + { + item.clientHandle = itmHandleClient; + itmHandleClient++; + opcItem = opcItems.AddItem(item.name, item.clientHandle); + item.serverHandle = opcItem.ServerHandle; + } + + return true; + } + + /// <summary> + /// 寮傛鍐� + /// </summary> + /// <param name="name"></param> + /// <param name="value"></param> + /// <returns></returns> + public bool Write(string name, object value) + { + Array serverHandles = new int[2] { 0, itemWriteDict[name].serverHandle}; + Array values; // = new object[2] { "", value.ToString()}; + Array Errors; + int cancelID; + + values = new object[2] { "", value.ToString()}; + + opcWriteGroup.AsyncWrite(1, ref serverHandles, ref values, out Errors, TransIDMainform, out cancelID); + //KepItem.Write(txtWriteTagValue.Text);//杩欏彞涔熷彲浠ュ啓鍏ワ紝浣嗗苟涓嶈Е鍙戝啓鍏ヤ簨浠� + + GC.Collect(); + + return true; + } + + public bool Write(string name, object value, ref string warning) + { + Array serverHandles = new int[2] { 0, itemWriteDict[name].serverHandle }; + Array values = new object[2] { "", value.ToString() }; + Array Errors; + int cancelID; + + try + { + opcWriteGroup.AsyncWrite(1, ref serverHandles, ref values, out Errors, TransIDMainform, out cancelID); + //KepItem.Write(txtWriteTagValue.Text);//杩欏彞涔熷彲浠ュ啓鍏ワ紝浣嗗苟涓嶈Е鍙戝啓鍏ヤ簨浠� + } + catch (Exception e) + { + warning = e.Message; + + GC.Collect(); + return false; + } + + GC.Collect(); + return true; + } + + public bool Write(OPCGroup group, int handle, object value, ref string warning) + { + Array serverHandles = new int[2] { 0, handle }; + Array values = new object[2] { "", value.ToString() }; + Array Errors; + int cancelID; + + try + { + group.AsyncWrite(1, ref serverHandles, ref values, out Errors, TransIDMainform, out cancelID); + //KepItem.Write(txtWriteTagValue.Text);//杩欏彞涔熷彲浠ュ啓鍏ワ紝浣嗗苟涓嶈Е鍙戝啓鍏ヤ簨浠� + } + catch (Exception e) + { + warning = e.Message; + + GC.Collect(); + return false; + } + + GC.Collect(); + return true; + } + + public bool ReadOneItem_Wrapper(string name, ref object result) + { + Item item; + + if (itemReadDict.ContainsKey(name)) + { + item = itemReadDict[name]; + ReadOneItem(ref item, opcReadGroup); + result = item.value; + itemReadDict[name].value = result; + } + else if (itemWriteDict.ContainsKey(name)) + { + item = itemWriteDict[name]; + ReadOneItem(ref item, opcWriteGroup); + result = item.value; + itemWriteDict[name].value = result; + } + else + { + return false; + } + + return true; + } + + public bool ReadOneItem(ref Item item, OPCGroup opcGroup) + { + Array serverHandles; + Array values; + Array errors; + object qualities; + object timeStamps; + + serverHandles = new int[2] { 0, item.serverHandle }; + opcGroup.SyncRead(1, 1, ref serverHandles, out values, out errors, out qualities, out timeStamps); + item.value = values.GetValue(1); + + GC.Collect(); + + return true; + } + + internal void Close() + { + opcServer.Disconnect(); + } + + } +} diff --git a/LLMF/Toolkit/StarterTool.cs b/LLMF/Toolkit/StarterTool.cs new file mode 100644 index 0000000..beef772 --- /dev/null +++ b/LLMF/Toolkit/StarterTool.cs @@ -0,0 +1,33 @@ +锘縰sing System.Diagnostics; +using System.Threading; + +namespace LLMF +{ + public class StarterTool + { + public static bool IsExistMutex(string mutexName, out Mutex mutex) + { + bool flag; + mutex = new Mutex(true, mutexName, out flag); + return !flag; + } + + public static bool IsSingle() + { + return (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length <= 1); + } + + public static void PowerWait(string[] args) + { + if ((((args != null) && (args.Length > 1)) && args[0].ToUpper().Equals("-S")) && (args[1] != null)) + { + int result = 0; + if (int.TryParse(args[1], out result) && (result > 0)) + { + Thread.Sleep((int) (result * 0x3e8)); + } + } + } + } +} + diff --git a/LLMF/WelcomeUser.Designer.cs b/LLMF/WelcomeUser.Designer.cs new file mode 100644 index 0000000..18aca2b --- /dev/null +++ b/LLMF/WelcomeUser.Designer.cs @@ -0,0 +1,66 @@ +锘縩amespace LLMF +{ + partial class WelcomeUser + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WelcomeUser)); + this.label1 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("瀹嬩綋", 21.75F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label1.ForeColor = System.Drawing.Color.Red; + this.label1.Location = new System.Drawing.Point(23, 196); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(403, 29); + this.label1.TabIndex = 0; + this.label1.Text = "绋嬪簭姝e湪鍚姩涓紝璇风◢鍚庘�︹��"; + // + // WelcomeUser + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); + this.ClientSize = new System.Drawing.Size(449, 323); + this.Controls.Add(this.label1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "WelcomeUser"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "WelcomeUser"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + } +} \ No newline at end of file diff --git a/LLMF/WelcomeUser.cs b/LLMF/WelcomeUser.cs new file mode 100644 index 0000000..85e010c --- /dev/null +++ b/LLMF/WelcomeUser.cs @@ -0,0 +1,19 @@ +锘縰sing System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace LLMF +{ + public partial class WelcomeUser : Form + { + public WelcomeUser() + { + InitializeComponent(); + } + } +} diff --git a/LLMF/WelcomeUser.resx b/LLMF/WelcomeUser.resx new file mode 100644 index 0000000..e15616d --- /dev/null +++ b/LLMF/WelcomeUser.resx @@ -0,0 +1,2544 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="$this.BackgroundImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAAcEAAAFSCAYAAACKSWQFAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAP+lSURBVHhe7N0J+LZ/Ptf/icwoY5vBzBjGTIYWskSmolAU + kkqlUpFKCZG0KK2islb2CK3aUURFlkpaaFNZWmhRaCfRenU8rv/x/B2v/9n3Xn/f+/597999XcdxHue1 + nNe5fD7v9/v13j/POF1elxG4jMBlBC4jcBmBx3QEnvGYPvflsS8jcBmBywhcRuAyAqcLCF6I4DICtxiB + //N//s/5l/b//b//98tYXUbgMgJPsxG4gODTbEIvj/PkR+B//a//9QTw/e///b9P//N//s8nPj/5s1/O + cBmBywjcpBG4gOBNmo3LvTylI/Dd3/3dp//6X//r6d/9u393+gf/4B+cvvIrv/K8/et//a/PIPif//N/ + Pn3zN3/z6Tu+4zue0vu8XPwyApcRuL4RuIDg9Y3l5UyP2Ah813d91+mbvumbTn/tr/210+d//uef/uJf + /Iunv/7X//oZAD/lUz7l9Cf/5J88ffmXf/kZ/L7kS77k9PEf//Hn7/zOQry8LiNwGYFHfwQuIPjoz+Fj + /QQstGJ13he/49Lc13/7b//t9C//5b88fd3Xfd3pC7/wC09/4k/8idPv//2///SH/tAfOv2xP/bHTp/9 + 2Z99+kt/6S+dAe57vud7Tl/7tV97+qzP+qwzKALLb/u2bzt92qd92ukv/IW/cP79n//zf3764i/+4vP/ + gef3fu/3ni/X9R/rSbk8/GUEHqERuIDgIzRZl1v9f0dAvG5fQAhI/Zt/829Of/tv/+0zQH3u537u6Q// + 4T98+gN/4A+cQeuP//E/fga+L/3SLz194zd+4+k//af/dAZGQAj0/u2//bfnc/yzf/bPTv/+3//703/8 + j//xvP2H//Afzp/tv/M7v/MMosDUb9yovY4AfJm3ywhcRuDmjsAFBG/u3Fzu7DACa2Wtxcddya35VV/1 + Vac/9af+1Bn0AJQ9sPsjf+SPnN9zZQJA7x0HBP/e3/t7Z0ADYt7/q3/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+ pygfOyF/OqEs4C0zW4AL3Nxnwaw1XZmHVrtsQN4CtVsmyVNLz9SZQPB/B/+ytMBvhc05X/aYANrjpzCM + xQRksaCTgQVgJ0vyH+B0PHCKmQGUAKZzTyAL5EqOCsjkjLPdfUDJ/8yXtu7tevs7VpZxW+8RIG6ZlOsE + 2ADYNsBU5srb1nNjmX6r096t+9ofi+z5gfMqAykEy0K3rgP1FIZ9h37b9p7dT12tMtA5+86eiTnvffa3 + unXf6rO62Lb27rH3wHQB9THgvtU3Gwsx1BNot//HKHf8BLD2NVe9lo5MzgGoc2KoJ8PcaYkckhrjOSLF + IJvHfGyqZJ2Dml/cfSvHVvlfK9iuBY4lng49JyCSxZlW264Px8kaw4XHWOCHOtr8N/wxDaAmQA/zAAAA + AElFTkSuQmCC +</value> + </data> +</root> \ No newline at end of file diff --git a/LLMF/app.config b/LLMF/app.config new file mode 100644 index 0000000..c5e1dae --- /dev/null +++ b/LLMF/app.config @@ -0,0 +1,3 @@ +<?xml version="1.0"?> +<configuration> +<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration> diff --git a/LLMF/frmConfig.Designer.cs b/LLMF/frmConfig.Designer.cs new file mode 100644 index 0000000..ea4e442 --- /dev/null +++ b/LLMF/frmConfig.Designer.cs @@ -0,0 +1,421 @@ +锘縩amespace LLMF +{ + partial class frmConfig + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.btnSet = new System.Windows.Forms.Button(); + this.txtConfigPulsePerDegree = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.txtConfigCalAngle = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.txtConfigMaxAngle = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.txtConfigMinAngle = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.txtZwork_Read = new System.Windows.Forms.TextBox(); + this.txtZstart_Read = new System.Windows.Forms.TextBox(); + this.btnZwork = new System.Windows.Forms.Button(); + this.btnZstart = new System.Windows.Forms.Button(); + this.txtZwork = new System.Windows.Forms.TextBox(); + this.txtZstart = new System.Windows.Forms.TextBox(); + this.label8 = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.txtXwork_Read = new System.Windows.Forms.TextBox(); + this.txtXstart_Read = new System.Windows.Forms.TextBox(); + this.btnXwork = new System.Windows.Forms.Button(); + this.btnXstart = new System.Windows.Forms.Button(); + this.txtXwork = new System.Windows.Forms.TextBox(); + this.txtXstart = new System.Windows.Forms.TextBox(); + this.label6 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.tabControl1.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.tabPage2.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // tabControl1 + // + this.tabControl1.Controls.Add(this.tabPage1); + this.tabControl1.Controls.Add(this.tabPage2); + this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControl1.Location = new System.Drawing.Point(0, 0); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(257, 316); + this.tabControl1.TabIndex = 0; + // + // tabPage1 + // + this.tabPage1.Controls.Add(this.btnSet); + this.tabPage1.Controls.Add(this.txtConfigPulsePerDegree); + this.tabPage1.Controls.Add(this.label4); + this.tabPage1.Controls.Add(this.txtConfigCalAngle); + this.tabPage1.Controls.Add(this.label3); + this.tabPage1.Controls.Add(this.txtConfigMaxAngle); + this.tabPage1.Controls.Add(this.label2); + this.tabPage1.Controls.Add(this.txtConfigMinAngle); + this.tabPage1.Controls.Add(this.label1); + this.tabPage1.Location = new System.Drawing.Point(4, 22); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(249, 290); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "鍙傛暟"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // btnSet + // + this.btnSet.Location = new System.Drawing.Point(167, 353); + this.btnSet.Name = "btnSet"; + this.btnSet.Size = new System.Drawing.Size(61, 38); + this.btnSet.TabIndex = 8; + this.btnSet.Text = "璁惧畾"; + this.btnSet.UseVisualStyleBackColor = true; + this.btnSet.Click += new System.EventHandler(this.btnSet_Click); + // + // txtConfigPulsePerDegree + // + this.txtConfigPulsePerDegree.Location = new System.Drawing.Point(128, 150); + this.txtConfigPulsePerDegree.Name = "txtConfigPulsePerDegree"; + this.txtConfigPulsePerDegree.Size = new System.Drawing.Size(100, 21); + this.txtConfigPulsePerDegree.TabIndex = 7; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(23, 150); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(77, 12); + this.label4.TabIndex = 6; + this.label4.Text = "姣徛扮殑鑴夊啿鏁�"; + // + // txtConfigCalAngle + // + this.txtConfigCalAngle.Location = new System.Drawing.Point(128, 107); + this.txtConfigCalAngle.Name = "txtConfigCalAngle"; + this.txtConfigCalAngle.Size = new System.Drawing.Size(100, 21); + this.txtConfigCalAngle.TabIndex = 5; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(23, 110); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(53, 12); + this.label3.TabIndex = 4; + this.label3.Text = "鏍囧畾瑙掑害"; + // + // txtConfigMaxAngle + // + this.txtConfigMaxAngle.Location = new System.Drawing.Point(128, 65); + this.txtConfigMaxAngle.Name = "txtConfigMaxAngle"; + this.txtConfigMaxAngle.Size = new System.Drawing.Size(100, 21); + this.txtConfigMaxAngle.TabIndex = 3; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(23, 68); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(53, 12); + this.label2.TabIndex = 2; + this.label2.Text = "鏈�澶ц搴�"; + // + // txtConfigMinAngle + // + this.txtConfigMinAngle.Location = new System.Drawing.Point(128, 22); + this.txtConfigMinAngle.Name = "txtConfigMinAngle"; + this.txtConfigMinAngle.Size = new System.Drawing.Size(100, 21); + this.txtConfigMinAngle.TabIndex = 1; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(23, 25); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(53, 12); + this.label1.TabIndex = 0; + this.label1.Text = "鏈�灏忚搴�"; + // + // tabPage2 + // + this.tabPage2.Controls.Add(this.groupBox2); + this.tabPage2.Controls.Add(this.groupBox1); + this.tabPage2.Location = new System.Drawing.Point(4, 22); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(249, 290); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "PLC"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.txtZwork_Read); + this.groupBox2.Controls.Add(this.txtZstart_Read); + this.groupBox2.Controls.Add(this.btnZwork); + this.groupBox2.Controls.Add(this.btnZstart); + this.groupBox2.Controls.Add(this.txtZwork); + this.groupBox2.Controls.Add(this.txtZstart); + this.groupBox2.Controls.Add(this.label8); + this.groupBox2.Controls.Add(this.label7); + this.groupBox2.Location = new System.Drawing.Point(7, 138); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(225, 138); + this.groupBox2.TabIndex = 17; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Z杞�"; + // + // txtZwork_Read + // + this.txtZwork_Read.Location = new System.Drawing.Point(81, 64); + this.txtZwork_Read.Name = "txtZwork_Read"; + this.txtZwork_Read.ReadOnly = true; + this.txtZwork_Read.Size = new System.Drawing.Size(73, 21); + this.txtZwork_Read.TabIndex = 15; + this.txtZwork_Read.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // txtZstart_Read + // + this.txtZstart_Read.Location = new System.Drawing.Point(81, 16); + this.txtZstart_Read.Name = "txtZstart_Read"; + this.txtZstart_Read.ReadOnly = true; + this.txtZstart_Read.Size = new System.Drawing.Size(73, 21); + this.txtZstart_Read.TabIndex = 14; + this.txtZstart_Read.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // btnZwork + // + this.btnZwork.Location = new System.Drawing.Point(160, 84); + this.btnZwork.Name = "btnZwork"; + this.btnZwork.Size = new System.Drawing.Size(52, 21); + this.btnZwork.TabIndex = 11; + this.btnZwork.Text = "璁惧畾"; + this.btnZwork.UseVisualStyleBackColor = true; + this.btnZwork.Click += new System.EventHandler(this.btnZwork_Click); + // + // btnZstart + // + this.btnZstart.Location = new System.Drawing.Point(160, 38); + this.btnZstart.Name = "btnZstart"; + this.btnZstart.Size = new System.Drawing.Size(52, 21); + this.btnZstart.TabIndex = 10; + this.btnZstart.Text = "璁惧畾"; + this.btnZstart.UseVisualStyleBackColor = true; + this.btnZstart.Click += new System.EventHandler(this.btnZstart_Click); + // + // txtZwork + // + this.txtZwork.Location = new System.Drawing.Point(81, 88); + this.txtZwork.Name = "txtZwork"; + this.txtZwork.Size = new System.Drawing.Size(73, 21); + this.txtZwork.TabIndex = 7; + this.txtZwork.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // txtZstart + // + this.txtZstart.Location = new System.Drawing.Point(81, 40); + this.txtZstart.Name = "txtZstart"; + this.txtZstart.Size = new System.Drawing.Size(73, 21); + this.txtZstart.TabIndex = 6; + this.txtZstart.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(1, 66); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(71, 12); + this.label8.TabIndex = 3; + this.label8.Text = "Z杞村伐浣滀綅缃�"; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(1, 18); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(71, 12); + this.label7.TabIndex = 2; + this.label7.Text = "Z杞村垵濮嬩綅缃�"; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.txtXwork_Read); + this.groupBox1.Controls.Add(this.txtXstart_Read); + this.groupBox1.Controls.Add(this.btnXwork); + this.groupBox1.Controls.Add(this.btnXstart); + this.groupBox1.Controls.Add(this.txtXwork); + this.groupBox1.Controls.Add(this.txtXstart); + this.groupBox1.Controls.Add(this.label6); + this.groupBox1.Controls.Add(this.label5); + this.groupBox1.Location = new System.Drawing.Point(8, 13); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(225, 117); + this.groupBox1.TabIndex = 16; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "X杞�"; + // + // txtXwork_Read + // + this.txtXwork_Read.Location = new System.Drawing.Point(86, 60); + this.txtXwork_Read.Name = "txtXwork_Read"; + this.txtXwork_Read.ReadOnly = true; + this.txtXwork_Read.Size = new System.Drawing.Size(73, 21); + this.txtXwork_Read.TabIndex = 13; + this.txtXwork_Read.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // txtXstart_Read + // + this.txtXstart_Read.Location = new System.Drawing.Point(86, 12); + this.txtXstart_Read.Name = "txtXstart_Read"; + this.txtXstart_Read.ReadOnly = true; + this.txtXstart_Read.Size = new System.Drawing.Size(73, 21); + this.txtXstart_Read.TabIndex = 12; + this.txtXstart_Read.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // btnXwork + // + this.btnXwork.Location = new System.Drawing.Point(165, 82); + this.btnXwork.Name = "btnXwork"; + this.btnXwork.Size = new System.Drawing.Size(52, 21); + this.btnXwork.TabIndex = 9; + this.btnXwork.Text = "璁惧畾"; + this.btnXwork.UseVisualStyleBackColor = true; + this.btnXwork.Click += new System.EventHandler(this.btnXwork_Click); + // + // btnXstart + // + this.btnXstart.Location = new System.Drawing.Point(165, 34); + this.btnXstart.Name = "btnXstart"; + this.btnXstart.Size = new System.Drawing.Size(52, 21); + this.btnXstart.TabIndex = 8; + this.btnXstart.Text = "璁惧畾"; + this.btnXstart.UseVisualStyleBackColor = true; + this.btnXstart.Click += new System.EventHandler(this.btnXstart_Click); + // + // txtXwork + // + this.txtXwork.Location = new System.Drawing.Point(86, 84); + this.txtXwork.Name = "txtXwork"; + this.txtXwork.Size = new System.Drawing.Size(73, 21); + this.txtXwork.TabIndex = 5; + this.txtXwork.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // txtXstart + // + this.txtXstart.Location = new System.Drawing.Point(86, 36); + this.txtXstart.Name = "txtXstart"; + this.txtXstart.Size = new System.Drawing.Size(73, 21); + this.txtXstart.TabIndex = 4; + this.txtXstart.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(6, 63); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(71, 12); + this.label6.TabIndex = 1; + this.label6.Text = "X杞村伐浣滀綅缃�"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(6, 15); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(71, 12); + this.label5.TabIndex = 0; + this.label5.Text = "X杞村垵濮嬩綅缃�"; + // + // frmConfig + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(257, 316); + this.Controls.Add(this.tabControl1); + this.MaximizeBox = false; + this.MaximumSize = new System.Drawing.Size(273, 354); + this.MinimizeBox = false; + this.MinimumSize = new System.Drawing.Size(273, 354); + this.Name = "frmConfig"; + this.Text = "frmConfig"; + this.Load += new System.EventHandler(this.frmConfig_Load); + this.tabControl1.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); + this.tabPage1.PerformLayout(); + this.tabPage2.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox txtConfigMaxAngle; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox txtConfigMinAngle; + private System.Windows.Forms.TextBox txtConfigCalAngle; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox txtConfigPulsePerDegree; + private System.Windows.Forms.Button btnSet; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.TextBox txtZwork; + private System.Windows.Forms.TextBox txtZstart; + private System.Windows.Forms.TextBox txtXwork; + private System.Windows.Forms.TextBox txtXstart; + private System.Windows.Forms.Button btnZwork; + private System.Windows.Forms.Button btnZstart; + private System.Windows.Forms.Button btnXwork; + private System.Windows.Forms.Button btnXstart; + private System.Windows.Forms.TextBox txtZwork_Read; + private System.Windows.Forms.TextBox txtZstart_Read; + private System.Windows.Forms.TextBox txtXwork_Read; + private System.Windows.Forms.TextBox txtXstart_Read; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.GroupBox groupBox1; + + } +} \ No newline at end of file diff --git a/LLMF/frmConfig.cs b/LLMF/frmConfig.cs new file mode 100644 index 0000000..d793671 --- /dev/null +++ b/LLMF/frmConfig.cs @@ -0,0 +1,188 @@ +锘縰sing System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using ToolKit.FileToolkit; + +namespace LLMF +{ + public partial class frmConfig : Form + { + OPC opc; + ConfigStruct config; + SerializeFileTool<ConfigStruct> sft = new SerializeFileTool<ConfigStruct>(); + string configPath = Application.StartupPath + "\\Config.xml"; + + string leftORright; + + public frmConfig(OPC opc,ConfigStruct config,string leftORright) + { + InitializeComponent(); + this.opc = opc; + this.config = config; + this.leftORright = leftORright; + } + + private void frmConfig_Load(object sender, EventArgs e) + { + this.txtConfigCalAngle.Text = config.calAngle.ToString(); + this.txtConfigMaxAngle.Text = config.maxAngle.ToString(); + this.txtConfigMinAngle.Text = config.minAngle.ToString(); + this.txtConfigPulsePerDegree.Text = config.pulsePerDegree.ToString(); + + //if (this.leftORright == "Left") + //{ + // object m_X_Start_left = null; + // opc.ReadOneItem_Wrapper(OutputTag.X_Start_left, ref m_X_Start_left); + // this.txtXstart_Read.Text = m_X_Start_left.ToString(); + + // object m_X_Work_left = null; + // opc.ReadOneItem_Wrapper(OutputTag.X_Work_left, ref m_X_Work_left); + // this.txtXwork_Read.Text = m_X_Work_left.ToString(); + + // object m_Z_Start_left = null; + // opc.ReadOneItem_Wrapper(OutputTag.Z_Start_left, ref m_Z_Start_left); + // this.txtZstart_Read.Text = m_Z_Start_left.ToString(); + + // object m_Z_Work_left = null; + // opc.ReadOneItem_Wrapper(OutputTag.Z_Work_left, ref m_Z_Work_left); + // this.txtZwork_Read.Text = m_Z_Work_left.ToString(); + //} + if (this.leftORright == "Right") + { + object m_X_Start = null; + opc.ReadOneItem_Wrapper(OutputTag.X_Start, ref m_X_Start); + this.txtXstart_Read.Text = m_X_Start.ToString(); + + object m_X_Work = null; + opc.ReadOneItem_Wrapper(OutputTag.X_Work, ref m_X_Work); + this.txtXwork_Read.Text = m_X_Work.ToString(); + + object m_Z_Start = null; + opc.ReadOneItem_Wrapper(OutputTag.Z_Start, ref m_Z_Start); + this.txtZstart_Read.Text = m_Z_Start.ToString(); + + object m_Z_Work = null; + opc.ReadOneItem_Wrapper(OutputTag.Z_Work, ref m_Z_Work); + this.txtZwork_Read.Text = m_Z_Work.ToString(); + } + } + + private void btnSet_Click(object sender, EventArgs e) + { + try + { + config.calAngle = Convert.ToDouble(txtConfigCalAngle.Text); + config.maxAngle = Convert.ToDouble(txtConfigMaxAngle.Text); + config.minAngle = Convert.ToDouble(txtConfigMinAngle.Text); + config.pulsePerDegree = Convert.ToInt32(txtConfigPulsePerDegree.Text); + + sft.SetConfig(configPath, config); + } + catch (Exception ex) + { + MessageBox.Show("鍙傛暟鏈夐棶棰橈紝璇锋鏌�"); + } + } + + private void btnXstart_Click(object sender, EventArgs e) + { + if (this.leftORright == "Left") + { + int tmpD = Convert.ToInt32(this.txtXstart.Text.Trim()); + opc.Write(OutputTag.X_Start_left, tmpD); + System.Threading.Thread.Sleep(200); + object m_X_Start_left = null; + opc.ReadOneItem_Wrapper(OutputTag.X_Start_left, ref m_X_Start_left); + this.txtXstart_Read.Text = m_X_Start_left.ToString(); + } + else if (this.leftORright == "Right") + { + int tmpD = Convert.ToInt32(this.txtXstart.Text.Trim()); + opc.Write(OutputTag.X_Start, tmpD); + System.Threading.Thread.Sleep(200); + object m_X_Start = null; + opc.ReadOneItem_Wrapper(OutputTag.X_Start, ref m_X_Start); + this.txtXstart_Read.Text = m_X_Start.ToString(); + } + + this.Refresh(); + } + + private void btnXwork_Click(object sender, EventArgs e) + { + if (this.leftORright == "Left") + { + int tmpD = Convert.ToInt32(this.txtXwork.Text.Trim()); + opc.Write(OutputTag.X_Work_left, tmpD); + System.Threading.Thread.Sleep(200); + object m_X_Work_left = null; + opc.ReadOneItem_Wrapper(OutputTag.X_Work_left, ref m_X_Work_left); + this.txtXwork_Read.Text = m_X_Work_left.ToString(); + } + else if (this.leftORright == "Right") + { + int tmpD = Convert.ToInt32(this.txtXwork.Text.Trim()); + opc.Write(OutputTag.X_Work, tmpD); + System.Threading.Thread.Sleep(200); + object m_X_Work = null; + opc.ReadOneItem_Wrapper(OutputTag.X_Work, ref m_X_Work); + this.txtXwork_Read.Text = m_X_Work.ToString(); + } + + this.Refresh(); + } + + private void btnZstart_Click(object sender, EventArgs e) + { + if (this.leftORright == "Left") + { + int tmpD = Convert.ToInt32(this.txtZstart.Text.Trim()); + opc.Write(OutputTag.Z_Start_left, tmpD); + System.Threading.Thread.Sleep(200); + object m_Z_Start_left = null; + opc.ReadOneItem_Wrapper(OutputTag.Z_Start_left, ref m_Z_Start_left); + this.txtZstart_Read.Text = m_Z_Start_left.ToString(); + } + else if (this.leftORright == "Right") + { + int tmpD = Convert.ToInt32(this.txtZstart.Text.Trim()); + opc.Write(OutputTag.Z_Start, tmpD); + System.Threading.Thread.Sleep(200); + object m_Z_Start = null; + opc.ReadOneItem_Wrapper(OutputTag.Z_Start, ref m_Z_Start); + this.txtZstart_Read.Text = m_Z_Start.ToString(); + } + + this.Refresh(); + } + + private void btnZwork_Click(object sender, EventArgs e) + { + if (this.leftORright == "Left") + { + int tmpD = Convert.ToInt32(this.txtZwork.Text.Trim()); + opc.Write(OutputTag.Z_Work_left, tmpD); + System.Threading.Thread.Sleep(200); + object m_Z_Work_left = null; + opc.ReadOneItem_Wrapper(OutputTag.Z_Work_left, ref m_Z_Work_left); + this.txtZwork_Read.Text = m_Z_Work_left.ToString(); + } + else if (this.leftORright == "Right") + { + int tmpD = Convert.ToInt32(this.txtZwork.Text.Trim()); + opc.Write(OutputTag.Z_Work, tmpD); + System.Threading.Thread.Sleep(200); + object m_Z_Work = null; + opc.ReadOneItem_Wrapper(OutputTag.Z_Work, ref m_Z_Work); + this.txtZwork_Read.Text = m_Z_Work.ToString(); + } + + this.Refresh(); + } + } +} diff --git a/LLMF/frmConfig.resx b/LLMF/frmConfig.resx new file mode 100644 index 0000000..19dc0dd --- /dev/null +++ b/LLMF/frmConfig.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/LLMF/frmMain.Designer.cs b/LLMF/frmMain.Designer.cs new file mode 100644 index 0000000..2315594 --- /dev/null +++ b/LLMF/frmMain.Designer.cs @@ -0,0 +1,2096 @@ +锘縩amespace LLMF +{ + partial class frmMain + { + /// <summary> + /// 蹇呴渶鐨勮璁″櫒鍙橀噺銆� + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// 娓呯悊鎵�鏈夋鍦ㄤ娇鐢ㄧ殑璧勬簮銆� + /// </summary> + /// <param name="disposing">濡傛灉搴旈噴鏀炬墭绠¤祫婧愶紝涓� true锛涘惁鍒欎负 false銆�</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows 绐椾綋璁捐鍣ㄧ敓鎴愮殑浠g爜 + + /// <summary> + /// 璁捐鍣ㄦ敮鎸佹墍闇�鐨勬柟娉� - 涓嶈 + /// 浣跨敤浠g爜缂栬緫鍣ㄤ慨鏀规鏂规硶鐨勫唴瀹广�� + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain)); + this.statusStrip1 = new System.Windows.Forms.StatusStrip(); + this.tsslOPC = new System.Windows.Forms.ToolStripStatusLabel(); + this.tsllPositionlabel = new System.Windows.Forms.ToolStripStatusLabel(); + this.tsslPosition_left = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel3 = new System.Windows.Forms.ToolStripStatusLabel(); + this.tsslAlarm_Left = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel(); + this.tsslPosition = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); + this.tsslAlarm = new System.Windows.Forms.ToolStripStatusLabel(); + this.panel1 = new System.Windows.Forms.Panel(); + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.toolStripMaxMin = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.tspBtnOpenImageFile = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripModeBtn = new System.Windows.Forms.ToolStripButton(); + this.toolStripModeLabel = new System.Windows.Forms.ToolStripLabel(); + this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripButton5 = new System.Windows.Forms.ToolStripButton(); + this.tsplabelProductName = new System.Windows.Forms.ToolStripLabel(); + this.tspbtnExit = new System.Windows.Forms.ToolStripButton(); + this.tspBtnHelp = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator(); + this.panel2 = new System.Windows.Forms.Panel(); + this.lblAngleDisplay = new System.Windows.Forms.Label(); + this.viewPort = new HalconDotNet.HWindowControl(); + this.panel3 = new System.Windows.Forms.Panel(); + this.btnDisplay = new System.Windows.Forms.Button(); + this.gbxTest = new System.Windows.Forms.GroupBox(); + this.button7 = new System.Windows.Forms.Button(); + this.button8 = new System.Windows.Forms.Button(); + this.button9 = new System.Windows.Forms.Button(); + this.button10 = new System.Windows.Forms.Button(); + this.button16 = new System.Windows.Forms.Button(); + this.button11 = new System.Windows.Forms.Button(); + this.button12 = new System.Windows.Forms.Button(); + this.button13 = new System.Windows.Forms.Button(); + this.button14 = new System.Windows.Forms.Button(); + this.btnORI = new System.Windows.Forms.Button(); + this.ckbCameraLight = new System.Windows.Forms.CheckBox(); + this.btnTestMove = new System.Windows.Forms.Button(); + this.txtTestPulse = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.btnStopCapture = new System.Windows.Forms.Button(); + this.btnContinueCapture = new System.Windows.Forms.Button(); + this.gbxCalibration = new System.Windows.Forms.GroupBox(); + this.btnCalibration = new System.Windows.Forms.Button(); + this.txtCalAngle = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.btnCapture = new System.Windows.Forms.Button(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.txtSN = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.txtResultFinalAngle = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); + this.txtResultInitAngle = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.cbxTest = new System.Windows.Forms.CheckBox(); + this.btnCanCalibration = new System.Windows.Forms.Button(); + this.btnHalconTool = new System.Windows.Forms.Button(); + this.btnConfig = new System.Windows.Forms.Button(); + this.checkBox2 = new System.Windows.Forms.CheckBox(); + this.button15 = new System.Windows.Forms.Button(); + this.tVideo = new System.Windows.Forms.Timer(this.components); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.panel4 = new System.Windows.Forms.Panel(); + this.lblAngleDisplay_left = new System.Windows.Forms.Label(); + this.viewPort_left = new HalconDotNet.HWindowControl(); + this.panel5 = new System.Windows.Forms.Panel(); + this.btnDisplay_left = new System.Windows.Forms.Button(); + this.gbxTest_left = new System.Windows.Forms.GroupBox(); + this.button5 = new System.Windows.Forms.Button(); + this.button4 = new System.Windows.Forms.Button(); + this.button3 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.btnOut = new System.Windows.Forms.Button(); + this.btnCloseDor = new System.Windows.Forms.Button(); + this.btnOpenDor = new System.Windows.Forms.Button(); + this.btnORI_left = new System.Windows.Forms.Button(); + this.ckbCameraLight_left = new System.Windows.Forms.CheckBox(); + this.btnTestMove_left = new System.Windows.Forms.Button(); + this.txtTestPulse_left = new System.Windows.Forms.TextBox(); + this.label6 = new System.Windows.Forms.Label(); + this.btnStopCapture_left = new System.Windows.Forms.Button(); + this.btnContinueCapture_left = new System.Windows.Forms.Button(); + this.gbxCalibration_left = new System.Windows.Forms.GroupBox(); + this.btnCalibration_left = new System.Windows.Forms.Button(); + this.txtCalAngle_left = new System.Windows.Forms.TextBox(); + this.label7 = new System.Windows.Forms.Label(); + this.btnCapture_left = new System.Windows.Forms.Button(); + this.groupBox6 = new System.Windows.Forms.GroupBox(); + this.txtSN_left = new System.Windows.Forms.TextBox(); + this.label8 = new System.Windows.Forms.Label(); + this.groupBox7 = new System.Windows.Forms.GroupBox(); + this.txtResultFinalAngle_left = new System.Windows.Forms.TextBox(); + this.label9 = new System.Windows.Forms.Label(); + this.txtResultInitAngle_left = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); + this.groupBox8 = new System.Windows.Forms.GroupBox(); + this.cbxTest_left = new System.Windows.Forms.CheckBox(); + this.btnCanCalibration_left = new System.Windows.Forms.Button(); + this.btnHalconTool_left = new System.Windows.Forms.Button(); + this.btnConfig_left = new System.Windows.Forms.Button(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); + this.button6 = new System.Windows.Forms.Button(); + this.tabPage3 = new System.Windows.Forms.TabPage(); + this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.ckbSaveImage = new System.Windows.Forms.CheckBox(); + this.lblForApple = new System.Windows.Forms.Label(); + this.lblZ_ShaChe = new System.Windows.Forms.Label(); + this.lblDingWei_SRV_ON = new System.Windows.Forms.Label(); + this.lblZ_SRV_ON = new System.Windows.Forms.Label(); + this.lblX_SRV_ON = new System.Windows.Forms.Label(); + this.lblSiFuPowerOn = new System.Windows.Forms.Label(); + this.lblHuaTaiCylider = new System.Windows.Forms.Label(); + this.lblWuGanCylider = new System.Windows.Forms.Label(); + this.lblZhengBianCylider = new System.Windows.Forms.Label(); + this.lblCeBianCylider = new System.Windows.Forms.Label(); + this.lblBuzzer = new System.Windows.Forms.Label(); + this.lblGreen = new System.Windows.Forms.Label(); + this.lblYellow = new System.Windows.Forms.Label(); + this.lblRed = new System.Windows.Forms.Label(); + this.lblWuGanCylider2 = new System.Windows.Forms.Label(); + this.lblCameraLighto = new System.Windows.Forms.Label(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.lblWuGanHou = new System.Windows.Forms.Label(); + this.lblWuGanQian = new System.Windows.Forms.Label(); + this.lblCeBianHou = new System.Windows.Forms.Label(); + this.lblCeBianQian = new System.Windows.Forms.Label(); + this.lblOpenJieJin = new System.Windows.Forms.Label(); + this.lblSafeCurtain = new System.Windows.Forms.Label(); + this.lblE_Stop = new System.Windows.Forms.Label(); + this.lblReset = new System.Windows.Forms.Label(); + this.lblStart2 = new System.Windows.Forms.Label(); + this.lblStart1 = new System.Windows.Forms.Label(); + this.lblDingWei_Alarm = new System.Windows.Forms.Label(); + this.lblDingWei_JinDian = new System.Windows.Forms.Label(); + this.lblDingWei_CCW = new System.Windows.Forms.Label(); + this.lblDingWei_CW = new System.Windows.Forms.Label(); + this.lblZ_CCW = new System.Windows.Forms.Label(); + this.lblZ_CW = new System.Windows.Forms.Label(); + this.lblX_CCW = new System.Windows.Forms.Label(); + this.lblX_CW = new System.Windows.Forms.Label(); + this.lblZ_Alarm = new System.Windows.Forms.Label(); + this.lblX_Alarm = new System.Windows.Forms.Label(); + this.lblZ_JinDian = new System.Windows.Forms.Label(); + this.lblX_JinDian = new System.Windows.Forms.Label(); + this.tVideo_left = new System.Windows.Forms.Timer(this.components); + this.cboSize = new System.Windows.Forms.ComboBox(); + this.label11 = new System.Windows.Forms.Label(); + this.cboSize_Left = new System.Windows.Forms.ComboBox(); + this.label12 = new System.Windows.Forms.Label(); + this.statusStrip1.SuspendLayout(); + this.panel1.SuspendLayout(); + this.toolStrip1.SuspendLayout(); + this.panel2.SuspendLayout(); + this.panel3.SuspendLayout(); + this.gbxTest.SuspendLayout(); + this.gbxCalibration.SuspendLayout(); + this.groupBox4.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.tabControl1.SuspendLayout(); + this.tabPage2.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.panel4.SuspendLayout(); + this.panel5.SuspendLayout(); + this.gbxTest_left.SuspendLayout(); + this.gbxCalibration_left.SuspendLayout(); + this.groupBox6.SuspendLayout(); + this.groupBox7.SuspendLayout(); + this.groupBox8.SuspendLayout(); + this.tabPage3.SuspendLayout(); + this.groupBox5.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // statusStrip1 + // + this.statusStrip1.ImageScalingSize = new System.Drawing.Size(24, 24); + this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsslOPC, + this.tsllPositionlabel, + this.tsslPosition_left, + this.toolStripStatusLabel3, + this.tsslAlarm_Left, + this.toolStripStatusLabel2, + this.tsslPosition, + this.toolStripStatusLabel1, + this.tsslAlarm}); + this.statusStrip1.Location = new System.Drawing.Point(0, 747); + this.statusStrip1.Name = "statusStrip1"; + this.statusStrip1.Size = new System.Drawing.Size(1081, 22); + this.statusStrip1.TabIndex = 0; + this.statusStrip1.Text = "statusStrip1"; + // + // tsslOPC + // + this.tsslOPC.Name = "tsslOPC"; + this.tsslOPC.Size = new System.Drawing.Size(33, 17); + this.tsslOPC.Text = "OPC"; + // + // tsllPositionlabel + // + this.tsllPositionlabel.Name = "tsllPositionlabel"; + this.tsllPositionlabel.Size = new System.Drawing.Size(56, 17); + this.tsllPositionlabel.Text = "宸﹁剦鍐诧細"; + // + // tsslPosition_left + // + this.tsslPosition_left.Name = "tsslPosition_left"; + this.tsslPosition_left.Size = new System.Drawing.Size(15, 17); + this.tsslPosition_left.Text = "0"; + // + // toolStripStatusLabel3 + // + this.toolStripStatusLabel3.Name = "toolStripStatusLabel3"; + this.toolStripStatusLabel3.Size = new System.Drawing.Size(56, 17); + this.toolStripStatusLabel3.Text = "宸︽姤璀︼細"; + // + // tsslAlarm_Left + // + this.tsslAlarm_Left.ForeColor = System.Drawing.Color.Red; + this.tsslAlarm_Left.Name = "tsslAlarm_Left"; + this.tsslAlarm_Left.Size = new System.Drawing.Size(20, 17); + this.tsslAlarm_Left.Text = "鏃�"; + // + // toolStripStatusLabel2 + // + this.toolStripStatusLabel2.Name = "toolStripStatusLabel2"; + this.toolStripStatusLabel2.Size = new System.Drawing.Size(56, 17); + this.toolStripStatusLabel2.Text = "鍙宠剦鍐诧細"; + // + // tsslPosition + // + this.tsslPosition.Name = "tsslPosition"; + this.tsslPosition.Size = new System.Drawing.Size(15, 17); + this.tsslPosition.Text = "0"; + // + // toolStripStatusLabel1 + // + this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; + this.toolStripStatusLabel1.Size = new System.Drawing.Size(56, 17); + this.toolStripStatusLabel1.Text = "鍙虫姤璀︼細"; + // + // tsslAlarm + // + this.tsslAlarm.ForeColor = System.Drawing.Color.Red; + this.tsslAlarm.Name = "tsslAlarm"; + this.tsslAlarm.Size = new System.Drawing.Size(20, 17); + this.tsslAlarm.Text = "鏃�"; + // + // panel1 + // + this.panel1.Controls.Add(this.toolStrip1); + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(1081, 72); + this.panel1.TabIndex = 1; + // + // toolStrip1 + // + this.toolStrip1.AutoSize = false; + this.toolStrip1.BackColor = System.Drawing.Color.LightSlateGray; + this.toolStrip1.Dock = System.Windows.Forms.DockStyle.Fill; + this.toolStrip1.ImageScalingSize = new System.Drawing.Size(24, 24); + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripMaxMin, + this.toolStripSeparator1, + this.tspBtnOpenImageFile, + this.toolStripSeparator2, + this.toolStripModeBtn, + this.toolStripModeLabel, + this.toolStripSeparator3, + this.toolStripButton5, + this.tsplabelProductName, + this.tspbtnExit, + this.tspBtnHelp, + this.toolStripSeparator6}); + this.toolStrip1.Location = new System.Drawing.Point(0, 0); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Size = new System.Drawing.Size(1081, 72); + this.toolStrip1.TabIndex = 11; + this.toolStrip1.Text = "toolStrip1"; + // + // toolStripMaxMin + // + this.toolStripMaxMin.AutoSize = false; + this.toolStripMaxMin.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripMaxMin.Image = ((System.Drawing.Image)(resources.GetObject("toolStripMaxMin.Image"))); + this.toolStripMaxMin.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.toolStripMaxMin.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripMaxMin.Name = "toolStripMaxMin"; + this.toolStripMaxMin.Size = new System.Drawing.Size(65, 65); + this.toolStripMaxMin.Text = "涓荤晫闈�"; + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(6, 72); + // + // tspBtnOpenImageFile + // + this.tspBtnOpenImageFile.AutoSize = false; + this.tspBtnOpenImageFile.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.tspBtnOpenImageFile.Image = ((System.Drawing.Image)(resources.GetObject("tspBtnOpenImageFile.Image"))); + this.tspBtnOpenImageFile.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.tspBtnOpenImageFile.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tspBtnOpenImageFile.Name = "tspBtnOpenImageFile"; + this.tspBtnOpenImageFile.Size = new System.Drawing.Size(65, 65); + this.tspBtnOpenImageFile.Text = "鍥剧墖鏌ョ湅"; + // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(6, 72); + // + // toolStripModeBtn + // + this.toolStripModeBtn.AutoSize = false; + this.toolStripModeBtn.BackColor = System.Drawing.Color.SlateGray; + this.toolStripModeBtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripModeBtn.ForeColor = System.Drawing.Color.Transparent; + this.toolStripModeBtn.Image = ((System.Drawing.Image)(resources.GetObject("toolStripModeBtn.Image"))); + this.toolStripModeBtn.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.toolStripModeBtn.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripModeBtn.Name = "toolStripModeBtn"; + this.toolStripModeBtn.Size = new System.Drawing.Size(65, 65); + this.toolStripModeBtn.Text = "杩愯"; + // + // toolStripModeLabel + // + this.toolStripModeLabel.AutoSize = false; + this.toolStripModeLabel.Font = new System.Drawing.Font("寰蒋闆呴粦", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.toolStripModeLabel.Name = "toolStripModeLabel"; + this.toolStripModeLabel.Size = new System.Drawing.Size(100, 62); + this.toolStripModeLabel.Text = "Online"; + // + // toolStripSeparator3 + // + this.toolStripSeparator3.Name = "toolStripSeparator3"; + this.toolStripSeparator3.Size = new System.Drawing.Size(6, 72); + // + // toolStripButton5 + // + this.toolStripButton5.AutoSize = false; + this.toolStripButton5.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButton5.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton5.Image"))); + this.toolStripButton5.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.toolStripButton5.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton5.Name = "toolStripButton5"; + this.toolStripButton5.Size = new System.Drawing.Size(75, 65); + this.toolStripButton5.Text = "浜у搧鍚�"; + // + // tsplabelProductName + // + this.tsplabelProductName.AutoSize = false; + this.tsplabelProductName.Font = new System.Drawing.Font("Verdana", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.tsplabelProductName.ForeColor = System.Drawing.Color.Yellow; + this.tsplabelProductName.Name = "tsplabelProductName"; + this.tsplabelProductName.Size = new System.Drawing.Size(350, 62); + this.tsplabelProductName.Text = "Gamma Test"; + this.tsplabelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // tspbtnExit + // + this.tspbtnExit.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.tspbtnExit.AutoSize = false; + this.tspbtnExit.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.tspbtnExit.Image = ((System.Drawing.Image)(resources.GetObject("tspbtnExit.Image"))); + this.tspbtnExit.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.tspbtnExit.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tspbtnExit.Name = "tspbtnExit"; + this.tspbtnExit.Size = new System.Drawing.Size(75, 65); + this.tspbtnExit.Text = "閫�鍑�"; + this.tspbtnExit.Click += new System.EventHandler(this.tspbtnExit_Click); + // + // tspBtnHelp + // + this.tspBtnHelp.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.tspBtnHelp.AutoSize = false; + this.tspBtnHelp.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.tspBtnHelp.Image = ((System.Drawing.Image)(resources.GetObject("tspBtnHelp.Image"))); + this.tspBtnHelp.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.tspBtnHelp.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tspBtnHelp.Name = "tspBtnHelp"; + this.tspBtnHelp.Size = new System.Drawing.Size(75, 65); + this.tspBtnHelp.Text = "甯姪"; + // + // toolStripSeparator6 + // + this.toolStripSeparator6.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.toolStripSeparator6.Name = "toolStripSeparator6"; + this.toolStripSeparator6.Size = new System.Drawing.Size(6, 72); + // + // panel2 + // + this.panel2.Controls.Add(this.lblAngleDisplay); + this.panel2.Controls.Add(this.viewPort); + this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel2.Location = new System.Drawing.Point(3, 3); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(792, 643); + this.panel2.TabIndex = 2; + // + // lblAngleDisplay + // + this.lblAngleDisplay.Location = new System.Drawing.Point(666, 9); + this.lblAngleDisplay.Name = "lblAngleDisplay"; + this.lblAngleDisplay.Size = new System.Drawing.Size(47, 18); + this.lblAngleDisplay.TabIndex = 1; + this.lblAngleDisplay.Text = "-"; + this.lblAngleDisplay.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // viewPort + // + this.viewPort.BackColor = System.Drawing.Color.Black; + this.viewPort.BorderColor = System.Drawing.Color.Black; + this.viewPort.Dock = System.Windows.Forms.DockStyle.Fill; + this.viewPort.ImagePart = new System.Drawing.Rectangle(0, 0, 640, 480); + this.viewPort.Location = new System.Drawing.Point(0, 0); + this.viewPort.Name = "viewPort"; + this.viewPort.Size = new System.Drawing.Size(792, 643); + this.viewPort.TabIndex = 0; + this.viewPort.WindowSize = new System.Drawing.Size(792, 643); + // + // panel3 + // + this.panel3.Controls.Add(this.btnDisplay); + this.panel3.Controls.Add(this.gbxTest); + this.panel3.Controls.Add(this.gbxCalibration); + this.panel3.Controls.Add(this.groupBox4); + this.panel3.Controls.Add(this.groupBox3); + this.panel3.Controls.Add(this.groupBox2); + this.panel3.Controls.Add(this.checkBox2); + this.panel3.Controls.Add(this.button15); + this.panel3.Dock = System.Windows.Forms.DockStyle.Right; + this.panel3.Location = new System.Drawing.Point(795, 3); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(275, 643); + this.panel3.TabIndex = 3; + // + // btnDisplay + // + this.btnDisplay.Dock = System.Windows.Forms.DockStyle.Bottom; + this.btnDisplay.Font = new System.Drawing.Font("瀹嬩綋", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnDisplay.Location = new System.Drawing.Point(0, 590); + this.btnDisplay.Name = "btnDisplay"; + this.btnDisplay.Size = new System.Drawing.Size(275, 53); + this.btnDisplay.TabIndex = 0; + this.btnDisplay.Text = "鏄剧ず"; + this.btnDisplay.UseVisualStyleBackColor = true; + // + // gbxTest + // + this.gbxTest.Controls.Add(this.button7); + this.gbxTest.Controls.Add(this.button8); + this.gbxTest.Controls.Add(this.button9); + this.gbxTest.Controls.Add(this.button10); + this.gbxTest.Controls.Add(this.button16); + this.gbxTest.Controls.Add(this.button11); + this.gbxTest.Controls.Add(this.button12); + this.gbxTest.Controls.Add(this.button13); + this.gbxTest.Controls.Add(this.button14); + this.gbxTest.Controls.Add(this.btnORI); + this.gbxTest.Controls.Add(this.ckbCameraLight); + this.gbxTest.Controls.Add(this.btnTestMove); + this.gbxTest.Controls.Add(this.txtTestPulse); + this.gbxTest.Controls.Add(this.label3); + this.gbxTest.Controls.Add(this.btnStopCapture); + this.gbxTest.Controls.Add(this.btnContinueCapture); + this.gbxTest.Dock = System.Windows.Forms.DockStyle.Top; + this.gbxTest.Enabled = false; + this.gbxTest.Location = new System.Drawing.Point(0, 291); + this.gbxTest.Name = "gbxTest"; + this.gbxTest.Size = new System.Drawing.Size(275, 205); + this.gbxTest.TabIndex = 6; + this.gbxTest.TabStop = false; + this.gbxTest.Text = "娴嬭瘯"; + // + // button7 + // + this.button7.Location = new System.Drawing.Point(176, 90); + this.button7.Name = "button7"; + this.button7.Size = new System.Drawing.Size(73, 32); + this.button7.TabIndex = 22; + this.button7.Text = "姘旂几鏉惧紑"; + this.button7.UseVisualStyleBackColor = true; + this.button7.Click += new System.EventHandler(this.button7_Click); + // + // button8 + // + this.button8.Location = new System.Drawing.Point(96, 90); + this.button8.Name = "button8"; + this.button8.Size = new System.Drawing.Size(73, 32); + this.button8.TabIndex = 21; + this.button8.Text = "姘旂几澶圭揣"; + this.button8.UseVisualStyleBackColor = true; + this.button8.Click += new System.EventHandler(this.button8_Click); + // + // button9 + // + this.button9.Location = new System.Drawing.Point(17, 163); + this.button9.Name = "button9"; + this.button9.Size = new System.Drawing.Size(73, 32); + this.button9.TabIndex = 20; + this.button9.Text = "閫佹枡"; + this.button9.UseVisualStyleBackColor = true; + this.button9.Click += new System.EventHandler(this.button9_Click); + // + // button10 + // + this.button10.Location = new System.Drawing.Point(17, 90); + this.button10.Name = "button10"; + this.button10.Size = new System.Drawing.Size(73, 32); + this.button10.TabIndex = 19; + this.button10.Text = "鎵嬪姩鍏佽"; + this.button10.UseVisualStyleBackColor = true; + this.button10.Click += new System.EventHandler(this.button10_Click); + // + // button16 + // + this.button16.Location = new System.Drawing.Point(176, 163); + this.button16.Name = "button16"; + this.button16.Size = new System.Drawing.Size(73, 32); + this.button16.TabIndex = 18; + this.button16.Text = "婊戝彴姘旂几鏉�"; + this.button16.UseVisualStyleBackColor = true; + this.button16.Visible = false; + this.button16.Click += new System.EventHandler(this.button11_Click); + // + // button11 + // + this.button11.Location = new System.Drawing.Point(176, 126); + this.button11.Name = "button11"; + this.button11.Size = new System.Drawing.Size(73, 32); + this.button11.TabIndex = 18; + this.button11.Text = "婊戝彴姘旂几绱�"; + this.button11.UseVisualStyleBackColor = true; + this.button11.Click += new System.EventHandler(this.button11_Click); + // + // button12 + // + this.button12.Location = new System.Drawing.Point(96, 163); + this.button12.Name = "button12"; + this.button12.Size = new System.Drawing.Size(73, 32); + this.button12.TabIndex = 17; + this.button12.Text = "鍑烘枡"; + this.button12.UseVisualStyleBackColor = true; + this.button12.Click += new System.EventHandler(this.button12_Click); + // + // button13 + // + this.button13.Location = new System.Drawing.Point(17, 126); + this.button13.Name = "button13"; + this.button13.Size = new System.Drawing.Size(73, 32); + this.button13.TabIndex = 16; + this.button13.Text = "鍏抽棬"; + this.button13.UseVisualStyleBackColor = true; + this.button13.Click += new System.EventHandler(this.button13_Click); + // + // button14 + // + this.button14.Location = new System.Drawing.Point(96, 126); + this.button14.Name = "button14"; + this.button14.Size = new System.Drawing.Size(73, 32); + this.button14.TabIndex = 15; + this.button14.Text = "寮�闂�"; + this.button14.UseVisualStyleBackColor = true; + this.button14.Click += new System.EventHandler(this.button14_Click); + // + // btnORI + // + this.btnORI.Location = new System.Drawing.Point(200, 61); + this.btnORI.Name = "btnORI"; + this.btnORI.Size = new System.Drawing.Size(50, 23); + this.btnORI.TabIndex = 6; + this.btnORI.Text = "鍥炲師鐐�"; + this.btnORI.UseVisualStyleBackColor = true; + this.btnORI.Click += new System.EventHandler(this.btnORI_Click); + // + // ckbCameraLight + // + this.ckbCameraLight.Appearance = System.Windows.Forms.Appearance.Button; + this.ckbCameraLight.Location = new System.Drawing.Point(177, 20); + this.ckbCameraLight.Name = "ckbCameraLight"; + this.ckbCameraLight.Size = new System.Drawing.Size(74, 32); + this.ckbCameraLight.TabIndex = 5; + this.ckbCameraLight.Text = "鍏夋簮寮�/鍏�"; + this.ckbCameraLight.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.ckbCameraLight.UseVisualStyleBackColor = true; + this.ckbCameraLight.CheckedChanged += new System.EventHandler(this.ckbCameraLight_CheckedChanged); + // + // btnTestMove + // + this.btnTestMove.Location = new System.Drawing.Point(142, 61); + this.btnTestMove.Name = "btnTestMove"; + this.btnTestMove.Size = new System.Drawing.Size(54, 23); + this.btnTestMove.TabIndex = 4; + this.btnTestMove.Text = "绉诲姩"; + this.btnTestMove.UseVisualStyleBackColor = true; + this.btnTestMove.Click += new System.EventHandler(this.btnTestMove_Click); + // + // txtTestPulse + // + this.txtTestPulse.Location = new System.Drawing.Point(74, 63); + this.txtTestPulse.Name = "txtTestPulse"; + this.txtTestPulse.Size = new System.Drawing.Size(63, 21); + this.txtTestPulse.TabIndex = 3; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(15, 66); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(53, 12); + this.label3.TabIndex = 2; + this.label3.Text = "绉诲姩鑴夊啿"; + // + // btnStopCapture + // + this.btnStopCapture.Location = new System.Drawing.Point(96, 20); + this.btnStopCapture.Name = "btnStopCapture"; + this.btnStopCapture.Size = new System.Drawing.Size(75, 32); + this.btnStopCapture.TabIndex = 1; + this.btnStopCapture.Text = "鍋滄鎷嶇収"; + this.btnStopCapture.UseVisualStyleBackColor = true; + this.btnStopCapture.Click += new System.EventHandler(this.btnStopCapture_Click); + // + // btnContinueCapture + // + this.btnContinueCapture.Location = new System.Drawing.Point(16, 20); + this.btnContinueCapture.Name = "btnContinueCapture"; + this.btnContinueCapture.Size = new System.Drawing.Size(73, 32); + this.btnContinueCapture.TabIndex = 0; + this.btnContinueCapture.Text = "杩炵画鎷嶇収"; + this.btnContinueCapture.UseVisualStyleBackColor = true; + this.btnContinueCapture.Click += new System.EventHandler(this.btnContinueCapture_Click); + // + // gbxCalibration + // + this.gbxCalibration.Controls.Add(this.btnCalibration); + this.gbxCalibration.Controls.Add(this.txtCalAngle); + this.gbxCalibration.Controls.Add(this.label2); + this.gbxCalibration.Controls.Add(this.btnCapture); + this.gbxCalibration.Dock = System.Windows.Forms.DockStyle.Top; + this.gbxCalibration.Enabled = false; + this.gbxCalibration.Location = new System.Drawing.Point(0, 200); + this.gbxCalibration.Name = "gbxCalibration"; + this.gbxCalibration.Size = new System.Drawing.Size(275, 91); + this.gbxCalibration.TabIndex = 5; + this.gbxCalibration.TabStop = false; + this.gbxCalibration.Text = "鏍囧畾"; + // + // btnCalibration + // + this.btnCalibration.Enabled = false; + this.btnCalibration.Location = new System.Drawing.Point(144, 47); + this.btnCalibration.Name = "btnCalibration"; + this.btnCalibration.Size = new System.Drawing.Size(109, 36); + this.btnCalibration.TabIndex = 3; + this.btnCalibration.Text = "鏍囧畾"; + this.btnCalibration.UseVisualStyleBackColor = true; + this.btnCalibration.Click += new System.EventHandler(this.btnCalibration_Click); + // + // txtCalAngle + // + this.txtCalAngle.Location = new System.Drawing.Point(106, 20); + this.txtCalAngle.Name = "txtCalAngle"; + this.txtCalAngle.Size = new System.Drawing.Size(147, 21); + this.txtCalAngle.TabIndex = 2; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(19, 23); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(71, 12); + this.label2.TabIndex = 1; + this.label2.Text = "鏍囧畾鍧楄搴�:"; + this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btnCapture + // + this.btnCapture.Location = new System.Drawing.Point(17, 47); + this.btnCapture.Name = "btnCapture"; + this.btnCapture.Size = new System.Drawing.Size(107, 36); + this.btnCapture.TabIndex = 0; + this.btnCapture.Text = "閲囧浘"; + this.btnCapture.UseVisualStyleBackColor = true; + this.btnCapture.Click += new System.EventHandler(this.btnCapture_Click); + // + // groupBox4 + // + this.groupBox4.Controls.Add(this.cboSize); + this.groupBox4.Controls.Add(this.label11); + this.groupBox4.Controls.Add(this.txtSN); + this.groupBox4.Controls.Add(this.label1); + this.groupBox4.Dock = System.Windows.Forms.DockStyle.Top; + this.groupBox4.Location = new System.Drawing.Point(0, 124); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(275, 76); + this.groupBox4.TabIndex = 4; + this.groupBox4.TabStop = false; + // + // txtSN + // + this.txtSN.Location = new System.Drawing.Point(39, 47); + this.txtSN.Name = "txtSN"; + this.txtSN.Size = new System.Drawing.Size(214, 21); + this.txtSN.TabIndex = 1; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(14, 50); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(17, 12); + this.label1.TabIndex = 0; + this.label1.Text = "SN"; + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.txtResultFinalAngle); + this.groupBox3.Controls.Add(this.label5); + this.groupBox3.Controls.Add(this.txtResultInitAngle); + this.groupBox3.Controls.Add(this.label4); + this.groupBox3.Dock = System.Windows.Forms.DockStyle.Top; + this.groupBox3.Location = new System.Drawing.Point(0, 77); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(275, 47); + this.groupBox3.TabIndex = 3; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "缁撴灉"; + // + // txtResultFinalAngle + // + this.txtResultFinalAngle.Location = new System.Drawing.Point(191, 17); + this.txtResultFinalAngle.Name = "txtResultFinalAngle"; + this.txtResultFinalAngle.ReadOnly = true; + this.txtResultFinalAngle.Size = new System.Drawing.Size(62, 21); + this.txtResultFinalAngle.TabIndex = 3; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(135, 20); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(53, 12); + this.label5.TabIndex = 2; + this.label5.Text = "鏈�缁堣搴�"; + // + // txtResultInitAngle + // + this.txtResultInitAngle.Location = new System.Drawing.Point(62, 17); + this.txtResultInitAngle.Name = "txtResultInitAngle"; + this.txtResultInitAngle.ReadOnly = true; + this.txtResultInitAngle.Size = new System.Drawing.Size(62, 21); + this.txtResultInitAngle.TabIndex = 1; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(6, 20); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(53, 12); + this.label4.TabIndex = 0; + this.label4.Text = "鍒濆瑙掑害"; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.cbxTest); + this.groupBox2.Controls.Add(this.btnCanCalibration); + this.groupBox2.Controls.Add(this.btnHalconTool); + this.groupBox2.Controls.Add(this.btnConfig); + this.groupBox2.Dock = System.Windows.Forms.DockStyle.Top; + this.groupBox2.Location = new System.Drawing.Point(0, 0); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(275, 77); + this.groupBox2.TabIndex = 2; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "閰嶇疆"; + // + // cbxTest + // + this.cbxTest.Appearance = System.Windows.Forms.Appearance.Button; + this.cbxTest.Location = new System.Drawing.Point(198, 20); + this.cbxTest.Name = "cbxTest"; + this.cbxTest.Size = new System.Drawing.Size(55, 46); + this.cbxTest.TabIndex = 3; + this.cbxTest.Text = "娴嬭瘯"; + this.cbxTest.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.cbxTest.UseVisualStyleBackColor = true; + this.cbxTest.CheckedChanged += new System.EventHandler(this.cbxTest_CheckedChanged); + // + // btnCanCalibration + // + this.btnCanCalibration.Location = new System.Drawing.Point(137, 20); + this.btnCanCalibration.Name = "btnCanCalibration"; + this.btnCanCalibration.Size = new System.Drawing.Size(55, 46); + this.btnCanCalibration.TabIndex = 2; + this.btnCanCalibration.Text = "鏍囧畾"; + this.btnCanCalibration.UseVisualStyleBackColor = true; + this.btnCanCalibration.Click += new System.EventHandler(this.btnCanCalibration_Click); + // + // btnHalconTool + // + this.btnHalconTool.Location = new System.Drawing.Point(76, 20); + this.btnHalconTool.Name = "btnHalconTool"; + this.btnHalconTool.Size = new System.Drawing.Size(55, 46); + this.btnHalconTool.TabIndex = 1; + this.btnHalconTool.Text = "鍥惧儚閰嶇疆"; + this.btnHalconTool.UseVisualStyleBackColor = true; + this.btnHalconTool.Click += new System.EventHandler(this.btnHalconTool_Click); + // + // btnConfig + // + this.btnConfig.Location = new System.Drawing.Point(17, 20); + this.btnConfig.Name = "btnConfig"; + this.btnConfig.Size = new System.Drawing.Size(55, 46); + this.btnConfig.TabIndex = 0; + this.btnConfig.Text = "鍙傛暟閰嶇疆"; + this.btnConfig.UseVisualStyleBackColor = true; + this.btnConfig.Click += new System.EventHandler(this.btnConfig_Click); + // + // checkBox2 + // + this.checkBox2.AutoSize = true; + this.checkBox2.Location = new System.Drawing.Point(20, 556); + this.checkBox2.Name = "checkBox2"; + this.checkBox2.Size = new System.Drawing.Size(96, 16); + this.checkBox2.TabIndex = 24; + this.checkBox2.Text = "鍚敤鎵嬪姩瀹氫綅"; + this.checkBox2.UseVisualStyleBackColor = true; + this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged); + // + // button15 + // + this.button15.Enabled = false; + this.button15.Location = new System.Drawing.Point(143, 544); + this.button15.Name = "button15"; + this.button15.Size = new System.Drawing.Size(105, 36); + this.button15.TabIndex = 23; + this.button15.Text = "鎵嬪姩瀹氫綅"; + this.button15.UseVisualStyleBackColor = true; + this.button15.Click += new System.EventHandler(this.button15_Click); + // + // tVideo + // + this.tVideo.Interval = 250; + this.tVideo.Tick += new System.EventHandler(this.tVideo_Tick); + // + // tabControl1 + // + this.tabControl1.Controls.Add(this.tabPage2); + this.tabControl1.Controls.Add(this.tabPage1); + this.tabControl1.Controls.Add(this.tabPage3); + this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControl1.Location = new System.Drawing.Point(0, 72); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(1081, 675); + this.tabControl1.TabIndex = 4; + // + // tabPage2 + // + this.tabPage2.Controls.Add(this.panel2); + this.tabPage2.Controls.Add(this.panel3); + this.tabPage2.Location = new System.Drawing.Point(4, 22); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); + this.tabPage2.Size = new System.Drawing.Size(1073, 649); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "涓诲伐浣�"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // tabPage1 + // + this.tabPage1.Controls.Add(this.panel4); + this.tabPage1.Controls.Add(this.panel5); + this.tabPage1.Location = new System.Drawing.Point(4, 22); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); + this.tabPage1.Size = new System.Drawing.Size(1073, 649); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "宸﹀伐浣�"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // panel4 + // + this.panel4.Controls.Add(this.lblAngleDisplay_left); + this.panel4.Controls.Add(this.viewPort_left); + this.panel4.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel4.Location = new System.Drawing.Point(3, 3); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(792, 643); + this.panel4.TabIndex = 0; + // + // lblAngleDisplay_left + // + this.lblAngleDisplay_left.Location = new System.Drawing.Point(666, 9); + this.lblAngleDisplay_left.Name = "lblAngleDisplay_left"; + this.lblAngleDisplay_left.Size = new System.Drawing.Size(47, 18); + this.lblAngleDisplay_left.TabIndex = 2; + this.lblAngleDisplay_left.Text = "-"; + this.lblAngleDisplay_left.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // viewPort_left + // + this.viewPort_left.BackColor = System.Drawing.Color.Black; + this.viewPort_left.BorderColor = System.Drawing.Color.Black; + this.viewPort_left.Dock = System.Windows.Forms.DockStyle.Fill; + this.viewPort_left.ImagePart = new System.Drawing.Rectangle(0, 0, 640, 480); + this.viewPort_left.Location = new System.Drawing.Point(0, 0); + this.viewPort_left.Name = "viewPort_left"; + this.viewPort_left.Size = new System.Drawing.Size(792, 643); + this.viewPort_left.TabIndex = 1; + this.viewPort_left.WindowSize = new System.Drawing.Size(792, 643); + // + // panel5 + // + this.panel5.Controls.Add(this.btnDisplay_left); + this.panel5.Controls.Add(this.gbxTest_left); + this.panel5.Controls.Add(this.gbxCalibration_left); + this.panel5.Controls.Add(this.groupBox6); + this.panel5.Controls.Add(this.groupBox7); + this.panel5.Controls.Add(this.groupBox8); + this.panel5.Controls.Add(this.checkBox1); + this.panel5.Controls.Add(this.button6); + this.panel5.Dock = System.Windows.Forms.DockStyle.Right; + this.panel5.Location = new System.Drawing.Point(795, 3); + this.panel5.Name = "panel5"; + this.panel5.Size = new System.Drawing.Size(275, 643); + this.panel5.TabIndex = 1; + // + // btnDisplay_left + // + this.btnDisplay_left.Dock = System.Windows.Forms.DockStyle.Bottom; + this.btnDisplay_left.Font = new System.Drawing.Font("瀹嬩綋", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.btnDisplay_left.Location = new System.Drawing.Point(0, 587); + this.btnDisplay_left.Name = "btnDisplay_left"; + this.btnDisplay_left.Size = new System.Drawing.Size(275, 56); + this.btnDisplay_left.TabIndex = 7; + this.btnDisplay_left.Text = "鏄剧ず"; + this.btnDisplay_left.UseVisualStyleBackColor = true; + // + // gbxTest_left + // + this.gbxTest_left.Controls.Add(this.button5); + this.gbxTest_left.Controls.Add(this.button4); + this.gbxTest_left.Controls.Add(this.button3); + this.gbxTest_left.Controls.Add(this.button2); + this.gbxTest_left.Controls.Add(this.button1); + this.gbxTest_left.Controls.Add(this.btnOut); + this.gbxTest_left.Controls.Add(this.btnCloseDor); + this.gbxTest_left.Controls.Add(this.btnOpenDor); + this.gbxTest_left.Controls.Add(this.btnORI_left); + this.gbxTest_left.Controls.Add(this.ckbCameraLight_left); + this.gbxTest_left.Controls.Add(this.btnTestMove_left); + this.gbxTest_left.Controls.Add(this.txtTestPulse_left); + this.gbxTest_left.Controls.Add(this.label6); + this.gbxTest_left.Controls.Add(this.btnStopCapture_left); + this.gbxTest_left.Controls.Add(this.btnContinueCapture_left); + this.gbxTest_left.Dock = System.Windows.Forms.DockStyle.Top; + this.gbxTest_left.Enabled = false; + this.gbxTest_left.Location = new System.Drawing.Point(0, 284); + this.gbxTest_left.Name = "gbxTest_left"; + this.gbxTest_left.Size = new System.Drawing.Size(275, 202); + this.gbxTest_left.TabIndex = 12; + this.gbxTest_left.TabStop = false; + this.gbxTest_left.Text = "娴嬭瘯"; + // + // button5 + // + this.button5.Location = new System.Drawing.Point(177, 90); + this.button5.Name = "button5"; + this.button5.Size = new System.Drawing.Size(73, 32); + this.button5.TabIndex = 14; + this.button5.Text = "姘旂几鏉惧紑"; + this.button5.UseVisualStyleBackColor = true; + this.button5.Click += new System.EventHandler(this.button5_Click); + // + // button4 + // + this.button4.Location = new System.Drawing.Point(101, 90); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(73, 32); + this.button4.TabIndex = 13; + this.button4.Text = "姘旂几澶圭揣"; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button4_Click); + // + // button3 + // + this.button3.Location = new System.Drawing.Point(25, 163); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(108, 32); + this.button3.TabIndex = 12; + this.button3.Text = "閫佹枡"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); + // + // button2 + // + this.button2.Location = new System.Drawing.Point(25, 90); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(73, 32); + this.button2.TabIndex = 11; + this.button2.Text = "鎵嬪姩鍏佽"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(178, 126); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(73, 32); + this.button1.TabIndex = 10; + this.button1.Text = "婊戝彴姘旂几"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // btnOut + // + this.btnOut.Location = new System.Drawing.Point(146, 163); + this.btnOut.Name = "btnOut"; + this.btnOut.Size = new System.Drawing.Size(104, 32); + this.btnOut.TabIndex = 9; + this.btnOut.Text = "鍑烘枡"; + this.btnOut.UseVisualStyleBackColor = true; + this.btnOut.Click += new System.EventHandler(this.btnOut_Click); + // + // btnCloseDor + // + this.btnCloseDor.Location = new System.Drawing.Point(25, 126); + this.btnCloseDor.Name = "btnCloseDor"; + this.btnCloseDor.Size = new System.Drawing.Size(73, 32); + this.btnCloseDor.TabIndex = 8; + this.btnCloseDor.Text = "鍏抽棬"; + this.btnCloseDor.UseVisualStyleBackColor = true; + this.btnCloseDor.Click += new System.EventHandler(this.btnCloseDor_Click); + // + // btnOpenDor + // + this.btnOpenDor.Location = new System.Drawing.Point(101, 126); + this.btnOpenDor.Name = "btnOpenDor"; + this.btnOpenDor.Size = new System.Drawing.Size(73, 32); + this.btnOpenDor.TabIndex = 7; + this.btnOpenDor.Text = "寮�闂�"; + this.btnOpenDor.UseVisualStyleBackColor = true; + this.btnOpenDor.Click += new System.EventHandler(this.btnOpenDor_Click); + // + // btnORI_left + // + this.btnORI_left.Location = new System.Drawing.Point(200, 62); + this.btnORI_left.Name = "btnORI_left"; + this.btnORI_left.Size = new System.Drawing.Size(50, 23); + this.btnORI_left.TabIndex = 6; + this.btnORI_left.Text = "鍥炲師鐐�"; + this.btnORI_left.UseVisualStyleBackColor = true; + this.btnORI_left.Click += new System.EventHandler(this.btnORI_left_Click); + // + // ckbCameraLight_left + // + this.ckbCameraLight_left.Appearance = System.Windows.Forms.Appearance.Button; + this.ckbCameraLight_left.Location = new System.Drawing.Point(178, 20); + this.ckbCameraLight_left.Name = "ckbCameraLight_left"; + this.ckbCameraLight_left.Size = new System.Drawing.Size(73, 32); + this.ckbCameraLight_left.TabIndex = 5; + this.ckbCameraLight_left.Text = "鍏夋簮寮�/鍏�"; + this.ckbCameraLight_left.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.ckbCameraLight_left.UseVisualStyleBackColor = true; + this.ckbCameraLight_left.CheckedChanged += new System.EventHandler(this.ckbCameraLight_left_CheckedChanged); + // + // btnTestMove_left + // + this.btnTestMove_left.Location = new System.Drawing.Point(146, 62); + this.btnTestMove_left.Name = "btnTestMove_left"; + this.btnTestMove_left.Size = new System.Drawing.Size(49, 23); + this.btnTestMove_left.TabIndex = 4; + this.btnTestMove_left.Text = "绉诲姩"; + this.btnTestMove_left.UseVisualStyleBackColor = true; + this.btnTestMove_left.Click += new System.EventHandler(this.btnTestMove_left_Click); + // + // txtTestPulse_left + // + this.txtTestPulse_left.Location = new System.Drawing.Point(77, 63); + this.txtTestPulse_left.Name = "txtTestPulse_left"; + this.txtTestPulse_left.Size = new System.Drawing.Size(63, 21); + this.txtTestPulse_left.TabIndex = 3; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(22, 67); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(53, 12); + this.label6.TabIndex = 2; + this.label6.Text = "绉诲姩鑴夊啿"; + // + // btnStopCapture_left + // + this.btnStopCapture_left.Location = new System.Drawing.Point(99, 20); + this.btnStopCapture_left.Name = "btnStopCapture_left"; + this.btnStopCapture_left.Size = new System.Drawing.Size(75, 32); + this.btnStopCapture_left.TabIndex = 1; + this.btnStopCapture_left.Text = "鍋滄鎷嶇収"; + this.btnStopCapture_left.UseVisualStyleBackColor = true; + this.btnStopCapture_left.Click += new System.EventHandler(this.btnStopCapture_left_Click); + // + // btnContinueCapture_left + // + this.btnContinueCapture_left.Location = new System.Drawing.Point(22, 20); + this.btnContinueCapture_left.Name = "btnContinueCapture_left"; + this.btnContinueCapture_left.Size = new System.Drawing.Size(73, 32); + this.btnContinueCapture_left.TabIndex = 0; + this.btnContinueCapture_left.Text = "杩炵画鎷嶇収"; + this.btnContinueCapture_left.UseVisualStyleBackColor = true; + this.btnContinueCapture_left.Click += new System.EventHandler(this.btnContinueCapture_left_Click); + // + // gbxCalibration_left + // + this.gbxCalibration_left.Controls.Add(this.btnCalibration_left); + this.gbxCalibration_left.Controls.Add(this.txtCalAngle_left); + this.gbxCalibration_left.Controls.Add(this.label7); + this.gbxCalibration_left.Controls.Add(this.btnCapture_left); + this.gbxCalibration_left.Dock = System.Windows.Forms.DockStyle.Top; + this.gbxCalibration_left.Enabled = false; + this.gbxCalibration_left.Location = new System.Drawing.Point(0, 191); + this.gbxCalibration_left.Name = "gbxCalibration_left"; + this.gbxCalibration_left.Size = new System.Drawing.Size(275, 93); + this.gbxCalibration_left.TabIndex = 11; + this.gbxCalibration_left.TabStop = false; + this.gbxCalibration_left.Text = "鏍囧畾"; + // + // btnCalibration_left + // + this.btnCalibration_left.Enabled = false; + this.btnCalibration_left.Location = new System.Drawing.Point(144, 48); + this.btnCalibration_left.Name = "btnCalibration_left"; + this.btnCalibration_left.Size = new System.Drawing.Size(109, 36); + this.btnCalibration_left.TabIndex = 3; + this.btnCalibration_left.Text = "鏍囧畾"; + this.btnCalibration_left.UseVisualStyleBackColor = true; + this.btnCalibration_left.Click += new System.EventHandler(this.btnCalibration_left_Click); + // + // txtCalAngle_left + // + this.txtCalAngle_left.Location = new System.Drawing.Point(104, 20); + this.txtCalAngle_left.Name = "txtCalAngle_left"; + this.txtCalAngle_left.Size = new System.Drawing.Size(147, 21); + this.txtCalAngle_left.TabIndex = 2; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(19, 23); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(71, 12); + this.label7.TabIndex = 1; + this.label7.Text = "鏍囧畾鍧楄搴�:"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btnCapture_left + // + this.btnCapture_left.Location = new System.Drawing.Point(21, 48); + this.btnCapture_left.Name = "btnCapture_left"; + this.btnCapture_left.Size = new System.Drawing.Size(112, 36); + this.btnCapture_left.TabIndex = 0; + this.btnCapture_left.Text = "閲囧浘"; + this.btnCapture_left.UseVisualStyleBackColor = true; + this.btnCapture_left.Click += new System.EventHandler(this.btnCapture_left_Click); + // + // groupBox6 + // + this.groupBox6.Controls.Add(this.cboSize_Left); + this.groupBox6.Controls.Add(this.label12); + this.groupBox6.Controls.Add(this.txtSN_left); + this.groupBox6.Controls.Add(this.label8); + this.groupBox6.Dock = System.Windows.Forms.DockStyle.Top; + this.groupBox6.Location = new System.Drawing.Point(0, 112); + this.groupBox6.Name = "groupBox6"; + this.groupBox6.Size = new System.Drawing.Size(275, 79); + this.groupBox6.TabIndex = 10; + this.groupBox6.TabStop = false; + // + // txtSN_left + // + this.txtSN_left.Location = new System.Drawing.Point(42, 47); + this.txtSN_left.Name = "txtSN_left"; + this.txtSN_left.Size = new System.Drawing.Size(214, 21); + this.txtSN_left.TabIndex = 1; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(17, 50); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(17, 12); + this.label8.TabIndex = 0; + this.label8.Text = "SN"; + // + // groupBox7 + // + this.groupBox7.Controls.Add(this.txtResultFinalAngle_left); + this.groupBox7.Controls.Add(this.label9); + this.groupBox7.Controls.Add(this.txtResultInitAngle_left); + this.groupBox7.Controls.Add(this.label10); + this.groupBox7.Dock = System.Windows.Forms.DockStyle.Top; + this.groupBox7.Location = new System.Drawing.Point(0, 65); + this.groupBox7.Name = "groupBox7"; + this.groupBox7.Size = new System.Drawing.Size(275, 47); + this.groupBox7.TabIndex = 9; + this.groupBox7.TabStop = false; + this.groupBox7.Text = "缁撴灉"; + // + // txtResultFinalAngle_left + // + this.txtResultFinalAngle_left.Location = new System.Drawing.Point(194, 16); + this.txtResultFinalAngle_left.Name = "txtResultFinalAngle_left"; + this.txtResultFinalAngle_left.ReadOnly = true; + this.txtResultFinalAngle_left.Size = new System.Drawing.Size(62, 21); + this.txtResultFinalAngle_left.TabIndex = 3; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(138, 19); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(53, 12); + this.label9.TabIndex = 2; + this.label9.Text = "鏈�缁堣搴�"; + // + // txtResultInitAngle_left + // + this.txtResultInitAngle_left.Location = new System.Drawing.Point(71, 16); + this.txtResultInitAngle_left.Name = "txtResultInitAngle_left"; + this.txtResultInitAngle_left.ReadOnly = true; + this.txtResultInitAngle_left.Size = new System.Drawing.Size(62, 21); + this.txtResultInitAngle_left.TabIndex = 1; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(15, 19); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(53, 12); + this.label10.TabIndex = 0; + this.label10.Text = "鍒濆瑙掑害"; + // + // groupBox8 + // + this.groupBox8.Controls.Add(this.cbxTest_left); + this.groupBox8.Controls.Add(this.btnCanCalibration_left); + this.groupBox8.Controls.Add(this.btnHalconTool_left); + this.groupBox8.Controls.Add(this.btnConfig_left); + this.groupBox8.Dock = System.Windows.Forms.DockStyle.Top; + this.groupBox8.Location = new System.Drawing.Point(0, 0); + this.groupBox8.Name = "groupBox8"; + this.groupBox8.Size = new System.Drawing.Size(275, 65); + this.groupBox8.TabIndex = 8; + this.groupBox8.TabStop = false; + this.groupBox8.Text = "閰嶇疆"; + // + // cbxTest_left + // + this.cbxTest_left.Appearance = System.Windows.Forms.Appearance.Button; + this.cbxTest_left.Location = new System.Drawing.Point(201, 13); + this.cbxTest_left.Name = "cbxTest_left"; + this.cbxTest_left.Size = new System.Drawing.Size(55, 46); + this.cbxTest_left.TabIndex = 3; + this.cbxTest_left.Text = "娴嬭瘯"; + this.cbxTest_left.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.cbxTest_left.UseVisualStyleBackColor = true; + this.cbxTest_left.CheckedChanged += new System.EventHandler(this.cbxTest_left_CheckedChanged); + // + // btnCanCalibration_left + // + this.btnCanCalibration_left.Location = new System.Drawing.Point(140, 13); + this.btnCanCalibration_left.Name = "btnCanCalibration_left"; + this.btnCanCalibration_left.Size = new System.Drawing.Size(55, 46); + this.btnCanCalibration_left.TabIndex = 2; + this.btnCanCalibration_left.Text = "鏍囧畾"; + this.btnCanCalibration_left.UseVisualStyleBackColor = true; + this.btnCanCalibration_left.Click += new System.EventHandler(this.btnCanCalibration_left_Click); + // + // btnHalconTool_left + // + this.btnHalconTool_left.Location = new System.Drawing.Point(79, 13); + this.btnHalconTool_left.Name = "btnHalconTool_left"; + this.btnHalconTool_left.Size = new System.Drawing.Size(55, 46); + this.btnHalconTool_left.TabIndex = 1; + this.btnHalconTool_left.Text = "鍥惧儚閰嶇疆"; + this.btnHalconTool_left.UseVisualStyleBackColor = true; + this.btnHalconTool_left.Click += new System.EventHandler(this.btnHalconTool_left_Click); + // + // btnConfig_left + // + this.btnConfig_left.Location = new System.Drawing.Point(20, 13); + this.btnConfig_left.Name = "btnConfig_left"; + this.btnConfig_left.Size = new System.Drawing.Size(55, 46); + this.btnConfig_left.TabIndex = 0; + this.btnConfig_left.Text = "鍙傛暟閰嶇疆"; + this.btnConfig_left.UseVisualStyleBackColor = true; + this.btnConfig_left.Click += new System.EventHandler(this.btnConfig_left_Click); + // + // checkBox1 + // + this.checkBox1.AutoSize = true; + this.checkBox1.Location = new System.Drawing.Point(26, 535); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.Size = new System.Drawing.Size(96, 16); + this.checkBox1.TabIndex = 16; + this.checkBox1.Text = "鍚敤鎵嬪姩瀹氫綅"; + this.checkBox1.UseVisualStyleBackColor = true; + this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); + // + // button6 + // + this.button6.Enabled = false; + this.button6.Location = new System.Drawing.Point(147, 524); + this.button6.Name = "button6"; + this.button6.Size = new System.Drawing.Size(104, 36); + this.button6.TabIndex = 15; + this.button6.Text = "鎵嬪姩瀹氫綅"; + this.button6.UseVisualStyleBackColor = true; + this.button6.Click += new System.EventHandler(this.button6_Click); + // + // tabPage3 + // + this.tabPage3.Controls.Add(this.groupBox5); + this.tabPage3.Controls.Add(this.groupBox1); + this.tabPage3.Location = new System.Drawing.Point(4, 22); + this.tabPage3.Name = "tabPage3"; + this.tabPage3.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); + this.tabPage3.Size = new System.Drawing.Size(1000, 568); + this.tabPage3.TabIndex = 2; + this.tabPage3.Text = "I/O"; + this.tabPage3.UseVisualStyleBackColor = true; + // + // groupBox5 + // + this.groupBox5.Controls.Add(this.ckbSaveImage); + this.groupBox5.Controls.Add(this.lblForApple); + this.groupBox5.Controls.Add(this.lblZ_ShaChe); + this.groupBox5.Controls.Add(this.lblDingWei_SRV_ON); + this.groupBox5.Controls.Add(this.lblZ_SRV_ON); + this.groupBox5.Controls.Add(this.lblX_SRV_ON); + this.groupBox5.Controls.Add(this.lblSiFuPowerOn); + this.groupBox5.Controls.Add(this.lblHuaTaiCylider); + this.groupBox5.Controls.Add(this.lblWuGanCylider); + this.groupBox5.Controls.Add(this.lblZhengBianCylider); + this.groupBox5.Controls.Add(this.lblCeBianCylider); + this.groupBox5.Controls.Add(this.lblBuzzer); + this.groupBox5.Controls.Add(this.lblGreen); + this.groupBox5.Controls.Add(this.lblYellow); + this.groupBox5.Controls.Add(this.lblRed); + this.groupBox5.Controls.Add(this.lblWuGanCylider2); + this.groupBox5.Controls.Add(this.lblCameraLighto); + this.groupBox5.Font = new System.Drawing.Font("瀹嬩綋", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox5.Location = new System.Drawing.Point(521, 7); + this.groupBox5.Name = "groupBox5"; + this.groupBox5.Size = new System.Drawing.Size(473, 558); + this.groupBox5.TabIndex = 1; + this.groupBox5.TabStop = false; + this.groupBox5.Text = "Output"; + // + // ckbSaveImage + // + this.ckbSaveImage.AutoSize = true; + this.ckbSaveImage.Checked = true; + this.ckbSaveImage.CheckState = System.Windows.Forms.CheckState.Checked; + this.ckbSaveImage.Location = new System.Drawing.Point(45, 389); + this.ckbSaveImage.Name = "ckbSaveImage"; + this.ckbSaveImage.Size = new System.Drawing.Size(108, 20); + this.ckbSaveImage.TabIndex = 38; + this.ckbSaveImage.Text = "saveImage"; + this.ckbSaveImage.UseVisualStyleBackColor = true; + this.ckbSaveImage.CheckedChanged += new System.EventHandler(this.ckbSaveImage_CheckedChanged); + // + // lblForApple + // + this.lblForApple.AutoSize = true; + this.lblForApple.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblForApple.Location = new System.Drawing.Point(242, 225); + this.lblForApple.Name = "lblForApple"; + this.lblForApple.Size = new System.Drawing.Size(138, 19); + this.lblForApple.TabIndex = 35; + this.lblForApple.Text = "缁橝PPLE102.05"; + // + // lblZ_ShaChe + // + this.lblZ_ShaChe.AutoSize = true; + this.lblZ_ShaChe.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblZ_ShaChe.Location = new System.Drawing.Point(242, 187); + this.lblZ_ShaChe.Name = "lblZ_ShaChe"; + this.lblZ_ShaChe.Size = new System.Drawing.Size(136, 19); + this.lblZ_ShaChe.TabIndex = 34; + this.lblZ_ShaChe.Text = "Z杞村埞杞�102.04"; + // + // lblDingWei_SRV_ON + // + this.lblDingWei_SRV_ON.AutoSize = true; + this.lblDingWei_SRV_ON.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblDingWei_SRV_ON.Location = new System.Drawing.Point(242, 149); + this.lblDingWei_SRV_ON.Name = "lblDingWei_SRV_ON"; + this.lblDingWei_SRV_ON.Size = new System.Drawing.Size(186, 19); + this.lblDingWei_SRV_ON.TabIndex = 33; + this.lblDingWei_SRV_ON.Text = "瀹氫綅杞碨RV-ON102.03"; + // + // lblZ_SRV_ON + // + this.lblZ_SRV_ON.AutoSize = true; + this.lblZ_SRV_ON.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblZ_SRV_ON.Location = new System.Drawing.Point(242, 111); + this.lblZ_SRV_ON.Name = "lblZ_SRV_ON"; + this.lblZ_SRV_ON.Size = new System.Drawing.Size(158, 19); + this.lblZ_SRV_ON.TabIndex = 32; + this.lblZ_SRV_ON.Text = "Z杞碨RV-ON102.02"; + // + // lblX_SRV_ON + // + this.lblX_SRV_ON.AutoSize = true; + this.lblX_SRV_ON.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblX_SRV_ON.Location = new System.Drawing.Point(242, 73); + this.lblX_SRV_ON.Name = "lblX_SRV_ON"; + this.lblX_SRV_ON.Size = new System.Drawing.Size(158, 19); + this.lblX_SRV_ON.TabIndex = 31; + this.lblX_SRV_ON.Text = "X杞碨RV-ON102.01"; + // + // lblSiFuPowerOn + // + this.lblSiFuPowerOn.AutoSize = true; + this.lblSiFuPowerOn.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblSiFuPowerOn.Location = new System.Drawing.Point(242, 35); + this.lblSiFuPowerOn.Name = "lblSiFuPowerOn"; + this.lblSiFuPowerOn.Size = new System.Drawing.Size(145, 19); + this.lblSiFuPowerOn.TabIndex = 30; + this.lblSiFuPowerOn.Text = "浼烘湇涓婄數102.00"; + // + // lblHuaTaiCylider + // + this.lblHuaTaiCylider.AutoSize = true; + this.lblHuaTaiCylider.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblHuaTaiCylider.Location = new System.Drawing.Point(41, 300); + this.lblHuaTaiCylider.Name = "lblHuaTaiCylider"; + this.lblHuaTaiCylider.Size = new System.Drawing.Size(145, 19); + this.lblHuaTaiCylider.TabIndex = 29; + this.lblHuaTaiCylider.Text = "婊戝彴姘旂几101.07"; + // + // lblWuGanCylider + // + this.lblWuGanCylider.AutoSize = true; + this.lblWuGanCylider.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblWuGanCylider.Location = new System.Drawing.Point(41, 262); + this.lblWuGanCylider.Name = "lblWuGanCylider"; + this.lblWuGanCylider.Size = new System.Drawing.Size(145, 19); + this.lblWuGanCylider.TabIndex = 28; + this.lblWuGanCylider.Text = "鏃犳潌姘旂几101.06"; + // + // lblZhengBianCylider + // + this.lblZhengBianCylider.AutoSize = true; + this.lblZhengBianCylider.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblZhengBianCylider.Location = new System.Drawing.Point(41, 224); + this.lblZhengBianCylider.Name = "lblZhengBianCylider"; + this.lblZhengBianCylider.Size = new System.Drawing.Size(145, 19); + this.lblZhengBianCylider.TabIndex = 27; + this.lblZhengBianCylider.Text = "姝h竟姘旂几101.05"; + // + // lblCeBianCylider + // + this.lblCeBianCylider.AutoSize = true; + this.lblCeBianCylider.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblCeBianCylider.Location = new System.Drawing.Point(41, 186); + this.lblCeBianCylider.Name = "lblCeBianCylider"; + this.lblCeBianCylider.Size = new System.Drawing.Size(145, 19); + this.lblCeBianCylider.TabIndex = 26; + this.lblCeBianCylider.Text = "渚ц竟姘旂几101.04"; + // + // lblBuzzer + // + this.lblBuzzer.AutoSize = true; + this.lblBuzzer.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblBuzzer.Location = new System.Drawing.Point(41, 149); + this.lblBuzzer.Name = "lblBuzzer"; + this.lblBuzzer.Size = new System.Drawing.Size(107, 19); + this.lblBuzzer.TabIndex = 25; + this.lblBuzzer.Text = "铚傞福101.03"; + // + // lblGreen + // + this.lblGreen.AutoSize = true; + this.lblGreen.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblGreen.Location = new System.Drawing.Point(41, 111); + this.lblGreen.Name = "lblGreen"; + this.lblGreen.Size = new System.Drawing.Size(107, 19); + this.lblGreen.TabIndex = 24; + this.lblGreen.Text = "缁跨伅101.02"; + // + // lblYellow + // + this.lblYellow.AutoSize = true; + this.lblYellow.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblYellow.Location = new System.Drawing.Point(41, 73); + this.lblYellow.Name = "lblYellow"; + this.lblYellow.Size = new System.Drawing.Size(107, 19); + this.lblYellow.TabIndex = 23; + this.lblYellow.Text = "榛勭伅101.01"; + // + // lblRed + // + this.lblRed.AutoSize = true; + this.lblRed.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblRed.Location = new System.Drawing.Point(41, 35); + this.lblRed.Name = "lblRed"; + this.lblRed.Size = new System.Drawing.Size(107, 19); + this.lblRed.TabIndex = 22; + this.lblRed.Text = "绾㈢伅101.00"; + // + // lblWuGanCylider2 + // + this.lblWuGanCylider2.AutoSize = true; + this.lblWuGanCylider2.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblWuGanCylider2.Location = new System.Drawing.Point(242, 301); + this.lblWuGanCylider2.Name = "lblWuGanCylider2"; + this.lblWuGanCylider2.Size = new System.Drawing.Size(184, 19); + this.lblWuGanCylider2.TabIndex = 37; + this.lblWuGanCylider2.Text = "鏃犳潌姘旂几浣�2 102.07"; + // + // lblCameraLighto + // + this.lblCameraLighto.AutoSize = true; + this.lblCameraLighto.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblCameraLighto.Location = new System.Drawing.Point(242, 263); + this.lblCameraLighto.Name = "lblCameraLighto"; + this.lblCameraLighto.Size = new System.Drawing.Size(145, 19); + this.lblCameraLighto.TabIndex = 36; + this.lblCameraLighto.Text = "鐩告満鍏夋簮102.06"; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.lblWuGanHou); + this.groupBox1.Controls.Add(this.lblWuGanQian); + this.groupBox1.Controls.Add(this.lblCeBianHou); + this.groupBox1.Controls.Add(this.lblCeBianQian); + this.groupBox1.Controls.Add(this.lblOpenJieJin); + this.groupBox1.Controls.Add(this.lblSafeCurtain); + this.groupBox1.Controls.Add(this.lblE_Stop); + this.groupBox1.Controls.Add(this.lblReset); + this.groupBox1.Controls.Add(this.lblStart2); + this.groupBox1.Controls.Add(this.lblStart1); + this.groupBox1.Controls.Add(this.lblDingWei_Alarm); + this.groupBox1.Controls.Add(this.lblDingWei_JinDian); + this.groupBox1.Controls.Add(this.lblDingWei_CCW); + this.groupBox1.Controls.Add(this.lblDingWei_CW); + this.groupBox1.Controls.Add(this.lblZ_CCW); + this.groupBox1.Controls.Add(this.lblZ_CW); + this.groupBox1.Controls.Add(this.lblX_CCW); + this.groupBox1.Controls.Add(this.lblX_CW); + this.groupBox1.Controls.Add(this.lblZ_Alarm); + this.groupBox1.Controls.Add(this.lblX_Alarm); + this.groupBox1.Controls.Add(this.lblZ_JinDian); + this.groupBox1.Controls.Add(this.lblX_JinDian); + this.groupBox1.Font = new System.Drawing.Font("瀹嬩綋", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.groupBox1.Location = new System.Drawing.Point(8, 6); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(506, 559); + this.groupBox1.TabIndex = 0; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Input"; + // + // lblWuGanHou + // + this.lblWuGanHou.AutoSize = true; + this.lblWuGanHou.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblWuGanHou.Location = new System.Drawing.Point(328, 334); + this.lblWuGanHou.Name = "lblWuGanHou"; + this.lblWuGanHou.Size = new System.Drawing.Size(163, 19); + this.lblWuGanHou.TabIndex = 21; + this.lblWuGanHou.Text = "鏃犳潌姘旂几鍚庨檺2.05"; + // + // lblWuGanQian + // + this.lblWuGanQian.AutoSize = true; + this.lblWuGanQian.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblWuGanQian.Location = new System.Drawing.Point(328, 301); + this.lblWuGanQian.Name = "lblWuGanQian"; + this.lblWuGanQian.Size = new System.Drawing.Size(163, 19); + this.lblWuGanQian.TabIndex = 20; + this.lblWuGanQian.Text = "鏃犳潌姘旂几鍓嶉檺2.04"; + // + // lblCeBianHou + // + this.lblCeBianHou.AutoSize = true; + this.lblCeBianHou.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblCeBianHou.Location = new System.Drawing.Point(328, 268); + this.lblCeBianHou.Name = "lblCeBianHou"; + this.lblCeBianHou.Size = new System.Drawing.Size(163, 19); + this.lblCeBianHou.TabIndex = 19; + this.lblCeBianHou.Text = "渚ц竟姘旂几鍚庨檺2.01"; + // + // lblCeBianQian + // + this.lblCeBianQian.AutoSize = true; + this.lblCeBianQian.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblCeBianQian.Location = new System.Drawing.Point(328, 234); + this.lblCeBianQian.Name = "lblCeBianQian"; + this.lblCeBianQian.Size = new System.Drawing.Size(163, 19); + this.lblCeBianQian.TabIndex = 18; + this.lblCeBianQian.Text = "渚ц竟姘旂几鍓嶉檺2.00"; + // + // lblOpenJieJin + // + this.lblOpenJieJin.AutoSize = true; + this.lblOpenJieJin.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblOpenJieJin.Location = new System.Drawing.Point(328, 201); + this.lblOpenJieJin.Name = "lblOpenJieJin"; + this.lblOpenJieJin.Size = new System.Drawing.Size(163, 19); + this.lblOpenJieJin.TabIndex = 17; + this.lblOpenJieJin.Text = "鎵撳紑鎺ヨ繎寮�鍏�1.11"; + // + // lblSafeCurtain + // + this.lblSafeCurtain.AutoSize = true; + this.lblSafeCurtain.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblSafeCurtain.Location = new System.Drawing.Point(328, 168); + this.lblSafeCurtain.Name = "lblSafeCurtain"; + this.lblSafeCurtain.Size = new System.Drawing.Size(125, 19); + this.lblSafeCurtain.TabIndex = 16; + this.lblSafeCurtain.Text = "瀹夊叏鍏夊箷1.10"; + // + // lblE_Stop + // + this.lblE_Stop.AutoSize = true; + this.lblE_Stop.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblE_Stop.Location = new System.Drawing.Point(328, 135); + this.lblE_Stop.Name = "lblE_Stop"; + this.lblE_Stop.Size = new System.Drawing.Size(87, 19); + this.lblE_Stop.TabIndex = 15; + this.lblE_Stop.Text = "鎬ュ仠1.09"; + // + // lblReset + // + this.lblReset.AutoSize = true; + this.lblReset.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblReset.Location = new System.Drawing.Point(328, 102); + this.lblReset.Name = "lblReset"; + this.lblReset.Size = new System.Drawing.Size(87, 19); + this.lblReset.TabIndex = 14; + this.lblReset.Text = "澶嶄綅1.08"; + // + // lblStart2 + // + this.lblStart2.AutoSize = true; + this.lblStart2.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblStart2.Location = new System.Drawing.Point(328, 68); + this.lblStart2.Name = "lblStart2"; + this.lblStart2.Size = new System.Drawing.Size(107, 19); + this.lblStart2.TabIndex = 13; + this.lblStart2.Text = "鍚姩2 1.07"; + // + // lblStart1 + // + this.lblStart1.AutoSize = true; + this.lblStart1.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblStart1.Location = new System.Drawing.Point(328, 35); + this.lblStart1.Name = "lblStart1"; + this.lblStart1.Size = new System.Drawing.Size(107, 19); + this.lblStart1.TabIndex = 12; + this.lblStart1.Text = "鍚姩1 1.06"; + // + // lblDingWei_Alarm + // + this.lblDingWei_Alarm.AutoSize = true; + this.lblDingWei_Alarm.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblDingWei_Alarm.Location = new System.Drawing.Point(52, 336); + this.lblDingWei_Alarm.Name = "lblDingWei_Alarm"; + this.lblDingWei_Alarm.Size = new System.Drawing.Size(156, 19); + this.lblDingWei_Alarm.TabIndex = 11; + this.lblDingWei_Alarm.Text = "瀹氫綅杞碅larm1.02"; + // + // lblDingWei_JinDian + // + this.lblDingWei_JinDian.AutoSize = true; + this.lblDingWei_JinDian.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblDingWei_JinDian.Location = new System.Drawing.Point(52, 253); + this.lblDingWei_JinDian.Name = "lblDingWei_JinDian"; + this.lblDingWei_JinDian.Size = new System.Drawing.Size(144, 19); + this.lblDingWei_JinDian.TabIndex = 10; + this.lblDingWei_JinDian.Text = "瀹氫綅杞磋繎鐐�1.01"; + // + // lblDingWei_CCW + // + this.lblDingWei_CCW.AutoSize = true; + this.lblDingWei_CCW.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblDingWei_CCW.Location = new System.Drawing.Point(52, 308); + this.lblDingWei_CCW.Name = "lblDingWei_CCW"; + this.lblDingWei_CCW.Size = new System.Drawing.Size(136, 19); + this.lblDingWei_CCW.TabIndex = 9; + this.lblDingWei_CCW.Text = "瀹氫綅杞碈CW0.11"; + // + // lblDingWei_CW + // + this.lblDingWei_CW.AutoSize = true; + this.lblDingWei_CW.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblDingWei_CW.Location = new System.Drawing.Point(52, 281); + this.lblDingWei_CW.Name = "lblDingWei_CW"; + this.lblDingWei_CW.Size = new System.Drawing.Size(126, 19); + this.lblDingWei_CW.TabIndex = 8; + this.lblDingWei_CW.Text = "瀹氫綅杞碈W0.10"; + // + // lblZ_CCW + // + this.lblZ_CCW.AutoSize = true; + this.lblZ_CCW.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblZ_CCW.Location = new System.Drawing.Point(52, 198); + this.lblZ_CCW.Name = "lblZ_CCW"; + this.lblZ_CCW.Size = new System.Drawing.Size(108, 19); + this.lblZ_CCW.TabIndex = 7; + this.lblZ_CCW.Text = "Z杞碈CW0.09"; + // + // lblZ_CW + // + this.lblZ_CW.AutoSize = true; + this.lblZ_CW.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblZ_CW.Location = new System.Drawing.Point(52, 170); + this.lblZ_CW.Name = "lblZ_CW"; + this.lblZ_CW.Size = new System.Drawing.Size(98, 19); + this.lblZ_CW.TabIndex = 6; + this.lblZ_CW.Text = "Z杞碈W0.08"; + // + // lblX_CCW + // + this.lblX_CCW.AutoSize = true; + this.lblX_CCW.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblX_CCW.Location = new System.Drawing.Point(52, 87); + this.lblX_CCW.Name = "lblX_CCW"; + this.lblX_CCW.Size = new System.Drawing.Size(108, 19); + this.lblX_CCW.TabIndex = 5; + this.lblX_CCW.Text = "X杞碈CW0.07"; + // + // lblX_CW + // + this.lblX_CW.AutoSize = true; + this.lblX_CW.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblX_CW.Location = new System.Drawing.Point(52, 59); + this.lblX_CW.Name = "lblX_CW"; + this.lblX_CW.Size = new System.Drawing.Size(98, 19); + this.lblX_CW.TabIndex = 4; + this.lblX_CW.Text = "X杞碈W0.06"; + // + // lblZ_Alarm + // + this.lblZ_Alarm.AutoSize = true; + this.lblZ_Alarm.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblZ_Alarm.Location = new System.Drawing.Point(52, 225); + this.lblZ_Alarm.Name = "lblZ_Alarm"; + this.lblZ_Alarm.Size = new System.Drawing.Size(128, 19); + this.lblZ_Alarm.TabIndex = 3; + this.lblZ_Alarm.Text = "Z杞碅larm0.05"; + // + // lblX_Alarm + // + this.lblX_Alarm.AutoSize = true; + this.lblX_Alarm.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblX_Alarm.Location = new System.Drawing.Point(52, 114); + this.lblX_Alarm.Name = "lblX_Alarm"; + this.lblX_Alarm.Size = new System.Drawing.Size(128, 19); + this.lblX_Alarm.TabIndex = 2; + this.lblX_Alarm.Text = "X杞碅larm0.04"; + // + // lblZ_JinDian + // + this.lblZ_JinDian.AutoSize = true; + this.lblZ_JinDian.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblZ_JinDian.Location = new System.Drawing.Point(52, 142); + this.lblZ_JinDian.Name = "lblZ_JinDian"; + this.lblZ_JinDian.Size = new System.Drawing.Size(116, 19); + this.lblZ_JinDian.TabIndex = 1; + this.lblZ_JinDian.Text = "Z杞磋繎鐐�0.03"; + // + // lblX_JinDian + // + this.lblX_JinDian.AutoSize = true; + this.lblX_JinDian.Font = new System.Drawing.Font("瀹嬩綋", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.lblX_JinDian.Location = new System.Drawing.Point(52, 31); + this.lblX_JinDian.Name = "lblX_JinDian"; + this.lblX_JinDian.Size = new System.Drawing.Size(116, 19); + this.lblX_JinDian.TabIndex = 0; + this.lblX_JinDian.Text = "X杞磋繎鐐�0.01"; + // + // tVideo_left + // + this.tVideo_left.Interval = 250; + this.tVideo_left.Tick += new System.EventHandler(this.tVideo_left_Tick); + // + // cboSize + // + this.cboSize.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cboSize.FormattingEnabled = true; + this.cboSize.Location = new System.Drawing.Point(39, 19); + this.cboSize.Margin = new System.Windows.Forms.Padding(2); + this.cboSize.Name = "cboSize"; + this.cboSize.Size = new System.Drawing.Size(215, 20); + this.cboSize.TabIndex = 5; + this.cboSize.SelectionChangeCommitted += new System.EventHandler(this.cboSize_SelectionChangeCommitted); + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(5, 21); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(29, 12); + this.label11.TabIndex = 4; + this.label11.Text = "灏哄"; + // + // cboSize_Left + // + this.cboSize_Left.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cboSize_Left.FormattingEnabled = true; + this.cboSize_Left.Location = new System.Drawing.Point(41, 19); + this.cboSize_Left.Margin = new System.Windows.Forms.Padding(2); + this.cboSize_Left.Name = "cboSize_Left"; + this.cboSize_Left.Size = new System.Drawing.Size(215, 20); + this.cboSize_Left.TabIndex = 7; + this.cboSize_Left.SelectionChangeCommitted += new System.EventHandler(this.cboSize_Left_SelectionChangeCommitted); + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(7, 21); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(29, 12); + this.label12.TabIndex = 6; + this.label12.Text = "灏哄"; + // + // frmMain + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1081, 769); + this.Controls.Add(this.tabControl1); + this.Controls.Add(this.panel1); + this.Controls.Add(this.statusStrip1); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.KeyPreview = true; + this.Name = "frmMain"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "LLMF"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmMain_FormClosing); + this.Load += new System.EventHandler(this.frmMain_Load); + this.statusStrip1.ResumeLayout(false); + this.statusStrip1.PerformLayout(); + this.panel1.ResumeLayout(false); + this.toolStrip1.ResumeLayout(false); + this.toolStrip1.PerformLayout(); + this.panel2.ResumeLayout(false); + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); + this.gbxTest.ResumeLayout(false); + this.gbxTest.PerformLayout(); + this.gbxCalibration.ResumeLayout(false); + this.gbxCalibration.PerformLayout(); + this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + this.groupBox2.ResumeLayout(false); + this.tabControl1.ResumeLayout(false); + this.tabPage2.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); + this.panel4.ResumeLayout(false); + this.panel5.ResumeLayout(false); + this.panel5.PerformLayout(); + this.gbxTest_left.ResumeLayout(false); + this.gbxTest_left.PerformLayout(); + this.gbxCalibration_left.ResumeLayout(false); + this.gbxCalibration_left.PerformLayout(); + this.groupBox6.ResumeLayout(false); + this.groupBox6.PerformLayout(); + this.groupBox7.ResumeLayout(false); + this.groupBox7.PerformLayout(); + this.groupBox8.ResumeLayout(false); + this.tabPage3.ResumeLayout(false); + this.groupBox5.ResumeLayout(false); + this.groupBox5.PerformLayout(); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.StatusStrip statusStrip1; + private System.Windows.Forms.ToolStripStatusLabel tsslOPC; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Panel panel3; + private HalconDotNet.HWindowControl viewPort; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Button btnDisplay; + private System.Windows.Forms.Button btnHalconTool; + private System.Windows.Forms.Button btnConfig; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.TextBox txtSN; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label lblAngleDisplay; + private System.Windows.Forms.GroupBox gbxCalibration; + private System.Windows.Forms.Button btnCapture; + private System.Windows.Forms.Button btnCalibration; + private System.Windows.Forms.TextBox txtCalAngle; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Button btnCanCalibration; + private System.Windows.Forms.Timer tVideo; + private System.Windows.Forms.GroupBox gbxTest; + private System.Windows.Forms.Button btnStopCapture; + private System.Windows.Forms.Button btnContinueCapture; + private System.Windows.Forms.Button btnTestMove; + private System.Windows.Forms.TextBox txtTestPulse; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.CheckBox cbxTest; + private System.Windows.Forms.TextBox txtResultFinalAngle; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.TextBox txtResultInitAngle; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.CheckBox ckbCameraLight; + private System.Windows.Forms.Button btnORI; + private System.Windows.Forms.ToolStripStatusLabel tsllPositionlabel; + private System.Windows.Forms.ToolStripStatusLabel tsslPosition_left; + private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1; + private System.Windows.Forms.ToolStripStatusLabel tsslAlarm; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.Panel panel5; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Label lblAngleDisplay_left; + private HalconDotNet.HWindowControl viewPort_left; + private System.Windows.Forms.GroupBox gbxTest_left; + private System.Windows.Forms.Button btnORI_left; + private System.Windows.Forms.CheckBox ckbCameraLight_left; + private System.Windows.Forms.Button btnTestMove_left; + private System.Windows.Forms.TextBox txtTestPulse_left; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Button btnStopCapture_left; + private System.Windows.Forms.Button btnContinueCapture_left; + private System.Windows.Forms.GroupBox gbxCalibration_left; + private System.Windows.Forms.Button btnCalibration_left; + private System.Windows.Forms.TextBox txtCalAngle_left; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Button btnCapture_left; + private System.Windows.Forms.GroupBox groupBox6; + private System.Windows.Forms.TextBox txtSN_left; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.GroupBox groupBox7; + private System.Windows.Forms.TextBox txtResultFinalAngle_left; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.TextBox txtResultInitAngle_left; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.GroupBox groupBox8; + private System.Windows.Forms.CheckBox cbxTest_left; + private System.Windows.Forms.Button btnCanCalibration_left; + private System.Windows.Forms.Button btnHalconTool_left; + private System.Windows.Forms.Button btnConfig_left; + private System.Windows.Forms.Button btnDisplay_left; + private System.Windows.Forms.Timer tVideo_left; + private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel2; + private System.Windows.Forms.ToolStripStatusLabel tsslPosition; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button btnOut; + private System.Windows.Forms.Button btnCloseDor; + private System.Windows.Forms.Button btnOpenDor; + private System.Windows.Forms.Button button6; + private System.Windows.Forms.Button button5; + private System.Windows.Forms.Button button4; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button7; + private System.Windows.Forms.Button button8; + private System.Windows.Forms.Button button9; + private System.Windows.Forms.Button button10; + private System.Windows.Forms.Button button11; + private System.Windows.Forms.Button button12; + private System.Windows.Forms.Button button13; + private System.Windows.Forms.Button button14; + private System.Windows.Forms.Button button15; + private System.Windows.Forms.CheckBox checkBox1; + private System.Windows.Forms.CheckBox checkBox2; + private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel3; + private System.Windows.Forms.ToolStripStatusLabel tsslAlarm_Left; + private System.Windows.Forms.Button button16; + private System.Windows.Forms.ToolStrip toolStrip1; + private System.Windows.Forms.ToolStripButton toolStripMaxMin; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripButton tspBtnOpenImageFile; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; + private System.Windows.Forms.ToolStripButton toolStripModeBtn; + private System.Windows.Forms.ToolStripLabel toolStripModeLabel; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; + private System.Windows.Forms.ToolStripButton toolStripButton5; + private System.Windows.Forms.ToolStripLabel tsplabelProductName; + private System.Windows.Forms.ToolStripButton tspbtnExit; + private System.Windows.Forms.ToolStripButton tspBtnHelp; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator6; + private System.Windows.Forms.TabPage tabPage3; + private System.Windows.Forms.GroupBox groupBox5; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Label lblZ_Alarm; + private System.Windows.Forms.Label lblX_Alarm; + private System.Windows.Forms.Label lblZ_JinDian; + private System.Windows.Forms.Label lblX_JinDian; + private System.Windows.Forms.Label lblWuGanCylider2; + private System.Windows.Forms.Label lblCameraLighto; + private System.Windows.Forms.Label lblForApple; + private System.Windows.Forms.Label lblZ_ShaChe; + private System.Windows.Forms.Label lblDingWei_SRV_ON; + private System.Windows.Forms.Label lblZ_SRV_ON; + private System.Windows.Forms.Label lblX_SRV_ON; + private System.Windows.Forms.Label lblSiFuPowerOn; + private System.Windows.Forms.Label lblHuaTaiCylider; + private System.Windows.Forms.Label lblWuGanCylider; + private System.Windows.Forms.Label lblZhengBianCylider; + private System.Windows.Forms.Label lblCeBianCylider; + private System.Windows.Forms.Label lblBuzzer; + private System.Windows.Forms.Label lblGreen; + private System.Windows.Forms.Label lblYellow; + private System.Windows.Forms.Label lblRed; + private System.Windows.Forms.Label lblWuGanHou; + private System.Windows.Forms.Label lblWuGanQian; + private System.Windows.Forms.Label lblCeBianHou; + private System.Windows.Forms.Label lblCeBianQian; + private System.Windows.Forms.Label lblOpenJieJin; + private System.Windows.Forms.Label lblSafeCurtain; + private System.Windows.Forms.Label lblE_Stop; + private System.Windows.Forms.Label lblReset; + private System.Windows.Forms.Label lblStart2; + private System.Windows.Forms.Label lblStart1; + private System.Windows.Forms.Label lblDingWei_Alarm; + private System.Windows.Forms.Label lblDingWei_JinDian; + private System.Windows.Forms.Label lblDingWei_CCW; + private System.Windows.Forms.Label lblDingWei_CW; + private System.Windows.Forms.Label lblZ_CCW; + private System.Windows.Forms.Label lblZ_CW; + private System.Windows.Forms.Label lblX_CCW; + private System.Windows.Forms.Label lblX_CW; + private System.Windows.Forms.CheckBox ckbSaveImage; + private System.Windows.Forms.ComboBox cboSize; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.ComboBox cboSize_Left; + private System.Windows.Forms.Label label12; + } +} + diff --git a/LLMF/frmMain.cs b/LLMF/frmMain.cs new file mode 100644 index 0000000..312b598 --- /dev/null +++ b/LLMF/frmMain.cs @@ -0,0 +1,2202 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Drawing; +using System.Windows.Forms; +using System.IO; +using System.Threading; +using HalconDotNet; +using HalconTools; +using PointGreyAndHalcon; +using System.Diagnostics; +using SuperDog; +using Microsoft.Win32; + +namespace LLMF +{ + public partial class frmMain : Form + { + #region 瀹氫箟 + + //private LogHelper log = LogHelper.GetInstance(); + + string configPath = Application.StartupPath + "\\Config.xml"; + ConfigStruct config; + ToolKit.FileToolkit.SerializeFileTool<ConfigStruct> sft = new ToolKit.FileToolkit.SerializeFileTool<ConfigStruct>(); + + OPC opc; + + string camConfigPath = Application.StartupPath + "\\camConfig.xml"; + PointGreyAndHalcon.PointGreyAndHalcon cam; + PointGreyAndHalcon.PointGreyAndHalcon cam_left; + + HalconTool ht = new HalconTool(); + HalconTool ht_left = new HalconTool(); + + RunStatus runStatus = RunStatus.Normal; + RunStatus runStatus_left = RunStatus.Normal; + + double initAngle = 0; + double finalAngle = 0; + double initAngle_left = 0; + double finalAngle_left = 0; + bool booltemAngle = false; + Stopwatch sw = new Stopwatch(); + + HTuple ImageHeight = new HTuple(); + HTuple ImageWidth = new HTuple(); + + bool isLeftCameraOpen = false; + bool isRightCameraOpen = false; + bool isDoorOpen = false; + //bool isCylinderLoosen = false; + //bool isCylinder2Loosen = false; + bool isUUTOut = false; + bool isRealyOK = false; + + #endregion + WelcomeUser m_WelcomeForm = new WelcomeUser(); //娆㈣繋鐣岄潰 + public frmMain() + { + InitializeComponent(); + } + + private void frmMain_Load(object sender, EventArgs e) + { + m_WelcomeForm.Show(); //鏄剧ず娆㈣繋鐣岄潰 + // m_WelcomeForm.ProgressBar1.Value = 0; //娆㈣繋鐣岄潰杩涘害鏉� + Application.DoEvents(); //澶勭悊鎵�鏈夌殑褰撳墠鍦ㄦ秷鎭槦鍒椾腑鐨刉indows娑堟伅銆� + + Log.WriteLog("App main form loading"); + + initConfig(); + if (config.leftUsed) + { + Log.WriteLog("App main form load leftUsed"); + tabPage2.Parent = null; + initCam_Left(); + initHalconTool_Left(); + tabControl1.TabPages[0].Select(); + } + + if (config.rightUsed) + { + Log.WriteLog("App main form load rightUsed"); + tabPage1.Parent = null; + initCam_Right(); + initHalconTool(); + tabControl1.TabPages[0].Select(); + } + initOPC(); + + m_WelcomeForm.Close();// + m_WelcomeForm = null; //娓呯┖鍐呭瓨 + } + + + /// <summary> + /// 寤虹珛Tag涓嶤ontrol涔嬮棿鐨勮仈绯� + /// </summary> + + private void MapTagToControl() + { + Log.WriteLog("MapTagToControl Enter"); + + opc.itemReadDict[InputTag.X_JinDian].control = lblX_JinDian; + opc.itemReadDict[InputTag.Z_JinDian].control =lblZ_JinDian; + opc.itemReadDict[InputTag.X_Alarm].control =lblX_Alarm; + opc.itemReadDict[InputTag.Z_Alarm].control = lblZ_Alarm; + opc.itemReadDict[InputTag.X_CW].control = lblX_CW; + opc.itemReadDict[InputTag.X_CCW].control = lblX_CCW; + opc.itemReadDict[InputTag.Z_CW].control = lblZ_CW; + opc.itemReadDict[InputTag.Z_CCW].control =lblZ_CCW; + opc.itemReadDict[InputTag.DingWei_CW].control = lblDingWei_CW; + opc.itemReadDict[InputTag.DingWei_CCW].control = lblDingWei_CCW; + opc.itemReadDict[InputTag.DingWei_JinDian].control = lblDingWei_JinDian; + opc.itemReadDict[InputTag.DingWei_Alarm].control = lblDingWei_Alarm; + + opc.itemReadDict[InputTag.Start1].control = lblStart1; + opc.itemReadDict[InputTag.Start2].control = lblStart2; + opc.itemReadDict[InputTag.Reset].control = lblReset; + opc.itemReadDict[InputTag.E_Stop].control = lblE_Stop; + opc.itemReadDict[InputTag.SafeCurtain].control = lblSafeCurtain; + opc.itemReadDict[InputTag.OpenJieJin].control = lblOpenJieJin; + opc.itemReadDict[InputTag.CeBianQian].control =lblCeBianQian; + opc.itemReadDict[InputTag.CeBianHou].control = lblCeBianHou; + opc.itemReadDict[InputTag.WuGanQian].control = lblWuGanQian; + opc.itemReadDict[InputTag.WuGanHou].control = lblWuGanHou; + + + //OutPut I/O鐣岄潰鏄剧ず + + opc.itemWriteDict[OutputTag.CeBianCylider].control = lblCeBianCylider; + opc.itemWriteDict[OutputTag.ZhengBianCylider].control = lblZhengBianCylider; + opc.itemWriteDict[OutputTag.WuGanCylider].control = lblWuGanCylider; + opc.itemWriteDict[OutputTag.HuaTaiCylider].control = lblHuaTaiCylider; + opc.itemWriteDict[OutputTag.SiFuPowerOn].control = lblSiFuPowerOn; + opc.itemWriteDict[OutputTag.X_SRV_ON].control = lblX_SRV_ON; + opc.itemWriteDict[OutputTag.Z_SRV_ON].control = lblZ_SRV_ON; + opc.itemWriteDict[OutputTag.DingWei_SRV_ON].control = lblDingWei_SRV_ON; + opc.itemWriteDict[OutputTag.Red].control = lblRed; + opc.itemWriteDict[OutputTag.Yellow].control = lblYellow; + opc.itemWriteDict[OutputTag.Green].control = lblGreen; + opc.itemWriteDict[OutputTag.Buzzer].control = lblBuzzer; + opc.itemWriteDict[OutputTag.Z_ShaChe].control = lblZ_ShaChe; + opc.itemWriteDict[OutputTag.ForApple].control = lblForApple; + opc.itemWriteDict[OutputTag.CameraLighto].control = lblCameraLighto; + opc.itemWriteDict[OutputTag.WuGanCylider2].control = lblWuGanCylider2; + + Log.WriteLog("MapTagToControl Leave"); + } + + + #region 鍒濆鍖� + /// <summary> + /// 鍔犺浇閰嶇疆鏂囦欢 + /// </summary> + private void initConfig() + { + Log.WriteLog("InitConfig configpath: " + configPath); + + if (File.Exists(configPath)) + { + config = sft.GetConfig(configPath); + } + else + { + config = new ConfigStruct(); + + config.angleOffset = 0; + config.opcConfig.itmHandleClient = 1234; + config.opcConfig.serverIP = "127.0.0.1"; + config.opcConfig.serverName = "KEPware.KEPServerEx.V4"; + config.opcConfig.groupProperty.defaultGroupDeadband = 0; + config.opcConfig.groupProperty.defaultGroupIsActive = true; + config.opcConfig.groupProperty.isActive = true; + config.opcConfig.groupProperty.isSubscribed = true; + config.opcConfig.groupProperty.updateRate = 300; + config.title = "LLMF V1.1"; + config.cams = new CamerasConfig(); + config.cams.SerialNumber = new uint[1]; + config.cams.SerialNumber[0] = 11111111; + config.password = "1"; + config.minAngle = 119; + config.maxAngle = 121; + config.pulsePerDegree = 500; + config.calAngle = 120; + config.saveImage = true; + sft.SetConfig(configPath, config); + } + this.tsplabelProductName.Text = config.title; + this.txtCalAngle.Text = config.calAngle.ToString(); + this.txtCalAngle_left.Text = config.calAngle.ToString(); + this.ckbSaveImage.Checked = config.saveImage; + + List<string> list = new List<string>(); + list.Add("inch13"); + list.Add("inch15"); + list.Add("inch16"); + if (config.leftUsed) + { + cboSize_Left.DataSource = list; + cboSize_Left.SelectedIndex = config.selectedSizeIndex; + } + if (config.rightUsed) + { + cboSize.DataSource = list; + cboSize.SelectedIndex = config.selectedSizeIndex; + } + } + + /// <summary> + /// 鍔犺浇鐩告満 + /// </summary> + private void initCam_Right() + { + Log.WriteLog("initCam_Right Enter"); + + cam = new PointGreyAndHalcon.PointGreyAndHalcon(); + isRightCameraOpen = cam.OpenCamera(config.cams.SerialNumber[1]); + cam.GrabImageDone += new GrabImageDoneDelegate(cam_GrabImageDone); + + Log.WriteLog("initCam_Right Leave"); + } + + + /// <summary> + /// 鍔犺浇HalconTool + /// </summary> + private void initHalconTool() + { + Log.WriteLog("initHalconTool Enter"); + + ht.LoadJobs(); + ht.resultCreater.ListenEvent += new EventHandler<HalconTools.ListenEventArgs>(resultCreater_ListenEvent); + + Log.WriteLog("initHalconTool Leave"); + } + + + + /// <summary> + /// 鍔犺浇OPC + /// </summary> + private void initOPC() + { + Log.WriteLog("initOPC Enter"); + + ConnectToOpc(); + UpdateOPC(); + MapTagToControl(); + opc.listenEventCreater.ListenEvent += new EventHandler<EventTool.ListenEventArgs>(listenEventCreater_ListenEvent); + opc.listenEventCreater.ListenEvent += new EventHandler<EventTool.ListenEventArgs>(listenOutTageEventCreater_ListenEvent); + + Log.WriteLog("initOPC Leave"); + } + + #endregion + + #region 鍚勭浜嬩欢 + + void cam_GrabImageDone(string recData, HImage recImage) + { + Log.WriteLog("cam_GrabImageDone Enter"); + + Log.WriteLog("cam_GrabImageDone recData: " + runStatus.ToString()); + + lock (GetMutexLock_Right()) + { + Log.WriteLog("cam_GrabImageDone lock GetMutexLock_Right enter"); + + this.BeginInvoke(new MethodInvoker(delegate + { + Log.WriteLog("cam_GrabImageDone ui thread proccess begin"); + + switch (recData) + { + case "GrabSuccess": + //cam.image = recImage; + Log.WriteLog("cam_GrabImageDone GrabSuccess begin"); + + Log.WriteLog("cam_GrabImageDone GrabSuccess updateImage"); + + cam.UpdateImage(viewPort); + + Log.WriteLog("cam_GrabImageDone GrabSuccess save image file"); + if (runStatus != RunStatus.continueCapture) + { + #region 淇濆瓨鍥剧墖 + string FolderPath = "D:\\Image\\" + DateTime.Now.ToString("yyyyMMdd"); + string fileName = txtSN.Text.Trim() + "-" + DateTime.Now.ToString("HHmmssffff"); + + if (!Directory.Exists(FolderPath)) Directory.CreateDirectory(FolderPath); + cam.SaveImage(FolderPath, fileName); + #endregion + } + + ht.JobImage.Dispose(); + Log.WriteLog("cam_GrabImageDone GrabSuccess getimage info"); + + ht.JobImage = recImage.CopyImage(); + HOperatorSet.GetImageSize(ht.JobImage, out ImageWidth, out ImageHeight); + ht.JobResults.Clear(); + + Log.WriteLog("cam_GrabImageDone GrabSuccess run JobLLMF"); + ht.Run("JobLLMF"); + + Log.WriteLog("cam_GrabImageDone GrabSuccess end"); + break; + + case "GrabFail": + Log.WriteLog("cam_GrabImageDone GrabFail"); + break; + } + + recImage.Dispose(); + + Log.WriteLog("cam_GrabImageDone ui thread proccess end"); + })); + GC.Collect();//c#鍥炴敹绯荤粺 + } + + Log.WriteLog("cam_GrabImageDone Leave"); + } + + void cam_left_GrabImageDone(string recData, HImage recImage) + { + Log.WriteLog("cam_left_GrabImageDone Enter"); + + Log.WriteLog("cam_left_GrabImageDone recData: " + runStatus.ToString()); + + lock (GetMutexLock_Left()) + { + Log.WriteLog("cam_left_GrabImageDone lock GetMutexLock_Left enter"); + + this.BeginInvoke(new MethodInvoker(delegate + { + Log.WriteLog("cam_left_GrabImageDone ui thread proccess begin"); + + switch (recData) + { + case "GrabSuccess": + //cam_left.image = recImage.CopyImage(); + Log.WriteLog("cam_left_GrabImageDone GrabSuccess begin"); + + Log.WriteLog("cam_left_GrabImageDone GrabSuccess updateImage"); + + cam_left.UpdateImage(viewPort_left); + + Log.WriteLog("cam_left_GrabImageDone GrabSuccess save image file"); + if (runStatus_left != RunStatus.continueCapture) + { + #region 淇濆瓨鍥剧墖 + string FolderPath = "D:\\Image\\" + DateTime.Now.ToString("yyyyMMdd") + "-left"; + string fileName = txtSN.Text.Trim() + "-" + DateTime.Now.ToString("HHmmssffff"); + + if (!Directory.Exists(FolderPath)) Directory.CreateDirectory(FolderPath); + cam_left.SaveImage(FolderPath, fileName); + #endregion + } + + ht_left.JobImage.Dispose(); + + Log.WriteLog("cam_left_GrabImageDone GrabSuccess getimage info"); + ht_left.JobImage = recImage.CopyImage(); + HOperatorSet.GetImageSize(ht_left.JobImage, out ImageWidth, out ImageHeight); + ht_left.JobResults.Clear(); + + Log.WriteLog("cam_left_GrabImageDone GrabSuccess run JobLLMF"); + ht_left.Run("JobLLMF"); + + Log.WriteLog("cam_left_GrabImageDone GrabSuccess end"); + break; + + case "GrabFail": + Log.WriteLog("cam_left_GrabImageDone GrabFail"); + break; + } + + recImage.Dispose(); + + Log.WriteLog("cam_left_GrabImageDone ui thread proccess end"); + })); + + GC.Collect(); + } + + Log.WriteLog("cam_left_GrabImageDone Leave"); + } + + void resultCreater_ListenEvent(object sender, HalconTools.ListenEventArgs e) + { + Log.WriteLog("resultCreater_ListenEvent Enter"); + + this.BeginInvoke(new MethodInvoker(delegate + { + Log.WriteLog("resultCreater_ListenEvent UI, data:" + e.IData.Data.ToString()+ ", runStatus:" + runStatus); + + string s = e.IData.Data.ToString(); + if (!s.Equals("JobLLMF_Done")) + { + if (runStatus == RunStatus.firstCapture || runStatus == RunStatus.adjustMent) + { + Log.WriteLog("resultCreater_ListenEvent UI, opc write OutputTag.CaptureFail_Right true begin"); + + opc.Write(OutputTag.CaptureFail_Right, true); + + Log.WriteLog("resultCreater_ListenEvent UI, opc write OutputTag.CaptureFail_Right true end"); + return; + } + } + + Log.WriteLog("resultCreater_ListenEvent UI, jobresults count: " + ht.JobResults.Count.ToString()); + + JobResult r = new JobResult(); + + if (ht.JobResults.Count > 0) + { + r = ht.JobResults[0].results[0]; + + string logstr = (null == r.fitLineResult) ? "null" : "exists"; + Log.WriteLog("resultCreater_ListenEvent UI, jobresults count r.fitLineResult:" + logstr); + if (r.fitLineResult == null) + { + ShowDisplayAngle("-"); + return; + } + } + else + { + ShowDisplayAngle("-"); + return; + } + + Log.WriteLog("resultCreater_ListenEvent UI, DrawLine"); + + DrawLine(viewPort, r.fitLineResult); + + double tmpAngle = 180 - ht.AngleLine2HorizontialAxis(r.fitLineResult) + config.angleOffset; + + Log.WriteLog("resultCreater_ListenEvent UI, ShowDisplayAngle angle: " + tmpAngle.ToString()); + + ShowDisplayAngle(tmpAngle.ToString("0.00")); + if(booltemAngle==true) + { + Log.WriteLog("Camera Get The Alignment tmpAangle"+tmpAngle.ToString()); + + } + + + if (runStatus == RunStatus.calibration) //鏍囧畾 + { + this.btnCalibration.Enabled = true; + return; + } + + if (runStatus == RunStatus.continueCapture) //杩炵画鎷嶇収 + { + return; + } + + if (runStatus == RunStatus.firstCapture || runStatus == RunStatus.adjustMent) + { + if (runStatus == RunStatus.firstCapture) + { + initAngle = tmpAngle; //璁板綍鍒濆瑙掑害 + + + //Janhans 澧炲姞鐣岄潰瑙掑害log璁拌浇鐨凢lage 鍙橀噺 booltemAngle + booltemAngle = true; + Log.WriteLog("Camera Get The InitAngle "+initAngle.ToString()); + } + if (tmpAngle >= config.minAngle && tmpAngle <= config.maxAngle) + { + string str; + + finalAngle = tmpAngle; + sw.Stop(); + Log.WriteLog("Camera Get The FinalAngle" + finalAngle); + + str=sw.ElapsedMilliseconds.ToString(); + Log.WriteLog("Aangle_Alignment_Time"+str+"ms"); + sw.Restart(); + Log.WriteLog("resultCreater_ListenEvent UI, opc write OutputTag.Move_OK true begin"); + opc.Write(OutputTag.Move_OK, true); + Log.WriteLog("resultCreater_ListenEvent UI, opc write OutputTag.Move_OK true end"); + + Log.WriteLog("-------瑙掑害璋冩暣瀹屾垚锛岀户鐢靛櫒涓婄數锛� PC缁欏嚭淇″彿鑷矼acmin-----"); + Log.WriteLog("--------Relay turn on------"); + isRealyOK = true; + Log.WriteLog("RunEnd Enter"); + txtResultInitAngle.Text = initAngle.ToString("0.00"); + txtResultFinalAngle.Text = finalAngle.ToString("0.00"); + booltemAngle = false;//鐣岄潰瑙掑害log璁拌浇鐨凢lage 鍙橀噺 booltemAngle + + + //RunEnd(); + //Log.WriteLog("resultCreater_ListenEvent UI, RunEnd"); + + return; + } + + //鍛婅瘔PLC璧板灏� + int tmpDis = (int)(((config.maxAngle + config.minAngle) / 2 - tmpAngle) * config.pulsePerDegree); + + Log.WriteLog("resultCreater_ListenEvent UI, opc write OutputTag.Move_Distance: " + tmpDis.ToString()); + + opc.Write(OutputTag.Move_Distance, tmpDis); + + Log.WriteLog("resultCreater_ListenEvent UI, opc write OutputTag.Move begin"); + + Thread.Sleep(100); + opc.Write(OutputTag.Move, true); + + Log.WriteLog("resultCreater_ListenEvent UI, opc write OutputTag.Move end"); + } + })); + + Log.WriteLog("resultCreater_ListenEvent Leave"); + } + + void resultCreater_left_ListenEvent(object sender, HalconTools.ListenEventArgs e) + { + Log.WriteLog("resultCreater_left_ListenEvent Enter"); + + this.BeginInvoke(new MethodInvoker(delegate + { + Log.WriteLog("resultCreater_left_ListenEvent UI, data:"+ e.IData.Data.ToString() + " runStatus: " + runStatus); + + string s = e.IData.Data.ToString(); + if (!s.Equals("JobLLMF_Done")) + { + if (runStatus_left == RunStatus.firstCapture || runStatus_left == RunStatus.adjustMent) + { + Log.WriteLog("resultCreater_left_ListenEvent UI, opc write OutputTag.CaptureFail_left true begin"); + + opc.Write(OutputTag.CaptureFail_left, true); + + Log.WriteLog("resultCreater_left_ListenEvent UI, opc write OutputTag.CaptureFail_left true end"); + return; + } + } + + JobResult r = new JobResult(); + + Log.WriteLog("resultCreater_left_ListenEvent UI, jobresults count:" + ht_left.JobResults.Count.ToString()); + + if (ht_left.JobResults.Count > 0) + { + r = ht_left.JobResults[0].results[0]; + string logstr = (null == r.fitLineResult) ? "null" : "exists"; + + Log.WriteLog("resultCreater_left_ListenEvent UI, jobresults count r.fitLineResult: " + logstr); + if (r.fitLineResult == null) + { + ShowDisplayAngle_left("-"); + return; + } + } + else + { + ShowDisplayAngle_left("-"); + return; + } + + Log.WriteLog("resultCreater_left_ListenEvent UI, DrawLine"); + + DrawLine(viewPort_left, r.fitLineResult); + + double tmpAngle = 180 - ht_left.AngleLine2HorizontialAxis(r.fitLineResult) + config.angleOffset_Left; + + Log.WriteLog("resultCreater_left_ListenEvent UI, ShowDisplayAngle angle: " + tmpAngle.ToString()); + + ShowDisplayAngle_left(tmpAngle.ToString("0.00")); + + if (runStatus_left == RunStatus.calibration) //鏍囧畾 + { + this.btnCalibration_left.Enabled = true; + return; + } + + if (runStatus_left == RunStatus.continueCapture) //杩炵画鎷嶇収 + { + return; + } + + if (runStatus_left == RunStatus.firstCapture || runStatus_left == RunStatus.adjustMent) + { + if (runStatus_left == RunStatus.firstCapture) + { + initAngle_left = tmpAngle; //璁板綍鍒濆瑙掑害 + } + if (tmpAngle >= config.minAngle && tmpAngle <= config.maxAngle) + { + + finalAngle_left = tmpAngle; + + Log.WriteLog("resultCreater_left_ListenEvent UI, opc write OutputTag.Move_OK_left true begin"); + + opc.Write(OutputTag.Move_OK_left, true); + Log.WriteLog("-------瑙掑害璋冩暣瀹屾垚锛孭C缁欏嚭缁х數鍣ㄤ俊鍙疯嚦Macmin-----"); + Log.WriteLog("--------Relay turn on------"); + + Log.WriteLog("resultCreater_left_ListenEvent UI, opc write OutputTag.Move_OK_left true end"); + + RunEnd_Left(); + + Log.WriteLog("resultCreater_left_ListenEvent UI, RunEnd_Left"); + + return; + } + + //鍛婅瘔PLC璧板灏� + int tmpDis = (int)(((config.maxAngle + config.minAngle) / 2 - tmpAngle) * config.pulsePerDegree_Left); + + Log.WriteLog("resultCreater_left_ListenEvent UI, opc write OutputTag.Move_Distance_left:" + tmpDis.ToString()); + + opc.Write(OutputTag.Move_Distance_left, tmpDis); + + Log.WriteLog("resultCreater_left_ListenEvent UI, opc write OutputTag.Move_Distance_left begin"); + + Thread.Sleep(100); + opc.Write(OutputTag.Move_left, true); + + Log.WriteLog("resultCreater_left_ListenEvent UI, opc write OutputTag.Move_left end"); + } + })); + + Log.WriteLog("resultCreater_left_ListenEvent Leave"); + } + + void listenEventCreater_ListenEvent(object sender, EventTool.ListenEventArgs e) + { + // Log.WriteLog("listenEventCreater_ListenEvent Enter"); + + this.BeginInvoke(new MethodInvoker(delegate + { + OPC.Item item = (OPC.Item)e.IData.Data; + + string logstr = (null == item.value) ? "null" : item.value.ToString(); + Log.WriteLog("listenEventCreater_ListenEvent item.name:" + item.name + " item.value: " + logstr); + + switch (item.name) + { + case InputTag.Capture: + if ((bool)item.value) + { + if (!Effective()) + { + break; + } + if (runStatus == RunStatus.Normal) + { + runStatus = RunStatus.firstCapture; + } + else if (runStatus == RunStatus.firstCapture) + { + runStatus = RunStatus.adjustMent; + } + + Log.WriteLog("listenEventCreater_ListenEvent InputTag.Capture cam.GrabImage begin"); + cam.GrabImage(""); + Log.WriteLog("listenEventCreater_ListenEvent InputTag.Capture cam.GrabImage end"); + } + break; + + case InputTag.Position: + Log.WriteLog("listenEventCreater_ListenEvent InputTag.Position"); + + tsslPosition.Text = ((int)item.value).ToString(); + break; + + case InputTag.Start: + if ((bool)item.value) + { + Log.WriteLog("listenEventCreater_ListenEvent InputTag.Start StopRightCamera begin"); + Log.WriteLog("------鍙屾墜鍚姩瀹屾垚锛屼骇鍝侀�佹枡寮�濮嬶紝鐩告満鍑嗗鎷嶇収----"); + //鍙屾墜鍚姩锛屼骇鍝侀�佹枡寮�濮� + sw.Start(); + + StopRightCamera(); + + Log.WriteLog("listenEventCreater_ListenEvent InputTag.Start opc write OutputTag.Start"); + + opc.Write(OutputTag.Start, false); + + Log.WriteLog("listenEventCreater_ListenEvent InputTag.Start initTest"); + + initTest(); + + Log.WriteLog("listenEventCreater_ListenEvent InputTag.Start ShowDisplay"); + + ShowDisplay("寮�濮嬫娴�", Color.Blue, Color.Lime); + } + break; + + case InputTag.Capture_left: + if ((bool)item.value) + { + if (!Effective()) + { + break; + } + if (runStatus_left == RunStatus.Normal) + { + runStatus_left = RunStatus.firstCapture; + } + else if (runStatus_left == RunStatus.firstCapture) + { + runStatus_left = RunStatus.adjustMent; + } + + Log.WriteLog("listenEventCreater_ListenEvent InputTag.Capture_left cam_left.GrabImage begin"); + + cam_left.GrabImage(""); + + Log.WriteLog("listenEventCreater_ListenEvent InputTag.Capture_left cam_left.GrabImage end"); + } + break; + + case InputTag.Position_left: + Log.WriteLog("listenEventCreater_ListenEvent InputTag.Position_left"); + tsslPosition_left.Text = ((int)item.value).ToString(); + break; + + case InputTag.Start_left: + if ((bool)item.value) + { + Log.WriteLog("listenEventCreater_ListenEvent InputTag.Start_left StopLeftCamera begin"); + Log.WriteLog("------鍙屾墜鍚姩瀹屾垚锛屼骇鍝侀�佹枡寮�濮嬶紝鐩告満鍑嗗鎷嶇収----"); + StopLeftCamera(); + + Log.WriteLog("listenEventCreater_ListenEvent InputTag.Start_left opc write OutputTag.Start_left"); + + opc.Write(OutputTag.Start_left, false); + + Log.WriteLog("listenEventCreater_ListenEvent InputTag.Start_left initTest_Left"); + + initTest_Left(); + + Log.WriteLog("listenEventCreater_ListenEvent InputTag.Start_left ShowDisplay_left"); + + ShowDisplay_left("寮�濮嬫娴�", Color.Blue, Color.Lime); + } + break; + + case InputTag.Alarm: + Log.WriteLog("listenEventCreater_ListenEvent InputTag.Alarm"); + AlarmDisplay((int)item.value, this.tsslAlarm); + break; + + case InputTag.Alarm_left: + Log.WriteLog("listenEventCreater_ListenEvent InputTag.Alarm_left"); + AlarmDisplay((int)item.value, this.tsslAlarm_Left); + break; + + } + })); + + // Log.WriteLog("listenEventCreater_ListenEvent Leave"); + } + void listenOutTageEventCreater_ListenEvent(object sender, EventTool.ListenEventArgs e) + { + // Log.WriteLog("listenEventCreater_ListenEvent Enter"); + + this.BeginInvoke(new MethodInvoker(delegate + { + OPC.Item item = (OPC.Item)e.IData.Data; + + string logstr = (null == item.value) ? "null" : item.value.ToString(); + Log.WriteLog("listenEventCreater_ListenEvent item.name:" + item.name + " item.value: " + logstr); + + switch (item.name) + { + case OutputTag.ForApple: + if (config.rightUsed == true) + { + btnDisplay.Text = (bool)item.value ? "缁х數鍣ㄤ笂鐢靛苟淇濇寔" : "缁х數鍣ㄦ柇鐢�"; + + + } + else + { + btnDisplay_left.Text = (bool)item.value ? "缁х數鍣ㄤ笂鐢靛苟淇濇寔" : "缁х數鍣ㄦ柇鐢�"; + + + } + + if ((bool)item.value && isRealyOK) + { + //Log.WriteLog("--------瑙掑害璋冩暣瀹屾垚锛岀户鐢靛櫒涓婄數------"); + + + } + else if (!((bool)item.value) && isRealyOK) + { + Log.WriteLog("--------浜у搧妫�娴嬪畬鎴�,OP澶嶄綅鎿嶄綔锛岀户鐢靛櫒鏂數------"); + Log.WriteLog("--------Relay turn off------"); + isRealyOK = false; + Log.WriteLog("--------浜у搧妫�娴嬬粨鏉�------"); + Thread.Sleep(3000); + Log.WriteLog("resultCreater_ListenEvent UI, opc write OutputTag.Move_OK true end"); + RunEnd(); + Log.WriteLog("resultCreater_ListenEvent UI, RunEnd"); + } + + break; + + } + })); + + // Log.WriteLog("listenEventCreater_ListenEvent Leave"); + } + + #endregion + + #region OPC鎿嶄綔 + + /// <summary> + /// 杩炴帴鍒癘PC Server + /// 淇濇寔姝ゅ墠鐨勬墜鍔�/鑷姩妯″紡 + /// </summary> + private void ConnectToOpc() + { + Log.WriteLog("ConnectToOpc Enter"); + + opc = new OPC(config.opcConfig); + if (opc.Connect()) + { + Log.WriteLog("ConnectToOpc connect succeed"); + + tsslOPC.Text = "OPC Connection Succeed !"; + // 杩涜濡備笅鎿嶄綔 + opc.CreateGroup(); // 鍒涘缓Group + //PlcRunMode(RunMode.Manual); + } + else + { + Log.WriteLog("ConnectToOpc connect fail"); + + tsslOPC.Text = "OPC Connection Failed !"; + + /* 杩炴帴涓嶄笂鏃剁殑寮傚父澶勭悊 */ + } + + Log.WriteLog("ConnectToOpc Leave"); + } + + /// <summary> + /// 閬嶅巻OPC鎵�鏈夌偣浣嶏紝寰楀埌鍊� + /// </summary> + private void UpdateOPC() + { + Log.WriteLog("UpdateOPC Enter"); + Thread.Sleep(5000); + + foreach (KeyValuePair<string, OPC.Item> item in opc.itemReadDict) + { + object status = new Object(); + opc.ReadOneItem_Wrapper(item.Key, ref status); + string logstr = (null == item.Value) ? "null" : item.Value.ToString(); + Log.WriteLog("UpdateOPC itemReadDict key: " + item.Key + " value:" + logstr); + + switch (item.Key) + { + case InputTag.Capture : + break; + + case InputTag.Position: + tsslPosition.Text = ((int)item.Value.value).ToString(); + break; + + case InputTag.Position_left: + tsslPosition_left.Text = ((int)item.Value.value).ToString(); + break; + + case InputTag.Alarm: + //AlarmDisplay((int)item.Value.value); + AlarmDisplay((int)item.Value.value, this.tsslAlarm); + break; + case InputTag.Alarm_left: + AlarmDisplay((int)item.Value.value, this.tsslAlarm_Left); + break; + } + } + + foreach (KeyValuePair<string, OPC.Item> item in opc.itemWriteDict) + { + object status = new Object(); + opc.ReadOneItem_Wrapper(item.Key, ref status); + string logstr =(null == item.Value) ? "null" : item.Value.ToString(); + Log.WriteLog("UpdateOPC itemWriteDict key: " + item.Key + " value:" + logstr); + switch (item.Key) + { + case OutputTag.Move: + break; + + case OutputTag.CameraLight: + ckbCameraLight.Checked = (bool)item.Value.value; + ckbCameraLight.Text = ckbCameraLight.Checked ? "鍏夋簮鍏�" : "鍏夋簮寮�"; + break; + + case OutputTag.CameraLight_left: + ckbCameraLight_left.Checked = (bool)item.Value.value; + ckbCameraLight_left.Text = ckbCameraLight_left.Checked ? "鍏夋簮鍏�" : "鍏夋簮寮�"; + break; + + //case OutputTag.ForApple: + // if (config.rightUsed == true ) + // { + // btnDisplay.Text = (bool)item.Value.value ? "缁х數鍣ㄤ笂鐢�" : "缁х數鍣ㄦ柇鐢�"; + + + // } + // else + // { + // btnDisplay_left.Text = (bool)item.Value.value ? "缁х數鍣ㄤ笂鐢�" : "缁х數鍣ㄦ柇鐢�"; + + // } + + // if ((bool)item.Value.value && isRealyOK) + // { + // Log.WriteLog("--------瑙掑害璋冩暣瀹屾垚锛岀户鐢靛櫒涓婄數------"); + // } + // if (!((bool)item.Value.value) && isRealyOK) + // { + // Log.WriteLog("--------浜у搧妫�娴嬪畬鎴�,OP澶嶄綅鎿嶄綔锛岀户鐢靛櫒鏂數------"); + // } + // isRealyOK = false; + // break; + } + } + + Log.WriteLog("UpdateOPC Leave"); + } + + #endregion + + #region 鍚勭鏂规硶 + + /// <summary> + /// 鍒濆鍖栨柊鐨勬娴� + /// </summary> + private void initTest() + { + runStatus = RunStatus.Normal; + + txtResultInitAngle.Text = ""; + txtResultFinalAngle.Text = ""; + } + + /// <summary> + /// 宸﹀垵濮嬪寲鏂扮殑妫�娴� + /// </summary> + private void initTest_Left() + { + runStatus_left = RunStatus.Normal; + + txtResultInitAngle.Text = ""; + txtResultFinalAngle.Text = ""; + } + + /// <summary> + /// 鎶ヨ淇℃伅 + /// </summary> + /// <param name="k">缂栧彿</param> + private void AlarmDisplay(int k) + { + tsslAlarm.ForeColor = (k == 0) ? Color.Black : Color.Red; + + switch (k) + { + case 0: + tsslAlarm.Text = "鏃犳姤璀︼紒"; + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 1: + tsslAlarm.Text = "璋冩暣浼烘湇鐢垫満椹卞姩鍣ㄦ姤璀�"; + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 3: + tsslAlarm.Text = "璋冩暣浼烘湇鑴夊啿寮傚父"; + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 5: + tsslAlarm.Text = "鐩告満鎶撳彇瑙掑害澶辫触"; + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 11: + tsslAlarm.Text = "閫佹枡浼烘湇鐢垫満椹卞姩鍣ㄦ姤璀�"; + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 12: + tsslAlarm.Text = "闂ㄤ己鏈嶇數鏈洪┍鍔ㄥ櫒鎶ヨ"; + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 13: + tsslAlarm.Text = "閫佹枡浼烘湇鑴夊啿寮傚父"; + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 14: + tsslAlarm.Text = "闂ㄤ己鏈嶈剦鍐插紓甯�"; + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 20: + tsslAlarm.Text = "浜у搧鍒濆瑙掑害鏈埌浣�"; + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 21: + tsslAlarm.Text = "渚ц竟姘旂几澶圭揣鏈埌浣�"; + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 22: + tsslAlarm.Text = "姝h竟姘旂几澶圭揣鏈埌浣�"; + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 23: + tsslAlarm.Text = "鏃犳潌姘旂几鎺ㄩ�佹湭鍒颁綅"; + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 24: + tsslAlarm.Text = "婊戝彴姘旂几閫�浣嶆湭鍒颁綅"; + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 26: + tsslAlarm.Text = "鏃犳潌姘旂几鍥炲垵濮嬩綅鏈埌浣�"; + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 27: + tsslAlarm.Text = "渚ц竟姘旂几鍥炲垵濮嬩綅鏈埌浣�"; + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 28: + tsslAlarm.Text = "姝h竟姘旂几鍥炲垵濮嬩綅鏈埌浣�"; + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 29: + tsslAlarm.Text = "婊戝彴姘旂几鍥炲垵濮嬩綅鏈埌浣�"; + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 30: + tsslAlarm.Text = "鍏夊箷瑙﹀彂鎶ヨ锛岃纭鏃犲紓甯哥姸鎬佸苟澶嶄綅"; + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 31: + tsslAlarm.Text = "鏃犳潌姘旂几鍥炲師鐐规湭鍒颁綅"; + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 32: + tsslAlarm.Text = "渚ц竟姘旂几鍥炲師鐐规湭鍒颁綅"; + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 33: + tsslAlarm.Text = "姝h竟姘旂几鍥炲師鐐规湭鍒颁綅"; + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 34: + tsslAlarm.Text = "婊戝彴姘旂几鍥炲師鐐规湭鍒颁綅"; + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 35: + tsslAlarm.Text = "璋冩暣浼烘湇瑙﹀彂鏋侀檺浣嶏紝璇锋鏌ヤ骇鍝佹墦寮�鐨勫垵濮嬭搴�"; + sw.Stop(); + sw.Reset(); + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 36: + tsslAlarm.Text = "瀹氫綅鐩告満鍏夋簮鏈墦寮�锛岃妫�鏌ョ浉鏈哄厜婧愮姸鎬佸苟鎬ュ仠澶嶄綅"; + sw.Stop(); + sw.Reset(); + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 37: + tsslAlarm.Text = "鐩告満鏈媿鐓э紝璇烽噸鍚▼搴忔垨妫�鏌LC鐘舵��"; + sw.Stop(); + sw.Reset(); + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + + case 38: + tsslAlarm.Text = "鍒濆鍖栨湭瀹屾垚锛岃鎬ュ仠澶嶄綅骞舵鏌ョ▼搴忓伐浣滅姸鎬�"; + sw.Reset(); + Log.WriteLog(tsslAlarm.Text.ToString()); + break; + } + } + + /// <summary> + /// 鎶ヨ淇℃伅 + /// </summary> + /// <param name="k">缂栧彿</param> + private void AlarmDisplay(int k, ToolStripStatusLabel alarm) + { + alarm.ForeColor = (k == 0) ? Color.Black : Color.Red; + + switch (k) + { + case 0: + alarm.Text = "鏃犳姤璀︼紒"; + Log.WriteLog(alarm.Text.ToString()); + break; + + case 1: + alarm.Text = "璋冩暣浼烘湇鐢垫満椹卞姩鍣ㄦ姤璀�"; + Log.WriteLog(alarm.Text.ToString()); + break; + + case 3: + alarm.Text = "璋冩暣浼烘湇鑴夊啿寮傚父"; + Log.WriteLog(alarm.Text.ToString()); + break; + + case 5: + alarm.Text = "鐩告満鎶撳彇瑙掑害澶辫触锛岃妫�鏌ヤ骇鍝丩CD杈规鏄惁璐存湁寮傜墿"; + Log.WriteLog(alarm.Text.ToString()); + break; + + case 7: + alarm.Text = "浜у搧鍒濆瑙掑害杩囧ぇ锛岃鎬ュ仠澶嶄綅鍚庨噸鏂版墦寮�浜у搧鍐嶆娴嬮噺"; + Log.WriteLog(alarm.Text.ToString()); + if (alarm.Name.Contains("_Left")) + { + SaveinitAngle_Left(); + } + else + { + SaveinitAngle_Right(); + } + break; + + case 10: + alarm.Text = "鎬ュ仠涓�,璇峰浣嶏紒"; + Log.WriteLog(alarm.Text.ToString()); + break; + + case 11: + alarm.Text = "閫佹枡浼烘湇鐢垫満椹卞姩鍣ㄦ姤璀�"; + Log.WriteLog(alarm.Text.ToString()); + break; + + case 12: + alarm.Text = "闂ㄤ己鏈嶇數鏈洪┍鍔ㄥ櫒鎶ヨ"; + Log.WriteLog(alarm.Text.ToString()); + break; + + case 13: + alarm.Text = "閫佹枡浼烘湇鑴夊啿寮傚父"; + Log.WriteLog(alarm.Text.ToString()); + break; + + case 14: + alarm.Text = "闂ㄤ己鏈嶈剦鍐插紓甯�"; + Log.WriteLog(alarm.Text.ToString()); + break; + + case 20: + alarm.Text = "浜у搧鍒濆瑙掑害鏈埌浣�"; + Log.WriteLog(alarm.Text.ToString()); + break; + + case 21: + alarm.Text = "渚ц竟姘旂几澶圭揣鏈埌浣�"; + Log.WriteLog(alarm.Text.ToString()); + break; + + case 22: + alarm.Text = "姝h竟姘旂几澶圭揣鏈埌浣�"; + Log.WriteLog(alarm.Text.ToString()); + break; + + case 23: + alarm.Text = "鏃犳潌姘旂几鎺ㄩ�佹湭鍒颁綅"; + Log.WriteLog(alarm.Text.ToString()); + break; + + case 24: + alarm.Text = "婊戝彴姘旂几閫�浣嶆湭鍒颁綅"; + Log.WriteLog(alarm.Text.ToString()); + break; + + case 26: + alarm.Text = "鏃犳潌姘旂几鍥炲垵濮嬩綅鏈埌浣�"; + Log.WriteLog(alarm.Text.ToString()); + break; + + case 27: + alarm.Text = "渚ц竟姘旂几鍥炲垵濮嬩綅鏈埌浣�"; + break; + + case 28: + alarm.Text = "姝h竟姘旂几鍥炲垵濮嬩綅鏈埌浣�"; + Log.WriteLog(alarm.Text.ToString()); + break; + + case 29: + alarm.Text = "婊戝彴姘旂几鍥炲垵濮嬩綅鏈埌浣�"; + Log.WriteLog(alarm.Text.ToString()); + break; + + case 30: + alarm.Text = "鍏夊箷瑙﹀彂鎶ヨ锛岃纭鏃犲紓甯哥姸鎬佸苟澶嶄綅"; + Log.WriteLog(alarm.Text.ToString()); + break; + + case 31: + alarm.Text = "鏃犳潌姘旂几鍥炲師鐐规湭鍒颁綅"; + Log.WriteLog(alarm.Text.ToString()); + break; + + case 32: + alarm.Text = "渚ц竟姘旂几鍥炲師鐐规湭鍒颁綅"; + Log.WriteLog(alarm.Text.ToString()); + break; + + case 33: + alarm.Text = "姝h竟姘旂几鍥炲師鐐规湭鍒颁綅"; + Log.WriteLog(alarm.Text.ToString()); + break; + + case 34: + alarm.Text = "婊戝彴姘旂几鍥炲師鐐规湭鍒颁綅"; + Log.WriteLog(alarm.Text.ToString()); + break; + + case 35: + alarm.Text = "璋冩暣浼烘湇瑙﹀彂鏋侀檺浣嶏紝璇锋鏌ヤ骇鍝佹墦寮�鐨勫垵濮嬭搴�"; + sw.Stop(); + sw.Reset(); + Log.WriteLog(alarm.Text.ToString()); + break; + + case 36: + alarm.Text = "瀹氫綅鐩告満鍏夋簮鏈墦寮�锛岃妫�鏌ョ浉鏈哄厜婧愮姸鎬佸苟鎬ュ仠澶嶄綅"; + sw.Stop(); + sw.Reset(); + Log.WriteLog(alarm.Text.ToString()); + break; + + case 37: + alarm.Text = "鐩告満鏈媿鐓э紝璇烽噸鍚▼搴忔垨妫�鏌LC鐘舵��"; + sw.Stop(); + sw.Reset(); + Log.WriteLog(alarm.Text.ToString()); + break; + + case 38: + alarm.Text = "鍒濆鍖栨湭瀹屾垚锛岃鎬ュ仠澶嶄綅骞舵鏌ョ▼搴忓伐浣滅姸鎬�"; + sw.Stop(); + sw.Reset(); + Log.WriteLog(alarm.Text.ToString()); + break; + } + } + + + /// <summary> + /// 鎸夐挳鏄剧ず + /// </summary> + /// <param name="s">鍐呭</param> + /// <param name="foreColor">鏂囧瓧棰滆壊</param> + /// <param name="backgroudColor">鑳屾櫙鑹�</param> + private void ShowDisplay(string s, Color foreColor, Color backColor) + { + btnDisplay.Text = s; + btnDisplay.ForeColor = foreColor; + btnDisplay.BackColor = backColor; + } + + /// <summary> + /// 宸︽寜閽樉绀� + /// </summary> + /// <param name="s">鍐呭</param> + /// <param name="foreColor">鏂囧瓧棰滆壊</param> + /// <param name="backgroudColor">鑳屾櫙鑹�</param> + private void ShowDisplay_left(string s, Color foreColor, Color backColor) + { + btnDisplay_left.Text = s; + btnDisplay_left.ForeColor = foreColor; + btnDisplay_left.BackColor = backColor; + } + + /// <summary> + /// 鍐嶆帶浠朵笂鐢荤洿绾� + /// </summary> + /// <param name="viewport"></param> + /// <param name="line"></param> + private void DrawLine(HWindowControl viewport, FitLineResult line) + { + HOperatorSet.SetColor(viewport.HalconWindow, "green"); + HOperatorSet.SetLineWidth(viewport.HalconWindow, 2); + HOperatorSet.SetPart(viewport.HalconWindow, 0, 0, ImageHeight - 1, ImageWidth - 1); + HOperatorSet.DispLine(viewport.HalconWindow, line.mRowStart, line.mColumnStart, line.mRowEnd, line.mColumnEnd); + } + + /// <summary> + /// 淇濆瓨鏁版嵁 + /// </summary> + private void SaveResult() + { + Log.WriteLog("SaveResult Enter"); + + string filePath = "D:\\Data\\" + DateTime.Now.ToString("yyyyMMdd"); + if (!Directory.Exists(filePath)) Directory.CreateDirectory(filePath); + + filePath += "\\result.csv"; + string tmpS = ""; + if (!File.Exists(filePath)) + { + tmpS = "SN,time,initAngle,finalAngle,\r\n"; + File.AppendAllText(filePath, tmpS); + } + + tmpS = txtSN.Text.Trim() + "," + DateTime.Now.ToString("HH:mm:ss") + "," + initAngle.ToString() + "," + finalAngle.ToString() + ",\r\n"; + File.AppendAllText(filePath, tmpS); + + Log.WriteLog("SaveResult Leave"); + } + + /// <summary> + /// 鍙冲垵濮嬭搴︿繚瀛樻暟鎹� + /// </summary> + private void SaveinitAngle_Right() + { + Log.WriteLog("SaveinitAngle_Right Enter"); + + string filePath = "D:\\Data\\" + DateTime.Now.ToString("yyyyMMdd"); + if (!Directory.Exists(filePath)) Directory.CreateDirectory(filePath); + + filePath += "\\result.csv"; + string tmpS = ""; + if (!File.Exists(filePath)) + { + tmpS = "SN,time,initAngle,finalAngle,\r\n"; + File.AppendAllText(filePath, tmpS); + } + + tmpS = txtSN.Text.Trim() + "," + DateTime.Now.ToString("HH:mm:ss") + "," + initAngle.ToString() + "," + "" + ",\r\n"; + File.AppendAllText(filePath, tmpS); + + Log.WriteLog("SaveinitAngle_Right Leave"); + } + + + /// <summary> + /// 宸︿繚瀛樻暟鎹� + /// </summary> + private void SaveResult_Left() + { + Log.WriteLog("SaveResult_Left Enter"); + + string filePath = "D:\\Data\\" + DateTime.Now.ToString("yyyyMMdd") + "-Left"; + if (!Directory.Exists(filePath)) Directory.CreateDirectory(filePath); + + filePath += "\\result.csv"; + string tmpS = ""; + if (!File.Exists(filePath)) + { + tmpS = "SN,time,initAngle,finalAngle,\r\n"; + File.AppendAllText(filePath, tmpS); + } + + tmpS = txtSN.Text.Trim() + "," + DateTime.Now.ToString("HH:mm:ss") + "," + initAngle_left.ToString() + "," + finalAngle_left.ToString() + ",\r\n"; + File.AppendAllText(filePath, tmpS); + + Log.WriteLog("SaveResult_Left Leave"); + } + + /// <summary> + /// 宸﹀垵濮嬭搴︿繚瀛樻暟鎹� + /// </summary> + private void SaveinitAngle_Left() + { + Log.WriteLog("SaveinitAngle_Left Enter"); + + string filePath = "D:\\Data\\" + DateTime.Now.ToString("yyyyMMdd") + "-Left"; + if (!Directory.Exists(filePath)) Directory.CreateDirectory(filePath); + + filePath += "\\result.csv"; + string tmpS = ""; + if (!File.Exists(filePath)) + { + tmpS = "SN,time,initAngle,finalAngle,\r\n"; + File.AppendAllText(filePath, tmpS); + } + + tmpS = txtSN.Text.Trim() + "," + DateTime.Now.ToString("HH:mm:ss") + "," + initAngle_left.ToString() + "," + "" + ",\r\n"; + File.AppendAllText(filePath, tmpS); + + Log.WriteLog("SaveinitAngle_Left Leave"); + } + + /// <summary> + /// 杩愮畻缁撴潫鎿嶄綔 + /// </summary> + private void RunEnd() + { + Log.WriteLog("RunEnd Enter"); + + runStatus = RunStatus.Normal; + SaveResult(); + txtResultInitAngle.Text = initAngle.ToString("0.00"); + txtResultFinalAngle.Text = finalAngle.ToString("0.00"); + ShowDisplay("瑙嗚妫�娴嬪畬鎴�", Color.Blue, Color.Lime); + + Log.WriteLog("RunEnd Leave"); + } + + /// <summary> + /// 宸﹁繍绠楃粨鏉熸搷浣� + /// </summary> + private void RunEnd_Left() + { + Log.WriteLog("RunEnd_Left Enter"); + + runStatus_left = RunStatus.Normal; + SaveResult_Left(); + txtResultInitAngle.Text = initAngle_left.ToString("0.00"); + txtResultFinalAngle.Text = finalAngle_left.ToString("0.00"); + ShowDisplay("瑙嗚妫�娴嬪畬鎴�", Color.Blue, Color.Lime); + + Log.WriteLog("RunEnd_Left Leave"); + } + + /// <summary> + /// 鏄剧ず瑙掑害 + /// </summary> + /// <param name="s">瑙掑害</param> + private void ShowDisplayAngle(string s) + { + this.lblAngleDisplay.Text = s; + } + + /// <summary> + /// 鏄剧ず宸﹁搴� + /// </summary> + /// <param name="s">瑙掑害</param> + private void ShowDisplayAngle_left(string s) + { + this.lblAngleDisplay_left.Text = s; + } + + #endregion + + #region 鎺т欢浜嬩欢 + + private void btnHalconTool_Click(object sender, EventArgs e) + { + Log.WriteLog("btnHalconTool_Click Enter"); + + frmPassword frmp = new frmPassword(config.password); + frmp.ShowDialog(); + + if (frmp.isOK) + { + HalconTools.frmMain main = new HalconTools.frmMain(); + main.ShowDialog(); + + if (config.rightUsed) ht.LoadJobs(); + if (config.leftUsed) ht_left.LoadJobs(); + } + + Log.WriteLog("btnHalconTool_Click Leave"); + } + + private void btnHalconTool_left_Click(object sender, EventArgs e) + { + Log.WriteLog("btnHalconTool_left_Click Enter"); + + frmPassword frmp = new frmPassword(config.password); + frmp.ShowDialog(); + + if (frmp.isOK) + { + HalconTools.frmMain main = new HalconTools.frmMain(); + main.ShowDialog(); + + if (config.rightUsed) ht.LoadJobs(); + if (config.leftUsed) ht_left.LoadJobs(); + } + + Log.WriteLog("btnHalconTool_left_Click Leave"); + } + + private void btnCapture_Click(object sender, EventArgs e) + { + Log.WriteLog("btnCapture_Click Enter"); + + runStatus = RunStatus.calibration; + + cam.GrabImage(""); + + Log.WriteLog("btnCapture_Click Leave"); + } + + private void btnCapture_left_Click(object sender, EventArgs e) + { + Log.WriteLog("btnCapture_left_Click Enter"); + + runStatus_left = RunStatus.calibration; + + cam_left.GrabImage(""); + + Log.WriteLog("btnCapture_left_Click Leave"); + } + + private void btnCalibration_Click(object sender, EventArgs e) + { + Log.WriteLog("btnCalibration_Click Enter"); + + double calAngle, nowAngle; + + try + { + calAngle = Convert.ToDouble(txtCalAngle.Text); + nowAngle = Convert.ToDouble(lblAngleDisplay.Text); + } + catch (Exception ex) + { + Log.WriteLog("btnCalibration_Click Exception Leave"); + + MessageBox.Show("瑙掑害妫�娴嬮敊璇垨鏍囧畾瑙掑害杈撳叆閿欒锛�"); + return; + } + + config.angleOffset = calAngle - (nowAngle - config.angleOffset); + sft.SetConfig(configPath, config); + MessageBox.Show("鏍囧畾鎴愬姛"); + + runStatus = RunStatus.Normal; + btnCalibration.Enabled = false; + gbxCalibration.Enabled = false; + + + Log.WriteLog("btnCalibration_Click Leave"); + } + + private void btnCalibration_left_Click(object sender, EventArgs e) + { + Log.WriteLog("Error: btnCalibration_left_Click Enter"); + + double calAngle, nowAngle; + + try + { + calAngle = Convert.ToDouble(txtCalAngle_left.Text); + nowAngle = Convert.ToDouble(lblAngleDisplay_left.Text); + } + catch (Exception ex) + { + Log.WriteLog("Error: btnCalibration_left_Click Exception Leave"); + + MessageBox.Show("瑙掑害妫�娴嬮敊璇垨鏍囧畾瑙掑害杈撳叆閿欒锛�"); + return; + } + + config.angleOffset_Left = calAngle - (nowAngle - config.angleOffset_Left); + sft.SetConfig(configPath, config); + MessageBox.Show("鏍囧畾鎴愬姛"); + + runStatus_left = RunStatus.Normal; + btnCalibration_left.Enabled = false; + gbxCalibration_left.Enabled = false; + + Log.WriteLog("btnCalibration_left_Click Leave"); + } + + private void btnCanCalibration_Click(object sender, EventArgs e) + { + Log.WriteLog("btnCanCalibration_Click Enter"); + + if (gbxCalibration.Enabled == false) + { + frmPassword frmp = new frmPassword(config.password); + frmp.ShowDialog(); + + if (frmp.isOK) gbxCalibration.Enabled = true; + } + else + { + gbxCalibration.Enabled = false; + } + + Log.WriteLog("btnCanCalibration_Click Leave"); + } + + private void btnCanCalibration_left_Click(object sender, EventArgs e) + { + Log.WriteLog("btnCanCalibration_left_Click Enter"); + + if (gbxCalibration_left.Enabled == false) + { + frmPassword frmp = new frmPassword(config.password); + frmp.ShowDialog(); + + if (frmp.isOK) gbxCalibration_left.Enabled = true; + } + else + { + gbxCalibration_left.Enabled = false; + } + + Log.WriteLog("btnCanCalibration_left_Click Leave"); + } + + private void tVideo_Tick(object sender, EventArgs e) + { + Log.WriteLog("tVideo_Tick Enter"); + + cam.GrabImage(""); + + Log.WriteLog("tVideo_Tick Leave"); + } + + private void tVideo_left_Tick(object sender, EventArgs e) + { + Log.WriteLog("tVideo_left_Tick Enter"); + + cam_left.GrabImage(""); + + Log.WriteLog("tVideo_left_Tick Leave"); + } + + private void btnContinueCapture_Click(object sender, EventArgs e) + { + Log.WriteLog("btnContinueCapture_Click Enter"); + + runStatus = RunStatus.continueCapture; + tVideo.Enabled = true; + this.btnContinueCapture.Enabled = false; + this.btnStopCapture.Enabled = true; + + Log.WriteLog("btnContinueCapture_Click Leave"); + } + + private void btnContinueCapture_left_Click(object sender, EventArgs e) + { + Log.WriteLog("btnContinueCapture_left_Click Enter"); + + runStatus_left = RunStatus.continueCapture; + tVideo_left.Enabled = true; + this.btnContinueCapture_left.Enabled = false; + this.btnStopCapture_left.Enabled = true; + + Log.WriteLog("btnContinueCapture_left_Click Leave"); + } + + private void btnStopCapture_Click(object sender, EventArgs e) + { + Log.WriteLog("btnStopCapture_Click Enter"); + + StopRightCamera(); + + Log.WriteLog("btnStopCapture_Click Leave"); + } + + private void StopRightCamera() + { + Log.WriteLog("StopRightCamera Enter"); + + tVideo.Enabled = false; + runStatus = RunStatus.Normal; + this.btnContinueCapture.Enabled = true; + this.btnStopCapture.Enabled = false; + + Log.WriteLog("StopRightCamera Leave"); + } + + private void btnStopCapture_left_Click(object sender, EventArgs e) + { + Log.WriteLog("btnStopCapture_left_Click Enter"); + + StopLeftCamera(); + + Log.WriteLog("btnStopCapture_left_Click Leave"); + } + + private void StopLeftCamera() + { + Log.WriteLog("StopLeftCamera Enter"); + + tVideo_left.Enabled = false; + runStatus_left = RunStatus.Normal; + this.btnContinueCapture_left.Enabled = true; + this.btnStopCapture_left.Enabled = false; + + Log.WriteLog("StopLeftCamera Leave"); + } + + private void btnTestMove_Click(object sender, EventArgs e) + { + Log.WriteLog("btnTestMove_Click Enter"); + + int tmpD = Convert.ToInt32(txtTestPulse.Text); + opc.Write(OutputTag.Move_Distance, tmpD); + Thread.Sleep(100); + opc.Write(OutputTag.Move_Test, true); + + Log.WriteLog("btnTestMove_Click Leave"); + } + + private void btnTestMove_left_Click(object sender, EventArgs e) + { + Log.WriteLog("btnTestMove_left_Click Enter"); + + int tmpD = Convert.ToInt32(txtTestPulse_left.Text); + opc.Write(OutputTag.Move_Distance_left, tmpD); + Thread.Sleep(100); + opc.Write(OutputTag.Move_Test_left, true); + + Log.WriteLog("btnTestMove_left_Click Leave"); + } + + private void cbxTest_CheckedChanged(object sender, EventArgs e) + { + Log.WriteLog("cbxTest_CheckedChanged Enter"); + + if (cbxTest.Checked) + { + Log.WriteLog("cbxTest_CheckedChanged cbxTest.Checked = true"); + + frmPassword frmp = new frmPassword(config.password); + frmp.ShowDialog(); + + if (frmp.isOK) + { + gbxTest.Enabled = cbxTest.Checked; + runStatus = RunStatus.testMent; + } + } + else + { + Log.WriteLog("cbxTest_CheckedChanged cbxTest.Checked = false"); + + gbxTest.Enabled = cbxTest.Checked; + tVideo.Enabled = false; + runStatus = RunStatus.Normal; + } + + Log.WriteLog("cbxTest_CheckedChanged Leave"); + } + + private void cbxTest_left_CheckedChanged(object sender, EventArgs e) + { + Log.WriteLog("cbxTest_left_CheckedChanged Enter"); + + if (cbxTest_left.Checked) + { + Log.WriteLog("cbxTest_CheckedChanged cbxTest_left.Checked = true"); + + frmPassword frmp = new frmPassword(config.password); + frmp.ShowDialog(); + + if (frmp.isOK) + { + gbxTest_left.Enabled = cbxTest_left.Checked; + runStatus_left = RunStatus.testMent; + } + } + else + { + Log.WriteLog("cbxTest_left_CheckedChanged cbxTest_left.Checked = false"); + + gbxTest_left.Enabled = cbxTest_left.Checked; + tVideo_left.Enabled = false; + runStatus_left = RunStatus.Normal; + } + + Log.WriteLog("cbxTest_left_CheckedChanged Leave"); + } + + private void btnConfig_Click(object sender, EventArgs e) + { + Log.WriteLog("btnConfig_Click Enter"); + + frmPassword frmp = new frmPassword(config.password); + frmp.ShowDialog(); + + if (frmp.isOK) + { + frmConfig tmpCon = new frmConfig(opc, config,"Right"); + tmpCon.ShowDialog(); + } + + Log.WriteLog("btnConfig_Click Leave"); + } + + private void btnConfig_left_Click(object sender, EventArgs e) + { + Log.WriteLog("btnConfig_left_Click Enter"); + + frmPassword frmp = new frmPassword(config.password); + frmp.ShowDialog(); + + if (frmp.isOK) + { + frmConfig tmpCon = new frmConfig(opc, config,"Left"); + tmpCon.ShowDialog(); + } + + Log.WriteLog("btnConfig_left_Click Leave"); + } + + private void ckbCameraLight_CheckedChanged(object sender, EventArgs e) + { + Log.WriteLog("ckbCameraLight_CheckedChanged Enter"); + + opc.Write(OutputTag.CameraLight, ckbCameraLight.Checked); + ckbCameraLight.Text = ckbCameraLight.Checked ? "鍏夋簮鍏�" : "鍏夋簮寮�"; + + Log.WriteLog("ckbCameraLight_CheckedChanged Leave"); + } + + private void ckbCameraLight_left_CheckedChanged(object sender, EventArgs e) + { + Log.WriteLog("ckbCameraLight_left_CheckedChanged Enter"); + + opc.Write(OutputTag.CameraLight_left, ckbCameraLight_left.Checked); + ckbCameraLight_left.Text = ckbCameraLight_left.Checked ? "鍏夋簮鍏�" : "鍏夋簮寮�"; + + Log.WriteLog("ckbCameraLight_left_CheckedChanged Leave"); + } + + private void btnORI_Click(object sender, EventArgs e) + { + Log.WriteLog("btnORI_Click Enter"); + opc.Write(OutputTag.ORI, true); + Log.WriteLog("btnORI_Click Leave"); + } + + private void btnORI_left_Click(object sender, EventArgs e) + { + Log.WriteLog("btnORI_left_Click Enter"); + + opc.Write(OutputTag.ORI_left, true); + + Log.WriteLog("btnORI_left_Click Leave"); + } + + #endregion + + private static System.Threading.Mutex _mutex_Right; + + private System.Threading.Mutex GetMutexLock_Right() + { + System.Threading.Interlocked.CompareExchange(ref _mutex_Right, new System.Threading.Mutex(), null); + return _mutex_Right; + } + + private static System.Threading.Mutex _mutex_Left; + + private System.Threading.Mutex GetMutexLock_Left() + { + System.Threading.Interlocked.CompareExchange(ref _mutex_Left, new System.Threading.Mutex(), null); + return _mutex_Left; + } + + #region 宸� + + private void button2_Click(object sender, EventArgs e) + { + opc.Write(OutputTag.Manual_left, true); + } + + private void button4_Click(object sender, EventArgs e) + { + opc.Write(OutputTag.qigangjiajin_left, true); + } + + private void button5_Click(object sender, EventArgs e) + { + opc.Write(OutputTag.qigangsongkai_left, true); + } + + private void btnCloseDor_Click(object sender, EventArgs e) + { + opc.Write(OutputTag.guanmen_left, true); + } + + private void btnOpenDor_Click(object sender, EventArgs e) + { + opc.Write(OutputTag.kaimen_left, true); + } + + private void button1_Click(object sender, EventArgs e) + { + opc.Write(OutputTag.huataiqigang_left, true); + } + + private void button3_Click(object sender, EventArgs e) + { + opc.Write(OutputTag.songliao_left, true); + } + + private void btnOut_Click(object sender, EventArgs e) + { + opc.Write(OutputTag.chuliao_left, true); + } + + private void button6_Click(object sender, EventArgs e) + { + if (runStatus_left == RunStatus.Normal) + { + if (MessageBox.Show("纭畾杩涜鎵嬪姩瀹氫綅锛�", "绯荤粺鎻愮ず", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + { + opc.Write(OutputTag.shoudongdingwei_left, true); + } + } + else + { + MessageBox.Show("娴嬭瘯鐘舵�佷笅鏃犳硶鎵嬪姩瀹氫綅锛�", "绯荤粺鎻愮ず", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + + private void checkBox1_CheckedChanged(object sender, EventArgs e) + { + if (checkBox1.Checked) + { + if ((runStatus_left == RunStatus.Normal)) + { + button6.Enabled = true; + } + else + { + checkBox1.Checked = false; + button6.Enabled = false; + MessageBox.Show("娴嬭瘯鐘舵�佷笅鏃犳硶鎵嬪姩瀹氫綅锛�", "绯荤粺鎻愮ず", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + else + { + button6.Enabled = false; + } + } + + #endregion + + #region 鍙� + + private void button10_Click(object sender, EventArgs e) + { + opc.Write(OutputTag.Manual, true); + } + + private void button8_Click(object sender, EventArgs e) + { + opc.Write(OutputTag.qigangjiajin, true); + } + + private void button7_Click(object sender, EventArgs e) + { + opc.Write(OutputTag.qigangsongkai, true); + } + + private void button13_Click(object sender, EventArgs e) + { + opc.Write(OutputTag.guanmen, true); + //if (isUUTOut == false) + //{ + // opc.Write(OutputTag.guanmen, true); + // isDoorOpen = false; + //} + //else + //{ + // MessageBox.Show("璇峰厛閫佹枡锛�"); + //} + } + + private void button14_Click(object sender, EventArgs e) + { + opc.Write(OutputTag.kaimen, true); + //isDoorOpen = true; + } + + private void button11_Click(object sender, EventArgs e) + { + opc.Write(OutputTag.huataiqigang, true); + } + + private void button9_Click(object sender, EventArgs e) + { + opc.Write(OutputTag.songliao, true); + //if (isDoorOpen == true) + //{ + // opc.Write(OutputTag.songliao, true); + // isUUTOut = false; + //} + //else + //{ + // MessageBox.Show("璇峰厛寮�闂紒"); + //} + } + + private void button12_Click(object sender, EventArgs e) + { + opc.Write(OutputTag.chuliao, true); + //isUUTOut = true; + } + + private void button15_Click(object sender, EventArgs e) + { + if (runStatus == RunStatus.Normal) + { + if (MessageBox.Show("纭畾杩涜鎵嬪姩瀹氫綅锛�", "绯荤粺鎻愮ず", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + { + opc.Write(OutputTag.shoudongdingwei, true); + } + } + else + { + MessageBox.Show("娴嬭瘯鐘舵�佷笅鏃犳硶鎵嬪姩瀹氫綅锛�", "绯荤粺鎻愮ず", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + + private void checkBox2_CheckedChanged(object sender, EventArgs e) + { + if (checkBox2.Checked) + { + if ((runStatus == RunStatus.Normal)) + { + button15.Enabled = true; + } + else + { + checkBox2.Checked = false; + button15.Enabled = false; + MessageBox.Show("娴嬭瘯鐘舵�佷笅鏃犳硶鎵嬪姩瀹氫綅锛�", "绯荤粺鎻愮ず", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + else + { + button15.Enabled = false; + } + } + + #endregion + + private void frmMain_FormClosing(object sender, FormClosingEventArgs e) + { + if (MessageBox.Show("纭畾閫�鍑虹▼搴忥紵", "绯荤粺鎻愮ず", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) + { + e.Cancel = false; + + if (isRightCameraOpen == true) + { + cam.CloseCamera(); + } + + if (isLeftCameraOpen == true) + { + cam_left.CloseCamera(); + } + } + else + { + e.Cancel = true; + } + } + + #region 宸︾浉鏈虹浉鍏� + /// <summary> + /// 鍔犺浇宸︾浉鏈� + /// </summary> + private void initCam_Left() + { + Log.WriteLog("initCam_Left Enter"); + + cam_left = new PointGreyAndHalcon.PointGreyAndHalcon(); + isLeftCameraOpen = cam_left.OpenCamera(config.cams.SerialNumber[0]); + cam_left.GrabImageDone += new GrabImageDoneDelegate(cam_left_GrabImageDone); + + Log.WriteLog("initCam_Left Leave"); + } + + /// <summary> + /// 鍔犺浇HalconTool_Left + /// </summary> + private void initHalconTool_Left() + { + Log.WriteLog("initHalconTool_Left Enter"); + + ht_left.LoadJobs(); + ht_left.resultCreater.ListenEvent += new EventHandler<HalconTools.ListenEventArgs>(resultCreater_left_ListenEvent); + + Log.WriteLog("initHalconTool_Left Leave"); + } + #endregion + + private void tspbtnExit_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void ckbSaveImage_CheckedChanged(object sender, EventArgs e) + { + + if (ckbSaveImage.Checked) + { + config.saveImage=true; + sft.SetConfig(configPath, config); + + } + else + { + config.saveImage = false; + sft.SetConfig(configPath, config); + } + } + + public bool Effective() + { + string defaultScope = "<dogscope />"; + DogFeature feature = new DogFeature(1); + using (var dog = new Dog(feature)) + { + string vendorcodes = "tn+2bpxTE0MhQDarbNvbJEPpez6LfT6oB2DjZLKQMs0H2ap3YfmDIzYaLqDsZliOKL677L28ZbDhxwdP3Mq2xIbi/5zkXQ7ybvG9HLKaYXN3ql8yY5XJ1WHn7ISI+m7M9t1SzzQaUwnW/NV2VUslx/PdI5hZ1VVwsIaus042E5u8QGCSPJcDOXBeGIJeJSezvM+scip87hDujXsrubV0n+xCAdrTAs/WU5O1JwpgYNArqrFCpYSV4nO5ZveQRcPchUuED+gaNpHfsKZYAtW/43ud3IYcnTg6HuQPo+9fRu8iDpi18+j8USasj6M8EY9g7x3YjwO1DHCPpNEWB3IrHA0rhWG+c2emcCc3q8r8Qx8yHBCAUdZV7F8CTar/co5NbVv3FNObKULZxqrESWkPhoIKBtuCutspoGkTBHger+2A5qtfEMy6ZHt6MRvmgmiIO23AQGQ3yXKHXkq6HsDtrl1P+8coQTFnqopDOGaPi6C+Pb7qIqCJx+IBnWnjuZEfawKMcR+1hB9m1rSfhY+UQ0crh8jYr5a+tOAbSU9tPw3ZmKLQYbm6m8gLAHIv+EOq1rRfH5XxhUUbL4Lv4mrTFcmWl1Ibnaiz7140PqVqaquI8h8Mj4tL/5u/f1iJTKvnUywmPUDZXAecu6FmwDeQpvGJwa+q1Fgn3WXqBitT/lnEox7pp8deMpT/ol0wpcmlU40Cq5XsvnLmbGdK/qcXYBa+ZYhLYnXpzTe4XUDbatIFKfNVwZsSgXaMPpRLghEMQupv/H9uJ2vtlRYjt0ysoFDgzb3W0qr3bK7T55a8bhiptfh/dq7Q5hHZUolRprjXTbcUlmyhjzrH+bAz+BdmwiHJInx/najqyflknUUuOdO8IrMFAh0zWiICkijghbvWUwjg/DTpLKRO2e6hTaWtvCHTBHfBRV0/0EVW0kMmdx/huL1k1BBo11Fv/X7feCskl0m5rot1ubw/T/shAAvVBg=="; + var status = dog.Login(vendorcodes, defaultScope); + if (status != DogStatus.StatusOk) + { + if (status == DogStatus.TimeError) + { + if (config.leftUsed) + { + btnDisplay_left.Text = "绂佹绡℃敼鏃堕棿"; + } + else + { + btnDisplay.Text = "绂佹绡℃敼鏃堕棿"; + } + return false; + } + else + { + if (config.leftUsed) + { + btnDisplay_left.Text = "璇锋彃鍏ユ湁鏁堢殑鍔犲瘑鐙�"; + } + else + { + btnDisplay.Text = "璇锋彃鍏ユ湁鏁堢殑鍔犲瘑鐙�"; + } + return false; + } + } + } + return true; + } + + private void cboSize_Left_SelectionChangeCommitted(object sender, EventArgs e) + { + config.selectedSizeIndex = cboSize_Left.SelectedIndex; + sft.SetConfig(configPath, config); + long value = config.inch13; + if (cboSize_Left.SelectedValue.ToString() == "inch15") + { + value = config.inch15; + } + if (cboSize_Left.SelectedValue.ToString() == "inch16") + { + value = config.inch16; + } + opc.Write(OutputTag.X_Work, value); + } + + private void cboSize_SelectionChangeCommitted(object sender, EventArgs e) + { + config.selectedSizeIndex = cboSize.SelectedIndex; + sft.SetConfig(configPath, config); + long value = config.inch13; + if (cboSize.SelectedValue.ToString() == "inch15") + { + value = config.inch15; + } + if (cboSize.SelectedValue.ToString() == "inch16") + { + value = config.inch16; + } + opc.Write(OutputTag.X_Work, value); + } + } +} diff --git a/LLMF/frmMain.resx b/LLMF/frmMain.resx new file mode 100644 index 0000000..3c5b33d --- /dev/null +++ b/LLMF/frmMain.resx @@ -0,0 +1,1172 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>108, 17</value> + </metadata> + <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>522, 17</value> + </metadata> + <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>522, 17</value> + </metadata> + <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="toolStripMaxMin.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAACU1SURBVHhe7Zt3UFVpuu7npulJ58w9t6bbCAiomFAUBDEn + FLMiKCJJCZJFMIAiQbICEhTJoKIkQUExoCI55yzmHLu1tbvtYPvc51uwFW11uqZO1am6df946tt7rbX3 + Wu/ve+NG/6AwyQnyWo6S5DQdJA2eaE/ZYdBEG0kDNTZI+vC9TP0nWKHfeEt8OW49tQ79+6jfWPP31Pfc + f4Y+/P7fo76f//8A/l8G8JWq2XuSHe/7+bcA3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gdbkNwWifCsq4gPOMq9mVcR2R6J9zDi6GzNgxDtdndaTHTczNk + z9hXsuf/nPFC/xSAkDj2/nXMAwwBpSkbeV6EwUaMW8DpboknJun5Y7bJPuhaxLGdTcEK+0OS5q+LwYjZ + O7Bkw2EYOGRi3ZZTsHI/C3ufS3AOroBbRA08IsqxnQZu3p3P4ekILN2TsXZTDFbaRmG+STBmrvaG1tJt + zCt2rPNWUGLpU2JS7Gu4TOK5hbGi3e2r/zwArA6ixxa1VokAFLTtIDfJBoMmWmGQugWGaNkwJ7hirM5W + JkN/rLSPx1zjUCzbEIP12zJh4nwYxk6HoGcdi+kGgdBc7IGJupuhMZ8T5RRr6V+oyk0wotawo2OiVTPG + IDY4g1klBqixUkzcQABOPZWhz7N9CoBs92WS2favAaDrK2lzOBIxKNVXkWFZJbgbygQzjDujrGkraYj4 + V5lj12GQ+N9do43QT9UAX45YgX4qKzBg5EoM5PsB7AkGiYoywUyqJELyrCZKU0Qby93WFjstfttz4j0c + eQ/eh/lHUcudxzmj9Hm2zwHoe0wG4ncD+A0Exp4i668S66x0jpVBEndEeTJjU/waK+KU61A+sPj7ojzr + vzwbGvE/0RQ07Vnnxd8cHGigAz/H3WRmVxad24yeQUySmEcoUbpE9ZF+vJVWNkHciCFSPhL9QY+kqU+m + j9giJDNegPhdAGR6B4E3Y/mT/X4g1r4/p/V9oL6SlVXxBxfZ6w/v1/fh3u4eR1cBQtxL+v6+9xM/3fW5 + x3sAPvL979/DDf8X1DHu2nkSOM0AAAAASUVORK5CYII= +</value> + </data> + <data name="tspBtnOpenImageFile.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAACaZSURBVHhezZt3WJVntvadSWbOmDapForYe6MXSzQaaxIr + 9qgIFhTBg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R+lecmCklLCWST5VjIilurLKs3 + U/ar57EqkMlAG6qiuQK5V4hrGSturUCekTEp0FDGpIIyRhFSrqlRfZ9i2TdQPavsK0SV/zPWDhHARshX + o5q88gWJ+pzaI+Rm+YBvOkzkn20keLUaxectxK0lLyspqn7HsUJ6ghBVLC3WE7dWW0KBko7eHVfPwQ9d + sSbU4/g93nnp+3g39trx7t53MaQadWp7oDYBlO/XlaLiu06TZD6PlWguKUqVkyWASU7WFuupfoAgULld + DZesKUC1hX5PuiZqG1M13hF5H39egA/xpwWodrHqslL5lZXyI4PqHxxIIBJXU0NbCGjX+Pr5dwLIPTU/ + 6/8rAX4/AOXF1QJoiQDvcqwSdJT0I+fUUK6/hfq+d0HpHaqD0oef+eFnq42gPq7G+4Ov6crv3/cO1e94 + /7l3Gc+W/werhrvJ2KRvqAAAAABJRU5ErkJggg== +</value> + </data> + <data name="toolStripModeBtn.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAC3mSURBVHhevZt3WFQJtu373vfuzHQwS5QgqORcZDGBgoKC + iATJIBkJAipGzKJiDog5ogIimBCQYM5ZVFSMbbbN2t129/zeLrqdZ4fpmXvf970/9ldUAXVqrb332mvX + OeczdYtINCyj0LSK/n1YJKBhPgw1y0Ta20TSzi6QdrZBtLceirplErqWQ9FUhKPqOIT2TkGoO4ajYxuH + nmUymnZD5fVoeV3+1iEWLbt4NO0T5HkiGvYp6Nsko6+IQdcuig62Mc2/11NEy+uh8jySNg5JfOGcQgvH + BNStEtEzHYaBsRzTLBVti0R0zOPkZ3m0iKODVQQa8vk0rGPQtI5tjg428rqEliL+H6Ft83NoWSv/R/5G + 4jMl+E/jUwJUbQejYuuHunW4kCEg5KA/h7yJhKZVHBpWSXLgNNRthqN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YAJLeNQ6k + nZgeZShBqZoKWAk16Xk1MxE7UyFQor2A+3fi/4GAGCFAeZtdNJriDJWhIdWgrty/JVSlSpR3laraDEVV + /lZNaT9NAtEw9kVDBE3duJ9kSQRUWapmEZI5+b38n4alWNffEPBpaMjoUpe+Vld6fHlUhrr0slLplWL3 + /40A5S1nP9+Nqby0fugvl9gPlQ+oDMm8LExqNuHyGCMlLSPVIrn5VlxVsdWqzWClSgSs8m5UFflfVfm/ + ZoDSSn9EwD9ek3ZTF+OlDOXPH5+rmsp7SZX8loB/Rcg/CPgIWvn47xChaaO8ETlBQv7eSjRDee/uL6G8 + d09LqkFLeeepuVSKaIWmhIaEumWs+HypCqto8REyxwV8u18I0BCgypMWnxKgjI8kNBMh76lcbz+Gmpm0 + moSqiJ2ShI+A/yh+T0AI/wfWACIXlN8kdAAAAABJRU5ErkJggg== +</value> + </data> + <data name="toolStripButton5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAABW3SURBVHhenVr5l1bVleV/6LVCURMUbbqXqIFCqhjKaDoI + Hc3CaGKHLJfixCzILESgUYmKuKTTIioQQ2KiRTRAokirtJKObdOG2IZJQiSMMhSTDAU1c3rvc+557773 + fVXS/cNZ3/TefvvsM9xzb1W3XnXTpeeQadJz0FSpHDhFKmonS3nNA1JWMwE2PrHSAeOktP8Y6dFvdIGV + Vo+REhp+L6uZKMTslcGcFDBTPMW8Fpi4rxhmD3zP38r6j8V1MD5/wHjjetl8xxbF1mcSH3yLClA2YCIs + BSRYD5DgTQQo6Xu/moP573ztUgA4YI6YKWYOTzH5fTC/VnnAya4EiLHVOuFbRuEDdpcCxGCMbo9qI1jS + 9141/cwIhWtMsAdMgMHTFM8FMMxUADrHrEkJEvN+EzTneBIIF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t43RC60lQLFtr9CRcbnEi+Iwe9UABKNlYw7qqqWkLWOql21SEe1CIFYWFZjAdJlKsoo + NQpgXVpF4W/ciZIoP4fveJ8KoE0WfQsipCWW9gKeN3jf0gDCvMkqDvB0qxy4XPapsEUsRCpYvqO6ANlR + ONugFI99JBIgxbQMYKS8dt15WixA0mTxLD7Ht/PevD17/dWem4rqc4YKYADWqPICWNrEhFPrSoAUkxlA + EbIZYII6Fv9L3EqLmHrgAtPdG4kH0zNG7TFR31KBaXBaU9/6QFbkYAwkRQjCqgDxvjoFjAQIqhUzdSRc + ZwIwQtkSSITF73E0HCPToQOmTm0kHPD5SuP5IwVI+5bztR7j+Gp0EhjWXwJe6DFuvM5OhRPAwprVCwGm + KRneaw1F0XfTrWogGE9sLkBybYKTx8QrPjMDVBT+FuG7AI6bF8CvUwcpZhAg2WoTM8Kj6ShcuKQYaNy4 + dOMDixWMjdfoKhBG4ayocWnBwnrtlmDAKLSvNBkBICAF0Dkg4Hrd5wXQ+g4CaK9SAYCZ2wswKHYszs6d + gFJVX7qsnqy27AE6stJIGmS11gIoBUgaVIEATtRwNSNg3qEVkxmQEIfFWeYCAJeYLkCKG/iRFy3BoZhu + eQHGy/8C/mbEfvypzZ8AAAAASUVORK5CYII= +</value> + </data> + <data name="tspbtnExit.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAABkESURBVHhe7ZsJdJXVuYa3FLnWOlXEa9HaiF6KgAMiXERE + ZFAqTkQmmQQERCYHBGQeZBKLltp6FbXIPA8JgRBCQuYQQkJIIBCQWSaHOtXa1rK+Pu9/zrYHQiQ4tfeu + u9f61hn+/9/7/d79fsM+Aff/44cfFcph/2dG4NCvnav+W+c6/9656a86F/+6c0X/49xHLzv3xe+c+2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lJMyl6h/Y3cAIGXWXi8gj89ntOefznJ6VqsLzRkre77oczw7Zl5M4zIGz + NiblnvSjxzcdpUgYSKsMAZ/RWJuIkOwUe0pAqr8qR8rMUoMnQj9GzsSRmShjJk69zY6+fR7kQIxM74Pv + dI17dL+e845rPs2r+bWO1tO6cjyM4zM0T+Uu5fxZS/9041QS6rd0rgfS27OZxTeFAHxFhGTpiYjMD0Fo + YP7XWf0E702f9b2u6z7d73f8dI5rPa2bh5H1dz8Y+rt/pPPlKnlnMyJJUE64hdTa8g3nFgHiSwERIO2I + J8JXC988yRlfNqUOb3JWr/pe13WfYlzPKcH57O53PBfLx7Qu5M272Lkm4FGfr3L3vTjvhydBiVHHSjHe + 6AE6LYDmFYSBCeBGzOcI3z/IGX84URyLFG/6rIyu67rP13M9r3kiHdc6qCyXsz2Vzt2K0a4ECe87lX1Z + Q5OLYS2mRbW4QDTt7dxzgN+iJOmJEHBfNdRMKWMreclBhYo3fdZO67ru81ldRHrHNa8cfyL01139LzJt + wNWYL3Xfu/N+aBEtphKjxaUGSbA+1ryZc73fcm4FgI8rLOREJqadlGPaVTkpWXvTZ32v67pP9+s5PY/0 + j5Ijlt0d2nE5fjOmXKQN8E3OD+L4qSNSDfrXV54IKUL/Jq/l/c71f9G5WcR5NonsuHZRzp6OgDAJJ3Qf + 2T9zmnMzSW59mac5ppZW/xFCjivWFYY/6K6XNbwaBEZESBHKxAIqiYoM7VpTrCUJK5oPvdvRqbGd42Td + 6TL1Wd9f6BwpxbHZQWJrgGm31dFJ6tpxOS7l/ct2vazhiRAwAZQ0pQqRoaohJ9SdaRdvwUSMQsabPstZ + kSYViUApSk6LVJH7b7HjZxoCdyoZAq+dkyNySBIWMZGm73RNpOk+Eeid1jz/9o6fbkSS4QmRQzIRE2n+ + e90T6fD36LRz/wB0d+bXscATlQAAAABJRU5ErkJggg== +</value> + </data> + <data name="tspBtnHelp.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"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9gqEvPzmfy9AeQ6oOA0KZF8VpuJnKrQFkBDQ58SlxqEkI0Mu + xpA/JI+lDdlzGwgJq/5EAPSaBJAgh5PGfctAy3J0FbH0rPxIuB8JC2n5Hj3LOpSdHX/DhvlG6e6EkAZf + uP//4gH/VAAVXwogb199+V9SBfJfUnWU9lOTgfW5UANmawN2ZoaEgTXFsiIZdpN6VkP4N79nPVhDVOo5 + z9WlxXVtuHhCnzO9QI/QFYgIZfiCvAhSgXhFCGnV+v/YA1RULgAJlImgEUIjRm3HgRxWOIU58IdEDP64 + Phepz0UrpUtcWWLYjvFsx0nNjrEt8U3U5Oe1CGlhJZyU8+TZHsNKh4LocMjRkRsdIlC5AH8lWxlUAWQS + rMVG7hvlPz4KOdZ5qfUKhCi36v/R+7oAGtKfyX/+T8kSBsogog2xmFhO3JfxWw5xx7J9Ja7LFqqp8QM1 + gw3bXJnw5CaGrhZktlc8Rq5BVCRcEcp5ZfcCdNm/aATQQrkI/0iAz6gowGfLVIbKF1cRIoA+Q0HfmiII + SFgVQRVCzvnfBRiA/wvu7UNYQB0pYAAAAABJRU5ErkJggg== +</value> + </data> + <metadata name="tVideo.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="tVideo_left.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>229, 17</value> + </metadata> + <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>25</value> + </metadata> + <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAABAAMAICAQAAEABADoAgAANgAAACAgAAABAAgAqAgAAB4DAAAgIAAAAQAgAKgQAADGCwAAKAAAACAA + AABAAAAAAQAEAAAAAAAAAgAAAAA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F + f//t3ar/8uW9//Ppyez17NG+6NF018uhGbK3iyPc4tO3//Pu5f+vgyLHwZ5R9f78+v/48+b/17+B//Tt + 3//28eX/9fDi//Xv4uP17+AkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPfx5W348uf/+PLm//n0 + 6f/48+n/49Ot/9rBg//n1qT/9OnG//nx1v/79N//8+fE/9vFk//WwZj//fv4/+LUuv/p3cn//fv2//j0 + 7P/49O3/+fPp//fy5v/48ubi9/HkMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPnz + 6VT59Orv+fTq//r16//8+PL/8ura/+PSrv/i0ab/6dmy//DkxP/17NL/+vTl//v38P/69u///vz5//37 + 9v/59e3/+fXq//r06v/59Or/+fTqvPnz6CUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAPr16yr69u2y+/bt//v27P/8+PD//fr0//jz6P/z69r/7eHK/+zhyP/x6NP/9e/g//r1 + 7P/69u3/+vbt//r27P/69u3/+/bt6/r27Hb69eoFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD89+5F/Pjvp/z47+z8+O///fnw//768v/++/T//vv0//76 + 8//9+fH//Pjv//z47//8+O///Pjv2/z474H89+4iAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/fnwHP358Fj9+fGM/frxrv36 + 8bP9+fGy/fnxsv358bP9+fGn/fnxe/358D79+fANAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAP//////AAB/4AAAH+AAAAfgAAAP4AAAD+AAAAfgAAADwAAAA8AAAAPAAAABgAAAAYAA + AAGAAAABggMAQYcH8EEHA/ghB4PgIQfBwGED4cDhg/DBwYHw4MGB+HCDwPwwA8A+OAPgHxgH8AAAD/gA + AB/8AAA//gAA//+AAf//8B// +</value> + </data> +</root> \ No newline at end of file diff --git a/LLMF/frmPassword.Designer.cs b/LLMF/frmPassword.Designer.cs new file mode 100644 index 0000000..3dafd82 --- /dev/null +++ b/LLMF/frmPassword.Designer.cs @@ -0,0 +1,89 @@ +锘縩amespace LLMF +{ + partial class frmPassword + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.txtPassword = new System.Windows.Forms.TextBox(); + this.button1 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("瀹嬩綋", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label1.Location = new System.Drawing.Point(21, 30); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(54, 21); + this.label1.TabIndex = 0; + this.label1.Text = "瀵嗙爜"; + // + // txtPassword + // + this.txtPassword.Font = new System.Drawing.Font("瀹嬩綋", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtPassword.Location = new System.Drawing.Point(108, 27); + this.txtPassword.Name = "txtPassword"; + this.txtPassword.PasswordChar = '*'; + this.txtPassword.Size = new System.Drawing.Size(298, 31); + this.txtPassword.TabIndex = 1; + this.txtPassword.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtPassword_KeyPress); + // + // button1 + // + this.button1.Font = new System.Drawing.Font("瀹嬩綋", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.button1.Location = new System.Drawing.Point(108, 79); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(106, 42); + this.button1.TabIndex = 2; + this.button1.Text = "纭畾"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // frmPassword + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(449, 133); + this.Controls.Add(this.button1); + this.Controls.Add(this.txtPassword); + this.Controls.Add(this.label1); + this.Name = "frmPassword"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "frmPassword"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox txtPassword; + private System.Windows.Forms.Button button1; + } +} \ No newline at end of file diff --git a/LLMF/frmPassword.cs b/LLMF/frmPassword.cs new file mode 100644 index 0000000..04790e8 --- /dev/null +++ b/LLMF/frmPassword.cs @@ -0,0 +1,59 @@ +锘縰sing System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace LLMF +{ + public partial class frmPassword : Form + { + string password; + + public bool isOK1 = false; + public bool isOK + { + get { return isOK1; } + } + + public frmPassword(string password) + { + InitializeComponent(); + this.password = password; + } + + private void button1_Click(object sender, EventArgs e) + { + if (txtPassword.Text.Equals(this.password)) + { + isOK1 = true; + this.Close(); + } + else + { + MessageBox.Show("瀵嗙爜閿欒锛侊紒"); + this.txtPassword.Text = ""; + } + } + + private void txtPassword_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar == 13) + { + if (txtPassword.Text.Equals(this.password)) + { + isOK1 = true; + this.Close(); + } + else + { + MessageBox.Show("瀵嗙爜閿欒锛侊紒"); + this.txtPassword.Text = ""; + } + } + } + } +} diff --git a/LLMF/frmPassword.resx b/LLMF/frmPassword.resx new file mode 100644 index 0000000..19dc0dd --- /dev/null +++ b/LLMF/frmPassword.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file diff --git a/LLMF/ico.ico b/LLMF/ico.ico new file mode 100644 index 0000000..6dce7f5 --- /dev/null +++ b/LLMF/ico.ico Binary files differ diff --git a/Lib/FlyCapture/FlyCapture2Managed.dll b/Lib/FlyCapture/FlyCapture2Managed.dll new file mode 100644 index 0000000..0e7611e --- /dev/null +++ b/Lib/FlyCapture/FlyCapture2Managed.dll Binary files differ diff --git a/Lib/FlyCapture/FlyCapture2Managed_v100.dll b/Lib/FlyCapture/FlyCapture2Managed_v100.dll new file mode 100644 index 0000000..b49074c --- /dev/null +++ b/Lib/FlyCapture/FlyCapture2Managed_v100.dll Binary files differ diff --git a/Lib/SuperDog/api_dsp_windows.dll b/Lib/SuperDog/api_dsp_windows.dll new file mode 100644 index 0000000..f46e26a --- /dev/null +++ b/Lib/SuperDog/api_dsp_windows.dll Binary files differ diff --git a/Lib/SuperDog/api_dsp_windows_x64.dll b/Lib/SuperDog/api_dsp_windows_x64.dll new file mode 100644 index 0000000..76e03e7 --- /dev/null +++ b/Lib/SuperDog/api_dsp_windows_x64.dll Binary files differ diff --git a/Lib/SuperDog/dog_net_windows.dll b/Lib/SuperDog/dog_net_windows.dll new file mode 100644 index 0000000..cf37120 --- /dev/null +++ b/Lib/SuperDog/dog_net_windows.dll Binary files differ diff --git a/Lib/SuperDog/dog_windows_3153818.dll b/Lib/SuperDog/dog_windows_3153818.dll new file mode 100644 index 0000000..e66f083 --- /dev/null +++ b/Lib/SuperDog/dog_windows_3153818.dll Binary files differ diff --git a/Lib/SuperDog/dog_windows_x64_3153818.dll b/Lib/SuperDog/dog_windows_x64_3153818.dll new file mode 100644 index 0000000..798884d --- /dev/null +++ b/Lib/SuperDog/dog_windows_x64_3153818.dll Binary files differ diff --git a/Lib/halcon/halcondotnet.dll b/Lib/halcon/halcondotnet.dll new file mode 100644 index 0000000..59510d9 --- /dev/null +++ b/Lib/halcon/halcondotnet.dll Binary files differ diff --git a/PointGreyAndHalcon/PointGreyAndHalcon.sln b/PointGreyAndHalcon/PointGreyAndHalcon.sln new file mode 100644 index 0000000..7486ed6 --- /dev/null +++ b/PointGreyAndHalcon/PointGreyAndHalcon.sln @@ -0,0 +1,20 @@ +锘� +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PointGreyAndHalcon", "PointGreyAndHalcon\PointGreyAndHalcon.csproj", "{91B96D0B-F745-4850-9166-63A07917AC04}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {91B96D0B-F745-4850-9166-63A07917AC04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {91B96D0B-F745-4850-9166-63A07917AC04}.Debug|Any CPU.Build.0 = Debug|Any CPU + {91B96D0B-F745-4850-9166-63A07917AC04}.Release|Any CPU.ActiveCfg = Release|Any CPU + {91B96D0B-F745-4850-9166-63A07917AC04}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/PointGreyAndHalcon/PointGreyAndHalcon/PointGreyAndHalcon.cs b/PointGreyAndHalcon/PointGreyAndHalcon/PointGreyAndHalcon.cs new file mode 100644 index 0000000..6c511e8 --- /dev/null +++ b/PointGreyAndHalcon/PointGreyAndHalcon/PointGreyAndHalcon.cs @@ -0,0 +1,343 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using System.Drawing; +using System.Drawing.Imaging; +using HalconDotNet; +using FlyCapture2Managed; + +namespace PointGreyAndHalcon +{ + public delegate void GrabImageDoneDelegate(string recData,HImage recImage); + + public class PointGreyAndHalcon + { + #region 瀹氫箟 + ManagedBusManager busMgr = new ManagedBusManager(); + //CameraInfo[] camInfos = ManagedBusManager.DiscoverGigECameras(); + int camNum; + ManagedPGRGuid guid; + ManagedGigECamera cam; + + public HImage image = new HImage(); + public event GrabImageDoneDelegate GrabImageDone; + public string SerialNo; + + HImage tmpImage = new HImage(); + bool isCameraOpen = false; + //bool isRightCameraOpen = false; + #endregion + + public PointGreyAndHalcon() + { + //camNum = camInfos.Length; + } + + /// <summary> + /// 鎵撳紑鐩告満 + /// </summary> + /// <param name="index">缂栧彿</param> + public void OpenCamera(int index) + { + try + { + guid = busMgr.GetCameraFromIndex((uint)index); + cam = new ManagedGigECamera(); + cam.Connect(guid); + cam.StartCapture(); + isCameraOpen = true; + } + catch (Exception ex) + { + MessageBox.Show("鐩告満" + index.ToString() + "鎵撳紑澶辫触"); + + } + } + + /// <summary> + /// 鎵撳紑鐩告満 + /// </summary> + /// <param name="serialnumber">搴忓垪鍙�</param> + public bool OpenCamera(uint serialnumber) + { + try + { + guid = busMgr.GetCameraFromSerialNumber(serialnumber); + cam = new ManagedGigECamera(); + cam.Connect(guid); + + cam.WriteRegister(0x610,0x00000000);//鎺у埗鐩告満涓婄數 + System.Threading.Thread.Sleep(100); + cam.WriteRegister(0x610, 0x80000000);//鎺у埗鐩告満涓嬬數 + + cam.StartCapture(); + return true; + } + catch (Exception ex) + { + MessageBox.Show("鐩告満" + serialnumber.ToString() + "鎵撳紑澶辫触"); + return false; + } + } + + ///// <summary> + ///// 鎵撳紑鐩告満 + ///// </summary> + ///// <param name="serialnumber">搴忓垪鍙�</param> + //public void OpenCamera_test(uint serialnumber) + //{ + // try + // { + // guid = busMgr.GetCameraFromSerialNumber(serialnumber); + // cam = new ManagedGigECamera(); + // cam.Connect(guid); + // cam.StartCapture(Test); + // } + // catch (Exception ex) + // { + // MessageBox.Show("鐩告満" + serialnumber.ToString() + "鎵撳紑澶辫触"); + // } + //} + + private void Test(ManagedImage image) + { + lock (GetMutexLock()) + { + SerialNo = ""; + try + { + //ManagedImage rawImage = new ManagedImage(); + + // Retrieve an image + //cam.RetrieveBuffer(rawImage); + + // Create a converted image + ManagedImage convertedImage = new ManagedImage(); + + // Convert the raw image + image.Convert(FlyCapture2Managed.PixelFormat.PixelFormatMono8, convertedImage); + + //converterImage to HImage + Bitmap tmpBmp = convertedImage.bitmap; + BitmapData tmpBitmapData = tmpBmp.LockBits(new Rectangle(0, 0, tmpBmp.Width, tmpBmp.Height), ImageLockMode.ReadOnly, + System.Drawing.Imaging.PixelFormat.Format8bppIndexed); + + tmpImage.GenImage1("byte", tmpBmp.Width, tmpBmp.Height, tmpBitmapData.Scan0); + + if (GrabImageDone != null) + { + GrabImageDone("GrabSuccess", tmpImage); + } + + tmpBmp.UnlockBits(tmpBitmapData); + image.Dispose(); + convertedImage.Dispose(); + tmpBmp.Dispose(); + } + catch (Exception ex) + { + if (GrabImageDone != null) + { + GrabImageDone("GrabFail", tmpImage); + } + } + } + } + + /// <summary> + /// 鍏抽棴鐩告満 + /// </summary> + public void CloseCamera() + { + cam.StopCapture(); + } + + /// <summary> + /// 閲囧浘 + /// </summary> + public void GrabImage(string sn) + { + lock (GetMutexLock()) + { + SerialNo = sn; + try + { + ManagedImage rawImage = new ManagedImage(); + + // Retrieve an image + cam.RetrieveBuffer(rawImage); + + // Create a converted image + ManagedImage convertedImage = new ManagedImage(); + + // Convert the raw image + rawImage.Convert(FlyCapture2Managed.PixelFormat.PixelFormatMono8, convertedImage); + + //converterImage to HImage + Bitmap tmpBmp = convertedImage.bitmap; + BitmapData tmpBitmapData = tmpBmp.LockBits(new Rectangle(0, 0, tmpBmp.Width, tmpBmp.Height), ImageLockMode.ReadOnly, + System.Drawing.Imaging.PixelFormat.Format8bppIndexed); + + tmpImage.GenImage1("byte", tmpBmp.Width, tmpBmp.Height, tmpBitmapData.Scan0); + image.Dispose(); + image = tmpImage.CopyImage(); + if (GrabImageDone != null) + { + GrabImageDone("GrabSuccess", tmpImage); + } + + tmpBmp.UnlockBits(tmpBitmapData); + rawImage.Dispose(); + convertedImage.Dispose(); + tmpBmp.Dispose(); + } + catch (Exception ex) + { + if (GrabImageDone != null) + { + GrabImageDone("GrabFail", tmpImage); + } + } + } + } + + /// <summary> + /// 閲囧僵鑹插浘 + /// </summary> + public void GrabColorImage(string sn) + { + SerialNo = sn; + try + { + ManagedImage rawImage = new ManagedImage(); + + // Retrieve an image + cam.RetrieveBuffer(rawImage); + + // Create a converted image + ManagedImage convertedImage = new ManagedImage(); + + // Convert the raw image + rawImage.Convert(FlyCapture2Managed.PixelFormat.PixelFormatBgr, convertedImage); + + //converterImage to HImage + Bitmap tmpBmp = convertedImage.bitmap; + Rectangle rect = new Rectangle(0, 0, tmpBmp.Width, tmpBmp.Height); + BitmapData tmpBitmapData = tmpBmp.LockBits(rect, ImageLockMode.ReadOnly, + System.Drawing.Imaging.PixelFormat.Format24bppRgb); + + #region 灏哛GB鍒嗙寮�鏉� + //鍒涘缓鏂扮殑褰╄壊鐨刡itmap + Bitmap redBitmap = new Bitmap(tmpBmp.Width, tmpBmp.Height); + Bitmap greenBitmap = new Bitmap(tmpBmp.Width, tmpBmp.Height); + Bitmap blueBitmap = new Bitmap(tmpBmp.Width, tmpBmp.Height); + //鍒涘缓鏂扮殑褰╄壊鐨勬暟鎹鍣� + BitmapData redBmData = redBitmap.LockBits(rect, ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format8bppIndexed); + BitmapData greenBmData = greenBitmap.LockBits(rect, ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format8bppIndexed); + BitmapData blueBmData = blueBitmap.LockBits(rect, ImageLockMode.ReadOnly, System.Drawing.Imaging.PixelFormat.Format8bppIndexed); + //灏咮itmap瀵硅薄鐨勪俊鎭瓨鏀惧埌byte鏁扮粍涓� + int tmp_bytes = tmpBitmapData.Stride * tmpBmp.Height; + int red_bytes = redBmData.Stride * tmpBmp.Height; + int green_bytes = greenBmData.Stride * tmpBmp.Height; + int blue_bytes = blueBmData.Stride * tmpBmp.Height; + byte[] tmpValues = new byte[tmp_bytes]; + byte[] redValues = new byte[red_bytes]; + byte[] greenValues = new byte[green_bytes]; + byte[] blueValues = new byte[blue_bytes]; + //澶嶅埗GRB淇℃伅鍒癰yte鏁扮粍 + System.Runtime.InteropServices.Marshal.Copy(tmpBitmapData.Scan0, tmpValues, 0, tmp_bytes); + System.Runtime.InteropServices.Marshal.Copy(redBmData.Scan0, redValues, 0, red_bytes); + System.Runtime.InteropServices.Marshal.Copy(greenBmData.Scan0, greenValues, 0, green_bytes); + System.Runtime.InteropServices.Marshal.Copy(blueBmData.Scan0, blueValues, 0, blue_bytes); + + //灏嗗僵鑹蹭俊鎭垎鍒瓨鍌ㄥ埌RGB鏁扮粍涓� + for (int i = 0; i < tmpBmp.Height; i++) + { + for (int j = 0; j < tmpBmp.Width; j++) + { + int k = 3 * j; + redValues[i * redBmData.Stride + j] = tmpValues[i * tmpBitmapData.Stride + k + 2]; + greenValues[i * blueBmData.Stride + j] = tmpValues[i * tmpBitmapData.Stride + k + 1]; + blueValues[i * greenBmData.Stride + j] = tmpValues[i * tmpBitmapData.Stride + k]; + } + } + + //鍐嶅皢鏁扮粍淇℃伅澶嶅埗鍒癛GB + System.Runtime.InteropServices.Marshal.Copy(redValues, 0, redBmData.Scan0, red_bytes); + System.Runtime.InteropServices.Marshal.Copy(greenValues, 0, greenBmData.Scan0, green_bytes); + System.Runtime.InteropServices.Marshal.Copy(blueValues, 0, blueBmData.Scan0, blue_bytes); + + #endregion + + tmpImage.GenImage3("byte", tmpBmp.Width, tmpBmp.Height, redBmData.Scan0, greenBmData.Scan0, blueBmData.Scan0); + + if (GrabImageDone != null) + { + GrabImageDone("GrabSuccess", tmpImage); + } + + tmpBmp.UnlockBits(tmpBitmapData); + redBitmap.UnlockBits(redBmData); + greenBitmap.UnlockBits(greenBmData); + blueBitmap.UnlockBits(blueBmData); + rawImage.Dispose(); + convertedImage.Dispose(); + tmpBmp.Dispose(); + redBitmap.Dispose(); + greenBitmap.Dispose(); + blueBitmap.Dispose(); + } + catch (Exception ex) + { + if (GrabImageDone != null) + { + GrabImageDone("GrabFail", tmpImage); + } + } + } + + /// <summary> + /// 灏嗗浘鐗囨樉绀哄埌鍥剧浉妗嗕腑 + /// </summary> + public void UpdateImage(HWindowControl viewPort) + { + HWndCtrl viewController = new HWndCtrl(viewPort); + ROIController roiController = new ROIController(); + viewController.resetAll(); + viewController.useROIController(roiController); + viewController.setViewState(HWndCtrl.MODE_VIEW_NONE); + + viewController.addIconicVar(image); + viewController.repaint(); + //image.Dispose(); + } + + /// <summary> + /// 淇濆瓨鍥剧墖 + /// </summary> + /// <param name="filePath"></param> + /// <param name="fileName"></param> + public void SaveImage(string filePath, string fileName) + { + image.WriteImage("tiff", 0, filePath + "\\" + fileName); + } + + public void SetExposure(float exposure) + { + CameraProperty cp = cam.GetProperty(PropertyType.Shutter); + cp.absValue = exposure; + cp.autoManualMode = false; + cam.SetProperty(cp); + } + + private static System.Threading.Mutex _mutex; + + private System.Threading.Mutex GetMutexLock() + { + System.Threading.Interlocked.CompareExchange(ref _mutex, new System.Threading.Mutex(), null); + return _mutex; + } + } +} diff --git a/PointGreyAndHalcon/PointGreyAndHalcon/PointGreyAndHalcon.csproj b/PointGreyAndHalcon/PointGreyAndHalcon/PointGreyAndHalcon.csproj new file mode 100644 index 0000000..0eb3fd0 --- /dev/null +++ b/PointGreyAndHalcon/PointGreyAndHalcon/PointGreyAndHalcon.csproj @@ -0,0 +1,88 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>9.0.21022</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{91B96D0B-F745-4850-9166-63A07917AC04}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>PointGreyAndHalcon</RootNamespace> + <AssemblyName>PointGreyAndHalcon</AssemblyName> + <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <FileUpgradeFlags> + </FileUpgradeFlags> + <UpgradeBackupLocation> + </UpgradeBackupLocation> + <OldToolsVersion>3.5</OldToolsVersion> + <TargetFrameworkProfile /> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + <Prefer32Bit>false</Prefer32Bit> + </PropertyGroup> + <ItemGroup> + <Reference Include="FlyCapture2Managed_v100, Version=2.8.3.1, Culture=neutral, PublicKeyToken=76c6583b4a4585f4, processorArchitecture=x86"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\Lib\FlyCapture\FlyCapture2Managed_v100.dll</HintPath> + </Reference> + <Reference Include="halcondotnet, Version=11.0.1.0, Culture=neutral, PublicKeyToken=4973bed59ddbf2b8, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\Lib\halcon\halcondotnet.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Core"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml.Linq"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> + <Reference Include="System.Data.DataSetExtensions"> + <RequiredTargetFramework>3.5</RequiredTargetFramework> + </Reference> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="PointGreyAndHalcon.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="ViewROI\FunctionPlot.cs" /> + <Compile Include="ViewROI\GraphicsContext.cs" /> + <Compile Include="ViewROI\HObjectEntry.cs" /> + <Compile Include="ViewROI\HWndCtrl.cs" /> + <Compile Include="ViewROI\ROI.cs" /> + <Compile Include="ViewROI\ROICircle.cs" /> + <Compile Include="ViewROI\ROICircularArc.cs" /> + <Compile Include="ViewROI\ROIController.cs" /> + <Compile Include="ViewROI\ROILine.cs" /> + <Compile Include="ViewROI\ROIRectangle1.cs" /> + <Compile Include="ViewROI\ROIRectangle2.cs" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file diff --git a/PointGreyAndHalcon/PointGreyAndHalcon/Properties/AssemblyInfo.cs b/PointGreyAndHalcon/PointGreyAndHalcon/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..7c1e288 --- /dev/null +++ b/PointGreyAndHalcon/PointGreyAndHalcon/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +锘縰sing System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 鏈夊叧绋嬪簭闆嗙殑甯歌淇℃伅閫氳繃涓嬪垪灞炴�ч泦 +// 鎺у埗銆傛洿鏀硅繖浜涘睘鎬у�煎彲淇敼 +// 涓庣▼搴忛泦鍏宠仈鐨勪俊鎭�� +[assembly: AssemblyTitle("PointGreyAndHalcon")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("PointGreyAndHalcon")] +[assembly: AssemblyCopyright("Copyright 漏 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 灏� ComVisible 璁剧疆涓� false 浣挎绋嬪簭闆嗕腑鐨勭被鍨� +// 瀵� COM 缁勪欢涓嶅彲瑙併�傚鏋滈渶瑕佷粠 COM 璁块棶姝ょ▼搴忛泦涓殑绫诲瀷锛� +// 鍒欏皢璇ョ被鍨嬩笂鐨� ComVisible 灞炴�ц缃负 true銆� +[assembly: ComVisible(false)] + +// 濡傛灉姝ら」鐩悜 COM 鍏紑锛屽垯涓嬪垪 GUID 鐢ㄤ簬绫诲瀷搴撶殑 ID +[assembly: Guid("3248628a-aa47-4c76-88bb-67758aae0ff2")] + +// 绋嬪簭闆嗙殑鐗堟湰淇℃伅鐢变笅闈㈠洓涓�肩粍鎴�: +// +// 涓荤増鏈� +// 娆$増鏈� +// 鍐呴儴鐗堟湰鍙� +// 淇鍙� +// +// 鍙互鎸囧畾鎵�鏈夎繖浜涘�硷紝涔熷彲浠ヤ娇鐢ㄢ�滃唴閮ㄧ増鏈彿鈥濆拰鈥滀慨璁㈠彿鈥濈殑榛樿鍊硷紝 +// 鏂规硶鏄寜濡備笅鎵�绀轰娇鐢ㄢ��*鈥�: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/FunctionPlot.cs b/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/FunctionPlot.cs new file mode 100644 index 0000000..8651214 --- /dev/null +++ b/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/FunctionPlot.cs @@ -0,0 +1,562 @@ +using System; +using System.Drawing; +using System.Windows.Forms; +using HalconDotNet; + + +namespace PointGreyAndHalcon +{ + /// <summary> + /// This class allows you to print a function into a Windows.Forms.Control. + /// The function must be supplied as an array of either double, float or + /// int values. When initializing the class you must provide the control that + /// actually draws the function plot. During the initialization you + /// can also decide whether the mouse event is used to return the (x,y) + /// coordinates of the plotted function. The scaling + /// of the x-y axis is performed automatically and depent on the length + /// of the function as well as the settings for the y-axis scaling: + /// * AXIS_RANGE_FIXED + /// * AXIS_RANGE_INCREASING + /// * AXIS_RANGE_ADAPTING + /// + /// Constraints of the function plot class: + /// So far only functions containing a positive range of y-values can + /// be plotted correctly. Also only a positive and ascending x-range + /// can be plotted. The origin of the coordinate system is set to + /// be in the lower left corner of the control. Another definition + /// of the origin and hence the direction of the coordinate axis + /// is not implemented yet. + /// </summary> + public class FunctionPlot + { + // panels for display + private Graphics gPanel, backBuffer; + + // graphical settings + private Pen pen, penCurve, penCursor; + private SolidBrush brushCS, brushFuncPanel; + private Font drawFont; + private StringFormat format; + private Bitmap functionMap; + + // dimensions of panels + private float panelWidth; + private float panelHeight; + private float margin; + + // origin + private float originX; + private float originY; + + private PointF[] points; + private HFunction1D func; + + // axis + private int axisAdaption; + private float axisXLength; + private float axisYLength; + private float scaleX, scaleY; + + public const int AXIS_RANGE_FIXED = 3; + public const int AXIS_RANGE_INCREASING = 4; + public const int AXIS_RANGE_ADAPTING = 5; + + int PreX, BorderRight, BorderTop; + + + /// <summary> + /// Initializes a FunctionPlot instance by providing a GUI control + /// and a flag specifying the mouse interaction mode. + /// The control is used to determine the available space to draw + /// the axes and to plot the supplied functions. Depending on the + /// available space, the values of the function as well as the axis + /// steps are adjusted (scaled) to fit into the visible part of the + /// control. + /// </summary> + /// <param name="panel"> + /// An instance of the Windows.Forms.Control to plot the + /// supplied functions in + /// </param> + /// <param name="useMouseHandle"> + /// Flag that specifies whether or not mouse interaction should + /// be used to create a navigation bar for the plotted function + /// </param> + public FunctionPlot(Control panel, bool useMouseHandle) + { + gPanel = panel.CreateGraphics(); + + panelWidth = panel.Size.Width - 32; + panelHeight = panel.Size.Height - 22; + + originX = 32; + originY = panel.Size.Height - 22; + margin = 5.0f; + + BorderRight = (int)(panelWidth + originX - margin); + BorderTop = (int)panelHeight; + + PreX = 0; + scaleX = scaleY = 0.0f; + + + //default setting for axis scaling + axisAdaption = AXIS_RANGE_ADAPTING; + axisXLength = 10.0f; + axisYLength = 10.0f; + + pen = new Pen(System.Drawing.Color.DarkGray, 1); + penCurve = new Pen(System.Drawing.Color.Blue, 1); + penCursor = new Pen(System.Drawing.Color.LightSteelBlue, 1); + penCursor.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash; + + brushCS = new SolidBrush(Color.Black); + brushFuncPanel = new SolidBrush(Color.White); + drawFont = new Font("Arial", 6); + format = new StringFormat(); + format.Alignment = StringAlignment.Far; + + functionMap = new Bitmap(panel.Size.Width, panel.Size.Height); + backBuffer = Graphics.FromImage(functionMap); + resetPlot(); + + panel.Paint += new System.Windows.Forms.PaintEventHandler(this.paint); + + if (useMouseHandle) + panel.MouseMove += new System.Windows.Forms.MouseEventHandler(this.mouseMoved); + } + + /// <summary> + /// Convenience method for constructor call. For this case the + /// useMouseHandle flag is set to false by default. + /// </summary> + /// <param name="panel"> + /// An instance of the Windows.Forms.Control to plot the + /// supplied function in. + /// </param> + public FunctionPlot(Control panel) + : this(panel, false) + { + } + + + /// <summary> + /// Changes the origin of the coordinate system to be + /// at the control positions x and y. + /// </summary> + /// <param name="x"> + /// X position within the control coordinate system + /// </param> + /// <param name="y"> + /// Y position within the control coordinate system. + /// </param> + public void setOrigin(int x, int y) + { + float tmpX; + + if (x < 1 || y < 1) + return; + + tmpX = originX; + originX = x; + originY = y; + + panelWidth = panelWidth + tmpX - originX; + panelHeight = originY; + BorderRight = (int)(panelWidth + originX - margin); + BorderTop = (int)panelHeight; + } + + + /// <summary> + /// Sets the type of scaling for the y-axis. If the + /// y-axis is defined to be of fixed size, then the upper + /// limit has to be provided with val. Otherwise, + /// an 8-bit image is assumed, so the fixed size is set + /// to be 255. + /// </summary> + /// <param name="mode"> + /// Class constant starting with AXIS_RANGE_* + /// </param> + /// <param name="val"> + /// For the mode AXIS_RANGE_FIXED the value + /// val must be positive, otherwise + /// it has no meaning. + /// </param> + public void setAxisAdaption(int mode, float val) + { + switch (mode) + { + case AXIS_RANGE_FIXED: + axisAdaption = mode; + axisYLength = (val > 0) ? val : 255.0f; + break; + default: + axisAdaption = mode; + break; + } + } + + public void setAxisAdaption(int mode) + { + setAxisAdaption(mode, -1.0f); + } + + + /// <summary> + /// Plots a function of double values. + /// </summary> + /// <param name="grayValues"> + /// Y-values defined as an array of doubles + /// </param> + public void plotFunction(double[] grayValues) + { + drawFunction(new HTuple(grayValues)); + } + + + /// <summary> + /// Plots a function of float values. + /// </summary> + /// <param name="grayValues"> + /// Y-values defined as an array of floats + /// </param> + public void plotFunction(float[] grayValues) + { + drawFunction(new HTuple(grayValues)); + } + + + /// <summary> + /// Plots a function of integer values. + /// </summary> + /// <param name="grayValues"> + /// Y-values defined as an array of integers + /// </param> + public void plotFunction(int[] grayValues) + { + drawFunction(new HTuple(grayValues)); + } + + + /// <summary>Plots a function provided as an HTuple</summary> + private void drawFunction(HTuple tuple) + { + HTuple val; + int maxY,maxX; + float stepOffset; + + if (tuple.Length == 0) + { + resetPlot(); + return; + } + + val = tuple.TupleSortIndex(); + maxX = tuple.Length - 1; + maxY = (int)tuple[val[val.Length - 1].I].D; + + axisXLength = maxX; + + switch (axisAdaption) + { + case AXIS_RANGE_ADAPTING: + axisYLength = maxY; + break; + case AXIS_RANGE_INCREASING: + axisYLength = (maxY > axisYLength) ? maxY : axisYLength; + break; + } + + backBuffer.Clear(System.Drawing.Color.WhiteSmoke); + backBuffer.FillRectangle(brushFuncPanel, originX, 0, panelWidth, panelHeight); + + stepOffset = drawXYLabels(); + drawLineCurve(tuple, stepOffset); + backBuffer.Flush(); + + gPanel.DrawImageUnscaled(functionMap, 0, 0); + gPanel.Flush(); + } + + + /// <summary> + /// Clears the panel and displays only the coordinate axes. + /// </summary> + public void resetPlot() + { + backBuffer.Clear(System.Drawing.Color.WhiteSmoke); + backBuffer.FillRectangle(brushFuncPanel, originX, 0, panelWidth, panelHeight); + func = null; + drawXYLabels(); + backBuffer.Flush(); + repaint(); + } + + + /// <summary> + /// Puts (=flushes) the current content of the graphics object on screen + /// again. + /// </summary> + private void repaint() + { + gPanel.DrawImageUnscaled(functionMap, 0, 0); + gPanel.Flush(); + } + + + /// <summary>Plots the points of the function.</summary> + private void drawLineCurve(HTuple tuple, float stepOffset) + { + int length; + + if (stepOffset > 1) + points = scaleDispValue(tuple); + else + points = scaleDispBlockValue(tuple); + + length = points.Length; + + func = new HFunction1D(tuple); + + for (int i = 0; i < length - 1; i++) + backBuffer.DrawLine(penCurve, points[i], points[i + 1]); + + } + + + /// <summary> + /// Scales the function to the dimension of the graphics object + /// (provided by the control). + /// </summary> + /// <param name="tup"> + /// Function defined as a tuple of y-values + /// </param> + /// <returns> + /// Array of PointF values, containing the scaled function data + /// </returns> + private PointF[] scaleDispValue(HTuple tup) + { + PointF [] pVals; + float xMax, yMax, yV, x, y; + int length; + + xMax = axisXLength; + yMax = axisYLength; + + scaleX = (xMax != 0.0f) ? ((panelWidth - margin) / xMax) : 0.0f; + scaleY = (yMax != 0.0f) ? ((panelHeight - margin) / yMax) : 0.0f; + + length = tup.Length; + pVals = new PointF[length]; + + for (int j=0; j < length; j++) + { + yV = (float)tup[j].D; + x = originX + (float)j * scaleX; + y = panelHeight - (yV * scaleY); + pVals[j] = new PointF(x, y); + } + + return pVals; + } + + + /// <summary> + /// Scales the function to the dimension of the graphics object + /// (provided by the control). If the stepsize for the x-axis is + /// 1, the points are scaled in a block shape. + /// </summary> + /// <param name="tup"> + /// Function defined as a tuple of y-values + /// </param> + /// <returns> + /// Array of PointF values, containing the scaled function data + /// </returns> + private PointF[] scaleDispBlockValue(HTuple tup) + { + PointF [] pVals; + float xMax, yMax, yV,x,y; + int length, idx; + + xMax = axisXLength; + yMax = axisYLength; + + scaleX = (xMax != 0.0f) ? ((panelWidth - margin) / xMax) : 0.0f; + scaleY = (yMax != 0.0f) ? ((panelHeight - margin) / yMax) : 0.0f; + + length = tup.Length; + pVals = new PointF[length * 2]; + + y = 0; + idx = 0; + + for (int j=0; j < length; j++) + { + yV = (float)tup[j].D; + x = originX + (float)j * scaleX - (scaleX / 2.0f); + y = panelHeight - (yV * scaleY); + pVals[idx] = new PointF(x, y); + idx++; + + x = originX + (float)j * scaleX + (scaleX / 2.0f); + pVals[idx] = new PointF(x, y); + idx++; + } + + //trim the end points of the curve + idx--; + x = originX + (float)(length - 1) * scaleX; + pVals[idx] = new PointF(x, y); + + idx = 0; + yV = (float)tup[idx].D; + x = originX; + y = panelHeight - (yV * scaleY); + pVals[idx] = new PointF(x, y); + + return pVals; + } + + + /// <summary>Draws x- and y-axis and its labels.</summary> + /// <returns>Step size used for the x-axis</returns> + private float drawXYLabels() + { + float pX,pY,length, XStart,YStart; + float YCoord, XCoord, XEnd, YEnd, offset, offsetString, offsetStep; + float scale = 0.0f; + + offsetString = 5; + XStart = originX; + YStart = originY; + + //prepare scale data for x-axis + pX = axisXLength; + if (pX != 0.0) + scale = (panelWidth - margin) / pX; + + if (scale > 10.0) + offset = 1.0f; + else if (scale > 2) + offset = 10.0f; + else if (scale > 0.2) + offset = 100.0f; + else + offset = 1000.0f; + + + /*************** draw X-Axis ***************/ + XCoord = 0.0f; + YCoord = YStart; + XEnd = (scale * pX); + + backBuffer.DrawLine(pen, XStart, YStart, XStart + panelWidth - margin, YStart); + backBuffer.DrawLine(pen, XStart + XCoord, YCoord, XStart + XCoord, YCoord + 6); + backBuffer.DrawString(0 + "", drawFont, brushCS, XStart + XCoord + 4, YCoord + 8, format); + backBuffer.DrawLine(pen, XStart + XEnd, YCoord, XStart + XEnd, YCoord + 6); + backBuffer.DrawString(((int)pX + ""), drawFont, brushCS, XStart + XEnd + 4, YCoord + 8, format); + + length = (int)(pX / offset); + length = (offset == 10) ? length - 1 : length; + for (int i=1; i <= length; i++) + { + XCoord = (float)(offset * i * scale); + + if ((XEnd - XCoord) < 20) + continue; + + backBuffer.DrawLine(pen, XStart + XCoord, YCoord, XStart + XCoord, YCoord + 6); + backBuffer.DrawString(((int)(i * offset) + ""), drawFont, brushCS, XStart + XCoord + 5, YCoord + 8, format); + } + + offsetStep = offset; + + //prepare scale data for y-axis + pY = axisYLength; + if (pY != 0.0) + scale = ((panelHeight - margin) / pY); + + if (scale > 10.0) + offset = 1.0f; + else if (scale > 2) + offset = 10.0f; + else if (scale > 0.8) + offset = 50.0f; + else if (scale > 0.12) + offset = 100.0f; + else + offset = 1000.0f; + + /*************** draw Y-Axis ***************/ + XCoord = XStart; + YCoord = 5.0f; + YEnd = YStart - (scale * pY); + + backBuffer.DrawLine(pen, XStart, YStart, XStart, YStart - (panelHeight - margin)); + backBuffer.DrawLine(pen, XCoord, YStart, XCoord - 10, YStart); + backBuffer.DrawString(0 + "", drawFont, brushCS, XCoord - 12, YStart - offsetString, format); + backBuffer.DrawLine(pen, XCoord, YEnd, XCoord - 10, YEnd); + backBuffer.DrawString(pY + "", drawFont, brushCS, XCoord - 12, YEnd - offsetString, format); + + length = (int)(pY / offset); + length = (offset == 10) ? length - 1 : length; + for (int i=1; i <= length; i++) + { + YCoord = (YStart - ((float)offset * i * scale)); + + if ((YCoord - YEnd) < 10) + continue; + + backBuffer.DrawLine(pen, XCoord, YCoord, XCoord - 10, YCoord); + backBuffer.DrawString(((int)(i * offset) + ""), drawFont, brushCS, XCoord - 12, YCoord - offsetString, format); + } + + return offsetStep; + } + + + /// <summary> + /// Action call for the Mouse-Move event. For the x-coordinate + /// supplied by the MouseEvent, the unscaled x and y coordinates + /// of the plotted function are determined and displayed + /// on the control. + /// </summary> + private void mouseMoved(object sender, MouseEventArgs e) + { + int Xh, Xc; + HTuple Ytup; + float Yh, Yc; + + Xh = e.X; + + if (PreX == Xh || Xh < originX || Xh > BorderRight || func == null) + return; + + PreX = Xh; + + Xc = (int)Math.Round((Xh - originX) / scaleX); + Ytup = func.GetYValueFunct1d(new HTuple(Xc), "zero"); + + Yc = (float)Ytup[0].D; + Yh = panelHeight - (Yc * scaleY); + + gPanel.DrawImageUnscaled(functionMap, 0, 0); + gPanel.DrawLine(penCursor, Xh, 0, Xh, BorderTop); + gPanel.DrawLine(penCursor, originX, Yh, BorderRight + margin, Yh); + gPanel.DrawString(("X = " + Xc), drawFont, brushCS, panelWidth - margin, 10); + gPanel.DrawString(("Y = " + (int)Yc), drawFont, brushCS, panelWidth - margin, 20); + gPanel.Flush(); + } + + + /// <summary> + /// Action call for the Paint event of the control to trigger the + /// repainting of the function plot. + /// </summary> + private void paint(object sender, System.Windows.Forms.PaintEventArgs e) + { + repaint(); + } + + }//end of class +}//end of namespace diff --git a/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/GraphicsContext.cs b/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/GraphicsContext.cs new file mode 100644 index 0000000..ffce705 --- /dev/null +++ b/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/GraphicsContext.cs @@ -0,0 +1,417 @@ +using System; +using System.Collections; +using HalconDotNet; + + + +namespace PointGreyAndHalcon +{ + public delegate void GCDelegate(string val); + + /// <summary> + /// This class contains the graphical context of an HALCON object. The + /// set of graphical modes is defined by the hashlist 'graphicalSettings'. + /// If the list is empty, then there is no difference to the graphical + /// setting defined by the system by default. Otherwise, the provided + /// HALCON window is adjusted according to the entries of the supplied + /// graphical context (when calling applyContext()) + /// </summary> + public class GraphicsContext + { + + /// <summary> + /// Graphical mode for the output color (see dev_set_color) + /// </summary> + public const string GC_COLOR = "Color"; + + /// <summary> + /// Graphical mode for the multi-color output (see dev_set_colored) + /// </summary> + public const string GC_COLORED = "Colored"; + + /// <summary> + /// Graphical mode for the line width (see set_line_width) + /// </summary> + public const string GC_LINEWIDTH = "LineWidth"; + + /// <summary> + /// Graphical mode for the drawing (see set_draw) + /// </summary> + public const string GC_DRAWMODE = "DrawMode"; + + /// <summary> + /// Graphical mode for the drawing shape (see set_shape) + /// </summary> + public const string GC_SHAPE = "Shape"; + + /// <summary> + /// Graphical mode for the LUT (lookup table) (see set_lut) + /// </summary> + public const string GC_LUT = "Lut"; + + /// <summary> + /// Graphical mode for the painting (see set_paint) + /// </summary> + public const string GC_PAINT = "Paint"; + + /// <summary> + /// Graphical mode for the line style (see set_line_style) + /// </summary> + public const string GC_LINESTYLE = "LineStyle"; + + /// <summary> + /// Hashlist containing entries for graphical modes (defined by GC_*), + /// which is then linked to some HALCON object to describe its + /// graphical context. + /// </summary> + private Hashtable graphicalSettings; + + /// <summary> + /// Backup of the last graphical context applied to the window. + /// </summary> + public Hashtable stateOfSettings; + + private IEnumerator iterator; + + /// <summary> + /// Option to delegate messages from the graphical context + /// to some observer class + /// </summary> + public GCDelegate gcNotification; + + + /// <summary> + /// Creates a graphical context with no initial + /// graphical modes + /// </summary> + public GraphicsContext() + { + graphicalSettings = new Hashtable(10, 0.2f); + gcNotification = new GCDelegate(dummy); + stateOfSettings = new Hashtable(10, 0.2f); + } + + + /// <summary> + /// Creates an instance of the graphical context with + /// the modes defined in the hashtable 'settings' + /// </summary> + /// <param name="settings"> + /// List of modes, which describes the graphical context + /// </param> + public GraphicsContext(Hashtable settings) + { + graphicalSettings = settings; + gcNotification = new GCDelegate(dummy); + stateOfSettings = new Hashtable(10, 0.2f); + } + + /// <summary>Applies graphical context to the HALCON window</summary> + /// <param name="window">Active HALCON window</param> + /// <param name="cContext"> + /// List that contains graphical modes for window + /// </param> + public void applyContext(HWindow window, Hashtable cContext) + { + string key = ""; + string valS = ""; + int valI = -1; + HTuple valH = null; + + iterator = cContext.Keys.GetEnumerator(); + + try + { + while (iterator.MoveNext()) + { + + key = (string)iterator.Current; + + if (stateOfSettings.Contains(key) && + stateOfSettings[key] == cContext[key]) + continue; + + switch (key) + { + case GC_COLOR: + valS = (string)cContext[key]; + window.SetColor(valS); + if (stateOfSettings.Contains(GC_COLORED)) + stateOfSettings.Remove(GC_COLORED); + + break; + case GC_COLORED: + valI = (int)cContext[key]; + window.SetColored(valI); + + if (stateOfSettings.Contains(GC_COLOR)) + stateOfSettings.Remove(GC_COLOR); + + break; + case GC_DRAWMODE: + valS = (string)cContext[key]; + window.SetDraw(valS); + break; + case GC_LINEWIDTH: + valI = (int)cContext[key]; + window.SetLineWidth(valI); + break; + case GC_LUT: + valS = (string)cContext[key]; + window.SetLut(valS); + break; + case GC_PAINT: + valS = (string)cContext[key]; + window.SetPaint(valS); + break; + case GC_SHAPE: + valS = (string)cContext[key]; + window.SetShape(valS); + break; + case GC_LINESTYLE: + valH = (HTuple)cContext[key]; + window.SetLineStyle(valH); + break; + default: + break; + } + + + if (valI != -1) + { + if (stateOfSettings.Contains(key)) + stateOfSettings[key] = valI; + else + stateOfSettings.Add(key, valI); + + valI = -1; + } + else if (valS != "") + { + if (stateOfSettings.Contains(key)) + stateOfSettings[key] = valI; + else + stateOfSettings.Add(key, valI); + + valS = ""; + } + else if (valH != null) + { + if (stateOfSettings.Contains(key)) + stateOfSettings[key] = valI; + else + stateOfSettings.Add(key, valI); + + valH = null; + } + }//while + } + catch (HOperatorException e) + { + gcNotification(e.Message); + return; + } + } + + + /// <summary>Sets a value for the graphical mode GC_COLOR</summary> + /// <param name="val"> + /// A single color, e.g. "blue", "green" ...etc. + /// </param> + public void setColorAttribute(string val) + { + if (graphicalSettings.ContainsKey(GC_COLORED)) + graphicalSettings.Remove(GC_COLORED); + + addValue(GC_COLOR, val); + } + + /// <summary>Sets a value for the graphical mode GC_COLORED</summary> + /// <param name="val"> + /// The colored mode, which can be either "colored3" or "colored6" + /// or "colored12" + /// </param> + public void setColoredAttribute(int val) + { + if (graphicalSettings.ContainsKey(GC_COLOR)) + graphicalSettings.Remove(GC_COLOR); + + addValue(GC_COLORED, val); + } + + /// <summary>Sets a value for the graphical mode GC_DRAWMODE</summary> + /// <param name="val"> + /// One of the possible draw modes: "margin" or "fill" + /// </param> + public void setDrawModeAttribute(string val) + { + addValue(GC_DRAWMODE, val); + } + + /// <summary>Sets a value for the graphical mode GC_LINEWIDTH</summary> + /// <param name="val"> + /// The line width, which can range from 1 to 50 + /// </param> + public void setLineWidthAttribute(int val) + { + addValue(GC_LINEWIDTH, val); + } + + /// <summary>Sets a value for the graphical mode GC_LUT</summary> + /// <param name="val"> + /// One of the possible modes of look up tables. For + /// further information on particular setups, please refer to the + /// Reference Manual entry of the operator set_lut. + /// </param> + public void setLutAttribute(string val) + { + addValue(GC_LUT, val); + } + + + /// <summary>Sets a value for the graphical mode GC_PAINT</summary> + /// <param name="val"> + /// One of the possible paint modes. For further + /// information on particular setups, please refer refer to the + /// Reference Manual entry of the operator set_paint. + /// </param> + public void setPaintAttribute(string val) + { + addValue(GC_PAINT, val); + } + + + /// <summary>Sets a value for the graphical mode GC_SHAPE</summary> + /// <param name="val"> + /// One of the possible shape modes. For further + /// information on particular setups, please refer refer to the + /// Reference Manual entry of the operator set_shape. + /// </param> + public void setShapeAttribute(string val) + { + addValue(GC_SHAPE, val); + } + + /// <summary>Sets a value for the graphical mode GC_LINESTYLE</summary> + /// <param name="val"> + /// A line style mode, which works + /// identical to the input for the HDevelop operator + /// 'set_line_style'. For particular information on this + /// topic, please refer to the Reference Manual entry of the operator + /// set_line_style. + /// </param> + public void setLineStyleAttribute(HTuple val) + { + addValue(GC_LINESTYLE, val); + } + + /// <summary> + /// Adds a value to the hashlist 'graphicalSettings' for the + /// graphical mode described by the parameter 'key' + /// </summary> + /// <param name="key"> + /// A graphical mode defined by the constant GC_* + /// </param> + /// <param name="val"> + /// Defines the value as an int for this graphical + /// mode 'key' + /// </param> + private void addValue(string key, int val) + { + if (graphicalSettings.ContainsKey(key)) + graphicalSettings[key] = val; + else + graphicalSettings.Add(key, val); + } + + /// <summary> + /// Adds a value to the hashlist 'graphicalSettings' for the + /// graphical mode, described by the parameter 'key' + /// </summary> + /// <param name="key"> + /// A graphical mode defined by the constant GC_* + /// </param> + /// <param name="val"> + /// Defines the value as a string for this + /// graphical mode 'key' + /// </param> + private void addValue(string key, string val) + { + if (graphicalSettings.ContainsKey(key)) + graphicalSettings[key] = val; + else + graphicalSettings.Add(key, val); + } + + + /// <summary> + /// Adds a value to the hashlist 'graphicalSettings' for the + /// graphical mode, described by the parameter 'key' + /// </summary> + /// <param name="key"> + /// A graphical mode defined by the constant GC_* + /// </param> + /// <param name="val"> + /// Defines the value as a HTuple for this + /// graphical mode 'key' + /// </param> + private void addValue(string key, HTuple val) + { + if (graphicalSettings.ContainsKey(key)) + graphicalSettings[key] = val; + else + graphicalSettings.Add(key, val); + } + + /// <summary> + /// Clears the list of graphical settings. + /// There will be no graphical changes made prior + /// before drawing objects, since there are no + /// graphical entries to be applied to the window. + /// </summary> + public void clear() + { + graphicalSettings.Clear(); + } + + + /// <summary> + /// Returns an exact clone of this graphicsContext instance + /// </summary> + public GraphicsContext copy() + { + return new GraphicsContext((Hashtable)this.graphicalSettings.Clone()); + } + + + /// <summary> + /// If the hashtable contains the key, the corresponding + /// hashtable value is returned + /// </summary> + /// <param name="key"> + /// One of the graphical keys starting with GC_* + /// </param> + public object getGraphicsAttribute(string key) + { + if (graphicalSettings.ContainsKey(key)) + return graphicalSettings[key]; + + return null; + } + + /// <summary> + /// Returns a copy of the hashtable that carries the + /// entries for the current graphical context + /// </summary> + /// <returns> current graphical context </returns> + public Hashtable copyContextList() + { + return (Hashtable)graphicalSettings.Clone(); + } + + + /********************************************************************/ + public void dummy(string val) { } + + }//end of class +}//end of namespace diff --git a/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/HObjectEntry.cs b/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/HObjectEntry.cs new file mode 100644 index 0000000..374ee94 --- /dev/null +++ b/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/HObjectEntry.cs @@ -0,0 +1,53 @@ +using System; +using HalconDotNet; +using System.Collections; + + + +namespace PointGreyAndHalcon +{ + + /// <summary> + /// This class is an auxiliary class, which is used to + /// link a graphical context to an HALCON object. The graphical + /// context is described by a hashtable, which contains a list of + /// graphical modes (e.g GC_COLOR, GC_LINEWIDTH and GC_PAINT) + /// and their corresponding values (e.g "blue", "4", "3D-plot"). These + /// graphical states are applied to the window before displaying the + /// object. + /// </summary> + public class HObjectEntry + { + /// <summary>Hashlist defining the graphical context for HObj</summary> + public Hashtable gContext; + + /// <summary>HALCON object</summary> + public HObject HObj; + + + + /// <summary>Constructor</summary> + /// <param name="obj"> + /// HALCON object that is linked to the graphical context gc. + /// </param> + /// <param name="gc"> + /// Hashlist of graphical states that are applied before the object + /// is displayed. + /// </param> + public HObjectEntry(HObject obj, Hashtable gc) + { + gContext = gc; + HObj = obj; + } + + /// <summary> + /// Clears the entries of the class members Hobj and gContext + /// </summary> + public void clear() + { + gContext.Clear(); + HObj.Dispose(); + } + + }//end of class +}//end of namespace diff --git a/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/HWndCtrl.cs b/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/HWndCtrl.cs new file mode 100644 index 0000000..d09c1b3 --- /dev/null +++ b/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/HWndCtrl.cs @@ -0,0 +1,868 @@ +using System; +using System.Collections; +using HalconDotNet; + + + +namespace PointGreyAndHalcon +{ + public delegate void IconicDelegate(int val); + public delegate void FuncDelegate(); + + /// <summary> + /// This class works as a wrapper class for the HALCON window + /// HWindow. HWndCtrl is in charge of the visualization. + /// You can move and zoom the visible image part by using GUI component + /// inputs or with the mouse. The class HWndCtrl uses a graphics stack + /// to manage the iconic objects for the display. Each object is linked + /// to a graphical context, which determines how the object is to be drawn. + /// The context can be changed by calling changeGraphicSettings(). + /// The graphical "modes" are defined by the class GraphicsContext and + /// map most of the dev_set_* operators provided in HDevelop. + /// </summary> + public class HWndCtrl + { + /// <summary>No action is performed on mouse events</summary> + public const int MODE_VIEW_NONE = 10; + + /// <summary>Zoom is performed on mouse events</summary> + public const int MODE_VIEW_ZOOM = 11; + + /// <summary>Move is performed on mouse events</summary> + public const int MODE_VIEW_MOVE = 12; + + /// <summary>Magnification is performed on mouse events</summary> + public const int MODE_VIEW_ZOOMWINDOW = 13; + + + public const int MODE_INCLUDE_ROI = 1; + + public const int MODE_EXCLUDE_ROI = 2; + + + /// <summary> + /// Constant describes delegate message to signal new image + /// </summary> + public const int EVENT_UPDATE_IMAGE = 31; + /// <summary> + /// Constant describes delegate message to signal error + /// when reading an image from file + /// </summary> + public const int ERR_READING_IMG = 32; + /// <summary> + /// Constant describes delegate message to signal error + /// when defining a graphical context + /// </summary> + public const int ERR_DEFINING_GC = 33; + + /// <summary> + /// Maximum number of HALCON objects that can be put on the graphics + /// stack without loss. For each additional object, the first entry + /// is removed from the stack again. + /// </summary> + private const int MAXNUMOBJLIST = 50; + + + private int stateView; + private bool mousePressed = false; + private double startX,startY; + + /// <summary>HALCON window</summary> + private HWindowControl viewPort; + + /// <summary> + /// Instance of ROIController, which manages ROI interaction + /// </summary> + private ROIController roiManager; + + /* dispROI is a flag to know when to add the ROI models to the + paint routine and whether or not to respond to mouse events for + ROI objects */ + private int dispROI; + + + /* Basic parameters, like dimension of window and displayed image part */ + private int windowWidth; + private int windowHeight; + private int imageWidth; + private int imageHeight; + + private int[] CompRangeX; + private int[] CompRangeY; + + + private int prevCompX, prevCompY; + private double stepSizeX, stepSizeY; + + + /* Image coordinates, which describe the image part that is displayed + in the HALCON window */ + private double ImgRow1, ImgCol1, ImgRow2, ImgCol2; + + /// <summary>Error message when an exception is thrown</summary> + public string exceptionText = ""; + + + /* Delegates to send notification messages to other classes */ + /// <summary> + /// Delegate to add information to the HALCON window after + /// the paint routine has finished + /// </summary> + public FuncDelegate addInfoDelegate; + + /// <summary> + /// Delegate to notify about failed tasks of the HWndCtrl instance + /// </summary> + public IconicDelegate NotifyIconObserver; + + + private HWindow ZoomWindow; + private double zoomWndFactor; + private double zoomAddOn; + private int zoomWndSize; + + + /// <summary> + /// List of HALCON objects to be drawn into the HALCON window. + /// The list shouldn't contain more than MAXNUMOBJLIST objects, + /// otherwise the first entry is removed from the list. + /// </summary> + private ArrayList HObjList; + + /// <summary> + /// Instance that describes the graphical context for the + /// HALCON window. According on the graphical settings + /// attached to each HALCON object, this graphical context list + /// is updated constantly. + /// </summary> + private GraphicsContext mGC; + + + /// <summary> + /// Initializes the image dimension, mouse delegation, and the + /// graphical context setup of the instance. + /// </summary> + /// <param name="view"> HALCON window </param> + public HWndCtrl(HWindowControl view) + { + viewPort = view; + stateView = MODE_VIEW_NONE; + windowWidth = viewPort.Size.Width; + windowHeight = viewPort.Size.Height; + + zoomWndFactor = (double)imageWidth / viewPort.Width; + zoomAddOn = Math.Pow(0.9, 5); + zoomWndSize = 150; + + /*default*/ + CompRangeX = new int[] { 0, 100 }; + CompRangeY = new int[] { 0, 100 }; + + prevCompX = prevCompY = 0; + + dispROI = MODE_INCLUDE_ROI;//1; + + viewPort.HMouseUp += new HalconDotNet.HMouseEventHandler(this.mouseUp); + viewPort.HMouseDown += new HalconDotNet.HMouseEventHandler(this.mouseDown); + viewPort.HMouseMove += new HalconDotNet.HMouseEventHandler(this.mouseMoved); + + addInfoDelegate = new FuncDelegate(dummyV); + NotifyIconObserver = new IconicDelegate(dummy); + + // graphical stack + HObjList = new ArrayList(20); + mGC = new GraphicsContext(); + mGC.gcNotification = new GCDelegate(exceptionGC); + } + + + /// <summary> + /// Registers an instance of an ROIController with this window + /// controller (and vice versa). + /// </summary> + /// <param name="rC"> + /// Controller that manages interactive ROIs for the HALCON window + /// </param> + public void useROIController(ROIController rC) + { + roiManager = rC; + rC.setViewController(this); + } + + + /// <summary> + /// Read dimensions of the image to adjust own window settings + /// </summary> + /// <param name="image">HALCON image</param> + private void setImagePart(HImage image) + { + string s; + int w,h; + + image.GetImagePointer1(out s, out w, out h); + setImagePart(0, 0, h, w); + } + + + /// <summary> + /// Adjust window settings by the values supplied for the left + /// upper corner and the right lower corner + /// </summary> + /// <param name="r1">y coordinate of left upper corner</param> + /// <param name="c1">x coordinate of left upper corner</param> + /// <param name="r2">y coordinate of right lower corner</param> + /// <param name="c2">x coordinate of right lower corner</param> + private void setImagePart(int r1, int c1, int r2, int c2) + { + ImgRow1 = r1; + ImgCol1 = c1; + ImgRow2 = imageHeight = r2; + ImgCol2 = imageWidth = c2; + + System.Drawing.Rectangle rect = viewPort.ImagePart; + rect.X = (int)ImgCol1; + rect.Y = (int)ImgRow1; + rect.Height = (int)imageHeight; + rect.Width = (int)imageWidth; + viewPort.ImagePart = rect; + } + + + /// <summary> + /// Sets the view mode for mouse events in the HALCON window + /// (zoom, move, magnify or none). + /// </summary> + /// <param name="mode">One of the MODE_VIEW_* constants</param> + public void setViewState(int mode) + { + stateView = mode; + + if (roiManager != null) + roiManager.resetROI(); + } + + /********************************************************************/ + private void dummy(int val) + { + } + + private void dummyV() + { + } + + /*******************************************************************/ + private void exceptionGC(string message) + { + exceptionText = message; + NotifyIconObserver(ERR_DEFINING_GC); + } + + /// <summary> + /// Paint or don't paint the ROIs into the HALCON window by + /// defining the parameter to be equal to 1 or not equal to 1. + /// </summary> + public void setDispLevel(int mode) + { + dispROI = mode; + } + + /****************************************************************************/ + /* graphical element */ + /****************************************************************************/ + private void zoomImage(double x, double y, double scale) + { + double lengthC, lengthR; + double percentC, percentR; + int lenC, lenR; + + percentC = (x - ImgCol1) / (ImgCol2 - ImgCol1); + percentR = (y - ImgRow1) / (ImgRow2 - ImgRow1); + + lengthC = (ImgCol2 - ImgCol1) * scale; + lengthR = (ImgRow2 - ImgRow1) * scale; + + ImgCol1 = x - lengthC * percentC; + ImgCol2 = x + lengthC * (1 - percentC); + + ImgRow1 = y - lengthR * percentR; + ImgRow2 = y + lengthR * (1 - percentR); + + lenC = (int)Math.Round(lengthC); + lenR = (int)Math.Round(lengthR); + + System.Drawing.Rectangle rect = viewPort.ImagePart; + rect.X = (int)Math.Round(ImgCol1); + rect.Y = (int)Math.Round(ImgRow1); + rect.Width = (lenC > 0) ? lenC : 1; + rect.Height = (lenR > 0) ? lenR : 1; + viewPort.ImagePart = rect; + + zoomWndFactor *= scale; + repaint(); + } + + /// <summary> + /// Scales the image in the HALCON window according to the + /// value scaleFactor + /// </summary> + public void zoomImage(double scaleFactor) + { + double midPointX, midPointY; + + if (((ImgRow2 - ImgRow1) == scaleFactor * imageHeight) && + ((ImgCol2 - ImgCol1) == scaleFactor * imageWidth)) + { + repaint(); + return; + } + + ImgRow2 = ImgRow1 + imageHeight; + ImgCol2 = ImgCol1 + imageWidth; + + midPointX = ImgCol1; + midPointY = ImgRow1; + + zoomWndFactor = (double)imageWidth / viewPort.Width; + zoomImage(midPointX, midPointY, scaleFactor); + } + + + /// <summary> + /// Scales the HALCON window according to the value scale + /// </summary> + public void scaleWindow(double scale) + { + ImgRow1 = 0; + ImgCol1 = 0; + + ImgRow2 = imageHeight; + ImgCol2 = imageWidth; + + viewPort.Width = (int)(ImgCol2 * scale); + viewPort.Height = (int)(ImgRow2 * scale); + + zoomWndFactor = ((double)imageWidth / viewPort.Width); + } + + /// <summary> + /// Recalculates the image-window-factor, which needs to be added to + /// the scale factor for zooming an image. This way the zoom gets + /// adjusted to the window-image relation, expressed by the equation + /// imageWidth/viewPort.Width. + /// </summary> + public void setZoomWndFactor() + { + zoomWndFactor = ((double)imageWidth / viewPort.Width); + } + + /// <summary> + /// Sets the image-window-factor to the value zoomF + /// </summary> + public void setZoomWndFactor(double zoomF) + { + zoomWndFactor = zoomF; + } + + /*******************************************************************/ + private void moveImage(double motionX, double motionY) + { + ImgRow1 += -motionY; + ImgRow2 += -motionY; + + ImgCol1 += -motionX; + ImgCol2 += -motionX; + + System.Drawing.Rectangle rect = viewPort.ImagePart; + rect.X = (int)Math.Round(ImgCol1); + rect.Y = (int)Math.Round(ImgRow1); + viewPort.ImagePart = rect; + + repaint(); + } + + + /// <summary> + /// Resets all parameters that concern the HALCON window display + /// setup to their initial values and clears the ROI list. + /// </summary> + public void resetAll() + { + ImgRow1 = 0; + ImgCol1 = 0; + ImgRow2 = imageHeight; + ImgCol2 = imageWidth; + + zoomWndFactor = (double)imageWidth / viewPort.Width; + + System.Drawing.Rectangle rect = viewPort.ImagePart; + rect.X = (int)ImgCol1; + rect.Y = (int)ImgRow1; + rect.Width = (int)imageWidth; + rect.Height = (int)imageHeight; + viewPort.ImagePart = rect; + + + if (roiManager != null) + roiManager.reset(); + } + + public void resetWindow() + { + ImgRow1 = 0; + ImgCol1 = 0; + ImgRow2 = imageHeight; + ImgCol2 = imageWidth; + + zoomWndFactor = (double)imageWidth / viewPort.Width; + + System.Drawing.Rectangle rect = viewPort.ImagePart; + rect.X = (int)ImgCol1; + rect.Y = (int)ImgRow1; + rect.Width = (int)imageWidth; + rect.Height = (int)imageHeight; + viewPort.ImagePart = rect; + } + + + /*************************************************************************/ + /* Event handling for mouse */ + /*************************************************************************/ + private void mouseDown(object sender, HalconDotNet.HMouseEventArgs e) + { + mousePressed = true; + int activeROIidx = -1; + double scale; + + if (roiManager != null && (dispROI == MODE_INCLUDE_ROI)) + { + activeROIidx = roiManager.mouseDownAction(e.X, e.Y); + } + + if (activeROIidx == -1) + { + switch (stateView) + { + case MODE_VIEW_MOVE: + startX = e.X; + startY = e.Y; + break; + case MODE_VIEW_ZOOM: + if (e.Button == System.Windows.Forms.MouseButtons.Left) + scale = 0.9; + else + scale = 1 / 0.9; + zoomImage(e.X, e.Y, scale); + break; + case MODE_VIEW_NONE: + break; + case MODE_VIEW_ZOOMWINDOW: + activateZoomWindow((int)e.X, (int)e.Y); + break; + default: + break; + } + } + //end of if + } + + /*******************************************************************/ + private void activateZoomWindow(int X, int Y) + { + double posX, posY; + int zoomZone; + + if (ZoomWindow != null) + ZoomWindow.Dispose(); + + HOperatorSet.SetSystem("border_width", 10); + ZoomWindow = new HWindow(); + + posX = ((X - ImgCol1) / (ImgCol2 - ImgCol1)) * viewPort.Width; + posY = ((Y - ImgRow1) / (ImgRow2 - ImgRow1)) * viewPort.Height; + + zoomZone = (int)((zoomWndSize / 2) * zoomWndFactor * zoomAddOn); + ZoomWindow.OpenWindow((int)posY - (zoomWndSize / 2), (int)posX - (zoomWndSize / 2), + zoomWndSize, zoomWndSize, + viewPort.HalconID, "visible", ""); + ZoomWindow.SetPart(Y - zoomZone, X - zoomZone, Y + zoomZone, X + zoomZone); + repaint(ZoomWindow); + ZoomWindow.SetColor("black"); + } + + /*******************************************************************/ + private void mouseUp(object sender, HalconDotNet.HMouseEventArgs e) + { + mousePressed = false; + + if (roiManager != null + && (roiManager.activeROIidx != -1) + && (dispROI == MODE_INCLUDE_ROI)) + { + roiManager.NotifyRCObserver(ROIController.EVENT_UPDATE_ROI); + } + else if (stateView == MODE_VIEW_ZOOMWINDOW) + { + ZoomWindow.Dispose(); + } + } + + /*******************************************************************/ + private void mouseMoved(object sender, HalconDotNet.HMouseEventArgs e) + { + double motionX, motionY; + double posX, posY; + double zoomZone; + + + if (!mousePressed) + return; + + if (roiManager != null && (roiManager.activeROIidx != -1) && (dispROI == MODE_INCLUDE_ROI)) + { + roiManager.mouseMoveAction(e.X, e.Y); + } + else if (stateView == MODE_VIEW_MOVE) + { + motionX = ((e.X - startX)); + motionY = ((e.Y - startY)); + + if (((int)motionX != 0) || ((int)motionY != 0)) + { + moveImage(motionX, motionY); + startX = e.X - motionX; + startY = e.Y - motionY; + } + } + else if (stateView == MODE_VIEW_ZOOMWINDOW) + { + HSystem.SetSystem("flush_graphic", "false"); + ZoomWindow.ClearWindow(); + + + posX = ((e.X - ImgCol1) / (ImgCol2 - ImgCol1)) * viewPort.Width; + posY = ((e.Y - ImgRow1) / (ImgRow2 - ImgRow1)) * viewPort.Height; + zoomZone = (zoomWndSize / 2) * zoomWndFactor * zoomAddOn; + + ZoomWindow.SetWindowExtents((int)posY - (zoomWndSize / 2), + (int)posX - (zoomWndSize / 2), + zoomWndSize, zoomWndSize); + ZoomWindow.SetPart((int)(e.Y - zoomZone), (int)(e.X - zoomZone), + (int)(e.Y + zoomZone), (int)(e.X + zoomZone)); + repaint(ZoomWindow); + + HSystem.SetSystem("flush_graphic", "true"); + ZoomWindow.DispLine(-100.0, -100.0, -100.0, -100.0); + } + } + + /// <summary> + /// To initialize the move function using a GUI component, the HWndCtrl + /// first needs to know the range supplied by the GUI component. + /// For the x direction it is specified by xRange, which is + /// calculated as follows: GuiComponentX.Max()-GuiComponentX.Min(). + /// The starting value of the GUI component has to be supplied + /// by the parameter Init + /// </summary> + public void setGUICompRangeX(int[] xRange, int Init) + { + int cRangeX; + + CompRangeX = xRange; + cRangeX = xRange[1] - xRange[0]; + prevCompX = Init; + stepSizeX = ((double)imageWidth / cRangeX) * (imageWidth / windowWidth); + + } + + /// <summary> + /// To initialize the move function using a GUI component, the HWndCtrl + /// first needs to know the range supplied by the GUI component. + /// For the y direction it is specified by yRange, which is + /// calculated as follows: GuiComponentY.Max()-GuiComponentY.Min(). + /// The starting value of the GUI component has to be supplied + /// by the parameter Init + /// </summary> + public void setGUICompRangeY(int[] yRange, int Init) + { + int cRangeY; + + CompRangeY = yRange; + cRangeY = yRange[1] - yRange[0]; + prevCompY = Init; + stepSizeY = ((double)imageHeight / cRangeY) * (imageHeight / windowHeight); + } + + + /// <summary> + /// Resets to the starting value of the GUI component. + /// </summary> + public void resetGUIInitValues(int xVal, int yVal) + { + prevCompX = xVal; + prevCompY = yVal; + } + + /// <summary> + /// Moves the image by the value valX supplied by the GUI component + /// </summary> + public void moveXByGUIHandle(int valX) + { + double motionX; + + motionX = (valX - prevCompX) * stepSizeX; + + if (motionX == 0) + return; + + moveImage(motionX, 0.0); + prevCompX = valX; + } + + + /// <summary> + /// Moves the image by the value valY supplied by the GUI component + /// </summary> + public void moveYByGUIHandle(int valY) + { + double motionY; + + motionY = (valY - prevCompY) * stepSizeY; + + if (motionY == 0) + return; + + moveImage(0.0, motionY); + prevCompY = valY; + } + + /// <summary> + /// Zooms the image by the value valF supplied by the GUI component + /// </summary> + public void zoomByGUIHandle(double valF) + { + double x, y, scale; + double prevScaleC; + + + + x = (ImgCol1 + (ImgCol2 - ImgCol1) / 2); + y = (ImgRow1 + (ImgRow2 - ImgRow1) / 2); + + prevScaleC = (double)((ImgCol2 - ImgCol1) / imageWidth); + scale = ((double)1.0 / prevScaleC * (100.0 / valF)); + + zoomImage(x, y, scale); + } + + /// <summary> + /// Triggers a repaint of the HALCON window + /// </summary> + public void repaint() + { + repaint(viewPort.HalconWindow); + } + + /// <summary> + /// Repaints the HALCON window 'window' + /// </summary> + public void repaint(HalconDotNet.HWindow window) + { + int count = HObjList.Count; + HObjectEntry entry; + + HSystem.SetSystem("flush_graphic", "false"); + window.ClearWindow(); + mGC.stateOfSettings.Clear(); + + for (int i=0; i < count; i++) + { + entry = ((HObjectEntry)HObjList[i]); + mGC.applyContext(window, entry.gContext); + window.DispObj(entry.HObj); + } + + addInfoDelegate(); + + if (roiManager != null && (dispROI == MODE_INCLUDE_ROI)) + roiManager.paintData(window); + + HSystem.SetSystem("flush_graphic", "true"); + + window.SetColor("black"); + window.DispLine(-100.0, -100.0, -101.0, -101.0); + } + + + + /********************************************************************/ + /* GRAPHICSSTACK */ + /********************************************************************/ + + /// <summary> + /// Adds an iconic object to the graphics stack similar to the way + /// it is defined for the HDevelop graphics stack. + /// </summary> + /// <param name="obj">Iconic object</param> + public void addIconicVar(HObject obj) + { + HObjectEntry entry; + + if (obj == null) + return; + + if (obj is HImage) + { + double r, c; + int h, w, area; + string s; + + area = ((HImage)obj).GetDomain().AreaCenter(out r, out c); + ((HImage)obj).GetImagePointer1(out s, out w, out h); + + if (area == (w * h)) + { + clearList(); + + if ((h != imageHeight) || (w != imageWidth)) + { + imageHeight = h; + imageWidth = w; + zoomWndFactor = (double)imageWidth / viewPort.Width; + setImagePart(0, 0, h, w); + } + }//if + }//if + + entry = new HObjectEntry(obj, mGC.copyContextList()); + + HObjList.Add(entry); + + if (HObjList.Count > MAXNUMOBJLIST) + HObjList.RemoveAt(1); + } + + + /// <summary> + /// Clears all entries from the graphics stack + /// </summary> + public void clearList() + { + HObjList.Clear(); + } + + /// <summary> + /// Returns the number of items on the graphics stack + /// </summary> + public int getListCount() + { + return HObjList.Count; + } + + /// <summary> + /// Changes the current graphical context by setting the specified mode + /// (constant starting by GC_*) to the specified value. + /// </summary> + /// <param name="mode"> + /// Constant that is provided by the class GraphicsContext + /// and describes the mode that has to be changed, + /// e.g., GraphicsContext.GC_COLOR + /// </param> + /// <param name="val"> + /// Value, provided as a string, + /// the mode is to be changed to, e.g., "blue" + /// </param> + public void changeGraphicSettings(string mode, string val) + { + switch (mode) + { + case GraphicsContext.GC_COLOR: + mGC.setColorAttribute(val); + break; + case GraphicsContext.GC_DRAWMODE: + mGC.setDrawModeAttribute(val); + break; + case GraphicsContext.GC_LUT: + mGC.setLutAttribute(val); + break; + case GraphicsContext.GC_PAINT: + mGC.setPaintAttribute(val); + break; + case GraphicsContext.GC_SHAPE: + mGC.setShapeAttribute(val); + break; + default: + break; + } + } + + /// <summary> + /// Changes the current graphical context by setting the specified mode + /// (constant starting by GC_*) to the specified value. + /// </summary> + /// <param name="mode"> + /// Constant that is provided by the class GraphicsContext + /// and describes the mode that has to be changed, + /// e.g., GraphicsContext.GC_LINEWIDTH + /// </param> + /// <param name="val"> + /// Value, provided as an integer, the mode is to be changed to, + /// e.g., 5 + /// </param> + public void changeGraphicSettings(string mode, int val) + { + switch (mode) + { + case GraphicsContext.GC_COLORED: + mGC.setColoredAttribute(val); + break; + case GraphicsContext.GC_LINEWIDTH: + mGC.setLineWidthAttribute(val); + break; + default: + break; + } + } + + /// <summary> + /// Changes the current graphical context by setting the specified mode + /// (constant starting by GC_*) to the specified value. + /// </summary> + /// <param name="mode"> + /// Constant that is provided by the class GraphicsContext + /// and describes the mode that has to be changed, + /// e.g., GraphicsContext.GC_LINESTYLE + /// </param> + /// <param name="val"> + /// Value, provided as an HTuple instance, the mode is + /// to be changed to, e.g., new HTuple(new int[]{2,2}) + /// </param> + public void changeGraphicSettings(string mode, HTuple val) + { + switch (mode) + { + case GraphicsContext.GC_LINESTYLE: + mGC.setLineStyleAttribute(val); + break; + default: + break; + } + } + + /// <summary> + /// Clears all entries from the graphical context list + /// </summary> + public void clearGraphicContext() + { + mGC.clear(); + } + + /// <summary> + /// Returns a clone of the graphical context list (hashtable) + /// </summary> + public Hashtable getGraphicContext() + { + return mGC.copyContextList(); + } + + }//end of class +}//end of namespace diff --git a/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROI.cs b/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROI.cs new file mode 100644 index 0000000..8d88cf6 --- /dev/null +++ b/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROI.cs @@ -0,0 +1,161 @@ +using System; +using HalconDotNet; + + +namespace PointGreyAndHalcon +{ + + /// <summary> + /// This class is a base class containing virtual methods for handling + /// ROIs. Therefore, an inheriting class needs to define/override these + /// methods to provide the ROIController with the necessary information on + /// its (= the ROIs) shape and position. The example project provides + /// derived ROI shapes for rectangles, lines, circles, and circular arcs. + /// To use other shapes you must derive a new class from the base class + /// ROI and implement its methods. + /// </summary> + public class ROI + { + + // class members of inheriting ROI classes + protected int NumHandles; + protected int activeHandleIdx; + + /// <summary> + /// Flag to define the ROI to be 'positive' or 'negative'. + /// </summary> + protected int OperatorFlag; + + /// <summary>Parameter to define the line style of the ROI.</summary> + public HTuple flagLineStyle; + + /// <summary>Constant for a positive ROI flag.</summary> + public const int POSITIVE_FLAG = ROIController.MODE_ROI_POS; + + /// <summary>Constant for a negative ROI flag.</summary> + public const int NEGATIVE_FLAG = ROIController.MODE_ROI_NEG; + + public const int ROI_TYPE_LINE = 10; + public const int ROI_TYPE_CIRCLE = 11; + public const int ROI_TYPE_CIRCLEARC = 12; + public const int ROI_TYPE_RECTANCLE1 = 13; + public const int ROI_TYPE_RECTANGLE2 = 14; + + + protected HTuple posOperation = new HTuple(); + protected HTuple negOperation = new HTuple(new int[] { 2, 2 }); + + /// <summary>Constructor of abstract ROI class.</summary> + public ROI() { } + + /// <summary>Creates a new ROI instance at the mouse position.</summary> + /// <param name="midX"> + /// x (=column) coordinate for ROI + /// </param> + /// <param name="midY"> + /// y (=row) coordinate for ROI + /// </param> + public virtual void createROI(double midX, double midY) { } + + /// <summary>Paints the ROI into the supplied window.</summary> + /// <param name="window">HALCON window</param> + public virtual void draw(HalconDotNet.HWindow window) { } + + /// <summary> + /// Returns the distance of the ROI handle being + /// closest to the image point(x,y) + /// </summary> + /// <param name="x">x (=column) coordinate</param> + /// <param name="y">y (=row) coordinate</param> + /// <returns> + /// Distance of the closest ROI handle. + /// </returns> + public virtual double distToClosestHandle(double x, double y) + { + return 0.0; + } + + /// <summary> + /// Paints the active handle of the ROI object into the supplied window. + /// </summary> + /// <param name="window">HALCON window</param> + public virtual void displayActive(HalconDotNet.HWindow window) { } + + /// <summary> + /// Recalculates the shape of the ROI. Translation is + /// performed at the active handle of the ROI object + /// for the image coordinate (x,y). + /// </summary> + /// <param name="x">x (=column) coordinate</param> + /// <param name="y">y (=row) coordinate</param> + public virtual void moveByHandle(double x, double y) { } + + /// <summary>Gets the HALCON region described by the ROI.</summary> + public virtual HRegion getRegion() + { + return null; + } + + public virtual double getDistanceFromStartPoint(double row, double col) + { + return 0.0; + } + /// <summary> + /// Gets the model information described by + /// the ROI. + /// </summary> + public virtual HTuple getModelData() + { + return null; + } + + /// <summary>Number of handles defined for the ROI.</summary> + /// <returns>Number of handles</returns> + public int getNumHandles() + { + return NumHandles; + } + + /// <summary>Gets the active handle of the ROI.</summary> + /// <returns>Index of the active handle (from the handle list)</returns> + public int getActHandleIdx() + { + return activeHandleIdx; + } + + /// <summary> + /// Gets the sign of the ROI object, being either + /// 'positive' or 'negative'. This sign is used when creating a model + /// region for matching applications from a list of ROIs. + /// </summary> + public int getOperatorFlag() + { + return OperatorFlag; + } + + /// <summary> + /// Sets the sign of a ROI object to be positive or negative. + /// The sign is used when creating a model region for matching + /// applications by summing up all positive and negative ROI models + /// created so far. + /// </summary> + /// <param name="flag">Sign of ROI object</param> + public void setOperatorFlag(int flag) + { + OperatorFlag = flag; + + switch (OperatorFlag) + { + case ROI.POSITIVE_FLAG: + flagLineStyle = posOperation; + break; + case ROI.NEGATIVE_FLAG: + flagLineStyle = negOperation; + break; + default: + flagLineStyle = posOperation; + break; + } + } + }//end of class +}//end of namespace diff --git a/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROICircle.cs b/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROICircle.cs new file mode 100644 index 0000000..234aa61 --- /dev/null +++ b/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROICircle.cs @@ -0,0 +1,155 @@ +using System; +using HalconDotNet; + +namespace PointGreyAndHalcon +{ + /// <summary> + /// This class demonstrates one of the possible implementations for a + /// circular ROI. ROICircle inherits from the base class ROI and + /// implements (besides other auxiliary methods) all virtual methods + /// defined in ROI.cs. + /// </summary> + public class ROICircle : ROI + { + + private double radius; + private double row1, col1; // first handle + private double midR, midC; // second handle + + + public ROICircle() + { + NumHandles = 2; // one at corner of circle + midpoint + activeHandleIdx = 1; + } + + + + /// <summary>Creates a new ROI instance at the mouse position</summary> + public override void createROI(double midX, double midY) + { + midR = midY; + midC = midX; + + radius = 100; + + row1 = midR; + col1 = midC + radius; + } + + /// <summary>Paints the ROI into the supplied window</summary> + /// <param name="window">HALCON window</param> + public override void draw(HalconDotNet.HWindow window) + { + window.DispCircle(midR, midC, radius); + window.DispRectangle2(row1, col1, 0, 5, 5); + window.DispRectangle2(midR, midC, 0, 5, 5); + } + + /// <summary> + /// Returns the distance of the ROI handle being + /// closest to the image point(x,y) + /// </summary> + public override double distToClosestHandle(double x, double y) + { + double max = 10000; + double [] val = new double[NumHandles]; + + val[0] = HMisc.DistancePp(y, x, row1, col1); // border handle + val[1] = HMisc.DistancePp(y, x, midR, midC); // midpoint + + for (int i=0; i < NumHandles; i++) + { + if (val[i] < max) + { + max = val[i]; + activeHandleIdx = i; + } + }// end of for + return val[activeHandleIdx]; + } + + /// <summary> + /// Paints the active handle of the ROI object into the supplied window + /// </summary> + public override void displayActive(HalconDotNet.HWindow window) + { + + switch (activeHandleIdx) + { + case 0: + window.DispRectangle2(row1, col1, 0, 5, 5); + break; + case 1: + window.DispRectangle2(midR, midC, 0, 5, 5); + break; + } + } + + /// <summary>Gets the HALCON region described by the ROI</summary> + public override HRegion getRegion() + { + HRegion region = new HRegion(); + region.GenCircle(midR, midC, radius); + return region; + } + + public override double getDistanceFromStartPoint(double row, double col) + { + double sRow = midR; // assumption: we have an angle starting at 0.0 + double sCol = midC + 1 * radius; + + double angle = HMisc.AngleLl(midR, midC, sRow, sCol, midR, midC, row, col); + + if (angle < 0) + angle += 2 * Math.PI; + + return (radius * angle); + } + + /// <summary> + /// Gets the model information described by + /// the ROI + /// </summary> + public override HTuple getModelData() + { + return new HTuple(new double[] { midR, midC, radius }); + } + + /// <summary> + /// Recalculates the shape of the ROI. Translation is + /// performed at the active handle of the ROI object + /// for the image coordinate (x,y) + /// </summary> + public override void moveByHandle(double newX, double newY) + { + HTuple distance; + double shiftX,shiftY; + + switch (activeHandleIdx) + { + case 0: // handle at circle border + + row1 = newY; + col1 = newX; + HOperatorSet.DistancePp(new HTuple(row1), new HTuple(col1), + new HTuple(midR), new HTuple(midC), + out distance); + + radius = distance[0].D; + break; + case 1: // midpoint + + shiftY = midR - newY; + shiftX = midC - newX; + + midR = newY; + midC = newX; + + row1 -= shiftY; + col1 -= shiftX; + break; + } + } + }//end of class +}//end of namespace diff --git a/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROICircularArc.cs b/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROICircularArc.cs new file mode 100644 index 0000000..e81f2cc --- /dev/null +++ b/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROICircularArc.cs @@ -0,0 +1,305 @@ +using System; +using HalconDotNet; + +namespace PointGreyAndHalcon +{ + + /// <summary> + /// This class implements an ROI shaped as a circular + /// arc. ROICircularArc inherits from the base class ROI and + /// implements (besides other auxiliary methods) all virtual methods + /// defined in ROI.cs. + /// </summary> + public class ROICircularArc : ROI + { + //handles + private double midR, midC; // 0. handle: midpoint + private double sizeR, sizeC; // 1. handle + private double startR, startC; // 2. handle + private double extentR, extentC; // 3. handle + + //model data to specify the arc + private double radius; + private double startPhi, extentPhi; // -2*PI <= x <= 2*PI + + //display attributes + private HXLDCont contour; + private HXLDCont arrowHandleXLD; + private string circDir; + private double TwoPI; + private double PI; + + + public ROICircularArc() + { + NumHandles = 4; // midpoint handle + three handles on the arc + activeHandleIdx = 0; + contour = new HXLDCont(); + circDir = ""; + + TwoPI = 2 * Math.PI; + PI = Math.PI; + + arrowHandleXLD = new HXLDCont(); + arrowHandleXLD.GenEmptyObj(); + } + + /// <summary>Creates a new ROI instance at the mouse position</summary> + public override void createROI(double midX, double midY) + { + midR = midY; + midC = midX; + + radius = 100; + + sizeR = midR; + sizeC = midC - radius; + + startPhi = PI * 0.25; + extentPhi = PI * 1.5; + circDir = "positive"; + + determineArcHandles(); + updateArrowHandle(); + } + + /// <summary>Paints the ROI into the supplied window</summary> + /// <param name="window">HALCON window</param> + public override void draw(HalconDotNet.HWindow window) + { + contour.Dispose(); + contour.GenCircleContourXld(midR, midC, radius, startPhi, + (startPhi + extentPhi), circDir, 1.0); + window.DispObj(contour); + window.DispRectangle2(sizeR, sizeC, 0, 5, 5); + window.DispRectangle2(midR, midC, 0, 5, 5); + window.DispRectangle2(startR, startC, startPhi, 10, 2); + window.DispObj(arrowHandleXLD); + } + + /// <summary> + /// Returns the distance of the ROI handle being + /// closest to the image point(x,y) + /// </summary> + public override double distToClosestHandle(double x, double y) + { + double max = 10000; + double [] val = new double[NumHandles]; + + val[0] = HMisc.DistancePp(y, x, midR, midC); // midpoint + val[1] = HMisc.DistancePp(y, x, sizeR, sizeC); // border handle + val[2] = HMisc.DistancePp(y, x, startR, startC); // border handle + val[3] = HMisc.DistancePp(y, x, extentR, extentC); // border handle + + for (int i=0; i < NumHandles; i++) + { + if (val[i] < max) + { + max = val[i]; + activeHandleIdx = i; + } + }// end of for + return val[activeHandleIdx]; + } + + /// <summary> + /// Paints the active handle of the ROI object into the supplied window + /// </summary> + public override void displayActive(HalconDotNet.HWindow window) + { + switch (activeHandleIdx) + { + case 0: + window.DispRectangle2(midR, midC, 0, 5, 5); + break; + case 1: + window.DispRectangle2(sizeR, sizeC, 0, 5, 5); + break; + case 2: + window.DispRectangle2(startR, startC, startPhi, 10, 2); + break; + case 3: + window.DispObj(arrowHandleXLD); + break; + } + } + + /// <summary> + /// Recalculates the shape of the ROI. Translation is + /// performed at the active handle of the ROI object + /// for the image coordinate (x,y) + /// </summary> + public override void moveByHandle(double newX, double newY) + { + HTuple distance; + double dirX, dirY, prior, next, valMax, valMin; + + switch (activeHandleIdx) + { + case 0: // midpoint + dirY = midR - newY; + dirX = midC - newX; + + midR = newY; + midC = newX; + + sizeR -= dirY; + sizeC -= dirX; + + determineArcHandles(); + break; + + case 1: // handle at circle border + sizeR = newY; + sizeC = newX; + + HOperatorSet.DistancePp(new HTuple(sizeR), new HTuple(sizeC), + new HTuple(midR), new HTuple(midC), out distance); + radius = distance[0].D; + determineArcHandles(); + break; + + case 2: // start handle for arc + dirY = newY - midR; + dirX = newX - midC; + + startPhi = Math.Atan2(-dirY, dirX); + + if (startPhi < 0) + startPhi = PI + (startPhi + PI); + + setStartHandle(); + prior = extentPhi; + extentPhi = HMisc.AngleLl(midR, midC, startR, startC, midR, midC, extentR, extentC); + + if (extentPhi < 0 && prior > PI * 0.8) + extentPhi = (PI + extentPhi) + PI; + else if (extentPhi > 0 && prior < -PI * 0.7) + extentPhi = -PI - (PI - extentPhi); + + break; + + case 3: // end handle for arc + dirY = newY - midR; + dirX = newX - midC; + + prior = extentPhi; + next = Math.Atan2(-dirY, dirX); + + if (next < 0) + next = PI + (next + PI); + + if (circDir == "positive" && startPhi >= next) + extentPhi = (next + TwoPI) - startPhi; + else if (circDir == "positive" && next > startPhi) + extentPhi = next - startPhi; + else if (circDir == "negative" && startPhi >= next) + extentPhi = -1.0 * (startPhi - next); + else if (circDir == "negative" && next > startPhi) + extentPhi = -1.0 * (startPhi + TwoPI - next); + + valMax = Math.Max(Math.Abs(prior), Math.Abs(extentPhi)); + valMin = Math.Min(Math.Abs(prior), Math.Abs(extentPhi)); + + if ((valMax - valMin) >= PI) + extentPhi = (circDir == "positive") ? -1.0 * valMin : valMin; + + setExtentHandle(); + break; + } + + circDir = (extentPhi < 0) ? "negative" : "positive"; + updateArrowHandle(); + } + + /// <summary>Gets the HALCON region described by the ROI</summary> + public override HRegion getRegion() + { + HRegion region; + contour.Dispose(); + contour.GenCircleContourXld(midR, midC, radius, startPhi, (startPhi + extentPhi), circDir, 1.0); + region = new HRegion(contour); + return region; + } + + /// <summary> + /// Gets the model information described by the ROI + /// </summary> + public override HTuple getModelData() + { + return new HTuple(new double[] { midR, midC, radius, startPhi, extentPhi }); + } + + /// <summary> + /// Auxiliary method to determine the positions of the second and + /// third handle. + /// </summary> + private void determineArcHandles() + { + setStartHandle(); + setExtentHandle(); + } + + /// <summary> + /// Auxiliary method to recalculate the start handle for the arc + /// </summary> + private void setStartHandle() + { + startR = midR - radius * Math.Sin(startPhi); + startC = midC + radius * Math.Cos(startPhi); + } + + /// <summary> + /// Auxiliary method to recalculate the extent handle for the arc + /// </summary> + private void setExtentHandle() + { + extentR = midR - radius * Math.Sin(startPhi + extentPhi); + extentC = midC + radius * Math.Cos(startPhi + extentPhi); + } + + /// <summary> + /// Auxiliary method to display an arrow at the extent arc position + /// </summary> + private void updateArrowHandle() + { + double row1, col1, row2, col2; + double rowP1, colP1, rowP2, colP2; + double length,dr,dc, halfHW, sign, angleRad; + double headLength = 15; + double headWidth = 15; + + arrowHandleXLD.Dispose(); + arrowHandleXLD.GenEmptyObj(); + + row2 = extentR; + col2 = extentC; + angleRad = (startPhi + extentPhi) + Math.PI * 0.5; + + sign = (circDir == "negative") ? -1.0 : 1.0; + row1 = row2 + sign * Math.Sin(angleRad) * 20; + col1 = col2 - sign * Math.Cos(angleRad) * 20; + + length = HMisc.DistancePp(row1, col1, row2, col2); + if (length == 0) + length = -1; + + dr = (row2 - row1) / length; + dc = (col2 - col1) / length; + + halfHW = headWidth / 2.0; + rowP1 = row1 + (length - headLength) * dr + halfHW * dc; + rowP2 = row1 + (length - headLength) * dr - halfHW * dc; + colP1 = col1 + (length - headLength) * dc - halfHW * dr; + colP2 = col1 + (length - headLength) * dc + halfHW * dr; + + if (length == -1) + arrowHandleXLD.GenContourPolygonXld(row1, col1); + else + arrowHandleXLD.GenContourPolygonXld(new HTuple(new double[] { row1, row2, rowP1, row2, rowP2, row2 }), + new HTuple(new double[] { col1, col2, colP1, col2, colP2, col2 })); + } + + }//end of class +}//end of namespace + diff --git a/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROIController.cs b/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROIController.cs new file mode 100644 index 0000000..0589dda --- /dev/null +++ b/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROIController.cs @@ -0,0 +1,401 @@ +using System; +using HalconDotNet; +using System.Collections; + + + +namespace PointGreyAndHalcon +{ + + public delegate void FuncROIDelegate(); + + /// <summary> + /// This class creates and manages ROI objects. It responds + /// to mouse device inputs using the methods mouseDownAction and + /// mouseMoveAction. You don't have to know this class in detail when you + /// build your own C# project. But you must consider a few things if + /// you want to use interactive ROIs in your application: There is a + /// quite close connection between the ROIController and the HWndCtrl + /// class, which means that you must 'register' the ROIController + /// with the HWndCtrl, so the HWndCtrl knows it has to forward user input + /// (like mouse events) to the ROIController class. + /// The visualization and manipulation of the ROI objects is done + /// by the ROIController. + /// This class provides special support for the matching + /// applications by calculating a model region from the list of ROIs. For + /// this, ROIs are added and subtracted according to their sign. + /// </summary> + public class ROIController + { + + /// <summary> + /// Constant for setting the ROI mode: positive ROI sign. + /// </summary> + public const int MODE_ROI_POS = 21; + + /// <summary> + /// Constant for setting the ROI mode: negative ROI sign. + /// </summary> + public const int MODE_ROI_NEG = 22; + + /// <summary> + /// Constant for setting the ROI mode: no model region is computed as + /// the sum of all ROI objects. + /// </summary> + public const int MODE_ROI_NONE = 23; + + /// <summary>Constant describing an update of the model region</summary> + public const int EVENT_UPDATE_ROI = 50; + + public const int EVENT_CHANGED_ROI_SIGN = 51; + + /// <summary>Constant describing an update of the model region</summary> + public const int EVENT_MOVING_ROI = 52; + + public const int EVENT_DELETED_ACTROI = 53; + + public const int EVENT_DELETED_ALL_ROIS = 54; + + public const int EVENT_ACTIVATED_ROI = 55; + + public const int EVENT_CREATED_ROI = 56; + + + private ROI roiMode; + private int stateROI; + private double currX, currY; + + + /// <summary>Index of the active ROI object</summary> + public int activeROIidx; + public int deletedIdx; + + /// <summary>List containing all created ROI objects so far</summary> + public ArrayList ROIList; + + /// <summary> + /// Region obtained by summing up all negative + /// and positive ROI objects from the ROIList + /// </summary> + public HRegion ModelROI; + + private string activeCol = "green"; + private string activeHdlCol = "red"; + private string inactiveCol = "yellow"; + + /// <summary> + /// Reference to the HWndCtrl, the ROI Controller is registered to + /// </summary> + public HWndCtrl viewController; + + /// <summary> + /// Delegate that notifies about changes made in the model region + /// </summary> + public IconicDelegate NotifyRCObserver; + + /// <summary>Constructor</summary> + public ROIController() + { + stateROI = MODE_ROI_NONE; + ROIList = new ArrayList(); + activeROIidx = -1; + ModelROI = new HRegion(); + NotifyRCObserver = new IconicDelegate(dummyI); + deletedIdx = -1; + currX = currY = -1; + } + + /// <summary>Registers the HWndCtrl to this ROIController instance</summary> + public void setViewController(HWndCtrl view) + { + viewController = view; + } + + /// <summary>Gets the ModelROI object</summary> + public HRegion getModelRegion() + { + return ModelROI; + } + + /// <summary>Gets the List of ROIs created so far</summary> + public ArrayList getROIList() + { + return ROIList; + } + + /// <summary>Get the active ROI</summary> + public ROI getActiveROI() + { + if (activeROIidx != -1) + return ((ROI)ROIList[activeROIidx]); + + return null; + } + + public int getActiveROIIdx() + { + return activeROIidx; + } + + public void setActiveROIIdx(int active) + { + activeROIidx = active; + } + + public int getDelROIIdx() + { + return deletedIdx; + } + + /// <summary> + /// To create a new ROI object the application class initializes a + /// 'seed' ROI instance and passes it to the ROIController. + /// The ROIController now responds by manipulating this new ROI + /// instance. + /// </summary> + /// <param name="r"> + /// 'Seed' ROI object forwarded by the application forms class. + /// </param> + public void setROIShape(ROI r) + { + roiMode = r; + roiMode.setOperatorFlag(stateROI); + } + + + /// <summary> + /// Sets the sign of a ROI object to the value 'mode' (MODE_ROI_NONE, + /// MODE_ROI_POS,MODE_ROI_NEG) + /// </summary> + public void setROISign(int mode) + { + stateROI = mode; + + if (activeROIidx != -1) + { + ((ROI)ROIList[activeROIidx]).setOperatorFlag(stateROI); + viewController.repaint(); + NotifyRCObserver(ROIController.EVENT_CHANGED_ROI_SIGN); + } + } + + /// <summary> + /// Removes the ROI object that is marked as active. + /// If no ROI object is active, then nothing happens. + /// </summary> + public void removeActive() + { + if (activeROIidx != -1) + { + ROIList.RemoveAt(activeROIidx); + deletedIdx = activeROIidx; + activeROIidx = -1; + viewController.repaint(); + NotifyRCObserver(EVENT_DELETED_ACTROI); + } + } + + + /// <summary> + /// Calculates the ModelROI region for all objects contained + /// in ROIList, by adding and subtracting the positive and + /// negative ROI objects. + /// </summary> + public bool defineModelROI() + { + HRegion tmpAdd, tmpDiff, tmp; + double row, col; + + if (stateROI == MODE_ROI_NONE) + return true; + + tmpAdd = new HRegion(); + tmpDiff = new HRegion(); + tmpAdd.GenEmptyRegion(); + tmpDiff.GenEmptyRegion(); + + for (int i=0; i < ROIList.Count; i++) + { + switch (((ROI)ROIList[i]).getOperatorFlag()) + { + case ROI.POSITIVE_FLAG: + tmp = ((ROI)ROIList[i]).getRegion(); + tmpAdd = tmp.Union2(tmpAdd); + break; + case ROI.NEGATIVE_FLAG: + tmp = ((ROI)ROIList[i]).getRegion(); + tmpDiff = tmp.Union2(tmpDiff); + break; + default: + break; + }//end of switch + }//end of for + + ModelROI = null; + + if (tmpAdd.AreaCenter(out row, out col) > 0) + { + tmp = tmpAdd.Difference(tmpDiff); + if (tmp.AreaCenter(out row, out col) > 0) + ModelROI = tmp; + } + + //in case the set of positiv and negative ROIs dissolve + if (ModelROI == null || ROIList.Count == 0) + return false; + + return true; + } + + + /// <summary> + /// Clears all variables managing ROI objects + /// </summary> + public void reset() + { + ROIList.Clear(); + activeROIidx = -1; + ModelROI = null; + roiMode = null; + NotifyRCObserver(EVENT_DELETED_ALL_ROIS); + } + + + /// <summary> + /// Deletes this ROI instance if a 'seed' ROI object has been passed + /// to the ROIController by the application class. + /// + /// </summary> + public void resetROI() + { + activeROIidx = -1; + roiMode = null; + } + + /// <summary>Defines the colors for the ROI objects</summary> + /// <param name="aColor">Color for the active ROI object</param> + /// <param name="inaColor">Color for the inactive ROI objects</param> + /// <param name="aHdlColor"> + /// Color for the active handle of the active ROI object + /// </param> + public void setDrawColor(string aColor, + string aHdlColor, + string inaColor) + { + if (aColor != "") + activeCol = aColor; + if (aHdlColor != "") + activeHdlCol = aHdlColor; + if (inaColor != "") + inactiveCol = inaColor; + } + + + /// <summary> + /// Paints all objects from the ROIList into the HALCON window + /// </summary> + /// <param name="window">HALCON window</param> + public void paintData(HalconDotNet.HWindow window) + { + window.SetDraw("margin"); + window.SetLineWidth(1); + + if (ROIList.Count > 0) + { + window.SetColor(inactiveCol); + window.SetDraw("margin"); + + for (int i=0; i < ROIList.Count; i++) + { + window.SetLineStyle(((ROI)ROIList[i]).flagLineStyle); + ((ROI)ROIList[i]).draw(window); + } + + if (activeROIidx != -1) + { + window.SetColor(activeCol); + window.SetLineStyle(((ROI)ROIList[activeROIidx]).flagLineStyle); + ((ROI)ROIList[activeROIidx]).draw(window); + + window.SetColor(activeHdlCol); + ((ROI)ROIList[activeROIidx]).displayActive(window); + } + } + } + + /// <summary> + /// Reaction of ROI objects to the 'mouse button down' event: changing + /// the shape of the ROI and adding it to the ROIList if it is a 'seed' + /// ROI. + /// </summary> + /// <param name="imgX">x coordinate of mouse event</param> + /// <param name="imgY">y coordinate of mouse event</param> + /// <returns></returns> + public int mouseDownAction(double imgX, double imgY) + { + int idxROI= -1; + double max = 10000, dist = 0; + double epsilon = 35.0; //maximal shortest distance to one of + //the handles + + if (roiMode != null) //either a new ROI object is created + { + roiMode.createROI(imgX, imgY); + ROIList.Add(roiMode); + roiMode = null; + activeROIidx = ROIList.Count - 1; + viewController.repaint(); + + NotifyRCObserver(ROIController.EVENT_CREATED_ROI); + } + else if (ROIList.Count > 0) // ... or an existing one is manipulated + { + activeROIidx = -1; + + for (int i =0; i < ROIList.Count; i++) + { + dist = ((ROI)ROIList[i]).distToClosestHandle(imgX, imgY); + if ((dist < max) && (dist < epsilon)) + { + max = dist; + idxROI = i; + } + }//end of for + + if (idxROI >= 0) + { + activeROIidx = idxROI; + NotifyRCObserver(ROIController.EVENT_ACTIVATED_ROI); + } + + viewController.repaint(); + } + return activeROIidx; + } + + /// <summary> + /// Reaction of ROI objects to the 'mouse button move' event: moving + /// the active ROI. + /// </summary> + /// <param name="newX">x coordinate of mouse event</param> + /// <param name="newY">y coordinate of mouse event</param> + public void mouseMoveAction(double newX, double newY) + { + if ((newX == currX) && (newY == currY)) + return; + + ((ROI)ROIList[activeROIidx]).moveByHandle(newX, newY); + viewController.repaint(); + currX = newX; + currY = newY; + NotifyRCObserver(ROIController.EVENT_MOVING_ROI); + } + + + /***********************************************************/ + public void dummyI(int v) + { + } + + }//end of class +}//end of namespace diff --git a/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROILine.cs b/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROILine.cs new file mode 100644 index 0000000..684680a --- /dev/null +++ b/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROILine.cs @@ -0,0 +1,202 @@ +using System; +using HalconDotNet; + +namespace PointGreyAndHalcon +{ + /// <summary> + /// This class demonstrates one of the possible implementations for a + /// linear ROI. ROILine inherits from the base class ROI and + /// implements (besides other auxiliary methods) all virtual methods + /// defined in ROI.cs. + /// </summary> + public class ROILine : ROI + { + + private double row1, col1; // first end point of line + private double row2, col2; // second end point of line + private double midR, midC; // midPoint of line + + private HXLDCont arrowHandleXLD; + + public ROILine() + { + NumHandles = 3; // two end points of line + activeHandleIdx = 2; + arrowHandleXLD = new HXLDCont(); + arrowHandleXLD.GenEmptyObj(); + } + + + /// <summary>Creates a new ROI instance at the mouse position.</summary> + public override void createROI(double midX, double midY) + { + midR = midY; + midC = midX; + + row1 = midR; + col1 = midC - 50; + row2 = midR; + col2 = midC + 50; + + updateArrowHandle(); + } + + /// <summary>Paints the ROI into the supplied window.</summary> + public override void draw(HalconDotNet.HWindow window) + { + + window.DispLine(row1, col1, row2, col2); + + window.DispRectangle2(row1, col1, 0, 5, 5); + window.DispObj(arrowHandleXLD); //window.DispRectangle2( row2, col2, 0, 5, 5); + window.DispRectangle2(midR, midC, 0, 5, 5); + } + + /// <summary> + /// Returns the distance of the ROI handle being + /// closest to the image point(x,y). + /// </summary> + public override double distToClosestHandle(double x, double y) + { + + double max = 10000; + double [] val = new double[NumHandles]; + + val[0] = HMisc.DistancePp(y, x, row1, col1); // upper left + val[1] = HMisc.DistancePp(y, x, row2, col2); // upper right + val[2] = HMisc.DistancePp(y, x, midR, midC); // midpoint + + for (int i=0; i < NumHandles; i++) + { + if (val[i] < max) + { + max = val[i]; + activeHandleIdx = i; + } + }// end of for + + return val[activeHandleIdx]; + } + + /// <summary> + /// Paints the active handle of the ROI object into the supplied window. + /// </summary> + public override void displayActive(HalconDotNet.HWindow window) + { + + switch (activeHandleIdx) + { + case 0: + window.DispRectangle2(row1, col1, 0, 5, 5); + break; + case 1: + window.DispObj(arrowHandleXLD); //window.DispRectangle2(row2, col2, 0, 5, 5); + break; + case 2: + window.DispRectangle2(midR, midC, 0, 5, 5); + break; + } + } + + /// <summary>Gets the HALCON region described by the ROI.</summary> + public override HRegion getRegion() + { + HRegion region = new HRegion(); + region.GenRegionLine(row1, col1, row2, col2); + return region; + } + + public override double getDistanceFromStartPoint(double row, double col) + { + double distance = HMisc.DistancePp(row, col, row1, col1); + return distance; + } + /// <summary> + /// Gets the model information described by + /// the ROI. + /// </summary> + public override HTuple getModelData() + { + return new HTuple(new double[] { row1, col1, row2, col2 }); + } + + /// <summary> + /// Recalculates the shape of the ROI. Translation is + /// performed at the active handle of the ROI object + /// for the image coordinate (x,y). + /// </summary> + public override void moveByHandle(double newX, double newY) + { + double lenR, lenC; + + switch (activeHandleIdx) + { + case 0: // first end point + row1 = newY; + col1 = newX; + + midR = (row1 + row2) / 2; + midC = (col1 + col2) / 2; + break; + case 1: // last end point + row2 = newY; + col2 = newX; + + midR = (row1 + row2) / 2; + midC = (col1 + col2) / 2; + break; + case 2: // midpoint + lenR = row1 - midR; + lenC = col1 - midC; + + midR = newY; + midC = newX; + + row1 = midR + lenR; + col1 = midC + lenC; + row2 = midR - lenR; + col2 = midC - lenC; + break; + } + updateArrowHandle(); + } + + + /// <summary> Auxiliary method </summary> + private void updateArrowHandle() + { + double length,dr,dc, halfHW; + double rrow1, ccol1,rowP1, colP1, rowP2, colP2; + + double headLength = 15; + double headWidth = 15; + + + arrowHandleXLD.Dispose(); + arrowHandleXLD.GenEmptyObj(); + + rrow1 = row1 + (row2 - row1) * 0.8; + ccol1 = col1 + (col2 - col1) * 0.8; + + length = HMisc.DistancePp(rrow1, ccol1, row2, col2); + if (length == 0) + length = -1; + + dr = (row2 - rrow1) / length; + dc = (col2 - ccol1) / length; + + halfHW = headWidth / 2.0; + rowP1 = rrow1 + (length - headLength) * dr + halfHW * dc; + rowP2 = rrow1 + (length - headLength) * dr - halfHW * dc; + colP1 = ccol1 + (length - headLength) * dc - halfHW * dr; + colP2 = ccol1 + (length - headLength) * dc + halfHW * dr; + + if (length == -1) + arrowHandleXLD.GenContourPolygonXld(rrow1, ccol1); + else + arrowHandleXLD.GenContourPolygonXld(new HTuple(new double[] { rrow1, row2, rowP1, row2, rowP2, row2 }), + new HTuple(new double[] { ccol1, col2, colP1, col2, colP2, col2 })); + } + + }//end of class +}//end of namespace diff --git a/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROIRectangle1.cs b/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROIRectangle1.cs new file mode 100644 index 0000000..49affed --- /dev/null +++ b/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROIRectangle1.cs @@ -0,0 +1,211 @@ +using System; +using HalconDotNet; + + +namespace PointGreyAndHalcon +{ + /// <summary> + /// This class demonstrates one of the possible implementations for a + /// (simple) rectangularly shaped ROI. ROIRectangle1 inherits + /// from the base class ROI and implements (besides other auxiliary + /// methods) all virtual methods defined in ROI.cs. + /// Since a simple rectangle is defined by two data points, by the upper + /// left corner and the lower right corner, we use four values (row1/col1) + /// and (row2/col2) as class members to hold these positions at + /// any time of the program. The four corners of the rectangle can be taken + /// as handles, which the user can use to manipulate the size of the ROI. + /// Furthermore, we define a midpoint as an additional handle, with which + /// the user can grab and drag the ROI. Therefore, we declare NumHandles + /// to be 5 and set the activeHandle to be 0, which will be the upper left + /// corner of our ROI. + /// </summary> + public class ROIRectangle1 : ROI + { + + private double row1, col1; // upper left + private double row2, col2; // lower right + private double midR, midC; // midpoint + + + /// <summary>Constructor</summary> + public ROIRectangle1() + { + + NumHandles = 5; // 4 corner points + midpoint + activeHandleIdx = 4; + } + + /// <summary>Creates a new ROI instance at the mouse position</summary> + /// <param name="midX"> + /// x (=column) coordinate for interactive ROI + /// </param> + /// <param name="midY"> + /// y (=row) coordinate for interactive ROI + /// </param> + public override void createROI(double midX, double midY) + { + midR = midY; + midC = midX; + + row1 = midR - 50; + col1 = midC - 50; + row2 = midR + 50; + col2 = midC + 50; + } + + /// <summary>Paints the ROI into the supplied window</summary> + /// <param name="window">HALCON window</param> + public override void draw(HalconDotNet.HWindow window) + { + window.DispRectangle1(row1, col1, row2, col2); + + window.DispRectangle2(row1, col1, 0, 5, 5); + window.DispRectangle2(row1, col2, 0, 5, 5); + window.DispRectangle2(row2, col2, 0, 5, 5); + window.DispRectangle2(row2, col1, 0, 5, 5); + window.DispRectangle2(midR, midC, 0, 5, 5); + } + + /// <summary> + /// Returns the distance of the ROI handle being + /// closest to the image point(x,y) + /// </summary> + /// <param name="x">x (=column) coordinate</param> + /// <param name="y">y (=row) coordinate</param> + /// <returns> + /// Distance of the closest ROI handle. + /// </returns> + public override double distToClosestHandle(double x, double y) + { + + double max = 10000; + double [] val = new double[NumHandles]; + + midR = ((row2 - row1) / 2) + row1; + midC = ((col2 - col1) / 2) + col1; + + val[0] = HMisc.DistancePp(y, x, row1, col1); // upper left + val[1] = HMisc.DistancePp(y, x, row1, col2); // upper right + val[2] = HMisc.DistancePp(y, x, row2, col2); // lower right + val[3] = HMisc.DistancePp(y, x, row2, col1); // lower left + val[4] = HMisc.DistancePp(y, x, midR, midC); // midpoint + + for (int i=0; i < NumHandles; i++) + { + if (val[i] < max) + { + max = val[i]; + activeHandleIdx = i; + } + }// end of for + + return val[activeHandleIdx]; + } + + /// <summary> + /// Paints the active handle of the ROI object into the supplied window + /// </summary> + /// <param name="window">HALCON window</param> + public override void displayActive(HalconDotNet.HWindow window) + { + switch (activeHandleIdx) + { + case 0: + window.DispRectangle2(row1, col1, 0, 5, 5); + break; + case 1: + window.DispRectangle2(row1, col2, 0, 5, 5); + break; + case 2: + window.DispRectangle2(row2, col2, 0, 5, 5); + break; + case 3: + window.DispRectangle2(row2, col1, 0, 5, 5); + break; + case 4: + window.DispRectangle2(midR, midC, 0, 5, 5); + break; + } + } + + /// <summary>Gets the HALCON region described by the ROI</summary> + public override HRegion getRegion() + { + HRegion region = new HRegion(); + region.GenRectangle1(row1, col1, row2, col2); + return region; + } + + /// <summary> + /// Gets the model information described by + /// the interactive ROI + /// </summary> + public override HTuple getModelData() + { + return new HTuple(new double[] { row1, col1, row2, col2 }); + } + + + /// <summary> + /// Recalculates the shape of the ROI instance. Translation is + /// performed at the active handle of the ROI object + /// for the image coordinate (x,y) + /// </summary> + /// <param name="newX">x mouse coordinate</param> + /// <param name="newY">y mouse coordinate</param> + public override void moveByHandle(double newX, double newY) + { + double len1, len2; + double tmp; + + switch (activeHandleIdx) + { + case 0: // upper left + row1 = newY; + col1 = newX; + break; + case 1: // upper right + row1 = newY; + col2 = newX; + break; + case 2: // lower right + row2 = newY; + col2 = newX; + break; + case 3: // lower left + row2 = newY; + col1 = newX; + break; + case 4: // midpoint + len1 = ((row2 - row1) / 2); + len2 = ((col2 - col1) / 2); + + row1 = newY - len1; + row2 = newY + len1; + + col1 = newX - len2; + col2 = newX + len2; + + break; + } + + if (row2 <= row1) + { + tmp = row1; + row1 = row2; + row2 = tmp; + } + + if (col2 <= col1) + { + tmp = col1; + col1 = col2; + col2 = tmp; + } + + midR = ((row2 - row1) / 2) + row1; + midC = ((col2 - col1) / 2) + col1; + + }//end of method + }//end of class +}//end of namespace diff --git a/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROIRectangle2.cs b/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROIRectangle2.cs new file mode 100644 index 0000000..932caa0 --- /dev/null +++ b/PointGreyAndHalcon/PointGreyAndHalcon/ViewROI/ROIRectangle2.cs @@ -0,0 +1,251 @@ +using System; +using HalconDotNet; + + + +namespace PointGreyAndHalcon +{ + + /// <summary> + /// This class demonstrates one of the possible implementations for a + /// (simple) rectangularly shaped ROI. To create this rectangle we use + /// a center point (midR, midC), an orientation 'phi' and the half + /// edge lengths 'length1' and 'length2', similar to the HALCON + /// operator gen_rectangle2(). + /// The class ROIRectangle2 inherits from the base class ROI and + /// implements (besides other auxiliary methods) all virtual methods + /// defined in ROI.cs. + /// </summary> + public class ROIRectangle2 : ROI + { + + /// <summary>Half length of the rectangle side, perpendicular to phi</summary> + private double length1; + + /// <summary>Half length of the rectangle side, in direction of phi</summary> + private double length2; + + /// <summary>Row coordinate of midpoint of the rectangle</summary> + private double midR; + + /// <summary>Column coordinate of midpoint of the rectangle</summary> + private double midC; + + /// <summary>Orientation of rectangle defined in radians.</summary> + private double phi; + + //auxiliary variables + HTuple rowsInit; + HTuple colsInit; + HTuple rows; + HTuple cols; + + HHomMat2D hom2D, tmp; + + /// <summary>Constructor</summary> + public ROIRectangle2() + { + NumHandles = 6; // 4 corners + 1 midpoint + 1 rotationpoint + activeHandleIdx = 4; + } + + /// <summary>Creates a new ROI instance at the mouse position</summary> + /// <param name="midX"> + /// x (=column) coordinate for interactive ROI + /// </param> + /// <param name="midY"> + /// y (=row) coordinate for interactive ROI + /// </param> + public override void createROI(double midX, double midY) + { + midR = midY; + midC = midX; + + length1 = 100; + length2 = 50; + + phi = 0.0; + + rowsInit = new HTuple(new double[] {-1.0, -1.0, 1.0, + 1.0, 0.0, 0.0 }); + colsInit = new HTuple(new double[] {-1.0, 1.0, 1.0, + -1.0, 0.0, 0.6 }); + //order ul , ur, lr, ll, mp, arrowMidpoint + hom2D = new HHomMat2D(); + tmp = new HHomMat2D(); + + updateHandlePos(); + } + + /// <summary>Paints the ROI into the supplied window</summary> + /// <param name="window">HALCON window</param> + public override void draw(HalconDotNet.HWindow window) + { + window.DispRectangle2(midR, midC, -phi, length1, length2); + for (int i =0; i < NumHandles; i++) + window.DispRectangle2(rows[i].D, cols[i].D, -phi, 5, 5); + + window.DispArrow(midR, midC, midR + (Math.Sin(phi) * length1 * 1.2), + midC + (Math.Cos(phi) * length1 * 1.2), 2.0); + + } + + /// <summary> + /// Returns the distance of the ROI handle being + /// closest to the image point(x,y) + /// </summary> + /// <param name="x">x (=column) coordinate</param> + /// <param name="y">y (=row) coordinate</param> + /// <returns> + /// Distance of the closest ROI handle. + /// </returns> + public override double distToClosestHandle(double x, double y) + { + double max = 10000; + double [] val = new double[NumHandles]; + + + for (int i=0; i < NumHandles; i++) + val[i] = HMisc.DistancePp(y, x, rows[i].D, cols[i].D); + + for (int i=0; i < NumHandles; i++) + { + if (val[i] < max) + { + max = val[i]; + activeHandleIdx = i; + } + } + return val[activeHandleIdx]; + } + + /// <summary> + /// Paints the active handle of the ROI object into the supplied window + /// </summary> + /// <param name="window">HALCON window</param> + public override void displayActive(HalconDotNet.HWindow window) + { + window.DispRectangle2(rows[activeHandleIdx].D, + cols[activeHandleIdx].D, + -phi, 5, 5); + + if (activeHandleIdx == 5) + window.DispArrow(midR, midC, + midR + (Math.Sin(phi) * length1 * 1.2), + midC + (Math.Cos(phi) * length1 * 1.2), + 2.0); + } + + + /// <summary>Gets the HALCON region described by the ROI</summary> + public override HRegion getRegion() + { + HRegion region = new HRegion(); + region.GenRectangle2(midR, midC, -phi, length1, length2); + return region; + } + + /// <summary> + /// Gets the model information described by + /// the interactive ROI + /// </summary> + public override HTuple getModelData() + { + return new HTuple(new double[] { midR, midC, phi, length1, length2 }); + } + + /// <summary> + /// Recalculates the shape of the ROI instance. Translation is + /// performed at the active handle of the ROI object + /// for the image coordinate (x,y) + /// </summary> + /// <param name="newX">x mouse coordinate</param> + /// <param name="newY">y mouse coordinate</param> + public override void moveByHandle(double newX, double newY) + { + double vX, vY, x=0, y=0; + + switch (activeHandleIdx) + { + case 0: + case 1: + case 2: + case 3: + tmp = hom2D.HomMat2dInvert(); + x = tmp.AffineTransPoint2d(newX, newY, out y); + + length2 = Math.Abs(y); + length1 = Math.Abs(x); + + checkForRange(x, y); + break; + case 4: + midC = newX; + midR = newY; + break; + case 5: + vY = newY - rows[4].D; + vX = newX - cols[4].D; + phi = Math.Atan2(vY, vX); + break; + } + updateHandlePos(); + }//end of method + + + /// <summary> + /// Auxiliary method to recalculate the contour points of + /// the rectangle by transforming the initial row and + /// column coordinates (rowsInit, colsInit) by the updated + /// homography hom2D + /// </summary> + private void updateHandlePos() + { + hom2D.HomMat2dIdentity(); + hom2D = hom2D.HomMat2dTranslate(midC, midR); + hom2D = hom2D.HomMat2dRotateLocal(phi); + tmp = hom2D.HomMat2dScaleLocal(length1, length2); + cols = tmp.AffineTransPoint2d(colsInit, rowsInit, out rows); + } + + + /* This auxiliary method checks the half lengths + * (length1, length2) using the coordinates (x,y) of the four + * rectangle corners (handles 0 to 3) to avoid 'bending' of + * the rectangular ROI at its midpoint, when it comes to a + * 'collapse' of the rectangle for length1=length2=0. + * */ + private void checkForRange(double x, double y) + { + switch (activeHandleIdx) + { + case 0: + if ((x < 0) && (y < 0)) + return; + if (x >= 0) length1 = 0.01; + if (y >= 0) length2 = 0.01; + break; + case 1: + if ((x > 0) && (y < 0)) + return; + if (x <= 0) length1 = 0.01; + if (y >= 0) length2 = 0.01; + break; + case 2: + if ((x > 0) && (y > 0)) + return; + if (x <= 0) length1 = 0.01; + if (y <= 0) length2 = 0.01; + break; + case 3: + if ((x < 0) && (y > 0)) + return; + if (x >= 0) length1 = 0.01; + if (y <= 0) length2 = 0.01; + break; + default: + break; + } + } + }//end of class +}//end of namespace -- Gitblit v1.8.0