20084MatlabVB,(,266071):VisualBasic60,SDK2000CCD,Matlab70,,,,,,,,,,,,,,MatlabCOM,MatlabM,COMVisualBasic,:;;VB;Matlab;:TS10363:A:1009-265X(2008)04-0001-04UnitedApplicationofMatlabandVBonAutoDetectingoftheWovenDefectsLIJianfu,WANGLiming(CollegeofTextileandClothing,QingdaoUniversity,Qingdao266071,China)Abstract:AutomateddefectinspectionsystemforwovendefectswithtechniqueofcomputervisiondataacquisitionandimageprocessingwasresearchedVisualBasic60wasusedtodesigntheUIoftheapplicationsoftware,SDK2000VGAandCCDcamerawereusedtogathertheimagedata,andimageprocessingtoolboxintheMatlab70wasusedtocomparethealgorithmicmethodandtofindabestmethodtodetectthewovendefectsTheautomateddefectinspectionsystemismadeupofthethreepartsIntheprocessingofgatheringimage,driversoftheSDK2000VGAwasusedtosavetheimageDuringpictureprocessing,manymethodswereusedtoidentifythewovendefectsassoonaspossibleMakinguseofthelatestCOMbuildertoapplythe*MfilesofMatlabinVisualBasictorealizetheautodetectingKeywords:wovendefect;autodetecting;VB;matlab;imageprocessing:2007-12-18:(1980-),,,,0,,,,,,,,,,Matlab,,,,,Matlab,VisualBasic,,,,,,1200841111,3,,,CCD1,4,3,25,51112VBSDK2000,SDK2000PCISDK2000,PCI,(PNP),SDK2000,VB,320240,,32cm24cm121a)SDK2000,,,b)VB(2),SDK2000ActivesControlModule,,,,122,,TrueOverlay,FalsePreviewSDKConnectFalse,SDKEditCopy2VB*jpg*bmp,:jpg,ImageFileName,100SDKSaveImageToJpgImageFileName,100bmp,ImageFileName,100SDKSaveImageToBmpImageFileName,100221VBMatlab,Matlab701MatlabCOM11COM,VB,:a)Matlabcomtool,!MatlabCOMBuilder∀(3),,!NewProjectSettings∀3!MatlabCOMBuilder∀b)MMex:!AddFile∀,M-filec):MMex,!Build∀!COMObject∀Matlab,DLL,(4)2200844Matlabd):,!Component∀!PackageComponent∀,EXEe)VB:MyImage10TypeLibraryMWComUtil10TypeLibrary,VBMyImageImageFileName,20,0,022Matlab,*mVB,,,,,,,,,,,,,,,,221,,,,,,,,,,,5MN,fx(m),fY(n),fX(m)=#f(m,xi)/nfY(n)=#f(yj,n)/m5320084:fx(m),fY(n),,fX(m)fY(n)222f(x,y)s(x,y),:s(x,y)=f(x,y)+e(x,y),x,y=0,1,∃,n-1,e(x,y),e(x,y),f(x,y)2221a)N,Nb),,c),2222,3a):MATLABddencmp,wdencmpb):,wdencmpwthreshc):,,,,,,223(Otsu),,,663a),b),,,,c),,,,,d),,:[1],.[J].,2002,28(4):118-121.[2],.Matlab70[M].:,103-113.[3],.MatlabVB[J]..2003,5:45-46.[4],.VisaulBasic60[M]..:,2000.[5].MATLAB[M].:,2003.[6],,,.[J].,2005(4):121-123(:)4