├── .gitattributes ├── .gitignore ├── ICP_Algorithm_In_CS ├── ICP_Algorithm.WFA │ ├── App.config │ ├── Forms │ │ ├── AboutBox.Designer.cs │ │ ├── AboutBox.cs │ │ ├── AboutBox.resx │ │ ├── MainForm.Designer.cs │ │ ├── MainForm.cs │ │ ├── MainForm.resx │ │ ├── OptionsFrm.Designer.cs │ │ ├── OptionsFrm.cs │ │ └── OptionsFrm.resx │ ├── ICP_Algorithm.WFA.csproj │ ├── Languages │ │ ├── Languages.Designer.cs │ │ ├── Languages.resx │ │ ├── Localization.Designer.cs │ │ ├── Localization.en-US.Designer.cs │ │ ├── Localization.en-US.resx │ │ ├── Localization.resx │ │ ├── Localization.tr-TR.Designer.cs │ │ └── Localization.tr-TR.resx │ ├── Methods │ │ ├── ICP.cs │ │ ├── RunProcess.cs │ │ ├── SettingsMethods.cs │ │ ├── V_Shape_ICP.cs │ │ └── Websites.cs │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ └── packages.config └── ICP_Algorithm_In_CS.sln └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Oo]ut/ 33 | [Ll]og/ 34 | [Ll]ogs/ 35 | 36 | # Visual Studio 2015/2017 cache/options directory 37 | .vs/ 38 | # Uncomment if you have tasks that create the project's static files in wwwroot 39 | #wwwroot/ 40 | 41 | # Visual Studio 2017 auto generated files 42 | Generated\ Files/ 43 | 44 | # MSTest test Results 45 | [Tt]est[Rr]esult*/ 46 | [Bb]uild[Ll]og.* 47 | 48 | # NUnit 49 | *.VisualState.xml 50 | TestResult.xml 51 | nunit-*.xml 52 | 53 | # Build Results of an ATL Project 54 | [Dd]ebugPS/ 55 | [Rr]eleasePS/ 56 | dlldata.c 57 | 58 | # Benchmark Results 59 | BenchmarkDotNet.Artifacts/ 60 | 61 | # .NET Core 62 | project.lock.json 63 | project.fragment.lock.json 64 | artifacts/ 65 | 66 | # ASP.NET Scaffolding 67 | ScaffoldingReadMe.txt 68 | 69 | # StyleCop 70 | StyleCopReport.xml 71 | 72 | # Files built by Visual Studio 73 | *_i.c 74 | *_p.c 75 | *_h.h 76 | *.ilk 77 | *.meta 78 | *.obj 79 | *.iobj 80 | *.pch 81 | *.pdb 82 | *.ipdb 83 | *.pgc 84 | *.pgd 85 | *.rsp 86 | *.sbr 87 | *.tlb 88 | *.tli 89 | *.tlh 90 | *.tmp 91 | *.tmp_proj 92 | *_wpftmp.csproj 93 | *.log 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio LightSwitch build output 298 | **/*.HTMLClient/GeneratedArtifacts 299 | **/*.DesktopClient/GeneratedArtifacts 300 | **/*.DesktopClient/ModelManifest.xml 301 | **/*.Server/GeneratedArtifacts 302 | **/*.Server/ModelManifest.xml 303 | _Pvt_Extensions 304 | 305 | # Paket dependency manager 306 | .paket/paket.exe 307 | paket-files/ 308 | 309 | # FAKE - F# Make 310 | .fake/ 311 | 312 | # CodeRush personal settings 313 | .cr/personal 314 | 315 | # Python Tools for Visual Studio (PTVS) 316 | __pycache__/ 317 | *.pyc 318 | 319 | # Cake - Uncomment if you are using it 320 | # tools/** 321 | # !tools/packages.config 322 | 323 | # Tabs Studio 324 | *.tss 325 | 326 | # Telerik's JustMock configuration file 327 | *.jmconfig 328 | 329 | # BizTalk build output 330 | *.btp.cs 331 | *.btm.cs 332 | *.odx.cs 333 | *.xsd.cs 334 | 335 | # OpenCover UI analysis results 336 | OpenCover/ 337 | 338 | # Azure Stream Analytics local run output 339 | ASALocalRun/ 340 | 341 | # MSBuild Binary and Structured Log 342 | *.binlog 343 | 344 | # NVidia Nsight GPU debugger configuration file 345 | *.nvuser 346 | 347 | # MFractors (Xamarin productivity tool) working folder 348 | .mfractor/ 349 | 350 | # Local History for Visual Studio 351 | .localhistory/ 352 | 353 | # BeatPulse healthcheck temp database 354 | healthchecksdb 355 | 356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 357 | MigrationBackup/ 358 | 359 | # Ionide (cross platform F# VS Code tools) working folder 360 | .ionide/ 361 | 362 | # Fody - auto-generated XML schema 363 | FodyWeavers.xsd -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Türkçe (Türkiye) 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Forms/AboutBox.Designer.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace ICP_Algorithm.WFA.Forms 3 | { 4 | partial class AboutBox 5 | { 6 | /// 7 | ///Gerekli tasarımcı değişkeni. 8 | /// 9 | private System.ComponentModel.IContainer components = null; 10 | 11 | /// 12 | ///Kullanılan tüm kaynakları temizleyin. 13 | /// 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer üretilen kod 24 | 25 | /// 26 | /// Tasarımcı desteği için gerekli metot - bu metodun 27 | ///içeriğini kod düzenleyici ile değiştirmeyin. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutBox)); 32 | this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); 33 | this.logoPictureBox = new System.Windows.Forms.PictureBox(); 34 | this.labelProductName = new System.Windows.Forms.Label(); 35 | this.labelVersion = new System.Windows.Forms.Label(); 36 | this.labelCopyright = new System.Windows.Forms.Label(); 37 | this.labelCompanyName = new System.Windows.Forms.Label(); 38 | this.textBoxDescription = new System.Windows.Forms.TextBox(); 39 | this.okButton = new System.Windows.Forms.Button(); 40 | this.tableLayoutPanel.SuspendLayout(); 41 | ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).BeginInit(); 42 | this.SuspendLayout(); 43 | // 44 | // tableLayoutPanel 45 | // 46 | this.tableLayoutPanel.ColumnCount = 2; 47 | this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33F)); 48 | this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 67F)); 49 | this.tableLayoutPanel.Controls.Add(this.logoPictureBox, 0, 0); 50 | this.tableLayoutPanel.Controls.Add(this.labelProductName, 1, 0); 51 | this.tableLayoutPanel.Controls.Add(this.labelVersion, 1, 1); 52 | this.tableLayoutPanel.Controls.Add(this.labelCopyright, 1, 2); 53 | this.tableLayoutPanel.Controls.Add(this.labelCompanyName, 1, 3); 54 | this.tableLayoutPanel.Controls.Add(this.textBoxDescription, 1, 4); 55 | this.tableLayoutPanel.Controls.Add(this.okButton, 1, 5); 56 | this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; 57 | this.tableLayoutPanel.Location = new System.Drawing.Point(9, 9); 58 | this.tableLayoutPanel.Name = "tableLayoutPanel"; 59 | this.tableLayoutPanel.RowCount = 6; 60 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); 61 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); 62 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); 63 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); 64 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); 65 | this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); 66 | this.tableLayoutPanel.Size = new System.Drawing.Size(417, 265); 67 | this.tableLayoutPanel.TabIndex = 0; 68 | // 69 | // logoPictureBox 70 | // 71 | this.logoPictureBox.Dock = System.Windows.Forms.DockStyle.Fill; 72 | this.logoPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("logoPictureBox.Image"))); 73 | this.logoPictureBox.Location = new System.Drawing.Point(3, 3); 74 | this.logoPictureBox.Name = "logoPictureBox"; 75 | this.tableLayoutPanel.SetRowSpan(this.logoPictureBox, 6); 76 | this.logoPictureBox.Size = new System.Drawing.Size(131, 259); 77 | this.logoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; 78 | this.logoPictureBox.TabIndex = 12; 79 | this.logoPictureBox.TabStop = false; 80 | // 81 | // labelProductName 82 | // 83 | this.labelProductName.Dock = System.Windows.Forms.DockStyle.Fill; 84 | this.labelProductName.Location = new System.Drawing.Point(143, 0); 85 | this.labelProductName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); 86 | this.labelProductName.MaximumSize = new System.Drawing.Size(0, 17); 87 | this.labelProductName.Name = "labelProductName"; 88 | this.labelProductName.Size = new System.Drawing.Size(271, 17); 89 | this.labelProductName.TabIndex = 19; 90 | this.labelProductName.Text = "Product Name"; 91 | this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 92 | // 93 | // labelVersion 94 | // 95 | this.labelVersion.Dock = System.Windows.Forms.DockStyle.Fill; 96 | this.labelVersion.Location = new System.Drawing.Point(143, 26); 97 | this.labelVersion.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); 98 | this.labelVersion.MaximumSize = new System.Drawing.Size(0, 17); 99 | this.labelVersion.Name = "labelVersion"; 100 | this.labelVersion.Size = new System.Drawing.Size(271, 17); 101 | this.labelVersion.TabIndex = 0; 102 | this.labelVersion.Text = "Version"; 103 | this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 104 | // 105 | // labelCopyright 106 | // 107 | this.labelCopyright.Dock = System.Windows.Forms.DockStyle.Fill; 108 | this.labelCopyright.Location = new System.Drawing.Point(143, 52); 109 | this.labelCopyright.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); 110 | this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 17); 111 | this.labelCopyright.Name = "labelCopyright"; 112 | this.labelCopyright.Size = new System.Drawing.Size(271, 17); 113 | this.labelCopyright.TabIndex = 21; 114 | this.labelCopyright.Text = "Copyright"; 115 | this.labelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 116 | this.labelCopyright.Click += new System.EventHandler(this.labelCopyright_Click); 117 | // 118 | // labelCompanyName 119 | // 120 | this.labelCompanyName.Dock = System.Windows.Forms.DockStyle.Fill; 121 | this.labelCompanyName.Location = new System.Drawing.Point(143, 78); 122 | this.labelCompanyName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0); 123 | this.labelCompanyName.MaximumSize = new System.Drawing.Size(0, 17); 124 | this.labelCompanyName.Name = "labelCompanyName"; 125 | this.labelCompanyName.Size = new System.Drawing.Size(271, 17); 126 | this.labelCompanyName.TabIndex = 22; 127 | this.labelCompanyName.Text = "Company Name"; 128 | this.labelCompanyName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; 129 | this.labelCompanyName.Click += new System.EventHandler(this.labelCompanyName_Click); 130 | // 131 | // textBoxDescription 132 | // 133 | this.textBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill; 134 | this.textBoxDescription.Location = new System.Drawing.Point(143, 107); 135 | this.textBoxDescription.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3); 136 | this.textBoxDescription.Multiline = true; 137 | this.textBoxDescription.Name = "textBoxDescription"; 138 | this.textBoxDescription.ReadOnly = true; 139 | this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both; 140 | this.textBoxDescription.Size = new System.Drawing.Size(271, 126); 141 | this.textBoxDescription.TabIndex = 23; 142 | this.textBoxDescription.TabStop = false; 143 | this.textBoxDescription.Text = "Description"; 144 | // 145 | // okButton 146 | // 147 | this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 148 | this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; 149 | this.okButton.Location = new System.Drawing.Point(339, 239); 150 | this.okButton.Name = "okButton"; 151 | this.okButton.Size = new System.Drawing.Size(75, 23); 152 | this.okButton.TabIndex = 24; 153 | this.okButton.Text = "&OK"; 154 | // 155 | // AboutBox 156 | // 157 | this.AcceptButton = this.okButton; 158 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 159 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 160 | this.ClientSize = new System.Drawing.Size(435, 283); 161 | this.Controls.Add(this.tableLayoutPanel); 162 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 163 | this.MaximizeBox = false; 164 | this.MinimizeBox = false; 165 | this.Name = "AboutBox"; 166 | this.Padding = new System.Windows.Forms.Padding(9); 167 | this.ShowIcon = false; 168 | this.ShowInTaskbar = false; 169 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 170 | this.Text = "About"; 171 | this.tableLayoutPanel.ResumeLayout(false); 172 | this.tableLayoutPanel.PerformLayout(); 173 | ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).EndInit(); 174 | this.ResumeLayout(false); 175 | 176 | } 177 | 178 | #endregion 179 | 180 | private System.Windows.Forms.TableLayoutPanel tableLayoutPanel; 181 | private System.Windows.Forms.PictureBox logoPictureBox; 182 | private System.Windows.Forms.Label labelProductName; 183 | private System.Windows.Forms.Label labelVersion; 184 | private System.Windows.Forms.Label labelCopyright; 185 | private System.Windows.Forms.Label labelCompanyName; 186 | private System.Windows.Forms.TextBox textBoxDescription; 187 | private System.Windows.Forms.Button okButton; 188 | } 189 | } 190 | -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Forms/AboutBox.cs: -------------------------------------------------------------------------------- 1 | using ICP_Algorithm.WFA.Languages; 2 | using System; 3 | using System.Reflection; 4 | using System.Windows.Forms; 5 | 6 | namespace ICP_Algorithm.WFA.Forms 7 | { 8 | partial class AboutBox : Form 9 | { 10 | public AboutBox() 11 | { 12 | InitializeComponent(); 13 | this.Text = String.Format("{0} {1}", AssemblyTitle, Localization.About2); 14 | this.labelProductName.Text = AssemblyProduct; 15 | this.labelVersion.Text = String.Format("{0} {1}", Localization.Version, AssemblyVersion); 16 | this.labelCopyright.Text = AssemblyCopyright; 17 | this.labelCompanyName.Text = AssemblyCompany; 18 | this.textBoxDescription.Text = AssemblyDescription; 19 | this.okButton.Text = Localization.OK; 20 | } 21 | 22 | #region Derleme Öznitelik Erişimcileri 23 | 24 | public string AssemblyTitle 25 | { 26 | get 27 | { 28 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false); 29 | if (attributes.Length > 0) 30 | { 31 | AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0]; 32 | if (titleAttribute.Title != "") 33 | { 34 | return titleAttribute.Title; 35 | } 36 | } 37 | return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase); 38 | } 39 | } 40 | 41 | public string AssemblyVersion 42 | { 43 | get 44 | { 45 | return Assembly.GetExecutingAssembly().GetName().Version.ToString(); 46 | } 47 | } 48 | 49 | public string AssemblyDescription 50 | { 51 | get 52 | { 53 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false); 54 | if (attributes.Length == 0) 55 | { 56 | return ""; 57 | } 58 | return ((AssemblyDescriptionAttribute)attributes[0]).Description; 59 | } 60 | } 61 | 62 | public string AssemblyProduct 63 | { 64 | get 65 | { 66 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false); 67 | if (attributes.Length == 0) 68 | { 69 | return ""; 70 | } 71 | return ((AssemblyProductAttribute)attributes[0]).Product; 72 | } 73 | } 74 | 75 | public string AssemblyCopyright 76 | { 77 | get 78 | { 79 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); 80 | if (attributes.Length == 0) 81 | { 82 | return ""; 83 | } 84 | return ((AssemblyCopyrightAttribute)attributes[0]).Copyright; 85 | } 86 | } 87 | 88 | public string AssemblyCompany 89 | { 90 | get 91 | { 92 | object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false); 93 | if (attributes.Length == 0) 94 | { 95 | return ""; 96 | } 97 | return ((AssemblyCompanyAttribute)attributes[0]).Company; 98 | } 99 | } 100 | #endregion 101 | 102 | private void labelCopyright_Click(object sender, EventArgs e) 103 | { 104 | Methods.Websites.OpenGithubProfile(); 105 | } 106 | 107 | private void labelCompanyName_Click(object sender, EventArgs e) 108 | { 109 | Methods.Websites.OpenGithubProfile(); 110 | } 111 | } 112 | } -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Forms/MainForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace ICP_Algorithm.WFA 2 | { 3 | partial class MainForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.pictureBox1 = new System.Windows.Forms.PictureBox(); 32 | this.textBox1 = new System.Windows.Forms.TextBox(); 33 | this.lbX2 = new System.Windows.Forms.Label(); 34 | this.lbY2 = new System.Windows.Forms.Label(); 35 | this.textBox2 = new System.Windows.Forms.TextBox(); 36 | this.lbAngle2 = new System.Windows.Forms.Label(); 37 | this.textBox3 = new System.Windows.Forms.TextBox(); 38 | this.btnNoisySample = new System.Windows.Forms.Button(); 39 | this.btnShowFinal = new System.Windows.Forms.Button(); 40 | this.btn_normal_sample = new System.Windows.Forms.Button(); 41 | this.grpBoxTransformationTopLeft = new System.Windows.Forms.GroupBox(); 42 | this.grpBoxInitialTopLeft = new System.Windows.Forms.GroupBox(); 43 | this.lbY = new System.Windows.Forms.Label(); 44 | this.Txt_InitPosY = new System.Windows.Forms.TextBox(); 45 | this.lbX = new System.Windows.Forms.Label(); 46 | this.Txt_InitPosX = new System.Windows.Forms.TextBox(); 47 | this.lbAngle = new System.Windows.Forms.Label(); 48 | this.Txt_InitAngle = new System.Windows.Forms.TextBox(); 49 | this.menuStrip = new System.Windows.Forms.MenuStrip(); 50 | this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 51 | this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 52 | this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 53 | this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 54 | this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 55 | this.reportAnIssueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 56 | this.githubWebPageToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 57 | this.aTutorialOnRigidRegistrationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 58 | this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 59 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); 60 | this.grpBoxTransformationTopLeft.SuspendLayout(); 61 | this.grpBoxInitialTopLeft.SuspendLayout(); 62 | this.menuStrip.SuspendLayout(); 63 | this.SuspendLayout(); 64 | // 65 | // pictureBox1 66 | // 67 | this.pictureBox1.Location = new System.Drawing.Point(0, 26); 68 | this.pictureBox1.Margin = new System.Windows.Forms.Padding(2); 69 | this.pictureBox1.Name = "pictureBox1"; 70 | this.pictureBox1.Size = new System.Drawing.Size(745, 500); 71 | this.pictureBox1.TabIndex = 0; 72 | this.pictureBox1.TabStop = false; 73 | // 74 | // textBox1 75 | // 76 | this.textBox1.Location = new System.Drawing.Point(51, 52); 77 | this.textBox1.Margin = new System.Windows.Forms.Padding(2); 78 | this.textBox1.Name = "textBox1"; 79 | this.textBox1.Size = new System.Drawing.Size(72, 20); 80 | this.textBox1.TabIndex = 6; 81 | this.textBox1.Text = "50"; 82 | // 83 | // lbX2 84 | // 85 | this.lbX2.AutoSize = true; 86 | this.lbX2.Location = new System.Drawing.Point(8, 54); 87 | this.lbX2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 88 | this.lbX2.Name = "lbX2"; 89 | this.lbX2.Size = new System.Drawing.Size(14, 13); 90 | this.lbX2.TabIndex = 7; 91 | this.lbX2.Text = "X"; 92 | // 93 | // lbY2 94 | // 95 | this.lbY2.AutoSize = true; 96 | this.lbY2.Location = new System.Drawing.Point(8, 77); 97 | this.lbY2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 98 | this.lbY2.Name = "lbY2"; 99 | this.lbY2.Size = new System.Drawing.Size(14, 13); 100 | this.lbY2.TabIndex = 9; 101 | this.lbY2.Text = "Y"; 102 | // 103 | // textBox2 104 | // 105 | this.textBox2.Location = new System.Drawing.Point(51, 75); 106 | this.textBox2.Margin = new System.Windows.Forms.Padding(2); 107 | this.textBox2.Name = "textBox2"; 108 | this.textBox2.Size = new System.Drawing.Size(72, 20); 109 | this.textBox2.TabIndex = 8; 110 | this.textBox2.Text = "50"; 111 | // 112 | // lbAngle2 113 | // 114 | this.lbAngle2.AutoSize = true; 115 | this.lbAngle2.Location = new System.Drawing.Point(8, 102); 116 | this.lbAngle2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 117 | this.lbAngle2.Name = "lbAngle2"; 118 | this.lbAngle2.Size = new System.Drawing.Size(34, 13); 119 | this.lbAngle2.TabIndex = 11; 120 | this.lbAngle2.Text = "Angle"; 121 | // 122 | // textBox3 123 | // 124 | this.textBox3.Location = new System.Drawing.Point(51, 100); 125 | this.textBox3.Margin = new System.Windows.Forms.Padding(2); 126 | this.textBox3.Name = "textBox3"; 127 | this.textBox3.Size = new System.Drawing.Size(72, 20); 128 | this.textBox3.TabIndex = 10; 129 | this.textBox3.Text = "0"; 130 | // 131 | // btnNoisySample 132 | // 133 | this.btnNoisySample.Location = new System.Drawing.Point(749, 172); 134 | this.btnNoisySample.Margin = new System.Windows.Forms.Padding(2); 135 | this.btnNoisySample.Name = "btnNoisySample"; 136 | this.btnNoisySample.Size = new System.Drawing.Size(89, 20); 137 | this.btnNoisySample.TabIndex = 12; 138 | this.btnNoisySample.Text = "Noisy Sample"; 139 | this.btnNoisySample.UseVisualStyleBackColor = true; 140 | this.btnNoisySample.Click += new System.EventHandler(this.btnNoisySample_Click); 141 | // 142 | // btnShowFinal 143 | // 144 | this.btnShowFinal.Location = new System.Drawing.Point(749, 220); 145 | this.btnShowFinal.Margin = new System.Windows.Forms.Padding(2); 146 | this.btnShowFinal.Name = "btnShowFinal"; 147 | this.btnShowFinal.Size = new System.Drawing.Size(89, 20); 148 | this.btnShowFinal.TabIndex = 13; 149 | this.btnShowFinal.Text = "Show Final"; 150 | this.btnShowFinal.UseVisualStyleBackColor = true; 151 | this.btnShowFinal.Click += new System.EventHandler(this.btnShowFinal_Click); 152 | // 153 | // btn_normal_sample 154 | // 155 | this.btn_normal_sample.Location = new System.Drawing.Point(749, 196); 156 | this.btn_normal_sample.Margin = new System.Windows.Forms.Padding(2); 157 | this.btn_normal_sample.Name = "btn_normal_sample"; 158 | this.btn_normal_sample.Size = new System.Drawing.Size(89, 20); 159 | this.btn_normal_sample.TabIndex = 14; 160 | this.btn_normal_sample.Text = "Normal Sample"; 161 | this.btn_normal_sample.UseVisualStyleBackColor = true; 162 | this.btn_normal_sample.Click += new System.EventHandler(this.btn_normal_sample_Click); 163 | // 164 | // grpBoxTransformationTopLeft 165 | // 166 | this.grpBoxTransformationTopLeft.Controls.Add(this.lbY2); 167 | this.grpBoxTransformationTopLeft.Controls.Add(this.textBox2); 168 | this.grpBoxTransformationTopLeft.Controls.Add(this.lbX2); 169 | this.grpBoxTransformationTopLeft.Controls.Add(this.textBox1); 170 | this.grpBoxTransformationTopLeft.Controls.Add(this.lbAngle2); 171 | this.grpBoxTransformationTopLeft.Controls.Add(this.textBox3); 172 | this.grpBoxTransformationTopLeft.Location = new System.Drawing.Point(966, 26); 173 | this.grpBoxTransformationTopLeft.Margin = new System.Windows.Forms.Padding(2); 174 | this.grpBoxTransformationTopLeft.Name = "grpBoxTransformationTopLeft"; 175 | this.grpBoxTransformationTopLeft.Padding = new System.Windows.Forms.Padding(2); 176 | this.grpBoxTransformationTopLeft.Size = new System.Drawing.Size(251, 142); 177 | this.grpBoxTransformationTopLeft.TabIndex = 15; 178 | this.grpBoxTransformationTopLeft.TabStop = false; 179 | this.grpBoxTransformationTopLeft.Text = "Transformation parameters respect to Top Left"; 180 | // 181 | // grpBoxInitialTopLeft 182 | // 183 | this.grpBoxInitialTopLeft.Controls.Add(this.lbY); 184 | this.grpBoxInitialTopLeft.Controls.Add(this.Txt_InitPosY); 185 | this.grpBoxInitialTopLeft.Controls.Add(this.lbX); 186 | this.grpBoxInitialTopLeft.Controls.Add(this.Txt_InitPosX); 187 | this.grpBoxInitialTopLeft.Controls.Add(this.lbAngle); 188 | this.grpBoxInitialTopLeft.Controls.Add(this.Txt_InitAngle); 189 | this.grpBoxInitialTopLeft.Location = new System.Drawing.Point(749, 26); 190 | this.grpBoxInitialTopLeft.Margin = new System.Windows.Forms.Padding(2); 191 | this.grpBoxInitialTopLeft.Name = "grpBoxInitialTopLeft"; 192 | this.grpBoxInitialTopLeft.Padding = new System.Windows.Forms.Padding(2); 193 | this.grpBoxInitialTopLeft.Size = new System.Drawing.Size(213, 142); 194 | this.grpBoxInitialTopLeft.TabIndex = 16; 195 | this.grpBoxInitialTopLeft.TabStop = false; 196 | this.grpBoxInitialTopLeft.Text = "Initial parameters respect to Top Left"; 197 | // 198 | // lbY 199 | // 200 | this.lbY.AutoSize = true; 201 | this.lbY.Location = new System.Drawing.Point(8, 77); 202 | this.lbY.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 203 | this.lbY.Name = "lbY"; 204 | this.lbY.Size = new System.Drawing.Size(14, 13); 205 | this.lbY.TabIndex = 9; 206 | this.lbY.Text = "Y"; 207 | // 208 | // Txt_InitPosY 209 | // 210 | this.Txt_InitPosY.Location = new System.Drawing.Point(51, 75); 211 | this.Txt_InitPosY.Margin = new System.Windows.Forms.Padding(2); 212 | this.Txt_InitPosY.Name = "Txt_InitPosY"; 213 | this.Txt_InitPosY.Size = new System.Drawing.Size(72, 20); 214 | this.Txt_InitPosY.TabIndex = 8; 215 | this.Txt_InitPosY.Text = "400"; 216 | // 217 | // lbX 218 | // 219 | this.lbX.AutoSize = true; 220 | this.lbX.Location = new System.Drawing.Point(8, 54); 221 | this.lbX.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 222 | this.lbX.Name = "lbX"; 223 | this.lbX.Size = new System.Drawing.Size(14, 13); 224 | this.lbX.TabIndex = 7; 225 | this.lbX.Text = "X"; 226 | // 227 | // Txt_InitPosX 228 | // 229 | this.Txt_InitPosX.Location = new System.Drawing.Point(51, 52); 230 | this.Txt_InitPosX.Margin = new System.Windows.Forms.Padding(2); 231 | this.Txt_InitPosX.Name = "Txt_InitPosX"; 232 | this.Txt_InitPosX.Size = new System.Drawing.Size(72, 20); 233 | this.Txt_InitPosX.TabIndex = 6; 234 | this.Txt_InitPosX.Text = "100"; 235 | // 236 | // lbAngle 237 | // 238 | this.lbAngle.AutoSize = true; 239 | this.lbAngle.Location = new System.Drawing.Point(8, 102); 240 | this.lbAngle.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); 241 | this.lbAngle.Name = "lbAngle"; 242 | this.lbAngle.Size = new System.Drawing.Size(34, 13); 243 | this.lbAngle.TabIndex = 11; 244 | this.lbAngle.Text = "Angle"; 245 | // 246 | // Txt_InitAngle 247 | // 248 | this.Txt_InitAngle.Location = new System.Drawing.Point(51, 100); 249 | this.Txt_InitAngle.Margin = new System.Windows.Forms.Padding(2); 250 | this.Txt_InitAngle.Name = "Txt_InitAngle"; 251 | this.Txt_InitAngle.Size = new System.Drawing.Size(72, 20); 252 | this.Txt_InitAngle.TabIndex = 10; 253 | this.Txt_InitAngle.Text = "0"; 254 | // 255 | // menuStrip 256 | // 257 | this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 258 | this.fileToolStripMenuItem, 259 | this.toolsToolStripMenuItem, 260 | this.helpToolStripMenuItem}); 261 | this.menuStrip.Location = new System.Drawing.Point(0, 0); 262 | this.menuStrip.Name = "menuStrip"; 263 | this.menuStrip.Size = new System.Drawing.Size(1217, 24); 264 | this.menuStrip.TabIndex = 17; 265 | this.menuStrip.Text = "menuStrip"; 266 | // 267 | // fileToolStripMenuItem 268 | // 269 | this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 270 | this.exitToolStripMenuItem}); 271 | this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; 272 | this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20); 273 | this.fileToolStripMenuItem.Text = "&File"; 274 | // 275 | // exitToolStripMenuItem 276 | // 277 | this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; 278 | this.exitToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4))); 279 | this.exitToolStripMenuItem.Size = new System.Drawing.Size(132, 22); 280 | this.exitToolStripMenuItem.Text = "&Exit"; 281 | this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); 282 | // 283 | // toolsToolStripMenuItem 284 | // 285 | this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 286 | this.optionsToolStripMenuItem}); 287 | this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem"; 288 | this.toolsToolStripMenuItem.Size = new System.Drawing.Size(44, 20); 289 | this.toolsToolStripMenuItem.Text = "&Tools"; 290 | // 291 | // optionsToolStripMenuItem 292 | // 293 | this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem"; 294 | this.optionsToolStripMenuItem.Size = new System.Drawing.Size(111, 22); 295 | this.optionsToolStripMenuItem.Text = "&Options"; 296 | this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem_Click); 297 | // 298 | // helpToolStripMenuItem 299 | // 300 | this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { 301 | this.reportAnIssueToolStripMenuItem, 302 | this.githubWebPageToolStripMenuItem, 303 | this.aTutorialOnRigidRegistrationToolStripMenuItem, 304 | this.aboutToolStripMenuItem}); 305 | this.helpToolStripMenuItem.Name = "helpToolStripMenuItem"; 306 | this.helpToolStripMenuItem.Size = new System.Drawing.Size(40, 20); 307 | this.helpToolStripMenuItem.Text = "&Help"; 308 | // 309 | // reportAnIssueToolStripMenuItem 310 | // 311 | this.reportAnIssueToolStripMenuItem.Name = "reportAnIssueToolStripMenuItem"; 312 | this.reportAnIssueToolStripMenuItem.Size = new System.Drawing.Size(222, 22); 313 | this.reportAnIssueToolStripMenuItem.Text = "&Report an issue"; 314 | this.reportAnIssueToolStripMenuItem.Click += new System.EventHandler(this.reportAnIssueToolStripMenuItem_Click); 315 | // 316 | // githubWebPageToolStripMenuItem 317 | // 318 | this.githubWebPageToolStripMenuItem.Name = "githubWebPageToolStripMenuItem"; 319 | this.githubWebPageToolStripMenuItem.Size = new System.Drawing.Size(222, 22); 320 | this.githubWebPageToolStripMenuItem.Text = "&Github Web Page"; 321 | this.githubWebPageToolStripMenuItem.Click += new System.EventHandler(this.githubWebPageToolStripMenuItem_Click); 322 | // 323 | // aTutorialOnRigidRegistrationToolStripMenuItem 324 | // 325 | this.aTutorialOnRigidRegistrationToolStripMenuItem.Name = "aTutorialOnRigidRegistrationToolStripMenuItem"; 326 | this.aTutorialOnRigidRegistrationToolStripMenuItem.Size = new System.Drawing.Size(222, 22); 327 | this.aTutorialOnRigidRegistrationToolStripMenuItem.Text = "A &Tutorial on Rigid Registration"; 328 | this.aTutorialOnRigidRegistrationToolStripMenuItem.Click += new System.EventHandler(this.aTutorialOnRigidRegistrationToolStripMenuItem_Click); 329 | // 330 | // aboutToolStripMenuItem 331 | // 332 | this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem"; 333 | this.aboutToolStripMenuItem.Size = new System.Drawing.Size(222, 22); 334 | this.aboutToolStripMenuItem.Text = "&About"; 335 | this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click); 336 | // 337 | // MainForm 338 | // 339 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 340 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 341 | this.ClientSize = new System.Drawing.Size(1217, 578); 342 | this.Controls.Add(this.grpBoxInitialTopLeft); 343 | this.Controls.Add(this.grpBoxTransformationTopLeft); 344 | this.Controls.Add(this.btn_normal_sample); 345 | this.Controls.Add(this.btnShowFinal); 346 | this.Controls.Add(this.btnNoisySample); 347 | this.Controls.Add(this.pictureBox1); 348 | this.Controls.Add(this.menuStrip); 349 | this.MainMenuStrip = this.menuStrip; 350 | this.Margin = new System.Windows.Forms.Padding(2); 351 | this.Name = "MainForm"; 352 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; 353 | this.Text = "ICP Algorithm in C#"; 354 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); 355 | this.grpBoxTransformationTopLeft.ResumeLayout(false); 356 | this.grpBoxTransformationTopLeft.PerformLayout(); 357 | this.grpBoxInitialTopLeft.ResumeLayout(false); 358 | this.grpBoxInitialTopLeft.PerformLayout(); 359 | this.menuStrip.ResumeLayout(false); 360 | this.menuStrip.PerformLayout(); 361 | this.ResumeLayout(false); 362 | this.PerformLayout(); 363 | 364 | } 365 | 366 | #endregion 367 | 368 | private System.Windows.Forms.PictureBox pictureBox1; 369 | private System.Windows.Forms.TextBox textBox1; 370 | private System.Windows.Forms.Label lbX2; 371 | private System.Windows.Forms.Label lbY2; 372 | private System.Windows.Forms.TextBox textBox2; 373 | private System.Windows.Forms.Label lbAngle2; 374 | private System.Windows.Forms.TextBox textBox3; 375 | private System.Windows.Forms.Button btnNoisySample; 376 | private System.Windows.Forms.Button btnShowFinal; 377 | private System.Windows.Forms.Button btn_normal_sample; 378 | private System.Windows.Forms.GroupBox grpBoxTransformationTopLeft; 379 | private System.Windows.Forms.GroupBox grpBoxInitialTopLeft; 380 | private System.Windows.Forms.Label lbY; 381 | private System.Windows.Forms.TextBox Txt_InitPosY; 382 | private System.Windows.Forms.Label lbX; 383 | private System.Windows.Forms.TextBox Txt_InitPosX; 384 | private System.Windows.Forms.Label lbAngle; 385 | private System.Windows.Forms.TextBox Txt_InitAngle; 386 | private System.Windows.Forms.MenuStrip menuStrip; 387 | private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; 388 | private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; 389 | private System.Windows.Forms.ToolStripMenuItem toolsToolStripMenuItem; 390 | private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem; 391 | private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem; 392 | private System.Windows.Forms.ToolStripMenuItem reportAnIssueToolStripMenuItem; 393 | private System.Windows.Forms.ToolStripMenuItem githubWebPageToolStripMenuItem; 394 | private System.Windows.Forms.ToolStripMenuItem aTutorialOnRigidRegistrationToolStripMenuItem; 395 | private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem; 396 | } 397 | } 398 | 399 | -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Forms/MainForm.cs: -------------------------------------------------------------------------------- 1 | /// =============================== 2 | /// AUTHOR :Yahya Sevikoglu - yahyasevikoglu@gmail.com 3 | /// CREATE DATE :29.11.2019 4 | /// PURPOSE : This class is used for calculation of convergens between two point clouds. These point clouds should be same dimensional but can have different number of sample points. 5 | 6 | using ICP_Algorithm.WFA.Forms; 7 | using ICP_Algorithm.WFA.Languages; 8 | using ICP_Algorithm.WFA.Methods; 9 | using MathNet.Numerics.LinearAlgebra; 10 | using System; 11 | using System.Diagnostics; 12 | using System.Drawing; 13 | using System.Windows.Forms; 14 | 15 | namespace ICP_Algorithm.WFA 16 | { 17 | public partial class MainForm : Form 18 | { 19 | double previous_error; 20 | double delta_error_thresh = 0.0001; 21 | public MainForm() 22 | { 23 | InitializeComponent(); 24 | GetLang(); 25 | } 26 | 27 | private void GetLang() 28 | { 29 | this.Text = Localization.MainFormTitle; 30 | 31 | #region TopMenu 32 | fileToolStripMenuItem.Text = Localization.File; 33 | exitToolStripMenuItem.Text = Localization.Exit; 34 | 35 | toolsToolStripMenuItem.Text = Localization.Tools; 36 | optionsToolStripMenuItem.Text = Localization.Options; 37 | 38 | helpToolStripMenuItem.Text = Localization.Help; 39 | reportAnIssueToolStripMenuItem.Text = Localization.ReportAnIssue; 40 | githubWebPageToolStripMenuItem.Text = Localization.githubWebPage; 41 | aTutorialOnRigidRegistrationToolStripMenuItem.Text = Localization.aTutorialOnRigidRegistration; 42 | aboutToolStripMenuItem.Text = Localization.About; 43 | #endregion 44 | 45 | grpBoxInitialTopLeft.Text = Localization.grpBoxInitialTopLeft; 46 | grpBoxTransformationTopLeft.Text = Localization.grpBoxTransformationTopLeft; 47 | 48 | btnNoisySample.Text = Localization.NoisySample; 49 | btn_normal_sample.Text = Localization.NormalSample; 50 | btnShowFinal.Text = Localization.ShowFinal; 51 | 52 | lbAngle.Text = Localization.Angle; 53 | lbAngle2.Text = Localization.Angle; 54 | lbX.Text = Localization.X; 55 | lbX2.Text = Localization.X; 56 | lbY.Text = Localization.Y; 57 | lbY2.Text = Localization.Y; 58 | } 59 | 60 | private void btnShowFinal_Click(object sender, EventArgs e) 61 | { 62 | ///definitions 63 | var m = Matrix.Build; 64 | Matrix R = m.Dense(3, 3); 65 | Matrix t = m.Dense(3, 1); 66 | double offset_x = 0, offset_y = 120; ///translation respect to origin 67 | double alfa = 0; ///rotation respect to origin 68 | offset_x = Convert.ToDouble(textBox1.Text); 69 | offset_y = Convert.ToDouble(textBox2.Text); 70 | alfa = Convert.ToDouble(textBox3.Text); 71 | 72 | V_Shape_ICP v_Shape_ICP = new V_Shape_ICP(); 73 | 74 | double init_offsetX = Convert.ToDouble(Txt_InitPosX.Text); 75 | double init_offsetY = Convert.ToDouble(Txt_InitPosY.Text); 76 | v_Shape_ICP.AngleOfV_Obj = Convert.ToDouble(Txt_InitAngle.Text); 77 | v_Shape_ICP.PositionOfV_Obj[0] = init_offsetX; 78 | v_Shape_ICP.PositionOfV_Obj[1] = init_offsetY; 79 | 80 | //Matrix M_points = CreateCircle(grid, Np, 10, 350); 81 | Matrix M_points = v_Shape_ICP.CreateRefMatrix(); 82 | 83 | ///Create C shaped Data cloud 84 | // Matrix M_points = CreateCircle(grid, Np, 10, 350); 85 | ///transform this data cloud for specified parameters as Model cloud and copy them to another cloud as sample 86 | Matrix P_points = ICP.Transform(M_points, alfa, new double[] { offset_x, offset_y }, new double[] { init_offsetX, init_offsetY }); 87 | ///Add random noise to Sample Data cloud 88 | ///Create and draw data images 89 | Bitmap flag = new Bitmap(1000, 1000); 90 | Graphics g = Graphics.FromImage(flag); 91 | g.Clear(Color.Black); 92 | pictureBox1.Image = flag; 93 | DrawPoint2(P_points, Brushes.Red, pictureBox1, g); 94 | DrawPoint2(M_points, Brushes.Green, pictureBox1, g); 95 | ///delay 1500 ms for user to see data clouds 96 | System.Threading.Thread.Sleep(2000); 97 | Stopwatch watch = new Stopwatch(); 98 | watch.Restart(); 99 | //Matrix ref_Vector=m.Dense(2,1,1); 100 | //Matrix ref_Vector_ref = m.Dense(2, 1, 1); 101 | //ref_Vector[0, 0] = 10; 102 | //ref_Vector[1, 0] = 350 ; 103 | //ref_Vector = addMotion(ref_Vector, offset_x, offset_y, alfa); 104 | //ref_Vector_ref = ref_Vector.Clone(); 105 | //V_Shape_ICP v_Shape_ICP = new V_Shape_ICP(); 106 | Matrix offsetMat = m.Dense(2, 1); 107 | offsetMat[0, 0] = init_offsetX; 108 | offsetMat[1, 0] = init_offsetY; 109 | var cornerPoints2 = v_Shape_ICP.FindVShapePoints(P_points); 110 | //var cornerPoints = ICP.AddVectorValsToMatrix(cornerPoints2, offsetMat); 111 | 112 | //leftCorner = (double[])cornerPoints[0].Clone(); 113 | //midPoint = (double[])cornerPoints[1].Clone(); 114 | //rightCorner = (double[])cornerPoints[2].Clone(); 115 | 116 | 117 | ///Apply ICP to Point clouds 118 | // P_points = ICP.ICP_run(M_points, P_points, threshold, max_itr,false,ref ref_Vector); 119 | watch.Stop(); 120 | Debug.WriteLine(Localization.ICPtime + watch.ElapsedMilliseconds + " " + Localization.ms); 121 | ///Draw Results 122 | g.Clear(Color.Black); 123 | pictureBox1.Image = flag; 124 | DrawPoint2(P_points, Brushes.Red, pictureBox1, g); 125 | DrawPoint2(cornerPoints2, Brushes.White, pictureBox1, g); 126 | DrawPoint2(M_points, new SolidBrush(Color.FromArgb(30, Color.Green)), pictureBox1, g); 127 | //DrawPoint2(ref_Vector, Brushes.Blue, pictureBox1, g); 128 | //DrawPoint2(ref_Vector_ref, Brushes.White, pictureBox1, g); 129 | } 130 | 131 | private void btnNoisySample_Click(object sender, EventArgs e) 132 | { 133 | var m = Matrix.Build; 134 | int max_itr = 5000; 135 | double grid = 0.1; 136 | double err = 0; 137 | 138 | int Np = 500; 139 | double threshold = 0.00001; 140 | Matrix R = m.Dense(3, 3); 141 | Matrix t = m.Dense(3, 1); 142 | double offset_x = 0, offset_y = 120; 143 | double alfa = 0; 144 | offset_x = Convert.ToDouble(textBox1.Text); 145 | offset_y = Convert.ToDouble(textBox2.Text); 146 | alfa = Convert.ToDouble(textBox3.Text); 147 | Matrix M_points = CreateCircle(grid, Np, 10, 350); 148 | Matrix P_points = addMotion(M_points, offset_x, offset_y, alfa); 149 | 150 | Random r = new Random(); 151 | for (int i = 0; i < Np; i++) 152 | { 153 | P_points[0, i] += (r.NextDouble() - 0.5) * 5; 154 | P_points[1, i] += (r.NextDouble() - 0.5) * 5; 155 | } 156 | Bitmap flag = new Bitmap(1000, 1000); 157 | Graphics g = Graphics.FromImage(flag); 158 | g.Clear(Color.Black); 159 | pictureBox1.Image = flag; 160 | DrawPoint2(P_points, Brushes.Red, pictureBox1, g); 161 | DrawPoint2(M_points, Brushes.Green, pictureBox1, g); 162 | System.Threading.Thread.Sleep(1500); 163 | Tuple, Matrix, double> ret; 164 | Stopwatch watch = new Stopwatch(); 165 | Stopwatch watch2 = new Stopwatch(); 166 | double time = 0; 167 | for (int itr = 1; itr <= max_itr; itr++) 168 | { 169 | watch.Restart(); 170 | 171 | ret = ICP.ICP_run(M_points, P_points, false); 172 | R = ret.Item1; 173 | t = ret.Item2; 174 | err = ret.Item3; 175 | 176 | Matrix Third_raw = m.Dense(1, Np, 0); 177 | Matrix Px = m.Dense(1, Np); 178 | Matrix Py = m.Dense(1, Np); 179 | Matrix P_points2; 180 | P_points2 = R.Multiply(P_points.Stack(Third_raw)); 181 | Px.SetRow(0, P_points2.Row(0)); 182 | Py.SetRow(0, P_points2.Row(1)); 183 | Px = Px + t[0, 0]; 184 | Py = Py + t[1, 0]; 185 | P_points.SetRow(0, Px.Row(0)); 186 | P_points.SetRow(1, Py.Row(0)); 187 | watch.Stop(); 188 | time += watch.ElapsedMilliseconds; 189 | g.Clear(Color.Black); 190 | pictureBox1.Image = flag; 191 | DrawPoint2(P_points, Brushes.Red, pictureBox1, g); 192 | DrawPoint2(M_points, Brushes.Green, pictureBox1, g); 193 | if (err < threshold || Math.Abs(previous_error - err) < delta_error_thresh) 194 | { 195 | Debug.WriteLine(Localization.error + err); 196 | Debug.WriteLine(Localization.iteration + itr); 197 | break; 198 | } 199 | previous_error = err; 200 | } 201 | Debug.WriteLine(Localization.Time + time + Localization.ms); 202 | } 203 | private void btn_normal_sample_Click(object sender, EventArgs e) 204 | { 205 | var m = Matrix.Build; 206 | int max_itr = 5000; 207 | double grid = 0.1; 208 | double err = 0; 209 | 210 | double threshold = 0.00001; 211 | Matrix R = m.Dense(3, 3); 212 | Matrix t = m.Dense(3, 1); 213 | double offset_x = 0, offset_y = 120; 214 | double alfa = 0; 215 | offset_x = Convert.ToDouble(textBox1.Text); 216 | offset_y = Convert.ToDouble(textBox2.Text); 217 | alfa = Convert.ToDouble(textBox3.Text); 218 | 219 | V_Shape_ICP v_Shape_ICP = new V_Shape_ICP(); 220 | 221 | v_Shape_ICP.AngleOfV_Obj = 0; 222 | v_Shape_ICP.PositionOfV_Obj[0] = 100; 223 | v_Shape_ICP.PositionOfV_Obj[1] = 350; 224 | 225 | //Matrix M_points = CreateCircle(grid, Np, 10, 350); 226 | Matrix M_points = v_Shape_ICP.CreateRefMatrix(); 227 | int Np = M_points.ColumnCount; 228 | 229 | Matrix P_points = addMotion(M_points, offset_x, offset_y, alfa); 230 | 231 | Bitmap flag = new Bitmap(1000, 1000); 232 | Graphics g = Graphics.FromImage(flag); 233 | g.Clear(Color.Black); 234 | pictureBox1.Image = flag; 235 | DrawPoint2(P_points, Brushes.Red, pictureBox1, g); 236 | DrawPoint2(M_points, Brushes.Green, pictureBox1, g); 237 | System.Threading.Thread.Sleep(1500); 238 | Tuple, Matrix, double> ret; 239 | Stopwatch watch = new Stopwatch(); 240 | Stopwatch watch2 = new Stopwatch(); 241 | double time = 0; 242 | for (int itr = 1; itr <= max_itr; itr++) 243 | { 244 | watch.Restart(); 245 | ret = ICP.ICP_run(M_points, P_points, false); 246 | R = ret.Item1; 247 | t = ret.Item2; 248 | err = ret.Item3; 249 | 250 | Matrix Third_raw = m.Dense(1, Np, 0); 251 | Matrix Px = m.Dense(1, Np); 252 | Matrix Py = m.Dense(1, Np); 253 | Matrix P_points2; 254 | P_points2 = R.Multiply(P_points.Stack(Third_raw)); 255 | Px.SetRow(0, P_points2.Row(0)); 256 | Py.SetRow(0, P_points2.Row(1)); 257 | Px = Px + t[0, 0]; 258 | Py = Py + t[1, 0]; 259 | P_points.SetRow(0, Px.Row(0)); 260 | P_points.SetRow(1, Py.Row(0)); 261 | watch.Stop(); 262 | time += watch.ElapsedMilliseconds; 263 | g.Clear(Color.Black); 264 | pictureBox1.Image = flag; 265 | DrawPoint2(P_points, Brushes.Red, pictureBox1, g); 266 | DrawPoint2(M_points, Brushes.Green, pictureBox1, g); 267 | if (err < threshold || Math.Abs(previous_error - err) < delta_error_thresh) 268 | { 269 | Debug.WriteLine(Localization.error + err); 270 | Debug.WriteLine(Localization.iteration + itr); 271 | break; 272 | } 273 | previous_error = err; 274 | } 275 | Debug.WriteLine(Localization.Time + time + Localization.ms); 276 | } 277 | 278 | public Matrix addMotion(Matrix cpoints, double dx, double dy, double dtheta) 279 | { 280 | var m = Matrix.Build; 281 | Matrix Rt = m.Dense(2, 2); 282 | Matrix Tt = m.Dense(2, 1); 283 | Vector dummycpointsV; 284 | Matrix dummycpointsM; 285 | int nPoint = cpoints.ColumnCount; 286 | double dthetainRad = Math.PI * dtheta / 180; 287 | Rt[0, 0] = Math.Cos(dthetainRad); 288 | Rt[1, 0] = -Math.Sin(dthetainRad); 289 | Rt[0, 1] = -Rt[1, 0]; 290 | Rt[1, 1] = Rt[0, 0]; 291 | 292 | Tt[0, 0] = dx; 293 | Tt[1, 0] = dy; 294 | 295 | cpoints = Rt.Multiply(cpoints); 296 | dummycpointsV = cpoints.Column(0) + Tt.Column(0); 297 | dummycpointsM = dummycpointsV.ToColumnMatrix(); 298 | 299 | for (int i = 1; i < nPoint; i++) 300 | { 301 | dummycpointsV = cpoints.Column(i) + Tt.Column(0); 302 | dummycpointsM = dummycpointsM.Append(dummycpointsV.ToColumnMatrix()); 303 | } 304 | cpoints = dummycpointsM; 305 | 306 | return cpoints; 307 | } 308 | 309 | public Matrix CreateCircle(double grid, int len, int offset_x, int offset_y) 310 | { 311 | var m = Matrix.Build; 312 | Matrix points = m.Dense(2, len, 0); 313 | int j = 0; 314 | double r = len * grid / 2; 315 | for (int i = 0; i < len; i++) 316 | { 317 | points[0, i] = j * grid + offset_x; 318 | if (i == len / 2) 319 | { 320 | j = 0; 321 | } 322 | 323 | j++; 324 | } 325 | for (int i = 0; i < len; i++) 326 | { 327 | if (i <= len / 2) 328 | { 329 | points[1, i] = Math.Sqrt((r - points[0, i] + offset_x) * (r + points[0, i] - offset_x)) + offset_y; 330 | } 331 | else 332 | { 333 | points[1, i] = -Math.Sqrt((r - points[0, i] + offset_x) * (r + points[0, i] - offset_x)) + offset_y; 334 | } 335 | //points[1, i] = Math.Sqrt((r - points[0, i] + offset_x) * (r + points[0, i] - offset_x)) + offset_y; 336 | } 337 | return points; 338 | } 339 | 340 | public void DrawPoint2(Matrix point, Brush b, PictureBox p, Graphics g) 341 | { 342 | try 343 | { 344 | int nPoint = point.ColumnCount; 345 | int[] x = new int[nPoint]; 346 | int[] y = new int[nPoint]; 347 | for (int j = 0; j < nPoint; j++) 348 | { 349 | x[j] = (int)Math.Round(point.At(0, j)); 350 | y[j] = (int)Math.Round(point.At(1, j)); 351 | } 352 | 353 | for (int i = 0; i < nPoint; i++) 354 | { 355 | g.FillRectangle(b, x[i], y[i], 3, 3); 356 | } 357 | p.Refresh(); 358 | } 359 | catch 360 | { 361 | 362 | } 363 | } 364 | 365 | private void exitToolStripMenuItem_Click(object sender, EventArgs e) 366 | { 367 | Application.Exit(); 368 | } 369 | 370 | private void optionsToolStripMenuItem_Click(object sender, EventArgs e) 371 | { 372 | ShowOptionsForm(); 373 | } 374 | 375 | private void ShowOptionsForm() 376 | { 377 | OptionsFrm optionsFrm = new OptionsFrm(); 378 | optionsFrm.ShowDialog(); 379 | } 380 | 381 | private void reportAnIssueToolStripMenuItem_Click(object sender, EventArgs e) 382 | { 383 | Websites.OpenGithubIssues(); 384 | } 385 | 386 | private void githubWebPageToolStripMenuItem_Click(object sender, EventArgs e) 387 | { 388 | Websites.OpenGithubProject(); 389 | } 390 | 391 | private void aTutorialOnRigidRegistrationToolStripMenuItem_Click(object sender, EventArgs e) 392 | { 393 | Websites.OpenATutorialOnRigidRegistration(); 394 | } 395 | 396 | private void aboutToolStripMenuItem_Click(object sender, EventArgs e) 397 | { 398 | AboutBox aboutBox = new AboutBox(); 399 | aboutBox.ShowDialog(); 400 | } 401 | } 402 | } -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Forms/MainForm.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 17, 17 122 | 123 | -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Forms/OptionsFrm.Designer.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace ICP_Algorithm.WFA.Forms 3 | { 4 | partial class OptionsFrm 5 | { 6 | /// 7 | /// Required designer variable. 8 | /// 9 | private System.ComponentModel.IContainer components = null; 10 | 11 | /// 12 | /// Clean up any resources being used. 13 | /// 14 | /// true if managed resources should be disposed; otherwise, false. 15 | protected override void Dispose(bool disposing) 16 | { 17 | if (disposing && (components != null)) 18 | { 19 | components.Dispose(); 20 | } 21 | base.Dispose(disposing); 22 | } 23 | 24 | #region Windows Form Designer generated code 25 | 26 | /// 27 | /// Required method for Designer support - do not modify 28 | /// the contents of this method with the code editor. 29 | /// 30 | private void InitializeComponent() 31 | { 32 | this.tabControlOptions = new System.Windows.Forms.TabControl(); 33 | this.tabPageGeneral = new System.Windows.Forms.TabPage(); 34 | this.cmbBoxLang = new System.Windows.Forms.ComboBox(); 35 | this.lbLang = new System.Windows.Forms.Label(); 36 | this.tabControlOptions.SuspendLayout(); 37 | this.tabPageGeneral.SuspendLayout(); 38 | this.SuspendLayout(); 39 | // 40 | // tabControlOptions 41 | // 42 | this.tabControlOptions.Controls.Add(this.tabPageGeneral); 43 | this.tabControlOptions.Dock = System.Windows.Forms.DockStyle.Fill; 44 | this.tabControlOptions.Location = new System.Drawing.Point(0, 0); 45 | this.tabControlOptions.Name = "tabControlOptions"; 46 | this.tabControlOptions.SelectedIndex = 0; 47 | this.tabControlOptions.Size = new System.Drawing.Size(522, 303); 48 | this.tabControlOptions.TabIndex = 0; 49 | // 50 | // tabPageGeneral 51 | // 52 | this.tabPageGeneral.Controls.Add(this.cmbBoxLang); 53 | this.tabPageGeneral.Controls.Add(this.lbLang); 54 | this.tabPageGeneral.Location = new System.Drawing.Point(4, 22); 55 | this.tabPageGeneral.Name = "tabPageGeneral"; 56 | this.tabPageGeneral.Padding = new System.Windows.Forms.Padding(3); 57 | this.tabPageGeneral.Size = new System.Drawing.Size(514, 277); 58 | this.tabPageGeneral.TabIndex = 0; 59 | this.tabPageGeneral.Text = "General"; 60 | this.tabPageGeneral.UseVisualStyleBackColor = true; 61 | // 62 | // cmbBoxLang 63 | // 64 | this.cmbBoxLang.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 65 | this.cmbBoxLang.FormattingEnabled = true; 66 | this.cmbBoxLang.Location = new System.Drawing.Point(67, 6); 67 | this.cmbBoxLang.Name = "cmbBoxLang"; 68 | this.cmbBoxLang.Size = new System.Drawing.Size(176, 21); 69 | this.cmbBoxLang.TabIndex = 2; 70 | this.cmbBoxLang.SelectedIndexChanged += new System.EventHandler(this.cmbBoxLang_SelectedIndexChanged); 71 | // 72 | // lbLang 73 | // 74 | this.lbLang.AutoSize = true; 75 | this.lbLang.Location = new System.Drawing.Point(3, 9); 76 | this.lbLang.Name = "lbLang"; 77 | this.lbLang.Size = new System.Drawing.Size(58, 13); 78 | this.lbLang.TabIndex = 1; 79 | this.lbLang.Text = "Language:"; 80 | // 81 | // OptionsFrm 82 | // 83 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 84 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 85 | this.ClientSize = new System.Drawing.Size(522, 303); 86 | this.Controls.Add(this.tabControlOptions); 87 | this.Name = "OptionsFrm"; 88 | this.ShowIcon = false; 89 | this.ShowInTaskbar = false; 90 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 91 | this.Text = "Options"; 92 | this.tabControlOptions.ResumeLayout(false); 93 | this.tabPageGeneral.ResumeLayout(false); 94 | this.tabPageGeneral.PerformLayout(); 95 | this.ResumeLayout(false); 96 | 97 | } 98 | 99 | #endregion 100 | 101 | private System.Windows.Forms.TabControl tabControlOptions; 102 | private System.Windows.Forms.TabPage tabPageGeneral; 103 | private System.Windows.Forms.Label lbLang; 104 | private System.Windows.Forms.ComboBox cmbBoxLang; 105 | } 106 | } -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Forms/OptionsFrm.cs: -------------------------------------------------------------------------------- 1 | using ICP_Algorithm.WFA.Languages; 2 | using ICP_Algorithm.WFA.Methods; 3 | using ICP_Algorithm.WFA.Properties; 4 | using System; 5 | using System.Windows.Forms; 6 | 7 | namespace ICP_Algorithm.WFA.Forms 8 | { 9 | public partial class OptionsFrm : Form 10 | { 11 | private bool cmbBoxLangsec; 12 | 13 | public OptionsFrm() 14 | { 15 | InitializeComponent(); 16 | GetLang(); 17 | GetLanguagesList(); 18 | GetSettings(); 19 | } 20 | 21 | private void GetLang() 22 | { 23 | this.Text = Localization.OptionsTitle; 24 | 25 | lbLang.Text = Localization.Language; 26 | 27 | tabPageGeneral.Text = Localization.General; 28 | } 29 | 30 | private void GetSettings() 31 | { 32 | cmbBoxLang.SelectedItem = Settings.Default.Language; 33 | cmbBoxLangsec = true; 34 | } 35 | 36 | private void GetLanguagesList() 37 | { 38 | cmbBoxLang.Items.Add(Languages.Languages.EnglishUK); 39 | cmbBoxLang.Items.Add(Languages.Languages.EnglishUS); 40 | cmbBoxLang.Items.Add(Languages.Languages.TurkishTR); 41 | } 42 | 43 | private void cmbBoxLang_SelectedIndexChanged(object sender, EventArgs e) 44 | { 45 | if (cmbBoxLangsec) 46 | { 47 | if (cmbBoxLang.Text == Languages.Languages.TurkishTR) 48 | { 49 | SettingsMethods.SetLanguage(Languages.Languages.TurkishTR, Languages.Languages.TurkishCodeTR); 50 | } 51 | else if (cmbBoxLang.Text == Languages.Languages.EnglishUS) 52 | { 53 | SettingsMethods.SetLanguage(Languages.Languages.EnglishUS, Languages.Languages.EnglishCodeUS); 54 | } 55 | else if (cmbBoxLang.Text == Languages.Languages.EnglishUK) 56 | { 57 | SettingsMethods.SetLanguage(Languages.Languages.EnglishUK, Languages.Languages.EnglishCodeGB_UK); 58 | } 59 | else 60 | { 61 | SettingsMethods.SetLanguage(Languages.Languages.EnglishUK, ""); 62 | } 63 | } 64 | } 65 | } 66 | } -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Forms/OptionsFrm.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/ICP_Algorithm.WFA.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {356A1138-4CC1-49AA-BEBE-FED3F13DB684} 8 | WinExe 9 | ICP_Algorithm.WFA 10 | ICP_Algorithm.WFA 11 | v4.6.1 12 | 512 13 | true 14 | true 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | ICP_Algorithm.WFA.Program 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | ..\packages\KdTree.1.4.1\lib\net461\KdTreeLib.dll 45 | 46 | 47 | ..\packages\MathNet.Numerics.4.8.1\lib\net461\MathNet.Numerics.dll 48 | 49 | 50 | ..\packages\Supercluster.KDTree.1.0.4\lib\Supercluster.KDTree.dll 51 | 52 | 53 | 54 | 55 | 56 | 57 | ..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | Form 72 | 73 | 74 | AboutBox.cs 75 | 76 | 77 | Form 78 | 79 | 80 | MainForm.cs 81 | 82 | 83 | Form 84 | 85 | 86 | OptionsFrm.cs 87 | 88 | 89 | Localization.en-US.resx 90 | True 91 | True 92 | 93 | 94 | True 95 | True 96 | Localization.resx 97 | 98 | 99 | True 100 | True 101 | Languages.resx 102 | 103 | 104 | True 105 | True 106 | Localization.tr-TR.resx 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | AboutBox.cs 117 | 118 | 119 | MainForm.cs 120 | 121 | 122 | OptionsFrm.cs 123 | 124 | 125 | ResXFileCodeGenerator 126 | Localization.en-US.Designer.cs 127 | 128 | 129 | ResXFileCodeGenerator 130 | Localization.Designer.cs 131 | 132 | 133 | ResXFileCodeGenerator 134 | Languages.Designer.cs 135 | 136 | 137 | ResXFileCodeGenerator 138 | Localization.tr-TR.Designer.cs 139 | 140 | 141 | ResXFileCodeGenerator 142 | Resources.Designer.cs 143 | Designer 144 | 145 | 146 | True 147 | Resources.resx 148 | True 149 | 150 | 151 | 152 | SettingsSingleFileGenerator 153 | Settings.Designer.cs 154 | 155 | 156 | True 157 | Settings.settings 158 | True 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Languages/Languages.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Bu kod araç tarafından oluşturuldu. 4 | // Çalışma Zamanı Sürümü:4.0.30319.42000 5 | // 6 | // Bu dosyada yapılacak değişiklikler yanlış davranışa neden olabilir ve 7 | // kod yeniden oluşturulursa kaybolur. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ICP_Algorithm.WFA.Languages { 12 | using System; 13 | 14 | 15 | /// 16 | /// Yerelleştirilmiş dizeleri aramak gibi işlemler için, türü kesin olarak belirtilmiş kaynak sınıfı. 17 | /// 18 | // Bu sınıf ResGen veya Visual Studio gibi bir araç kullanılarak StronglyTypedResourceBuilder 19 | // sınıfı tarafından otomatik olarak oluşturuldu. 20 | // Üye eklemek veya kaldırmak için .ResX dosyanızı düzenleyin ve sonra da ResGen 21 | // komutunu /str seçeneğiyle yeniden çalıştırın veya VS projenizi yeniden oluşturun. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Languages { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Languages() { 33 | } 34 | 35 | /// 36 | /// Bu sınıf tarafından kullanılan, önbelleğe alınmış ResourceManager örneğini döndürür. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ICP_Algorithm.WFA.Languages.Languages", typeof(Languages).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Tümü için geçerli iş parçacığının CurrentUICulture özelliğini geçersiz kular 51 | /// CurrentUICulture özelliğini tüm kaynak aramaları için geçersiz kılar. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// en-GB benzeri yerelleştirilmiş bir dize arar. 65 | /// 66 | internal static string EnglishCodeGB_UK { 67 | get { 68 | return ResourceManager.GetString("EnglishCodeGB_UK", resourceCulture); 69 | } 70 | } 71 | 72 | /// 73 | /// en-US benzeri yerelleştirilmiş bir dize arar. 74 | /// 75 | internal static string EnglishCodeUS { 76 | get { 77 | return ResourceManager.GetString("EnglishCodeUS", resourceCulture); 78 | } 79 | } 80 | 81 | /// 82 | /// English (United Kingdom) benzeri yerelleştirilmiş bir dize arar. 83 | /// 84 | internal static string EnglishUK { 85 | get { 86 | return ResourceManager.GetString("EnglishUK", resourceCulture); 87 | } 88 | } 89 | 90 | /// 91 | /// English (United States) benzeri yerelleştirilmiş bir dize arar. 92 | /// 93 | internal static string EnglishUS { 94 | get { 95 | return ResourceManager.GetString("EnglishUS", resourceCulture); 96 | } 97 | } 98 | 99 | /// 100 | /// tr-TR benzeri yerelleştirilmiş bir dize arar. 101 | /// 102 | internal static string TurkishCodeTR { 103 | get { 104 | return ResourceManager.GetString("TurkishCodeTR", resourceCulture); 105 | } 106 | } 107 | 108 | /// 109 | /// Türkçe (Türkiye) benzeri yerelleştirilmiş bir dize arar. 110 | /// 111 | internal static string TurkishTR { 112 | get { 113 | return ResourceManager.GetString("TurkishTR", resourceCulture); 114 | } 115 | } 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Languages/Languages.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | en-GB 122 | 123 | 124 | en-US 125 | 126 | 127 | English (United Kingdom) 128 | 129 | 130 | English (United States) 131 | 132 | 133 | tr-TR 134 | 135 | 136 | Türkçe (Türkiye) 137 | 138 | -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Languages/Localization.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Bu kod araç tarafından oluşturuldu. 4 | // Çalışma Zamanı Sürümü:4.0.30319.42000 5 | // 6 | // Bu dosyada yapılacak değişiklikler yanlış davranışa neden olabilir ve 7 | // kod yeniden oluşturulursa kaybolur. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ICP_Algorithm.WFA.Languages { 12 | using System; 13 | 14 | 15 | /// 16 | /// Yerelleştirilmiş dizeleri aramak gibi işlemler için, türü kesin olarak belirtilmiş kaynak sınıfı. 17 | /// 18 | // Bu sınıf ResGen veya Visual Studio gibi bir araç kullanılarak StronglyTypedResourceBuilder 19 | // sınıfı tarafından otomatik olarak oluşturuldu. 20 | // Üye eklemek veya kaldırmak için .ResX dosyanızı düzenleyin ve sonra da ResGen 21 | // komutunu /str seçeneğiyle yeniden çalıştırın veya VS projenizi yeniden oluşturun. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Localization { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Localization() { 33 | } 34 | 35 | /// 36 | /// Bu sınıf tarafından kullanılan, önbelleğe alınmış ResourceManager örneğini döndürür. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ICP_Algorithm.WFA.Languages.Localization", typeof(Localization).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Tümü için geçerli iş parçacığının CurrentUICulture özelliğini geçersiz kular 51 | /// CurrentUICulture özelliğini tüm kaynak aramaları için geçersiz kılar. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// &About benzeri yerelleştirilmiş bir dize arar. 65 | /// 66 | internal static string About { 67 | get { 68 | return ResourceManager.GetString("About", resourceCulture); 69 | } 70 | } 71 | 72 | /// 73 | /// About benzeri yerelleştirilmiş bir dize arar. 74 | /// 75 | internal static string About2 { 76 | get { 77 | return ResourceManager.GetString("About2", resourceCulture); 78 | } 79 | } 80 | 81 | /// 82 | /// Angle benzeri yerelleştirilmiş bir dize arar. 83 | /// 84 | internal static string Angle { 85 | get { 86 | return ResourceManager.GetString("Angle", resourceCulture); 87 | } 88 | } 89 | 90 | /// 91 | /// angle: benzeri yerelleştirilmiş bir dize arar. 92 | /// 93 | internal static string angle2 { 94 | get { 95 | return ResourceManager.GetString("angle2", resourceCulture); 96 | } 97 | } 98 | 99 | /// 100 | /// A &Tutorial on Rigid Registration benzeri yerelleştirilmiş bir dize arar. 101 | /// 102 | internal static string aTutorialOnRigidRegistration { 103 | get { 104 | return ResourceManager.GetString("aTutorialOnRigidRegistration", resourceCulture); 105 | } 106 | } 107 | 108 | /// 109 | /// error: benzeri yerelleştirilmiş bir dize arar. 110 | /// 111 | internal static string error { 112 | get { 113 | return ResourceManager.GetString("error", resourceCulture); 114 | } 115 | } 116 | 117 | /// 118 | /// error= benzeri yerelleştirilmiş bir dize arar. 119 | /// 120 | internal static string error2 { 121 | get { 122 | return ResourceManager.GetString("error2", resourceCulture); 123 | } 124 | } 125 | 126 | /// 127 | /// &Exit benzeri yerelleştirilmiş bir dize arar. 128 | /// 129 | internal static string Exit { 130 | get { 131 | return ResourceManager.GetString("Exit", resourceCulture); 132 | } 133 | } 134 | 135 | /// 136 | /// &File benzeri yerelleştirilmiş bir dize arar. 137 | /// 138 | internal static string File { 139 | get { 140 | return ResourceManager.GetString("File", resourceCulture); 141 | } 142 | } 143 | 144 | /// 145 | /// Ending ICP since for loop satisfied benzeri yerelleştirilmiş bir dize arar. 146 | /// 147 | internal static string ForLoop { 148 | get { 149 | return ResourceManager.GetString("ForLoop", resourceCulture); 150 | } 151 | } 152 | 153 | /// 154 | /// General benzeri yerelleştirilmiş bir dize arar. 155 | /// 156 | internal static string General { 157 | get { 158 | return ResourceManager.GetString("General", resourceCulture); 159 | } 160 | } 161 | 162 | /// 163 | /// &Github Web Page benzeri yerelleştirilmiş bir dize arar. 164 | /// 165 | internal static string githubWebPage { 166 | get { 167 | return ResourceManager.GetString("githubWebPage", resourceCulture); 168 | } 169 | } 170 | 171 | /// 172 | /// Initial parameters respect to Top Left benzeri yerelleştirilmiş bir dize arar. 173 | /// 174 | internal static string grpBoxInitialTopLeft { 175 | get { 176 | return ResourceManager.GetString("grpBoxInitialTopLeft", resourceCulture); 177 | } 178 | } 179 | 180 | /// 181 | /// Transformation parameters respect to Top Left benzeri yerelleştirilmiş bir dize arar. 182 | /// 183 | internal static string grpBoxTransformationTopLeft { 184 | get { 185 | return ResourceManager.GetString("grpBoxTransformationTopLeft", resourceCulture); 186 | } 187 | } 188 | 189 | /// 190 | /// &Help benzeri yerelleştirilmiş bir dize arar. 191 | /// 192 | internal static string Help { 193 | get { 194 | return ResourceManager.GetString("Help", resourceCulture); 195 | } 196 | } 197 | 198 | /// 199 | /// ICP time = benzeri yerelleştirilmiş bir dize arar. 200 | /// 201 | internal static string ICPtime { 202 | get { 203 | return ResourceManager.GetString("ICPtime", resourceCulture); 204 | } 205 | } 206 | 207 | /// 208 | /// iteration= benzeri yerelleştirilmiş bir dize arar. 209 | /// 210 | internal static string iteration { 211 | get { 212 | return ResourceManager.GetString("iteration", resourceCulture); 213 | } 214 | } 215 | 216 | /// 217 | /// Language: benzeri yerelleştirilmiş bir dize arar. 218 | /// 219 | internal static string Language { 220 | get { 221 | return ResourceManager.GetString("Language", resourceCulture); 222 | } 223 | } 224 | 225 | /// 226 | /// ICP (Iterative Closest Point) Algorithm in C# benzeri yerelleştirilmiş bir dize arar. 227 | /// 228 | internal static string MainFormTitle { 229 | get { 230 | return ResourceManager.GetString("MainFormTitle", resourceCulture); 231 | } 232 | } 233 | 234 | /// 235 | /// Ending ICP since min error satisfied benzeri yerelleştirilmiş bir dize arar. 236 | /// 237 | internal static string MinError { 238 | get { 239 | return ResourceManager.GetString("MinError", resourceCulture); 240 | } 241 | } 242 | 243 | /// 244 | /// ms benzeri yerelleştirilmiş bir dize arar. 245 | /// 246 | internal static string ms { 247 | get { 248 | return ResourceManager.GetString("ms", resourceCulture); 249 | } 250 | } 251 | 252 | /// 253 | /// Noisy Sample benzeri yerelleştirilmiş bir dize arar. 254 | /// 255 | internal static string NoisySample { 256 | get { 257 | return ResourceManager.GetString("NoisySample", resourceCulture); 258 | } 259 | } 260 | 261 | /// 262 | /// Normal Sample benzeri yerelleştirilmiş bir dize arar. 263 | /// 264 | internal static string NormalSample { 265 | get { 266 | return ResourceManager.GetString("NormalSample", resourceCulture); 267 | } 268 | } 269 | 270 | /// 271 | /// &OK benzeri yerelleştirilmiş bir dize arar. 272 | /// 273 | internal static string OK { 274 | get { 275 | return ResourceManager.GetString("OK", resourceCulture); 276 | } 277 | } 278 | 279 | /// 280 | /// &Options benzeri yerelleştirilmiş bir dize arar. 281 | /// 282 | internal static string Options { 283 | get { 284 | return ResourceManager.GetString("Options", resourceCulture); 285 | } 286 | } 287 | 288 | /// 289 | /// Options benzeri yerelleştirilmiş bir dize arar. 290 | /// 291 | internal static string OptionsTitle { 292 | get { 293 | return ResourceManager.GetString("OptionsTitle", resourceCulture); 294 | } 295 | } 296 | 297 | /// 298 | /// &Report an issue benzeri yerelleştirilmiş bir dize arar. 299 | /// 300 | internal static string ReportAnIssue { 301 | get { 302 | return ResourceManager.GetString("ReportAnIssue", resourceCulture); 303 | } 304 | } 305 | 306 | /// 307 | /// Show Final benzeri yerelleştirilmiş bir dize arar. 308 | /// 309 | internal static string ShowFinal { 310 | get { 311 | return ResourceManager.GetString("ShowFinal", resourceCulture); 312 | } 313 | } 314 | 315 | /// 316 | /// Time= benzeri yerelleştirilmiş bir dize arar. 317 | /// 318 | internal static string Time { 319 | get { 320 | return ResourceManager.GetString("Time", resourceCulture); 321 | } 322 | } 323 | 324 | /// 325 | /// time: benzeri yerelleştirilmiş bir dize arar. 326 | /// 327 | internal static string Time2 { 328 | get { 329 | return ResourceManager.GetString("Time2", resourceCulture); 330 | } 331 | } 332 | 333 | /// 334 | /// &Tools benzeri yerelleştirilmiş bir dize arar. 335 | /// 336 | internal static string Tools { 337 | get { 338 | return ResourceManager.GetString("Tools", resourceCulture); 339 | } 340 | } 341 | 342 | /// 343 | /// Version benzeri yerelleştirilmiş bir dize arar. 344 | /// 345 | internal static string Version { 346 | get { 347 | return ResourceManager.GetString("Version", resourceCulture); 348 | } 349 | } 350 | 351 | /// 352 | /// X benzeri yerelleştirilmiş bir dize arar. 353 | /// 354 | internal static string X { 355 | get { 356 | return ResourceManager.GetString("X", resourceCulture); 357 | } 358 | } 359 | 360 | /// 361 | /// Y benzeri yerelleştirilmiş bir dize arar. 362 | /// 363 | internal static string Y { 364 | get { 365 | return ResourceManager.GetString("Y", resourceCulture); 366 | } 367 | } 368 | } 369 | } 370 | -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Languages/Localization.en-US.Designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doesluck1026/ICP-algorithm-in-CSharp/19bec8c3586615ab6c1a16ab84018e46ad1a5e40/ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Languages/Localization.en-US.Designer.cs -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Languages/Localization.en-US.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | &About 122 | 123 | 124 | About 125 | 126 | 127 | Angle 128 | 129 | 130 | angle: 131 | 132 | 133 | A &Tutorial on Rigid Registration 134 | 135 | 136 | error: 137 | 138 | 139 | error= 140 | 141 | 142 | &Exit 143 | 144 | 145 | &File 146 | 147 | 148 | Ending ICP since for loop satisfied 149 | 150 | 151 | General 152 | 153 | 154 | &Github Web Page 155 | 156 | 157 | Initial parameters respect to Top Left 158 | 159 | 160 | Transformation parameters respect to Top Left 161 | 162 | 163 | &Help 164 | 165 | 166 | ICP time = 167 | 168 | 169 | iteration= 170 | 171 | 172 | Language: 173 | 174 | 175 | ICP (Iterative Closest Point) Algorithm in C# 176 | 177 | 178 | Ending ICP since min error satisfied 179 | 180 | 181 | ms 182 | 183 | 184 | Noisy Sample 185 | 186 | 187 | Normal Sample 188 | 189 | 190 | &OK 191 | 192 | 193 | &Options 194 | 195 | 196 | Options 197 | 198 | 199 | &Report an issue 200 | 201 | 202 | Show Final 203 | 204 | 205 | Time= 206 | 207 | 208 | time: 209 | 210 | 211 | &Tools 212 | 213 | 214 | Version 215 | 216 | 217 | X 218 | 219 | 220 | Y 221 | 222 | -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Languages/Localization.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | &About 122 | 123 | 124 | About 125 | 126 | 127 | Angle 128 | 129 | 130 | angle: 131 | 132 | 133 | A &Tutorial on Rigid Registration 134 | 135 | 136 | error: 137 | 138 | 139 | error= 140 | 141 | 142 | &Exit 143 | 144 | 145 | &File 146 | 147 | 148 | Ending ICP since for loop satisfied 149 | 150 | 151 | General 152 | 153 | 154 | &Github Web Page 155 | 156 | 157 | Initial parameters respect to Top Left 158 | 159 | 160 | Transformation parameters respect to Top Left 161 | 162 | 163 | &Help 164 | 165 | 166 | ICP time = 167 | 168 | 169 | iteration= 170 | 171 | 172 | Language: 173 | 174 | 175 | ICP (Iterative Closest Point) Algorithm in C# 176 | 177 | 178 | Ending ICP since min error satisfied 179 | 180 | 181 | ms 182 | 183 | 184 | Noisy Sample 185 | 186 | 187 | Normal Sample 188 | 189 | 190 | &OK 191 | 192 | 193 | &Options 194 | 195 | 196 | Options 197 | 198 | 199 | &Report an issue 200 | 201 | 202 | Show Final 203 | 204 | 205 | Time= 206 | 207 | 208 | time: 209 | 210 | 211 | &Tools 212 | 213 | 214 | Version 215 | 216 | 217 | X 218 | 219 | 220 | Y 221 | 222 | -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Languages/Localization.tr-TR.Designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/doesluck1026/ICP-algorithm-in-CSharp/19bec8c3586615ab6c1a16ab84018e46ad1a5e40/ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Languages/Localization.tr-TR.Designer.cs -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Languages/Localization.tr-TR.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | &Hakkında 122 | 123 | 124 | Hakkında 125 | 126 | 127 | Açı 128 | 129 | 130 | açı: 131 | 132 | 133 | &Katı Kayıt Hakkında Bir Öğretici 134 | 135 | 136 | hata: 137 | 138 | 139 | hata= 140 | 141 | 142 | &Çık 143 | 144 | 145 | &Dosya 146 | 147 | 148 | for döngüsü sağlandığı için ICP sonlandırılıyor 149 | 150 | 151 | Genel 152 | 153 | 154 | &Github Web Sayfası 155 | 156 | 157 | Sol Üste göre başlangıç parametreleri 158 | 159 | 160 | Sol Üste göre dönüşüm parametreleri 161 | 162 | 163 | &Yardım 164 | 165 | 166 | Yinelemeli En Yakın Nokta (ICP) süresi = 167 | 168 | 169 | yenileme= 170 | 171 | 172 | Dil: 173 | 174 | 175 | C#'ta ICP (Iterative Closest Point/Yinelemeli En Yakın Nokta) Algoritması 176 | 177 | 178 | Minimum hata karşılandığından beri ICP sonlandırılıyor 179 | 180 | 181 | ms 182 | 183 | 184 | Gürültülü Örnek 185 | 186 | 187 | Normal Örnek 188 | 189 | 190 | &Tamam 191 | 192 | 193 | &Seçenekler 194 | 195 | 196 | Seçenekler 197 | 198 | 199 | Bir &sorunu bildir 200 | 201 | 202 | Finali Göster 203 | 204 | 205 | Süre= 206 | 207 | 208 | süre: 209 | 210 | 211 | &Araçlar 212 | 213 | 214 | Sürüm 215 | 216 | 217 | X 218 | 219 | 220 | Y 221 | 222 | -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Methods/ICP.cs: -------------------------------------------------------------------------------- 1 | /// =============================== 2 | /// AUTHOR :Yahya Sevikoglu - yahyasevikoglu@gmail.com 3 | /// CREATE DATE :29.11.2019 4 | /// PURPOSE : This class is used for calculation of convergens between two point clouds. These point clouds should be same dimensional but can have different number of sample points. 5 | /// 6 | /// NOTES:This class is based on Rigid Registration Iterative Closest Point Tutorial which can be found in http://www.sci.utah.edu/~shireen/pdfs/tutorials/Elhabian_ICP09.pdf. 7 | /// This also uses Supercluster KD-Tree algorithm by Eric Regina. 8 | /// =============================== 9 | using System; 10 | using System.Data; 11 | using System.Diagnostics; 12 | using System.Linq; 13 | using ICP_Algorithm.WFA.Languages; 14 | using MathNet.Numerics.LinearAlgebra; 15 | using Supercluster.KDTree; 16 | 17 | namespace ICP_Algorithm.WFA.Methods 18 | { 19 | internal class ICP 20 | { 21 | /// 22 | /// Calculates Rotation, translation and error between two data sets and returns a Tuple of R,t,err. 23 | /// This Function should be called in a loop by updating P_points 24 | /// 25 | /// 26 | /// 27 | /// 28 | /// 29 | internal static Tuple, Matrix, double> ICP_run(Matrix M_points, Matrix P_points, bool _3D) 30 | { 31 | int Np; 32 | var m = Matrix.Build; 33 | Np = P_points.ColumnCount; 34 | Matrix Y; 35 | Y = KD_tree(M_points, P_points); 36 | double s = 1; 37 | 38 | Matrix R; 39 | Matrix t; 40 | Vector d; 41 | double err = 0; 42 | Matrix dummy_Row = m.Dense(1, Np, 0); 43 | ///Nokta sayilari 44 | 45 | ///P ve Y matrislerinin agirlik merkezi hesaplaniyor 46 | Matrix Mu_p = FindCentroid(P_points); 47 | Matrix Mu_y = FindCentroid(Y); 48 | 49 | Matrix dummy_p1 = m.Dense(1, Np); 50 | Matrix dummy_p2 = m.Dense(1, Np); 51 | Matrix dummy_p3 = m.Dense(1, Np, 0); 52 | Matrix dummy_y1 = m.Dense(1, Np); 53 | Matrix dummy_y2 = m.Dense(1, Np); 54 | Matrix dummy_y3 = m.Dense(1, Np, 0); 55 | ///P matrisinin X ve Y koordinatlarini iceren satirlari farkli matrislere aliniyor 56 | dummy_p1.SetRow(0, P_points.Row(0)); 57 | dummy_p2.SetRow(0, P_points.Row(1)); 58 | if (_3D) 59 | { 60 | dummy_p3.SetRow(0, P_points.Row(2)); 61 | } 62 | /// P deki her bir noktadan p nin agirlik merkezinin koordinatlari cikartiliyor(ZERO MEAN) yeni bir matris icerisine kaydediliyor. 63 | Matrix P_prime = (dummy_p1 - Mu_p[0, 0]).Stack(dummy_p2 - Mu_p[1, 0]).Stack(dummy_p3 - Mu_p[2, 0]); 64 | ///Y matrisinin X ve Y koordinatlarini iceren satirlari farkli matrislere aliniyor 65 | dummy_y1.SetRow(0, Y.Row(0)); 66 | dummy_y2.SetRow(0, Y.Row(1)); 67 | if (_3D) 68 | { 69 | dummy_y3.SetRow(0, Y.Row(2)); 70 | } 71 | /// P deki her bir noktadan p nin agirlik merkezinin koordinatlari cikartiliyor(ZERO MEAN) yeni bir matris icerisine kaydediliyor. 72 | Matrix Y_prime = (dummy_y1 - Mu_y[0, 0]).Stack((dummy_y2 - Mu_y[1, 0]).Stack(dummy_y3 - Mu_y[2, 0])); 73 | /// -X -Y -Z koordinat matrisleri aliniyor. 74 | Matrix Px = m.Dense(1, Np); 75 | Matrix Py = m.Dense(1, Np); 76 | Matrix Pz = m.Dense(1, Np, 0); 77 | Matrix Yx = m.Dense(1, Np); 78 | Matrix Yy = m.Dense(1, Np); 79 | Matrix Yz = m.Dense(1, Np, 0); 80 | Px.SetRow(0, P_prime.Row(0)); 81 | Py.SetRow(0, P_prime.Row(1)); 82 | 83 | Yx.SetRow(0, Y_prime.Row(0)); 84 | Yy.SetRow(0, Y_prime.Row(1)); 85 | 86 | if (_3D) 87 | { 88 | Pz.SetRow(0, P_prime.Row(2)); 89 | Yz.SetRow(0, Y_prime.Row(2)); 90 | } 91 | 92 | var Sxx = Px * Yx.Transpose(); 93 | var Sxy = Px * Yy.Transpose(); 94 | var Sxz = Px * Yz.Transpose(); 95 | 96 | var Syx = Py * Yx.Transpose(); 97 | var Syy = Py * Yy.Transpose(); 98 | var Syz = Py * Yz.Transpose(); 99 | 100 | var Szx = Pz * Yx.Transpose(); 101 | var Szy = Pz * Yy.Transpose(); 102 | var Szz = Pz * Yz.Transpose(); 103 | Matrix Nmatrix = m.DenseOfArray(new[,]{{ Sxx[0, 0] + Syy[0, 0] + Szz[0, 0], Syz[0, 0] - Szy[0, 0], -Sxz[0, 0] + Szx[0, 0], Sxy[0, 0] - Syx[0, 0]}, 104 | {-Szy[0, 0] + Syz[0, 0], Sxx[0, 0] - Syy[0, 0] - Szz[0, 0], Sxy[0, 0] + Syx[0, 0], Sxz[0, 0] + Szx[0, 0]}, 105 | {Szx[0, 0] - Sxz[0, 0], Syx[0, 0] + Sxy[0, 0], -Sxx[0, 0] + Syy[0, 0] - Szz[0, 0], Syz[0, 0] + Szy[0, 0]}, 106 | {-Syx[0, 0] + Sxy[0, 0], Szx[0, 0] + Sxz[0, 0], Szy[0, 0] + Syz[0, 0], -Sxx[0, 0] + Szz[0, 0] - Syy[0, 0]} }); 107 | 108 | var evd = Nmatrix.Evd(); 109 | Matrix eigenvectors = evd.EigenVectors; 110 | var q = eigenvectors.Column(3); 111 | var q0 = q[0]; var q1 = q[1]; var q2 = q[2]; var q3 = q[3]; 112 | 113 | ///Quernion matrislerinin bulunmasi 114 | var Qbar = m.DenseOfArray(new[,] { { q0, -q1, -q2, -q3 }, 115 | { q1, q0, q3, -q2 }, 116 | { q2, -q3, q0, q1 }, 117 | { q3, q2, -q1, q0 }}); 118 | 119 | var Q = m.DenseOfArray(new[,] { { q0, -q1, -q2, -q3 }, 120 | { q1, q0, -q3, q2 }, 121 | { q2, q3, q0, -q1 }, 122 | { q3, -q2, q1, q0 }}); 123 | ///Rotasyon matrisi hesabi 124 | R = (Qbar.Transpose()).Multiply(Q); 125 | R = (R.RemoveColumn(0)).RemoveRow(0); 126 | 127 | ///Translation hesabi 128 | t = Mu_y - s * R * Mu_p; 129 | 130 | ///hata hesabi 131 | if (!_3D) 132 | { 133 | Matrix pp = P_points.Stack(dummy_Row); 134 | 135 | for (int i = 0; i < Np; i++) 136 | { 137 | d = Y.Column(i).Subtract(pp.Column(i)); 138 | err += d[0] * d[0] + d[1] * d[1] + d[2] * d[2];//// 139 | } 140 | } 141 | else 142 | { 143 | for (int i = 0; i < Np; i++) 144 | { 145 | d = Y.Column(i).Subtract(P_points.Column(i)); 146 | err += d[0] * d[0] + d[1] * d[1] + d[2] * d[2]; 147 | } 148 | } 149 | Tuple, Matrix, double> ret = new Tuple, Matrix, double>(R, t, err); 150 | return ret; 151 | } 152 | 153 | /// 154 | /// This Function Calculates Final P_points under the conditions of either threshold or maximum iterations that given as input. 155 | /// Returns matched P_points. 156 | /// 157 | /// 158 | /// 159 | /// 160 | /// 161 | /// 162 | /// 163 | internal static Matrix ICP_run(Matrix M_points, Matrix P_points, double threshold, int max_iterations, bool _3D, ref Matrix ref_vector) 164 | { 165 | #region "Definitions" 166 | var m = Matrix.Build; 167 | int Np = P_points.ColumnCount; 168 | Matrix dummy_p1 = m.Dense(1, Np); 169 | Matrix dummy_p2 = m.Dense(1, Np); 170 | Matrix dummy_p3 = m.Dense(1, Np, 0); 171 | Matrix dummy_y1 = m.Dense(1, Np); 172 | Matrix dummy_y2 = m.Dense(1, Np); 173 | Matrix dummy_y3 = m.Dense(1, Np, 0); 174 | Matrix Px = m.Dense(1, Np); 175 | Matrix Py = m.Dense(1, Np); 176 | Matrix Pz = m.Dense(1, Np, 0); 177 | Matrix Yx = m.Dense(1, Np); 178 | Matrix Yy = m.Dense(1, Np); 179 | Matrix Yz = m.Dense(1, Np, 0); 180 | Matrix dummy_Row = m.Dense(1, Np, 0); 181 | Matrix Third_raw = m.Dense(1, Np, 0); ///dummy row to be used in calculations 182 | Matrix Px2 = m.Dense(1, Np); 183 | Matrix Py2 = m.Dense(1, Np); 184 | Matrix Pz2 = m.Dense(1, Np); 185 | Matrix P_points2; 186 | double s = 1; 187 | double delta_error_thresh = 0.00001; 188 | double previous_error = 0; 189 | 190 | Matrix Third_raw1 = m.Dense(1, 1, 0); ///dummy row to be used in calculations 191 | 192 | Matrix R; 193 | Matrix t; 194 | double err = 0; 195 | Matrix Y; 196 | Vector d; 197 | #endregion 198 | for (int itr = 1; itr <= max_iterations; itr++) 199 | { 200 | Y = KD_tree(M_points, P_points); 201 | ///Calculate Centroid for both point clouds 202 | ///P ve Y matrislerinin agirlik merkezi hesaplaniyor 203 | Matrix Mu_p = FindCentroid(P_points); 204 | Matrix Mu_y = FindCentroid(Y); 205 | 206 | ///P matrisinin X ve Y koordinatlarini iceren satirlari farkli matrislere aliniyor 207 | dummy_p1.SetRow(0, P_points.Row(0)); 208 | dummy_p2.SetRow(0, P_points.Row(1)); 209 | if (_3D) 210 | { 211 | dummy_p3.SetRow(0, P_points.Row(2)); 212 | } 213 | ///P_points is moved to origin by subtructing centroid from every element. 214 | /// P deki her bir noktadan p nin agirlik merkezinin koordinatlari cikartiliyor(ZERO MEAN) yeni bir matris icerisine kaydediliyor. 215 | Matrix P_prime = (dummy_p1 - Mu_p[0, 0]).Stack((dummy_p2 - Mu_p[1, 0]).Stack(dummy_p3 - Mu_p[2, 0])); 216 | ///Calculate Centroid for both point clouds 217 | ///Y matrisinin X ve Y koordinatlarini iceren satirlari farkli matrislere aliniyor 218 | dummy_y1.SetRow(0, Y.Row(0)); 219 | dummy_y2.SetRow(0, Y.Row(1)); 220 | if (_3D) 221 | { 222 | dummy_y3.SetRow(0, Y.Row(2)); 223 | } 224 | ///M_points is moved to origin by subtructing centroid from every element. 225 | /// P deki her bir noktadan p nin agirlik merkezinin koordinatlari cikartiliyor(ZERO MEAN) yeni bir matris icerisine kaydediliyor. 226 | Matrix Y_prime = (dummy_y1 - Mu_y[0, 0]).Stack((dummy_y2 - Mu_y[1, 0]).Stack(dummy_y3 - Mu_y[2, 0])); 227 | 228 | /// -X -Y -Z koordinat matrisleri aliniyor. 229 | Px.SetRow(0, P_prime.Row(0)); 230 | Py.SetRow(0, P_prime.Row(1)); 231 | if (_3D) 232 | { 233 | Pz.SetRow(0, P_prime.Row(2)); 234 | Yz.SetRow(0, Y_prime.Row(2)); 235 | } 236 | Yx.SetRow(0, Y_prime.Row(0)); 237 | Yy.SetRow(0, Y_prime.Row(1)); 238 | 239 | 240 | var Sxx = Px * Yx.Transpose(); 241 | var Sxy = Px * Yy.Transpose(); 242 | var Sxz = Px * Yz.Transpose(); 243 | 244 | var Syx = Py * Yx.Transpose(); 245 | var Syy = Py * Yy.Transpose(); 246 | var Syz = Py * Yz.Transpose(); 247 | 248 | var Szx = Pz * Yx.Transpose(); 249 | var Szy = Pz * Yy.Transpose(); 250 | var Szz = Pz * Yz.Transpose(); 251 | Matrix Nmatrix = m.DenseOfArray(new[,]{{ Sxx[0, 0] + Syy[0, 0] + Szz[0, 0], Syz[0, 0] - Szy[0, 0], -Sxz[0, 0] + Szx[0, 0], Sxy[0, 0] - Syx[0, 0]}, 252 | {-Szy[0, 0] + Syz[0, 0], Sxx[0, 0] - Syy[0, 0] - Szz[0, 0], Sxy[0, 0] + Syx[0, 0], Sxz[0, 0] + Szx[0, 0]}, 253 | {Szx[0, 0] - Sxz[0, 0], Syx[0, 0] + Sxy[0, 0], -Sxx[0, 0] + Syy[0, 0] - Szz[0, 0], Syz[0, 0] + Szy[0, 0]}, 254 | {-Syx[0, 0] + Sxy[0, 0], Szx[0, 0] + Sxz[0, 0], Szy[0, 0] + Syz[0, 0], -Sxx[0, 0] + Szz[0, 0] - Syy[0, 0]} }); 255 | 256 | var evd = Nmatrix.Evd(); 257 | Matrix eigenvectors = evd.EigenVectors; 258 | var q = eigenvectors.Column(3); 259 | var q0 = q[0]; var q1 = q[1]; var q2 = q[2]; var q3 = q[3]; 260 | 261 | ///Quernion matrix is calculated 262 | ///Quernion matrislerinin bulunmasi 263 | var Qbar = m.DenseOfArray(new[,] { { q0, -q1, -q2, -q3 }, 264 | { q1, q0, q3, -q2 }, 265 | { q2, -q3, q0, q1 }, 266 | { q3, q2, -q1, q0 }}); 267 | 268 | var Q = m.DenseOfArray(new[,] { { q0, -q1, -q2, -q3 }, 269 | { q1, q0, -q3, q2 }, 270 | { q2, q3, q0, -q1 }, 271 | { q3, -q2, q1, q0 }}); 272 | ///Calculating Rotation matrix 273 | ///Rotasyon matrisi hesabi 274 | R = (Qbar.Transpose()).Multiply(Q); 275 | R = (R.RemoveColumn(0)).RemoveRow(0); 276 | 277 | ///Translation hesabi 278 | t = Mu_y - s * R * Mu_p; 279 | 280 | var ref_vector2 = R.Multiply(ref_vector.Stack(Third_raw1)); 281 | var Px3 = m.Dense(1, 1); 282 | var Py3 = m.Dense(1, 1); 283 | Px3.SetRow(0, ref_vector2.Row(0)); 284 | Py3.SetRow(0, ref_vector2.Row(1)); 285 | //Pz2.SetRow(0, P_points2.Row(2)); 286 | Px3 = Px3 + t[0, 0]; 287 | Py3 = Py3 + t[1, 0]; 288 | //Pz2=Pz2 + t[2, 0]; 289 | ref_vector.SetRow(0, Px3.Row(0)); 290 | ref_vector.SetRow(1, Py3.Row(0)); 291 | ///SCALE Factor hesabi 292 | // 293 | /// 294 | ///Transformation is applied to P_points 295 | ///Hesaplanan değerler P_points matrisine uygulanıyor 296 | if (!_3D) 297 | { 298 | P_points2 = R.Multiply(P_points.Stack(Third_raw)); 299 | Px2.SetRow(0, P_points2.Row(0)); 300 | Py2.SetRow(0, P_points2.Row(1)); 301 | //Pz2.SetRow(0, P_points2.Row(2)); 302 | Px2 = Px2 + t[0, 0]; 303 | Py2 = Py2 + t[1, 0]; 304 | //Pz2=Pz2 + t[2, 0]; 305 | P_points.SetRow(0, Px2.Row(0)); 306 | P_points.SetRow(1, Py2.Row(0)); 307 | //P_points.SetRow(2, Pz2.Row(0)); 308 | Matrix pp = P_points.Stack(Third_raw); ///For 3-D clouds, this line should be commentted out and replace the pp with P_points in following lines 309 | ///error calculation 310 | ///hata hesabi 311 | for (int i = 0; i < Np; i++) 312 | { 313 | d = Y.Column(i).Subtract(pp.Column(i)); 314 | err += d[0] * d[0] + d[1] * d[1] + d[2] * d[2];//// 315 | } 316 | } 317 | else 318 | { 319 | P_points2 = R.Multiply(P_points); 320 | Px2.SetRow(0, P_points2.Row(0)); 321 | Py2.SetRow(0, P_points2.Row(1)); 322 | Pz2.SetRow(0, P_points2.Row(2)); 323 | Px2 = Px2 + t[0, 0]; 324 | Py2 = Py2 + t[1, 0]; 325 | Pz2 = Pz2 + t[2, 0]; 326 | P_points.SetRow(0, Px2.Row(0)); 327 | P_points.SetRow(1, Py2.Row(0)); 328 | P_points.SetRow(2, Pz2.Row(0)); 329 | for (int i = 0; i < Np; i++) 330 | { 331 | d = Y.Column(i).Subtract(P_points.Column(i)); 332 | err += d[0] * d[0] + d[1] * d[1] + d[2] * d[2];//// 333 | } 334 | } 335 | err = err / Np; 336 | ///checking the conditions of convergence 337 | ///koşullar kontrol ediliyor. 338 | if (err < threshold || Math.Abs(previous_error - err) < delta_error_thresh) 339 | { 340 | Debug.WriteLine(Localization.iteration + itr); 341 | Debug.WriteLine(Localization.error2 + err); 342 | break; 343 | } 344 | previous_error = err; 345 | err = 0; 346 | } 347 | return P_points; 348 | } 349 | 350 | /// 351 | /// This Function Calculates Final P_points under the conditions of either threshold or maximum iterations that given as input. 352 | /// Returns matched P_points. 353 | /// 354 | /// 355 | /// 356 | /// 357 | /// 358 | /// 359 | /// 360 | internal static Matrix ICP_run(Matrix M_points, Matrix P_points, double threshold, int max_iterations, bool _3D) 361 | { 362 | #region "Definitions" 363 | var m = Matrix.Build; 364 | int Np = P_points.ColumnCount; 365 | Matrix dummy_p1 = m.Dense(1, Np); 366 | Matrix dummy_p2 = m.Dense(1, Np); 367 | Matrix dummy_p3 = m.Dense(1, Np, 0); 368 | Matrix dummy_y1 = m.Dense(1, Np); 369 | Matrix dummy_y2 = m.Dense(1, Np); 370 | Matrix dummy_y3 = m.Dense(1, Np, 0); 371 | Matrix Px = m.Dense(1, Np); 372 | Matrix Py = m.Dense(1, Np); 373 | Matrix Pz = m.Dense(1, Np, 0); 374 | Matrix Yx = m.Dense(1, Np); 375 | Matrix Yy = m.Dense(1, Np); 376 | Matrix Yz = m.Dense(1, Np, 0); 377 | Matrix Third_raw = m.Dense(1, Np, 0); ///dummy row to be used in calculations 378 | Matrix Px2 = m.Dense(1, Np); 379 | Matrix Py2 = m.Dense(1, Np); 380 | Matrix Pz2 = m.Dense(1, Np); 381 | Matrix P_points2; 382 | double s = 1; 383 | double delta_error_thresh = 0.00000001; 384 | double previous_error = 0; 385 | 386 | 387 | Matrix R; 388 | Matrix t; 389 | double err = 0; 390 | Matrix Y; 391 | Vector d; 392 | 393 | Matrix TransformationMat = m.DenseIdentity(3, 3); 394 | Matrix OffsetMatrix = m.Dense(3, 1); 395 | bool didInit = false; 396 | int itr; 397 | #endregion 398 | for (itr = 1; itr <= max_iterations; itr++) 399 | { 400 | Y = KD_tree(M_points, P_points); 401 | ///Calculate Centroid for both point clouds 402 | ///P ve Y matrislerinin agirlik merkezi hesaplaniyor 403 | Matrix Mu_p = FindCentroid(P_points); 404 | Matrix Mu_y = FindCentroid(Y); 405 | 406 | ///P matrisinin X ve Y koordinatlarini iceren satirlari farkli matrislere aliniyor 407 | dummy_p1.SetRow(0, P_points.Row(0)); 408 | dummy_p2.SetRow(0, P_points.Row(1)); 409 | if (_3D) 410 | { 411 | dummy_p3.SetRow(0, P_points.Row(2)); 412 | } 413 | ///P_points is moved to origin by subtructing centroid from every element. 414 | /// P deki her bir noktadan p nin agirlik merkezinin koordinatlari cikartiliyor(ZERO MEAN) yeni bir matris icerisine kaydediliyor. 415 | Matrix P_prime = (dummy_p1 - Mu_p[0, 0]).Stack((dummy_p2 - Mu_p[1, 0]).Stack(dummy_p3 - Mu_p[2, 0])); 416 | ///Calculate Centroid for both point clouds 417 | ///Y matrisinin X ve Y koordinatlarini iceren satirlari farkli matrislere aliniyor 418 | dummy_y1.SetRow(0, Y.Row(0)); 419 | dummy_y2.SetRow(0, Y.Row(1)); 420 | if (_3D) 421 | { 422 | dummy_y3.SetRow(0, Y.Row(2)); 423 | } 424 | ///M_points is moved to origin by subtructing centroid from every element. 425 | /// P deki her bir noktadan p nin agirlik merkezinin koordinatlari cikartiliyor(ZERO MEAN) yeni bir matris icerisine kaydediliyor. 426 | Matrix Y_prime = (dummy_y1 - Mu_y[0, 0]).Stack((dummy_y2 - Mu_y[1, 0]).Stack(dummy_y3 - Mu_y[2, 0])); 427 | 428 | /// -X -Y -Z koordinat matrisleri aliniyor. 429 | Px.SetRow(0, P_prime.Row(0)); 430 | Py.SetRow(0, P_prime.Row(1)); 431 | if (_3D) 432 | { 433 | Pz.SetRow(0, P_prime.Row(2)); 434 | Yz.SetRow(0, Y_prime.Row(2)); 435 | } 436 | Yx.SetRow(0, Y_prime.Row(0)); 437 | Yy.SetRow(0, Y_prime.Row(1)); 438 | 439 | 440 | var Sxx = Px * Yx.Transpose(); 441 | var Sxy = Px * Yy.Transpose(); 442 | var Sxz = Px * Yz.Transpose(); 443 | 444 | var Syx = Py * Yx.Transpose(); 445 | var Syy = Py * Yy.Transpose(); 446 | var Syz = Py * Yz.Transpose(); 447 | 448 | var Szx = Pz * Yx.Transpose(); 449 | var Szy = Pz * Yy.Transpose(); 450 | var Szz = Pz * Yz.Transpose(); 451 | Matrix Nmatrix = m.DenseOfArray(new[,]{{ Sxx[0, 0] + Syy[0, 0] + Szz[0, 0], Syz[0, 0] - Szy[0, 0], -Sxz[0, 0] + Szx[0, 0], Sxy[0, 0] - Syx[0, 0]}, 452 | {-Szy[0, 0] + Syz[0, 0], Sxx[0, 0] - Syy[0, 0] - Szz[0, 0], Sxy[0, 0] + Syx[0, 0], Sxz[0, 0] + Szx[0, 0]}, 453 | {Szx[0, 0] - Sxz[0, 0], Syx[0, 0] + Sxy[0, 0], -Sxx[0, 0] + Syy[0, 0] - Szz[0, 0], Syz[0, 0] + Szy[0, 0]}, 454 | {-Syx[0, 0] + Sxy[0, 0], Szx[0, 0] + Sxz[0, 0], Szy[0, 0] + Syz[0, 0], -Sxx[0, 0] + Szz[0, 0] - Syy[0, 0]} }); 455 | 456 | var evd = Nmatrix.Evd(); 457 | Matrix eigenvectors = evd.EigenVectors; 458 | var q = eigenvectors.Column(3); 459 | var q0 = q[0]; var q1 = q[1]; var q2 = q[2]; var q3 = q[3]; 460 | 461 | ///Quernion matrix is calculated 462 | ///Quernion matrislerinin bulunmasi 463 | var Qbar = m.DenseOfArray(new[,] { { q0, -q1, -q2, -q3 }, 464 | { q1, q0, q3, -q2 }, 465 | { q2, -q3, q0, q1 }, 466 | { q3, q2, -q1, q0 }}); 467 | 468 | var Q = m.DenseOfArray(new[,] { { q0, -q1, -q2, -q3 }, 469 | { q1, q0, -q3, q2 }, 470 | { q2, q3, q0, -q1 }, 471 | { q3, -q2, q1, q0 }}); 472 | ///Calculating Rotation matrix 473 | ///Rotasyon matrisi hesabi 474 | R = (Qbar.Transpose()).Multiply(Q); 475 | R = (R.RemoveColumn(0)).RemoveRow(0); 476 | 477 | ///Translation hesabi 478 | t = Mu_y - s * R * Mu_p; 479 | 480 | 481 | ///SCALE Factor hesabi 482 | // 483 | /// 484 | ///Transformation is applied to P_points 485 | ///Hesaplanan değerler P_points matrisine uygulanıyor 486 | if (!_3D) 487 | { 488 | if (!didInit) 489 | { 490 | didInit = true; 491 | TransformationMat[0, 2] = Mu_p[0, 0]; 492 | TransformationMat[1, 2] = Mu_p[1, 0]; 493 | OffsetMatrix = Mu_p.Clone(); 494 | } 495 | TransformationMat = CreateTransformationMat(R, t).Multiply(TransformationMat); 496 | P_points2 = R.Multiply(P_points.Stack(Third_raw)); 497 | Px2.SetRow(0, P_points2.Row(0)); 498 | Py2.SetRow(0, P_points2.Row(1)); 499 | //Pz2.SetRow(0, P_points2.Row(2)); 500 | Px2 = Px2 + t[0, 0]; 501 | Py2 = Py2 + t[1, 0]; 502 | //Pz2=Pz2 + t[2, 0]; 503 | P_points.SetRow(0, Px2.Row(0)); 504 | P_points.SetRow(1, Py2.Row(0)); 505 | //P_points.SetRow(2, Pz2.Row(0)); 506 | Matrix pp = P_points.Stack(Third_raw); ///For 3-D clouds, this line should be commentted out and replace the pp with P_points in following lines 507 | ///error calculation 508 | ///hata hesabi 509 | for (int i = 0; i < Np; i++) 510 | { 511 | d = Y.Column(i).Subtract(pp.Column(i)); 512 | err += d[0] * d[0] + d[1] * d[1] + d[2] * d[2];//// 513 | } 514 | } 515 | else 516 | { 517 | P_points2 = R.Multiply(P_points); 518 | Px2.SetRow(0, P_points2.Row(0)); 519 | Py2.SetRow(0, P_points2.Row(1)); 520 | Pz2.SetRow(0, P_points2.Row(2)); 521 | Px2 = Px2 + t[0, 0]; 522 | Py2 = Py2 + t[1, 0]; 523 | Pz2 = Pz2 + t[2, 0]; 524 | P_points.SetRow(0, Px2.Row(0)); 525 | P_points.SetRow(1, Py2.Row(0)); 526 | P_points.SetRow(2, Pz2.Row(0)); 527 | for (int i = 0; i < Np; i++) 528 | { 529 | d = Y.Column(i).Subtract(P_points.Column(i)); 530 | err += d[0] * d[0] + d[1] * d[1] + d[2] * d[2];//// 531 | } 532 | } 533 | err = err / Np; 534 | ///checking the conditions of convergence 535 | ///koşullar kontrol ediliyor. 536 | if (err < threshold || Math.Abs(previous_error - err) < delta_error_thresh) 537 | { 538 | Debug.WriteLine(Localization.iteration + itr); 539 | Debug.WriteLine(Localization.error2 + err); 540 | Debug.WriteLine(Localization.MinError); 541 | break; 542 | } 543 | previous_error = err; 544 | err = 0; 545 | } 546 | if (itr > max_iterations) 547 | Debug.WriteLine(Localization.ForLoop); 548 | 549 | double angle = Math.Atan2(TransformationMat[1, 0], TransformationMat[0, 0]) * 180 / Math.PI; 550 | Debug.WriteLine(Localization.angle2 + angle); 551 | var transformStc = m.Dense(3, 4); 552 | transformStc.SetSubMatrix(0, 0, TransformationMat); 553 | transformStc.SetColumn(3, OffsetMatrix.Column(0)); 554 | return transformStc; 555 | } 556 | 557 | /// 558 | /// Calculates Nearest Neighbour for each points and returns distance and coordinate 559 | /// 560 | /// 561 | /// 562 | /// 563 | internal static Matrix KD_tree(Matrix M_points, Matrix P_points) 564 | { 565 | int Np = P_points.ColumnCount; 566 | 567 | /// this function is used for calculating the Euclidean norm 568 | Func L2Norm = (x, y) => 569 | { 570 | double dist = 0; 571 | for (int i = 0; i < x.Length; i++) 572 | { 573 | dist += (x[i] - y[i]) * (x[i] - y[i]);///squre root is not used to speed up 574 | } 575 | return dist; 576 | }; 577 | ///create tree of M_points 578 | var treeData2 = M_points.ToColumnArrays(); 579 | var treeNodes = treeData2.Select(p => p.ToString()).ToArray(); 580 | var m = Matrix.Build; 581 | Matrix Y = m.Dense(3, Np, 0); 582 | Tuple[] test; 583 | var tree = new KDTree(2, treeData2, treeNodes, L2Norm); 584 | var scan_data = P_points.ToColumnArrays(); 585 | ///Calculate nearest neighbour for every element of cloud 586 | for (int i = 0; i < scan_data.Length; i++) 587 | { 588 | test = tree.NearestNeighbors(scan_data[i], 1); 589 | Y[0, i] = test[0].Item1[0]; 590 | Y[1, i] = test[0].Item1[1]; 591 | } 592 | return Y;///return result matrix 593 | } 594 | 595 | /// 596 | /// Finds the center point of given data cloud and returns a matrix of coordinates. 597 | /// 598 | /// 599 | /// 600 | internal static Matrix FindCentroid(Matrix points) 601 | { 602 | var m = Matrix.Build; 603 | var centroid = m.Dense(3, 1, 0); 604 | var centroid2D = points.RowSums().Multiply(1.0 / points.ColumnCount).ToColumnMatrix(); 605 | centroid.SetSubMatrix(0, 0, centroid2D); 606 | return centroid; 607 | } 608 | /// 609 | /// Finds the center point of given data cloud and returns a matrix of coordinates. 610 | /// 611 | /// 612 | /// 613 | internal static Matrix FindCentroid2(Matrix points) 614 | { 615 | Stopwatch stp = Stopwatch.StartNew(); 616 | var m = Matrix.Build; 617 | int column_count = points.ColumnCount; 618 | Matrix centroid = m.Dense(3, 1, 0); 619 | double TotalX = 0; 620 | double TotalY = 0; 621 | //double TotalZ = 0; 622 | double AvrX = 0; 623 | double AvrY = 0; 624 | double AvrZ = 0; 625 | 626 | for (int i = 0; i < column_count; i++) 627 | { 628 | TotalX += points[0, i]; 629 | TotalY += points[1, i]; 630 | //TotalZ += points[2, i]; 631 | } 632 | AvrX = TotalX / column_count; 633 | AvrY = TotalY / column_count; 634 | //AvrZ = TotalZ / column_count; 635 | 636 | centroid[0, 0] = AvrX; 637 | centroid[1, 0] = AvrY; 638 | centroid[2, 0] = AvrZ; 639 | Debug.WriteLine(Localization.Time2 + stp.Elapsed.TotalMilliseconds.ToString("0.000")); 640 | return centroid; 641 | } 642 | internal static Matrix AddVectorValsToMatrix(Matrix matrix, Matrix vector) 643 | { 644 | var m = Matrix.Build; 645 | var retMatrix = matrix.Clone(); 646 | int columnCount = matrix.ColumnCount; 647 | var Px = m.Dense(1, columnCount); 648 | var Py = m.Dense(1, columnCount); 649 | Px.SetRow(0, matrix.Row(0)); 650 | Py.SetRow(0, matrix.Row(1)); 651 | Px = Px + vector[0, 0]; 652 | Py = Py + vector[1, 0]; 653 | retMatrix.SetRow(0, Px.Row(0)); 654 | retMatrix.SetRow(1, Py.Row(0)); 655 | return retMatrix; 656 | } 657 | 658 | /// 659 | /// Creates 2D transformation matrix out of given Rotation matrix and translation vector 660 | /// 661 | /// Rotation matrix (3x3) 662 | /// translation vector(3x1) 663 | /// 664 | internal static Matrix CreateTransformationMat(Matrix R, Matrix t) 665 | { 666 | Matrix transformationMatrix = R.Clone(); 667 | transformationMatrix.SetColumn(2, t.Column(0)); 668 | transformationMatrix.SetRow(2, new double[] { 0, 0, 1 }); 669 | return transformationMatrix; 670 | } 671 | 672 | /// 673 | /// Rotates given data cloud around origin and translate according to translation values 674 | /// 675 | /// input data cloud 676 | /// angle of rotation (degree) 677 | /// desired translation : translation[0]=x translation[1]=y 678 | /// returns transformed data cloud 679 | internal static Matrix Transform(Matrix points, double angle, double[] translation) 680 | { 681 | var m = Matrix.Build; 682 | double angleIn_rad = angle * Math.PI / 180.0; 683 | 684 | /// Lets create our rotation matrix 685 | Matrix R = m.Dense(2, 2); 686 | R[0, 0] = Math.Cos(angleIn_rad); 687 | R[0, 1] = Math.Sin(angleIn_rad); 688 | R[1, 0] = -Math.Sin(angleIn_rad); 689 | R[1, 1] = Math.Cos(angleIn_rad); 690 | 691 | /// Rotate the object 692 | var referenceObject_rotated = R.Multiply(points); 693 | 694 | /// Lets Create our translation Matrix; 695 | Matrix t = m.Dense(2, 1); 696 | t[0, 0] = translation[0]; 697 | t[1, 0] = translation[1]; 698 | 699 | /// Translate the object 700 | var transformedData = AddVectorValsToMatrix(referenceObject_rotated, t); 701 | return transformedData; 702 | } 703 | 704 | /// 705 | /// Rotates given data cloud around origin and translate according to translation values 706 | /// 707 | /// input data cloud 708 | /// angle of rotation (degree) 709 | /// desired translation : translation[0]=x translation[1]=y 710 | /// point that data cloud will be rotated around : referencePoint[0]=x referencePoint[1]=y 711 | /// returns transformed data cloud 712 | /// 713 | internal static Matrix Transform(Matrix points, double angle, double[] translation, double[] referencePoint) 714 | { 715 | var m = Matrix.Build; 716 | double angleIn_rad = angle * Math.PI / 180.0; 717 | 718 | /// Lets create our rotation matrix 719 | Matrix R = m.Dense(2, 2); 720 | R[0, 0] = Math.Cos(angleIn_rad); 721 | R[0, 1] = Math.Sin(angleIn_rad); 722 | R[1, 0] = -Math.Sin(angleIn_rad); 723 | R[1, 1] = Math.Cos(angleIn_rad); 724 | 725 | Matrix refPointMat = m.Dense(2, 1); 726 | refPointMat[0, 0] = referencePoint[0]; 727 | refPointMat[1, 0] = referencePoint[1]; 728 | 729 | var pointsAtOrig = AddVectorValsToMatrix(points, refPointMat.Multiply(-1)); 730 | /// Rotate the object 731 | var pointsAtOrig_rotated = R.Multiply(pointsAtOrig); 732 | var referenceObject_rotated = AddVectorValsToMatrix(pointsAtOrig_rotated, refPointMat); 733 | 734 | /// Lets Create our translation Matrix; 735 | Matrix t = m.Dense(2, 1); 736 | t[0, 0] = translation[0]; 737 | t[1, 0] = translation[1]; 738 | 739 | /// Translate the object 740 | var transformedData = AddVectorValsToMatrix(referenceObject_rotated, t); 741 | return transformedData; 742 | } 743 | } 744 | } -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Methods/RunProcess.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | 3 | namespace ICP_Algorithm.WFA.Methods 4 | { 5 | internal class RunProcess 6 | { 7 | private static void RunPs(string FileName, string Args = "") 8 | { 9 | Process ps = new Process(); 10 | ps.StartInfo.FileName = FileName; 11 | ps.StartInfo.Arguments = Args; 12 | ps.Start(); 13 | } 14 | 15 | internal static void RunInternetBrowser(string url = "https://github.com/doesluck1026/ICP-algorithm-in-CSharp") 16 | { 17 | RunPs(url); 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Methods/SettingsMethods.cs: -------------------------------------------------------------------------------- 1 | using ICP_Algorithm.WFA.Languages; 2 | using ICP_Algorithm.WFA.Properties; 3 | using System.Globalization; 4 | using System.Windows.Forms; 5 | 6 | namespace ICP_Algorithm.WFA.Methods 7 | { 8 | internal class SettingsMethods 9 | { 10 | public static void SetLanguage(string languageName, string languageCode) 11 | { 12 | Localization.Culture = new CultureInfo(languageCode); 13 | Settings.Default.Language = languageName; 14 | Settings.Default.Save(); 15 | Application.Restart(); 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Methods/V_Shape_ICP.cs: -------------------------------------------------------------------------------- 1 | using MathNet.Numerics.LinearAlgebra; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace ICP_Algorithm.WFA.Methods 6 | { 7 | internal class V_Shape_ICP 8 | { 9 | #region Parametes 10 | 11 | /// 12 | /// Lenght of the each arm in V shape object (Meters) 13 | /// 14 | internal double ArmLength = 50; 15 | 16 | /// 17 | /// Angle beetween arms (degree) 18 | /// 19 | internal double V_Angle = 150; 20 | 21 | /// 22 | /// Resolution of grid (meters) 23 | /// 24 | internal double GridResolution = 0.2; 25 | 26 | /// 27 | /// Angle of V object respect to origin 28 | /// 29 | internal double AngleOfV_Obj = 0; 30 | 31 | /// 32 | /// Position of V object respect to origin 33 | /// 34 | internal double[] PositionOfV_Obj = new double[] { 0, 0 }; 35 | 36 | #endregion 37 | 38 | #region Private Variables 39 | private Matrix ReferenceObject; 40 | 41 | /// will be used to build a matrix 42 | MatrixBuilder Double_M_Builder = Matrix.Build; 43 | #endregion 44 | 45 | /// 46 | /// This function Creates the V-Shape object using parameters above. 47 | /// Created object will initially be in the origin with angle of zero. 48 | /// 49 | internal Matrix CreateRefMatrix() 50 | { 51 | /// equation of a line is defined as y=ax+c 52 | /// this is the equation of the line which to be used to generate object points if x value is smaller than zero. 53 | /// this will be defined as a double array where the first element is "a" parameter and second element is "c" parameter of the line equation above 54 | double[] equation1; 55 | 56 | /// similar to equation1 this is the equation of the line which to be used to generate object points if x value is greater than zero. 57 | /// this will be defined as a double array where the first element is "a" parameter and second element is "c" parameter of the line equation above 58 | double[] equation2; 59 | 60 | double v_AngleInRad = (180 - V_Angle) * Math.PI / 180.0; 61 | 62 | /// Calculate equations 63 | equation1 = new double[] { Math.Tan(v_AngleInRad / 2), 0 }; 64 | equation2 = new double[] { Math.Tan(-v_AngleInRad / 2), 0 }; 65 | 66 | /// Since the arms are symmetrical, we can take one of a parameters and calculate max x value according to arm length 67 | double projectionOfX = ArmLength * Math.Abs(Math.Cos(v_AngleInRad / 2)); 68 | 69 | int numberOfPointsInV_Object = (int)(projectionOfX / GridResolution); 70 | 71 | ///Define reference object which will have 2 time numberOfPointsInV_Object +1. 72 | var referenceObject = Double_M_Builder.Dense(2, numberOfPointsInV_Object * 2 + 1); 73 | 74 | int pointIndex = 0; 75 | /// Calculate Points 76 | for (int i = -numberOfPointsInV_Object; i <= numberOfPointsInV_Object; i++) 77 | { 78 | referenceObject[0, pointIndex] = i * GridResolution; 79 | if (i < 0) 80 | referenceObject[1, pointIndex] = referenceObject[0, pointIndex] * equation1[0] + equation1[1]; 81 | else 82 | referenceObject[1, pointIndex] = referenceObject[0, pointIndex] * equation2[0] + equation2[1]; 83 | pointIndex++; 84 | } 85 | 86 | /// Now We can rotate and translate the object according to parameters 87 | 88 | ReferenceObject = ICP.Transform(referenceObject, AngleOfV_Obj, PositionOfV_Obj); 89 | 90 | //double AngleOfV_Obj_rad = AngleOfV_Obj * Math.PI / 180.0; 91 | 92 | ///// Lets create our rotation matrix 93 | //Matrix R = Double_M_Builder.Dense(2, 2); 94 | //R[0, 0] = Math.Cos(AngleOfV_Obj_rad); 95 | //R[0, 1] = -Math.Sin(AngleOfV_Obj_rad); 96 | //R[1, 0] = Math.Sin(AngleOfV_Obj_rad); 97 | //R[1, 1] = Math.Cos(AngleOfV_Obj_rad); 98 | 99 | ///// Rotate the object 100 | //var referenceObject_rotated = R.Multiply(referenceObject); 101 | 102 | ///// Lets Create our translation Matrix; 103 | //Matrix t = Double_M_Builder.Dense(2, 1); 104 | //t[0, 0] = PositionOfV_Obj[0]; 105 | //t[1, 0] = PositionOfV_Obj[1]; 106 | 107 | //ReferenceObject = referenceObject_rotated.Clone(); 108 | ///// Translate the object 109 | //ReferenceObject.SetRow(0, referenceObject_rotated.Row(0).Add(t[0, 0])); 110 | //ReferenceObject.SetRow(1, referenceObject_rotated.Row(1).Add(t[1, 0])); 111 | 112 | return ReferenceObject.Clone(); 113 | } 114 | 115 | internal List FindVShapePoints(double[] posX, double[] posY) 116 | { 117 | int max_itr = 500; 118 | double threshold = 0.000001; 119 | 120 | var sampleData = WritePointsToMatrix(posX, posY); 121 | //if (ReferenceObject == null) 122 | CreateRefMatrix(); 123 | 124 | var transformationMatrix = ICP.ICP_run(ReferenceObject, sampleData, threshold, max_itr, false); 125 | 126 | var R = transformationMatrix.SubMatrix(0, 2, 0, 2); 127 | var t = transformationMatrix.SubMatrix(0, 2, 2, 1); 128 | var offset = transformationMatrix.SubMatrix(0, 2, 3, 1); 129 | 130 | /// corner points coordinates will be stored in this variable. each row is a point in order of left corner, middle corner and right corner 131 | List cornerPoints = new List(); 132 | 133 | /// Calculate inverse of rotation matrix which equals to transpose of it. 134 | var r_inv = R.Transpose(); 135 | 136 | var transformedP_orig = ICP.AddVectorValsToMatrix(ReferenceObject, t.Multiply(-1)); 137 | var transformedP = ICP.AddVectorValsToMatrix(r_inv.Multiply(transformedP_orig), offset.Multiply(1)); 138 | 139 | var leftCorner = transformedP.Column(0).ToArray(); 140 | cornerPoints.Add(leftCorner); 141 | 142 | var middleCorner = transformedP.Column(transformedP.ColumnCount / 2).ToArray(); 143 | cornerPoints.Add(middleCorner); 144 | 145 | var rightCorner = transformedP.Column(transformedP.ColumnCount - 1).ToArray(); 146 | cornerPoints.Add(rightCorner); 147 | 148 | return cornerPoints; 149 | } 150 | 151 | internal Matrix FindVShapePoints(Matrix sampleData) 152 | { 153 | int max_itr = 500; 154 | double threshold = 0.0000000001; 155 | 156 | //if (ReferenceObject == null) 157 | CreateRefMatrix(); 158 | 159 | var transformationMatrix = ICP.ICP_run(ReferenceObject, sampleData, threshold, max_itr, false); 160 | 161 | var R = transformationMatrix.SubMatrix(0, 2, 0, 2); 162 | var t = transformationMatrix.SubMatrix(0, 2, 2, 1); 163 | var offset = transformationMatrix.SubMatrix(0, 2, 3, 1); 164 | 165 | /// corner points coordinates will be stored in this variable. each row is a point in order of left corner, middle corner and right corner 166 | List cornerPoints = new List(); 167 | 168 | /// Calculate inverse of rotation matrix which equals to transpose of it. 169 | var r_inv = R.Transpose(); 170 | 171 | var transformedP_orig = ICP.AddVectorValsToMatrix(ReferenceObject, t.Multiply(-1)); 172 | var transformedP = ICP.AddVectorValsToMatrix(r_inv.Multiply(transformedP_orig), offset.Multiply(1)); 173 | 174 | var leftCorner = transformedP.Column(0).ToArray(); 175 | cornerPoints.Add(leftCorner); 176 | 177 | var middleCorner = transformedP.Column(transformedP.ColumnCount / 2).ToArray(); 178 | cornerPoints.Add(middleCorner); 179 | 180 | var rightCorner = transformedP.Column(transformedP.ColumnCount - 1).ToArray(); 181 | cornerPoints.Add(rightCorner); 182 | 183 | return transformedP; 184 | } 185 | 186 | internal static Matrix WritePointsToMatrix(double[] posX, double[] posY) 187 | { 188 | int pointCount = posX.Length; 189 | var m = Matrix.Build; 190 | var mat = m.Dense(2, pointCount); 191 | mat.SetRow(0, posX); 192 | mat.SetRow(1, posY); 193 | return mat; 194 | } 195 | } 196 | } -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Methods/Websites.cs: -------------------------------------------------------------------------------- 1 | namespace ICP_Algorithm.WFA.Methods 2 | { 3 | internal class Websites 4 | { 5 | internal static void OpenGithubProfile() 6 | { 7 | RunProcess.RunInternetBrowser("https://github.com/doesluck1026"); 8 | } 9 | 10 | internal static void OpenGithubProject() 11 | { 12 | RunProcess.RunInternetBrowser("https://github.com/doesluck1026/ICP-algorithm-in-CSharp"); 13 | } 14 | 15 | internal static void OpenGithubIssues() 16 | { 17 | RunProcess.RunInternetBrowser("https://github.com/doesluck1026/ICP-algorithm-in-CSharp/issues"); 18 | } 19 | 20 | internal static void OpenATutorialOnRigidRegistration() 21 | { 22 | RunProcess.RunInternetBrowser("http://www.sci.utah.edu/~shireen/pdfs/tutorials/Elhabian_ICP09.pdf"); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Program.cs: -------------------------------------------------------------------------------- 1 | using ICP_Algorithm.WFA.Properties; 2 | using System; 3 | using System.Globalization; 4 | using System.Threading; 5 | using System.Windows.Forms; 6 | 7 | namespace ICP_Algorithm.WFA 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | GetLanguages(); 18 | ShowMainForm(); 19 | } 20 | 21 | static private void GetLanguages() 22 | { 23 | if (Settings.Default.Language == Languages.Languages.TurkishTR) 24 | { 25 | Thread.CurrentThread.CurrentUICulture = new CultureInfo(Languages.Languages.TurkishCodeTR); 26 | } 27 | else if (Settings.Default.Language == Languages.Languages.EnglishUS) 28 | { 29 | Thread.CurrentThread.CurrentUICulture = new CultureInfo(Languages.Languages.EnglishCodeUS); 30 | } 31 | else if (Settings.Default.Language == Languages.Languages.EnglishUK) 32 | { 33 | Thread.CurrentThread.CurrentUICulture = new CultureInfo(""); 34 | } 35 | else 36 | { 37 | Thread.CurrentThread.CurrentUICulture = new CultureInfo(""); 38 | } 39 | } 40 | 41 | static private void ShowMainForm() 42 | { 43 | Application.EnableVisualStyles(); 44 | Application.SetCompatibleTextRenderingDefault(false); 45 | Application.Run(new MainForm()); 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ICP Algorithm In C#")] 9 | [assembly: AssemblyDescription("ICP Algorithm In C#")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Yahya Sevikoğlu (doesluck1026)")] 12 | [assembly: AssemblyProduct("ICP Algorithm In C#")] 13 | [assembly: AssemblyCopyright("Yahya Sevikoğlu (doesluck1026) © 2019-2023")] 14 | [assembly: AssemblyTrademark("Yahya Sevikoğlu (doesluck1026)")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("356a1138-4cc1-49aa-bebe-fed3f13db684")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Bu kod araç tarafından oluşturuldu. 4 | // Çalışma Zamanı Sürümü:4.0.30319.42000 5 | // 6 | // Bu dosyada yapılacak değişiklikler yanlış davranışa neden olabilir ve 7 | // kod yeniden oluşturulursa kaybolur. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ICP_Algorithm.WFA.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// Yerelleştirilmiş dizeleri aramak gibi işlemler için, türü kesin olarak belirtilmiş kaynak sınıfı. 17 | /// 18 | // Bu sınıf ResGen veya Visual Studio gibi bir araç kullanılarak StronglyTypedResourceBuilder 19 | // sınıfı tarafından otomatik olarak oluşturuldu. 20 | // Üye eklemek veya kaldırmak için .ResX dosyanızı düzenleyin ve sonra da ResGen 21 | // komutunu /str seçeneğiyle yeniden çalıştırın veya VS projenizi yeniden oluşturun. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Bu sınıf tarafından kullanılan, önbelleğe alınmış ResourceManager örneğini döndürür. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ICP_Algorithm.WFA.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Tümü için geçerli iş parçacığının CurrentUICulture özelliğini geçersiz kular 51 | /// CurrentUICulture özelliğini tüm kaynak aramaları için geçersiz kılar. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // Bu kod araç tarafından oluşturuldu. 4 | // Çalışma Zamanı Sürümü:4.0.30319.42000 5 | // 6 | // Bu dosyada yapılacak değişiklikler yanlış davranışa neden olabilir ve 7 | // kod yeniden oluşturulursa kaybolur. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ICP_Algorithm.WFA.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | 26 | [global::System.Configuration.UserScopedSettingAttribute()] 27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 | [global::System.Configuration.DefaultSettingValueAttribute("Türkçe (Türkiye)")] 29 | public string Language { 30 | get { 31 | return ((string)(this["Language"])); 32 | } 33 | set { 34 | this["Language"] = value; 35 | } 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Türkçe (Türkiye) 7 | 8 | 9 | -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm.WFA/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ICP_Algorithm_In_CS/ICP_Algorithm_In_CS.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.33801.447 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICP_Algorithm.WFA", "ICP_Algorithm.WFA\ICP_Algorithm.WFA.csproj", "{356A1138-4CC1-49AA-BEBE-FED3F13DB684}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B54DC09B-10A7-48F9-99F0-250B58995F2D}" 9 | ProjectSection(SolutionItems) = preProject 10 | ..\.gitattributes = ..\.gitattributes 11 | ..\.gitignore = ..\.gitignore 12 | ..\README.md = ..\README.md 13 | EndProjectSection 14 | EndProject 15 | Global 16 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 17 | Debug|Any CPU = Debug|Any CPU 18 | Release|Any CPU = Release|Any CPU 19 | EndGlobalSection 20 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 21 | {356A1138-4CC1-49AA-BEBE-FED3F13DB684}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 22 | {356A1138-4CC1-49AA-BEBE-FED3F13DB684}.Debug|Any CPU.Build.0 = Debug|Any CPU 23 | {356A1138-4CC1-49AA-BEBE-FED3F13DB684}.Release|Any CPU.ActiveCfg = Release|Any CPU 24 | {356A1138-4CC1-49AA-BEBE-FED3F13DB684}.Release|Any CPU.Build.0 = Release|Any CPU 25 | EndGlobalSection 26 | GlobalSection(SolutionProperties) = preSolution 27 | HideSolutionNode = FALSE 28 | EndGlobalSection 29 | GlobalSection(ExtensibilityGlobals) = postSolution 30 | SolutionGuid = {19716BE5-987F-4F62-B545-7462A133C3CE} 31 | EndGlobalSection 32 | EndGlobal 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ICP algorithm in CSharp 2 | Fast Iterative Closest Point algorithm implementation in C# 3 | 4 | This project is based on Rigid Registration Iterative Closest Point Tutorial which can be found 5 | in http://www.sci.utah.edu/~shireen/pdfs/tutorials/Elhabian_ICP09.pdf 6 | This also uses Supercluster KD-Tree algorithm by Eric Regina (https://github.com/eric-regina). 7 | 8 | Examples are also included in project. 9 | --------------------------------------------------------------------------------