12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552 |
- using OpenCvSharp;
- using PaintDotNet.Adjust;
- using PaintDotNet.Adjust.BaseImage;
- using PaintDotNet.Annotation;
- using PaintDotNet.Annotation.Enum;
- using PaintDotNet.Annotation.ImageCollect;
- using PaintDotNet.Base.CommTool;
- using PaintDotNet.Base.SettingModel;
- using PaintDotNet.CustomControl;
- using PaintDotNet.Hardware;
- using PaintDotNet.ImageCollect.ImageStitching;
- using PaintDotNet.Setting;
- using System;
- using System.Collections.Generic;
- using System.Drawing;
- using System.Linq;
- using System.Runtime.InteropServices;
- using System.Threading;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace PaintDotNet.ImageCollect
- {
- internal class CameraImageStitching : HardwareBaseDialog
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
- #region Windows Form Designer generated code
- private new void InitializeLanguageText()
- {
- this.groupBox13.Text = PdnResources.GetString("Menu.Puzzleeffect.text");
- this.groupBox8.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.Focus.text");
- this.comChoice.Items.AddRange(new object[] {
- PdnResources.GetString("Menu.imagecapture.Imagestitching.everypiece.text"),
- PdnResources.GetString("Menu.imagecapture.Imagestitching.Everytwo.text"),
- PdnResources.GetString("Menu.imagecapture.Imagestitching.Everythree.text"),
- PdnResources.GetString("Menu.imagecapture.Imagestitching.EveryFive.text"),
- PdnResources.GetString("Menu.imagecapture.Imagestitching.Everyseven.text"),
- PdnResources.GetString("Menu.imagecapture.Imagestitching.Everynine.text"),
- PdnResources.GetString("Menu.imagecapture.Imagestitching.EveryTen.text")});
- this.label14.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.autofocusselect.text") + ":";
- this.ckFocusingRepair.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.focus-compensating.text");
- this.ckFocusingNull.Text = PdnResources.GetString("Menu.nothing.Text");
- this.ckAtuoFocusing.Text = PdnResources.GetString("Menu.ImageCollection.Autofocus.Text");
- this.groupBox7.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.SplicingSettings.text");
- this.ckSeamless.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.Seamlesspattern.text");
- this.ckTile.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.tilemode.text");
- this.label13.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.Stitchingway.text") + ":";
- this.groupBox5.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.Listofpuzzleareas.text");
- this.ckSize.Text = PdnResources.GetString("Menu.size.text");
- this.ckLockNull.Text = PdnResources.GetString("Menu.nothing.Text");
- this.ckArea.Text = PdnResources.GetString("Menu.area.text");
- this.label12.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.Lockingmethod.text") + ":";
- this.btnDel.Text = PdnResources.GetString("Menu.Edit.Delete.Text");
- this.btnDetailed.Text = PdnResources.GetString("Menu.detailed.text");
- this.groupBox4.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.Puzzleway.text");
- this.ckOther.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.user-defined.text");
- this.btnEstablish.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.Createpuzzlearea.text");
- this.ckPolygon.Text = PdnResources.GetString("Menu.LabelAction.DrawPolygon.Text");
- this.ckRectangle.Text = PdnResources.GetString("Menu.LabelAction.DrawRectangle.Text");
- this.ckCircular.Text = PdnResources.GetString("Menu.circular.Text");
- this.groupBox2.Text = PdnResources.GetString("Menu.ImageCollection.CameraSetting.Text");
- this.btnWhiteBalance.Text = PdnResources.GetString("Menu.auto.text") + PdnResources.GetString("Menu.Image.WhiteBalance.Text");
- this.chkAutoExposure.Text = PdnResources.GetString("Menu.auto-exposure.text");
- this.btnOther.Text = PdnResources.GetString("Menu.othersettings.text");
- this.label6.Text = PdnResources.GetString("Menu.Exposurepercentage.text") + ":";
- this.label5.Text = PdnResources.GetString("Menu.timeofexposure.text") + ":";
- this.groupBox6.Text = PdnResources.GetString("Menu.HardwareControl.Text");
- this.label4.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.speed.text") + ":";
- this.groupBox12.Text = PdnResources.GetString("Menu.Fixedlength.text");
- this.groupBox11.Text = PdnResources.GetString("Menu.continuous.text");
- this.groupBox10.Text = PdnResources.GetString("Menu.viewmode.text");
- this.btnInloadstage.Text = PdnResources.GetString("Menu.enterfilm.text");
- this.groupBox9.Text = PdnResources.GetString("Menu.movementmode.text");
- this.groupBox1.Text = PdnResources.GetString("Menu.operation.text");
- this.btnStop.Text = PdnResources.GetString("Menu.stop.text");
- this.btnCreatImgFile.Text = PdnResources.GetString("Menu.Createpicture.text");
- this.btnWorking.Text = PdnResources.GetString("Menu.Started.text");
- this.groupBox3.Text = PdnResources.GetString("Menu.imagecapture.Imagestitching.Listofpuzzleareas.text");
- this.Text = PdnResources.GetString("Menu.ImageCollection.ImageStitching.Text");
- base.InitializeLanguageText();
- }
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.panelall = new System.Windows.Forms.Panel();
- this.groupBox13 = new System.Windows.Forms.GroupBox();
- this.cmbStitchList = new System.Windows.Forms.ComboBox();
- this.pictureBox1 = new System.Windows.Forms.PictureBox();
- this.picEffect = new System.Windows.Forms.PictureBox();
- this.groupBox8 = new System.Windows.Forms.GroupBox();
- this.comChoice = new System.Windows.Forms.ComboBox();
- this.label14 = new System.Windows.Forms.Label();
- this.ckFocusingRepair = new System.Windows.Forms.RadioButton();
- this.ckFocusingNull = new System.Windows.Forms.RadioButton();
- this.ckAtuoFocusing = new System.Windows.Forms.RadioButton();
- this.groupBox7 = new System.Windows.Forms.GroupBox();
- this.ckSeamless = new System.Windows.Forms.RadioButton();
- this.ckTile = new System.Windows.Forms.RadioButton();
- this.label13 = new System.Windows.Forms.Label();
- this.groupBox5 = new System.Windows.Forms.GroupBox();
- this.ckSize = new System.Windows.Forms.RadioButton();
- this.ckLockNull = new System.Windows.Forms.RadioButton();
- this.ckArea = new System.Windows.Forms.RadioButton();
- this.label12 = new System.Windows.Forms.Label();
- this.dgvRegionTeb = new System.Windows.Forms.DataGridView();
- this.regionId = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.regionName = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.regionTiles = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.regionZ = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.regionArea = new System.Windows.Forms.DataGridViewTextBoxColumn();
- this.btnDel = new System.Windows.Forms.Button();
- this.btnDetailed = new System.Windows.Forms.Button();
- this.groupBox4 = new System.Windows.Forms.GroupBox();
- this.numOverlapRate = new System.Windows.Forms.NumericUpDown();
- this.label19 = new System.Windows.Forms.Label();
- this.ckOther = new System.Windows.Forms.RadioButton();
- this.btnEstablish = new System.Windows.Forms.Button();
- this.label11 = new System.Windows.Forms.Label();
- this.label10 = new System.Windows.Forms.Label();
- this.label9 = new System.Windows.Forms.Label();
- this.txtAreaY = new System.Windows.Forms.TextBox();
- this.txtSizeY = new System.Windows.Forms.TextBox();
- this.txtTilesY = new System.Windows.Forms.TextBox();
- this.txtAreaX = new System.Windows.Forms.TextBox();
- this.txtSizeX = new System.Windows.Forms.TextBox();
- this.txtTilesX = new System.Windows.Forms.TextBox();
- this.label8 = new System.Windows.Forms.Label();
- this.label7 = new System.Windows.Forms.Label();
- this.ckPolygon = new System.Windows.Forms.RadioButton();
- this.ckRectangle = new System.Windows.Forms.RadioButton();
- this.ckCircular = new System.Windows.Forms.RadioButton();
- this.groupBox2 = new System.Windows.Forms.GroupBox();
- this.btnWhiteBalance = new System.Windows.Forms.Button();
- this.label16 = new System.Windows.Forms.Label();
- this.lblUnit = new System.Windows.Forms.Label();
- this.chkAutoExposure = new System.Windows.Forms.CheckBox();
- this.txtPercentage = new System.Windows.Forms.TextBox();
- this.txtTime = new System.Windows.Forms.TextBox();
- this.trackPercentage = new System.Windows.Forms.TrackBar();
- this.trackTime = new System.Windows.Forms.TrackBar();
- this.btnOther = new System.Windows.Forms.Button();
- this.label6 = new System.Windows.Forms.Label();
- this.label5 = new System.Windows.Forms.Label();
- this.groupBox6 = new System.Windows.Forms.GroupBox();
- this.label18 = new System.Windows.Forms.Label();
- this.label17 = new System.Windows.Forms.Label();
- this.label15 = new System.Windows.Forms.Label();
- this.pnlSpeed = new System.Windows.Forms.Panel();
- this.label4 = new System.Windows.Forms.Label();
- this.cmbStepUnit = new System.Windows.Forms.ComboBox();
- this.label3 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.label1 = new System.Windows.Forms.Label();
- this.groupBox12 = new System.Windows.Forms.GroupBox();
- this.groupBox11 = new System.Windows.Forms.GroupBox();
- this.groupBox10 = new System.Windows.Forms.GroupBox();
- this.panelVision = new System.Windows.Forms.Panel();
- this.groupBox9 = new System.Windows.Forms.GroupBox();
- this.panelMotion = new System.Windows.Forms.Panel();
- this.panelControl = new System.Windows.Forms.Panel();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.btnStop = new System.Windows.Forms.Button();
- this.btnCreatImgFile = new System.Windows.Forms.Button();
- this.btnWorking = new System.Windows.Forms.Button();
- this.groupBox3 = new System.Windows.Forms.GroupBox();
- this.panelall.SuspendLayout();
- this.groupBox13.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.picEffect)).BeginInit();
- this.groupBox8.SuspendLayout();
- this.groupBox7.SuspendLayout();
- this.groupBox5.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.dgvRegionTeb)).BeginInit();
- this.groupBox4.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.numOverlapRate)).BeginInit();
- this.groupBox2.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.trackPercentage)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.trackTime)).BeginInit();
- this.groupBox6.SuspendLayout();
- this.groupBox12.SuspendLayout();
- this.groupBox11.SuspendLayout();
- this.groupBox10.SuspendLayout();
- this.groupBox9.SuspendLayout();
- this.groupBox1.SuspendLayout();
- this.SuspendLayout();
- //
- // lblXPosition
- //
- this.lblXPosition.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.lblXPosition.AutoSize = true;
- this.lblXPosition.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.lblXPosition.Location = new System.Drawing.Point(431, 642);
- this.lblXPosition.Size = new System.Drawing.Size(14, 14);
- this.lblXPosition.TabIndex = 42;
- this.lblXPosition.Text = "0";
- //
- // lblYPosition
- //
- this.lblYPosition.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.lblYPosition.AutoSize = true;
- this.lblYPosition.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.lblYPosition.Location = new System.Drawing.Point(431, 668);
- this.lblYPosition.Size = new System.Drawing.Size(14, 14);
- this.lblYPosition.TabIndex = 43;
- this.lblYPosition.Text = "0";
- //
- // lblZPosition
- //
- this.lblZPosition.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.lblZPosition.AutoSize = true;
- this.lblZPosition.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.lblZPosition.Location = new System.Drawing.Point(431, 693);
- this.lblZPosition.Size = new System.Drawing.Size(14, 14);
- this.lblZPosition.TabIndex = 44;
- this.lblZPosition.Text = "0";
- //
- // btnFreeloadstage
- //
- this.btnFreeloadstage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnFreeloadstage.Location = new System.Drawing.Point(72, 684);
- this.btnFreeloadstage.Size = new System.Drawing.Size(59, 31);
- this.btnFreeloadstage.TabIndex = 31;
- this.btnFreeloadstage.Text = "锁定";
- this.btnFreeloadstage.UseVisualStyleBackColor = true;
- //
- // btnStoploadstage
- //
- this.btnStoploadstage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnStoploadstage.Location = new System.Drawing.Point(72, 639);
- this.btnStoploadstage.Size = new System.Drawing.Size(59, 33);
- this.btnStoploadstage.TabIndex = 30;
- this.btnStoploadstage.Text = "停止";
- this.btnStoploadstage.UseVisualStyleBackColor = true;
- //
- // btnResetloadstage
- //
- this.btnResetloadstage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnResetloadstage.Location = new System.Drawing.Point(7, 639);
- this.btnResetloadstage.Size = new System.Drawing.Size(60, 33);
- this.btnResetloadstage.TabIndex = 29;
- this.btnResetloadstage.Text = "复位";
- this.btnResetloadstage.UseVisualStyleBackColor = true;
- //
- // btnCenterloadstage
- //
- this.btnCenterloadstage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnCenterloadstage.Location = new System.Drawing.Point(7, 684);
- this.btnCenterloadstage.Size = new System.Drawing.Size(60, 31);
- this.btnCenterloadstage.TabIndex = 28;
- this.btnCenterloadstage.Text = "中心";
- this.btnCenterloadstage.UseVisualStyleBackColor = true;
- //
- // btnInloadstage
- //
- this.btnInloadstage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnInloadstage.Location = new System.Drawing.Point(72, 592);
- this.btnInloadstage.Size = new System.Drawing.Size(61, 33);
- this.btnInloadstage.TabIndex = 27;
- this.btnInloadstage.Text = "进片";
- this.btnInloadstage.UseVisualStyleBackColor = true;
- //
- // btnOutloadstage
- //
- this.btnOutloadstage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnOutloadstage.Location = new System.Drawing.Point(7, 592);
- this.btnOutloadstage.Size = new System.Drawing.Size(60, 33);
- this.btnOutloadstage.TabIndex = 26;
- this.btnOutloadstage.Text = "出片";
- this.btnOutloadstage.UseVisualStyleBackColor = true;
- //
- // btnZStop
- //
- this.btnZStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnZStop.Location = new System.Drawing.Point(346, 682);
- this.btnZStop.Size = new System.Drawing.Size(59, 33);
- this.btnZStop.TabIndex = 41;
- this.btnZStop.Text = "停止";
- this.btnZStop.UseVisualStyleBackColor = true;
- //
- // btnZFree
- //
- this.btnZFree.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnZFree.Location = new System.Drawing.Point(346, 641);
- this.btnZFree.Size = new System.Drawing.Size(59, 31);
- this.btnZFree.TabIndex = 40;
- this.btnZFree.Text = "锁定";
- this.btnZFree.UseVisualStyleBackColor = true;
- //
- // txtXStep
- //
- this.txtXStep.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.txtXStep.Location = new System.Drawing.Point(160, 592);
- this.txtXStep.Size = new System.Drawing.Size(68, 21);
- this.txtXStep.TabIndex = 35;
- this.txtXStep.Text = "1000";
- //
- // txtYStep
- //
- this.txtYStep.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.txtYStep.Location = new System.Drawing.Point(256, 592);
- this.txtYStep.Size = new System.Drawing.Size(68, 21);
- this.txtYStep.TabIndex = 36;
- this.txtYStep.Text = "1000";
- //
- // txtZStep
- //
- this.txtZStep.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.txtZStep.Location = new System.Drawing.Point(353, 592);
- this.txtZStep.Size = new System.Drawing.Size(68, 21);
- this.txtZStep.TabIndex = 37;
- this.txtZStep.Text = "200";
- //
- // btnContinuityLower
- //
- this.btnContinuityLower.Location = new System.Drawing.Point(5, 89);
- this.btnContinuityLower.Size = new System.Drawing.Size(46, 59);
- this.btnContinuityLower.TabIndex = 1;
- this.btnContinuityLower.UseVisualStyleBackColor = true;
- //
- // btnContinuityUp
- //
- this.btnContinuityUp.Location = new System.Drawing.Point(5, 24);
- this.btnContinuityUp.Size = new System.Drawing.Size(46, 59);
- this.btnContinuityUp.TabIndex = 1;
- this.btnContinuityUp.UseVisualStyleBackColor = true;
- //
- // btnFixedLower
- //
- this.btnFixedLower.Location = new System.Drawing.Point(5, 89);
- this.btnFixedLower.Size = new System.Drawing.Size(46, 59);
- this.btnFixedLower.TabIndex = 2;
- this.btnFixedLower.UseVisualStyleBackColor = true;
- //
- // btnFixedUp
- //
- this.btnFixedUp.Location = new System.Drawing.Point(5, 24);
- this.btnFixedUp.Size = new System.Drawing.Size(46, 59);
- this.btnFixedUp.TabIndex = 3;
- this.btnFixedUp.UseVisualStyleBackColor = true;
- //
- // btnCenterDisplay
- //
- this.btnCenterDisplay.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnCenterDisplay.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btnCenterDisplay.Location = new System.Drawing.Point(427, 522);
- this.btnCenterDisplay.Size = new System.Drawing.Size(74, 33);
- this.btnCenterDisplay.TabIndex = 49;
- this.btnCenterDisplay.Text = "中心显示";
- this.btnCenterDisplay.UseVisualStyleBackColor = true;
- //
- // btnStopall
- //
- this.btnStopall.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnStopall.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btnStopall.Location = new System.Drawing.Point(427, 483);
- this.btnStopall.Size = new System.Drawing.Size(74, 33);
- this.btnStopall.TabIndex = 48;
- this.btnStopall.Text = "全部停止";
- this.btnStopall.UseVisualStyleBackColor = true;
- //
- // btnDsRocker
- //
- this.btnDsRocker.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.btnDsRocker.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.btnDsRocker.Location = new System.Drawing.Point(427, 444);
- this.btnDsRocker.Size = new System.Drawing.Size(74, 33);
- this.btnDsRocker.TabIndex = 47;
- this.btnDsRocker.Text = "禁用摇杆";
- this.btnDsRocker.UseVisualStyleBackColor = true;
- //
- // btnSetting
- //
- this.btnSetting.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.btnSetting.Location = new System.Drawing.Point(779, 11);
- this.btnSetting.Size = new System.Drawing.Size(115, 34);
- this.btnSetting.TabIndex = 3;
- this.btnSetting.Text = "Stage Setting";
- this.btnSetting.UseVisualStyleBackColor = true;
- //
- // panelall
- //
- this.panelall.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.panelall.Controls.Add(this.groupBox13);
- this.panelall.Controls.Add(this.groupBox8);
- this.panelall.Controls.Add(this.groupBox7);
- this.panelall.Controls.Add(this.groupBox5);
- this.panelall.Controls.Add(this.groupBox4);
- this.panelall.Controls.Add(this.groupBox2);
- this.panelall.Controls.Add(this.groupBox6);
- this.panelall.Controls.Add(this.groupBox1);
- this.panelall.Location = new System.Drawing.Point(2, 2);
- this.panelall.Name = "panelall";
- this.panelall.Size = new System.Drawing.Size(1247, 790);
- this.panelall.TabIndex = 2;
- //
- // groupBox13
- //
- this.groupBox13.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.groupBox13.Controls.Add(this.cmbStitchList);
- this.groupBox13.Controls.Add(this.pictureBox1);
- this.groupBox13.Controls.Add(this.picEffect);
- this.groupBox13.Location = new System.Drawing.Point(807, 56);
- this.groupBox13.Name = "groupBox13";
- this.groupBox13.Size = new System.Drawing.Size(438, 731);
- this.groupBox13.TabIndex = 22;
- this.groupBox13.TabStop = false;
- this.groupBox13.Text = "拼图效果";
- //
- // cmbStitchList
- //
- this.cmbStitchList.FormattingEnabled = true;
- this.cmbStitchList.Location = new System.Drawing.Point(315, 39);
- this.cmbStitchList.Name = "cmbStitchList";
- this.cmbStitchList.Size = new System.Drawing.Size(102, 20);
- this.cmbStitchList.TabIndex = 2;
- this.cmbStitchList.Visible = false;
- this.cmbStitchList.SelectedIndexChanged += new System.EventHandler(this.cmbStitchList_SelectedIndexChanged);
- //
- // pictureBox1
- //
- this.pictureBox1.Location = new System.Drawing.Point(6, 164);
- this.pictureBox1.Name = "pictureBox1";
- this.pictureBox1.Size = new System.Drawing.Size(424, 349);
- this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
- this.pictureBox1.TabIndex = 1;
- this.pictureBox1.TabStop = false;
- //
- // picEffect
- //
- this.picEffect.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.picEffect.Location = new System.Drawing.Point(6, 17);
- this.picEffect.Name = "picEffect";
- this.picEffect.Size = new System.Drawing.Size(426, 708);
- this.picEffect.TabIndex = 0;
- this.picEffect.TabStop = false;
- //
- // groupBox8
- //
- this.groupBox8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.groupBox8.Controls.Add(this.comChoice);
- this.groupBox8.Controls.Add(this.label14);
- this.groupBox8.Controls.Add(this.ckFocusingRepair);
- this.groupBox8.Controls.Add(this.ckFocusingNull);
- this.groupBox8.Controls.Add(this.ckAtuoFocusing);
- this.groupBox8.Location = new System.Drawing.Point(3, 682);
- this.groupBox8.Name = "groupBox8";
- this.groupBox8.Size = new System.Drawing.Size(280, 105);
- this.groupBox8.TabIndex = 21;
- this.groupBox8.TabStop = false;
- this.groupBox8.Text = "聚焦";
- //
- // comChoice
- //
- this.comChoice.DisplayMember = "0";
- this.comChoice.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comChoice.FormattingEnabled = true;
- this.comChoice.Location = new System.Drawing.Point(119, 63);
- this.comChoice.Name = "comChoice";
- this.comChoice.Size = new System.Drawing.Size(147, 20);
- this.comChoice.TabIndex = 56;
- this.comChoice.SelectedIndexChanged += new System.EventHandler(this.comChoice_SelectedIndexChanged);
- //
- // label14
- //
- this.label14.AutoSize = true;
- this.label14.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label14.Location = new System.Drawing.Point(6, 67);
- this.label14.Name = "label14";
- this.label14.Size = new System.Drawing.Size(89, 12);
- this.label14.TabIndex = 55;
- this.label14.Text = "自动聚焦选择:";
- //
- // ckFocusingRepair
- //
- this.ckFocusingRepair.AutoSize = true;
- this.ckFocusingRepair.Location = new System.Drawing.Point(178, 28);
- this.ckFocusingRepair.Name = "ckFocusingRepair";
- this.ckFocusingRepair.Size = new System.Drawing.Size(71, 16);
- this.ckFocusingRepair.TabIndex = 54;
- this.ckFocusingRepair.Text = "聚焦补偿";
- this.ckFocusingRepair.UseVisualStyleBackColor = true;
- this.ckFocusingRepair.Click += new System.EventHandler(this.ckFocusingRepair_Click);
- //
- // ckFocusingNull
- //
- this.ckFocusingNull.AutoSize = true;
- this.ckFocusingNull.Checked = true;
- this.ckFocusingNull.Location = new System.Drawing.Point(9, 28);
- this.ckFocusingNull.Name = "ckFocusingNull";
- this.ckFocusingNull.Size = new System.Drawing.Size(35, 16);
- this.ckFocusingNull.TabIndex = 53;
- this.ckFocusingNull.TabStop = true;
- this.ckFocusingNull.Text = "无";
- this.ckFocusingNull.UseVisualStyleBackColor = true;
- //
- // ckAtuoFocusing
- //
- this.ckAtuoFocusing.AutoSize = true;
- this.ckAtuoFocusing.Location = new System.Drawing.Point(79, 28);
- this.ckAtuoFocusing.Name = "ckAtuoFocusing";
- this.ckAtuoFocusing.Size = new System.Drawing.Size(71, 16);
- this.ckAtuoFocusing.TabIndex = 52;
- this.ckAtuoFocusing.Text = "自动聚焦";
- this.ckAtuoFocusing.UseVisualStyleBackColor = true;
- //
- // groupBox7
- //
- this.groupBox7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.groupBox7.Controls.Add(this.ckSeamless);
- this.groupBox7.Controls.Add(this.ckTile);
- this.groupBox7.Controls.Add(this.label13);
- this.groupBox7.Location = new System.Drawing.Point(3, 616);
- this.groupBox7.Name = "groupBox7";
- this.groupBox7.Size = new System.Drawing.Size(280, 60);
- this.groupBox7.TabIndex = 20;
- this.groupBox7.TabStop = false;
- this.groupBox7.Text = "拼接设置";
- //
- // ckSeamless
- //
- this.ckSeamless.AutoSize = true;
- this.ckSeamless.Location = new System.Drawing.Point(185, 30);
- this.ckSeamless.Name = "ckSeamless";
- this.ckSeamless.Size = new System.Drawing.Size(71, 16);
- this.ckSeamless.TabIndex = 55;
- this.ckSeamless.Text = "无缝模式";
- this.ckSeamless.UseVisualStyleBackColor = true;
- //
- // ckTile
- //
- this.ckTile.AutoSize = true;
- this.ckTile.Checked = true;
- this.ckTile.Location = new System.Drawing.Point(91, 30);
- this.ckTile.Name = "ckTile";
- this.ckTile.Size = new System.Drawing.Size(71, 16);
- this.ckTile.TabIndex = 54;
- this.ckTile.TabStop = true;
- this.ckTile.Text = "平铺模式";
- this.ckTile.UseVisualStyleBackColor = true;
- //
- // label13
- //
- this.label13.AutoSize = true;
- this.label13.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label13.Location = new System.Drawing.Point(6, 32);
- this.label13.Name = "label13";
- this.label13.Size = new System.Drawing.Size(65, 12);
- this.label13.TabIndex = 52;
- this.label13.Text = "拼接方式:";
- //
- // groupBox5
- //
- this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)));
- this.groupBox5.Controls.Add(this.ckSize);
- this.groupBox5.Controls.Add(this.ckLockNull);
- this.groupBox5.Controls.Add(this.ckArea);
- this.groupBox5.Controls.Add(this.label12);
- this.groupBox5.Controls.Add(this.dgvRegionTeb);
- this.groupBox5.Controls.Add(this.btnDel);
- this.groupBox5.Controls.Add(this.btnDetailed);
- this.groupBox5.Location = new System.Drawing.Point(3, 370);
- this.groupBox5.Name = "groupBox5";
- this.groupBox5.Size = new System.Drawing.Size(280, 240);
- this.groupBox5.TabIndex = 19;
- this.groupBox5.TabStop = false;
- this.groupBox5.Text = "拼图区域列表";
- //
- // ckSize
- //
- this.ckSize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.ckSize.AutoSize = true;
- this.ckSize.Location = new System.Drawing.Point(215, 215);
- this.ckSize.Name = "ckSize";
- this.ckSize.Size = new System.Drawing.Size(47, 16);
- this.ckSize.TabIndex = 51;
- this.ckSize.Text = "大小";
- this.ckSize.UseVisualStyleBackColor = true;
- this.ckSize.CheckedChanged += new System.EventHandler(this.ckSize_CheckedChanged);
- //
- // ckLockNull
- //
- this.ckLockNull.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.ckLockNull.AutoSize = true;
- this.ckLockNull.Checked = true;
- this.ckLockNull.Location = new System.Drawing.Point(98, 215);
- this.ckLockNull.Name = "ckLockNull";
- this.ckLockNull.Size = new System.Drawing.Size(35, 16);
- this.ckLockNull.TabIndex = 50;
- this.ckLockNull.TabStop = true;
- this.ckLockNull.Text = "无";
- this.ckLockNull.UseVisualStyleBackColor = true;
- this.ckLockNull.CheckedChanged += new System.EventHandler(this.ckLockNull_CheckedChanged);
- //
- // ckArea
- //
- this.ckArea.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.ckArea.AutoSize = true;
- this.ckArea.Location = new System.Drawing.Point(153, 215);
- this.ckArea.Name = "ckArea";
- this.ckArea.Size = new System.Drawing.Size(47, 16);
- this.ckArea.TabIndex = 49;
- this.ckArea.Text = "面积";
- this.ckArea.UseVisualStyleBackColor = true;
- this.ckArea.CheckedChanged += new System.EventHandler(this.ckArea_CheckedChanged);
- //
- // label12
- //
- this.label12.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.label12.AutoSize = true;
- this.label12.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label12.Location = new System.Drawing.Point(6, 217);
- this.label12.Name = "label12";
- this.label12.Size = new System.Drawing.Size(65, 12);
- this.label12.TabIndex = 48;
- this.label12.Text = "锁定方式:";
- //
- // dgvRegionTeb
- //
- this.dgvRegionTeb.AllowUserToAddRows = false;
- this.dgvRegionTeb.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)));
- this.dgvRegionTeb.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
- this.dgvRegionTeb.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
- this.dgvRegionTeb.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
- this.regionId,
- this.regionName,
- this.regionTiles,
- this.regionZ,
- this.regionArea});
- this.dgvRegionTeb.Location = new System.Drawing.Point(2, 36);
- this.dgvRegionTeb.Name = "dgvRegionTeb";
- this.dgvRegionTeb.ReadOnly = true;
- this.dgvRegionTeb.RowHeadersVisible = false;
- this.dgvRegionTeb.RowHeadersWidth = 51;
- this.dgvRegionTeb.RowTemplate.Height = 23;
- this.dgvRegionTeb.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
- this.dgvRegionTeb.Size = new System.Drawing.Size(274, 168);
- this.dgvRegionTeb.TabIndex = 0;
- this.dgvRegionTeb.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvRegionTeb_CellContentClick);
- this.dgvRegionTeb.CellMouseClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvRegionTeb_CellMouseClick);
- this.dgvRegionTeb.SelectionChanged += new System.EventHandler(this.dgvRegionTeb_SelectionChanged);
- //
- // regionId
- //
- this.regionId.FillWeight = 24F;
- this.regionId.HeaderText = "ID";
- this.regionId.MinimumWidth = 6;
- this.regionId.Name = "regionId";
- this.regionId.ReadOnly = true;
- this.regionId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
- //
- // regionName
- //
- this.regionName.FillWeight = 60F;
- this.regionName.HeaderText = "Name";
- this.regionName.MinimumWidth = 6;
- this.regionName.Name = "regionName";
- this.regionName.ReadOnly = true;
- this.regionName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
- //
- // regionTiles
- //
- this.regionTiles.FillWeight = 60F;
- this.regionTiles.HeaderText = "Tiles";
- this.regionTiles.MinimumWidth = 6;
- this.regionTiles.Name = "regionTiles";
- this.regionTiles.ReadOnly = true;
- this.regionTiles.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
- //
- // regionZ
- //
- this.regionZ.FillWeight = 60F;
- this.regionZ.HeaderText = "Z(μm)";
- this.regionZ.MinimumWidth = 6;
- this.regionZ.Name = "regionZ";
- this.regionZ.ReadOnly = true;
- this.regionZ.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
- //
- // regionArea
- //
- this.regionArea.FillWeight = 60F;
- this.regionArea.HeaderText = "Area(mm²)";
- this.regionArea.MinimumWidth = 6;
- this.regionArea.Name = "regionArea";
- this.regionArea.ReadOnly = true;
- this.regionArea.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
- //
- // btnDel
- //
- this.btnDel.Location = new System.Drawing.Point(206, 11);
- this.btnDel.Name = "btnDel";
- this.btnDel.Size = new System.Drawing.Size(65, 23);
- this.btnDel.TabIndex = 47;
- this.btnDel.Text = "删除";
- this.btnDel.UseVisualStyleBackColor = true;
- this.btnDel.Click += new System.EventHandler(this.btnDel_Click);
- //
- // btnDetailed
- //
- this.btnDetailed.Location = new System.Drawing.Point(137, 11);
- this.btnDetailed.Name = "btnDetailed";
- this.btnDetailed.Size = new System.Drawing.Size(68, 23);
- this.btnDetailed.TabIndex = 46;
- this.btnDetailed.Text = "详细";
- this.btnDetailed.UseVisualStyleBackColor = true;
- this.btnDetailed.Click += new System.EventHandler(this.btnDetailed_Click);
- //
- // groupBox4
- //
- this.groupBox4.Controls.Add(this.numOverlapRate);
- this.groupBox4.Controls.Add(this.label19);
- this.groupBox4.Controls.Add(this.ckOther);
- this.groupBox4.Controls.Add(this.btnEstablish);
- this.groupBox4.Controls.Add(this.label11);
- this.groupBox4.Controls.Add(this.label10);
- this.groupBox4.Controls.Add(this.label9);
- this.groupBox4.Controls.Add(this.txtAreaY);
- this.groupBox4.Controls.Add(this.txtSizeY);
- this.groupBox4.Controls.Add(this.txtTilesY);
- this.groupBox4.Controls.Add(this.txtAreaX);
- this.groupBox4.Controls.Add(this.txtSizeX);
- this.groupBox4.Controls.Add(this.txtTilesX);
- this.groupBox4.Controls.Add(this.label8);
- this.groupBox4.Controls.Add(this.label7);
- this.groupBox4.Controls.Add(this.ckPolygon);
- this.groupBox4.Controls.Add(this.ckRectangle);
- this.groupBox4.Controls.Add(this.ckCircular);
- this.groupBox4.Location = new System.Drawing.Point(3, 176);
- this.groupBox4.Name = "groupBox4";
- this.groupBox4.Size = new System.Drawing.Size(280, 188);
- this.groupBox4.TabIndex = 18;
- this.groupBox4.TabStop = false;
- this.groupBox4.Text = "拼图方式";
- //
- // numOverlapRate
- //
- this.numOverlapRate.DecimalPlaces = 2;
- this.numOverlapRate.Increment = new decimal(new int[] {
- 5,
- 0,
- 0,
- 131072});
- this.numOverlapRate.Location = new System.Drawing.Point(116, 116);
- this.numOverlapRate.Maximum = new decimal(new int[] {
- 1,
- 0,
- 0,
- 0});
- this.numOverlapRate.Minimum = new decimal(new int[] {
- 5,
- 0,
- 0,
- 131072});
- this.numOverlapRate.Name = "numOverlapRate";
- this.numOverlapRate.Size = new System.Drawing.Size(70, 21);
- this.numOverlapRate.TabIndex = 48;
- this.numOverlapRate.Value = new decimal(new int[] {
- 10,
- 0,
- 0,
- 131072});
- //
- // label19
- //
- this.label19.AutoSize = true;
- this.label19.Location = new System.Drawing.Point(22, 118);
- this.label19.Name = "label19";
- this.label19.Size = new System.Drawing.Size(77, 12);
- this.label19.TabIndex = 47;
- this.label19.Text = "Overlap Rate";
- //
- // ckOther
- //
- this.ckOther.AutoSize = true;
- this.ckOther.Checked = true;
- this.ckOther.Location = new System.Drawing.Point(206, 20);
- this.ckOther.Name = "ckOther";
- this.ckOther.Size = new System.Drawing.Size(59, 16);
- this.ckOther.TabIndex = 46;
- this.ckOther.TabStop = true;
- this.ckOther.Text = "自定义";
- this.ckOther.UseVisualStyleBackColor = true;
- this.ckOther.CheckedChanged += new System.EventHandler(this.ckOther_CheckedChanged);
- //
- // btnEstablish
- //
- this.btnEstablish.Location = new System.Drawing.Point(85, 150);
- this.btnEstablish.Name = "btnEstablish";
- this.btnEstablish.Size = new System.Drawing.Size(120, 23);
- this.btnEstablish.TabIndex = 45;
- this.btnEstablish.Text = "创建拼图区域";
- this.btnEstablish.UseVisualStyleBackColor = true;
- this.btnEstablish.Click += new System.EventHandler(this.btnEstablish_Click);
- //
- // label11
- //
- this.label11.AutoSize = true;
- this.label11.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label11.Location = new System.Drawing.Point(202, 44);
- this.label11.Name = "label11";
- this.label11.Size = new System.Drawing.Size(35, 14);
- this.label11.TabIndex = 44;
- this.label11.Text = "Area";
- //
- // label10
- //
- this.label10.AutoSize = true;
- this.label10.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label10.Location = new System.Drawing.Point(133, 44);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(35, 14);
- this.label10.TabIndex = 43;
- this.label10.Text = "Size";
- //
- // label9
- //
- this.label9.AutoSize = true;
- this.label9.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label9.Location = new System.Drawing.Point(61, 44);
- this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(42, 14);
- this.label9.TabIndex = 42;
- this.label9.Text = "Tiles";
- //
- // txtAreaY
- //
- this.txtAreaY.Enabled = false;
- this.txtAreaY.Location = new System.Drawing.Point(186, 83);
- this.txtAreaY.Name = "txtAreaY";
- this.txtAreaY.ReadOnly = true;
- this.txtAreaY.Size = new System.Drawing.Size(70, 21);
- this.txtAreaY.TabIndex = 41;
- //
- // txtSizeY
- //
- this.txtSizeY.Location = new System.Drawing.Point(116, 83);
- this.txtSizeY.Name = "txtSizeY";
- this.txtSizeY.Size = new System.Drawing.Size(70, 21);
- this.txtSizeY.TabIndex = 40;
- //
- // txtTilesY
- //
- this.txtTilesY.Location = new System.Drawing.Point(46, 83);
- this.txtTilesY.Name = "txtTilesY";
- this.txtTilesY.Size = new System.Drawing.Size(70, 21);
- this.txtTilesY.TabIndex = 39;
- //
- // txtAreaX
- //
- this.txtAreaX.Location = new System.Drawing.Point(186, 61);
- this.txtAreaX.Name = "txtAreaX";
- this.txtAreaX.Size = new System.Drawing.Size(70, 21);
- this.txtAreaX.TabIndex = 38;
- //
- // txtSizeX
- //
- this.txtSizeX.Location = new System.Drawing.Point(116, 61);
- this.txtSizeX.Name = "txtSizeX";
- this.txtSizeX.Size = new System.Drawing.Size(70, 21);
- this.txtSizeX.TabIndex = 37;
- //
- // txtTilesX
- //
- this.txtTilesX.Location = new System.Drawing.Point(46, 61);
- this.txtTilesX.Name = "txtTilesX";
- this.txtTilesX.Size = new System.Drawing.Size(70, 21);
- this.txtTilesX.TabIndex = 36;
- //
- // label8
- //
- this.label8.AutoSize = true;
- this.label8.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label8.Location = new System.Drawing.Point(21, 86);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(21, 14);
- this.label8.TabIndex = 34;
- this.label8.Text = "Y:";
- //
- // label7
- //
- this.label7.AutoSize = true;
- this.label7.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label7.Location = new System.Drawing.Point(21, 64);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(21, 14);
- this.label7.TabIndex = 33;
- this.label7.Text = "X:";
- //
- // ckPolygon
- //
- this.ckPolygon.AutoSize = true;
- this.ckPolygon.Location = new System.Drawing.Point(132, 20);
- this.ckPolygon.Name = "ckPolygon";
- this.ckPolygon.Size = new System.Drawing.Size(59, 16);
- this.ckPolygon.TabIndex = 3;
- this.ckPolygon.Text = "多边形";
- this.ckPolygon.UseVisualStyleBackColor = true;
- this.ckPolygon.CheckedChanged += new System.EventHandler(this.ckPolygon_CheckedChanged);
- //
- // ckRectangle
- //
- this.ckRectangle.AutoSize = true;
- this.ckRectangle.Location = new System.Drawing.Point(9, 20);
- this.ckRectangle.Name = "ckRectangle";
- this.ckRectangle.Size = new System.Drawing.Size(47, 16);
- this.ckRectangle.TabIndex = 2;
- this.ckRectangle.Text = "矩形";
- this.ckRectangle.UseVisualStyleBackColor = true;
- this.ckRectangle.CheckedChanged += new System.EventHandler(this.ckRectangle_CheckedChanged);
- //
- // ckCircular
- //
- this.ckCircular.AutoSize = true;
- this.ckCircular.Location = new System.Drawing.Point(73, 20);
- this.ckCircular.Name = "ckCircular";
- this.ckCircular.Size = new System.Drawing.Size(47, 16);
- this.ckCircular.TabIndex = 1;
- this.ckCircular.Text = "圆形";
- this.ckCircular.UseVisualStyleBackColor = true;
- this.ckCircular.CheckedChanged += new System.EventHandler(this.ckCircular_CheckedChanged);
- //
- // groupBox2
- //
- this.groupBox2.Controls.Add(this.btnWhiteBalance);
- this.groupBox2.Controls.Add(this.label16);
- this.groupBox2.Controls.Add(this.lblUnit);
- this.groupBox2.Controls.Add(this.chkAutoExposure);
- this.groupBox2.Controls.Add(this.txtPercentage);
- this.groupBox2.Controls.Add(this.txtTime);
- this.groupBox2.Controls.Add(this.trackPercentage);
- this.groupBox2.Controls.Add(this.trackTime);
- this.groupBox2.Controls.Add(this.btnOther);
- this.groupBox2.Controls.Add(this.label6);
- this.groupBox2.Controls.Add(this.label5);
- this.groupBox2.Location = new System.Drawing.Point(3, 56);
- this.groupBox2.Name = "groupBox2";
- this.groupBox2.Size = new System.Drawing.Size(280, 114);
- this.groupBox2.TabIndex = 17;
- this.groupBox2.TabStop = false;
- this.groupBox2.Text = "相机设置";
- //
- // btnWhiteBalance
- //
- this.btnWhiteBalance.Location = new System.Drawing.Point(96, 85);
- this.btnWhiteBalance.Name = "btnWhiteBalance";
- this.btnWhiteBalance.Size = new System.Drawing.Size(96, 23);
- this.btnWhiteBalance.TabIndex = 40;
- this.btnWhiteBalance.Text = "自动白平衡";
- this.btnWhiteBalance.UseVisualStyleBackColor = true;
- this.btnWhiteBalance.Click += new System.EventHandler(this.btnWhiteBalance_Click);
- //
- // label16
- //
- this.label16.AutoSize = true;
- this.label16.Location = new System.Drawing.Point(257, 47);
- this.label16.Name = "label16";
- this.label16.Size = new System.Drawing.Size(11, 12);
- this.label16.TabIndex = 39;
- this.label16.Text = "%";
- //
- // lblUnit
- //
- this.lblUnit.AutoSize = true;
- this.lblUnit.Location = new System.Drawing.Point(257, 19);
- this.lblUnit.Name = "lblUnit";
- this.lblUnit.Size = new System.Drawing.Size(17, 12);
- this.lblUnit.TabIndex = 0;
- this.lblUnit.Text = "ms";
- //
- // chkAutoExposure
- //
- this.chkAutoExposure.AutoSize = true;
- this.chkAutoExposure.Location = new System.Drawing.Point(10, 88);
- this.chkAutoExposure.Name = "chkAutoExposure";
- this.chkAutoExposure.Size = new System.Drawing.Size(72, 16);
- this.chkAutoExposure.TabIndex = 0;
- this.chkAutoExposure.Text = "自动曝光";
- this.chkAutoExposure.UseVisualStyleBackColor = true;
- this.chkAutoExposure.Click += new System.EventHandler(this.chkAutoExposure_Click);
- //
- // txtPercentage
- //
- this.txtPercentage.Location = new System.Drawing.Point(214, 44);
- this.txtPercentage.Name = "txtPercentage";
- this.txtPercentage.Size = new System.Drawing.Size(42, 21);
- this.txtPercentage.TabIndex = 37;
- this.txtPercentage.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtPercentage_KeyPress);
- //
- // txtTime
- //
- this.txtTime.Location = new System.Drawing.Point(214, 17);
- this.txtTime.Name = "txtTime";
- this.txtTime.Size = new System.Drawing.Size(42, 21);
- this.txtTime.TabIndex = 36;
- this.txtTime.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtTime_KeyPress);
- //
- // trackPercentage
- //
- this.trackPercentage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.trackPercentage.AutoSize = false;
- this.trackPercentage.Location = new System.Drawing.Point(78, 45);
- this.trackPercentage.Maximum = 200;
- this.trackPercentage.Minimum = 5;
- this.trackPercentage.Name = "trackPercentage";
- this.trackPercentage.Size = new System.Drawing.Size(141, 25);
- this.trackPercentage.TabIndex = 5;
- this.trackPercentage.TickStyle = System.Windows.Forms.TickStyle.None;
- this.trackPercentage.Value = 5;
- this.trackPercentage.ValueChanged += new System.EventHandler(this.trackPercentage_ValueChanged);
- //
- // trackTime
- //
- this.trackTime.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.trackTime.AutoSize = false;
- this.trackTime.Location = new System.Drawing.Point(78, 19);
- this.trackTime.Maximum = 1000000;
- this.trackTime.Name = "trackTime";
- this.trackTime.Size = new System.Drawing.Size(141, 25);
- this.trackTime.TabIndex = 4;
- this.trackTime.TickStyle = System.Windows.Forms.TickStyle.None;
- this.trackTime.ValueChanged += new System.EventHandler(this.trackTime_ValueChanged);
- //
- // btnOther
- //
- this.btnOther.Location = new System.Drawing.Point(202, 85);
- this.btnOther.Name = "btnOther";
- this.btnOther.Size = new System.Drawing.Size(75, 23);
- this.btnOther.TabIndex = 3;
- this.btnOther.Text = "其他设置";
- this.btnOther.UseVisualStyleBackColor = true;
- this.btnOther.Click += new System.EventHandler(this.btnOther_Click);
- //
- // label6
- //
- this.label6.AutoSize = true;
- this.label6.Location = new System.Drawing.Point(7, 47);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(77, 12);
- this.label6.TabIndex = 1;
- this.label6.Text = "曝光百分比:";
- //
- // label5
- //
- this.label5.AutoSize = true;
- this.label5.Location = new System.Drawing.Point(7, 20);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(53, 12);
- this.label5.TabIndex = 0;
- this.label5.Text = "曝光时间";
- //
- // groupBox6
- //
- this.groupBox6.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.groupBox6.Controls.Add(this.label18);
- this.groupBox6.Controls.Add(this.label17);
- this.groupBox6.Controls.Add(this.label15);
- this.groupBox6.Controls.Add(this.pnlSpeed);
- this.groupBox6.Controls.Add(this.btnCenterDisplay);
- this.groupBox6.Controls.Add(this.btnStopall);
- this.groupBox6.Controls.Add(this.btnDsRocker);
- this.groupBox6.Controls.Add(this.lblZPosition);
- this.groupBox6.Controls.Add(this.lblYPosition);
- this.groupBox6.Controls.Add(this.lblXPosition);
- this.groupBox6.Controls.Add(this.btnZStop);
- this.groupBox6.Controls.Add(this.btnZFree);
- this.groupBox6.Controls.Add(this.label4);
- this.groupBox6.Controls.Add(this.cmbStepUnit);
- this.groupBox6.Controls.Add(this.txtZStep);
- this.groupBox6.Controls.Add(this.txtYStep);
- this.groupBox6.Controls.Add(this.txtXStep);
- this.groupBox6.Controls.Add(this.label3);
- this.groupBox6.Controls.Add(this.label2);
- this.groupBox6.Controls.Add(this.label1);
- this.groupBox6.Controls.Add(this.btnOutloadstage);
- this.groupBox6.Controls.Add(this.groupBox12);
- this.groupBox6.Controls.Add(this.btnFreeloadstage);
- this.groupBox6.Controls.Add(this.groupBox11);
- this.groupBox6.Controls.Add(this.groupBox10);
- this.groupBox6.Controls.Add(this.btnInloadstage);
- this.groupBox6.Controls.Add(this.groupBox9);
- this.groupBox6.Controls.Add(this.btnStoploadstage);
- this.groupBox6.Controls.Add(this.panelControl);
- this.groupBox6.Controls.Add(this.btnResetloadstage);
- this.groupBox6.Controls.Add(this.btnCenterloadstage);
- this.groupBox6.Location = new System.Drawing.Point(289, 56);
- this.groupBox6.Name = "groupBox6";
- this.groupBox6.Size = new System.Drawing.Size(512, 731);
- this.groupBox6.TabIndex = 16;
- this.groupBox6.TabStop = false;
- this.groupBox6.Text = "硬件控制";
- this.groupBox6.Controls.SetChildIndex(this.btnCenterloadstage, 0);
- this.groupBox6.Controls.SetChildIndex(this.btnResetloadstage, 0);
- this.groupBox6.Controls.SetChildIndex(this.panelControl, 0);
- this.groupBox6.Controls.SetChildIndex(this.btnStoploadstage, 0);
- this.groupBox6.Controls.SetChildIndex(this.groupBox9, 0);
- this.groupBox6.Controls.SetChildIndex(this.btnInloadstage, 0);
- this.groupBox6.Controls.SetChildIndex(this.groupBox10, 0);
- this.groupBox6.Controls.SetChildIndex(this.groupBox11, 0);
- this.groupBox6.Controls.SetChildIndex(this.btnFreeloadstage, 0);
- this.groupBox6.Controls.SetChildIndex(this.groupBox12, 0);
- this.groupBox6.Controls.SetChildIndex(this.btnOutloadstage, 0);
- this.groupBox6.Controls.SetChildIndex(this.label1, 0);
- this.groupBox6.Controls.SetChildIndex(this.label2, 0);
- this.groupBox6.Controls.SetChildIndex(this.label3, 0);
- this.groupBox6.Controls.SetChildIndex(this.txtXStep, 0);
- this.groupBox6.Controls.SetChildIndex(this.txtYStep, 0);
- this.groupBox6.Controls.SetChildIndex(this.txtZStep, 0);
- this.groupBox6.Controls.SetChildIndex(this.cmbStepUnit, 0);
- this.groupBox6.Controls.SetChildIndex(this.label4, 0);
- this.groupBox6.Controls.SetChildIndex(this.btnZFree, 0);
- this.groupBox6.Controls.SetChildIndex(this.btnZStop, 0);
- this.groupBox6.Controls.SetChildIndex(this.lblXPosition, 0);
- this.groupBox6.Controls.SetChildIndex(this.lblYPosition, 0);
- this.groupBox6.Controls.SetChildIndex(this.lblZPosition, 0);
- this.groupBox6.Controls.SetChildIndex(this.btnDsRocker, 0);
- this.groupBox6.Controls.SetChildIndex(this.btnStopall, 0);
- this.groupBox6.Controls.SetChildIndex(this.btnCenterDisplay, 0);
- this.groupBox6.Controls.SetChildIndex(this.pnlSpeed, 0);
- this.groupBox6.Controls.SetChildIndex(this.label15, 0);
- this.groupBox6.Controls.SetChildIndex(this.label17, 0);
- this.groupBox6.Controls.SetChildIndex(this.label18, 0);
- //
- // label18
- //
- this.label18.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.label18.AutoSize = true;
- this.label18.Font = new System.Drawing.Font("宋体", 10.5F);
- this.label18.Location = new System.Drawing.Point(411, 693);
- this.label18.Name = "label18";
- this.label18.Size = new System.Drawing.Size(21, 14);
- this.label18.TabIndex = 52;
- this.label18.Text = "Z:";
- //
- // label17
- //
- this.label17.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.label17.AutoSize = true;
- this.label17.Font = new System.Drawing.Font("宋体", 10.5F);
- this.label17.Location = new System.Drawing.Point(411, 668);
- this.label17.Name = "label17";
- this.label17.Size = new System.Drawing.Size(21, 14);
- this.label17.TabIndex = 52;
- this.label17.Text = "Y:";
- //
- // label15
- //
- this.label15.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.label15.AutoSize = true;
- this.label15.Font = new System.Drawing.Font("宋体", 10.5F);
- this.label15.Location = new System.Drawing.Point(411, 642);
- this.label15.Name = "label15";
- this.label15.Size = new System.Drawing.Size(21, 14);
- this.label15.TabIndex = 52;
- this.label15.Text = "X:";
- //
- // pnlSpeed
- //
- this.pnlSpeed.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.pnlSpeed.Location = new System.Drawing.Point(185, 623);
- this.pnlSpeed.Name = "pnlSpeed";
- this.pnlSpeed.Size = new System.Drawing.Size(146, 102);
- this.pnlSpeed.TabIndex = 50;
- //
- // label4
- //
- this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.label4.AutoSize = true;
- this.label4.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label4.Location = new System.Drawing.Point(138, 642);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(0, 14);
- this.label4.TabIndex = 39;
- //
- // cmbStepUnit
- //
- this.cmbStepUnit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.cmbStepUnit.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.cmbStepUnit.FormattingEnabled = true;
- this.cmbStepUnit.Items.AddRange(new object[] {
- "μm",
- "mm",
- "cm"});
- this.cmbStepUnit.Location = new System.Drawing.Point(427, 594);
- this.cmbStepUnit.Name = "cmbStepUnit";
- this.cmbStepUnit.Size = new System.Drawing.Size(69, 20);
- this.cmbStepUnit.TabIndex = 38;
- //
- // label3
- //
- this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.label3.AutoSize = true;
- this.label3.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label3.Location = new System.Drawing.Point(328, 595);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(21, 14);
- this.label3.TabIndex = 34;
- this.label3.Text = "Z:";
- //
- // label2
- //
- this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.label2.AutoSize = true;
- this.label2.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label2.Location = new System.Drawing.Point(231, 595);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(21, 14);
- this.label2.TabIndex = 33;
- this.label2.Text = "Y:";
- //
- // label1
- //
- this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.label1.AutoSize = true;
- this.label1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
- this.label1.Location = new System.Drawing.Point(138, 595);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(21, 14);
- this.label1.TabIndex = 32;
- this.label1.Text = "X:";
- //
- // groupBox12
- //
- this.groupBox12.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.groupBox12.Controls.Add(this.btnFixedLower);
- this.groupBox12.Controls.Add(this.btnFixedUp);
- this.groupBox12.Location = new System.Drawing.Point(370, 420);
- this.groupBox12.Name = "groupBox12";
- this.groupBox12.Size = new System.Drawing.Size(56, 162);
- this.groupBox12.TabIndex = 25;
- this.groupBox12.TabStop = false;
- this.groupBox12.Text = "定长";
- //
- // groupBox11
- //
- this.groupBox11.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.groupBox11.Controls.Add(this.btnContinuityLower);
- this.groupBox11.Controls.Add(this.btnContinuityUp);
- this.groupBox11.Location = new System.Drawing.Point(312, 420);
- this.groupBox11.Name = "groupBox11";
- this.groupBox11.Size = new System.Drawing.Size(56, 162);
- this.groupBox11.TabIndex = 24;
- this.groupBox11.TabStop = false;
- this.groupBox11.Text = "连续";
- //
- // groupBox10
- //
- this.groupBox10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.groupBox10.Controls.Add(this.panelVision);
- this.groupBox10.Location = new System.Drawing.Point(160, 420);
- this.groupBox10.Name = "groupBox10";
- this.groupBox10.Size = new System.Drawing.Size(150, 162);
- this.groupBox10.TabIndex = 23;
- this.groupBox10.TabStop = false;
- this.groupBox10.Text = "视场模式";
- //
- // panelVision
- //
- this.panelVision.Location = new System.Drawing.Point(2, 14);
- this.panelVision.Name = "panelVision";
- this.panelVision.Size = new System.Drawing.Size(144, 144);
- this.panelVision.TabIndex = 2;
- //
- // groupBox9
- //
- this.groupBox9.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.groupBox9.Controls.Add(this.panelMotion);
- this.groupBox9.Location = new System.Drawing.Point(6, 420);
- this.groupBox9.Name = "groupBox9";
- this.groupBox9.Size = new System.Drawing.Size(150, 162);
- this.groupBox9.TabIndex = 22;
- this.groupBox9.TabStop = false;
- this.groupBox9.Text = "运动模式";
- //
- // panelMotion
- //
- this.panelMotion.Location = new System.Drawing.Point(2, 14);
- this.panelMotion.Name = "panelMotion";
- this.panelMotion.Size = new System.Drawing.Size(144, 144);
- this.panelMotion.TabIndex = 1;
- //
- // panelControl
- //
- this.panelControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.panelControl.AutoScroll = true;
- this.panelControl.BackColor = System.Drawing.SystemColors.Control;
- this.panelControl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
- this.panelControl.Location = new System.Drawing.Point(6, 17);
- this.panelControl.Name = "panelControl";
- this.panelControl.Size = new System.Drawing.Size(500, 394);
- this.panelControl.TabIndex = 14;
- //
- // groupBox1
- //
- this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.groupBox1.Controls.Add(this.btnSetting);
- this.groupBox1.Controls.Add(this.btnStop);
- this.groupBox1.Controls.Add(this.btnCreatImgFile);
- this.groupBox1.Controls.Add(this.btnWorking);
- this.groupBox1.Location = new System.Drawing.Point(3, 3);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(1241, 47);
- this.groupBox1.TabIndex = 2;
- this.groupBox1.TabStop = false;
- this.groupBox1.Text = "操作";
- this.groupBox1.Controls.SetChildIndex(this.btnWorking, 0);
- this.groupBox1.Controls.SetChildIndex(this.btnCreatImgFile, 0);
- this.groupBox1.Controls.SetChildIndex(this.btnStop, 0);
- this.groupBox1.Controls.SetChildIndex(this.btnSetting, 0);
- //
- // btnStop
- //
- this.btnStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.btnStop.Location = new System.Drawing.Point(1021, 11);
- this.btnStop.Name = "btnStop";
- this.btnStop.Size = new System.Drawing.Size(89, 34);
- this.btnStop.TabIndex = 2;
- this.btnStop.Text = "停止";
- this.btnStop.UseVisualStyleBackColor = true;
- this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
- //
- // btnCreatImgFile
- //
- this.btnCreatImgFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.btnCreatImgFile.Location = new System.Drawing.Point(1129, 11);
- this.btnCreatImgFile.Name = "btnCreatImgFile";
- this.btnCreatImgFile.Size = new System.Drawing.Size(92, 34);
- this.btnCreatImgFile.TabIndex = 1;
- this.btnCreatImgFile.Text = "创建图片";
- this.btnCreatImgFile.UseVisualStyleBackColor = true;
- this.btnCreatImgFile.Click += new System.EventHandler(this.btnCreatImgFile_Click);
- //
- // btnWorking
- //
- this.btnWorking.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.btnWorking.Location = new System.Drawing.Point(913, 11);
- this.btnWorking.Name = "btnWorking";
- this.btnWorking.Size = new System.Drawing.Size(89, 34);
- this.btnWorking.TabIndex = 0;
- this.btnWorking.Text = "开始";
- this.btnWorking.UseVisualStyleBackColor = true;
- this.btnWorking.Click += new System.EventHandler(this.btnWorking_Click);
- //
- // groupBox3
- //
- this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)));
- this.groupBox3.Location = new System.Drawing.Point(2, 498);
- this.groupBox3.Name = "groupBox3";
- this.groupBox3.Size = new System.Drawing.Size(254, 84);
- this.groupBox3.TabIndex = 13;
- this.groupBox3.TabStop = false;
- //
- // CameraImageStitching
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(1251, 796);
- this.Controls.Add(this.panelall);
- this.Controls.Add(this.groupBox3);
- this.MinimumSize = new System.Drawing.Size(1257, 750);
- this.Name = "CameraImageStitching";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "图像拼接";
- this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.CameraImageStitching_FormClosing);
- this.Controls.SetChildIndex(this.groupBox3, 0);
- this.Controls.SetChildIndex(this.panelall, 0);
- this.panelall.ResumeLayout(false);
- this.groupBox13.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.picEffect)).EndInit();
- this.groupBox8.ResumeLayout(false);
- this.groupBox8.PerformLayout();
- this.groupBox7.ResumeLayout(false);
- this.groupBox7.PerformLayout();
- this.groupBox5.ResumeLayout(false);
- this.groupBox5.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.dgvRegionTeb)).EndInit();
- this.groupBox4.ResumeLayout(false);
- this.groupBox4.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.numOverlapRate)).EndInit();
- this.groupBox2.ResumeLayout(false);
- this.groupBox2.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.trackPercentage)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.trackTime)).EndInit();
- this.groupBox6.ResumeLayout(false);
- this.groupBox6.PerformLayout();
- this.groupBox12.ResumeLayout(false);
- this.groupBox11.ResumeLayout(false);
- this.groupBox10.ResumeLayout(false);
- this.groupBox9.ResumeLayout(false);
- this.groupBox1.ResumeLayout(false);
- this.ResumeLayout(false);
- }
- #endregion
- #region Controls
- private System.Windows.Forms.Panel panelall;
- private System.Windows.Forms.Panel panelControl;
- private System.Windows.Forms.Button btnCreatImgFile;
- private System.Windows.Forms.Button btnWorking;
- private System.Windows.Forms.Button btnStop;
- private System.Windows.Forms.GroupBox groupBox1;
- private System.Windows.Forms.GroupBox groupBox6;
- private System.Windows.Forms.GroupBox groupBox3;
- private System.Windows.Forms.GroupBox groupBox8;
- private System.Windows.Forms.GroupBox groupBox7;
- private System.Windows.Forms.GroupBox groupBox5;
- private System.Windows.Forms.GroupBox groupBox4;
- private System.Windows.Forms.GroupBox groupBox2;
- private System.Windows.Forms.GroupBox groupBox12;
- private System.Windows.Forms.GroupBox groupBox11;
- private System.Windows.Forms.GroupBox groupBox10;
- private System.Windows.Forms.GroupBox groupBox9;
- private System.Windows.Forms.GroupBox groupBox13;
- private System.Windows.Forms.Label label3;
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.Label label4;
- private System.Windows.Forms.Label label6;
- private System.Windows.Forms.Label label5;
- private System.Windows.Forms.Label label8;
- private System.Windows.Forms.Label label7;
- private System.Windows.Forms.Label label9;
- private System.Windows.Forms.Label label11;
- private System.Windows.Forms.Label label10;
- private System.Windows.Forms.Label label12;
- private System.Windows.Forms.Label label18;
- private System.Windows.Forms.Label label17;
- private System.Windows.Forms.Label label15;
- private System.Windows.Forms.Label label14;
- private System.Windows.Forms.Label label13;
- private System.Windows.Forms.Label label16;
- private System.Windows.Forms.ComboBox cmbStepUnit;
- private System.Windows.Forms.Button btnOther;
- private System.Windows.Forms.TextBox txtPercentage;
- private System.Windows.Forms.TextBox txtTime;
- private System.Windows.Forms.TrackBar trackPercentage;
- private System.Windows.Forms.TrackBar trackTime;
- private System.Windows.Forms.RadioButton ckPolygon;
- private System.Windows.Forms.RadioButton ckRectangle;
- private System.Windows.Forms.RadioButton ckCircular;
- private System.Windows.Forms.TextBox txtSizeX;
- private System.Windows.Forms.TextBox txtTilesX;
- private System.Windows.Forms.DataGridView dgvRegionTeb;
- private System.Windows.Forms.Button btnDel;
- private System.Windows.Forms.Button btnDetailed;
- private System.Windows.Forms.Button btnEstablish;
- private System.Windows.Forms.TextBox txtAreaY;
- private System.Windows.Forms.TextBox txtSizeY;
- private System.Windows.Forms.TextBox txtTilesY;
- private System.Windows.Forms.TextBox txtAreaX;
- private System.Windows.Forms.ComboBox comChoice;
- private System.Windows.Forms.RadioButton ckFocusingRepair;
- private System.Windows.Forms.RadioButton ckFocusingNull;
- private System.Windows.Forms.RadioButton ckAtuoFocusing;
- private System.Windows.Forms.RadioButton ckSeamless;
- private System.Windows.Forms.RadioButton ckTile;
- private System.Windows.Forms.Label lblUnit;
- private System.Windows.Forms.RadioButton ckSize;
- private System.Windows.Forms.RadioButton ckLockNull;
- private System.Windows.Forms.RadioButton ckArea;
- private System.Windows.Forms.Panel panelVision;
- private System.Windows.Forms.Panel panelMotion;
- private System.Windows.Forms.PictureBox picEffect;
- private System.Windows.Forms.RadioButton ckOther;
- private System.Windows.Forms.CheckBox chkAutoExposure;
- private System.Windows.Forms.Button btnWhiteBalance;
- private System.Windows.Forms.DataGridViewTextBoxColumn regionId;
- private System.Windows.Forms.DataGridViewTextBoxColumn regionName;
- private System.Windows.Forms.DataGridViewTextBoxColumn regionTiles;
- private System.Windows.Forms.DataGridViewTextBoxColumn regionZ;
- private System.Windows.Forms.DataGridViewTextBoxColumn regionArea;
- private System.Windows.Forms.Panel pnlSpeed;
- private System.Windows.Forms.PictureBox pictureBox1;
- private NumericUpDown numOverlapRate;
- private CircleControl circleControl;
- private CircleControl circleSportControl;
- #endregion
- private float m_overlapRate => (float)numOverlapRate.Value; // 拼接率
- private System.Timers.Timer m_aeTimer;
- private Thread m_stitchingThread;
- private Label label19;
- private ComboBox cmbStitchList;
- private bool _isDoing;
- private bool IsDoing
- {
- get => _isDoing;
- set
- {
- _isDoing = value;
- if (value)
- {
- this.Invoke(new Action(() =>
- {
- btnWorking.Enabled = false;
- btnStop.Enabled = true;
- }));
- }
- else
- {
- this.Invoke(new Action(() =>
- {
- btnWorking.Enabled = true;
- btnStop.Enabled = false;
- }));
- }
- }
- }
- #region Step Length
- /// <summary>
- /// X轴單次长度
- /// </summary>
- protected override double StepLenthX
- {
- get
- {
- string text = txtXStep.Text.Trim();
- if (string.IsNullOrEmpty(text))
- {
- throw new Exception("X" + PdnResources.GetString("Menu.TheXaxismovestepannotbeempty0.Text"));
- }
- var value = double.Parse(text);
- if (cmbStepUnit.SelectedItem.ToString().Equals("mm"))
- {
- value *= 1000;
- }
- return value;
- }
- }
- /// <summary>
- /// Y轴單次进长度
- /// </summary>
- protected override double StepLenthY
- {
- get
- {
- string text = txtYStep.Text.Trim();
- if (string.IsNullOrEmpty(text))
- {
- throw new Exception("Y" + PdnResources.GetString("Menu.TheXaxismovestepannotbeempty0.Text"));
- }
- var value = double.Parse(text);
- if (cmbStepUnit.SelectedItem.ToString().Equals("mm"))
- {
- value *= 1000;
- }
- return value;
- }
- }
- /// <summary>
- /// Z轴步进长度
- /// </summary>
- protected override double StepLenthZ
- {
- get
- {
- string text = txtZStep.Text.Trim();
- if (string.IsNullOrEmpty(text))
- {
- throw new Exception("Z" + PdnResources.GetString("Menu.TheXaxismovestepannotbeempty0.Text"));
- }
- var value = double.Parse(text);
- if (cmbStepUnit.SelectedItem.ToString().Equals("mm"))
- {
- value *= 1000;
- }
- return value;
- }
- }
- #endregion
- public CameraImageStitching() : base()
- {
- InitializeComponent();
- }
- public CameraImageStitching(AppWorkspace appWorkspace) : base(appWorkspace)
- {
- InitializeComponent();
- InitializeLanguageText();
- m_aeTimer = new System.Timers.Timer(1000);
- m_aeTimer.Elapsed += new System.Timers.ElapsedEventHandler(OnTimerAutoExposure);
- m_aeTimer.AutoReset = true;
- m_aeTimer.SynchronizingObject = this;
- this.panelControl.Controls.Add(this.m_documentWorkspace);
- this.m_documentWorkspace.GraphicsList.SelectChanged += GraphicsList_SelectChanged;
- circleControl = initViewCircal(71);
- circleSportControl = initSportCircal(71);
- this.panelVision.Controls.Add(this.circleControl);
- this.panelMotion.Controls.Add(this.circleSportControl);
- // 初始化步长单位
- this.cmbStepUnit.Items.Clear();
- this.cmbStepUnit.Items.AddRange(m_unit);
- this.cmbStepUnit.SelectedIndex = 1;
- this.btnStop.Enabled = false;
- CameraConfigs.GetInstance().CameraParamInit();
- }
- protected override void ReinitSpeedUI()
- {
- InitGroupSpeed(pnlSpeed, SpeedChanged);
- (pnlSpeed.Controls[1] as RadioButton).Checked = true;
- }
- protected void SpeedChanged(object sender, EventArgs e)
- {
- RadioButton radio = (RadioButton)sender;
- if (radio.Checked)
- {
- int index = (int)radio.Tag;
- m_Stage.SetSpeedXY(m_speedLists[index].LSpeed);
- m_Stage.SetSpeedZ(m_speedLists[index].ZSpeed);
- }
- }
- #region 拼图方式
- /// <summary>
- /// 矩形
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ckRectangle_CheckedChanged(object sender, EventArgs e)
- {
- if (ckRectangle.Checked)
- {
- DrawStitchingRectangle.ViewWidth = m_viewWidth;
- DrawStitchingRectangle.ViewHeight = m_viewHeight;
- DrawStitchingRectangle.Interval = m_overlapRate;
- if (ckArea.Checked)
- {
- DrawStitchingRectangle.lockType = LockType.AREA;
- }
- else if (ckSize.Checked)
- {
- DrawStitchingRectangle.lockType = LockType.SIZE;
- }
- m_documentWorkspace.ActiveTool = DrawToolType.DrawStitchingRectangle;
- btnEstablish.Enabled = false;
- }
- }
- /// <summary>
- /// 圆
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ckCircular_CheckedChanged(object sender, EventArgs e)
- {
- if (ckCircular.Checked)
- {
- DrawStitchingCircle.ViewWidth = m_viewWidth;
- DrawStitchingCircle.ViewHeight = m_viewHeight;
- DrawStitchingRectangle.Interval = m_overlapRate;
- if (ckArea.Checked)
- {
- DrawStitchingCircle.lockType = LockType.AREA;
- }
- else if (ckSize.Checked)
- {
- DrawStitchingCircle.lockType = LockType.SIZE;
- }
- m_documentWorkspace.ActiveTool = DrawToolType.DrawStitchingCircle;
- btnEstablish.Enabled = false;
- }
- }
- /// <summary>
- /// 多边形
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ckPolygon_CheckedChanged(object sender, EventArgs e)
- {
- if (ckPolygon.Checked)
- {
- DrawStitchingPolygon.ViewWidth = m_viewWidth;
- DrawStitchingPolygon.ViewHeight = m_viewHeight;
- DrawStitchingRectangle.Interval = m_overlapRate;
- if (ckArea.Checked)
- {
- DrawStitchingPolygon.lockType = LockType.AREA;
- }
- else if (ckSize.Checked)
- {
- DrawStitchingPolygon.lockType = LockType.SIZE;
- }
- m_documentWorkspace.ActiveTool = DrawToolType.DrawStitchingPolygon;
- btnEstablish.Enabled = false;
- }
- }
- /// <summary>
- /// 自定义
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ckOther_CheckedChanged(object sender, EventArgs e)
- {
- btnEstablish.Enabled = true;
- }
- /// <summary>
- /// 创建自定义矩形
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btnEstablish_Click(object sender, EventArgs e)
- {
- DrawStitchingRectangle.ViewWidth = m_viewWidth;
- DrawStitchingRectangle.ViewHeight = m_viewHeight;
- DrawStitchingRectangle.Interval = m_overlapRate;
- if (ckArea.Checked)
- {
- DrawStitchingRectangle.lockType = LockType.AREA;
- }
- else if (ckSize.Checked)
- {
- DrawStitchingRectangle.lockType = LockType.SIZE;
- }
- string tilesX = txtTilesX.Text.Trim();
- string tilesY = txtTilesY.Text.Trim();
- string sizeX = txtSizeX.Text.Trim();
- string sizeY = txtSizeY.Text.Trim();
- string areaX = txtAreaX.Text.Trim();
- if (!string.IsNullOrEmpty(tilesX) && !string.IsNullOrEmpty(tilesY))
- {
- int x = Int32.Parse(tilesX);
- int y = Int32.Parse(tilesY);
- if (x <= 0 || y <= 0)
- {
- MessageBox.Show(PdnResources.GetString("Menu.Tilesmusthavavalue.Text"));
- return;
- }
- m_documentWorkspace.ActiveTool = DrawToolType.DrawStitchingRectangle;
- int width = (int)Math.Floor(Convert.ToDouble(((x - (x + 1) * m_overlapRate) * m_viewWidth))) - 1;
- int height = (int)Math.Floor(Convert.ToDouble(((y - (y + 1) * m_overlapRate) * m_viewHeight))) - 1;
- Console.WriteLine(width + " " + height + " " + m_viewHeight);
- m_documentWorkspace.CreateStitchingRectangle(width, height);
- UpdateActiveTool(this.m_documentWorkspace.ActiveTool);
- }
- else if (!string.IsNullOrEmpty(sizeX) && !string.IsNullOrEmpty(sizeY))
- {
- float w = float.Parse(sizeX);
- float h = float.Parse(sizeY);
- if (w <= 0 || h <= 0)
- {
- MessageBox.Show(PdnResources.GetString("Menu.Sizevaluemustbegreaterthan0.Text"));
- return;
- }
- m_documentWorkspace.ActiveTool = DrawToolType.DrawStitchingRectangle;
- m_documentWorkspace.CreateStitchingRectangle((int)(w * 1000 / m_PxLength), (int)(h * 1000 / m_PxLength));
- UpdateActiveTool(this.m_documentWorkspace.ActiveTool);
- }
- else if (!string.IsNullOrEmpty(areaX))
- {
- double area = double.Parse(areaX);
- if (area <= 0)
- {
- MessageBox.Show(PdnResources.GetString("Menu.TheAreavaluemustbegreaterthan0.Text"));
- return;
- }
- double side = Math.Round(Math.Sqrt(area), 2);
- m_documentWorkspace.ActiveTool = DrawToolType.DrawStitchingRectangle;
- m_documentWorkspace.CreateStitchingRectangle((int)(side * 1000 / m_PxLength), (int)(side * 1000 / m_PxLength));
- UpdateActiveTool(this.m_documentWorkspace.ActiveTool);
- }
- else return;
- if (CurvedSurfaceList != null)
- {
- CurvedSurfaceList.Insert(0, null);
- }
- }
- #endregion
- #region 拼图区域列表
- private void GraphicsList_SelectChanged(object sender, EventArgs e)
- {
- UpdateActiveTool(this.m_documentWorkspace.ActiveTool);
- dgvRegionTeb.Rows.Clear();
- List<DrawObject> graphicsList = this.m_documentWorkspace.GraphicsList.GetDrawClassList(DrawClass.Stitch);
- int count = graphicsList.Count;
- for (int i = 0; i < count; i++)
- {
- int[] tiles = ((DrawStithchingBase)graphicsList[i]).GetTiles();
- double area = ((DrawStithchingBase)graphicsList[i]).GetArea();
- graphicsList[i].PropertyChanged += CameraImageStitching_PropertyChanged;
- string name = "";
- if (graphicsList[i] is DrawStitchingRectangle)
- {
- name = PdnResources.GetString("Menu.LabelAction.DrawRectangle.Text");
- }
- else if (graphicsList[i] is DrawStitchingPolygon)
- {
- name = PdnResources.GetString("Menu.LabelAction.DrawPolygon.Text");
- }
- else
- {
- name = PdnResources.GetString("Menu.LabelAction.DrawCircle.Text");
- }
- dgvRegionTeb.Rows.Add(i, name, tiles[0] + "," + tiles[1], 0, area);
- if (graphicsList[i].Selected)
- {
- dgvRegionTeb.Rows[i].Selected = true;
- dgvRegionTeb.CurrentCell = dgvRegionTeb.Rows[i].Cells[0];
- }
- }
- }
- private void CameraImageStitching_PropertyChanged(object sender, EventArgs e)
- {
- UpdateActiveTool(this.m_documentWorkspace.ActiveTool);
- this.DgvRegionTebRefresh();
- }
- private void DgvRegionTebRefresh()
- {
- dgvRegionTeb.Rows.Clear();
- List<DrawObject> graphicsList = this.m_documentWorkspace.GraphicsList.GetDrawClassList(DrawClass.Stitch);
- int count = graphicsList.Count;
- for (int i = 0; i < count; i++)
- {
- int[] tiles = ((DrawStithchingBase)graphicsList[i]).GetTiles();
- double area = ((DrawStithchingBase)graphicsList[i]).GetArea();
- string name = "";
- if (graphicsList[i] is DrawStitchingRectangle)
- {
- name = PdnResources.GetString("Menu.LabelAction.DrawRectangle.Text");
- }
- else if (graphicsList[i] is DrawStitchingPolygon)
- {
- name = PdnResources.GetString("Menu.LabelAction.DrawPolygon.Text");
- }
- else
- {
- name = PdnResources.GetString("Menu.LabelAction.DrawCircle.Text");
- }
- dgvRegionTeb.Rows.Add(i, name, tiles[0] + "," + tiles[1], 0, area);
- }
- }
- private void UpdateActiveTool(DrawToolType activeTool)
- {
- switch (activeTool)
- {
- case DrawToolType.DrawStitchingRectangle:
- this.ckRectangle.Checked = true;
- break;
- case DrawToolType.DrawStitchingCircle:
- this.ckCircular.Checked = true;
- break;
- case DrawToolType.DrawStitchingPolygon:
- this.ckPolygon.Checked = true;
- break;
- case DrawToolType.Pointer:
- this.ckOther.Checked = true;
- break;
- }
- }
- /// <summary>
- /// 无锁定
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ckLockNull_CheckedChanged(object sender, EventArgs e)
- {
- int count = this.m_documentWorkspace.GraphicsList.Count;
- for (int i = 0; i < count; i++)
- {
- ((DrawStithchingBase)this.m_documentWorkspace.GraphicsList[i]).Lock(LockType.NULL);
- }
- this.m_documentWorkspace.Refresh();
- }
- /// <summary>
- /// 面积锁定
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ckArea_CheckedChanged(object sender, EventArgs e)
- {
- int count = this.m_documentWorkspace.GraphicsList.Count;
- for (int i = 0; i < count; i++)
- {
- ((DrawStithchingBase)this.m_documentWorkspace.GraphicsList[i]).Lock(LockType.AREA);
- }
- this.m_documentWorkspace.Refresh();
- }
- /// <summary>
- /// 大小锁定
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void ckSize_CheckedChanged(object sender, EventArgs e)
- {
- int count = this.m_documentWorkspace.GraphicsList.Count;
- for (int i = 0; i < count; i++)
- {
- ((DrawStithchingBase)this.m_documentWorkspace.GraphicsList[i]).Lock(LockType.SIZE);
- }
- this.m_documentWorkspace.Refresh();
- }
- private void btnDel_Click(object sender, EventArgs e)
- {
- if (dgvRegionTeb.SelectedRows.Count <= 0)
- {
- MessageBox.Show(PdnResources.GetString("Menu.Selectthedatatoelete0.Text"));
- return;
- }
- DialogResult result = MessageBox.Show(PdnResources.GetString("Menu.Areyousuretodelete.Text") + "?", PdnResources.GetString("Menu.Tips.text"), MessageBoxButtons.OKCancel);
- if (result == DialogResult.OK)
- {
- //执行删除
- foreach (DataGridViewRow r in dgvRegionTeb.SelectedRows)
- {
- if (!r.IsNewRow)
- {
- this.m_documentWorkspace.GraphicsList.RemoveAt(r.Index);
- if (CurvedSurfaceList != null && CurvedSurfaceList.Count > r.Index)
- CurvedSurfaceList.RemoveAt(r.Index);
- }
- }
- this.DgvRegionTebRefresh();
- foreach (DataGridViewRow r in dgvRegionTeb.SelectedRows)
- {
- if (!r.IsNewRow)
- {
- this.m_documentWorkspace.GraphicsList[r.Index].Selected = true;
- }
- }
- this.m_documentWorkspace.Refresh();
- }
- }
- private void dgvRegionTeb_SelectionChanged(object sender, EventArgs e)
- {
- }
- private void dgvRegionTeb_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
- {
- this.m_documentWorkspace.GraphicsList.UnselectAll();
- for (int i = 0; i < dgvRegionTeb.Rows.Count; i++)
- {
- if (dgvRegionTeb.Rows[i].Selected)
- {
- this.m_documentWorkspace.GraphicsList[i].Selected = true;
- }
- else
- {
- this.m_documentWorkspace.GraphicsList[i].Selected = false;
- }
- }
- this.m_documentWorkspace.Refresh();
- }
- private void dgvRegionTeb_CellContentClick(object sender, DataGridViewCellEventArgs e)
- {
- }
- /// <summary>
- /// 详细
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btnDetailed_Click(object sender, EventArgs e)
- {
- if (dgvRegionTeb.SelectedRows.Count > 1 || dgvRegionTeb.SelectedRows.Count <= 0)
- {
- MessageBox.Show(PdnResources.GetString("Menu.Pleasselectandselecnlyoneuzzlearea0.Text"));
- return;
- }
- foreach (DataGridViewRow r in dgvRegionTeb.SelectedRows)
- {
- if (!r.IsNewRow)
- {
- ImageStitchingDetailDialog detailDialog = new ImageStitchingDetailDialog(((DrawStithchingBase)this.m_documentWorkspace.GraphicsList[r.Index]).GetViewPoints(), r.Index);
- detailDialog.Deleted += DetailDialog_Deleted;
- detailDialog.ShowDialog();
- }
- }
- }
- /// <summary>
- /// 删除拼图区域
- /// </summary>
- /// <param name="vIndex"></param>
- /// <param name="pIndex"></param>
- private void DetailDialog_Deleted(int vIndex, int pIndex)
- {
- ((DrawStithchingBase)this.m_documentWorkspace.GraphicsList[vIndex]).DeletePoint(pIndex);
- this.m_documentWorkspace.Refresh();
- }
- #endregion
- #region 相机设置
- /// <summary>
- /// 初始化相机设置相关控件
- /// </summary>
- protected override void initCameraSetting()
- {
- int exposureVal = (int)(m_cameraParamModel.parame.LNExposure);
- if (exposureVal >= trackTime.Minimum && exposureVal <= trackTime.Maximum)
- {
- trackTime.Value = exposureVal;
- }
- this.txtPercentage.Text = this.trackPercentage.Value.ToString();
- UpdateExposureUI(m_cameraParamModel.parame.ATExposure);
- }
- /// <summary>
- /// 其它设置
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btnOther_Click(object sender, EventArgs e)
- {
- using (CameraSettingDialog af = new CameraSettingDialog())
- {
- af.ShowDialog();
- }
- }
- /// <summary>
- /// 自动曝光
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void chkAutoExposure_Click(object sender, EventArgs e)
- {
- int autoExposure = chkAutoExposure.Checked ? 1 : 0;
- m_cameraParamModel.parame.ATExposure = autoExposure;
- if (autoExposure == 0)
- {
- trackPercentage.Value = 100;
- }
- UpdateExposureUI(autoExposure);
- }
- private void UpdateExposureUI(int autoExposure)
- {
- if (autoExposure == 1)
- {
- // 自动曝光
- trackTime.Enabled = false;
- txtTime.Enabled = false;
- trackPercentage.Enabled = false;
- txtPercentage.Enabled = false;
- chkAutoExposure.Checked = true;
- trackPercentage.Value = 100;
- m_aeTimer.Start();
- }
- else
- {
- trackTime.Enabled = true;
- txtTime.Enabled = true;
- trackPercentage.Enabled = true;
- txtPercentage.Enabled = true;
- chkAutoExposure.Checked = false;
- m_aeTimer.Stop();
- }
- }
- public void OnTimerAutoExposure(object source, System.Timers.ElapsedEventArgs e)
- {
- double paramValue = m_camera.ExposureTime;
- int expValue = (int)(paramValue * 1000);
- if (expValue < 137)
- {
- expValue = 130;
- }
- if (expValue > 15000000)
- {
- expValue = 15000000;
- }
- trackTime.Value = expValue;
- this.txtTime.Text = paramValue.ToString();
- }
- private void trackTime_ValueChanged(object sender, EventArgs e)
- {
- //规划为微秒值存储到model
- double atExpValue = (double)(this.trackTime.Value) / 1000;
- int value = (int)atExpValue;
- this.m_cameraParamModel.parame.LNExposure = value;
- // 设置到相机
- m_camera.ExposureTime = value; //usec
- this.txtTime.Text = value.ToString();
- }
- private void txtTime_KeyPress(object sender, KeyPressEventArgs e)
- {
- if (!char.IsDigit(e.KeyChar) && (e.KeyChar != (char)Keys.Enter)) // 非数字键, 放弃该输入
- {
- e.Handled = true;
- return;
- }
- if (e.KeyChar == (char)Keys.Enter)
- {
- try
- {
- int baoGuangTBarVal = Convert.ToInt32(txtTime.Text);
- switch (lblUnit.Text)
- {
- case "s":
- baoGuangTBarVal = baoGuangTBarVal * 1000 * 1000;
- break;
- case "ms":
- baoGuangTBarVal = baoGuangTBarVal * 1000;
- break;
- }
- if (baoGuangTBarVal > trackTime.Maximum)
- {
- baoGuangTBarVal = trackTime.Maximum;
- }
- if (baoGuangTBarVal < trackTime.Minimum)
- {
- baoGuangTBarVal = trackTime.Minimum;
- }
- trackTime.Value = baoGuangTBarVal;
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- }
- }
- private void trackPercentage_ValueChanged(object sender, EventArgs e)
- {
- }
- private void txtPercentage_KeyPress(object sender, KeyPressEventArgs e)
- {
- if (!char.IsDigit(e.KeyChar) && (e.KeyChar != (char)Keys.Enter)) // 非数字键, 放弃该输入
- {
- e.Handled = true;
- return;
- }
- if (e.KeyChar == (char)Keys.Enter)
- {
- try
- {
- int baoGuangPerTBarVal = Convert.ToInt32(txtPercentage.Text);
- if (baoGuangPerTBarVal < 5)
- {
- baoGuangPerTBarVal = 5;
- }
- if (baoGuangPerTBarVal > 200)
- {
- baoGuangPerTBarVal = 200;
- }
- trackPercentage.Value = baoGuangPerTBarVal;
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- }
- }
- /// <summary>
- /// 白平衡
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btnWhiteBalance_Click(object sender, EventArgs e)
- {
- m_cameraParamModel.parame.WhiteBalance = 1;
- // 自动白平衡
- m_camera.WhiteBalanceMode = 2;
- }
- #endregion
- #region 拼图
- private void btnStop_Click(object sender, EventArgs e)
- {
- IsDoing = false;
- _stitching.Stop();
- m_Stage.LockStage();
- m_Stage.LockZ();
- }
- /// <summary>
- /// 拼图开始
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btnWorking_Click(object sender, EventArgs e)
- {
- if (!m_camera.IsOpen())
- {
- MessageBox.Show(PdnResources.GetString("Menu.Pleaseconfirmwhetherthecameraisconnected.Text"));
- return;
- }
- if (!m_isReset)
- {
- MessageBox.Show(PdnResources.GetString("Menu.Pleaseresetfirst.Text"));
- return;
- }
- if (this.m_documentWorkspace.GraphicsList.GetDrawClassList(DrawClass.Stitch).Count <= 0)
- {
- MessageBox.Show(PdnResources.GetString("Menu.Pleasereatethepuzzleareafirst.Text"));
- return;
- }
- _stchCtlrList = new List<StitchingController>();
- IsDoing = true;
- m_stitchingThread = new Thread(new ThreadStart(StitchingMoveThreadEntry));
- m_stitchingThread.IsBackground = true;
- m_stitchingThread.Start();
- ///展示拼图成果
- new Task(() =>
- {
- do
- {
- if (_stitching != null)
- {
- if (_stitching.Result != null)
- this.BeginInvoke(new Action(() =>
- {
- pictureBox1.Image = _stitching.Result;
- pictureBox1.Invalidate();
- }));
- }
- Thread.Sleep(300);
- } while ((IsDoing || (_stitching != null && !_stitching.IsDone)));
- }).Start();
- }
- private StitchingController _stitching;
- private List<StitchingController> _stchCtlrList;
- /// <summary>
- /// 拼图流程控制
- /// </summary>
- private void StitchingMoveThreadEntry()
- {
- int num = 0;
- CurvedSurface curveSuf = null;
- List<DrawObject> graphicsList = this.m_documentWorkspace.GraphicsList.GetDrawClassList(DrawClass.Stitch);
- for (int i = 0; i < graphicsList.Count; i++)
- {
- var draw = (DrawStithchingBase)graphicsList[i];
- List<Dictionary<int, object>> list = draw.GetViewPoints();
- this.Invoke(new Action(() =>
- {
- if (i == 0)
- cmbStitchList.Items.Clear();
- cmbStitchList.Items.Add(i);
- cmbStitchList.Visible = i > 0;
- }));
- _stitching?.Wait();
- _stitching = new StitchingController(draw.ColumnNum, draw.RowNum, m_overlapRate);
- _stitching.MathSelect = 3;//ckTile.Checked ? 0 : ckSeamless.Checked ? 3 : 0;
- _stchCtlrList.Add(_stitching);
- _stitching.Start();
- if (CurvedSurfaceList != null && CurvedSurfaceList.Count > i)
- curveSuf = CurvedSurfaceList[i];
- for (int j = 0; j < list.Count; j++)
- {
- if (!IsDoing)
- {
- return;
- }
- Dictionary<int, object> point = list[j];
- if (point[1].ToString().Equals("0"))
- {
- PointF nextP = (PointF)point[0];
- var x = ConvertPXToUm(nextP.X);
- var y = ConvertPXToUm(nextP.Y);
- base.m_Stage.To(x, y);
- var times = DateTime.Now;
- m_Stage.WaitMoveDone();
- Console.WriteLine("WaitMoveDone:" + (DateTime.Now - times).TotalMilliseconds.ToString("f1"));
- Thread.Sleep(150);
- //自动聚焦
- if (ckAtuoFocusing.Checked)
- {
- AutoFocus(num);
- num++;
- }
- //聚焦补偿
- if (ckFocusingRepair.Checked && curveSuf != null)
- {
- var p3d = curveSuf.Points.FirstOrDefault((p) => Math.Abs(p.X - x) < 1 && Math.Abs(p.Y - y) < 1);
- var zpos = 0.0;
- if (p3d == null)
- {
- zpos = curveSuf.GetValue(x, y);
- }
- else
- {
- zpos = p3d.Z;
- }
- m_Stage.UpTo(zpos);
- m_Stage.WaitMoveDone();
- }
- _stitching.Add(m_BitmapCurrent);
- //_stitching.SynRun();
- }
- else
- {
- var black = new Bitmap(m_BitmapCurrent.Width, m_BitmapCurrent.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
- _stitching.Add(black);
- }
- }
- }
- _stitching?.Wait();
- IsDoing = false;
- this.Invoke(new Action(() =>
- {
- cmbStitchList.SelectedIndex = cmbStitchList.Items.Count - 1;
- }));
- //if (success)
- //{
- // MessageBox.Show(PdnResources.GetString("Menu.Jigsawpuzzlefailure.Text"));
- //}
- //else
- {
- MessageBox.Show(PdnResources.GetString("Menu.Thepuzzletocomplete.Text"));
- }
- }
- private void AutoFocus(int num)
- {
- switch (_comChoiceSelected)
- {
- case 0:
- AutoFocusStart();
- break;
- case 1:
- if (num % 2 == 0)
- {
- AutoFocusStart();
- }
- break;
- case 2:
- if (num % 3 == 0)
- {
- AutoFocusStart();
- }
- break;
- case 3:
- if (num % 5 == 0)
- {
- AutoFocusStart();
- }
- break;
- case 4:
- if (num % 7 == 0)
- {
- AutoFocusStart();
- }
- break;
- case 5:
- if (num % 9 == 0)
- {
- AutoFocusStart();
- }
- break;
- case 6:
- if (num % 10 == 0)
- {
- AutoFocusStart();
- }
- break;
- }
- }
- /// <summary>
- /// 调用预览窗口的自动聚焦
- /// </summary>
- private void AutoFocusStart()
- {
- try
- {
- AutoFocusWorkflow.AutoFocus(m_Stage, () => { return m_BitmapCurrent; });
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- }
- #endregion
- private void btnCreatImgFile_Click(object sender, EventArgs e)
- {
- if (_stitching == null)
- {
- MessageBox.Show(PdnResources.GetString("Menu.NoMosaicimagefound.Text"));
- return;
- }
- //获取命名
- string photoName;
- if (Startup.instance.ruleDB == null)
- {
- photoName = NamingRuleHelper.GetNameFromXml(Startup.instance.configModel, "默认标尺", "0");
- }
- else
- {
- photoName = NamingRuleHelper.GetNameFromXml(Startup.instance.configModel, Startup.instance.ruleDB.ruler_name, Startup.instance.ruleDB.gain_multiple.ToString());
- }
- DocumentWorkspace dw = m_appWorkspace.AddNewDocumentWorkspace();
- Document document = Document.FromImageMat(_stitching.ResultMat);
- document.Dirty = true;
- dw.Document = document;
- dw.fileText = string.Format("{0}-{1:D3}", this.Text, Startup.instance.step_length++);
- dw.xmlSaveModel = Startup.instance.ruleDB;
- dw.InitRulerInfo();
- //激活
- m_appWorkspace.ActiveDocumentWorkspace = dw;
- //锁定扩缩
- if (m_appWorkspace.isLockZoom && m_appWorkspace.lockScaleRatio > 0)
- {
- m_appWorkspace.ActiveDocumentWorkspace.ZoomBasis = ZoomBasis.ScaleFactor;
- m_appWorkspace.ActiveDocumentWorkspace.ScaleFactor = ScaleFactor.FromDouble(m_appWorkspace.lockScaleRatio);
- m_appWorkspace.SetZoonTrackValue(m_appWorkspace.ActiveDocumentWorkspace.ScaleFactor);
- }
- else
- {
- m_appWorkspace.ActiveDocumentWorkspace.ZoomBasis = ZoomBasis.FitToWindow;
- }
- m_appWorkspace.Refresh();
- }
- int _comChoiceSelected = -1;
- private void comChoice_SelectedIndexChanged(object sender, EventArgs e)
- {
- _comChoiceSelected = comChoice.SelectedIndex;
- }
- protected override void GetMouseLeftClickPoint(object sender, EventArgs e)
- {
- if (!IsDoing)
- base.GetMouseLeftClickPoint(sender, e);
- }
- private void cmbStitchList_SelectedIndexChanged(object sender, EventArgs e)
- {
- int i = cmbStitchList.SelectedIndex;
- _stitching = _stchCtlrList[i];
- pictureBox1.Image = _stitching.Result;
- }
- private void CameraImageStitching_FormClosing(object sender, FormClosingEventArgs e)
- {
- if (_stchCtlrList == null) return;
- foreach (var item in _stchCtlrList)
- {
- item.Dispose();
- }
- _stchCtlrList.Clear();
- GC.Collect();
- }
- List<CurvedSurface> CurvedSurfaceList;
- private void ckFocusingRepair_Click(object sender, EventArgs e)
- {
- List<DrawObject> graphicsList = this.m_documentWorkspace.GraphicsList.GetDrawClassList(DrawClass.Stitch);
- List<DrawStithchingBase> graphicsList1 = new List<DrawStithchingBase>();
- foreach (var item in graphicsList)
- {
- graphicsList1.Add(item as DrawStithchingBase);
- }
- var form = new ImageStitchingFocusDialog(m_Stage, graphicsList1);
- form.CallbackResult = (result) =>
- {
- CurvedSurfaceList = result.ToList();
- };
- form.ShowDialog();
- }
- }
- }
|