视觉网halcon学习笔记_第1页
视觉网halcon学习笔记_第2页
视觉网halcon学习笔记_第3页
视觉网halcon学习笔记_第4页
视觉网halcon学习笔记_第5页
已阅读5页,还剩5页未读, 继续免费阅读

付费下载

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

EachprogramconsistsofasequenceofHALCONTheprogramcanbestructuredintoThesequencecanbeextendedbyusingcontroloperatorslikeif,for,repeat,orTheresultsoftheoperatorsarepassedviaNoimplicitdatapassingisInputparametersofoperatorscanbevariablesorHDevelophasnofeaturestodesignagraphicaluserAnHDevelopprogramisconsideredasaprototypicsolutionofthevisionpartofanHDevelopistypicallynotusedforthefinal作为快速开发的图形化(IDE)界面;但是,Halcon程序并不是一个完整的最终应用软件,ThevisionpartissolvedwithHDevelop,andtheapplicationisdevelopedwithC++orVisual OverWrite全部函数声明为全局类型,数据类型只需要用Hobject、HTuple两类类型进行声明;C++两类参数:图形参数Iconic(image,region,XLD)与控制参数Control(string,integer,real,MultipleArbitraryregionofbyte,uint2 int1, //Differenceoftwoimagesorderivateswithintegerprecisio(??int4 //Assigningone"grayvaluetoeachcolor(??) 连续图形的光学流分布Efficientdatastructure(runlengthExtensivesetofFastestmorphologyontherowrunHalconRegionExtendedLineDescriptionSubpixelaccuratelineandedgeGenericpointlistbaseddataHandlingofcontours,polygons,lines,parallels,Booleantrue1false0)true;但绝大多数的Halcon函数接受字符串型的表达:’true’‘false’,而非逻辑型表达;H_MSG_TRUEno operatordidnot endif/if... ...endif/if...elseif... repeat...break、continue、return、exit、stop用来控制语句的执行;赋值语句在Halcon中也被当作函数来使用:, ResultVariable:=Expression insert(Tuple,NewValue,Index,Tuple)//Tuple[Index]:=NewValue numberof selectionofan selectionofapartofasubset(t1,t2)selectionfromt1byindicesin gen_empty_obj count_obj(p, concat_obj(p1,p2, select_obj(p,q, copy_obj(p,q,i+1,subset(t1,t2)select_obj(p,q,元组的数学运算,如:A*B,令m|A|,nHalcon的数学运算a/aa% restoftheintegera*av+vadditionandconcatenationofa‐aleftrightibandiboribxorbnot v+ concatenationofstringsand searchcharacterin search searchcharacterinstring searchsubstring lengthof selectionofone selectionof splittingtot< lesst> t<= lessort>= greaterort= t# notnot land lor lxor sineof cosineof tangentof arcsineofaintheinterval[‐/2,/2],a[‐1, arccosineaintheinterval[‐/2,/2],a[‐1, arctangentaintheinterval[‐/2,/2],a[‐1, arctangenta/bintheinterval[‐, hyperbolicsineof hyperboliccosineof naturallogarithm,a> decadelogarithm,a> a1其他操作(统计、随机数、符号函数等 minimumvalueofthe maximumvalueofthe element‐wiseminimumoftwo indicesofalloccurrencesoft1within createrandomvaluesfrom0..1(numberspecifiedby element‐wisesignofa sumofallelementsorstring cumulativehistogramofa mean squarerootof convertradiansto convertintegerto convertarealto convertrealto convertstringtoais_number(v)testifvalueisa absolutevalueofa(integeror absolutevalueofa(always smallestintegervaluenotsmallerthan largestintegervaluenotgreaterthan fractionalpartofa1/a2,withthesamesignas eliminateduplicatesofneighboringvalues(typicallyusedincombinationwithsort)sort_index(t)returnindexinsteadof Medianvalueofatuple Selecttheelement(number)withthegiven reversetheorderofthesubset(t1,t2)selectionfromt1byindicesinremove(t1,t2)Removeofvalueswiththegiven valueofanenvironment ASCIInumberofa convertanASCIInumbertoa ASCIInumberofatupleof convertatupleofintegersintoaOperator:Aprocedureof theHALCONlibraryusedinHDeveloporoneofthelanguageProcedure(ofHDevelop):AsubroutinedefinedfortheuseinsideRegion:Resultofasegmentationlikethreshold.Inothersystemscalledblob,area,binaryimage,orisland.Implementedusingrunlengthencoding.XLD:ExtendedLineDescription.Universaldatastructureusedtohandlecontourbaseddata.Mainlyusedinthecontextofsubpixelprecisemeasurement.Domain:Partoftheimagewhichisusedforprocessing.Inothersystemscalled(regionofChannel:Oneimagematrixofamulti‐spectralimage.OneexampleistheredchannelofanRGBimage.Iconicdata:Overalltermforimages,regions,andXLDdata.Inobjectorientedlanguages(C++andCOM)andinHDevelopiconicdataisrepresentedbyapolymorphicdatatype.Inobjectorientedlanguagesiconicdataisalsocallediconicobject.Controldata:Allnoniconicdata.Examplesaresinglevalues(integer,real,andstring),coordinates,arraysofvalues.Tuple:anarrayofvalueswhereeachelementcanbeofadifferenttype.Onecanhavebothiconicandcontroltuples.HALCONobject:SynonymforIconicobject/Imageacquisitioninterface:Interfacebetweentheframegrabber/cameradriver(SDK)andtheHALCONlibrary.TheImageacquisitioninterfaceisaDLLwhichisdynamicallyloadedwhencallingopen_framegrabber.Languageinterface:SoftwarethatenablestheprogrammertousetheHALCONlibraryinagivenlanguage(e.g.,C++).ExtensionPackage:Amechanismthatenablestheusertofullyintegrateuser‐definedproceduresintotheHALCONenvironment.TheextensionpackageconceptgivesfullaccesstotheinternaldatastructuresofHALCON.Licensefile:File“license.dat“inthedirectory“license“.Thisfileisusedtogetherwithhardwarecomponents(dongleorEthernetcard)tocheckifacorrectlicenseisavailable.Helpfiles:Filesinthedirectory“help“whichareusedtogetonlineinformationaboutallHALCONoperators.ThisisextensivelyusedbyHDevelop.Shape‐BasedMatching:Findingofanobjectinanimagebasedonapredefinedmodel.Theshapebasedmatchingusesfeaturestoquicklylocateobjectsveryprecisely.VariationModel:Amethodtodoprintcheckingbypresentingmultiplegoodpatternstothesystem.Thevariationmodellearnsthenormalvariationagoodpatternandbasedonthisinformationcandetectrealdefects.MeasureTool:Asetofoperatorstofindtheexactlocationofedgesalonglinesorcirculararcs.Othersystemscallthesimilartool,e.g.,caliper.Accuracy:ThedeviationfromthetruePrecision:ThestandarddeviationoftheFiltering(noise,smoothing,edge,bit,arithmetic,RegionEdgeColorprocessingandOCR/Barcode/data8、HalconHDevEngineHalcon程序(*.hdvpC++、COM、.NET语言。具体功能为:(operatorHDevEngine行文件hdevenginecpp.lib,具体见示例。利用9、Halcon数据结构Image)道;disp_obj()自动判别类别;缩放:set_part()设置显示区域;set_part_style()RulestoDisplayGrayImagesmean_image(),并且总是先处理分割:Grayoperators仅适用第一通道,Coloroperators:使用前三个通道,Multichanneloperator会使用全部通道;通道处理:count_channels(),decompose*(), append_channel(),channels_to_image(),image_to_channels()(Shape:cicle:,修改:set_grayval():Modifyoneormorepixelsoftheinputimage;paint_gray():Paintpartofanimageintoanotherimage;overpaint_gray():Paintpartofanimageintotheinputimage;paint_region():Painttheregionwithaconstantgrayvalueintoanimage;overpaint_region():Painttheregionwithaconstantgrayvalueintotheinputimage复制:crop_part():Croparectangle,givenbyupperleftcornerandsize;crop_rectangle1():Croparectangle,givenbyupperleftandlowerrightcorner;crop_domain():Cropareao

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论