├── .gitattributes ├── .gitignore ├── Image Processing.sln ├── Image Processing ├── BarCodeClass.cs ├── DocementBase.cs ├── FormBaiYeChuang.Designer.cs ├── FormBaiYeChuang.cs ├── FormBaiYeChuang.resx ├── FormBaoHeDu.Designer.cs ├── FormBaoHeDu.cs ├── FormBaoHeDu.resx ├── FormBinary.Designer.cs ├── FormBinary.cs ├── FormBinary.resx ├── FormColorPingHeng.Designer.cs ├── FormColorPingHeng.cs ├── FormColorPingHeng.resx ├── FormDuiBidu.Designer.cs ├── FormDuiBidu.cs ├── FormDuiBidu.resx ├── FormEdgeStrengthen.Designer.cs ├── FormEdgeStrengthen.cs ├── FormEdgeStrengthen.resx ├── FormLiangDu.Designer.cs ├── FormLiangDu.cs ├── FormLiangDu.resx ├── FormMain.Designer.cs ├── FormMain.cs ├── FormMain.resx ├── FormPingYi.Designer.cs ├── FormPingYi.cs ├── FormPingYi.resx ├── FormQRCode.Designer.cs ├── FormQRCode.cs ├── FormQRCode.resx ├── FormTouMing.Designer.cs ├── FormTouMing.cs ├── FormTouMing.resx ├── Formtxt convert picture.Designer.cs ├── Formtxt convert picture.cs ├── Formtxt convert picture.resx ├── Image Processing.csproj ├── LicensePlateDetector.cs ├── LicensePlateRecognitionForm.Designer.cs ├── LicensePlateRecognitionForm.cs ├── LicensePlateRecognitionForm.resx ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── VideoSurveilance.Designer.cs ├── VideoSurveilance.cs ├── VideoSurveilance.resx ├── app.config ├── image thermal recognition.Designer.cs ├── image thermal recognition.cs ├── image thermal recognition.resx ├── imageDocument.cs ├── license-plate.jpg ├── showPic │ ├── show.gif │ └── somepic └── zxing.dll ├── README.md └── 可用的图片 ├── Fingerprint副本.jpg ├── Thumbs.db ├── autumn-2668275_1280.jpg ├── g11.jpg ├── moment-2662129_1280.jpg ├── pexels-photo-296878.jpeg ├── smilies-bank-sit-rest-160731.jpeg ├── 佛罗伦斯河....jpg ├── 冬日的荷兰乡野....jpg ├── 奥地利美景.jpg ├── 摩羯座:广州   工作,工作,还是工作。脑子里只有工作的摩羯最满意工作多的地方。广州——这个全国经济开放城市,被摩羯们投以最高的分数....jpg ├── 欧洲校园美景....jpg ├── 法布雷加斯.jpg ├── 车.jpg └── 车牌 ├── u=1263487137,2658072955&fm=27&gp=0.jpg ├── u=1897915341,1439803632&fm=72.jpg ├── u=2729400195,998583734&fm=27&gp=0.jpg ├── u=2943906663,2016246813&fm=27&gp=0.jpg ├── u=496321382,2406997530&fm=27&gp=0.jpg ├── 下222载.jpg └── 下载.jpg /.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 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | project.fragment.lock.json 46 | artifacts/ 47 | 48 | *_i.c 49 | *_p.c 50 | *_i.h 51 | *.ilk 52 | *.meta 53 | *.obj 54 | *.pch 55 | *.pdb 56 | *.pgc 57 | *.pgd 58 | *.rsp 59 | *.sbr 60 | *.tlb 61 | *.tli 62 | *.tlh 63 | *.tmp 64 | *.tmp_proj 65 | *.log 66 | *.vspscc 67 | *.vssscc 68 | .builds 69 | *.pidb 70 | *.svclog 71 | *.scc 72 | 73 | # Chutzpah Test files 74 | _Chutzpah* 75 | 76 | # Visual C++ cache files 77 | ipch/ 78 | *.aps 79 | *.ncb 80 | *.opendb 81 | *.opensdf 82 | *.sdf 83 | *.cachefile 84 | *.VC.db 85 | *.VC.VC.opendb 86 | 87 | # Visual Studio profiler 88 | *.psess 89 | *.vsp 90 | *.vspx 91 | *.sap 92 | 93 | # TFS 2012 Local Workspace 94 | $tf/ 95 | 96 | # Guidance Automation Toolkit 97 | *.gpState 98 | 99 | # ReSharper is a .NET coding add-in 100 | _ReSharper*/ 101 | *.[Rr]e[Ss]harper 102 | *.DotSettings.user 103 | 104 | # JustCode is a .NET coding add-in 105 | .JustCode 106 | 107 | # TeamCity is a build add-in 108 | _TeamCity* 109 | 110 | # DotCover is a Code Coverage Tool 111 | *.dotCover 112 | 113 | # NCrunch 114 | _NCrunch_* 115 | .*crunch*.local.xml 116 | nCrunchTemp_* 117 | 118 | # MightyMoose 119 | *.mm.* 120 | AutoTest.Net/ 121 | 122 | # Web workbench (sass) 123 | .sass-cache/ 124 | 125 | # Installshield output folder 126 | [Ee]xpress/ 127 | 128 | # DocProject is a documentation generator add-in 129 | DocProject/buildhelp/ 130 | DocProject/Help/*.HxT 131 | DocProject/Help/*.HxC 132 | DocProject/Help/*.hhc 133 | DocProject/Help/*.hhk 134 | DocProject/Help/*.hhp 135 | DocProject/Help/Html2 136 | DocProject/Help/html 137 | 138 | # Click-Once directory 139 | publish/ 140 | 141 | # Publish Web Output 142 | *.[Pp]ublish.xml 143 | *.azurePubxml 144 | # TODO: Comment the next line if you want to checkin your web deploy settings 145 | # but database connection strings (with potential passwords) will be unencrypted 146 | #*.pubxml 147 | *.publishproj 148 | 149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 150 | # checkin your Azure Web App publish settings, but sensitive information contained 151 | # in these scripts will be unencrypted 152 | PublishScripts/ 153 | 154 | # NuGet Packages 155 | *.nupkg 156 | # The packages folder can be ignored because of Package Restore 157 | **/packages/* 158 | # except build/, which is used as an MSBuild target. 159 | !**/packages/build/ 160 | # Uncomment if necessary however generally it will be regenerated when needed 161 | #!**/packages/repositories.config 162 | # NuGet v3's project.json files produces more ignoreable files 163 | *.nuget.props 164 | *.nuget.targets 165 | 166 | # Microsoft Azure Build Output 167 | csx/ 168 | *.build.csdef 169 | 170 | # Microsoft Azure Emulator 171 | ecf/ 172 | rcf/ 173 | 174 | # Windows Store app package directories and files 175 | AppPackages/ 176 | BundleArtifacts/ 177 | Package.StoreAssociation.xml 178 | _pkginfo.txt 179 | 180 | # Visual Studio cache files 181 | # files ending in .cache can be ignored 182 | *.[Cc]ache 183 | # but keep track of directories ending in .cache 184 | !*.[Cc]ache/ 185 | 186 | # Others 187 | ClientBin/ 188 | ~$* 189 | *~ 190 | *.dbmdl 191 | *.dbproj.schemaview 192 | *.jfm 193 | *.pfx 194 | *.publishsettings 195 | node_modules/ 196 | orleans.codegen.cs 197 | 198 | # Since there are multiple workflows, uncomment next line to ignore bower_components 199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 200 | #bower_components/ 201 | 202 | # RIA/Silverlight projects 203 | Generated_Code/ 204 | 205 | # Backup & report files from converting an old project file 206 | # to a newer Visual Studio version. Backup files are not needed, 207 | # because we have git ;-) 208 | _UpgradeReport_Files/ 209 | Backup*/ 210 | UpgradeLog*.XML 211 | UpgradeLog*.htm 212 | 213 | # SQL Server files 214 | *.mdf 215 | *.ldf 216 | 217 | # Business Intelligence projects 218 | *.rdl.data 219 | *.bim.layout 220 | *.bim_*.settings 221 | 222 | # Microsoft Fakes 223 | FakesAssemblies/ 224 | 225 | # GhostDoc plugin setting file 226 | *.GhostDoc.xml 227 | 228 | # Node.js Tools for Visual Studio 229 | .ntvs_analysis.dat 230 | 231 | # Visual Studio 6 build log 232 | *.plg 233 | 234 | # Visual Studio 6 workspace options file 235 | *.opt 236 | 237 | # Visual Studio LightSwitch build output 238 | **/*.HTMLClient/GeneratedArtifacts 239 | **/*.DesktopClient/GeneratedArtifacts 240 | **/*.DesktopClient/ModelManifest.xml 241 | **/*.Server/GeneratedArtifacts 242 | **/*.Server/ModelManifest.xml 243 | _Pvt_Extensions 244 | 245 | # Paket dependency manager 246 | .paket/paket.exe 247 | paket-files/ 248 | 249 | # FAKE - F# Make 250 | .fake/ 251 | 252 | # JetBrains Rider 253 | .idea/ 254 | *.sln.iml 255 | 256 | # CodeRush 257 | .cr/ 258 | 259 | # Python Tools for Visual Studio (PTVS) 260 | __pycache__/ 261 | *.pyc -------------------------------------------------------------------------------- /Image Processing.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26730.12 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Image Processing", "Image Processing\Image Processing.csproj", "{16674241-3E8C-4C57-A4C3-EA158DF91FEA}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {16674241-3E8C-4C57-A4C3-EA158DF91FEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {16674241-3E8C-4C57-A4C3-EA158DF91FEA}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {16674241-3E8C-4C57-A4C3-EA158DF91FEA}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {16674241-3E8C-4C57-A4C3-EA158DF91FEA}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {4DE9F540-BA03-4E4B-ACA4-59D39589A2BF} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Image Processing/BarCodeClass.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using ZXing.Common; 6 | using ZXing; 7 | using System.Windows.Forms; 8 | using System.Drawing; 9 | using System.Text.RegularExpressions; 10 | using ZXing.QrCode; 11 | namespace Image_Processing 12 | { 13 | class BarCodeClass 14 | { 15 | 16 | /// 17 | 18 | ///生成条形码 19 | 20 | /// 21 | 22 | /// 23 | 24 | /// 25 | 26 | public void CreateBarCode(PictureBox pictureBox1, string Contents) 27 | 28 | { 29 | 30 | Regex rg = new Regex("^[0-9]{12}$"); 31 | 32 | if (!rg.IsMatch(Contents)) 33 | 34 | { 35 | 36 | MessageBox.Show("本例子采用EAN_13编码,需要输入12位数字"); 37 | 38 | return; 39 | 40 | } 41 | 42 | 43 | 44 | EncodingOptions options = null; 45 | 46 | BarcodeWriter writer = null; 47 | 48 | options = new EncodingOptions 49 | 50 | { 51 | 52 | Width = pictureBox1.Width, 53 | 54 | Height = pictureBox1.Height 55 | 56 | }; 57 | 58 | writer = new BarcodeWriter(); 59 | 60 | writer.Format = BarcodeFormat.ITF; 61 | 62 | writer.Options = options; 63 | 64 | 65 | 66 | Bitmap bitmap = writer.Write(Contents); 67 | 68 | pictureBox1.Image = bitmap; 69 | 70 | } 71 | 72 | 73 | 74 | /// 75 | 76 | ///生成二维码 77 | 78 | /// 79 | 80 | /// 81 | 82 | /// 83 | 84 | public void CreateQuickMark(PictureBox pictureBox1, string Contents) 85 | 86 | { 87 | 88 | if (Contents == string.Empty) 89 | 90 | { 91 | 92 | MessageBox.Show("输入内容不能为空!"); 93 | 94 | return; 95 | 96 | } 97 | 98 | 99 | 100 | EncodingOptions options = null; 101 | 102 | BarcodeWriter writer = null; 103 | 104 | 105 | 106 | options = new QrCodeEncodingOptions 107 | 108 | { 109 | 110 | DisableECI = true, 111 | 112 | CharacterSet = "UTF-8", 113 | 114 | Width = pictureBox1.Width, 115 | 116 | Height = pictureBox1.Height 117 | 118 | }; 119 | 120 | writer = new BarcodeWriter(); 121 | 122 | writer.Format = BarcodeFormat.QR_CODE; 123 | 124 | writer.Options = options; 125 | 126 | 127 | 128 | 129 | 130 | Bitmap bitmap = writer.Write(Contents); 131 | 132 | pictureBox1.Image = bitmap; 133 | 134 | } 135 | 136 | 137 | 138 | /// 139 | 140 | ///解码 141 | 142 | /// 143 | 144 | /// 145 | 146 | public void Decode(PictureBox pictureBox1) 147 | 148 | { 149 | 150 | BarcodeReader reader = new BarcodeReader(); 151 | 152 | Result result = reader.Decode((Bitmap)pictureBox1.Image); 153 | 154 | } 155 | 156 | } 157 | } 158 | -------------------------------------------------------------------------------- /Image Processing/DocementBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Drawing.Printing; 6 | using System.Drawing; 7 | using System.Windows.Forms; 8 | 9 | namespace Image_Processing 10 | { 11 | class DocementBase : PrintDocument 12 | { 13 | 14 | 15 | //fields 16 | 17 | public Font Font = new Font("Verdana", 10, GraphicsUnit.Point); 18 | 19 | 20 | 21 | //预览打印 22 | 23 | public DialogResult showPrintPreviewDialog() 24 | 25 | { 26 | 27 | PrintPreviewDialog dialog = new PrintPreviewDialog(); 28 | 29 | dialog.Document = this; 30 | 31 | 32 | 33 | return dialog.ShowDialog(); 34 | 35 | } 36 | 37 | 38 | 39 | //先设置后打印 40 | 41 | public DialogResult ShowPageSettingsDialog() 42 | 43 | { 44 | 45 | PageSetupDialog dialog = new PageSetupDialog(); 46 | 47 | dialog.Document = this; 48 | 49 | 50 | 51 | return dialog.ShowDialog(); 52 | 53 | } 54 | 55 | /* public static implicit operator PrintDocument(DocementBase v) 56 | { 57 | throw new NotImplementedException(); 58 | }*/ 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /Image Processing/FormBaiYeChuang.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Image_Processing 2 | { 3 | partial class FormBaiYeChuang 4 | { 5 | /// 6 | /// 必需的设计器变量。 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// 清理所有正在使用的资源。 12 | /// 13 | /// 如果应释放托管资源,为 true;否则为 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 窗体设计器生成的代码 24 | 25 | /// 26 | /// 设计器支持所需的方法 - 不要 27 | /// 使用代码编辑器修改此方法的内容。 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormBaiYeChuang)); 32 | this.groupBox1 = new System.Windows.Forms.GroupBox(); 33 | this.textBaiYiChuang = new System.Windows.Forms.TextBox(); 34 | this.labelChuiZhiBYC = new System.Windows.Forms.Label(); 35 | this.butPingYi = new System.Windows.Forms.Button(); 36 | this.groupBox2 = new System.Windows.Forms.GroupBox(); 37 | this.groupBox1.SuspendLayout(); 38 | this.groupBox2.SuspendLayout(); 39 | this.SuspendLayout(); 40 | // 41 | // groupBox1 42 | // 43 | this.groupBox1.Controls.Add(this.textBaiYiChuang); 44 | this.groupBox1.Controls.Add(this.labelChuiZhiBYC); 45 | this.groupBox1.Location = new System.Drawing.Point(12, 12); 46 | this.groupBox1.Name = "groupBox1"; 47 | this.groupBox1.Size = new System.Drawing.Size(252, 90); 48 | this.groupBox1.TabIndex = 1; 49 | this.groupBox1.TabStop = false; 50 | // 51 | // textBaiYiChuang 52 | // 53 | this.textBaiYiChuang.Location = new System.Drawing.Point(76, 54); 54 | this.textBaiYiChuang.Name = "textBaiYiChuang"; 55 | this.textBaiYiChuang.Size = new System.Drawing.Size(99, 21); 56 | this.textBaiYiChuang.TabIndex = 2; 57 | // 58 | // labelChuiZhiBYC 59 | // 60 | this.labelChuiZhiBYC.AutoSize = true; 61 | this.labelChuiZhiBYC.Location = new System.Drawing.Point(74, 25); 62 | this.labelChuiZhiBYC.Name = "labelChuiZhiBYC"; 63 | this.labelChuiZhiBYC.Size = new System.Drawing.Size(101, 12); 64 | this.labelChuiZhiBYC.TabIndex = 1; 65 | this.labelChuiZhiBYC.Text = "请输入百叶窗数目"; 66 | // 67 | // butPingYi 68 | // 69 | this.butPingYi.Location = new System.Drawing.Point(76, 20); 70 | this.butPingYi.Name = "butPingYi"; 71 | this.butPingYi.Size = new System.Drawing.Size(99, 28); 72 | this.butPingYi.TabIndex = 0; 73 | this.butPingYi.Text = "确定"; 74 | this.butPingYi.UseVisualStyleBackColor = true; 75 | this.butPingYi.Click += new System.EventHandler(this.butPingYi_Click); 76 | // 77 | // groupBox2 78 | // 79 | this.groupBox2.Controls.Add(this.butPingYi); 80 | this.groupBox2.Location = new System.Drawing.Point(12, 108); 81 | this.groupBox2.Name = "groupBox2"; 82 | this.groupBox2.Size = new System.Drawing.Size(252, 65); 83 | this.groupBox2.TabIndex = 2; 84 | this.groupBox2.TabStop = false; 85 | // 86 | // FormBaiYeChuang 87 | // 88 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 89 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 90 | this.BackColor = System.Drawing.Color.LavenderBlush; 91 | this.ClientSize = new System.Drawing.Size(277, 188); 92 | this.Controls.Add(this.groupBox2); 93 | this.Controls.Add(this.groupBox1); 94 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 95 | this.Name = "FormBaiYeChuang"; 96 | this.Text = "百叶窗"; 97 | this.groupBox1.ResumeLayout(false); 98 | this.groupBox1.PerformLayout(); 99 | this.groupBox2.ResumeLayout(false); 100 | this.ResumeLayout(false); 101 | 102 | } 103 | 104 | #endregion 105 | 106 | private System.Windows.Forms.GroupBox groupBox1; 107 | private System.Windows.Forms.TextBox textBaiYiChuang; 108 | private System.Windows.Forms.Label labelChuiZhiBYC; 109 | private System.Windows.Forms.Button butPingYi; 110 | private System.Windows.Forms.GroupBox groupBox2; 111 | } 112 | } -------------------------------------------------------------------------------- /Image Processing/FormBaiYeChuang.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Text; 7 | using System.Windows.Forms; 8 | 9 | namespace Image_Processing 10 | { 11 | public partial class FormBaiYeChuang : Form 12 | { 13 | public int baiyechuang; 14 | public FormBaiYeChuang() 15 | { 16 | InitializeComponent(); 17 | } 18 | 19 | private void butPingYi_Click(object sender, EventArgs e) 20 | { 21 | baiyechuang = int.Parse(textBaiYiChuang.Text); 22 | this.Close(); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /Image Processing/FormBaiYeChuang.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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | 123 | AAABAAEAEBAAAAEACABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAAAAAAEAAAAA 124 | AAAAAAAA////AAAAgAAAgAAAAICAAIAAAACAAIAAgIAAAMDAwACAgIAAAAD/AAD/AAAA//8A/wAAAP8A 125 | /wD//wAABgYGABISEgAfHx8ALCwsADk5OQBFRUUAUlJSAF9fXwBsbGwAeHh4AIWFhQCSkpIAn5+fAKur 126 | qwC4uLgAxcXFANLS0gDe3t4A6+vrAPj4+ADw+/8ApKCgAMDcwADwyqYAAAA+AAAAXQAAAHwAAACbAAAA 127 | ugAAANkAAADwACQk/wBISP8AbGz/AJCQ/wC0tP8AABQ+AAAeXQAAKHwAADKbAAA8ugAARtkAAFXwACRt 128 | /wBIhf8AbJ3/AJC1/wC0zf8AACo+AAA/XQAAVHwAAGmbAAB+ugAAk9kAAKrwACS2/wBIwv8AbM7/AJDa 129 | /wC05v8AAD4+AABdXQAAfHwAAJubAAC6ugAA2dkAAPDwACT//wBI//8AbP//AJD//wC0//8AAD4qAABd 130 | PwAAfFQAAJtpAAC6fgAA2ZMAAPCqACT/tgBI/8IAbP/OAJD/2gC0/+YAAD4UAABdHgAAfCgAAJsyAAC6 131 | PAAA2UYAAPBVACT/bQBI/4UAbP+dAJD/tQC0/80AAD4AAABdAAAAfAAAAJsAAAC6AAAA2QAAAPAAACT/ 132 | JABI/0gAbP9sAJD/kAC0/7QAFD4AAB5dAAAofAAAMpsAADy6AABG2QAAVfAAAG3/JACF/0gAnf9sALX/ 133 | kADN/7QAKj4AAD9dAABUfAAAaZsAAH66AACT2QAAqvAAALb/JADC/0gAzv9sANr/kADm/7QAPj4AAF1d 134 | AAB8fAAAm5sAALq6AADZ2QAA8PAAAP//JAD//0gA//9sAP//kAD//7QAPioAAF0/AAB8VAAAm2kAALp+ 135 | AADZkwAA8KoAAP+2JAD/wkgA/85sAP/akAD/5rQAPhQAAF0eAAB8KAAAmzIAALo8AADZRgAA8FUAAP9t 136 | JAD/hUgA/51sAP+1kAD/zbQAPgAAAF0AAAB8AAAAmwAAALoAAADZAAAA8AAAAP8kJAD/SEgA/2xsAP+Q 137 | kAD/tLQAPgAUAF0AHgB8ACgAmwAyALoAPADZAEYA8ABVAP8kbQD/SIUA/2ydAP+QtQD/tM0APgAqAF0A 138 | PwB8AFQAmwBpALoAfgDZAJMA8ACqAP8ktgD/SMIA/2zOAP+Q2gD/tOYAPgA+AF0AXQB8AHwAmwCbALoA 139 | ugDZANkA8ADwAP8k/wD/SP8A/2z/AP+Q/wD/tP8AKgA+AD8AXQBUAHwAaQCbAH4AugCTANkAqgDwALYk 140 | /wDCSP8Azmz/ANqQ/wDmtP8AFAA+AB4AXQAoAHwAMgCbADwAugBGANkAVQDwAG0k/wCFSP8AnWz/ALWQ 141 | /wDNtP8AAQEBAQEBAQEBAQEBAQEBAQEBIba2tra2tie3IwEBAQEBASO1tLS0tLW1tbUnAQEBAQEBI7W0 142 | tbW1tba2tCcBAQEBAQEhtiMjJ7W2tie0IgEBAQEBAbcnAQEitScntrYBAQEBAQEBJyMBASe3q6u1AQEB 143 | AQEBASO2IwEnqyIitQEBAQEBASG1tiMitiIjI7YBAQEBIye1tbW1tbciIwG2AQEBIrW0tbW1tie3qyMi 144 | JwEBJ7S0tLW1tbYnJ6siJyMBAbe1tLS1tbW2ticntyMBAQEBASO3trW1tie3IwEBAQEBAQEBAQEitycn 145 | AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 146 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= 147 | 148 | 149 | -------------------------------------------------------------------------------- /Image Processing/FormBaoHeDu.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Image_Processing 2 | { 3 | partial class FormBaoHeDu 4 | { 5 | /// 6 | /// 必需的设计器变量。 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// 清理所有正在使用的资源。 12 | /// 13 | /// 如果应释放托管资源,为 true;否则为 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 窗体设计器生成的代码 24 | 25 | /// 26 | /// 设计器支持所需的方法 - 不要 27 | /// 使用代码编辑器修改此方法的内容。 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormBaoHeDu)); 32 | this.groupBox1 = new System.Windows.Forms.GroupBox(); 33 | this.labelH = new System.Windows.Forms.Label(); 34 | this.textH = new System.Windows.Forms.TextBox(); 35 | this.trackBarH = new System.Windows.Forms.TrackBar(); 36 | this.labelI = new System.Windows.Forms.Label(); 37 | this.textI = new System.Windows.Forms.TextBox(); 38 | this.trackBarI = new System.Windows.Forms.TrackBar(); 39 | this.labelS = new System.Windows.Forms.Label(); 40 | this.textS = new System.Windows.Forms.TextBox(); 41 | this.trackBarS = new System.Windows.Forms.TrackBar(); 42 | this.butBaoHeDu = new System.Windows.Forms.Button(); 43 | this.groupBox1.SuspendLayout(); 44 | ((System.ComponentModel.ISupportInitialize)(this.trackBarH)).BeginInit(); 45 | ((System.ComponentModel.ISupportInitialize)(this.trackBarI)).BeginInit(); 46 | ((System.ComponentModel.ISupportInitialize)(this.trackBarS)).BeginInit(); 47 | this.SuspendLayout(); 48 | // 49 | // groupBox1 50 | // 51 | this.groupBox1.Controls.Add(this.labelH); 52 | this.groupBox1.Controls.Add(this.textH); 53 | this.groupBox1.Controls.Add(this.trackBarH); 54 | this.groupBox1.Controls.Add(this.labelI); 55 | this.groupBox1.Controls.Add(this.textI); 56 | this.groupBox1.Controls.Add(this.trackBarI); 57 | this.groupBox1.Controls.Add(this.labelS); 58 | this.groupBox1.Controls.Add(this.textS); 59 | this.groupBox1.Controls.Add(this.trackBarS); 60 | this.groupBox1.Location = new System.Drawing.Point(12, 12); 61 | this.groupBox1.Name = "groupBox1"; 62 | this.groupBox1.Size = new System.Drawing.Size(302, 174); 63 | this.groupBox1.TabIndex = 0; 64 | this.groupBox1.TabStop = false; 65 | this.groupBox1.Text = "HSI 分量调节"; 66 | // 67 | // labelH 68 | // 69 | this.labelH.AutoSize = true; 70 | this.labelH.Location = new System.Drawing.Point(6, 31); 71 | this.labelH.Name = "labelH"; 72 | this.labelH.Size = new System.Drawing.Size(23, 12); 73 | this.labelH.TabIndex = 47; 74 | this.labelH.Text = "H:"; 75 | // 76 | // textH 77 | // 78 | this.textH.Location = new System.Drawing.Point(244, 28); 79 | this.textH.Name = "textH"; 80 | this.textH.Size = new System.Drawing.Size(44, 21); 81 | this.textH.TabIndex = 49; 82 | // 83 | // trackBarH 84 | // 85 | this.trackBarH.Location = new System.Drawing.Point(42, 20); 86 | this.trackBarH.Maximum = 360; 87 | this.trackBarH.Name = "trackBarH"; 88 | this.trackBarH.Size = new System.Drawing.Size(196, 45); 89 | this.trackBarH.TabIndex = 48; 90 | this.trackBarH.Scroll += new System.EventHandler(this.trackBarH_Scroll); 91 | // 92 | // labelI 93 | // 94 | this.labelI.AutoSize = true; 95 | this.labelI.Location = new System.Drawing.Point(6, 133); 96 | this.labelI.Name = "labelI"; 97 | this.labelI.Size = new System.Drawing.Size(23, 12); 98 | this.labelI.TabIndex = 44; 99 | this.labelI.Text = "I:"; 100 | // 101 | // textI 102 | // 103 | this.textI.Location = new System.Drawing.Point(244, 130); 104 | this.textI.Name = "textI"; 105 | this.textI.Size = new System.Drawing.Size(44, 21); 106 | this.textI.TabIndex = 46; 107 | // 108 | // trackBarI 109 | // 110 | this.trackBarI.Location = new System.Drawing.Point(42, 122); 111 | this.trackBarI.Maximum = 255; 112 | this.trackBarI.Name = "trackBarI"; 113 | this.trackBarI.Size = new System.Drawing.Size(196, 45); 114 | this.trackBarI.TabIndex = 45; 115 | this.trackBarI.Scroll += new System.EventHandler(this.trackBarI_Scroll); 116 | // 117 | // labelS 118 | // 119 | this.labelS.AutoSize = true; 120 | this.labelS.Location = new System.Drawing.Point(6, 82); 121 | this.labelS.Name = "labelS"; 122 | this.labelS.Size = new System.Drawing.Size(23, 12); 123 | this.labelS.TabIndex = 41; 124 | this.labelS.Text = "S:"; 125 | // 126 | // textS 127 | // 128 | this.textS.Location = new System.Drawing.Point(244, 79); 129 | this.textS.Name = "textS"; 130 | this.textS.Size = new System.Drawing.Size(44, 21); 131 | this.textS.TabIndex = 43; 132 | // 133 | // trackBarS 134 | // 135 | this.trackBarS.Location = new System.Drawing.Point(42, 71); 136 | this.trackBarS.Maximum = 255; 137 | this.trackBarS.Name = "trackBarS"; 138 | this.trackBarS.Size = new System.Drawing.Size(196, 45); 139 | this.trackBarS.TabIndex = 42; 140 | this.trackBarS.Scroll += new System.EventHandler(this.trackBarS_Scroll); 141 | // 142 | // butBaoHeDu 143 | // 144 | this.butBaoHeDu.Location = new System.Drawing.Point(12, 192); 145 | this.butBaoHeDu.Name = "butBaoHeDu"; 146 | this.butBaoHeDu.Size = new System.Drawing.Size(302, 32); 147 | this.butBaoHeDu.TabIndex = 1; 148 | this.butBaoHeDu.Text = "确定"; 149 | this.butBaoHeDu.UseVisualStyleBackColor = true; 150 | this.butBaoHeDu.Click += new System.EventHandler(this.butBaoHeDu_Click); 151 | // 152 | // FormBaoHeDu 153 | // 154 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 155 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 156 | this.BackColor = System.Drawing.Color.LavenderBlush; 157 | this.ClientSize = new System.Drawing.Size(328, 234); 158 | this.Controls.Add(this.butBaoHeDu); 159 | this.Controls.Add(this.groupBox1); 160 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 161 | this.Name = "FormBaoHeDu"; 162 | this.Text = "饱和度调节"; 163 | this.groupBox1.ResumeLayout(false); 164 | this.groupBox1.PerformLayout(); 165 | ((System.ComponentModel.ISupportInitialize)(this.trackBarH)).EndInit(); 166 | ((System.ComponentModel.ISupportInitialize)(this.trackBarI)).EndInit(); 167 | ((System.ComponentModel.ISupportInitialize)(this.trackBarS)).EndInit(); 168 | this.ResumeLayout(false); 169 | 170 | } 171 | 172 | #endregion 173 | 174 | private System.Windows.Forms.GroupBox groupBox1; 175 | private System.Windows.Forms.Label labelH; 176 | private System.Windows.Forms.TextBox textH; 177 | private System.Windows.Forms.TrackBar trackBarH; 178 | private System.Windows.Forms.Label labelI; 179 | private System.Windows.Forms.TextBox textI; 180 | private System.Windows.Forms.TrackBar trackBarI; 181 | private System.Windows.Forms.Label labelS; 182 | private System.Windows.Forms.TextBox textS; 183 | private System.Windows.Forms.TrackBar trackBarS; 184 | private System.Windows.Forms.Button butBaoHeDu; 185 | } 186 | } -------------------------------------------------------------------------------- /Image Processing/FormBaoHeDu.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Text; 7 | using System.Windows.Forms; 8 | 9 | namespace Image_Processing 10 | { 11 | public partial class FormBaoHeDu : Form 12 | { 13 | public FormBaoHeDu() 14 | { 15 | InitializeComponent(); 16 | } 17 | 18 | public int valueH, valueS, valueI; 19 | 20 | private void trackBarH_Scroll(object sender, EventArgs e) 21 | { 22 | //拉动滑动条改变 H(色调) 23 | textH.Text = trackBarH.Value.ToString(); 24 | valueH = trackBarH.Value; 25 | } 26 | 27 | private void trackBarS_Scroll(object sender, EventArgs e) 28 | { 29 | //拉动滑动条改变 S(饱和度) 30 | textS.Text = trackBarS.Value.ToString(); 31 | valueS = trackBarS.Value; 32 | } 33 | 34 | private void trackBarI_Scroll(object sender, EventArgs e) 35 | { 36 | //拉动滑动条改变 I(亮度) 37 | textI.Text = trackBarI.Value.ToString(); 38 | valueI = trackBarI.Value; 39 | } 40 | 41 | private void butBaoHeDu_Click(object sender, EventArgs e) 42 | { 43 | this.Close(); 44 | } 45 | 46 | 47 | 48 | } 49 | } -------------------------------------------------------------------------------- /Image Processing/FormBinary.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Image_Processing 2 | { 3 | partial class FormBinary 4 | { 5 | /// 6 | /// 必需的设计器变量。 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// 清理所有正在使用的资源。 12 | /// 13 | /// 如果应释放托管资源,为 true;否则为 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 窗体设计器生成的代码 24 | 25 | /// 26 | /// 设计器支持所需的方法 - 不要 27 | /// 使用代码编辑器修改此方法的内容。 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormBinary)); 32 | this.groupBox1 = new System.Windows.Forms.GroupBox(); 33 | this.butBinary = new System.Windows.Forms.Button(); 34 | this.panel5 = new System.Windows.Forms.Panel(); 35 | this.labBinary = new System.Windows.Forms.Label(); 36 | this.textBinary = new System.Windows.Forms.TextBox(); 37 | this.trackBarBinary = new System.Windows.Forms.TrackBar(); 38 | this.groupBox1.SuspendLayout(); 39 | this.panel5.SuspendLayout(); 40 | ((System.ComponentModel.ISupportInitialize)(this.trackBarBinary)).BeginInit(); 41 | this.SuspendLayout(); 42 | // 43 | // groupBox1 44 | // 45 | this.groupBox1.Controls.Add(this.butBinary); 46 | this.groupBox1.Controls.Add(this.panel5); 47 | this.groupBox1.Location = new System.Drawing.Point(12, 12); 48 | this.groupBox1.Name = "groupBox1"; 49 | this.groupBox1.Size = new System.Drawing.Size(392, 135); 50 | this.groupBox1.TabIndex = 1; 51 | this.groupBox1.TabStop = false; 52 | // 53 | // butBinary 54 | // 55 | this.butBinary.Location = new System.Drawing.Point(6, 102); 56 | this.butBinary.Name = "butBinary"; 57 | this.butBinary.Size = new System.Drawing.Size(380, 27); 58 | this.butBinary.TabIndex = 39; 59 | this.butBinary.Text = "确定"; 60 | this.butBinary.UseVisualStyleBackColor = true; 61 | this.butBinary.Click += new System.EventHandler(this.butBinary_Click); 62 | // 63 | // panel5 64 | // 65 | this.panel5.Controls.Add(this.labBinary); 66 | this.panel5.Controls.Add(this.textBinary); 67 | this.panel5.Controls.Add(this.trackBarBinary); 68 | this.panel5.Location = new System.Drawing.Point(6, 20); 69 | this.panel5.Name = "panel5"; 70 | this.panel5.Size = new System.Drawing.Size(380, 66); 71 | this.panel5.TabIndex = 47; 72 | // 73 | // labBinary 74 | // 75 | this.labBinary.AutoSize = true; 76 | this.labBinary.Location = new System.Drawing.Point(8, 24); 77 | this.labBinary.Name = "labBinary"; 78 | this.labBinary.Size = new System.Drawing.Size(113, 12); 79 | this.labBinary.TabIndex = 0; 80 | this.labBinary.Text = "请调节二值化的阈值"; 81 | // 82 | // textBinary 83 | // 84 | this.textBinary.Location = new System.Drawing.Point(324, 21); 85 | this.textBinary.Name = "textBinary"; 86 | this.textBinary.Size = new System.Drawing.Size(44, 21); 87 | this.textBinary.TabIndex = 40; 88 | // 89 | // trackBarBinary 90 | // 91 | this.trackBarBinary.Location = new System.Drawing.Point(122, 15); 92 | this.trackBarBinary.Maximum = 255; 93 | this.trackBarBinary.Name = "trackBarBinary"; 94 | this.trackBarBinary.Size = new System.Drawing.Size(196, 45); 95 | this.trackBarBinary.TabIndex = 38; 96 | this.trackBarBinary.Value = 128; 97 | this.trackBarBinary.Scroll += new System.EventHandler(this.trackBarBinary_Scroll); 98 | // 99 | // FormBinary 100 | // 101 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 102 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 103 | this.BackColor = System.Drawing.Color.LavenderBlush; 104 | this.ClientSize = new System.Drawing.Size(416, 162); 105 | this.Controls.Add(this.groupBox1); 106 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 107 | this.Name = "FormBinary"; 108 | this.Text = "简单二值化"; 109 | this.groupBox1.ResumeLayout(false); 110 | this.panel5.ResumeLayout(false); 111 | this.panel5.PerformLayout(); 112 | ((System.ComponentModel.ISupportInitialize)(this.trackBarBinary)).EndInit(); 113 | this.ResumeLayout(false); 114 | 115 | } 116 | 117 | #endregion 118 | 119 | private System.Windows.Forms.GroupBox groupBox1; 120 | private System.Windows.Forms.Button butBinary; 121 | private System.Windows.Forms.Panel panel5; 122 | private System.Windows.Forms.Label labBinary; 123 | private System.Windows.Forms.TextBox textBinary; 124 | private System.Windows.Forms.TrackBar trackBarBinary; 125 | } 126 | } -------------------------------------------------------------------------------- /Image Processing/FormBinary.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Text; 7 | using System.Windows.Forms; 8 | 9 | namespace Image_Processing 10 | { 11 | public partial class FormBinary : Form 12 | { 13 | int value; 14 | public FormBinary() 15 | { 16 | InitializeComponent(); 17 | } 18 | 19 | private void trackBarBinary_Scroll(object sender, EventArgs e) 20 | { 21 | //调节二值化的阈值 22 | textBinary.Text = trackBarBinary.Value.ToString(); 23 | } 24 | 25 | public int BinaryValue() 26 | { 27 | // 以下两种方法都行 28 | value = trackBarBinary.Value;//通过滑动条调节二值化的阈值 29 | //LD = int.Parse(textLD.Text); 30 | 31 | return value; 32 | } 33 | 34 | private void butBinary_Click(object sender, EventArgs e) 35 | { 36 | this.Close(); 37 | } 38 | 39 | 40 | 41 | } 42 | } -------------------------------------------------------------------------------- /Image Processing/FormBinary.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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | 123 | AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAA 124 | AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP// 125 | AAD///8AAAAAAAAAAAAAAADu7u7gAAAAAO7u7uAAAAAAAA4AAAALu7u7Dg7gAAu7u7sO7uAAC7sAAA7u 126 | 4AALuwu7Du7gAAu7u7sO4AAAC7u7uw7u7uALu7sAAA4O4Au7u7u7Dg7gC7u7C7sO7uALu7sLuwAAAAu7 127 | u7u7AAAAAAAAAAAAAAD4AwAA+AMAAPgDAAAAAwAAAAMAAAADAAAAAwAAAAMAAAAAAAAAAAAAAAAAAAAA 128 | AAAAAAAAAAEAAAAfAACAPwAA 129 | 130 | 131 | -------------------------------------------------------------------------------- /Image Processing/FormColorPingHeng.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Text; 7 | using System.Windows.Forms; 8 | 9 | namespace Image_Processing 10 | { 11 | public partial class FormColorPingHeng : Form 12 | { 13 | public FormColorPingHeng() 14 | { 15 | InitializeComponent(); 16 | } 17 | public int valueR, valueG, valueB; 18 | 19 | private void trackBarR_Scroll(object sender, EventArgs e) 20 | { 21 | //拉动滑动条改变红色分量 22 | textR.Text = trackBarR.Value.ToString(); 23 | valueR = trackBarR.Value; 24 | } 25 | 26 | private void trackBarG_Scroll(object sender, EventArgs e) 27 | { 28 | //拉动滑动条改变绿色分量 29 | textG.Text = trackBarG.Value.ToString(); 30 | valueG = trackBarG.Value; 31 | } 32 | 33 | private void trackBarB_Scroll(object sender, EventArgs e) 34 | { 35 | //拉动滑动条改变蓝色分量 36 | textB.Text = trackBarB.Value.ToString(); 37 | valueB = trackBarB.Value; 38 | } 39 | 40 | private void butColorPingHeng_Click(object sender, EventArgs e) 41 | { 42 | this.Close(); 43 | } 44 | 45 | 46 | 47 | } 48 | } -------------------------------------------------------------------------------- /Image Processing/FormColorPingHeng.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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | 123 | AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAQAMAAAAAAAAAAAAAAAAAAAAA 124 | AAAAAAAAAAAAAAAAAADe3969vr2lpqWcnpycnpycnpylpqW1trXW19YAAAAAAAAAAAAAAAAAAAAAAADW 125 | 19attr2Ers57tudztu9rtu9zrudzps57lqWcnqXGx8YAAAAAAAAAAAAAAADe396lvtalz+/G5//W7//O 126 | 5//O5//G5/+93/+Ux/dznr2cnqXOz84AAAAAAAAAAACtx96t1+/Ovq3OvqXW5+/O7//O5//G5//G5/+9 127 | 5/+cz/9znr2trq3e394AAADO196Uz/fOx72cYRi9hjHOpmPW5+/O5/fG5/e93/+13/+t3/+Mx/eEnq3O 128 | z84AAACcx+el1//OvqWcaSnOpmv3x2vnz63e387nz5y11++t1/+l1/+Uz/9rpta9vr0AAABztu+c1//G 129 | 19a1hkK9rpTOplLv15zW5+/vz4ylnoyc1/+Uz/+Mx/9aru+9vr0AAABjrveMz/+l1/fOtnulhlrGz9a1 130 | nnO9jjm9eSmUcUqUx/eEx/9zvv9Kpve9vr0AAABarvdrvv+Ex/+t1+/WrmOteUq9z9bG3/etvs6cz++E 131 | x/9zvv9jtv9Kpu/Gx8YAAACEvu9atv9rvv97x/+lz+fnx4S9jkKtnoytz+ec1/+Ex/9rvv9atv9apufe 132 | 394AAADO3/djtv9zvv97x/+Mz/+l1/fe163vvmvWplq9roStx86Mz/9zvv+cvt4AAAAAAAAAAACcx/eM 133 | z/+c1/+t1/+13/+93//O3+fv36X/13v3z3PG186Ux+/n5+8AAAAAAAAAAAAAAAClz/el1//O5//W7//e 134 | 7//e7//e9//n7+/e38bn16Xn384AAAAAAAAAAAAAAAAAAAAAAAC93/ecz/e93//W7//e7//O5/+t1/e9 135 | 1/fv7/cAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADO3/e11/et1/fO3/fv9/cAAAAAAAAAAAAAAAAA 136 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwBwAA4AMAAMAB 137 | AADAAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAEAAMABAADgAwAA8AcAAPwfAAD//wAA 138 | 139 | 140 | -------------------------------------------------------------------------------- /Image Processing/FormDuiBidu.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Image_Processing 2 | { 3 | partial class FormDuiBidu 4 | { 5 | /// 6 | /// 必需的设计器变量。 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// 清理所有正在使用的资源。 12 | /// 13 | /// 如果应释放托管资源,为 true;否则为 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 窗体设计器生成的代码 24 | 25 | /// 26 | /// 设计器支持所需的方法 - 不要 27 | /// 使用代码编辑器修改此方法的内容。 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormDuiBidu)); 32 | this.groupBox1 = new System.Windows.Forms.GroupBox(); 33 | this.butDuiBd = new System.Windows.Forms.Button(); 34 | this.panel5 = new System.Windows.Forms.Panel(); 35 | this.labDuiBD = new System.Windows.Forms.Label(); 36 | this.textDuiBD = new System.Windows.Forms.TextBox(); 37 | this.trackBarDuiBD = new System.Windows.Forms.TrackBar(); 38 | this.groupBox1.SuspendLayout(); 39 | this.panel5.SuspendLayout(); 40 | ((System.ComponentModel.ISupportInitialize)(this.trackBarDuiBD)).BeginInit(); 41 | this.SuspendLayout(); 42 | // 43 | // groupBox1 44 | // 45 | this.groupBox1.Controls.Add(this.butDuiBd); 46 | this.groupBox1.Controls.Add(this.panel5); 47 | this.groupBox1.Location = new System.Drawing.Point(12, 12); 48 | this.groupBox1.Name = "groupBox1"; 49 | this.groupBox1.Size = new System.Drawing.Size(358, 135); 50 | this.groupBox1.TabIndex = 1; 51 | this.groupBox1.TabStop = false; 52 | // 53 | // butDuiBd 54 | // 55 | this.butDuiBd.Location = new System.Drawing.Point(6, 102); 56 | this.butDuiBd.Name = "butDuiBd"; 57 | this.butDuiBd.Size = new System.Drawing.Size(346, 27); 58 | this.butDuiBd.TabIndex = 39; 59 | this.butDuiBd.Text = "确定"; 60 | this.butDuiBd.UseVisualStyleBackColor = true; 61 | this.butDuiBd.Click += new System.EventHandler(this.butDuiBd_Click); 62 | // 63 | // panel5 64 | // 65 | this.panel5.Controls.Add(this.labDuiBD); 66 | this.panel5.Controls.Add(this.textDuiBD); 67 | this.panel5.Controls.Add(this.trackBarDuiBD); 68 | this.panel5.Location = new System.Drawing.Point(6, 20); 69 | this.panel5.Name = "panel5"; 70 | this.panel5.Size = new System.Drawing.Size(348, 66); 71 | this.panel5.TabIndex = 47; 72 | // 73 | // labDuiBD 74 | // 75 | this.labDuiBD.AutoSize = true; 76 | this.labDuiBD.Location = new System.Drawing.Point(8, 24); 77 | this.labDuiBD.Name = "labDuiBD"; 78 | this.labDuiBD.Size = new System.Drawing.Size(77, 12); 79 | this.labDuiBD.TabIndex = 0; 80 | this.labDuiBD.Text = "请调节对比度"; 81 | // 82 | // textDuiBD 83 | // 84 | this.textDuiBD.Location = new System.Drawing.Point(291, 19); 85 | this.textDuiBD.Name = "textDuiBD"; 86 | this.textDuiBD.Size = new System.Drawing.Size(44, 21); 87 | this.textDuiBD.TabIndex = 40; 88 | // 89 | // trackBarDuiBD 90 | // 91 | this.trackBarDuiBD.Location = new System.Drawing.Point(89, 13); 92 | this.trackBarDuiBD.Maximum = 100; 93 | this.trackBarDuiBD.Minimum = -100; 94 | this.trackBarDuiBD.Name = "trackBarDuiBD"; 95 | this.trackBarDuiBD.Size = new System.Drawing.Size(196, 45); 96 | this.trackBarDuiBD.TabIndex = 38; 97 | this.trackBarDuiBD.Scroll += new System.EventHandler(this.trackBarDuiBD_Scroll); 98 | // 99 | // FormDuiBidu 100 | // 101 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 102 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 103 | this.BackColor = System.Drawing.Color.LavenderBlush; 104 | this.ClientSize = new System.Drawing.Size(380, 159); 105 | this.Controls.Add(this.groupBox1); 106 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 107 | this.Name = "FormDuiBidu"; 108 | this.Text = "对比度调节"; 109 | this.groupBox1.ResumeLayout(false); 110 | this.panel5.ResumeLayout(false); 111 | this.panel5.PerformLayout(); 112 | ((System.ComponentModel.ISupportInitialize)(this.trackBarDuiBD)).EndInit(); 113 | this.ResumeLayout(false); 114 | 115 | } 116 | 117 | #endregion 118 | 119 | private System.Windows.Forms.GroupBox groupBox1; 120 | private System.Windows.Forms.Button butDuiBd; 121 | private System.Windows.Forms.Panel panel5; 122 | private System.Windows.Forms.Label labDuiBD; 123 | private System.Windows.Forms.TextBox textDuiBD; 124 | private System.Windows.Forms.TrackBar trackBarDuiBD; 125 | } 126 | } -------------------------------------------------------------------------------- /Image Processing/FormDuiBidu.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Text; 7 | using System.Windows.Forms; 8 | 9 | namespace Image_Processing 10 | { 11 | public partial class FormDuiBidu : Form 12 | { 13 | int DuiBD; 14 | public FormDuiBidu() 15 | { 16 | InitializeComponent(); 17 | } 18 | 19 | private void trackBarDuiBD_Scroll(object sender, EventArgs e) 20 | { 21 | //拉动滑动条改变阈值 22 | textDuiBD.Text = trackBarDuiBD.Value.ToString(); 23 | } 24 | 25 | public int DuiBDValue() 26 | { 27 | // 以下两种方法都行 28 | DuiBD = trackBarDuiBD.Value;//通过滑动条调节对比度的效果 29 | //LD = int.Parse(textLD.Text); 30 | 31 | return DuiBD; 32 | } 33 | 34 | private void butDuiBd_Click(object sender, EventArgs e) 35 | { 36 | this.Close(); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /Image Processing/FormDuiBidu.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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | 123 | AAABAAEAEBAAAAEACABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAA 124 | AAAAAAAAp0gCAKBRAACvUwIApVYNAKhXDAC0XAIAt1wHALZTCQCsXhcAuloUAKtnAgCsaAAAtnsNALZ/ 125 | DAC0fA8AtXwPAK9vFwCwaCgAs3U1AL1yNADDeQ8AxXorAL95QwC5f0QAun1LALyGFAC8hRYAv40VALyQ 126 | EwC5gDUAxZUXAMGWHwDCmhkAwJElAMWaIQDVnywAyYY3AMihJwDMqCYA26crAM6uMQDRsz0A1rQ9AOW0 127 | OgC9hkEAv4dMAMCHSQDKh04AxYxPAMqZTQDBiFAAw4hWAMmfXADTrUcA26VOAN21RQDUvEwA1b1TAMuh 128 | ZgDRqWEA5Md2AOLNewADg/8AA4T/AAGG/wAAh/8AAIj+AAGJ/wADif8AAYr+AACL/wACiv8AA439AAGO 129 | /QABjv8AAI//AAKP/gACkP8AA5L/AAKT/wAKl/4AAJn8AAKa/wAMm/wAG57/ACGf/gAVof4AE6X/ACCl 130 | /wAvo/gAKaL/ACij/wA1q/4AM67+AD+u/gA0s/4AQ7f+AEW0/QBEtv0ASrL/AE2y/QBNsP8AT7H/AEi3 131 | /wBLt/4AV7r+AFu+/ABbvP8AdcLzAHTB/wB4zf0AubSrAMCfhQDbuYsAwLWhAN/ImwDgypYAwMKvANvH 132 | qADCw78A4MaiAOLKoADiyacA5c+lAOLKrgDl1aoA6uG2AJe81gCPv+MAg77sAKfG1QCGw+sAkcPhAJPG 133 | 5wCUyuEAg8z/AI3P/wCV0f8AltH/AJnU/ACS2P8AmNn/ALnf9wCl4f8ApuL/ALri/wC36f0AydLVANLU 134 | 1QDT2NcA0tfYANXX2ADU1NoA1tfbANfa2ADZ3t0A2d3eAODb3QDw6MMA8eXNAOro3gDz7tkA9u7dAPfz 135 | 1wD08N4A29/gAN/f5QDb4eYA3+LqAMDn/QDU7P4AzvX+ANb0/wDf8fwA3vj/AOPn6ADk5+wA5+bvAOXo 136 | 7QDl6e4A5+ztAOnt7gDt7+8A8ungAPbz5QD68+QA+fDmAPbx6AD28+sA+/XqAOj8/QD29vYA/fvzAP77 137 | 9gDx+v4A9fz/APv5+AD4+vsA//v6AP/8+AD5/f4A+/3+AP/+/QD+//0A/v3/AP/9/wD8/v4A/f/+AP3/ 138 | /wD+/v4A//7+AP///gD//v8A////AKBIAgCxvrmry761xM341b5caWNvXGN11LTOxLwAAAAAaIcGASqI 139 | 0Xf/6ZJ89g2BfCQCAAAAAAAAAAAAAAAAAAA0GpYAaIcGARYAAAAAAAAAFg6BfBYAAADQGpYAAQAAACAA 140 | AAAWAAAAAAAAABYAAAAgGpYAKojRd+AalgComoN8IA6BfP////8WDoF8FupLACQCAABohwYBFgAAAIQa 141 | lgAAAAAA1tHU1KtuXFBPUV+MxNbNztbW1IlNQ1hjaWBSQVuu1s/T0YhCV4ZxFxQ0cGxal8DW0ZJDWXgK 142 | 1xITCQEzsZ6cytZdToMIGbjHvcV9BTG2lbWvSmEwBMi8HhE1y3sCd6imkUaCBxjUeQwQDaW7Czu0mm9L 143 | gAMu1noOIiCiuQ8ys5iNR4EGL9R8HCYnpLoaPLKbrEJrFi3Rfh8qPsK+HXSpndBVVHMlo3UhOZ/Bfzah 144 | mbDNikBochUbIyk6Kzigp5bG1MlkQWJ2NyQoLD2HZ5S3zNHWw2U/U2qEhW1eRUmP1dbWzNTQi1ZEQkhB 145 | TGaq0c/V1dbWzNTRrZCOk7/W1tbV0gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 146 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= 147 | 148 | 149 | -------------------------------------------------------------------------------- /Image Processing/FormEdgeStrengthen.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Image_Processing 2 | { 3 | partial class FormEdgeStrengthen 4 | { 5 | /// 6 | /// 必需的设计器变量。 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// 清理所有正在使用的资源。 12 | /// 13 | /// 如果应释放托管资源,为 true;否则为 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 窗体设计器生成的代码 24 | 25 | /// 26 | /// 设计器支持所需的方法 - 不要 27 | /// 使用代码编辑器修改此方法的内容。 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormEdgeStrengthen)); 32 | this.groupBox1 = new System.Windows.Forms.GroupBox(); 33 | this.butEdgeStrengthen = new System.Windows.Forms.Button(); 34 | this.panel5 = new System.Windows.Forms.Panel(); 35 | this.textEdgeStrengthen = new System.Windows.Forms.TextBox(); 36 | this.trackBarEdgeStrengthen = new System.Windows.Forms.TrackBar(); 37 | this.groupBox1.SuspendLayout(); 38 | this.panel5.SuspendLayout(); 39 | ((System.ComponentModel.ISupportInitialize)(this.trackBarEdgeStrengthen)).BeginInit(); 40 | this.SuspendLayout(); 41 | // 42 | // groupBox1 43 | // 44 | this.groupBox1.Controls.Add(this.butEdgeStrengthen); 45 | this.groupBox1.Controls.Add(this.panel5); 46 | this.groupBox1.Location = new System.Drawing.Point(3, 12); 47 | this.groupBox1.Name = "groupBox1"; 48 | this.groupBox1.Size = new System.Drawing.Size(297, 135); 49 | this.groupBox1.TabIndex = 1; 50 | this.groupBox1.TabStop = false; 51 | this.groupBox1.Text = "阈值调节"; 52 | // 53 | // butEdgeStrengthen 54 | // 55 | this.butEdgeStrengthen.Location = new System.Drawing.Point(6, 102); 56 | this.butEdgeStrengthen.Name = "butEdgeStrengthen"; 57 | this.butEdgeStrengthen.Size = new System.Drawing.Size(278, 27); 58 | this.butEdgeStrengthen.TabIndex = 39; 59 | this.butEdgeStrengthen.Text = "确定"; 60 | this.butEdgeStrengthen.UseVisualStyleBackColor = true; 61 | this.butEdgeStrengthen.Click += new System.EventHandler(this.butLD_Click); 62 | // 63 | // panel5 64 | // 65 | this.panel5.Controls.Add(this.textEdgeStrengthen); 66 | this.panel5.Controls.Add(this.trackBarEdgeStrengthen); 67 | this.panel5.Location = new System.Drawing.Point(6, 20); 68 | this.panel5.Name = "panel5"; 69 | this.panel5.Size = new System.Drawing.Size(278, 66); 70 | this.panel5.TabIndex = 47; 71 | // 72 | // textEdgeStrengthen 73 | // 74 | this.textEdgeStrengthen.Location = new System.Drawing.Point(224, 18); 75 | this.textEdgeStrengthen.Name = "textEdgeStrengthen"; 76 | this.textEdgeStrengthen.Size = new System.Drawing.Size(44, 21); 77 | this.textEdgeStrengthen.TabIndex = 40; 78 | // 79 | // trackBarEdgeStrengthen 80 | // 81 | this.trackBarEdgeStrengthen.Location = new System.Drawing.Point(3, 11); 82 | this.trackBarEdgeStrengthen.Maximum = 255; 83 | this.trackBarEdgeStrengthen.Name = "trackBarEdgeStrengthen"; 84 | this.trackBarEdgeStrengthen.Size = new System.Drawing.Size(215, 45); 85 | this.trackBarEdgeStrengthen.TabIndex = 38; 86 | this.trackBarEdgeStrengthen.Scroll += new System.EventHandler(this.trackBarEdgeStrengthen_Scroll); 87 | // 88 | // FormEdgeStrengthen 89 | // 90 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 91 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 92 | this.BackColor = System.Drawing.Color.LavenderBlush; 93 | this.ClientSize = new System.Drawing.Size(306, 162); 94 | this.Controls.Add(this.groupBox1); 95 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 96 | this.Name = "FormEdgeStrengthen"; 97 | this.Text = "边缘增强"; 98 | this.groupBox1.ResumeLayout(false); 99 | this.panel5.ResumeLayout(false); 100 | this.panel5.PerformLayout(); 101 | ((System.ComponentModel.ISupportInitialize)(this.trackBarEdgeStrengthen)).EndInit(); 102 | this.ResumeLayout(false); 103 | 104 | } 105 | 106 | #endregion 107 | 108 | private System.Windows.Forms.GroupBox groupBox1; 109 | private System.Windows.Forms.Button butEdgeStrengthen; 110 | private System.Windows.Forms.Panel panel5; 111 | private System.Windows.Forms.TextBox textEdgeStrengthen; 112 | private System.Windows.Forms.TrackBar trackBarEdgeStrengthen; 113 | } 114 | } -------------------------------------------------------------------------------- /Image Processing/FormEdgeStrengthen.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Text; 7 | using System.Windows.Forms; 8 | 9 | namespace Image_Processing 10 | { 11 | public partial class FormEdgeStrengthen : Form 12 | { 13 | public FormEdgeStrengthen() 14 | { 15 | InitializeComponent(); 16 | } 17 | 18 | public int EdgeStrengthen; 19 | 20 | private void trackBarEdgeStrengthen_Scroll(object sender, EventArgs e) 21 | { 22 | //通过滑竿调节阈值 23 | textEdgeStrengthen.Text = trackBarEdgeStrengthen.Value.ToString(); 24 | EdgeStrengthen = trackBarEdgeStrengthen.Value; 25 | } 26 | 27 | private void butLD_Click(object sender, EventArgs e) 28 | { 29 | this.Close(); 30 | } 31 | 32 | } 33 | } -------------------------------------------------------------------------------- /Image Processing/FormEdgeStrengthen.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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | 123 | AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAA 124 | AAAAAAAAAAAAAAAAAAAAAAAAFxQPG1ZEMG5+Vi2+mF4l6XxJJsliSTaIKiUfLwAAAAAAAAAAAAAAAAAA 125 | AAAAAAAAAAAAAAAAAAAAAAAAWVA5ZqVpE/axegD/zqYE/9CsDfPCnBnws3oQ/qFZCf90XjqWBQUEBQAA 126 | AAAAAAAAAAAAAAAAAAAAAAAAYVg7a61yAf+qewb2jIAzqFpnRnFIYEhpRGJNcEhdRHJhYUCApHgt34pr 127 | ObIAAAAAAAAAAAAAAAAAAAAALy4jMbyHBf+RaRrZNzouRUl7c4YyuKjqG7GV/xejhPgze22kJzpASwoL 128 | DA2HcDujZ1s8dgAAAAAAAAAAMjAjNJWANq2XZgzwMjcwP2G5r8U3yrH/HbSU/yekieQwUE5hPGeSmzhp 129 | sMoKCwwNExIPE5Z7N7YEBAMEAAAAAHZmLIe8ixD0PzsxVWafm6NP18L/Lr+j/yqxme8sPT1FR4PCxBhh 130 | 1v8tN0JKAAAAAAAAAACMeT2iMS0gNQAAAACRbQ2rqockzzA7OEB96d3/RM61/zDGq/80Uk9bS3ienySA 131 | 8P8sVZ3OAAAAAAAAAAAAAAAAgXJAjzsqBUsAAAAAemYmjXZsOYVafHh/dePV/z/OtP9MtKHSMD9ERkSj 132 | +/8hct7/N1R7lQAAAAAAAAAAAAAAAIZ1OpU7MRZDAAAAADEvJDQwMCc2eaairnLh0v9C07v/Q3lyhkhs 133 | hohDo/n/IHDb/yxIbYMAAAAAAAAAAAAAAACehziyFRQPFgAAAAAAAAAAAAAAAHGcmKZu4M7/StnB/zdY 134 | U2BQfZ6kR6X6/yB14P84W4qiAAAAAAAAAABUTzZYlII6owAAAAAAAAAAAAAAAAAAAABPaGVuaN7L/03Y 135 | wv83WlZhTHeTmE6t+v8thev/MXXA3wECAgIvLiIwxqYq3SsqICwAAAAAAAAAAAAAAAAAAAAAFBgYGWzS 136 | xO9DzrX/VpCIlzxNVldmvfn/O5Px/y6Q6P89Ul1jj304l0xIMU4AAAAAAAAAAAAAAAAAAAAAAAAAAAAA 137 | AABHaGNwPsqx/1vJt+cQExQUfKrHyl2z9/8+me//YKzi6SAkIyYAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 138 | AAAAAAAAAAAAAEVsZXc9x6v/VYd/kxEUFRWGvuDkWrD2/1as9P96tNXXJi8zMwAAAAAAAAAAAAAAAAAA 139 | AAAAAAAAAAAAAAAAAAAAAAAAGyooL0KGeqQtPjtEJCstL3y74ORctPf/UKz0/2y77vlunb3CUm6ChjA9 140 | Q0YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwkJCgAAAAAOEBISPFNhZVmRucFPnePsTo/G0kVu 141 | i5EhAAAA8B8AAOAHAADABwAAgAMAAAABAAAAGQAAADkAAAA5AAAAOQAAwDMAAMADAADABwAA4A8AAPAH 142 | AAD4AAAA/oAAAA== 143 | 144 | 145 | -------------------------------------------------------------------------------- /Image Processing/FormLiangDu.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Image_Processing 2 | { 3 | partial class FormLiangDu 4 | { 5 | /// 6 | /// 必需的设计器变量。 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// 清理所有正在使用的资源。 12 | /// 13 | /// 如果应释放托管资源,为 true;否则为 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 窗体设计器生成的代码 24 | 25 | /// 26 | /// 设计器支持所需的方法 - 不要 27 | /// 使用代码编辑器修改此方法的内容。 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormLiangDu)); 32 | this.groupBox1 = new System.Windows.Forms.GroupBox(); 33 | this.butLD = new System.Windows.Forms.Button(); 34 | this.panel5 = new System.Windows.Forms.Panel(); 35 | this.labLD = new System.Windows.Forms.Label(); 36 | this.textLD = new System.Windows.Forms.TextBox(); 37 | this.trackBarLD = new System.Windows.Forms.TrackBar(); 38 | this.groupBox1.SuspendLayout(); 39 | this.panel5.SuspendLayout(); 40 | ((System.ComponentModel.ISupportInitialize)(this.trackBarLD)).BeginInit(); 41 | this.SuspendLayout(); 42 | // 43 | // groupBox1 44 | // 45 | this.groupBox1.Controls.Add(this.butLD); 46 | this.groupBox1.Controls.Add(this.panel5); 47 | this.groupBox1.Location = new System.Drawing.Point(12, 11); 48 | this.groupBox1.Name = "groupBox1"; 49 | this.groupBox1.Size = new System.Drawing.Size(358, 135); 50 | this.groupBox1.TabIndex = 0; 51 | this.groupBox1.TabStop = false; 52 | // 53 | // butLD 54 | // 55 | this.butLD.Location = new System.Drawing.Point(6, 102); 56 | this.butLD.Name = "butLD"; 57 | this.butLD.Size = new System.Drawing.Size(346, 27); 58 | this.butLD.TabIndex = 39; 59 | this.butLD.Text = "确定"; 60 | this.butLD.UseVisualStyleBackColor = true; 61 | this.butLD.Click += new System.EventHandler(this.butLD_Click); 62 | // 63 | // panel5 64 | // 65 | this.panel5.Controls.Add(this.labLD); 66 | this.panel5.Controls.Add(this.textLD); 67 | this.panel5.Controls.Add(this.trackBarLD); 68 | this.panel5.Location = new System.Drawing.Point(6, 20); 69 | this.panel5.Name = "panel5"; 70 | this.panel5.Size = new System.Drawing.Size(348, 66); 71 | this.panel5.TabIndex = 47; 72 | // 73 | // labLD 74 | // 75 | this.labLD.AutoSize = true; 76 | this.labLD.Location = new System.Drawing.Point(8, 24); 77 | this.labLD.Name = "labLD"; 78 | this.labLD.Size = new System.Drawing.Size(65, 12); 79 | this.labLD.TabIndex = 0; 80 | this.labLD.Text = "请调节亮度"; 81 | // 82 | // textLD 83 | // 84 | this.textLD.Location = new System.Drawing.Point(291, 19); 85 | this.textLD.Name = "textLD"; 86 | this.textLD.Size = new System.Drawing.Size(44, 21); 87 | this.textLD.TabIndex = 40; 88 | // 89 | // trackBarLD 90 | // 91 | this.trackBarLD.Location = new System.Drawing.Point(89, 13); 92 | this.trackBarLD.Maximum = 25; 93 | this.trackBarLD.Minimum = -25; 94 | this.trackBarLD.Name = "trackBarLD"; 95 | this.trackBarLD.Size = new System.Drawing.Size(196, 45); 96 | this.trackBarLD.TabIndex = 38; 97 | this.trackBarLD.Scroll += new System.EventHandler(this.trackBarLD_Scroll); 98 | // 99 | // FormLiangDu 100 | // 101 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 102 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 103 | this.BackColor = System.Drawing.Color.LavenderBlush; 104 | this.ClientSize = new System.Drawing.Size(383, 161); 105 | this.Controls.Add(this.groupBox1); 106 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 107 | this.Name = "FormLiangDu"; 108 | this.Text = "亮度调节"; 109 | this.groupBox1.ResumeLayout(false); 110 | this.panel5.ResumeLayout(false); 111 | this.panel5.PerformLayout(); 112 | ((System.ComponentModel.ISupportInitialize)(this.trackBarLD)).EndInit(); 113 | this.ResumeLayout(false); 114 | 115 | } 116 | 117 | #endregion 118 | 119 | private System.Windows.Forms.GroupBox groupBox1; 120 | private System.Windows.Forms.Button butLD; 121 | private System.Windows.Forms.Panel panel5; 122 | private System.Windows.Forms.Label labLD; 123 | private System.Windows.Forms.TextBox textLD; 124 | private System.Windows.Forms.TrackBar trackBarLD; 125 | } 126 | } -------------------------------------------------------------------------------- /Image Processing/FormLiangDu.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Text; 7 | using System.Windows.Forms; 8 | 9 | namespace Image_Processing 10 | { 11 | public partial class FormLiangDu : Form 12 | { 13 | int LD; 14 | public FormLiangDu() 15 | { 16 | InitializeComponent(); 17 | } 18 | private void trackBarLD_Scroll(object sender, EventArgs e) 19 | { 20 | //拉动亮度滑杆后,滑杆的值改变,将滑杆的值在文本框中显示,作为亮度的调节值 21 | textLD.Text = trackBarLD.Value.ToString(); 22 | } 23 | public int LDValue() 24 | { 25 | // 以下两种方法都行 26 | LD = trackBarLD.Value;//通过滑动条调节亮度值 27 | //LD = int.Parse(textLD.Text); 28 | 29 | return LD; 30 | } 31 | private void butLD_Click(object sender, EventArgs e) 32 | { 33 | this.Close(); 34 | } 35 | 36 | 37 | } 38 | } -------------------------------------------------------------------------------- /Image Processing/FormLiangDu.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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | 123 | AAABAAEAEBAAAAEACABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAB 124 | AAAAAAAAMzMzACqmHgAjqh8AJKkfACKuHwAyrx4AKrAfAC2wHwA3sB4AIawmACKrLAAsrD4AJrEyACa2 125 | MQAmsTcALLc2ACeyOAArtjwANbo5ADa8OgA2xTMAP8c0ADnNNgA8zjQAN8I6ADHAPAA/xjoAOMM8ADjF 126 | PgA6zDgARcsuAE7KKwBPyy8AUssuAFrKLwBGyzAAR8wxAEbKNQBGzDUATsk0AETHOABAxzwARck6AEPI 127 | PABEyD0ASco5AFHJMQBQyTUAXMoxAGDLMgBgzDMAY8w1AGTMNgBjyzwAZcw9AG7OPwBwzj8AMa1BAC61 128 | QAAwtEIAQa5PAFm4ZQA0w0IANsRBADTCRgA8y0IAOc9BADrORAA8z0YAOctKAD7CUQBPykQAUMpEAEnF 129 | WwBNwF4ASclYAEzJWgBTzFUAVMxXAG7OQABkzUkAcM5AAHHPTgBn0V8AedFRAF7NbwBzzoEAfc+JAHXT 130 | gwCCx4sAj9mCAJjbiQCH1JIAk9ubAJTbnACe3aEAtd26AKnhqQCu4bYAs+OyALnkvgDD5MgAyOjLAMvp 131 | zgDN6dEA1evXANbr2QDY6tsA2e3cAOHu4wDi7uQA5O7lAOvw6wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 132 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 133 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 134 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 135 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 136 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 137 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 138 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 139 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 140 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 141 | AAAAAAAAAAAAAAABAQEBAQEAAAAAAAAAAAEBBgIDAwIJAQEAAAAAAAEHChA/RkY/EAoHAQAAAAEDDRRC 142 | RUJFRUIUEAMBAAABDR0qHhgYGBgXHRkNAQABCxoqLicnHx8fJyYqGgsBAQ1AKjAwIiIgICAwKUARAQER 143 | QicwIzIyMjIxMBZAEQEBOz8ZMDc5OVJSNiYWPzwBATtBHUlRU1VVU1FJHT88AQE6Sk1PVFtcXFtUT0xH 144 | DAEAAVhZX2BiZGRiYF9WSgEAAAFaXWNlZ2prZ2VjVz0BAAAAAT5saWtubmxpZj4BAAAAAAABAWFucXFu 145 | YQEBAAAAAAAAAAABAQEBAQEAAAAAAPgfAADgBwAAwAMAAIABAACAAQAAAAAAAAAAAAAAAAAAAAAAAAAA 146 | AAAAAAAAgAEAAIABAADAAwAA4AcAAPgfAAA= 147 | 148 | 149 | -------------------------------------------------------------------------------- /Image Processing/FormPingYi.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Image_Processing 2 | { 3 | partial class FormPingYi 4 | { 5 | /// 6 | /// 必需的设计器变量。 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// 清理所有正在使用的资源。 12 | /// 13 | /// 如果应释放托管资源,为 true;否则为 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 窗体设计器生成的代码 24 | 25 | /// 26 | /// 设计器支持所需的方法 - 不要 27 | /// 使用代码编辑器修改此方法的内容。 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormPingYi)); 32 | this.groupBox1 = new System.Windows.Forms.GroupBox(); 33 | this.label1 = new System.Windows.Forms.Label(); 34 | this.label2 = new System.Windows.Forms.Label(); 35 | this.textX = new System.Windows.Forms.TextBox(); 36 | this.textY = new System.Windows.Forms.TextBox(); 37 | this.groupBox2 = new System.Windows.Forms.GroupBox(); 38 | this.butPingYi = new System.Windows.Forms.Button(); 39 | this.groupBox1.SuspendLayout(); 40 | this.groupBox2.SuspendLayout(); 41 | this.SuspendLayout(); 42 | // 43 | // groupBox1 44 | // 45 | this.groupBox1.Controls.Add(this.textY); 46 | this.groupBox1.Controls.Add(this.textX); 47 | this.groupBox1.Controls.Add(this.label2); 48 | this.groupBox1.Controls.Add(this.label1); 49 | this.groupBox1.Location = new System.Drawing.Point(12, 5); 50 | this.groupBox1.Name = "groupBox1"; 51 | this.groupBox1.Size = new System.Drawing.Size(263, 122); 52 | this.groupBox1.TabIndex = 0; 53 | this.groupBox1.TabStop = false; 54 | // 55 | // label1 56 | // 57 | this.label1.AutoSize = true; 58 | this.label1.Location = new System.Drawing.Point(37, 36); 59 | this.label1.Name = "label1"; 60 | this.label1.Size = new System.Drawing.Size(83, 12); 61 | this.label1.TabIndex = 0; 62 | this.label1.Text = "请输入X偏移量"; 63 | // 64 | // label2 65 | // 66 | this.label2.AutoSize = true; 67 | this.label2.Location = new System.Drawing.Point(37, 85); 68 | this.label2.Name = "label2"; 69 | this.label2.Size = new System.Drawing.Size(83, 12); 70 | this.label2.TabIndex = 1; 71 | this.label2.Text = "请输入Y偏移量"; 72 | // 73 | // textX 74 | // 75 | this.textX.Location = new System.Drawing.Point(166, 33); 76 | this.textX.Name = "textX"; 77 | this.textX.Size = new System.Drawing.Size(52, 21); 78 | this.textX.TabIndex = 2; 79 | // 80 | // textY 81 | // 82 | this.textY.Location = new System.Drawing.Point(166, 82); 83 | this.textY.Name = "textY"; 84 | this.textY.Size = new System.Drawing.Size(52, 21); 85 | this.textY.TabIndex = 3; 86 | // 87 | // groupBox2 88 | // 89 | this.groupBox2.Controls.Add(this.butPingYi); 90 | this.groupBox2.Location = new System.Drawing.Point(12, 133); 91 | this.groupBox2.Name = "groupBox2"; 92 | this.groupBox2.Size = new System.Drawing.Size(263, 65); 93 | this.groupBox2.TabIndex = 1; 94 | this.groupBox2.TabStop = false; 95 | // 96 | // butPingYi 97 | // 98 | this.butPingYi.Location = new System.Drawing.Point(39, 20); 99 | this.butPingYi.Name = "butPingYi"; 100 | this.butPingYi.Size = new System.Drawing.Size(179, 28); 101 | this.butPingYi.TabIndex = 0; 102 | this.butPingYi.Text = "确定"; 103 | this.butPingYi.UseVisualStyleBackColor = true; 104 | this.butPingYi.Click += new System.EventHandler(this.butPingYi_Click); 105 | // 106 | // FormPingYi 107 | // 108 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 109 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 110 | this.BackColor = System.Drawing.Color.LavenderBlush; 111 | this.ClientSize = new System.Drawing.Size(287, 210); 112 | this.Controls.Add(this.groupBox2); 113 | this.Controls.Add(this.groupBox1); 114 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 115 | this.Name = "FormPingYi"; 116 | this.Text = "图像平移"; 117 | this.groupBox1.ResumeLayout(false); 118 | this.groupBox1.PerformLayout(); 119 | this.groupBox2.ResumeLayout(false); 120 | this.ResumeLayout(false); 121 | 122 | } 123 | 124 | #endregion 125 | 126 | private System.Windows.Forms.GroupBox groupBox1; 127 | private System.Windows.Forms.Label label2; 128 | private System.Windows.Forms.Label label1; 129 | private System.Windows.Forms.TextBox textY; 130 | private System.Windows.Forms.TextBox textX; 131 | private System.Windows.Forms.GroupBox groupBox2; 132 | private System.Windows.Forms.Button butPingYi; 133 | } 134 | } -------------------------------------------------------------------------------- /Image Processing/FormPingYi.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Text; 7 | using System.Windows.Forms; 8 | 9 | namespace Image_Processing 10 | { 11 | public partial class FormPingYi : Form 12 | { 13 | int X, Y; 14 | public int XValue() 15 | { 16 | X = int.Parse(textX.Text); 17 | return X; 18 | } 19 | public int YValue() 20 | { 21 | Y = int.Parse(textY.Text); 22 | 23 | return Y; 24 | } 25 | public FormPingYi() 26 | { 27 | InitializeComponent(); 28 | } 29 | 30 | private void butPingYi_Click(object sender, EventArgs e) 31 | { 32 | this.Close(); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /Image Processing/FormPingYi.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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | 123 | AAABAAEAEBAAAAEACABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAB 124 | AAAAAAAAcSr1AHIs9QB0L/UAdTH1AHg19QB7OfYAfDv2AH499gB/QPYAgEH2AIJF9gCERvYAhkr2AIhN 125 | 9wCMU/cAjVX3AJBZ9wCTXfcAlWH4AJtp+ACca/gAnm34AKBx+ACjdfkApnn5AKh9+QCqgPkAr4f5ALGK 126 | +gCzjfoAtZH6ALmW+gC8mvoAvZ36AMGh+wDDpvsAx6v7AMmu+wDKsPsAzLL7ANC5/ADTvfwA1L78ANbB 127 | /ADXxPwA2cX8ANvJ/ADezv0A4ND9AOPV/QDk1/0A5tn9AOne/QDs4v4A7+f+APHq/gDy7P4A9O/+APbx 128 | /gD49f4A+/n/APz6/wD+/v8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 129 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 130 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 131 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 132 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 133 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 134 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 135 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 136 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 137 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 138 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 139 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 140 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 141 | AAD///8AAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQQMDQcBAQEBAQEBFBIFAQEQNTwiAQEBDBMMASI+LQwB 142 | ETg+JAEBGTgpDAEOOzsZDig8PjIUEi48FAEBBTI8Ihg4Pj44JB03NA4BAQQpPikBEjg+JAEcPi0JAQEB 143 | ID40BRA4PiIBID4oBwEBARg+OBQQOD4kDC0+HQEBAQEONzckID4+Mik0IgcBAQEBAQgIBBM7PigMAQEB 144 | AQEBARAuLS0wPD43KDAuGgEBAQEOKCYkKT4+NSQmKBQBAQEBAQEBARE3PiQBAQEBAQEBAQEBAQEFGBoQ 145 | AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 146 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= 147 | 148 | 149 | -------------------------------------------------------------------------------- /Image Processing/FormQRCode.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Image_Processing 2 | { 3 | partial class FormQRCode 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 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormQRCode)); 32 | this.pictureBoxRs = new System.Windows.Forms.PictureBox(); 33 | this.buttonAnalysis = new System.Windows.Forms.Button(); 34 | this.buttonPrint = new System.Windows.Forms.Button(); 35 | this.buttonBarcode = new System.Windows.Forms.Button(); 36 | this.buttonQrcode = new System.Windows.Forms.Button(); 37 | this.txtMsg = new System.Windows.Forms.TextBox(); 38 | this.label1 = new System.Windows.Forms.Label(); 39 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxRs)).BeginInit(); 40 | this.SuspendLayout(); 41 | // 42 | // pictureBoxRs 43 | // 44 | this.pictureBoxRs.Location = new System.Drawing.Point(56, 163); 45 | this.pictureBoxRs.Name = "pictureBoxRs"; 46 | this.pictureBoxRs.Size = new System.Drawing.Size(519, 275); 47 | this.pictureBoxRs.TabIndex = 10; 48 | this.pictureBoxRs.TabStop = false; 49 | // 50 | // buttonAnalysis 51 | // 52 | this.buttonAnalysis.Location = new System.Drawing.Point(347, 106); 53 | this.buttonAnalysis.Name = "buttonAnalysis"; 54 | this.buttonAnalysis.Size = new System.Drawing.Size(75, 25); 55 | this.buttonAnalysis.TabIndex = 6; 56 | this.buttonAnalysis.Text = "解析"; 57 | this.buttonAnalysis.UseVisualStyleBackColor = true; 58 | this.buttonAnalysis.Click += new System.EventHandler(this.buttonAnalysis_Click); 59 | // 60 | // buttonPrint 61 | // 62 | this.buttonPrint.Location = new System.Drawing.Point(470, 106); 63 | this.buttonPrint.Name = "buttonPrint"; 64 | this.buttonPrint.Size = new System.Drawing.Size(75, 25); 65 | this.buttonPrint.TabIndex = 7; 66 | this.buttonPrint.Text = "打印"; 67 | this.buttonPrint.UseVisualStyleBackColor = true; 68 | this.buttonPrint.Click += new System.EventHandler(this.buttonPrint_Click_1); 69 | // 70 | // buttonBarcode 71 | // 72 | this.buttonBarcode.Location = new System.Drawing.Point(216, 106); 73 | this.buttonBarcode.Name = "buttonBarcode"; 74 | this.buttonBarcode.Size = new System.Drawing.Size(92, 25); 75 | this.buttonBarcode.TabIndex = 8; 76 | this.buttonBarcode.Text = "生成二维码"; 77 | this.buttonBarcode.UseVisualStyleBackColor = true; 78 | this.buttonBarcode.Click += new System.EventHandler(this.buttonBarcode_Click_1); 79 | // 80 | // buttonQrcode 81 | // 82 | this.buttonQrcode.AutoSize = true; 83 | this.buttonQrcode.Location = new System.Drawing.Point(83, 106); 84 | this.buttonQrcode.Name = "buttonQrcode"; 85 | this.buttonQrcode.Size = new System.Drawing.Size(92, 25); 86 | this.buttonQrcode.TabIndex = 9; 87 | this.buttonQrcode.Text = "生成条形码"; 88 | this.buttonQrcode.UseVisualStyleBackColor = true; 89 | this.buttonQrcode.Click += new System.EventHandler(this.buttonQrcode_Click_1); 90 | // 91 | // txtMsg 92 | // 93 | this.txtMsg.Location = new System.Drawing.Point(216, 35); 94 | this.txtMsg.Name = "txtMsg"; 95 | this.txtMsg.Size = new System.Drawing.Size(329, 25); 96 | this.txtMsg.TabIndex = 5; 97 | // 98 | // label1 99 | // 100 | this.label1.AutoSize = true; 101 | this.label1.Location = new System.Drawing.Point(56, 38); 102 | this.label1.Name = "label1"; 103 | this.label1.Size = new System.Drawing.Size(127, 15); 104 | this.label1.TabIndex = 4; 105 | this.label1.Text = "请输入生成内容:"; 106 | // 107 | // FormQRCode 108 | // 109 | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); 110 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 111 | this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); 112 | this.ClientSize = new System.Drawing.Size(631, 472); 113 | this.Controls.Add(this.pictureBoxRs); 114 | this.Controls.Add(this.buttonAnalysis); 115 | this.Controls.Add(this.buttonPrint); 116 | this.Controls.Add(this.buttonBarcode); 117 | this.Controls.Add(this.buttonQrcode); 118 | this.Controls.Add(this.txtMsg); 119 | this.Controls.Add(this.label1); 120 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 121 | this.Name = "FormQRCode"; 122 | this.Text = "FormQRCode"; 123 | this.Load += new System.EventHandler(this.FormQRCode_Load); 124 | ((System.ComponentModel.ISupportInitialize)(this.pictureBoxRs)).EndInit(); 125 | this.ResumeLayout(false); 126 | this.PerformLayout(); 127 | 128 | } 129 | 130 | #endregion 131 | 132 | private System.Windows.Forms.PictureBox pictureBoxRs; 133 | private System.Windows.Forms.Button buttonAnalysis; 134 | private System.Windows.Forms.Button buttonPrint; 135 | private System.Windows.Forms.Button buttonBarcode; 136 | private System.Windows.Forms.Button buttonQrcode; 137 | private System.Windows.Forms.TextBox txtMsg; 138 | private System.Windows.Forms.Label label1; 139 | } 140 | } -------------------------------------------------------------------------------- /Image Processing/FormQRCode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Windows.Forms; 9 | using System.Text.RegularExpressions; 10 | using ZXing; 11 | using ZXing.QrCode.Internal; 12 | using ZXing.Common; 13 | using System.IO; 14 | using ZXing.QrCode; 15 | 16 | namespace Image_Processing 17 | { 18 | public partial class FormQRCode : Form 19 | { 20 | public FormQRCode() 21 | { 22 | InitializeComponent(); 23 | } 24 | 25 | 26 | private BarCodeClass bcc = new BarCodeClass(); 27 | 28 | private DocementBase _docement; 29 | 30 | private void FormQRCode_Load(object sender, EventArgs e) 31 | { 32 | txtMsg.Text = System.DateTime.Now.ToString("yyyyMMddhhmmss").Substring(0, 12); 33 | } 34 | 35 | 36 | 37 | /* private void buttonBarcode_Click(object sender, EventArgs e) 38 | { 39 | bcc.CreateQuickMark(pictureBoxRs, txtMsg.Text); 40 | } 41 | */ 42 | private void buttonQrcode_Click_1(object sender, EventArgs e) 43 | { 44 | bcc.CreateBarCode(pictureBoxRs, txtMsg.Text); 45 | } 46 | 47 | private void buttonBarcode_Click_1(object sender, EventArgs e) 48 | { 49 | bcc.CreateQuickMark(pictureBoxRs, txtMsg.Text); 50 | } 51 | private void buttonAnalysis_Click(object sender, EventArgs e) 52 | { 53 | if (pictureBoxRs.Image == null) 54 | 55 | { 56 | 57 | MessageBox.Show("请录入图像后再进行解码!"); 58 | 59 | return; 60 | } 61 | BarcodeReader reader = new BarcodeReader(); 62 | 63 | Result result = reader.Decode((Bitmap)pictureBoxRs.Image); 64 | 65 | MessageBox.Show(result.Text); 66 | } 67 | 68 | 69 | 70 | 71 | 72 | private void buttonPrint_Click_1(object sender, EventArgs e) 73 | { 74 | if (pictureBoxRs.Image == null) 75 | 76 | { 77 | 78 | MessageBox.Show("You Must Load an Image first!"); 79 | 80 | return; 81 | 82 | } 83 | 84 | else 85 | 86 | { 87 | 88 | _docement = new imageDocument(pictureBoxRs.Image); 89 | 90 | } 91 | 92 | _docement.showPrintPreviewDialog(); 93 | } 94 | } 95 | } 96 | 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /Image Processing/FormTouMing.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Image_Processing 2 | { 3 | partial class FormTouMing 4 | { 5 | /// 6 | /// 必需的设计器变量。 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// 清理所有正在使用的资源。 12 | /// 13 | /// 如果应释放托管资源,为 true;否则为 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 窗体设计器生成的代码 24 | 25 | /// 26 | /// 设计器支持所需的方法 - 不要 27 | /// 使用代码编辑器修改此方法的内容。 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormTouMing)); 32 | this.groupBox1 = new System.Windows.Forms.GroupBox(); 33 | this.butTouMingBH = new System.Windows.Forms.Button(); 34 | this.panel5 = new System.Windows.Forms.Panel(); 35 | this.labTouMingBH = new System.Windows.Forms.Label(); 36 | this.textTouMingBH = new System.Windows.Forms.TextBox(); 37 | this.trackBarTouMingBH = new System.Windows.Forms.TrackBar(); 38 | this.groupBox1.SuspendLayout(); 39 | this.panel5.SuspendLayout(); 40 | ((System.ComponentModel.ISupportInitialize)(this.trackBarTouMingBH)).BeginInit(); 41 | this.SuspendLayout(); 42 | // 43 | // groupBox1 44 | // 45 | this.groupBox1.Controls.Add(this.butTouMingBH); 46 | this.groupBox1.Controls.Add(this.panel5); 47 | this.groupBox1.Location = new System.Drawing.Point(12, 12); 48 | this.groupBox1.Name = "groupBox1"; 49 | this.groupBox1.Size = new System.Drawing.Size(358, 135); 50 | this.groupBox1.TabIndex = 1; 51 | this.groupBox1.TabStop = false; 52 | // 53 | // butTouMingBH 54 | // 55 | this.butTouMingBH.Location = new System.Drawing.Point(6, 102); 56 | this.butTouMingBH.Name = "butTouMingBH"; 57 | this.butTouMingBH.Size = new System.Drawing.Size(346, 27); 58 | this.butTouMingBH.TabIndex = 39; 59 | this.butTouMingBH.Text = "确定"; 60 | this.butTouMingBH.UseVisualStyleBackColor = true; 61 | this.butTouMingBH.Click += new System.EventHandler(this.butTouMingBH_Click); 62 | // 63 | // panel5 64 | // 65 | this.panel5.Controls.Add(this.labTouMingBH); 66 | this.panel5.Controls.Add(this.textTouMingBH); 67 | this.panel5.Controls.Add(this.trackBarTouMingBH); 68 | this.panel5.Location = new System.Drawing.Point(6, 20); 69 | this.panel5.Name = "panel5"; 70 | this.panel5.Size = new System.Drawing.Size(348, 66); 71 | this.panel5.TabIndex = 47; 72 | // 73 | // labTouMingBH 74 | // 75 | this.labTouMingBH.AutoSize = true; 76 | this.labTouMingBH.Location = new System.Drawing.Point(8, 24); 77 | this.labTouMingBH.Name = "labTouMingBH"; 78 | this.labTouMingBH.Size = new System.Drawing.Size(71, 12); 79 | this.labTouMingBH.TabIndex = 0; 80 | this.labTouMingBH.Text = "请调节 a 值"; 81 | // 82 | // textTouMingBH 83 | // 84 | this.textTouMingBH.Location = new System.Drawing.Point(291, 19); 85 | this.textTouMingBH.Name = "textTouMingBH"; 86 | this.textTouMingBH.Size = new System.Drawing.Size(44, 21); 87 | this.textTouMingBH.TabIndex = 40; 88 | // 89 | // trackBarTouMingBH 90 | // 91 | this.trackBarTouMingBH.Location = new System.Drawing.Point(89, 13); 92 | this.trackBarTouMingBH.Maximum = 255; 93 | this.trackBarTouMingBH.Name = "trackBarTouMingBH"; 94 | this.trackBarTouMingBH.Size = new System.Drawing.Size(196, 45); 95 | this.trackBarTouMingBH.TabIndex = 38; 96 | this.trackBarTouMingBH.Value = 128; 97 | this.trackBarTouMingBH.Scroll += new System.EventHandler(this.trackBarTouMingBH_Scroll); 98 | // 99 | // FormTouMing 100 | // 101 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); 102 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 103 | this.BackColor = System.Drawing.Color.LavenderBlush; 104 | this.ClientSize = new System.Drawing.Size(382, 162); 105 | this.Controls.Add(this.groupBox1); 106 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 107 | this.Name = "FormTouMing"; 108 | this.Text = "透明变换"; 109 | this.groupBox1.ResumeLayout(false); 110 | this.panel5.ResumeLayout(false); 111 | this.panel5.PerformLayout(); 112 | ((System.ComponentModel.ISupportInitialize)(this.trackBarTouMingBH)).EndInit(); 113 | this.ResumeLayout(false); 114 | 115 | } 116 | 117 | #endregion 118 | 119 | private System.Windows.Forms.GroupBox groupBox1; 120 | private System.Windows.Forms.Button butTouMingBH; 121 | private System.Windows.Forms.Panel panel5; 122 | private System.Windows.Forms.Label labTouMingBH; 123 | private System.Windows.Forms.TextBox textTouMingBH; 124 | private System.Windows.Forms.TrackBar trackBarTouMingBH; 125 | } 126 | } -------------------------------------------------------------------------------- /Image Processing/FormTouMing.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Text; 7 | using System.Windows.Forms; 8 | 9 | namespace Image_Processing 10 | { 11 | public partial class FormTouMing : Form 12 | { 13 | int value; 14 | public FormTouMing() 15 | { 16 | InitializeComponent(); 17 | } 18 | 19 | private void trackBarTouMingBH_Scroll(object sender, EventArgs e) 20 | { 21 | //拉动滑动条调节α的值 22 | textTouMingBH.Text = trackBarTouMingBH.Value.ToString(); 23 | } 24 | 25 | public int TouMingBHValue() 26 | { 27 | // 以下两种方法都行 28 | value = trackBarTouMingBH.Value;//通过滑动条给 a 赋值 29 | //LD = int.Parse(textLD.Text); 30 | 31 | return value; 32 | } 33 | 34 | private void butTouMingBH_Click(object sender, EventArgs e) 35 | { 36 | this.Close(); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /Image Processing/Formtxt convert picture.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Image_Processing 2 | { 3 | partial class Formtxtconpic 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 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Formtxtconpic)); 32 | this.button_font = new System.Windows.Forms.Button(); 33 | this.btn_savepic = new System.Windows.Forms.Button(); 34 | this.comboBox_pictype = new System.Windows.Forms.ComboBox(); 35 | this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); 36 | this.label111 = new System.Windows.Forms.Label(); 37 | this.label112 = new System.Windows.Forms.Label(); 38 | this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); 39 | this.textBox1 = new System.Windows.Forms.TextBox(); 40 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); 41 | this.SuspendLayout(); 42 | // 43 | // button_font 44 | // 45 | this.button_font.BackColor = System.Drawing.SystemColors.Info; 46 | this.button_font.Location = new System.Drawing.Point(271, 46); 47 | this.button_font.Margin = new System.Windows.Forms.Padding(4); 48 | this.button_font.Name = "button_font"; 49 | this.button_font.Size = new System.Drawing.Size(118, 30); 50 | this.button_font.TabIndex = 0; 51 | this.button_font.Text = "字体选择"; 52 | this.button_font.UseVisualStyleBackColor = false; 53 | this.button_font.Click += new System.EventHandler(this.button_font_Click); 54 | // 55 | // btn_savepic 56 | // 57 | this.btn_savepic.BackColor = System.Drawing.SystemColors.Info; 58 | this.btn_savepic.Location = new System.Drawing.Point(686, 45); 59 | this.btn_savepic.Margin = new System.Windows.Forms.Padding(4); 60 | this.btn_savepic.Name = "btn_savepic"; 61 | this.btn_savepic.Size = new System.Drawing.Size(93, 30); 62 | this.btn_savepic.TabIndex = 0; 63 | this.btn_savepic.Text = "保存"; 64 | this.btn_savepic.UseVisualStyleBackColor = false; 65 | this.btn_savepic.Click += new System.EventHandler(this.btn_savepic_Click); 66 | // 67 | // comboBox_pictype 68 | // 69 | this.comboBox_pictype.BackColor = System.Drawing.SystemColors.Info; 70 | this.comboBox_pictype.FormattingEnabled = true; 71 | this.comboBox_pictype.Items.AddRange(new object[] { 72 | ".jpg", 73 | ".bmp", 74 | ".png"}); 75 | this.comboBox_pictype.Location = new System.Drawing.Point(530, 50); 76 | this.comboBox_pictype.Margin = new System.Windows.Forms.Padding(4); 77 | this.comboBox_pictype.Name = "comboBox_pictype"; 78 | this.comboBox_pictype.Size = new System.Drawing.Size(121, 23); 79 | this.comboBox_pictype.TabIndex = 1; 80 | this.comboBox_pictype.Text = ".jpg"; 81 | // 82 | // numericUpDown1 83 | // 84 | this.numericUpDown1.BackColor = System.Drawing.SystemColors.Info; 85 | this.numericUpDown1.Location = new System.Drawing.Point(162, 47); 86 | this.numericUpDown1.Margin = new System.Windows.Forms.Padding(4); 87 | this.numericUpDown1.Name = "numericUpDown1"; 88 | this.numericUpDown1.Size = new System.Drawing.Size(73, 25); 89 | this.numericUpDown1.TabIndex = 2; 90 | this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged); 91 | // 92 | // label111 93 | // 94 | this.label111.AutoSize = true; 95 | this.label111.BackColor = System.Drawing.SystemColors.Window; 96 | this.label111.FlatStyle = System.Windows.Forms.FlatStyle.Popup; 97 | this.label111.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 98 | this.label111.Location = new System.Drawing.Point(78, 50); 99 | this.label111.Name = "label111"; 100 | this.label111.Size = new System.Drawing.Size(66, 19); 101 | this.label111.TabIndex = 4; 102 | this.label111.Text = "字号:"; 103 | // 104 | // label112 105 | // 106 | this.label112.AutoSize = true; 107 | this.label112.BackColor = System.Drawing.SystemColors.Window; 108 | this.label112.FlatStyle = System.Windows.Forms.FlatStyle.Popup; 109 | this.label112.Font = new System.Drawing.Font("宋体", 10.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); 110 | this.label112.Location = new System.Drawing.Point(419, 53); 111 | this.label112.Name = "label112"; 112 | this.label112.Size = new System.Drawing.Size(104, 19); 113 | this.label112.TabIndex = 4; 114 | this.label112.Text = "保存格式:"; 115 | // 116 | // textBox1 117 | // 118 | this.textBox1.Location = new System.Drawing.Point(61, 119); 119 | this.textBox1.Multiline = true; 120 | this.textBox1.Name = "textBox1"; 121 | this.textBox1.Size = new System.Drawing.Size(681, 289); 122 | this.textBox1.TabIndex = 6; 123 | // 124 | // Formtxtconpic 125 | // 126 | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); 127 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 128 | this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); 129 | this.ClientSize = new System.Drawing.Size(818, 481); 130 | this.Controls.Add(this.textBox1); 131 | this.Controls.Add(this.label112); 132 | this.Controls.Add(this.label111); 133 | this.Controls.Add(this.numericUpDown1); 134 | this.Controls.Add(this.comboBox_pictype); 135 | this.Controls.Add(this.btn_savepic); 136 | this.Controls.Add(this.button_font); 137 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 138 | this.Name = "Formtxtconpic"; 139 | this.Text = "文字转图片"; 140 | this.Load += new System.EventHandler(this.Formtxtconpic_Load); 141 | ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); 142 | this.ResumeLayout(false); 143 | this.PerformLayout(); 144 | 145 | } 146 | 147 | #endregion 148 | 149 | private System.Windows.Forms.Button button_font; 150 | private System.Windows.Forms.Button btn_savepic; 151 | private System.Windows.Forms.ComboBox comboBox_pictype; 152 | private System.Windows.Forms.NumericUpDown numericUpDown1; 153 | protected System.Windows.Forms.Label label111; 154 | protected System.Windows.Forms.Label label112; 155 | private System.Windows.Forms.SaveFileDialog saveFileDialog1; 156 | private System.Windows.Forms.TextBox textBox1; 157 | } 158 | } -------------------------------------------------------------------------------- /Image Processing/Formtxt convert picture.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | using System.Drawing.Imaging; 11 | 12 | namespace Image_Processing 13 | { 14 | public partial class Formtxtconpic : Form 15 | { 16 | public Formtxtconpic() 17 | { 18 | InitializeComponent(); 19 | 20 | } 21 | #region//保存图片 22 | private void btn_savepic_Click(object sender, EventArgs e)//保存 23 | { 24 | Graphics myGraphics = this.CreateGraphics(); 25 | saveFileDialog1.Filter = "*.png|*.png|*.jpeg|*.jpg|*.bmp|*.bmp"; 26 | Bitmap myBitmap = new Bitmap(textBox1.Width, textBox1.Height); 27 | myGraphics = Graphics.FromImage(myBitmap); 28 | 29 | if (saveFileDialog1.ShowDialog() == DialogResult.OK) 30 | { 31 | switch (comboBox_pictype.Text) 32 | { 33 | 34 | case ".jpg": 35 | myGraphics.FillRectangle(new SolidBrush(Color.White), 0, 0, textBox1.Width, textBox1.Height); 36 | myGraphics.DrawString(textBox1.Text, new Font(textBox1.Font.FontFamily.Name.ToString(), textBox1.Font.Size), new SolidBrush(Color.Black), new Point(0, 2)); 37 | myBitmap.Save(saveFileDialog1.FileName, ImageFormat.Jpeg); 38 | 39 | myGraphics.Dispose(); 40 | myBitmap.Dispose(); 41 | break; 42 | case ".bmp": 43 | myGraphics.FillRectangle(new SolidBrush(Color.White), 0, 0, textBox1.Width, textBox1.Height); 44 | myGraphics.DrawString(textBox1.Text, new Font(textBox1.Font.FontFamily.Name.ToString(), textBox1.Font.Size), new SolidBrush(Color.Black), new Point(0, 2)); 45 | myBitmap.Save(saveFileDialog1.FileName, ImageFormat.Bmp); 46 | 47 | myGraphics.Dispose(); 48 | myBitmap.Dispose(); 49 | break; 50 | case ".png": 51 | myGraphics.FillRectangle(new SolidBrush(Color.Transparent), 0, 0, textBox1.Width, textBox1.Height); 52 | myGraphics.DrawString(textBox1.Text, new Font(textBox1.Font.FontFamily.Name.ToString(), textBox1.Font.Size), new SolidBrush(Color.Black), new Point(0, 2)); 53 | myBitmap.Save(saveFileDialog1.FileName, ImageFormat.Png); 54 | 55 | myGraphics.Dispose(); 56 | myBitmap.Dispose(); 57 | break; 58 | } 59 | 60 | /* switch (comboBox_pictype.Text) 61 | { 62 | case ".jpg": 63 | myGraphics.FillRectangle(new SolidBrush(Color.White), 0, 0, textBox1.Width, textBox1.Height); 64 | myGraphics.DrawString(textBox1.Text, new Font(textBox1.Font.FontFamily.Name.ToString(), textBox1.Font.Size), new SolidBrush(Color.Black), new Point(0, 2)); 65 | myBitmap.Save(saveFileDialog1.FileName, ImageFormat.Jpeg); 66 | 67 | myGraphics.Dispose(); 68 | myBitmap.Dispose(); 69 | break; 70 | case ".bmp": 71 | myGraphics.FillRectangle(new SolidBrush(Color.White), 0, 0, textBox1.Width, textBox1.Height); 72 | myGraphics.DrawString(textBox1.Text, new Font(textBox1.Font.FontFamily.Name.ToString(), textBox1.Font.Size), new SolidBrush(Color.Black), new Point(0, 2)); 73 | myBitmap.Save(saveFileDialog1.FileName, ImageFormat.Bmp); 74 | 75 | myGraphics.Dispose(); 76 | myBitmap.Dispose(); 77 | break; 78 | case ".png": 79 | myGraphics.FillRectangle(new SolidBrush(Color.Transparent), 0, 0, textBox1.Width, textBox1.Height); 80 | myGraphics.DrawString(textBox1.Text, new Font(textBox1.Font.FontFamily.Name.ToString(), textBox1.Font.Size), new SolidBrush(Color.Black), new Point(0, 2)); 81 | myBitmap.Save(saveFileDialog1.FileName, ImageFormat.Png); 82 | 83 | myGraphics.Dispose(); 84 | myBitmap.Dispose(); 85 | break; 86 | }*/ 87 | } 88 | } 89 | #endregion 90 | 91 | private void Formtxtconpic_Load(object sender, EventArgs e) 92 | { 93 | numericUpDown1.Value = (int)textBox1.Font.Size; //获取textbox的大小 94 | // button_font.Text = textBox1 .Font.FontFamily.Name.ToString(); 95 | button_font.Text = "字体选择"; 96 | 97 | 98 | // numericUpDown1.Value = (int)textBox1.Font.Size; //获取textbox的大小 99 | // button_font.Text = textBox1.Font.FontFamily.Name.ToString(); 100 | 101 | } 102 | 103 | private void numericUpDown1_ValueChanged(object sender, EventArgs e) 104 | { 105 | textBox1.Font = new Font(button_font.Text.ToString(), (float)numericUpDown1.Value); 106 | // textBox1.Font = new Font(button_font.Text.ToString(), (float)numericUpDown1.Value); 107 | //richTextBox1.Font= new Font(button_font.Text.ToString(), (float)numericUpDown1.Value); 108 | } 109 | 110 | private void button_font_Click(object sender, EventArgs e) 111 | { 112 | FontDialog fdig = new FontDialog(); 113 | if (fdig.ShowDialog() == DialogResult.Cancel) 114 | return; 115 | 116 | // richTextBox1.Font = fdig.Font; 117 | textBox1.Font = fdig.Font; 118 | 119 | 120 | //button_font.Text = textBox1.Font.FontFamily.Name.ToString(); 121 | 122 | button_font.Text = textBox1.Font.FontFamily.Name.ToString(); 123 | 124 | numericUpDown1.Value = (int)fdig.Font.Size; 125 | } 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /Image Processing/LicensePlateRecognitionForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Image_Processing 2 | { 3 | partial class LicensePlateRecognitionForm 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.splitContainer1 = new System.Windows.Forms.SplitContainer(); 32 | this.panel1 = new System.Windows.Forms.Panel(); 33 | this.panel2 = new System.Windows.Forms.Panel(); 34 | this.processTimeLabel = new System.Windows.Forms.Label(); 35 | this.informationLabel = new System.Windows.Forms.Label(); 36 | this.textBox1 = new System.Windows.Forms.TextBox(); 37 | this.button1 = new System.Windows.Forms.Button(); 38 | this.label1 = new System.Windows.Forms.Label(); 39 | ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); 40 | this.splitContainer1.Panel1.SuspendLayout(); 41 | this.splitContainer1.Panel2.SuspendLayout(); 42 | this.splitContainer1.SuspendLayout(); 43 | this.panel2.SuspendLayout(); 44 | this.SuspendLayout(); 45 | // 46 | // splitContainer1 47 | // 48 | this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; 49 | this.splitContainer1.Location = new System.Drawing.Point(0, 0); 50 | this.splitContainer1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); 51 | this.splitContainer1.Name = "splitContainer1"; 52 | // 53 | // splitContainer1.Panel1 54 | // 55 | this.splitContainer1.Panel1.Controls.Add(this.panel1); 56 | // 57 | // splitContainer1.Panel2 58 | // 59 | this.splitContainer1.Panel2.Controls.Add(this.panel2); 60 | this.splitContainer1.Size = new System.Drawing.Size(1048, 438); 61 | this.splitContainer1.SplitterDistance = 286; 62 | this.splitContainer1.SplitterWidth = 5; 63 | this.splitContainer1.TabIndex = 1; 64 | // 65 | // panel1 66 | // 67 | this.panel1.AutoScroll = true; 68 | this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; 69 | this.panel1.Location = new System.Drawing.Point(0, 0); 70 | this.panel1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); 71 | this.panel1.Name = "panel1"; 72 | this.panel1.Size = new System.Drawing.Size(286, 438); 73 | this.panel1.TabIndex = 0; 74 | // 75 | // panel2 76 | // 77 | this.panel2.Controls.Add(this.processTimeLabel); 78 | this.panel2.Controls.Add(this.informationLabel); 79 | this.panel2.Controls.Add(this.textBox1); 80 | this.panel2.Controls.Add(this.button1); 81 | this.panel2.Controls.Add(this.label1); 82 | this.panel2.Dock = System.Windows.Forms.DockStyle.Top; 83 | this.panel2.Location = new System.Drawing.Point(0, 0); 84 | this.panel2.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); 85 | this.panel2.Name = "panel2"; 86 | this.panel2.Size = new System.Drawing.Size(757, 93); 87 | this.panel2.TabIndex = 3; 88 | // 89 | // processTimeLabel 90 | // 91 | this.processTimeLabel.AutoSize = true; 92 | this.processTimeLabel.Location = new System.Drawing.Point(45, 62); 93 | this.processTimeLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); 94 | this.processTimeLabel.Name = "processTimeLabel"; 95 | this.processTimeLabel.Size = new System.Drawing.Size(0, 15); 96 | this.processTimeLabel.TabIndex = 4; 97 | // 98 | // informationLabel 99 | // 100 | this.informationLabel.AutoSize = true; 101 | this.informationLabel.Location = new System.Drawing.Point(36, 63); 102 | this.informationLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); 103 | this.informationLabel.Name = "informationLabel"; 104 | this.informationLabel.Size = new System.Drawing.Size(0, 15); 105 | this.informationLabel.TabIndex = 3; 106 | // 107 | // textBox1 108 | // 109 | this.textBox1.Location = new System.Drawing.Point(97, 24); 110 | this.textBox1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); 111 | this.textBox1.Name = "textBox1"; 112 | this.textBox1.ReadOnly = true; 113 | this.textBox1.Size = new System.Drawing.Size(479, 25); 114 | this.textBox1.TabIndex = 2; 115 | // 116 | // button1 117 | // 118 | this.button1.Location = new System.Drawing.Point(585, 22); 119 | this.button1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); 120 | this.button1.Name = "button1"; 121 | this.button1.Size = new System.Drawing.Size(100, 27); 122 | this.button1.TabIndex = 1; 123 | this.button1.Text = "Load Image"; 124 | this.button1.UseVisualStyleBackColor = true; 125 | this.button1.Click += new System.EventHandler(this.button1_Click); 126 | // 127 | // label1 128 | // 129 | this.label1.AutoSize = true; 130 | this.label1.Location = new System.Drawing.Point(36, 28); 131 | this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); 132 | this.label1.Name = "label1"; 133 | this.label1.Size = new System.Drawing.Size(47, 15); 134 | this.label1.TabIndex = 0; 135 | this.label1.Text = "File:"; 136 | // 137 | // LicensePlateRecognitionForm 138 | // 139 | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); 140 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 141 | this.ClientSize = new System.Drawing.Size(1048, 438); 142 | this.Controls.Add(this.splitContainer1); 143 | this.Name = "LicensePlateRecognitionForm"; 144 | this.Text = "LicensePlateRecognitionForm"; 145 | this.splitContainer1.Panel1.ResumeLayout(false); 146 | this.splitContainer1.Panel2.ResumeLayout(false); 147 | ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); 148 | this.splitContainer1.ResumeLayout(false); 149 | this.panel2.ResumeLayout(false); 150 | this.panel2.PerformLayout(); 151 | this.ResumeLayout(false); 152 | 153 | } 154 | 155 | #endregion 156 | 157 | private System.Windows.Forms.SplitContainer splitContainer1; 158 | private System.Windows.Forms.Panel panel1; 159 | private Emgu.CV.UI.ImageBox imageBox1; 160 | private System.Windows.Forms.Panel panel2; 161 | private System.Windows.Forms.Label processTimeLabel; 162 | private System.Windows.Forms.Label informationLabel; 163 | private System.Windows.Forms.OpenFileDialog openFileDialog1; 164 | private System.Windows.Forms.TextBox textBox1; 165 | private System.Windows.Forms.Button button1; 166 | private System.Windows.Forms.Label label1; 167 | } 168 | } -------------------------------------------------------------------------------- /Image Processing/LicensePlateRecognitionForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | using Emgu.CV; 12 | using Emgu.CV.CvEnum; 13 | using Emgu.CV.Structure; 14 | using Emgu.CV.UI; 15 | using System.Diagnostics; 16 | using Emgu.CV.Util; 17 | using LicensePlateRecognition; 18 | 19 | namespace Image_Processing 20 | { 21 | public partial class LicensePlateRecognitionForm : Form 22 | { 23 | 24 | private LicensePlateDetector _licensePlateDetector; 25 | public LicensePlateRecognitionForm() 26 | { 27 | InitializeComponent(); 28 | _licensePlateDetector = new LicensePlateDetector(""); 29 | Mat m = new Mat("E:\\C#\\高级程序设计\\图像处理\\王先文高级程序设计\\Image+Processing\\Image Processing\\Image Processing\\license-plate.jpg"); 30 | UMat um = m.GetUMat(AccessType.ReadWrite); 31 | imageBox1.Image = um; 32 | ProcessImage(m); 33 | } 34 | private void ProcessImage(IInputOutputArray image) 35 | { 36 | Stopwatch watch = Stopwatch.StartNew(); // time the detection process 37 | 38 | List licensePlateImagesList = new List(); 39 | List filteredLicensePlateImagesList = new List(); 40 | List licenseBoxList = new List(); 41 | List words = _licensePlateDetector.DetectLicensePlate( 42 | image, 43 | licensePlateImagesList, 44 | filteredLicensePlateImagesList, 45 | licenseBoxList); 46 | 47 | watch.Stop(); //stop the timer 48 | processTimeLabel.Text = String.Format("License Plate Recognition time: {0} milli-seconds", watch.Elapsed.TotalMilliseconds); 49 | 50 | panel1.Controls.Clear(); 51 | Point startPoint = new Point(10, 10); 52 | for (int i = 0; i < words.Count; i++) 53 | { 54 | Mat dest = new Mat(); 55 | CvInvoke.VConcat(licensePlateImagesList[i], filteredLicensePlateImagesList[i], dest); 56 | AddLabelAndImage( 57 | ref startPoint, 58 | String.Format("License: {0}", words[i]), 59 | dest); 60 | PointF[] verticesF = licenseBoxList[i].GetVertices(); 61 | Point[] vertices = Array.ConvertAll(verticesF, Point.Round); 62 | using (VectorOfPoint pts = new VectorOfPoint(vertices)) 63 | CvInvoke.Polylines(image, pts, true, new Bgr(Color.Red).MCvScalar, 2); 64 | 65 | } 66 | 67 | } 68 | private void AddLabelAndImage(ref Point startPoint, String labelText, IImage image) 69 | { 70 | Label label = new Label(); 71 | panel1.Controls.Add(label); 72 | label.Text = labelText; 73 | label.Width = 100; 74 | label.Height = 30; 75 | label.Location = startPoint; 76 | startPoint.Y += label.Height; 77 | 78 | ImageBox box = new ImageBox(); 79 | panel1.Controls.Add(box); 80 | box.ClientSize = image.Size; 81 | box.Image = image; 82 | box.Location = startPoint; 83 | startPoint.Y += box.Height + 10; 84 | } 85 | 86 | private void button1_Click(object sender, EventArgs e) 87 | { 88 | DialogResult result = openFileDialog1.ShowDialog(); 89 | if (result == DialogResult.OK) 90 | { 91 | Mat img; 92 | try 93 | { 94 | img = CvInvoke.Imread(openFileDialog1.FileName); 95 | 96 | } 97 | catch 98 | { 99 | MessageBox.Show(String.Format("Invalide File: {0}", openFileDialog1.FileName)); 100 | return; 101 | } 102 | 103 | imageBox1.Image = img; //显示载入的图片 104 | 105 | 106 | UMat uImg = img.GetUMat(AccessType.ReadWrite); 107 | ProcessImage(uImg); 108 | } 109 | } 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /Image Processing/LicensePlateRecognitionForm.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 | -------------------------------------------------------------------------------- /Image Processing/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Windows.Forms; 4 | using Emgu.CV; 5 | using Emgu.Util; 6 | 7 | namespace Image_Processing 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// 应用程序的主入口点。 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new FormImage()); 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /Image Processing/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的常规信息通过下列属性集 6 | // 控制。更改这些属性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("Image Processing")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("番茄花园")] 12 | [assembly: AssemblyProduct("Image Processing")] 13 | [assembly: AssemblyCopyright("版权所有 (C) 番茄花园 2008")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 使此程序集中的类型 18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, 19 | // 则将该类型上的 ComVisible 属性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("744b20f6-5be2-405c-b182-38449d5609f5")] 24 | 25 | // 程序集的版本信息由下面四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 内部版本号 30 | // 修订号 31 | // 32 | [assembly: AssemblyVersion("1.0.0.0")] 33 | [assembly: AssemblyFileVersion("1.0.0.0")] 34 | -------------------------------------------------------------------------------- /Image Processing/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Image_Processing.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// 一个强类型的资源类,用于查找本地化的字符串等。 17 | /// 18 | // 此类是由 StronglyTypedResourceBuilder 19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen 21 | // (以 /str 作为命令选项),或重新生成 VS 项目。 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.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 | /// 返回此类使用的缓存的 ResourceManager 实例。 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("Image_Processing.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// 使用此强类型资源类,为所有资源查找 51 | /// 重写当前线程的 CurrentUICulture 属性。 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 | -------------------------------------------------------------------------------- /Image Processing/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 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /Image Processing/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Image_Processing.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.3.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 | } 27 | -------------------------------------------------------------------------------- /Image Processing/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Image Processing/VideoSurveilance.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Image_Processing 2 | { 3 | partial class VideoSurveilance 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.splitContainer1 = new System.Windows.Forms.SplitContainer(); 32 | this.panel1 = new System.Windows.Forms.Panel(); 33 | this.label1 = new System.Windows.Forms.Label(); 34 | this.panel2 = new System.Windows.Forms.Panel(); 35 | this.label2 = new System.Windows.Forms.Label(); 36 | ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); 37 | this.splitContainer1.Panel1.SuspendLayout(); 38 | this.splitContainer1.Panel2.SuspendLayout(); 39 | this.splitContainer1.SuspendLayout(); 40 | this.panel1.SuspendLayout(); 41 | this.panel2.SuspendLayout(); 42 | this.SuspendLayout(); 43 | // 44 | // splitContainer1 45 | // 46 | this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; 47 | this.splitContainer1.Location = new System.Drawing.Point(0, 0); 48 | this.splitContainer1.Name = "splitContainer1"; 49 | // 50 | // splitContainer1.Panel1 51 | // 52 | this.splitContainer1.Panel1.Controls.Add(this.panel1); 53 | // 54 | // splitContainer1.Panel2 55 | // 56 | this.splitContainer1.Panel2.Controls.Add(this.panel2); 57 | this.splitContainer1.Size = new System.Drawing.Size(1018, 494); 58 | this.splitContainer1.SplitterDistance = 513; 59 | this.splitContainer1.TabIndex = 0; 60 | // 61 | // panel1 62 | // 63 | this.panel1.Controls.Add(this.label1); 64 | this.panel1.Dock = System.Windows.Forms.DockStyle.Top; 65 | this.panel1.Location = new System.Drawing.Point(0, 0); 66 | this.panel1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); 67 | this.panel1.Name = "panel1"; 68 | this.panel1.Size = new System.Drawing.Size(513, 55); 69 | this.panel1.TabIndex = 1; 70 | // 71 | // label1 72 | // 73 | this.label1.AutoSize = true; 74 | this.label1.Location = new System.Drawing.Point(16, 15); 75 | this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); 76 | this.label1.Name = "label1"; 77 | this.label1.Size = new System.Drawing.Size(103, 15); 78 | this.label1.TabIndex = 0; 79 | this.label1.Text = "Camera Frame"; 80 | // 81 | // panel2 82 | // 83 | this.panel2.Controls.Add(this.label2); 84 | this.panel2.Dock = System.Windows.Forms.DockStyle.Top; 85 | this.panel2.Location = new System.Drawing.Point(0, 0); 86 | this.panel2.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); 87 | this.panel2.Name = "panel2"; 88 | this.panel2.Size = new System.Drawing.Size(501, 55); 89 | this.panel2.TabIndex = 1; 90 | // 91 | // label2 92 | // 93 | this.label2.AutoSize = true; 94 | this.label2.Location = new System.Drawing.Point(20, 15); 95 | this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); 96 | this.label2.Name = "label2"; 97 | this.label2.Size = new System.Drawing.Size(119, 15); 98 | this.label2.TabIndex = 0; 99 | this.label2.Text = "Forground Mask"; 100 | // 101 | // VideoSurveilance 102 | // 103 | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); 104 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 105 | this.ClientSize = new System.Drawing.Size(1018, 494); 106 | this.Controls.Add(this.splitContainer1); 107 | this.Name = "VideoSurveilance"; 108 | this.Text = "VideoSurveilance"; 109 | this.splitContainer1.Panel1.ResumeLayout(false); 110 | this.splitContainer1.Panel2.ResumeLayout(false); 111 | ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); 112 | this.splitContainer1.ResumeLayout(false); 113 | this.panel1.ResumeLayout(false); 114 | this.panel1.PerformLayout(); 115 | this.panel2.ResumeLayout(false); 116 | this.panel2.PerformLayout(); 117 | this.ResumeLayout(false); 118 | 119 | } 120 | 121 | #endregion 122 | 123 | private System.Windows.Forms.SplitContainer splitContainer1; 124 | private System.Windows.Forms.Panel panel1; 125 | private System.Windows.Forms.Label label1; 126 | private System.Windows.Forms.Panel panel2; 127 | private System.Windows.Forms.Label label2; 128 | private Emgu.CV.UI.ImageBox imageBox11; 129 | private Emgu.CV.UI.ImageBox imageBox12; 130 | } 131 | } -------------------------------------------------------------------------------- /Image Processing/VideoSurveilance.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | using Emgu.CV; 12 | using Emgu.CV.Cvb; 13 | using Emgu.CV.UI; 14 | using Emgu.CV.CvEnum; 15 | using Emgu.CV.Structure; 16 | using Emgu.CV.VideoSurveillance; 17 | 18 | namespace Image_Processing 19 | { 20 | public partial class VideoSurveilance : Form 21 | { 22 | private static VideoCapture _cameraCapture; 23 | 24 | private static BackgroundSubtractor _fgDetector; 25 | private static Emgu.CV.Cvb.CvBlobDetector _blobDetector; 26 | private static Emgu.CV.Cvb.CvTracks _tracker; 27 | 28 | public VideoSurveilance() 29 | { 30 | InitializeComponent(); 31 | Run(); 32 | } 33 | 34 | 35 | void Run() 36 | { 37 | try 38 | { 39 | _cameraCapture = new VideoCapture(); 40 | } 41 | catch (Exception e) 42 | { 43 | MessageBox.Show(e.Message); 44 | return; 45 | } 46 | 47 | _fgDetector = new Emgu.CV.VideoSurveillance.BackgroundSubtractorMOG2(); 48 | _blobDetector = new CvBlobDetector(); 49 | _tracker = new CvTracks(); 50 | 51 | Application.Idle += ProcessFrame; 52 | } 53 | 54 | void ProcessFrame(object sender, EventArgs e) 55 | { 56 | Mat frame = _cameraCapture.QueryFrame(); 57 | Mat smoothedFrame = new Mat(); 58 | CvInvoke.GaussianBlur(frame, smoothedFrame, new Size(3, 3), 1); //filter out noises 59 | //frame._SmoothGaussian(3); 60 | 61 | #region use the BG/FG detector to find the forground mask 62 | Mat forgroundMask = new Mat(); 63 | _fgDetector.Apply(smoothedFrame, forgroundMask); 64 | #endregion 65 | 66 | CvBlobs blobs = new CvBlobs(); 67 | _blobDetector.Detect(forgroundMask.ToImage(), blobs); 68 | blobs.FilterByArea(100, int.MaxValue); 69 | 70 | float scale = (frame.Width + frame.Width) / 2.0f; 71 | _tracker.Update(blobs, 0.01 * scale, 5, 5); 72 | 73 | foreach (var pair in _tracker) 74 | { 75 | CvTrack b = pair.Value; 76 | CvInvoke.Rectangle(frame, b.BoundingBox, new MCvScalar(255.0, 255.0, 255.0), 2); 77 | CvInvoke.PutText(frame, b.Id.ToString(), new Point((int)Math.Round(b.Centroid.X), (int)Math.Round(b.Centroid.Y)), FontFace.HersheyPlain, 1.0, new MCvScalar(255.0, 255.0, 255.0)); 78 | } 79 | //imageBox11.Image = null; 80 | //imageBox12.Image = null; 81 | imageBox11.Image = frame; 82 | imageBox12.Image = forgroundMask; 83 | 84 | } 85 | } 86 | } 87 | 88 | -------------------------------------------------------------------------------- /Image Processing/VideoSurveilance.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 | -------------------------------------------------------------------------------- /Image Processing/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Image Processing/image thermal recognition.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Image_Processing 2 | { 3 | partial class Formrec 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.pictureBox_rec = new System.Windows.Forms.PictureBox(); 32 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox_rec)).BeginInit(); 33 | this.SuspendLayout(); 34 | // 35 | // pictureBox_rec 36 | // 37 | this.pictureBox_rec.Location = new System.Drawing.Point(3, 31); 38 | this.pictureBox_rec.Name = "pictureBox_rec"; 39 | this.pictureBox_rec.Size = new System.Drawing.Size(649, 445); 40 | this.pictureBox_rec.TabIndex = 0; 41 | this.pictureBox_rec.TabStop = false; 42 | this.pictureBox_rec.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pictureBox_rec_MouseMove); 43 | // 44 | // Formrec 45 | // 46 | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); 47 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 48 | this.ClientSize = new System.Drawing.Size(768, 530); 49 | this.Controls.Add(this.pictureBox_rec); 50 | this.Name = "Formrec"; 51 | this.Text = "图像热识别"; 52 | this.Load += new System.EventHandler(this.Formrec_Load); 53 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox_rec)).EndInit(); 54 | this.ResumeLayout(false); 55 | 56 | } 57 | 58 | #endregion 59 | 60 | private System.Windows.Forms.PictureBox pictureBox_rec; 61 | } 62 | } -------------------------------------------------------------------------------- /Image Processing/image thermal recognition.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace Image_Processing 12 | { 13 | public partial class Formrec : Form 14 | {//- -!、、尼玛 我感觉所谓的热区 在我这里其实就是再做一份图像出来 15 | public Formrec() 16 | { 17 | InitializeComponent(); 18 | this.pictureBox_rec.SizeMode = PictureBoxSizeMode.AutoSize; 19 | this.pictureBox_rec.BorderStyle = BorderStyle.Fixed3D; 20 | this.pictureBox_rec.Location = new Point(0, 0); 21 | } 22 | Bitmap srcImg; //原始图片 23 | Bitmap infoImg; //参考图片 24 | Label lbInfo; //显示信息 25 | 26 | private void Formrec_Load(object sender, EventArgs e) 27 | { 28 | srcImg = new Bitmap("srcImage.jpg"); //加载图像 29 | infoImg = new Bitmap("infoImage.bmp"); 30 | pictureBox_rec.Image = srcImg; //显示原图 - -!、尼玛感觉srcImage创建出来是多余的 31 | this.Width = pictureBox_rec.Width + (this.Bounds.Width - this.ClientSize.Width); 32 | this.Height = pictureBox_rec.Height + (this.Bounds.Height - this.ClientSize.Height); 33 | //设置label 34 | lbInfo = new Label(); 35 | this.Controls.Add(lbInfo); 36 | lbInfo.Text = "图像热识别"; 37 | lbInfo.Parent = pictureBox_rec; 38 | lbInfo.BackColor = Color.FromArgb(150, 0, 0, 0); 39 | lbInfo.ForeColor = Color.White; 40 | lbInfo.TextAlign = ContentAlignment.MiddleCenter; 41 | } 42 | 43 | private void pictureBox_rec_MouseMove(object sender, MouseEventArgs e) 44 | { 45 | Color clr = infoImg.GetPixel(e.X, e.Y); //获取在参考图对应坐标像素点的颜色信息 46 | if (clr.ToArgb() != Color.Black.ToArgb()) 47 | { 48 | pictureBox_rec.Cursor = Cursors.Hand; //设置手形 49 | if (clr.ToArgb() == Color.FromArgb(255, 255,1, 1).ToArgb()) 50 | lbInfo.Text = "白色小花"; //对颜色进行判断 51 | else if (clr.ToArgb() == Color.FromArgb(255, 255, 1,193).ToArgb()) 52 | lbInfo.Text = "眼镜"; 53 | else if (clr.ToArgb() == Color.FromArgb(255,36,1, 253).ToArgb()) 54 | lbInfo.Text = "蝴蝶结"; 55 | else if (clr.ToArgb() == Color.FromArgb(255, 0, 247, 168).ToArgb()) 56 | lbInfo.Text = "KISS"; 57 | else if (clr.ToArgb() == Color.FromArgb(255, 1, 247, 0).ToArgb()) 58 | lbInfo.Text = "蓝色小点点"; 59 | else if (clr.ToArgb() == Color.FromArgb(255, 203, 247, 0).ToArgb()) 60 | lbInfo.Text = "飞机"; 61 | else if (clr.ToArgb() == Color.FromArgb(255, 255,255, 255).ToArgb()) 62 | lbInfo.Text = "背景"; 63 | } 64 | else 65 | { 66 | pictureBox_rec.Cursor = Cursors.Arrow; 67 | lbInfo.Text = "我也不知道这是什么:)"; 68 | } 69 | //设置label位置 70 | if (e.X + 20 + lbInfo.Width >= pictureBox_rec.Width) 71 | lbInfo.Left = e.X - 20 - lbInfo.Width; 72 | else 73 | lbInfo.Left = e.X + 20; 74 | if (e.Y + 20 + lbInfo.Height >= pictureBox_rec.Height) 75 | lbInfo.Top = e.Y - 20 - lbInfo.Height; 76 | else 77 | lbInfo.Top = e.Y + 20; 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /Image Processing/image thermal recognition.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 | -------------------------------------------------------------------------------- /Image Processing/imageDocument.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Drawing; 7 | using System.Drawing.Printing; 8 | 9 | namespace Image_Processing 10 | { 11 | class imageDocument : DocementBase 12 | 13 | { 14 | 15 | private Image _Image; 16 | 17 | 18 | 19 | public Image Image 20 | 21 | { 22 | 23 | get 24 | 25 | { 26 | 27 | return _Image; 28 | 29 | } 30 | 31 | set 32 | 33 | { 34 | 35 | _Image = value; 36 | 37 | 38 | 39 | if (_Image != null) 40 | 41 | { 42 | 43 | if (_Image.Size.Width > _Image.Size.Height) 44 | 45 | DefaultPageSettings.Landscape = true; 46 | 47 | else 48 | 49 | DefaultPageSettings.Landscape = false; 50 | 51 | } 52 | 53 | } 54 | 55 | } 56 | 57 | 58 | 59 | 60 | 61 | public imageDocument() 62 | 63 | { 64 | 65 | 66 | 67 | } 68 | 69 | 70 | 71 | 72 | public imageDocument(Image image) 73 | 74 | { 75 | 76 | this.Image = image; 77 | 78 | } 79 | 80 | 81 | 82 | 83 | protected override void OnPrintPage (PrintPageEventArgs e) 84 | 85 | { 86 | 87 | if (Image == null) 88 | 89 | { 90 | 91 | throw new InvalidOperationException(); 92 | 93 | } 94 | 95 | 96 | 97 | Rectangle bestFit = GetBestFitRectangle(e.MarginBounds, Image.Size); 98 | 99 | 100 | 101 | e.Graphics.DrawImage(Image, bestFit); 102 | 103 | 104 | 105 | e.Graphics.DrawRectangle(Pens.Black, bestFit); 106 | 107 | e.Graphics.DrawRectangle(Pens.Black, e.MarginBounds); 108 | 109 | } 110 | 111 | 112 | 113 | // 保持高度比:参数为(打印边界的Rectangularle对象,图像大小的Size对象) 114 | 115 | protected Rectangle GetBestFitRectangle(Rectangle toContain, Size objectSize) 116 | 117 | { 118 | 119 | //检查页面是水平还是竖直的。 120 | 121 | bool containerLandscape = false; 122 | 123 | if (toContain.Width > toContain.Height) 124 | 125 | containerLandscape = true; 126 | 127 | 128 | 129 | //高度比=图像的高/图像的宽 130 | 131 | float aspectRatio = (float)objectSize.Height / (float)objectSize.Width; 132 | 133 | //得到页面左上角的坐标 134 | 135 | int midContainerX = toContain.Left + (toContain.Width / 2); 136 | 137 | int midContainerY = toContain.Top + (toContain.Height / 2); 138 | 139 | 140 | 141 | int x1 = 0, x2 = 0, y1 = 0, y2 = 0; 142 | 143 | if (containerLandscape == false) 144 | 145 | { 146 | 147 | //竖直图像 148 | 149 | x1 = toContain.Left; 150 | 151 | x2 = toContain.Right; 152 | 153 | //调整之后的height 154 | 155 | int adjustedHeight = (int)((float)toContain.Width * aspectRatio); 156 | 157 | 158 | 159 | y1 = midContainerY - (adjustedHeight / 2); 160 | 161 | y2 = y1 + adjustedHeight; 162 | 163 | } 164 | 165 | else 166 | 167 | { 168 | 169 | y1 = toContain.Top; 170 | 171 | y2 = toContain.Bottom; 172 | 173 | //调整之后的height 174 | 175 | int adjustedWidth = (int)((float)toContain.Height / aspectRatio); 176 | 177 | 178 | 179 | x1 = midContainerX - (adjustedWidth / 2); 180 | 181 | x2 = x1 + adjustedWidth; 182 | 183 | } 184 | 185 | return new Rectangle(x1, y1, x2 - x1, y2 - y1); 186 | 187 | } 188 | 189 | } 190 | } 191 | -------------------------------------------------------------------------------- /Image Processing/license-plate.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/Image Processing/license-plate.jpg -------------------------------------------------------------------------------- /Image Processing/showPic/show.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/Image Processing/showPic/show.gif -------------------------------------------------------------------------------- /Image Processing/showPic/somepic: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Image Processing/zxing.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/Image Processing/zxing.dll -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # ImageProcessing Emgucv图像处理 3 | 4 | ## 基于Emgucv实现的图像处理小软件 5 | 6 | 包括图像的基本操作、效果增强、特殊效果、数学形态、图像热区识别、文字转图片、 7 | 二维码条形码生成与解析、基于emgucv实现的一些基本操作等等。 8 | 9 | 10 | 11 | ![界面及功能展示]( https://github.com/upwon/ImageProcessing-Emgucv-C-sharp/blob/master/Image%20Processing/showPic/show.gif ) 12 | -------------------------------------------------------------------------------- /可用的图片/Fingerprint副本.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/可用的图片/Fingerprint副本.jpg -------------------------------------------------------------------------------- /可用的图片/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/可用的图片/Thumbs.db -------------------------------------------------------------------------------- /可用的图片/autumn-2668275_1280.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/可用的图片/autumn-2668275_1280.jpg -------------------------------------------------------------------------------- /可用的图片/g11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/可用的图片/g11.jpg -------------------------------------------------------------------------------- /可用的图片/moment-2662129_1280.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/可用的图片/moment-2662129_1280.jpg -------------------------------------------------------------------------------- /可用的图片/pexels-photo-296878.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/可用的图片/pexels-photo-296878.jpeg -------------------------------------------------------------------------------- /可用的图片/smilies-bank-sit-rest-160731.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/可用的图片/smilies-bank-sit-rest-160731.jpeg -------------------------------------------------------------------------------- /可用的图片/佛罗伦斯河....jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/可用的图片/佛罗伦斯河....jpg -------------------------------------------------------------------------------- /可用的图片/冬日的荷兰乡野....jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/可用的图片/冬日的荷兰乡野....jpg -------------------------------------------------------------------------------- /可用的图片/奥地利美景.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/可用的图片/奥地利美景.jpg -------------------------------------------------------------------------------- /可用的图片/摩羯座:广州   工作,工作,还是工作。脑子里只有工作的摩羯最满意工作多的地方。广州——这个全国经济开放城市,被摩羯们投以最高的分数....jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/可用的图片/摩羯座:广州   工作,工作,还是工作。脑子里只有工作的摩羯最满意工作多的地方。广州——这个全国经济开放城市,被摩羯们投以最高的分数....jpg -------------------------------------------------------------------------------- /可用的图片/欧洲校园美景....jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/可用的图片/欧洲校园美景....jpg -------------------------------------------------------------------------------- /可用的图片/法布雷加斯.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/可用的图片/法布雷加斯.jpg -------------------------------------------------------------------------------- /可用的图片/车.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/可用的图片/车.jpg -------------------------------------------------------------------------------- /可用的图片/车牌/u=1263487137,2658072955&fm=27&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/可用的图片/车牌/u=1263487137,2658072955&fm=27&gp=0.jpg -------------------------------------------------------------------------------- /可用的图片/车牌/u=1897915341,1439803632&fm=72.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/可用的图片/车牌/u=1897915341,1439803632&fm=72.jpg -------------------------------------------------------------------------------- /可用的图片/车牌/u=2729400195,998583734&fm=27&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/可用的图片/车牌/u=2729400195,998583734&fm=27&gp=0.jpg -------------------------------------------------------------------------------- /可用的图片/车牌/u=2943906663,2016246813&fm=27&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/可用的图片/车牌/u=2943906663,2016246813&fm=27&gp=0.jpg -------------------------------------------------------------------------------- /可用的图片/车牌/u=496321382,2406997530&fm=27&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/可用的图片/车牌/u=496321382,2406997530&fm=27&gp=0.jpg -------------------------------------------------------------------------------- /可用的图片/车牌/下222载.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/可用的图片/车牌/下222载.jpg -------------------------------------------------------------------------------- /可用的图片/车牌/下载.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upwon/ImageProcessing-Emgucv-C-sharp/9c65c12b5aa156be52701f55695723084d421d56/可用的图片/车牌/下载.jpg --------------------------------------------------------------------------------