資源簡(jiǎn)介
基于徑向灰度算法的表盤指針識(shí)別程序,程序?qū)⒉僮鞣譃榱巳齻€(gè)部分加強(qiáng)理解,第一部分獲得識(shí)別區(qū)域,第二部分計(jì)算圖像二值化,第三部分基于算法獲得指針角度

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Drawing.Imaging;
using?System.Linq;
using?System.Runtime.InteropServices;
using?System.Text;
using?System.Windows.Forms;
namespace?表盤指針識(shí)別
{
????public?partial?class?FormMain?:?Form
????{
????????private?IStep?step1?=?new?step1();
????????private?IStep?step2?=?new?step2();
????????private?IStep?step3?=?new?step3();
????????public?FormMain()
????????{
????????????InitializeComponent();
????????????step1.ButtonOK?+=?Step1_ButtonOK;
????????????step2.ButtonOK?+=?Step2_ButtonOK;
????????????step3.ButtonOK?+=?Step3_ButtonOK;
????????}
????????Bitmap?colorImg;
????????private?void?Step1_ButtonOK(object?sender?EventArgs?e)
????????{
????????????InitStep(step2?step1.Result?null);
????????????colorImg?=?step1.Result.Clone()?as?Bitmap;
????????}
????????private?void?Step2_ButtonOK(object?sender?EventArgs?e)
????????{
????????????InitStep(step3?step2.Result?colorImg);
????????}
????????private?void?Step3_ButtonOK(object?sender?EventArgs?e)
????????{
????????????this.Close();
????????}
????????private?void?InitStep(object?userControl?Bitmap?sourceImg?Bitmap?colorImg)
????????{
????????????(userControl?as?IStep).SourceImg?=?sourceImg;
????????????(userControl?as?IStep).ColorImg?=?colorImg;
????????????this.Controls.Clear();
????????????this.Controls.Add(userControl?as?UserControl);
????????????(userControl?as?UserControl).Show();
????????}
????????private?void?FormMain_Shown(object?sender?EventArgs?e)
????????{
????????????OpenFileDialog?dialog?=?new?OpenFileDialog();
????????????dialog.Filter?=?“圖像文件|*.jpg;*.png;*.bmp“;
????????????if?(dialog.ShowDialog()?==?DialogResult.OK)
????????????{
????????????????InitStep(step1?Image.FromFile(dialog.FileName)?as?Bitmap?null);
????????????}
????????}
????}
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
????..A..H.?????75776??2020-09-28?15:55??表盤指針識(shí)別\.vs\表盤指針識(shí)別\v16\.suo
?????文件??????????0??2019-07-15?15:38??表盤指針識(shí)別\.vs\表盤指針識(shí)別\v16\Server\sqlite3\db.lock
?????文件?????577536??2019-07-16?14:41??表盤指針識(shí)別\.vs\表盤指針識(shí)別\v16\Server\sqlite3\storage.ide
?????文件?????106011??2020-09-28?15:39??表盤指針識(shí)別\儀表1.jpg
?????文件??????90518??2020-09-28?15:51??表盤指針識(shí)別\儀表2.png
?????文件?????234746??2020-09-28?15:51??表盤指針識(shí)別\儀表3.png
?????文件??????24064??2020-09-28?15:55??表盤指針識(shí)別\表盤指針識(shí)別\bin\Debug\表盤指針識(shí)別.exe
?????文件??????75264??2020-09-28?15:55??表盤指針識(shí)別\表盤指針識(shí)別\bin\Debug\表盤指針識(shí)別.pdb
?????文件???????1954??2020-09-28?15:55??表盤指針識(shí)別\表盤指針識(shí)別\FormMain.cs
?????文件???????1591??2019-07-15?15:38??表盤指針識(shí)別\表盤指針識(shí)別\FormMain.Designer.cs
?????文件???????5817??2019-07-15?11:24??表盤指針識(shí)別\表盤指針識(shí)別\FormMain.resx
?????文件????????350??2020-09-28?15:54??表盤指針識(shí)別\表盤指針識(shí)別\IStep.cs
?????文件????????208??2020-09-28?15:32??表盤指針識(shí)別\表盤指針識(shí)別\obj\Debug\.NETfr
?????文件???????1423??2019-07-15?15:55??表盤指針識(shí)別\表盤指針識(shí)別\obj\Debug\DesignTimeResolveAssemblyReferences.cache
?????文件???????6978??2019-07-15?15:38??表盤指針識(shí)別\表盤指針識(shí)別\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件?????????42??2020-09-28?15:55??表盤指針識(shí)別\表盤指針識(shí)別\obj\Debug\表盤指針識(shí)別.csproj.CoreCompileInputs.cache
?????文件???????1407??2020-09-28?15:55??表盤指針識(shí)別\表盤指針識(shí)別\obj\Debug\表盤指針識(shí)別.csproj.FileListAbsolute.txt
?????文件???????1189??2020-09-28?15:55??表盤指針識(shí)別\表盤指針識(shí)別\obj\Debug\表盤指針識(shí)別.csproj.GenerateResource.cache
?????文件??????24064??2020-09-28?15:55??表盤指針識(shí)別\表盤指針識(shí)別\obj\Debug\表盤指針識(shí)別.exe
?????文件????????180??2020-09-28?15:55??表盤指針識(shí)別\表盤指針識(shí)別\obj\Debug\表盤指針識(shí)別.FormMain.resources
?????文件??????75264??2020-09-28?15:55??表盤指針識(shí)別\表盤指針識(shí)別\obj\Debug\表盤指針識(shí)別.pdb
?????文件????????180??2020-09-28?15:55??表盤指針識(shí)別\表盤指針識(shí)別\obj\Debug\表盤指針識(shí)別.Properties.Resources.resources
?????文件????????693??2020-09-28?15:55??表盤指針識(shí)別\表盤指針識(shí)別\obj\Debug\表盤指針識(shí)別.step1.resources
?????文件????????180??2020-09-28?15:55??表盤指針識(shí)別\表盤指針識(shí)別\obj\Debug\表盤指針識(shí)別.step2.resources
?????文件????????180??2020-09-28?15:55??表盤指針識(shí)別\表盤指針識(shí)別\obj\Debug\表盤指針識(shí)別.step3.resources
?????文件????????502??2019-07-15?15:39??表盤指針識(shí)別\表盤指針識(shí)別\Program.cs
?????文件???????1346??2019-07-15?15:38??表盤指針識(shí)別\表盤指針識(shí)別\Properties\AssemblyInfo.cs
?????文件???????2849??2019-07-15?15:38??表盤指針識(shí)別\表盤指針識(shí)別\Properties\Resources.Designer.cs
?????文件???????5612??2019-07-15?15:38??表盤指針識(shí)別\表盤指針識(shí)別\Properties\Resources.resx
?????文件???????1105??2019-07-15?15:38??表盤指針識(shí)別\表盤指針識(shí)別\Properties\Settings.Designer.cs
............此處省略31個(gè)文件信息
評(píng)論
共有 條評(píng)論