ni vision for labwindows™/cvi™ function · the following documents contain information that you...

2853

Upload: others

Post on 15-Mar-2020

17 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents
Page 2: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

NIVisionforLabWindows™/CVI™FunctionReferenceHelpJune2008,370379G-01NIVisionforLabWindows/CVIisalibraryofCfunctionsthatyoucanusetodevelopmachinevisionandscientificimagingapplications.Formoreinformationaboutthishelpfile,refertothefollowingtopics:UsingHelpRelatedDocumentationGlossaryImportantInformationTechnicalSupportandProfessionalServicesTocommentonNationalInstrumentsdocumentation,refertotheNationalInstrumentsWebsite.©2001–2008NationalInstrumentsCorporation.Allrightsreserved.

Page 3: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ActivatingYourSoftwareHowdoIactivatemysoftware?UsetheNIActivationWizardtoobtainanactivationcodeforyoursoftware.YoucanlaunchtheNIActivationWizardtwoways:

Launchtheproductandchoosetoactivateyoursoftwarefromthelistofoptionspresented.LaunchNILicenseManagerbyselectingStart»AllPrograms»NationalInstruments»NILicenseManager.ClicktheActivatebuttoninthetoolbar.NoteYoudonotneedtoactivateyoursoftwareifitismanagedbyNIVolumeLicenseManagerasapartofaVolumeLicenseAgreement.

Whatisactivation?Activationistheprocessofobtaininganactivationcodetoenableyoursoftwaretorunonyourcomputer.Anactivationcodeisanalphanumericstringthatverifiesthesoftware,version,andcomputerIDtoenablefeaturesonyourcomputer.Activationcodesareuniqueandarevalidononlyonecomputer.WhatistheNIActivationWizard?TheNIActivationWizardisapartofNILicenseManagerthatstepsyouthroughtheprocessofenablingsoftwaretorunonyourmachine.WhatinformationdoIneedtoactivate?Youneedyourproductserialnumber,username,andorganization.TheNIActivationWizarddeterminestherestoftheinformation.Certainactivationmethodsmayrequireadditionalinformationfordelivery.Thisinformationisusedonlytoactivateyourproduct.CompletedisclosureofNationalInstrumentslicensingprivacypolicyisavailableatni.com/activate/privacy.Ifyouoptionallychoosetoregisteryoursoftware,yourinformationisprotectedundertheNationalInstrumentsprivacypolicy,availableatni.com/privacy.HowdoIfindmyproductserialnumber?Youcanfindyourserialnumberontheproof-of-ownershipandregistrationcardthatyoureceivedwithyourproduct,asshowninthe

Page 4: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

followingexample.

IfyoursoftwarekitdoesnotincludeaCertificateofOwnership,youcanfindyourserialnumberontheproductpackingsliporontheshippinglabel.WhatisaComputerID?ThecomputerIDcontainsuniqueinformationaboutyourcomputer.NationalInstrumentsrequiresthisinformationtoenableyoursoftware.YoucanfindyourcomputerIDthroughtheNIActivationWizardorbyusingNILicenseManager,asfollows:

1. LaunchNILicenseManagerbyselectingStart»AllPrograms»NationalInstruments»NILicenseManager.

2. ClicktheDisplayComputerInformationbuttoninthetoolbar.Formoreinformationaboutproductactivationandlicensingrefertoni.com/activate.

Page 5: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

RelatedDocumentationMostNIVisionmanualsalsoareavailableasPDFs.YoumusthaveAdobeAcrobatReaderwithSearchandAccessibility5.0.5orlaterinstalledtoviewthePDFs.RefertotheAdobeSystemsIncorporatedWebsitetodownloadAcrobatReader.RefertotheNationalInstrumentsProductManualsLibraryforupdateddocumentationresources.Thefollowingdocumentscontaininformationthatyoumayfindhelpfulasyouusethishelpfile.YoucanaccessNIVisiondocumentsbyselectingStart»AllPrograms»NationalInstruments»Vision»Documentation»NIVision.

NIVisionDevelopmentModuleReadme—Containsinformationaboutnewfunctionality,minimumsystemrequirements,installationinstructions,anddescriptionsofthedocumentationforthefollowing:NIVisionforLabVIEW,NIVisionforLabWindows/CVI,NIVisionforVisualBasic,andVisionAssistant.NIVisionforLabWindows/CVIUserManual—DescribeshowtocreatemachinevisionandimageprocessingapplicationsinLabWindows/CVIusingtheVisionDevelopmentModule.Themanualguidesyouthroughtasksbeginningwithsettingupyourimagingsystemtotakingmeasurements.NIVisionConceptsManual—Describesthebasicconceptsofimageanalysis,imageprocessing,andmachinevision.Thisdocumentalsocontainsin-depthdiscussionsaboutimagingfunctionsforadvancedusers.NIOCRTrainingInterfaceHelp—ContainsinformationabouthowtousetheOCRTrainingInterfacetotraincharacters,savecharactersets,andverifycharactersbycomparingthemtoareferencecharacter.NIClassificationTrainingInterfaceHelp—ContainsinformationabouthowtousetheNIClassificationTrainingInterfacetotrainandclassifybinarysamples.NIVisionTemplateEditorHelp—ContainsinformationabouthowtousetheNIVisionTemplateEditortolearnandedittemplateimagesthatyoucanusewithpatternmatching,geometricmatching,andgoldentemplatecomparisonfunctions.

Page 6: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

UsingHelpConventionsNavigatingHelpSearchingHelpPrintingHelpFileTopics

Page 7: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ConventionsThishelpfileusesthefollowingconventions:

<> Anglebracketsthatcontainnumbersseparatedbyanellipsisrepresentarangeofvaluesassociatedwithabitorsignalname—forexample,DBIO<3..0>.

» The»symbolleadsyouthroughnestedmenuitemsanddialogboxoptionstoafinalaction.ThesequenceFile»PageSetup»OptionsdirectsyoutopulldowntheFilemenu,selectthePageSetupitem,andselectOptionsfromthelastdialogbox.Thisicondenotesanote,whichalertsyoutoimportantinformation.

bold Boldtextdenotesitemsthatyoumustselectorclickoninthesoftware,suchasmenuitemsanddialogboxoptions.Boldtextalsodenotesparameternames,emphasis,oranintroductiontoakeyconcept.

green Underlinedtextinthiscolordenotesalinktoahelptopic,helpfile,orWebaddress.

italic Italictextdenotesvariablesorcrossreferences.Thisfontalsodenotestextthatisaplaceholderforawordorvaluethatyoumustsupply.

monospace Textinthisfontdenotestextorcharactersthatyoushouldenterfromthekeyboard,sectionsofcode,programmingexamples,andsyntaxexamples.Thisfontisalsousedforthepropernamesofdiskdrives,paths,directories,programs,subprograms,subroutines,devicenames,functions,operations,variables,filenames,andextensions.

Page 8: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

NavigatingHelp(WindowsOnly)Tonavigatethishelpfile,usetheContents,Index,andSearchtabstotheleftofthiswindoworusethefollowingtoolbarbuttonslocatedabovethetabs:

Hide—Hidesthenavigationpanefromview.Locate—LocatesthecurrentlydisplayedtopicintheContentstab,allowingyoutoviewrelatedtopics.Back—Displaysthepreviouslyviewedtopic.Forward—DisplaysthetopicyouviewedbeforeclickingtheBackbutton.Options—Displaysalistofcommandsandviewingoptionsforthehelpfile.

Page 9: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

SearchingHelp(WindowsOnly)UsetheSearchtabtotheleftofthiswindowtolocatecontentinthishelpfile.Ifyouwanttosearchforwordsinacertainorder,suchas"relateddocumentation,"addquotationmarksaroundthesearchwordsasshownintheexample.SearchingfortermsontheSearchtaballowsyoutoquicklylocatespecificinformationandinformationintopicsthatarenotincludedontheContentstab.

Page 10: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

WildcardsYoualsocansearchusingasterisk(*)orquestionmark(?)wildcards.Usetheasteriskwildcardtoreturntopicsthatcontainacertainstring.Forexample,asearchfor"prog*"liststopicsthatcontainthewords"program,""programmatically,""progress,"andsoon.Usethequestionmarkwildcardasasubstituteforasinglecharacterinasearchterm.Forexample,"?ext"liststopicsthatcontainthewords"next,""text,"andsoon.

NoteWildcardsearchingwillnotworkonSimplifiedChinese,TraditionalChinese,Japanese,andKoreansystems.

Page 11: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

NestedExpressionsUsenestedexpressionstocombinesearchestofurtherrefineasearch.YoucanuseBooleanexpressionsandwildcardsinanestedexpression.Forexample,"exampleAND(programORVI)"liststopicsthatcontain"exampleprogram"or"exampleVI."Youcannotnestexpressionsmorethanfivelevels.

Page 12: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

BooleanExpressionsClickthe buttontoaddBooleanexpressionstoasearch.ThefollowingBooleanoperatorsareavailable:

AND(default)—Returnstopicsthatcontainbothsearchterms.Youdonotneedtospecifythisoperatorunlessyouareusingnestedexpressions.OR—Returnstopicsthatcontaineitherthefirstorsecondterm.NOT—Returnstopicsthatcontainthefirsttermwithoutthesecondterm.NEAR—Returnstopicsthatcontainbothtermswithineightwordsofeachother.

Page 13: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

SearchOptions

UsethefollowingcheckboxesontheSearchtabtocustomizeasearch:Searchpreviousresults—Narrowstheresultsfromasearchthatreturnedtoomanytopics.Youmustremovethecheckmarkfromthischeckboxtosearchalltopics.Matchsimilarwords—Broadensasearchtoreturntopicsthatcontainwordssimilartothesearchterms.Forexample,asearchfor"program"liststopicsthatincludethewords"programs,""programming,"andsoon.Searchtitlesonly—Searchesonlyinthetitlesoftopics.

Page 14: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PrintingHelpFileTopics(WindowsOnly)CompletethefollowingstepstoprintanentirebookfromtheContentstab:

1. Right-clickthebook.2. SelectPrintfromtheshortcutmenutodisplaythePrintTopics

dialogbox.3. SelectthePrinttheselectedheadingandallsubtopicsoption.

NoteSelectPrinttheselectedtopicifyouwanttoprintthesingletopicyouhaveselectedintheContentstab.

4. ClicktheOKbutton.

Page 15: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PrintingPDFDocumentsThishelpfilemaycontainlinkstoPDFdocuments.ToprintPDFdocuments,clicktheprintbuttonlocatedontheAdobeAcrobatViewertoolbar.

Page 16: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

AcquisitionFunctionsAcquisitionfunctionsletyouperformcommonacquisitiontasks,suchasringacquisitions,sequenceacquisitions,andgrabs,directlyintoanNIVisionimage.Toperformmoreadvancedacquisitions,suchastriggeredacquisitions,seetheNI-IMAQFunctionReferenceHelp.YoucanusetheAcquisitionfunctionswiththeSignalI/OfunctionsdescribedintheNI-IMAQFunctionReferenceHelp.FunctionsinthissectionrequireNI-IMAQ2.2orhigher.ThefollowingtableliststheAcquisitionfunctions.ThefunctionsintheAcquisitionclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachAcquisitionfunctionpanelrepresentsonefunction.

Class LabWindows/CVIEquivalent FunctionNameAcquisition CopyFromRing imaqCopyFromRingAcquisition EasyAcquire imaqEasyAcquireAcquisition ExtractFromRing imaqExtractFromRingAcquisition Grab imaqGrabAcquisition ReleaseImage imaqReleaseImageAcquisition SetupGrab imaqSetupGrabAcquisition SetupRing imaqSetupRingAcquisition SetupSequence imaqSetupSequenceAcquisition Snap imaqSnapAcquisition StartAcquisition imaqStartAcquisitionAcquisition StopAcquisition imaqStopAcquisition

Page 17: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

AnalyticGeometryFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.AnalyticGeometryfunctionsallowyoutoperformanalyticalgeometryoperations,suchasobtainingpointsonacontourwithinanimageorobtainingtheanglebetweentwolines.ThefollowingtableliststheAnalyticGeometryfunctions.ThefunctionsintheAnalyticGeometryclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachAnalyticGeometryfunctionpanelrepresentsonefunction.

Class LabWindows/CVIEquivalent FunctionName

AnalyticGeometry

BuildCoordinateSystem imaqBuildCoordinateSystem

AnalyticGeometry

FitCircle2 imaqFitCircle2

AnalyticGeometry

FitEllipse2 imaqFitEllipse2

AnalyticGeometry

FitLine imaqFitLine

AnalyticGeometry

GetAngle imaqGetAngle

AnalyticGeometry

GetBisectingLine imaqGetBisectingLine

AnalyticGeometry

GetDistance imaqGetDistance

AnalyticGeometry

GetIntersection imaqGetIntersection

AnalyticGeometry

GetMidLine imaqGetMidLine

AnalyticGeometry

GetPerpendicularLine imaqGetPerpendicularLine

Page 18: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

AnalyticGeometry

GetPointsOnContour imaqGetPointsOnContour

AnalyticGeometry

GetPointsOnLine imaqGetPointsOnLine

AnalyticGeometry

GetPolygonArea imaqGetPolygonArea

AnalyticGeometry

InterpolatePoints imaqInterpolatePoints

Page 19: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

BarcodeFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.ThefollowingtableliststheBarcodeI/Ofunctions.ThefunctionsintheBarcodeI/Oclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachBarcodeI/Ofunctionpanelrepresentsonefunction.

Class LabWindows/CVIEquivalent FunctionName

Barcode GradeDataMatrixBarcodeAIM

imaqGradeDataMatrixBarcodeAIM

Barcode ReadBarcode imaqReadBarcodeBarcode ReadDataMatrixBarcode imaqReadDataMatrixBarcode2Barcode ReadPDF417Barcode imaqReadPDF417BarcodeBarcode ReadQRCode imaqReadQRCode

Page 20: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

BinaryProcessingFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.UseBinaryProcessingfunctionsonbinaryandlabeledimagesforapplicationsinwhichthesize,number,orshapeoftheobjectsintheimageareimportant.Binaryimageshaveonlytwopixelvalues,unlessyoulabeltheimage.

NoteApplyathresholdtoagrayscaleimagetomakeanimagebinary.Formoreinformationaboutthresholdinganimage,refertoimaqThreshold()intheGrayscaleProcessingsection.

ThefollowingtableliststheBinaryProcessingfunctions.ThefunctionsintheBinaryProcessingclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesoffunctionsubclasses.Thethirdcolumncontainsnamesofindividualfunctionpanels.EachBinaryProcessingfunctionpanelrepresentsonefunction.

Page 21: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

MorphologyFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.Morphologyfunctionsallowyoutoapplystandardmorphologicaltransformations,suchasdilationsanderosions.

Class Subclass LabWindows/CVIEquivalent FunctionName

BinaryProcessing

Morphology ConvexHull imaqConvexHull

BinaryProcessing

Morphology DanielssonDistance

imaqDanielssonDistance

BinaryProcessing

Morphology FillHoles imaqFillHoles

BinaryProcessing

Morphology FindCircles imaqFindCircles

BinaryProcessing

Morphology Label2 imaqLabel2

BinaryProcessing

Morphology Morphology imaqMorphology

BinaryProcessing

Morphology RejectBorder imaqRejectBorder

BinaryProcessing

Morphology Segmentation imaqSegmentation

BinaryProcessing

Morphology Separation imaqSeparation

BinaryProcessing

Morphology SimpleDistance imaqSimpleDistance

BinaryProcessing

Morphology SizeFilter imaqSizeFilter

BinaryProcessing

Morphology Skeleton imaqSkeleton

Page 22: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParticleAnalysisFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.ParticleAnalysisfunctionsallowyoutocalculateinformationaboutparticlesinanimageandselectparticlesusingtheinformation.

Class Subclass LabWindows/CVIEquivalent FunctionName

BinaryProcessing

ParticleAnalysis

CountParticles imaqCountParticles

BinaryProcessing

ParticleAnalysis

MeasureParticle imaqMeasureParticle

BinaryProcessing

ParticleAnalysis

ParticleFilter4 imaqParticleFilter4

Page 23: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ShapeMatchingFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.ShapeMatchingfunctionsallowyoutofindshapesinanimage.

Class Subclass LabWindows/CVIEquivalent FunctionName

BinaryProcessing

ShapeMatching

MatchShape imaqMatchShape

Page 24: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CalibrationFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.Calibrationfunctionsallowyoutospatiallycalibrateimages.Spatialcalibrationconvertspixelcoordinatestoreal-worldcoordinateswhilecompensatingforpotentialperspectiveerrorsornonlineardistortionsinyourimagingsystem.ThefollowingtableliststheCalibrationfunctions.ThefunctionsintheCalibrationclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachCalibrationfunctionpanelrepresentsonefunction.

Class LabWindows/CVIEquivalent FunctionName

Calibration CopyCalibrationInfo imaqCopyCalibrationInfo2Calibration CorrectCalibratedImage imaqCorrectCalibratedImageCalibration GetCalibrationInfo imaqGetCalibrationInfo2Calibration LearnCalibrationGrid imaqLearnCalibrationGridCalibration LearnCalibrationPoints imaqLearnCalibrationPointsCalibration SetCoordinateSystem imaqSetCoordinateSystemCalibration SetSimpleCalibration imaqSetSimpleCalibrationCalibration ConvertPixelToReal

WorldimaqTransformPixelToRealWorld

Calibration TransformRealWorldToPixel

imaqTransformRealWorldToPixel

Page 25: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CaliperFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.Caliperfunctionsallowyoutodetectandmeasurefeatures,suchasedgesandangles,alongapathinanimage.ThefollowingtableliststheCaliperfunctions.ThefunctionsintheCaliperclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachCaliperfunctionpanelrepresentsonefunction.

Class LabWindows/CVIEquivalent FunctionNameCaliper CaliperTool imaqCaliperToolCaliper ConcentricRake2 imaqConcentricRake2Caliper DetectExtremes imaqDetectExtremesCaliper DetectRotation imaqDetectRotationCaliper EdgeTool4 imaqEdgeTool4Caliper FindEdge2 imaqFindEdge2Caliper FindCoordSys(Rect) imaqFindTransformRect2Caliper FindCoordSys(2Rects) imaqFindTransformRects2Caliper LineGaugeTool imaqLineGaugeTool2Caliper Rake2 imaqRake2Caliper SimpleEdge imaqSimpleEdgeCaliper Spoke2 imaqSpoke2Caliper StraightEdge imaqStraightEdge

Page 26: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ClassificationFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.Classificationfunctionsletyouidentifyanunknownobjectbycomparingasetofitssignificantfeaturestoasetoffeaturesthatconceptuallyrepresentclassesofknownobjects.ThefollowingtableliststheClassificationfunctions.ThefunctionsintheClassificationclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachClassificationfunctionpanelrepresentsonefunction.

Class LabWindows/CVIEquivalent FunctionName

Classification AddClassifierSample

imaqAddClassifierSample

Classification Classify imaqClassifyClassification CreateClassifier imaqCreateClassifierClassification DeleteClassifier

SampleimaqDeleteClassifierSample

Classification GetClassifierAccuracy

imaqGetClassifierAccuracy

Classification GetClassifierSampleInfo

imaqGetClassifierSampleInfo

Classification GetNearestNeighborOptions

imaqGetNearestNeighborOptions

Classification GetParticleClassifierOptions

imaqGetParticleClassifierOptions

Classification ReadClassifierFile imaqReadClassifierFileClassification RelabelClassifier

SampleimaqRelabelClassifierSample

Classification SetParticleClassifierOptions

imaqSetParticleClassifierOptions

Page 27: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Classification TrainNearestNeighborClassifier

imaqTrainNearestNeighborClassifier

Classification WriteClassifierFile imaqWriteClassifierFile

Page 28: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ColorProcessingFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.ColorProcessingfunctionsallowyoutoanalyzeandprocesscolorimagesindifferentcolorspaces.UseColorProcessingfunctionswithapplicationsinwhichcolorinformationisimportant.ThesefunctionsworkwithcolorimagesintheRed,Green,Blue(RGB)domainandtheHue,Saturation,andLuminance(HSL)domain.Formoreinformationaboutcolordomains,refertotheNIVisionConceptsManual.ThefollowingtableliststheColorProcessingfunctions.ThefunctionsintheColorProcessingclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesoffunctionsubclasses.Thethirdcolumncontainsnamesofindividualfunctionpanels.EachColorProcessingfunctionpanelrepresentsonefunction.

Class Subclass LabWindows/CVIEquivalent FunctionName

ColorProcessing

— ChangeColorSpace2

imaqChangeColorSpace2

ColorProcessing

— ColorBCGTransform

imaqColorBCGTransform

ColorProcessing

— ColorEqualize imaqColorEqualize

ColorProcessing

— ColorHistogram2 imaqColorHistogram2

ColorProcessing

— ColorLookup imaqColorLookup

ColorProcessing

— ColorThreshold imaqColorThreshold

Page 29: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ColorMatchingFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.ColorMatchingfunctionsallowyoutolearninformationaboutthecolorsinatemplateimageandcomparethatinformationwiththecolorsinotherimages.

Class Subclass LabWindows/CVIEquivalent FunctionName

ColorProcessing

ColorMatching

LearnColor imaqLearnColor

ColorProcessing

ColorMatching

MatchColor imaqMatchColor

Page 30: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DisplayFunctionsDisplayfunctionsallowyoutodisplayimagesinimagewindows.ThefollowingtableliststheDisplayfunctions.ThefunctionsintheDisplayclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesoffunctionsubclasses.Thethirdcolumncontainsnamesofindividualfunctionpanels.EachDisplayfunctionpanelrepresentsonefunction.

Class Subclass LabWindows/CVIEquivalent FunctionName

Display — AreToolsContextSensitive

imaqAreToolsContextSensitive

Display — CloseWindow imaqCloseWindowDisplay — DisplayImage imaqDisplayImageDisplay — GetLastKey imaqGetLastKeyDisplay — GetSystemWindow

HandleimaqGetSystemWindowHandle

Display — GetWindowCenterPos

imaqGetWindowCenterPos

Display — SetToolContextSensitivity

imaqSetToolContextSensitivity

Display — ShowWindow imaqShowWindow

Page 31: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ToolWindowFunctionsToolWindowsfunctionsallowyoutomanagethetoolpalette,whichyouusetoselectareasofanimageinanimagewindow.

Class Subclass LabWindows/CVIEquivalent FunctionName

Display ToolWindow

CloseToolWindow imaqCloseToolWindow

Display ToolWindow

GetCurrentTool imaqGetCurrentTool

Display ToolWindow

GetLastEvent imaqGetLastEvent

Display ToolWindow

GetToolWindowHandle

imaqGetToolWindowHandle

Display ToolWindow

GetToolWindowPosition

imaqGetToolWindowPos

Display ToolWindow

IsToolWindowVisible imaqIsToolWindowVisible

Display ToolWindow

MoveToolWindow imaqMoveToolWindow

Display ToolWindow

SetCurrentTool imaqSetCurrentTool

Display ToolWindow

SetEventCallback imaqSetEventCallback

Display ToolWindow

SetToolColor imaqSetToolColor

Display ToolWindow

SetupToolWindow imaqSetupToolWindow

Display ToolWindow

ShowToolWindow imaqShowToolWindow

Page 32: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

WindowManagementFunctionsWindowManagementfunctionsallowyoutoconfigure,move,andresizeimagewindows.Youcancontrolupto16imagewindowsatatime.

Class Subclass LabWindows/CVIEquivalent FunctionName

Display WindowManagement

AreScrollbarsVisible

imaqAreScrollbarsVisible

Display WindowManagement

BringWindowToTop

imaqBringWindowToTop

Display WindowManagement

GetMousePosition

imaqGetMousePos

Display WindowManagement

GetWindowBackground

imaqGetWindowBackground

Display WindowManagement

GetDisplayMapping

imaqGetWindowDisplayMapping

Display WindowManagement

GetWindowGrid imaqGetWindowGrid

Display WindowManagement

GetWindowHandle

imaqGetWindowHandle

Display WindowManagement

GetWindowPosition

imaqGetWindowPos

Display WindowManagement

GetWindowSize imaqGetWindowSize

Display WindowManagement

GetWindowTitle imaqGetWindowTitle

Display WindowManagement

GetWindowZoom2

imaqGetWindowZoom2

Display WindowManagement

IsWindowNon-Tearing

imaqIsWindowNonTearing

Display WindowManagement

IsWindowVisible imaqIsWindowVisible

Display Window MoveWindow imaqMoveWindow

Page 33: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ManagementDisplay Window

ManagementSetupWindow imaqSetupWindow

Display WindowManagement

SetWindowBackground

imaqSetWindowBackground

Display WindowManagement

SetDisplayMapping

imaqSetWindowDisplayMapping

Display WindowManagement

SetWindowGrid imaqSetWindowGrid

Display WindowManagement

SetWindowMaxContourCount

imaqSetWindowMaxContourCount

Display WindowManagement

SetWindowNon-Tearing

imaqSetWindowNonTearing

Display WindowManagement

SetWindowPalette

imaqSetWindowPalette

Display WindowManagement

SetWindowSize imaqSetWindowSize

Display WindowManagement

SetWindowThreadPolicy

imaqSetWindowThreadPolicy

Display WindowManagement

SetWindowTitle imaqSetWindowTitle

Display WindowManagement

SetWindowZoomtoFit

imaqSetWindowZoomToFit

Display WindowManagement

ShowScrollbars imaqShowScrollbars

Display WindowManagement

ZoomWindow2 imaqZoomWindow2

Page 34: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ToolWindowTheexamplesofthetoolpaletteinthefollowingfigurehavefouriconsperline.Thetoolpaletteontheleftautomaticallytransformstothepaletteontherightwhenyoumanipulatearegiontoolinanimagewindow.

1PixelIntensity 4AnchoringCoordinatesofaregion2Image-TypeIndicator(8-bit,16-bit,RGB)

5SizeofanActiveRegion

3CoordinatesoftheMouseontheActiveWindow

6LengthandHorizontalDisplacementAngleofaLineRegion

TipsforUsingtheToolWindowThefollowingaretipsyoucanapplywhenusingthetoolwindow:

UseimaqGetLastEvent()orregisteracallbackwithimaqSetEventCallback()toretrievethedraweventsonawindowandfindthecoordinatesofaselectedregion.Alterthefunctionalityofregiontoolsbypressingcertainkeyboardkeyswhileusingthetool:

ToconstrainthexandydimensionsofanROI,holddownthe<Shift>keywhiledrawing.Thisforcesrectanglesintosquares,ellipsesintocircles,andlinesegmentsintohorizontalorverticalsegments.ToaddanROIwithouterasingthepreviousROIelements,holddownthe<Ctrl>keywhenyouclick.Thepreviouselementsareerasedifyoudonotuse<Ctrl>whenstartinganewelement.Toproducethelastpointofapolygonorbrokenline,double-clickwhiledrawing.

UsetheselectiontooltoselectanexistingROIbyclickingitsborder.OnceyouselectanROI,youcanmanipulateitinthefollowingways:

ToeraseanROIinanimagewindow,selectitandpressthe<Delete>key.

Page 35: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Toresizearectangleorellipse,clickinagrabhandleanddragittoanewlocation.Torepositionavertexinaline,brokenline,orpolygon,clickinagrabhandleandmoveittoanewlocation.Torepositionarectangleorellipse,clickintheinterioranddragittoanewlocation.Torepositionapoint,clickonitanddragittoanewlocation.Torepositionlines,brokenlines,andpolygons,clickonanysegmentanddragittoanewlocation.Torepositionfreehandlinesandclosedfreehandlines,clickanywhereonthelineanddragittoanewlocation.Torotatearotatedrectangle,clicktheinteriorhandlebarsanddragtherectangle.Youcanrepositionandresizearotatedrectanglejustasyouwouldanormalrectangle.Toresizetheinteriororexternalradiiofanannulus,clicktheinternalorexternaledge,respectively,anddragittoanewlocation.Youcanrepositionanannulusbyclickingonthecenteroftheannulusorthecenteroftheannularregionanddragittoanewlocation.

YoucanalsoachievetheselectiontoolfunctionalitywithoutusingtheselectiontoolbyturningoncontextsensitivityusingtheimaqSetToolContextSensitivity()function.

Page 36: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ErrorManagementFunctionsErrorManagementfunctionsclearpendingerrors,returnthelasterror,returnthefunctioninwhichthelasterroroccurred,andsettheerror.ThefollowingtableliststheErrorManagementfunctions.ThefunctionsintheErrorManagementclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachErrorManagementfunctionpanelrepresentsonefunction.

Class LabWindows/CVIEquivalent FunctionName

ErrorManagement

ClearError imaqClearError

ErrorManagement

GetErrorText imaqGetErrorText

ErrorManagement

GetLastError imaqGetLastError

ErrorManagement

GetLastErrorFunction imaqGetLastErrorFunc

ErrorManagement

SetError imaqSetError

Page 37: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FileI/OFunctionsFileI/Ofunctionsallowyoutoreadimagesfromaharddriveordisk,writeimagestoaharddriveordisk,andgetinformationaboutimagesstoredonaharddriveordisk.ThefollowingtableliststheFileI/Ofunctions.ThefunctionsintheFileI/Oclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachFileI/Ofunctionpanelrepresentsonefunction.

Class LabWindows/CVIEquivalent FunctionNameFileI/O CloseAVI imaqCloseAVIFileI/O CreateAVIFile imaqCreateAVIFileI/O GetAVIInfo imaqGetAVIInfoFileI/O GetFileInformation imaqGetFileInfoFileI/O GetFilterNames imaqGetFilterNamesFileI/O LoadImagePopup imaqLoadImagePopupFileI/O OpenAVIFile imaqOpenAVIFileI/O ReadAVIFrame imaqReadAVIFrameFileI/O ReadFile imaqReadFileFileI/O ReadVisionFile imaqReadVisionFileFileI/O WriteAVIFrame imaqWriteAVIFrameFileI/O WriteBMPFile imaqWriteBMPFileFileI/O WriteFile imaqWriteFileFileI/O WriteJPEGFile imaqWriteJPEGFileFileI/O WriteJPEG2000File imaqWriteJPEG2000FileFileI/O WritePNGFile2 imaqWritePNGFile2FileI/O WriteTIFFFile imaqWriteTIFFFileFileI/O WriteVisionFile imaqWriteVisionFile

Page 38: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FrequencyDomainAnalysisFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.FrequencyDomainAnalysisfunctionsallowyoutoconvertimagesbetweenthespatialandfrequencydomainsandtoanalyzeimagesinthefrequencydomain.ThefollowingtableliststheFrequencyDomainAnalysisfunctions.ThefunctionsintheFrequencyDomainAnalysisclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachFrequencyDomainAnalysisfunctionpanelrepresentsonefunction.

Class LabWindows/CVIEquivalent FunctionName

FrequencyDomainAnalysis

Attenuate imaqAttenuate

FrequencyDomainAnalysis

Conjugate imaqConjugate

FrequencyDomainAnalysis

FFT imaqFFT

FrequencyDomainAnalysis

FlipFrequencies imaqFlipFrequencies

FrequencyDomainAnalysis

InverseFFT imaqInverseFFT

FrequencyDomainAnalysis

Truncate imaqTruncate

Page 39: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

GrayscaleProcessingFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.GrayscaleProcessingfunctionsenhancegrayscaleimagesforviewingorfurtherprocessing.ThefollowingtableliststheGrayscaleProcessingfunctions.ThefunctionsintheGrayscaleProcessingclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesoffunctionsubclasses.Thethirdcolumncontainsnamesofindividualfunctionpanels.EachGrayscaleProcessingfunctionpanelrepresentsonefunction.

Page 40: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

MorphologyFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.Morphologyfunctionsallowyoutoapplystandardmorphologicaltransformations,suchasdilationsanderosions.

Class Subclass LabWindows/CVIEquivalent FunctionName

GrayscaleProcessing

Morphology GrayMorphology imaqGrayMorphology

Page 41: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

SpatialFiltersFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.SpatialFiltersfunctionsallowyoutomodifyanimageusingneighborhoodfunctions.

Class Subclass LabWindows/CVIEquivalent FunctionName

GrayscaleProcessing

SpatialFilters

CannyEdgeFilter imaqCannyEdgeFilter

GrayscaleProcessing

SpatialFilters

Convolve2 imaqConvolve2

GrayscaleProcessing

SpatialFilters

Correlate imaqCorrelate

GrayscaleProcessing

SpatialFilters

EdgeFilter imaqEdgeFilter

GrayscaleProcessing

SpatialFilters

Lowpass imaqLowPass

GrayscaleProcessing

SpatialFilters

MedianFilter imaqMedianFilter

GrayscaleProcessing

SpatialFilters

NthOrderFilter imaqNthOrderFilter

Page 42: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ThresholdFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.Thresholdfunctionsallowyoutoconvertagrayscaleimagetoabinaryimage.

Class Subclass LabWindows/CVIEquivalent FunctionName

GrayscaleProcessing

Threshold AutomaticThreshold imaqAutoThreshold2

GrayscaleProcessing

Threshold LocalThreshold imaqLocalThreshold

GrayscaleProcessing

Threshold MagicWand imaqMagicWand

GrayscaleProcessing

Threshold Multithreshold imaqMultithreshold

GrayscaleProcessing

Threshold Threshold imaqThreshold

Page 43: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

TransformFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.Transformfunctionsallowyoutoreplaceeachpixelinanimageusingatransferfunction.

Class Subclass LabWindows/CVIEquivalent FunctionName

GrayscaleProcessing

Transform BCGTransform imaqBCGTransform

GrayscaleProcessing

Transform Equalize imaqEqualize

GrayscaleProcessing

Transform Inverse imaqInverse

GrayscaleProcessing

Transform Lookup imaqLookup

GrayscaleProcessing

Transform MathTransform imaqMathTransform

GrayscaleProcessing

Transform WatershedTransform

imaqWatershedTransform

Page 44: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageAnalysisFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.ImageAnalysisfunctionsallowyoutocalculatevariousstatisticsaboutthepixelsofanimage.ThefollowingtableliststheImageAnalysisfunctions.ThefunctionsintheImageAnalysisclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachImageAnalysisfunctionpanelrepresentsonefunction.

Class LabWindows/CVIEquivalent FunctionNameImageAnalysis Centroid imaqCentroidImageAnalysis ExtractCurves imaqExtractCurvesImageAnalysis Histogram imaqHistogramImageAnalysis LinearAverages imaqLinearAverages2ImageAnalysis LineProfile imaqLineProfileImageAnalysis Quantify imaqQuantify

Page 45: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageManagementFunctionsImageManagementfunctionsallowyoutogatherinformationaboutanimageormanipulatethecontentsofanimage.ThefollowingtableliststheImageManagementfunctions.ThefunctionsintheImageManagementclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesoffunctionsubclasses.Thethirdcolumncontainsnamesofindividualfunctionpanels.EachImageManagementfunctionpanelrepresentsonefunction.

Class Subclass LabWindows/CVIEquivalent FunctionName

ImageManagement

— ArrayToImage imaqArrayToImage

ImageManagement

— CreateImage imaqCreateImage

ImageManagement

— ImageToArray imaqImageToArray

Page 46: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

BorderFunctionsBorderfunctionsallowyoutofillanimageborderwithasetofvalues,getthesizeofanimageborder,andsetthesizeofimageborder.

Class Subclass LabWindows/CVIEquivalent FunctionName

ImageManagement

Border FillBorder imaqFillBorder

ImageManagement

Border GetBorderSize imaqGetBorderSize

ImageManagement

Border SetBorderSize imaqSetBorderSize

Page 47: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ClipboardFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.Clipboardfunctionsallowyoutocopyimagestoandfromtheclipboard.

Class Subclass LabWindows/CVIEquivalent FunctionName

ImageManagement

Clipboard ClipboardToImage imaqClipboardToImage

ImageManagement

Clipboard ImageToClipboard imaqImageToClipboard

Page 48: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DrawingFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.Drawingfunctionsallowyoutodrawlines,shapes,andtextonimages.

Class Subclass LabWindows/CVIEquivalent FunctionName

ImageManagement

Drawing DrawLineOnImage

imaqDrawLineOnImage

ImageManagement

Drawing DrawShapeOnImage

imaqDrawShapeOnImage

ImageManagement

Drawing DrawTextOnImage

imaqDrawTextOnImage

Page 49: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageInformationFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.ImageInformationfunctionsallowyoutogatherinformationaboutpixelsandimages.

Class Subclass LabWindows/CVIEquivalent FunctionName

ImageManagement

ImageInformation

EnumerateCustomKeys

imaqEnumerateCustomKeys

ImageManagement

ImageInformation

GetBitDepth imaqGetBitDepth

ImageManagement

ImageInformation

GetBytesPerPixel

imaqGetBytesPerPixel

ImageManagement

ImageInformation

GetImageInformation

imaqGetImageInfo

ImageManagement

ImageInformation

GetImageSize imaqGetImageSize

ImageManagement

ImageInformation

GetImageType imaqGetImageType

ImageManagement

ImageInformation

GetMaskOffset imaqGetMaskOffset

ImageManagement

ImageInformation

GetPixelAddress imaqGetPixelAddress

ImageManagement

ImageInformation

GetVisionInfoTypes

imaqGetVisionInfoTypes

ImageManagement

ImageInformation

IsImageEmpty imaqIsImageEmpty

ImageManagement

ImageInformation

ReadCustomData

imaqReadCustomData

ImageManagement

ImageInformation

RemoveCustomData

imaqRemoveCustomData

Image Image RemoveVision imaqRemoveVisionInfo2

Page 50: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Management Information Info2ImageManagement

ImageInformation

SetBitDepth imaqSetBitDepth

ImageManagement

ImageInformation

SetImageSize imaqSetImageSize

ImageManagement

ImageInformation

SetMaskOffset imaqSetMaskOffset

ImageManagement

ImageInformation

WriteCustomData

imaqWriteCustomData

Page 51: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageManipulationFunctionsImageManipulationfunctionsallowyoutomanipulateimagesintheirentirety.Functionsinthissubclasscopy,scale,shift,andtransposeimages.

Class Subclass LabWindows/CVIEquivalent FunctionName

ImageManagement

ImageManipulation

Cast imaqCast

ImageManagement

ImageManipulation

CopyRectangle imaqCopyRect

ImageManagement

ImageManipulation

Duplicate imaqDuplicate

ImageManagement

ImageManipulation

Flatten imaqFlatten

ImageManagement

ImageManipulation

Flip imaqFlip

ImageManagement

ImageManipulation

Mask imaqMask

ImageManagement

ImageManipulation

Resample imaqResample

ImageManagement

ImageManipulation

Rotate2 imaqRotate2

ImageManagement

ImageManipulation

Scale imaqScale

ImageManagement

ImageManipulation

Shift imaqShift

ImageManagement

ImageManipulation

Transpose imaqTranspose

ImageManagement

ImageManipulation

Unflatten imaqUnflatten

ImageManagement

ImageManipulation

UnwrapImage imaqUnwrapImage

Page 52: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageManagement

ImageManipulation

View3D imaqView3D

Page 53: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

InterlacingFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.Interlacingfunctionsallowyoutocombinetwofieldsintooneimageframeorseparateaframeintotwofields.

Class Subclass LabWindows/CVIEquivalent FunctionName

ImageManagement

Interlacing InterlaceCombine imaqInterlaceCombine

ImageManagement

Interlacing InterlaceSeparate imaqInterlaceSeparate

Page 54: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PixelManipulationFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.PixelManipulationfunctionsallowyoutomanipulateimagesatthepixellevel.YoucanusefunctionsinthePixelManipulationsubclasstoextractimageplanes,replaceimageplanes,setandreturnpixelvalues,andconvertimagestoarraysandarraystoimages.

Class Subclass LabWindows/CVIEquivalent FunctionName

ImageManagement

PixelManipulation

ArrayToComplexPlane

imaqArrayToComplexPlane

ImageManagement

PixelManipulation

ComplexPlaneToArray

imaqComplexPlaneToArray

ImageManagement

PixelManipulation

ExtractColorPlanes

imaqExtractColorPlanes

ImageManagement

PixelManipulation

ExtractComplexPlane

imaqExtractComplexPlane

ImageManagement

PixelManipulation

FillImage imaqFillImage

ImageManagement

PixelManipulation

GetLine imaqGetLine

ImageManagement

PixelManipulation

GetPixel imaqGetPixel

ImageManagement

PixelManipulation

ReplaceColorPlanes

imaqReplaceColorPlanes

ImageManagement

PixelManipulation

ReplaceComplexPlane

imaqReplaceComplexPlane

ImageManagement

PixelManipulation

SetLine imaqSetLine

ImageManagement

PixelManipulation

SetPixel imaqSetPixel

Page 55: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

InspectionFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.Inspectionfunctionsallowyoutocompareimagestoagoldentemplateimage.ThefollowingtableliststheInspectionfunctions.ThefunctionsintheInspectionclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachInspectionfunctionpanelrepresentsonefunction.

Class LabWindows/CVIEquivalent FunctionName

Inspection CompareGoldenTemplate imaqCompareGoldenTemplateInspection LearnGoldenTemplate imaqLearnGoldenTemplate

Page 56: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LCDFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.LCDfunctionsallowyoutoisolateandreadthevalueofaseven-segmentLCD.ThefollowingtableliststheLCDfunctions.ThefunctionsintheLCDclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachLCDfunctionpanelrepresentsonefunction.

Class LabWindows/CVIEquivalent FunctionNameLCD FindLCDSegments imaqFindLCDSegmentsLCD ReadLCD imaqReadLCD

Page 57: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

MachineVisionFunctionsMachineVisionfunctionsallowyoutoperformcommonmachinevisioninspectiontasks,includingdetectingthepresenceorabsenceofpartsinanimageandmeasuringthedimensionsofpartstoseeiftheymeetspecifications.TheMachineVisionfunctionsareopensource,whichallowsyoutousethesourcecodeasexamplesforparticularapplicationsandtoexaminetheoperationofthecodeatrun-time.TheMachineVisionfunctionshaveaseparatefunctionpanelfromtheotherNIVisionfunctions(NIMachineVision.fp).ToloadtheMachineVisionfunctions,selectInstrument»LoadfromtheLabWindows/CVIprojectwindow,browsetothe<CVI>\toolslib\visiondirectory,andselectnimachinevision.fp.YoucannowaccessallofthefunctionpanelsfromtheInstrumentmenu.Becausethefunctionsareopensource,youcanviewthesourcebyexaminingtheNIMachineVision.cfile.

NoteDonotmakechangesdirectlytothefilebecausefutureinstallationsmayoverwriteyourchanges.Instead,copythefunctionyouwanttomodifytoanothersourcefileandmodifyitthere.

ThefollowingtableliststheMachineVisionfunctions.ThefunctionsintheMachineVisionclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesoffunctionsubclasses.Thethirdcolumncontainsnamesofindividualfunctionpanels.EachMachineVisionfunctionpanelrepresentsonefunction.

Page 58: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CoordinateTransformFunctionsCoordinateTransformfunctionsallowyoutofindvarioustypesofcoordinatetransformsinanimage.Usethesefunctionstofindacoordinatetransformusingeitheredgedetectionorpatternmatching.

Class Subclass LabWindows/CVIEquivalent FunctionName

MachineVision

CoordinateTransform

FindTransformPattern

imaqFindTransformPattern

Page 59: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CountandMeasureObjectsFunctionsCountandMeasureObjectsfunctionsallowyoutocountandmeasureobjectsinanimage.

Class Subclass LabWindows/CVIEquivalent FunctionName

MachineVision

CountandMeasureObjects

CountObjects imaqCountObjects

MachineVision

CountandMeasureObjects

DisposeObjectReport

imaqDisposeObjectReport

Page 60: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FindPatternsFunctionsFindPatternsfunctionsallowyoutofindapatterninanimage.

Class Subclass LabWindows/CVIEquivalent FunctionName

MachineVision

FindPatterns

FindPattern imaqFindPattern

Page 61: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LocateEdgesFunctionsLocateEdgesfunctionsallowyoutofindstraightorcircularedgesinanimage.

Class Subclass LabWindows/CVIEquivalent FunctionName

MachineVision

LocateEdges

DisposeCircularEdgeReport

imaqDisposeCircularEdgeReport

MachineVision

LocateEdges

DisposeStraightEdgeReport

imaqDisposeStraightEdgeReport

MachineVision

LocateEdges

FindCircularEdge

imaqFindCircularEdge

MachineVision

LocateEdges

FindConcentricEdge

imaqFindConcentricEdge

Page 62: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

MeasureDistancesFunctionsMeasureDistancesfunctionsallowyoutomeasuredistancesinanimage,suchastheminimumormaximumhorizontalseparationbetweentwoverticallyorientededges.

Class Subclass LabWindows/CVIEquivalent

FunctionName

MachineVision

MeasureDistances

ClampMax imaqClampMax

MachineVision

MeasureDistances

ClampMin imaqClampMin

Page 63: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

MeasureIntensitiesFunctionsMeasureIntensitiesfunctionsallowyoutomeasuretheintensityofaspecificregionofanimage.

Class Subclass LabWindows/CVIEquivalent FunctionName

MachineVision

MeasureIntensities

LightMeterLine imaqLightMeterLine

MachineVision

MeasureIntensities

LightMeterPoint imaqLightMeterPoint

MachineVision

MeasureIntensities

LightMeterRect imaqLightMeterRect

Page 64: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

SelectRegionofInterestFunctionsSelectRegionofInterestfunctionsallowyoutoselectaspecificregionofanimage.

Class Subclass LabWindows/CVIEquivalent FunctionName

MachineVision

SelectRegionofInterest

SelectAnnulus imaqSelectAnnulus

MachineVision

SelectRegionofInterest

SelectLine imaqSelectLine

MachineVision

SelectRegionofInterest

SelectPoint imaqSelectPoint

MachineVision

SelectRegionofInterest

SelectRect imaqSelectRect

Page 65: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

MemoryManagementFunctionsTheMemoryManagementfunction,imaqDispose(),deletesimages,ROIs,arrays,andreportsandthenfreesthespacetheyoccupiedinmemory.ThefollowingtableliststheMemoryManagementfunctions.ThefunctionsintheMemoryManagementclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachMemoryManagementfunctionpanelrepresentsonefunction.

Class LabWindows/CVIEquivalent FunctionNameMemoryManagement Dispose imaqDispose

Page 66: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

MeterFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.Meterfunctionsallowyoutoidentifythearcinformationofameterandthenreadthatmeter.ThefollowingtableliststheMeterfunctions.ThefunctionsintheMeterclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachMeterfunctionpanelrepresentsonefunction.

Class LabWindows/CVIEquivalent FunctionNameMeter GetMeterArc imaqGetMeterArcMeter ReadMeter imaqReadMeter

Page 67: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ObsoleteMachineVisionFunctionsObsoletefunctionsarefunctionsfromapreviousversionofNIVisionthathavebeenreplacedbynewerfunctions.ThoughthecurrentversionofNIVisionstillsupportsthesefunctions,youshouldusethenewerfunctionswheneverpossible.ThefollowingtableliststheObsoleteMachineVisionfunctions.ThefunctionsintheObsoleteMachineVisionclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachObsoleteMachineVisionfunctionpanelrepresentsonefunction.

Class LabWindows/CVIEquivalent FunctionName

ObsoleteMachineVision

FindEdge imaqFindEdge

ObsoleteMachineVision

FindTransformRect imaqFindTransformRect

ObsoleteMachineVision

FindTransformRects imaqFindTransformRects

Page 68: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ObsoleteFunctionsObsoletefunctionsarefunctionsfromapreviousversionofNIVisionthathavebeenreplacedbynewerfunctions.ThoughthecurrentversionofNIVisionstillsupportsthesefunctions,youshouldusethenewerfunctionswheneverpossible.ThefollowingtableliststheObsoletefunctions.ThefunctionsintheObsoleteclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachObsoletefunctionpanelrepresentsonefunction.

Class LabWindows/CVIEquivalent FunctionName

Obsolete AddRotatedRectContour imaqAddRotatedRectContourObsolete AutomaticThreshold imaqAutoThresholdObsolete BestCircle imaqBestCircleObsolete CalculateCoefficient imaqCalcCoeffObsolete ChangeColorSpace imaqChangeColorSpaceObsolete Circles imaqCirclesObsolete ColorHistogram imaqColorHistogramObsolete ConcentricRake imaqConcentricRakeObsolete ConstructROI imaqConstructROIObsolete Convex imaqConvexObsolete Convolve imaqConvolveObsolete CoordinateReference imaqCoordinateReferenceObsolete SetCalibrationInfo imaqCopyCalibrationInfoObsolete CreateOverlayFrom

MetafileimaqCreateOverlayFromMetafile

Obsolete CreateOverlayFromROI imaqCreateOverlayFromROIObsolete Divide imaqDivideObsolete DivideConstant imaqDivideConstantObsolete EdgeTool imaqEdgeTool

Page 69: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Obsolete EdgeTool2 imaqEdgeTool2Obsolete EdgeTool3 imaqEdgeTool3Obsolete FitCircle imaqFitCircleObsolete FitEllipse imaqFitEllipseObsolete GetCalibrationInformation imaqGetCalibrationInfoObsolete GetCharacterInfo imaqGetCharInfoObsolete GetContourInformation imaqGetContourInfoObsolete GetParticleInformation imaqGetParticleInfoObsolete GetWindowZoom imaqGetWindowZoomObsolete IsVisionInfoPresent imaqIsVisionInfoPresentObsolete Label imaqLabelObsolete LearnPattern imaqLearnPatternObsolete LearnPattern2 imaqLearnPattern2Obsolete LinearAverages imaqLinearAveragesObsolete LineGaugeTool imaqLineGaugeToolObsolete LoadPattern imaqLoadPatternObsolete MatchGeometricPattern imaqMatchGeometricPatternObsolete MatchPattern imaqMatchPatternObsolete ParticleFilter imaqParticleFilterObsolete ParticleFilter2 imaqParticleFilter2Obsolete ParticleFilter3 imaqParticleFilter3Obsolete Rake imaqRakeObsolete ReadDataMatrixBarcode imaqReadDataMatrixBarcodeObsolete ReadText imaqReadTextObsolete ReadText2 imaqReadText2Obsolete Rotate imaqRotateObsolete SavePattern imaqSavePatternObsolete SelectParticles imaqSelectParticlesObsolete SetCalibrationInformation imaqSetCalibrationInfo

Page 70: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Obsolete SetWindowOverlay imaqSetWindowOverlayObsolete Spoke imaqSpokeObsolete TransformROI imaqTransformROIObsolete WritePNGFile imaqWritePNGFileObsolete ZoomWindow imaqZoomWindow

Page 71: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

OCRFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.Usetheopticalcharacterrecognition(OCR)functionstodevelopanOCRreadapplication.OCRistheprocessbywhichthemachinevisionsoftwarereadstextand/orcharactersinanimage.OCRconsistsofthefollowingtwoprocedures:

TrainingcharactersReadingcharacters

Trainingcharactersistheprocessbywhichyouteachthemachinevisionsoftwarethetypesofcharactersand/orpatternsyouwanttoreadintheimageduringthereadingprocedure.YoucanuseNIVisiontotrainanynumberofcharacters,creatingacharacterset,whichisthesetofcharactersthatyoulatercomparewithobjectsduringthereadingprocedure.Youstorethecharactersetyoucreateinacharactersetfile.Trainingmightbeaone-timeprocess,oritmightbeaprocessyourepeatseveraltimes,creatingseveralcharactersetstobroadenthescopeofcharactersyouwanttodetectinanimage.Readingcharactersistheprocessbywhichthemachinevisionapplicationyoucreateanalyzesanimagetodetermineiftheobjectsmatchthecharactersyoutrained.Themachinevisionapplicationreadscharactersinanimageusingthecharactersetthatyoucreatedwhenyoutrainedcharacters.ThefollowingtableliststheOCRfunctions.ThefunctionsintheOCRclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachOCRfunctionpanelrepresentsonefunction.

Class LabWindows/CVIEquivalent FunctionNameOCR CreateCharacterSet imaqCreateCharSetOCR DeleteCharacter imaqDeleteCharOCR GetCharacterCount imaqGetCharCount

Page 72: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

OCR GetCharacterInfo2 imaqGetCharInfo2OCR ReadOCRFile imaqReadOCRFileOCR ReadText3 imaqReadText3OCR RenameCharacter imaqRenameCharOCR SetReferenceCharacter imaqSetReferenceCharOCR TrainCharacters imaqTrainCharsOCR VerifyPatterns imaqVerifyPatternsOCR VerifyText imaqVerifyTextOCR WriteOCRFile imaqWriteOCRFile

Page 73: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

OperatorsFunctionsOperatorfunctionsallowyoutoperformarithmeticorlogicaloperationsbetweentwoimagesorbetweenanimageandaconstant.ThefollowingtableliststheOperatorsfunctions.ThefunctionsintheOperatorsclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesoffunctionsubclasses.Thethirdcolumncontainsnamesofindividualfunctionpanels.EachOperatorsfunctionpanelrepresentsonefunction.

Page 74: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ArithmeticFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.Arithmeticfunctionsallowyoutoperformarithmeticoperationsbetweentwoimagesorbetweenanimageandaconstant.

Class Subclass LabWindows/CVIEquivalent FunctionName

Operators Arithmetic AbsoluteDifference

imaqAbsoluteDifference

Operators Arithmetic AbsoluteDifferenceConstant

imaqAbsoluteDifferenceConstant

Operators Arithmetic Add imaqAddOperators Arithmetic AddConstant imaqAddConstantOperators Arithmetic Average imaqAverageOperators Arithmetic AverageConstant imaqAverageConstantOperators Arithmetic Divide2 imaqDivide2Operators Arithmetic DivideConstant2 imaqDivideConstant2Operators Arithmetic Max imaqMaxOperators Arithmetic MaxConstant imaqMaxConstantOperators Arithmetic Min imaqMinOperators Arithmetic MinConstant imaqMinConstantOperators Arithmetic Modulo imaqModuloOperators Arithmetic ModuloConstant imaqModuloConstantOperators Arithmetic MultiplyDivide imaqMulDivOperators Arithmetic Multiply imaqMultiplyOperators Arithmetic MultiplyConstant imaqMultiplyConstantOperators Arithmetic Subtract imaqSubtractOperators Arithmetic SubtractConstant imaqSubtractConstant

Page 75: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LogicalFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.Logicalfunctionsallowyoutoperformlogicoperationsbetweentwoimagesorbetweenanimageandaconstant.

Class Subclass LabWindows/CVIEquivalent FunctionName

Operators Logical And imaqAndOperators Logical AndConstant imaqAndConstantOperators Logical Compare imaqCompareOperators Logical Compare

ConstantimaqCompareConstant

Operators Logical LogicalDifference imaqLogicalDifferenceOperators Logical LogicalDifference

ConstantimaqLogicalDifferenceConstant

Operators Logical Nand imaqNandOperators Logical NandConstant imaqNandConstantOperators Logical Nor imaqNorOperators Logical NorConstant imaqNorConstantOperators Logical Or imaqOrOperators Logical OrConstant imaqOrConstantOperators Logical Xnor imaqXnorOperators Logical XnorConstant imaqXnorConstantOperators Logical Xor imaqXorOperators Logical XorConstant imaqXorConstant

Page 76: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

OverlayFunctionsOverlayfunctionsallowyoutocreateoverlaysandassociatethemwithimagewindows.ThefollowingtableliststheOverlayfunctions.ThefunctionsintheOverlayclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachOverlayfunctionpanelrepresentsonefunction.

Class LabWindows/CVIEquivalent FunctionNameOverlay ClearOverlay imaqClearOverlayOverlay CopyOverlay imaqCopyOverlayOverlay GetOverlayProperties imaqGetOverlayPropertiesOverlay MergeOverlay imaqMergeOverlayOverlay OverlayArc imaqOverlayArcOverlay OverlayBitmap imaqOverlayBitmapOverlay OverlayClosedContour imaqOverlayClosedContourOverlay OverlayLine imaqOverlayLineOverlay OverlayMetafile imaqOverlayMetafileOverlay OverlayOpenContour imaqOverlayOpenContourOverlay OverlayOval imaqOverlayOvalOverlay OverlayPoints imaqOverlayPointsOverlay OverlayRect imaqOverlayRectOverlay OverlayROI imaqOverlayROIOverlay OverlayText imaqOverlayTextOverlay SetOverlayProperties imaqSetOverlayProperties

Page 77: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PatternMatchingFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.PatternMatchingfunctionsallowyoutosearchfortemplatesinanimage.ThefollowingtableliststhePatternMatchingfunctions.ThefunctionsinthePatternMatchingclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachPatternMatchingfunctionpanelrepresentsonefunction.

Class LabWindows/CVIEquivalent FunctionName

PatternMatching

DetectCircles imaqDetectCircles

PatternMatching

DetectEllipses imaqDetectEllipses

PatternMatching

DetectLines imaqDetectLines

PatternMatching

DetectRectangles imaqDetectRectangles

PatternMatching

GetGeometricFeaturesFromCurves

imaqGetGeometricFeaturesFromCurves

PatternMatching

GetGeometricTemplateFeatures

imaqGetGeometricTemplateFeatureInfo

PatternMatching

LearnColorPattern

imaqLearnColorPattern

PatternMatching

LearnGeometricPattern

imaqLearnGeometricPattern

PatternMatching

LearnMultipleGeometricPatterns

imaqLearnMultipleGeometricPatterns

Pattern LearnPattern3 imaqLearnPattern3

Page 78: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

MatchingPatternMatching

MatchColorPattern

imaqMatchColorPattern

PatternMatching

MatchGeometricPattern2

imaqMatchGeometricPattern2

PatternMatching

MatchMultipleGeometricPattern

imaqMatchMultipleGeometricPatterns

PatternMatching

MatchPattern2 imaqMatchPattern2

PatternMatching

ReadMultipleGeometricPatternFile

imaqReadMultipleGeometricPatternFile

PatternMatching

RefineMatches imaqRefineMatches

PatternMatching

SetMatchMultipleGeometricPatternsOptions

imaqSetMultipleGeometricPatternsOptions

PatternMatching

WriteMultipleGeometricPatternFile

imaqWriteMultipleGeometricPatternFile

Page 79: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

RegionsofInterestFunctionsRegionsofInterestfunctionsallowyoutocreate,modify,andextractinformationaboutregionsofinterest(ROIs).ThefollowingtableliststheRegionsofInterestfunctions.ThefunctionsintheRegionsofInterestclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesoffunctionsubclasses.Thethirdcolumncontainsnamesofindividualfunctionpanels.EachRegionsofInterestfunctionpanelrepresentsonefunction.

Class Subclass LabWindows/CVIEquivalent FunctionName

RegionsofInterest

— ConstructROI2 imaqConstructROI2

RegionsofInterest

— CreateROI imaqCreateROI

RegionsofInterest

— GetROIBoundingBox

imaqGetROIBoundingBox

RegionsofInterest

— GetROIColor imaqGetROIColor

RegionsofInterest

— GetWindowROI imaqGetWindowROI

RegionsofInterest

— SetROIColor imaqSetROIColor

RegionsofInterest

— SetWindowROI imaqSetWindowROI

Page 80: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ContoursFunctionsContourfunctionsallowyoutocreateandmodifyindividualcontoursofaregionofinterest.

Class Subclass LabWindows/CVIEquivalent FunctionName

RegionsofInterest

Contours AddAnnulusContour

imaqAddAnnulusContour

RegionsofInterest

Contours AddClosedContour

imaqAddClosedContour

RegionsofInterest

Contours AddLineContour imaqAddLineContour

RegionsofInterest

Contours AddOpenContour imaqAddOpenContour

RegionsofInterest

Contours AddOvalContour imaqAddOvalContour

RegionsofInterest

Contours AddPointContour imaqAddPointContour

RegionsofInterest

Contours AddRectContour imaqAddRectContour

RegionsofInterest

Contours AddRotatedRectContour

imaqAddRotatedRectContour2

RegionsofInterest

Contours CopyContour imaqCopyContour

Regionsof

Contours GetContour imaqGetContour

Page 81: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

InterestRegionsofInterest

Contours GetContourColor imaqGetContourColor

RegionsofInterest

Contours GetContourCount imaqGetContourCount

RegionsofInterest

Contours GetContourInfo imaqGetContourInfo2

RegionsofInterest

Contours MoveROI imaqMoveContour

RegionsofInterest

Contours RemoveContour imaqRemoveContour

RegionsofInterest

Contours SetContourColor imaqSetContourColor

Page 82: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

RegionsofInterestManipulationFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.RegionsofInterestManipulationfunctionsallowyoutotransformregionsofinterestbasedonacoordinatesystem,convertmaskimagestoandfromregionsofinterestandextractregionofinterestprofilesfromimages.

Class Subclass LabWindows/CVIEquivalent FunctionName

RegionsofInterest

RegionsofInterestManipulation

MaskToROI imaqMaskToROI

RegionsofInterest

RegionsofInterestManipulation

ROIProfile imaqROIProfile

RegionsofInterest

RegionsofInterestManipulation

ROIToMask imaqROIToMask

RegionsofInterest

RegionsofInterestManipulation

TransformROI imaqTransformROI2

Page 83: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

UtilitiesFunctionsUtilitiesfunctionsallowyoutosetupstructuresthatyoucanembedinotherfunctionstoeliminatetheneedtodeclarecertaintypesofvariablessuchasPoint,PointFloat,andRect.ThefollowingtableliststheUtilitiesfunctions.ThefunctionsintheUtilitiesclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachUtilitiesfunctionpanelrepresentsonefunction.

Class LabWindows/CVIEquivalent FunctionName

Utilities GetKernel imaqGetKernelUtilities MakeAnnulus imaqMakeAnnulusUtilities MakePoint imaqMakePointUtilities MakePointFloat imaqMakePointFloatUtilities MakeRect imaqMakeRectUtilities MakeRectFromRotated

RectimaqMakeRectFromRotatedRect

Utilities MakeRotatedRect imaqMakeRotatedRectUtilities MakeRotatedRectFrom

RectimaqMakeRotatedRectFromRect

Utilities MulticoreOptions imaqMulticoreOptions

Page 84: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqAbsoluteDifferenceUsageintimaqAbsoluteDifference(Image*dest,constImage*sourceA,constImage*sourceB);

Page 85: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSubtractsoneimagefromanotherandreturnstheabsolutevalueofthedifference.

Page 86: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB

Page 87: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.sourceA constImage* Thefirstimagetosubtract.sourceB constImage* Thesecondimagetosubtract.

Page 88: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 89: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionThetypeofthesourceBimagedependsonthetypeofthesourceA,asfollows:

IfsourceAisIMAQ_IMAGE_U8,sourceBmustbeIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,orIMAQ_IMAGE_RGB.IfsourceAisIMAQ_IMAGE_I16orIMAQ_IMAGE_SGL,sourceBmustbeIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,orIMAQ_IMAGE_SGL.IfsourceAisIMAQ_IMAGE_RGB,sourceBmustbeIMAQ_IMAGE_RGBorIMAQ_IMAGE_U8.

Page 90: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqAbsoluteDifferenceConstantUsageintimaqAbsoluteDifferenceConstant(Image*dest,constImage*source,PixelValuevalue);

Page 91: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSubtractsaconstantfromanimageandreturnstheabsolutevalueofthedifference.

Page 92: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB

Page 93: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagefromwhichthefunctionsubtractsa

scalarconstant.value PixelValue Thevaluetosubtractfromthesourceimage.

Page 94: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 95: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionvaluemustcorrespondtotheimagetype,asfollows:

IftheimageisIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,orIMAQ_IMAGE_SGL,usethegrayscalevalueofthePixelValueunion.IftheimageisIMAQ_IMAGE_RGB,usethergbvalueofthePixelValueunion.

Page 96: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqAddUsageintimaqAdd(Image*dest,constImage*sourceA,constImage*sourceB);

Page 97: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeAddstwoimages.

Page 98: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB

Page 99: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.sourceA constImage* Thefirstimagetoadd.sourceB constImage* Thesecondimagetoadd.

Page 100: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 101: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionTheimagetypeofsourceBdependsontheimagetypeofsourceA,asfollows:

IfsourceAisIMAQ_IMAGE_U8,sourceBmustbeIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,orIMAQ_IMAGE_RGB.IfsourceAisIMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,orIMAQ_IMAGE_COMPLEX,sourceBmustbeIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,orIMAQ_IMAGE_COMPLEX.IfsourceAisIMAQ_IMAGE_RGB,sourceBmustbeIMAQ_IMAGE_RGBorIMAQ_IMAGE_U8.

Page 102: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqAddAnnulusContourUsageContourIDimaqAddAnnulusContour(ROI*roi,Annulusannulus);

Page 103: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeThisfunctioncreatesanewregionofinterest(ROI)contourthatrepresentsanannulusandthenaddsittotheprovidedROI.

Page 104: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi ROI* TheROIthatwillcontainthenewcontour.annulus Annulus Definesthelocationandsizeoftheannulus.

Page 105: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ContourID Onsuccess,thisfunctionreturnsaContourIDforthecontour.YoucanusetheContourIDtoreferencethecontourwithinthecontainingROI.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 106: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqAddClassifierSampleUsageintimaqAddClassifierSample(Image*image,ClassifierSession*session,constROI*roi,constchar*sampleClass,double*featureVector,unsignedintvectorSize);

Page 107: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeAddsasampletoaclassifier.Toaddasampletoacustomclassificationsession,usethefeatureVectorandvectorSizeparameters.Toaddasampletoanyothertypeofclassificationsession,usetheimageparameter.

Page 108: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 109: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagetoaddtotheclassifier.Thisparameterisoptionalifyouareaddingasampletoacustomclassificationsession.

session ClassifierSession* Theclassifiersessiontouse.roi constROI* TheROIcontainingthesampletoadd.

Eachcontourofroimustbearectangle,rotatedrectangle,oval,annulus,orclosedcontour.SetthisparametertoNULLtoaddtheentireimage.

sampleClass constchar* Theclasstowhichthissamplebelongs.

featureVector double* Thefeaturevectortoaddtotheclassifier.Usethisparameteronlywhenyouareusingacustomclassifier.Foranyothertypeofclassifier,setthisparametertoNULL.

vectorSize unsignedint ThenumberofelementsinfeatureVector.Usethisparameteronlywhenyouareusingacustomclassifier.Foranyothertypeofclassifier,setthisparameterto0.

Page 110: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 111: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqAddClosedContourUsageContourIDimaqAddClosedContour(ROI*roi,constPoint*points,intnumPoints);

Page 112: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCreatesanewROIcontourbasedontheprovidedarrayofpoints.Tomakethecontour,thefunctionconnectseachpointinthearraytothenextpointinthearrayandconnectsthelastpointinthearraytothefirstpointinthearray.ThefunctionaddsthecontourtotheprovidedROI.

Page 113: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi ROI* TheROItocontainthenewcontour.points constPoint* Anarrayofpointsdescribingthelocationand

shapeofthecontour.ThisparameterisrequiredandcannotbeNULL.

numPoints int Thenumberofpointsinthearray.

Page 114: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ContourID Onsuccess,thisfunctionreturnsaContourIDfortheaddedcontour.YoucanusetheContourIDtoreferencethecontourwithinthecontainingROI.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 115: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqAddConstantUsageintimaqAddConstant(Image*dest,constImage*source,PixelValuevalue);

Page 116: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeAddsaconstantvaluetoeachpixelinanimage.

Page 117: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB

Page 118: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagetowhichthefunctionaddsascalar

constant.value PixelValue Thevaluetoaddtothesourceimage.Setthe

memberofvaluethatcorrespondstotheimagetype.

Page 119: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 120: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqAddLineContourUsageContourIDimaqAddLineContour(ROI*roi,Pointstart,Pointend);

Page 121: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCreatesanewlineROIcontourandaddsthelinetotheprovidedROI.

Page 122: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi ROI* TheROItocontainthenewcontour.start Point Thepixellocationofthestartoftheline.end Point Thepixellocationoftheendoftheline.

Page 123: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ContourID Onsuccess,thisfunctionreturnsaContourIDforthecontour.YoucanusetheContourIDtoreferencethecontourwithinthecontainingROI.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 124: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqAddOpenContourUsageContourIDimaqAddOpenContour(ROI*roi,constPoint*points,intnumPoints);

Page 125: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCreatesanewregionofinterest(ROI)contourbasedontheprovidedarrayofpoints.Tomakethecontour,thefunctionconnectseachpointinthearraytothenextpointinthearray.Thefunctiondoesnotconnectthelastpointinthearraytothefirstpointinthearray.ThefunctionaddsthecontourtotheprovidedROI.

Page 126: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi ROI* TheROItocontainthenewcontour.points constPoint* Anarrayofpointsdescribingthelocationand

shapeofthecontour.ThisparameterisrequiredandcannotbeNULL.

numPoints int Thenumberofpointsinthearray.

Page 127: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ContourID Onsuccess,thisfunctionreturnsaContourIDforthecontour.YoucanusetheContourIDtoreferencethecontourwithinthecontainingROI.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 128: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqAddOvalContourUsageContourIDimaqAddOvalContour(ROI*roi,RectboundingBox);

Page 129: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCreatesanewovalregionofinterest(ROI)contourandaddstheovaltotheprovidedROI.

Page 130: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi ROI* TheROItocontainthenewcontour.boundingBox Rect Thepixellocationinformationofthebounding

rectangleoftheoval.

Page 131: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ContourID Onsuccess,thisfunctionreturnsaContourIDforthecontour.YoucanusetheContourIDtoreferencethecontourwithinthecontainingROI.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 132: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqAddPointContourUsageContourIDimaqAddPointContour(ROI*roi,Pointpoint);

Page 133: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCreatesanewsingle-pointregionofinterest(ROI)contourandaddsthepointtotheprovidedROI.

Page 134: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi ROI* TheROItocontainthenewcontour.point Point Thepixellocationofthepoint.

Page 135: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ContourID Onsuccess,thisfunctionreturnsaContourIDforthecontour.YoucanusetheContourIDtoreferencethecontourwithinthecontainingROI.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 136: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqAddRectContourUsageContourIDimaqAddRectContour(ROI*roi,Rectrect);

Page 137: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCreatesanewrectangleregionofinterest(ROI)contourandaddstherectangletotheprovidedROI.

Page 138: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi ROI* TheROItocontainthenewcontour.rect Rect Thepixellocationoftherectangle.

Page 139: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ContourID Onsuccess,thisfunctionreturnsaContourIDforthecontour.YoucanusetheContourIDtoreferencethecontourwithinthecontainingROI.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 140: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqAddRotatedRectContour2UsageContourIDimaqAddRotatedRectContour2(ROI*roi,RotatedRectrect);

Page 141: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeThisfunctioncreatesanewregionofinterest(ROI)contourthatrepresentsarotatedrectangleandaddsittotheprovidedROI.

Page 142: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi ROI* TheROItocontainthenewcontour.rect RotatedRect Thecoordinatelocationinformationfortherotated

rectangle.

Page 143: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ContourID Onsuccess,thisfunctionreturnsaContourIDforthecontour.YoucanusetheContourIDtoreferencethecontourwithinthecontainingROI.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 144: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqAndUsageintimaqAnd(Image*dest,constImage*sourceA,constImage*sourceB);

Page 145: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputesabitwiseANDbetweentwoimages.

Page 146: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 147: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.sourceA constImage* Thefirstsourceimage.sourceB constImage* Thesecondsourceimage,whichmustbethe

sametypeofimageassourceA.

Page 148: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 149: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqAndConstantUsageintimaqAndConstant(Image*dest,constImage*source,PixelValuevalue);

Page 150: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposePerformsabitwiseANDbetweenanimageandaconstant.

Page 151: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 152: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.value PixelValue ThevaluetoANDtothesourceimage.Setthe

memberofvaluethatcorrespondstotheimagetype.

Page 153: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 154: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqAreScrollbarsVisibleUsageintimaqAreScrollbarsVisible(intwindowNumber,int*visible);

Page 155: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRetrieveswhetherthescrollbarsofthegivenimagewindowarevisible.

Page 156: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.visible int* Onreturn,thisparameterisTRUEifthe

scrollbarsarevisibleandFALSEifthescrollbarsarehidden.ThisparameterisrequiredandcannotbeNULL.

Page 157: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 158: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqAreToolsContextSensitiveUsageintimaqAreToolsContextSensitive(int*sensitive);

Page 159: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsthecurrentstatusofcontextsensitivetoolselection.

Page 160: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

sensitive int* Onreturn,TRUEiftoolcontextsensitivityisenabled.FALSEiftoolscontextsensitivityisdisabled.ThisparameterisrequiredandcannotbeNULL.

Page 161: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 162: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqArrayToComplexPlaneUsageintimaqArrayToComplexPlane(Image*dest,constImage*source,constfloat*newPixels,ComplexPlaneplane);

Page 163: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReplacesaplaneofacompleximagewiththegivenarrayofpixelvalues.Thearraymustbethesamesizeasthesourceimage.

Page 164: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_COMPLEX

Page 165: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.newPixels constfloat* Thetwo-dimensionalarrayofpixelvalues.

Thisarraymustbethesamesizeasthesourceimage.ThisparameterisrequiredandcannotbeNULL.

plane ComplexPlane Theplanetoreplace.SpecifyIMAQ_REALtoreplacetherealplaneorIMAQ_IMAGINARYtoreplacetheimaginaryplane.

Page 166: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 167: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqArrayToImageUsageintimaqArrayToImage(Image*image,constvoid*array,intnumCols,intnumRows);

Page 168: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthepixelsofanimagetothevaluesinagivenarray.Thisfunctionresizestheimagetothesizeofthesourcearray.

Page 169: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 170: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagewhosepixelsthefunctionsetstomatchtheinputarray.

array constvoid* Thetwo-dimensionalarrayofpixelvalues.ThisparameterisrequiredandcannotbeNULL.

numCols int Thenumberofcolumnsinthedataarray.numRows int Thenumberofrowsinthedataarray.

Page 171: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 172: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionThetypeofthearrayyouprovidedependsontheimagetype,asfollows:

ImageType ArrayTypeIMAQ_IMAGE_U8 unsignedcharIMAQ_IMAGE_U16 unsignedshortIMAQ_IMAGE_I16 shortIMAQ_IMAGE_SGL floatIMAQ_IMAGE_COMPLEX ComplexIMAQ_IMAGE_RGB RGBValuestructuresIMAQ_IMAGE_HSL HSLValuestructuresIMAQ_IMAGE_RGB_U64 RGBU64Valuestructures

Page 173: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqAttenuateUsageintimaqAttenuate(Image*dest,constImage*source,AttenuateModehighlow);

Page 174: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeAttenuatesthefrequenciesofacompleximage.

Page 175: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_COMPLEX

Page 176: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagetoattenuate.highlow AttenuateMode Thefrequenciestoattenuate.

Page 177: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 178: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqAutoThreshold2UsageThresholdData*imaqAutoThreshold2(Image*dest,constImage*source,intnumClasses,ThresholdMethodmethod,constImage*mask);

Page 179: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeAutomaticallythresholdsanimageintomultipleclasses.

Page 180: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 181: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagetothreshold.numClasses int Thenumberofclassesintowhichto

thresholdtheimage.Validvaluesrangefrom2to256.

method ThresholdMethod Themethodforbinarythresholding.IfnumClassesis2(abinarythreshold),methodspecifieshowtocalculatetheclasses.IfnumClassesisnot2,thefunctionignoresthisparameter.

mask constImage* Anoptionalmaskimage.ThisimagemustbeanIMAQ_IMAGE_U8image.Whencalculatingtheautothreshold,thefunctionconsidersonlythosepixelsinimagewhosecorrespondingpixelsinmaskarenon-zero.SetthisparametertoNULLifyouwantthefunctiontoperformanautothresholdonthewholeimage.

Page 182: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ThresholdData* Onsuccess,thisfunctionreturnsanarrayofstructuresprovidinginformationaboutthethresholdrangesthatthefunctionapplied.ThearraycontainsanumberofThresholdDatastructuresequaltonumClasses.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththearray,disposeofitbycallingimaqDispose().

Page 183: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqAverageUsageintimaqAverage(Image*dest,constImage*sourceA,constImage*sourceB);

Page 184: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputestheaverageoftwosourceimagesandplacestheresultinthedestinationimage.

Page 185: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 186: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.sourceA constImage* Thefirstsourceimage.sourceB constImage* Thesecondsourceimage,whichmustbethe

sametypeofimageassourceA.

Page 187: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 188: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqAverageConstantUsageintimaqAverageConstant(Image*dest,constImage*source,PixelValuevalue);

Page 189: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputestheaveragebetweenasourceimageandaconstantandplacestheresultintoadestinationimage.

Page 190: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 191: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.value PixelValue Thevaluetoaveragewiththesourceimage.Use

thegrayscalememberofthePixelValueunion.

Page 192: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 193: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqBCGTransformUsageintimaqBCGTransform(Image*dest,constImage*source,constBCGOptions*options,constImage*mask);

Page 194: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeAppliesbrightness,contrast,andgammacorrectiontoanimagebycomputingandapplyingalookuptable.ThefunctioncomputesthelookuptablebasedonthevaluesinBCGOptions.

Page 195: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 196: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagetotransform.options constBCGOptions* Theparameterstouseinthetransform.

ThisparameterisrequiredandcannotbeNULL.

mask constImage* Anoptionalmaskimage.ThisimagemustbeanIMAQ_IMAGE_U8image.Thefunctionappliesthetransformonlytothosesourcepixelswhosecorrespondingmaskpixelsarenon-zero.Allotherpixelremainunchanged.SetthisparametertoNULLtoapplythetransformtothewholesourceimage.

Page 197: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 198: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—IfNULLispassed,thefunctionusesthefollowingdefaultparameters:

brightness 128contrast 45gamma 1.0

Page 199: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqBestCircleUsageintimaqBestCircle(constPointFloat*points,intnumPoints,PointFloat*center,double*radius);

Page 200: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsthecirclethatbestfitsthegivenpoints.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqFitCircle(),whichincorporatesthefunctionalityofimaqBestCircle()butreturnsadditionalinformationsuchastheareaofthecircle.

Page 201: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

points constPointFloat* Thearrayofpointstofittotheedgeofthecircle.

numPoints int Thenumberofpointsinthesuppliedarray.Youmustsupplyatleastthreepoints.

center PointFloat* Onreturn,filledwiththecoordinatesofthecenterofthecircle.SetthisparametertoNULLifyoudonotneedthisinformation.

radius double* Onreturn,filledwiththeradiusofthecenterofthecircle.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 202: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 203: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqBringWindowToTopUsageintimaqBringWindowToTop(intwindowNumber);

Page 204: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeMakesthegivenimagewindowactive.

NoteIfyouareusingWindows2000,thisfunctionhasnoeffectwhenyourapplicationisnottheactiveapplicationinthesystem.

Page 205: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberofthewindowyouwanttobeactive.

Page 206: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 207: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqBuildCoordinateSystemUsageintimaqBuildCoordinateSystem(constPoint*points,ReferenceModemode,AxisOrientationorientation,CoordinateSystem*system);

Page 208: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeBuildsareferenceforanyarbitrarycoordinatesystemwithrespecttotheimageplane.Thereferenceofthecoordinatesystemisspecifiedasthepositionoftheoriginofthecoordinatesystem,theorientationofitsx-axiswithrespecttothatoftheimageplane,andthedirectionofthey-axis,asshowninthefollowingillustration.

Page 209: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

points constPoint* Anarrayofpointsdefiningthecoordinatesystem.IfmodeisIMAQ_COORD_X_Y,thepointsarraymusthavethreepoints.IfmodeisIMAQ_COORD_ORIGIN_X,thepointsarraymusthavetwopoints.

mode ReferenceMode Specifiesthemethodthatthefunctionusestocalculatethecoordinatesystem.

orientation AxisOrientation Thedirectionofthey-axisofacoordinatesystem.

system CoordinateSystem* Onreturn,containsthecoordinatesystemdefinedbythepointarray.ThisparameterisrequiredandcannotbeNULL.

Page 210: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 211: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCalcCoeffUsageintimaqCalcCoeff(constImage*image,constParticleReport*report,MeasurementValueparameter,float*coefficient);

Page 212: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsacoefficientassociatedwithaparticle.CallimaqGetParticleInfo()beforecallingimaqCalcCoeff()togettheparticlereportsyouneedtopasstothisfunction.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqMeasureParticle(),whichallowsyoutotakebothpixelandreal-worldmeasurements.

Page 213: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 214: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagecontainingtheparticle.report constParticleReport* Theparticlereportyouwanttouseto

calculatethecoefficient.YoumustgeneratethisreportusingimaqGetParticleInfo()withthemodeparametersettoIMAQ_ALL_INFO.ThisparameterisrequiredandcannotbeNULL.

parameter MeasurementValue Thecoefficienttocalculate.coefficient float* Onreturn,thecoefficientyourequest.

ThisparameterisrequiredandcannotbeNULL.

Page 215: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 216: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCaliperToolUsageCaliperReport*imaqCaliperTool(constImage*image,constPoint*points,intnumPoints,constEdgeOptions*edgeOptions,constCaliperOptions*caliperOptions,int*numEdgePairs);

Page 217: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFindsedgesalongapathinanimage,choosespairsoftheedges,andmeasuresthedistancebetweenthosepairs.

Page 218: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 219: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageinwhichthefunctionfindsedges.

points constPoint* Thepathalongwhichthefunctiondetectsedges.ThisparameterisrequiredandcannotbeNULL.

numPoints int Thenumberofpointsinthepointsarray.

edgeOptions constEdgeOptions* Describeshowyouwantthefunctiontofindanedge.ThisparameterisrequiredandcannotbeNULL.

caliperOptions constCaliperOptions* Describeshowyouwantthefunctiontochooseedgepairs.ThisparameterisrequiredandcannotbeNULL.

numEdgePairs int* Onreturn,thisparameterissettothenumberofedgepairsfound.Ifyoudonotneedthisinformation,setthisparametertoNULL.

Page 220: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

CaliperReport* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachedgepair.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthisfunctionbycallingimaqDispose().

Page 221: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCannyEdgeFilterUsageintimaqCannyEdgeFilter(Image*dest,constImage*source,constCannyOptions*options);

Page 222: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeOutlinesedgesinanimageusingtheCannyalgorithm,whichisusefulforimageswithpoorsignal-to-noiseratios.

Page 223: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 224: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagewhoseedgesthefunction

outlines.options constCannyOptions* Adescriptionoffilterparameterstousein

thealgorithm.

Page 225: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 226: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:

sigma 1.00upperThreshold 0.70lowerThreshold 0.20windowSize 9

Page 227: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCastUsageintimaqCast(Image*dest,constImage*source,ImageTypetype,constfloat*lookup,intshift);

Page 228: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeChangesthetypeofanimage.

Page 229: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 230: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.SetthisparameterequaltosourceorNULLtoperformthechangedirectlyonthesourceimage.

source constImage* Thesourceimage.type ImageType Thenewtypefortheimage.typeisthenewtype

forthedestimageifitisbeingused,otherwiseitisthenewtypeforsource.

lookup constfloat* Anoptionallookuptable.Ifyoudonotwishtousealookuptable,thisparametermaybeNULL.Seethedescriptiononhowthelookuptableisemployed.

shift int Theshiftvalueforconverting16-bitimagesto8-bitimages.Thefunctionexecutesthisconversionbyshiftingthe16-bitpixelvaluestotherightbythespecifiednumberofshiftoperations,uptoamaximumof8shiftoperations,andthentruncatingtogetan8-bitvalue.Enteravalueof–1toignorethebitdepthandshift0.Enteravalueof0tousethebitdepthtocasttheimage.

Page 231: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 232: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionThisfunctioncanperformthechangedirectlyonthesourceimage,oritcanleavethesourceimageunchangedandinsteadcopythesourceimagetoadestinationimageandthenconvertthedestinationimage.Ifdestisequaltosource,thefunctionchangesthetypeofsource.Otherwise,thefunctionresizesdesttothesizeofsourceandthencopiesthepixels.Ifthesourcetypeandthetypeparameterarethesame,thefunctioncopiespixelswithoutmodifications.YoucanalsouseimaqCopyRect()tocopypixelswithoutmodifyingthem.Ifthesourcetypeandthetypeparameterarenotthesame,thefunctioncaststhepixelvaluestothenewtype,asshowninthefollowingtable.

sourceType typeParameter ResultIMAQ_IMAGE_U8 IMAQ_IMAGE_U16,

IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Ifyouprovidealookuptable,thedestinationpixelwillhavethelookupvalueofthesourcepixel.Thelookuptablemustcontain256elements.Ifyoudonotprovidealookuptable,thefunctioncopiesthesourcevaluetothedestinationwithoutmodifications.

IMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

IMAQ_IMAGE_RGB Eachcolorcomponentofthedestinationissettothesourcevalue.Ifthesourcevalueisgreaterthan255,thefunctionsets

Page 233: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

eachcolorcomponentto255.Ifthesourcevalueislessthan0,thefunctionsetseachcolorcomponentto0.

IMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

IMAQ_IMAGE_HSL Thefunctionsetstheluminancecomponentofthedestinationtothesourcevalue.Ifthesourcevalueisgreaterthan255,thefunctionsetstheluminanceto255.Ifthesourcevalueislessthan0,thefunctionsetstheluminanceto0.Thefunctionsetshueandsaturationto0.

IMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

IMAQ_IMAGE_COMPLEX Thefunctionsetstherealcomponentofthedestinationtothesourcevalue.Thefunctionsetstheimaginarycomponentofthedestinationto0.

IMAQ_IMAGE_U16,IMAQ_IMAGE_I16

IMAQ_IMAGE_U8 Thefunctionright-shiftsthesourcevalueby

Page 234: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

thegivenshiftvalue(divideseachsourcepixelvalueby2shift)andstoresthevalueinthedestination.Iftheshiftedvalueisgreaterthan255,thefunctionsetsthedestinationvalueto255.

IMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

IMAQ_IMAGE_RGB_U64 Eachcolorcomponentofthedestinationissettothesourcevalue.Ifthesourcevalueisgreaterthan65535thefunctionsetsthecolorcomponentto65535.Ifthesourcevalueislessthan0thefunctionsetseachcolorcomponentto0.

IMAQ_IMAGE_RGB_U64 IMAQ_IMAGE_U8 Thefunctionshiftsthesourcevaluetothe8-bitrangeusingthespecifiedbitdepthofthesourceimage.Thenthefunctionsetsthe

Page 235: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

destinationvaluetotheaverageofthethreecolorcomponentsofthesource.

IMAQ_IMAGE_RGB_U64 IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Thefunctionsetsthedestinationtotheaverageofthethreecolorcomponentsofthesource.Iftheaverageofthesourcecolorcomponentsisoutoftherangeofthedestination,thefunctioncoercestheaveragetotherange.

IMAQ_IMAGE_RGB_U64 IMAQ_IMAGE_RGB Thefunctionshiftsthesourcevaluetothe8-bitrangeusingthespecifiedbitdepthofthesourceimage.Thenthefunctionsetseachcolorcomponentinthedestinationvaluetothecorrespondingcomponentinthesourcevalue.

IMAQ_IMAGE_RGB_U64 IMAQ_IMAGE_HSL Thefunctionshiftsthesourcevaluetothe8-bit

Page 236: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

rangeusingthespecifiedbitdepthofthesourceimage.ThenthefunctionconvertseachpixelfromtheRGBcolorspacetotheHSLcolorspace.

IMAQ_IMAGE_U16,IMAQ_IMAGE_I16

IMAQ_IMAGE_SGL Ifyouprovidealookuptable,thedestinationpixelwillhavethelookupvalueofthesourcepixel.Thelookuptablemustcontain65,536elements.Ifyoudonotprovidealookuptable,thefunctioncopiesthesourcevaluetothedestinationunmodified.

IMAQ_IMAGE_SGL IMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16

Thefunctionsetsthedestinationvaluetothesourcevalue.Ifthesourcevalueisoutoftherangeofthedestination,thefunctioncoercesthesourcetotherange.

Page 237: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_IMAGE_RGB IMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Thefunctionsetsthedestinationvaluetotheaverageofthethreecolorcomponentsofthesource.

IMAQ_IMAGE_RGB IMAQ_IMAGE_HSL ThefunctionconvertseachpixelfromtheRGBcolorspacetotheHSLcolorspace.

IMAQ_IMAGE_RGB,IMAQ_IMAGE_RGB_U64

IMAQ_IMAGE_COMPLEX Thefunctionsetstherealportionofthedestinationvaluetotheaverageofthethreecolorcomponentsofthesource,anditsetstheimaginaryportionofthedestinationto0.

IMAQ_IMAGE_HSL IMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Thefunctionsetsthedestinationvaluetotheluminancecomponentofthesourcevalue.

IMAQ_IMAGE_HSL IMAQ_IMAGE_RGB,IMAQ_IMAGE_RGB_U64

ThefunctionconvertseachpixelfromtheHSLcolorspacetotheRGBcolorspace.

Page 238: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_IMAGE_HSL IMAQ_IMAGE_COMPLEX Thefunctionsetstherealportionofthedestinationvaluetothevalueoftheluminancecomponentofthesource,anditsetstheimaginaryportionofthedestinationto0.

IMAQ_IMAGE_COMPLEX IMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Thefunctionsetsthedestinationvaluetothemagnitudeofthesourcevalue.

IMAQ_IMAGE_COMPLEX IMAQ_IMAGE_RGB,IMAQ_IMAGE_RGB_U64

Thefunctionsetseachcolorcomponentofthedestinationvaluetothemagnitudeofthesourcevalue.

IMAQ_IMAGE_COMPLEX IMAQ_IMAGE_HSL Thefunctionsetstheluminancecomponentofthedestinationvaluetothemagnitudeofthesourcevalue,anditsetsthehueandsaturationcomponentsto0.

IMAQ_IMAGE_U16 IMAQ_IMAGE_I16 Thefunctionsetsthedestination

Page 239: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

valuetothesourcevalue.Ifthesourcevalueisoutoftherangeofthedestination,thefunctioncoercesthesourcetotherange.

IMAQ_IMAGE_I16 IMAQ_IMAGE_U16 Thefunctionsetsthedestinationvaluetothesourcevalue.Ifthesourcevalueisoutoftherangeofthedestination,thefunctioncoercesthesourcetotherange.

Page 240: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCentroidUsageintimaqCentroid(constImage*image,PointFloat*centroid,constImage*mask);

Page 241: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputesthecentroidofanimage.

Page 242: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 243: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagewhosecentroidthefunctioncalculates.

centroid PointFloat* Onreturn,thex-andy-coordinatesofthecentroid.ThisparameterisrequiredandcannotbeNULL.

mask constImage* Anoptionalmaskimage.IfNULL,thewholesourceimageisusedinthecalculation.Otherwise,thefunctionusesinthecalculationonlythosepixelsinthesourcewhosecorrespondingpixelsinthemaskimagearenon-zero.

Page 244: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 245: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqChangeColorSpace2UsageColor2imaqChangeColorSpace2(constColor2*sourceColor,ColorModesourceSpace,ColorModedestSpace,doubleoffset,constCIEXYZValue*whiteReference);

Page 246: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeMapsthevalueofacolorinonecolorspaceintothevalueofthesamecolorinanothercolorspace.

Page 247: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

sourceColor constColor2* Thecolorinthesourcespace.ThisparameterisrequiredandcannotbeNULL.

sourceSpace ColorMode Thesourcecolorspace.destSpace ColorMode Thedestinationcolorspace.offset double IfthedestinationspaceisHSL,

theoffsettoaddtothecalculatedhue(from0to360).Thedefaultoffsetvalueof0resultsinahuevalueof0forthecolorred(R=255,G=0,B=0).Bychangingtheoffsetvalue,youcanspecifytheRGBcolorthatmapstoahuevalueof0.WhenyouwanttoanalyzeredorcolorsclosetoredintheHSLspace,youcanaddanoffsetsothatthehuevaluesassociatedwiththesecolorsarenotzero.

whiteReference constCIEXYZValue* IfthedestinationspaceisCIEL*a*b*,theCIEXYZcomponentsthatmaptowhite.IfthisparameterissettoNULL,thedefaultvalues(0.950456,1,1.088754,0),whichmaptotheRGBvalues(255,255,255,0),areused.

Page 248: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

Color2 Onsuccess,thisfunctionreturnsthevalueofthecolorinthedestinationcolorspace.Onfailure,thisfunctionreturnsblack.Togetextendederrorinformation,callimaqGetLastError().

Page 249: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqClampMaxUsageintimaqClampMax(Image*image,RotatedRectsearchRect,RakeDirectiondirection,float*distance,constFindEdgeOptions*options,constCoordinateTransform2*transform,PointFloat*firstEdge,PointFloat*lastEdge);

Page 250: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeMeasuresadistancefromthesidesofthesearchareatowardsthecenterofthesearcharea.Thisfunctionlocatesedgesalongasetofparallelsearchlinescalledarake.Thefunctiondetectstheedgesbasedontheircontrastandslope.Thefunctioncalculatesahit-linetotheobjectthroughthefirstedgeitdetects.Thefunctioncalculatesasecondhit-linetotheobjectthroughthelastedgeitdetects.Thefunctionmeasuresthedistancebetweenthosetwolines.

Page 251: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 252: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagethatthefunctionusesfordistancemeasurement.

searchRect RotatedRect Thecoordinatelocationoftherectangularsearchareaofthedistancemeasurement.

direction RakeDirection Thedirectionthefunctionsearchforedgesalongthesearchlines.

distance float* Uponreturn,thedistancemeasuredbetweenthetwoparallelhit-lines.ThisparameterisrequiredandcannotbeNULL.

options constFindEdgeOptions* Describeshowyouwantthefunctiontodetectedgesandwhatinformationthefunctionshouldoverlayontotheimage.

transform constCoordinateTransform2* AnoptionalspecificationofthecoordinatetransformforsearchRect.Thisparameterspecifieshowtotransformthelocationofthedistancemeasurementbasedonthedifferencebetweenthereferencecoordinatesystemandthemeasurementcoordinatesystem.SetthisparametertoNULLifyoudonotneedtotransformsearchRect.

Page 253: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

firstEdge PointFloat* Onreturn,thecoordinatelocationofthefirstedgeusedtomeasurethedistance.Ifyoudonotneedthisinformation,setthisparametertoNULL.

lastEdge PointFloat* Onreturn,thecoordinatelocationofthelastedgeusedtomeasurethedistance.Ifyoudonotneedthisinformation,setthisparametertoNULL.

Page 254: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqDispose().

Page 255: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:

threshold 40width 4steepness 2subsamplingRatio 5showSearchArea FALSEshowSearchLines FALSEshowEdgesFound FALSEshowResult TRUE

Page 256: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqClampMinUsageintimaqClampMin(Image*image,RotatedRectsearchRect,RakeDirectiondirection,float*distance,constFindEdgeOptions*options,constCoordinateTransform2*transform,PointFloat*firstEdge,PointFloat*lastEdge);

Page 257: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeMeasuresadistancefromthecenterofthesearchareatowardsthesidesofthesearcharea.Thisfunctionlocatesedgesalongasetofparallelsearchlinescalledarake.Thefunctiondetectstheedgesbasedontheircontrastandslope.Thefunctioncalculatesahit-linetotheobjectthroughthelastedgeinthefirsthalfofthesearcharea.Thefunctioncalculatesasecondhit-linetotheobjectthroughthefirstedgedetectedinthelasthalfofthesearcharea.Thefunctionmeasuresthedistancebetweenthosetwolines.

Page 258: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 259: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagethatthefunctionusesfordistancemeasurement.

searchRect RotatedRect Thecoordinatelocationoftherectangularsearchareaofthedistancemeasurement.

direction RakeDirection Thedirectionthefunctionsearchforedgesalongthesearchlines.

distance float* Uponreturn,thedistancemeasuredbetweenthetwoparallelhit-lines.ThisparameterisrequiredandcannotbeNULL.

options constFindEdgeOptions* Describeshowyouwantthefunctiontodetectedgesandwhatinformationthefunctionshouldoverlayontotheimage.

transform constCoordinateTransform2* AnoptionalspecificationofthecoordinatetransformforsearchRect.Thisparameterspecifieshowtotransformthelocationofthedistancemeasurementbasedonthedifferencebetweenthereferencecoordinatesystemandthemeasurementcoordinatesystem.SetthisparametertoNULLifyoudonotneedtotransformsearchRect.

Page 260: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

firstEdge PointFloat* Onreturn,thecoordinatelocationofthefirstedgeusedtomeasurethedistance.Ifyoudonotneedthisinformation,setthisparametertoNULL.

lastEdge PointFloat* Onreturn,thecoordinatelocationofthelastedgeusedtomeasurethedistance.Ifyoudonotneedthisinformation,setthisparametertoNULL.

Page 261: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 262: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:

threshold 40width 4steepness 2subsamplingRatio 5showSearchArea FALSEshowSearchLines FALSEshowEdgesFound FALSEshowResult TRUE

Page 263: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqClassifyUsageClassifierReport*imaqClassify(Image*image,constClassifierSession*session,constROI*roi,double*featureVector,unsignedintvectorSize);

Page 264: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeClassifiesanimageorfeaturevector.

Page 265: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 266: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagetoclassify.session constClassifierSession* Theclassifiersessiontouse.roi constROI* TheROIaroundtheitemto

classify.Eachcontourofroimustbearectangle,rotatedrectangle,oval,annulus,orclosedcontour.SetthisparametertoNULLtoclassifytheentireimage.

featureVector double* Thefeaturevectortoclassify.Usethisparameteronlywhenyouareusingacustomclassifier.Foranyothertypeofclassifier,setthisparametertoNULL.

vectorSize unsignedint ThenumberofelementsinfeatureVector.Usethisparameteronlywhenyouareusingacustomclassifier.Foranyothertypeofclassifier,setthisparameterto0.Allfeaturevectorsclassifiedbyacustomclassifiermustbethesamesizeasthesamplesitcontains

Page 267: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ClassifierReport* Onsuccess,thisfunctionreturnsareportcontainingtheresultsoftheclassification.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeoftheinformationbycallingimaqDispose().

Page 268: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqClearErrorUsageintimaqClearError();

Page 269: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetstheNIVisionerrorstatusforthecurrentthreadtoERR_SUCCESS.

Page 270: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Thisfunctionreturnsanon-zerovalue.

Page 271: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqClearOverlayUsageintimaqClearOverlay(Image*image,constchar*group);

Page 272: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRemovesalloverlayinformationassociatedwiththeimage.

Page 273: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 274: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagefromwhichthefunctionremovesalloverlayinformation.

group constchar* Overlaygroupnametoclear.SetthisparametertoNULLtoclearalloverlays.

Page 275: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 276: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqClipboardToImageUsageintimaqClipboardToImage(Image*dest,RGBValue*palette);

Page 277: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCopiesanimagefromtheclipboard.

Page 278: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB

Page 279: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Theimageintowhichthefunctioncopiestheclipboardimage.

palette RGBValue* Anarrayof256entriesthatreceivesthepaletteassociatedwiththe8-bitclipboardimage.Ifthereisnopaletteassociatedwiththeimage,thefunctionfillsinagraypalette.SetthisparametertoNULLifyoudonotneedthepalette.

Page 280: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturns1iftherewasanimageontheclipboardor–1iftherewasnoimageontheclipboard.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 281: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCloseAVIUsageintimaqCloseAVI(AVISessionsession);

Page 282: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeThisfunctionclosesanAVIfileandmakesitavailabletobereadbyotherapplications.

Page 283: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

session AVISession Thesessiontouse.

Page 284: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 285: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCloseToolWindowUsageintimaqCloseToolWindow();

Page 286: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeClosesthetoolwindowandfreesallassociatedresources.

Page 287: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 288: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCloseWindowUsageintimaqCloseWindow(intwindowNumber);

Page 289: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeClosesanimagewindowandfreesallassociatedresources.

Page 290: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindowtoclose.SetthisparametertoIMAQ_ALL_WINDOWStoclosealloftheimagewindows.

Page 291: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 292: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqColorBCGTransformUsageintimaqColorBCGTransform(Image*dest,constImage*source,constBCGOptions*redOptions,constBCGOptions*greenOptions,constBCGOptions*blueOptions,constImage*mask);

Page 293: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeAppliesbrightness,contrast,andgammacorrectiontoeachplaneofacolorimage.

Page 294: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_RGB

Page 295: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagetotransform.redOptions constBCGOptions* Theparameterstouseinthe

transformoftheredplane.SetthisparametertoNULLtoleavetheredplaneunchanged.

greenOptions constBCGOptions* Theparameterstouseinthetransformofthegreenplane.SetthisparametertoNULLtoleavethegreenplaneunchanged.

blueOptions constBCGOptions* Theparameterstouseinthetransformoftheblueplane.SetthisparametertoNULLtoleavetheblueplaneunchanged.

mask constImage* Anoptionalmaskimage.ThisimagemustbeanIMAQ_IMAGE_U8image.Thefunctiontransformsonlythosepixelinthesourceimagewhosecorrespondingpixelsinthemaskimagearenon-zero.SetthisparametertoNULLtotransformthewholeimage.

Page 296: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 297: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqColorEqualizeUsageintimaqColorEqualize(Image*dest,constImage*source,intcolorEqualization);

Page 298: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCalculatesthehistogramofeachplaneofacolorimageandredistributespixelvaluesacrossthedesiredrangewhilemaintainingpixelvaluegroupings.

Page 299: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 300: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagetoequalize.colorEqualization int SetthisparametertoTRUEtoequalize

allthreeplanesoftheimage.SetthisparametertoFALSEtoequalizeonlytheluminanceplane.

Page 301: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 302: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqColorHistogram2UsageColorHistogramReport*imaqColorHistogram2(Image*image,intnumClasses,ColorModemode,constCIEXYZValue*whiteReference,Image*mask);

Page 303: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCalculatesthehistogram,orpixeldistribution,ofacolorimage.

Page 304: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 305: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagewhosehistogramthefunctioncalculates.

numClasses int Thenumberofclassesintowhichthefunctionseparatesthepixels.

mode ColorMode Thecolorspaceinwhichtoperformthehistogram.

whiteReference constCIEXYZValue* IfmodeisCIEL*a*b*,theCIEXYZcomponentsthatmaptowhite.IfthisparameterissettoNULL,thedefaultvalues(0.950456,1,1.088754,0),whichmaptotheRGBvalues(255,255,255,0),areused.

mask Image* Anoptionalmaskimage.ThisimagemustbeanIMAQ_IMAGE_U8image.Thefunctioncalculatesthehistogramusingonlythosepixelsintheimagewhosecorrespondingpixelsinthemaskarenon-zero.SetthisparametertoNULLtocalculatethehistogramoftheentireimage.

Page 306: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ColorHistogramReport* Onsuccess,thisfunctionreturnsareportdescribingtheclassificationofeachplaneinaHistogramReport.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereport,disposeofitbycallingimaqDispose().

Page 307: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqColorLookupUsageintimaqColorLookup(Image*dest,constImage*source,ColorModemode,constImage*mask,constshort*plane1,constshort*plane2,constshort*plane3);

Page 308: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposePerformsatransformationonanimagebyreplacingeachpixelvalueinagivencolorplanewiththelookuptableentrycorrespondingtothatvalue.

NoteThisfunctiondoesnotsupporttheCIEL*a*b*andCIEXYZcolormodes.

Page 309: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 310: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagetoapplythelookuptableto.mode ColorMode Thecolorspaceinwhichtoapplythelookuptable.

Iftheimageisnotinthecolorspaceyouspecify,thefunctionconvertsthepixelsintothespecifiedcolorspace,appliesthelookuptable,andconvertsthepixelsbacktotheiroriginalcolorspace.

mask constImage* Anoptionalmaskimage.ThisimagemustbeanIMAQ_IMAGE_U8image.Thefunctionappliesthelookuptoonlythosepixelsinthesourceimagewhosecorrespondingpixelsinthemaskimagearenon-zero.SetthisparametertoNULLtoapplythelookuptothewholeimage.

plane1 constshort* Thelookuptableforthefirstplaneoftheimage.Ifyousetthisparameter,thelookuptablemustcontain256values.SetthisparametertoNULLtoleavethefirstplaneunchanged.

plane2 constshort* Thelookuptableforthesecondplaneoftheimage.Ifyousetthisparameter,thelookuptablemustcontain256values.SetthisparametertoNULLtoleavethesecondplaneunchanged.

plane3 constshort* Thelookuptableforthethirdplaneoftheimage.Ifyousetthisparameter,thelookuptablemustcontain256values.SetthisparametertoNULLtoleavethethirdplaneunchanged.

Page 311: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 312: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionplane1—Thecolorplanedependsonthemode,asfollows:

IMAQ_RGB redplaneIMAQ_HSL hueplaneIMAQ_HSV hueplaneIMAQ_HSI hueplane

plane2—Thecolorplanedependsonmode,asfollows:

IMAQ_RGB greenplaneIMAQ_HSL saturationplaneIMAQ_HSV saturationplaneIMAQ_HSI saturationplane

plane3—Thecolorplanedependsonmode,asfollows:

IMAQ_RGB blueplaneIMAQ_HSL luminanceplaneIMAQ_HSV valueplaneIMAQ_HSI intensityplane

Page 313: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqColorThresholdUsageintimaqColorThreshold(Image*dest,constImage*source,intreplaceValue,ColorModemode,constRange*plane1Range,constRange*plane2Range,constRange*plane3Range);

Page 314: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeThresholdsacolorimage.Thefunctionselectsapixelifallthreecolorcomponentsfallwithinthespecifiedrange.Thefunctionreplacesthevalueofselectedpixelswiththegivenreplacementvalueandsetsthevalueofunselectedpixelsto0.

NoteThisfunctiondoesnotsupporttheCIEL*a*b*andCIEXYZcolormodes.

Page 315: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 316: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.ThisimagemustbeanIMAQ_IMAGE_U8image.

source constImage* Theimagetothreshold.replaceValue int Thevaluethefunctionassignstoselected

pixels.mode ColorMode Thecolorspacetoperformthethresholdin.plane1Range constRange* Theselectionrangeforthefirstplaneofthe

image.SetthisparametertoNULLtouseaselectionrangefrom0to255.

plane2Range constRange* Theselectionrangeforthesecondplaneoftheimage.SetthisparametertoNULLtouseaselectionrangefrom0to255.

plane3Range constRange* Theselectionrangeforthethirdplaneoftheimage.SetthisparametertoNULLtouseaselectionrangefrom0to255.

Page 317: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 318: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionplane1Range—Thecolorplanedependsonthemode,asfollows:

IMAQ_RGB redplaneIMAQ_HSL hueplaneIMAQ_HSV hueplaneIMAQ_HSI hueplane

plane2Range—Thecolorplanedependsonmode,asfollows:

IMAQ_RGB greenplaneIMAQ_HSL saturationplaneIMAQ_HSV saturationplaneIMAQ_HSI saturationplane

plane3Range—Thecolorplanedependsonmode,asfollows:

IMAQ_RGB blueplaneIMAQ_HSL luminanceplaneIMAQ_HSV valueplaneIMAQ_HSI intensityplane

Page 319: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCompareUsageintimaqCompare(Image*dest,constImage*source,constImage*compareImage,ComparisonFunctioncompare);

Page 320: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCopiesthesourceimagetothedestinationimageinthefollowingmanner:Ifthegivencomparisonbetweenthesourcepixelvalueanditscorrespondingcomparisonimagepixelvalueistrue,thefunctionsetsthedestinationpixelvalueto0.Ifthecomparisonisfalse,thefunctioncopiesthesourcepixelvaluetothedestinationpixel.

Page 321: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 322: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.compareImage constImage* Theimagetowhichthefunction

comparesthesourceimage.Thisimagemustbethesametypeofimageassource.

compare ComparisonFunction Themethodinwhichthefunctioncomparesimages.

Page 323: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 324: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCompareConstantUsageintimaqCompareConstant(Image*dest,constImage*source,PixelValuevalue,ComparisonFunctioncompare);

Page 325: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCopiesthesourceimagetothedestinationimageinthefollowingmanner:Ifthegivencomparisonbetweenthesourcepixelvalueandthegivenconstantistrue,thefunctionsetsthedestinationpixelvalueto0.Ifthecomparisonisfalse,thefunctioncopiesthesourcepixelvaluetothedestination.

Page 326: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 327: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.value PixelValue Thevaluetocomparetothesource

image.UsethegrayscalememberofthePixelValueunion.

compare ComparisonFunction Themethodinwhichthefunctioncomparesimages.

Page 328: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 329: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCompareGoldenTemplateUsageintimaqCompareGoldenTemplate(constImage*image,Image*goldenTemplate,Image*brightDefects,Image*darkDefects,constInspectionAlignment*alignment,constInspectionOptions*options);

Page 330: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComparesthegoldentemplatetoanimageatagivenalignment.

Page 331: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 332: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagetoinspectfordefects.

goldenTemplate Image* Thegoldentemplatetocompareagainstimage.

brightDefects Image* Thedestinationimageforbrightdefects,orbothkindsofdefectsifthesameimageisalsopassedtodarkDefects.

darkDefects Image* Thedestinationimagefordarkdefects.

alignment constInspectionAlignment* ThealignmentwithinimagewherethegoldenTemplateislocated.ThisparameterisrequiredandcannotbeNULL.

options constInspectionOptions* isaclusterspecifyingthegoldentemplatecomparison.

Page 333: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 334: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultmatchoptions,asfollows:

registrationMethod IMAQ_REGISTRATION_NONEnormalizationMethod IMAQ_NORMALIZATION_NONEedgeThicknessToIgnore 0brightThreshold 30darkThreshold 30binary TRUE

Page 335: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqComplexPlaneToArrayUsagefloat*imaqComplexPlaneToArray(constImage*image,ComplexPlaneplane,Rectrect,int*columns,int*rows);

Page 336: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeExtractsaplanefromacompleximageintoatwo-dimensionalarray.

Page 337: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_COMPLEX

Page 338: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagewhoseplaneofpixelvaluesaretobeplacedintoanarray.

plane ComplexPlane Theplanetoextract.rect Rect Specifiesarectangularregionoftheimageto

return.SetthisparametertoIMAQ_NO_RECTtoreturnthespecifiedplaneoftheentireimage.

columns int* Onreturn,thenumberofcolumnsinthereturnedarray.SetthisparametertoNULLifyoudonotneedthisinformation.

rows int* Onreturn,thenumberofrowsinthereturnedarray.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 339: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

float* Onsuccess,thisfunctionreturnsatwo-dimensionalarrayofvaluescorrespondingtothepixelvaluesoftheextractedplane.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththearray,disposeofitbycallingimaqDispose().

Page 340: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqConcentricRake2UsageConcentricRakeReport2*imaqConcentricRake2(Image*image,ROI*roi,ConcentricRakeDirectiondirection,EdgeProcessprocess,intstepSize,EdgeOptions2*edgeOptions);

Page 341: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFindsedgesalongarcsinsideanannularsearchregion.

Page 342: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 343: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageinwhichtofindedges.

roi ROI* Theannularregionthefunctionlooksinfortheedges.Thefirstcontourofroimustbeanannulus.

direction ConcentricRakeDirection Thedirectionthefunctionsearchesforedgesalongthesearchlines.

process EdgeProcess Definestheedgesforwhichthefunctionlooks.

stepSize int Specifiesthenumberofpixelsbetweeneachsearchline.

edgeOptions EdgeOptions2* Specifiestheparametersthatareusedtocomputetheedgeprofileanddetectedges.

Page 344: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ConcentricRakeReport2* Onsuccess,thisfunctionreturnsinformationdescribingthecalculatededgesandtheconcentricrakeusedbythefunction.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDispose().

Page 345: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionedgeOptions—SetedgeOptionstoNULLtousethedefaultoptions,asfollows:

polarity IMAQ_SEARCH_FOR_ALL_EDGESkernelSize 3numSearchLines 3minThreshold 10.0interpolationType IMAQ_BILINEAR_FIXEDcolumnProcessingMode IMAQ_MEDIAN_COLUMNS

Page 346: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqConjugateUsageintimaqConjugate(Image*dest,constImage*source);

Page 347: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputestheconjugateofacompleximage.

Page 348: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_COMPLEX

Page 349: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimagewhoseconjugatethefunction

calculates.

Page 350: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 351: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqConstructROI2UsageintimaqConstructROI2(constImage*image,ROI*roi,ToolinitialTool,constToolWindowOptions*tools,constConstructROIOptions2*options,int*okay);

Page 352: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeDisplaystheimageinamodalwindowandallowstheusertodrawaregionofinterest(ROI)onit.AftertheuserdrawstheROI,thefunctionclosesthewindow.

Page 353: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 354: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* SpecifiestheimagethattheuserselectsanROIfrom.

roi ROI* SpecifiestheROIthatinitiallyappearsintheROIconstructorwindow.TheusercanthenmodifythisROIbyadding,removing,resizing,andmovingcontours.ThefunctionappliestheresultsofthesemodificationstotheROI.

initialTool Tool SpecifiestheinitiallyselectedtoolintheROIconstructorwindow.ThistoolmustbeavailableintheROIconstructorwindow.

tools constToolWindowOptions* DeterminestheavailabilityoftoolsintheROIconstructorwindow.SettoolstoNULLtodisplayallthetools.

options constConstructROIOptions2* DescribeshowafunctionpresentstheROIconstructorwindow.

okay int* Uponreturn,thisparameterisTRUEiftheuserpressedOKtoendtheselectionofaline.Otherwise,thisparameterisFALSE.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 355: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 356: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:

windowNumber IMAQ_MODAL_DIALOGwindowTitle "ROIConstructor"type IMAQ_PALETTE_GRAYpalette NULLnumColors 0maxContours 1

Page 357: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqConvexHullUsageintimaqConvexHull(Image*dest,Image*source,intconnectivity8);

Page 358: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputestheconvexenvelopeforeachlabeledparticleinthesourceimage.Ifthesourceimagecontainsmorethanoneparticle,youmustlabeleachparticlewithimaqLabel2()beforecallingthisfunction.

Page 359: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 360: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source Image* Theimagecontainingthelabeledparticlesthat

thefunctioncalculatesconvexenvelopesfor.connectivity8 int SetthisparametertoTRUEtouseconnectivity-8

todeterminewhetherparticlesaretouching.SetthisparametertoFALSEtouseconnectivity-4todeterminewhetherparticlesaretouching.Formoreinformationaboutconnectivity,seeChapter9,BinaryMorphology,intheNIVisionConceptsManual

Page 361: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 362: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 363: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqConvolve2UsageintimaqConvolve2(Image*dest,Image*source,float*kernel,intmatrixRows,intmatrixCols,floatnormalize,Image*mask,RoundingModeroundingMode);

Page 364: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeAppliesalinearfiltertoanimagebyconvolvingtheimagewithafilteringkernel.Theconvolutionkernelmusthaveanoddwidthandheight.

Page 365: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 366: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source Image* Theimagetofilter.Thisfunction

modifiestheborderofthesourceimage.Thebordermustbeatleasthalfaslargeasthelargerdimensionofthekernel.

kernel float* Thematrixrepresentingthelinearfilter.ThisparameterisrequiredandcannotbeNULL.

matrixRows int Thenumberofrowsinthekernelmatrix.Thisnumbermustbeodd.

matrixCols int Thenumberofcolumnsinthekernelmatrix.Thisnumbermustbeodd.

normalize float Thenormalizationfactor.Afterperformingtheconvolution,thefunctiondivideseachpixelvaluebythisvalue.Setthisparameterto0todividebythesumoftheelementsofthekernel.

mask Image* Anoptionalmaskimage.ThisimagemustbeanIMAQ_IMAGE_U8image.Thefunctionfiltersonlythosepixelsinthesourceimagewhosecorrespondingpixelsinthemaskarenon-zero.SetthisparametertoNULLtofiltertheentireimage.

roundingMode RoundingMode Specifiesthetypeofroundingtousewhendividingimagepixels.

Page 367: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 368: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 369: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCopyCalibrationInfo2UsageintimaqCopyCalibrationInfo2(Image*dest,Image*source,Pointoffset);

Page 370: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCopiescalibrationinformationfromacalibratedimagetoanuncalibratedimage.Bothimagesmustbethesamesize.

Page 371: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 372: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Theimagewhosecalibrationinformationthefunctionsets.

source Image* Thecalibratedimagethatcontainsthecalibrationinformationthefunctioncopiestothedestinationimage.

offset Point Theoffsetofdestwithinsource.

Page 373: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 374: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCopyContourUsageContourIDimaqCopyContour(ROI*destRoi,constROI*sourceRoi,ContourIDid);

Page 375: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCopiesacontourexistinginoneregionofinterest(ROI)toanotherROI.CopyingthecontourdoesnotaffecttheoriginalcontourorthesourceROI.

Page 376: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

destRoi ROI* TheROItowhichthefunctionaddsthecontour.sourceRoi constROI* TheROIthatcontainsthecontourtocopy.id ContourID ThecontourtoaddtotheROI.

Page 377: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ContourID Onsuccess,thisfunctionreturnstheContourIDofthecontourinthedestinationROI.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 378: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCopyFromRingUsageImage*imaqCopyFromRing(SESSION_IDsessionID,Image*image,intimageToCopy,int*imageNumber,Rectrect);

Page 379: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCopiesanareaofabuffertoauser-specifiedimage.Thisfunctionisusefulforringacquisitionsifyoudonotwanttoextractthebuffer.

Page 380: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 381: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

sessionID SESSION_ID AvalidsessionID.image Image* Receivesthecopiedimage.Ifyousetthis

parametertoNULL,thefunctioncreatesanimagetoreceivethecopy.

imageToCopy int Theimagetocopyfromtheringacquisition.Thecumulativebufferindexspecifiestheimagetocopy.IfanotherimagehasoverwrittenimageToCopy,thefunctionreturnsthenextavailableimage.

imageNumber int* Thecumulativebufferindexofthecopiedimage.SetthisparametertoNULLifyoudonotneedthisinformation.

rect Rect Therectangularareaoftheimageintheringthatthefunctioncopies.IfyousetthisparametertoIMAQ_NO_RECT,oriftheareaislargerthantheimageinthering,thefunctioncopiestheentireimage.

Page 382: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

Image* Onsuccess,thisfunctionreturnsthecopiedimage.Onfailure,thefunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeimage,disposeofitbycallingimaqDispose().

Page 383: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCopyOverlayUsageintimaqCopyOverlay(Image*dest,constImage*source,constchar*group);

Page 384: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCopiesoverlayinformationexistinginoneimagetoanotherimage.Thisoverlayisaddedtotheexistingoverlayinformationonthedestinationimage.

Page 385: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 386: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.group constchar* Overlaygroupnametocopy.Setthisparameterto

NULLtocopyalloverlays.

Page 387: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 388: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCopyRectUsageintimaqCopyRect(Image*dest,constImage*source,Rectrect,PointdestLoc);

Page 389: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCopiesanareaofoneimageintoanotherimage.Youcancopythesourceareatoanewdestinationimageortoanotherareainthesourceimage.Thesourceanddestinationimagesmustbeofthesametype.Ifthesourceareaislargerthanthedestinationarea,thesourceareaisclipped.Thesizeofthedestinationimageandpixelsoutsidethedestinationarearemainunchanged.Tomakeaduplicateofanimage,includingborderandcalibrationinformation,useimaqDuplicate().

Page 390: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 391: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.rect Rect Theareaofthesourcetocopyintothe

destination.SetthisparametertoIMAQ_NO_RECTtocopythewholesourceimagetothedestination.

destLoc Point Thecoordinatesofthetop-leftpixelinthedestinationimagewherethefunctioncopiesthesourcearea.Thislocationcanbeanywhereontheimageorontheborderoftheimage.

Page 392: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 393: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCorrectCalibratedImageUsageintimaqCorrectCalibratedImage(Image*dest,constImage*source,PixelValuefill,InterpolationMethodmethod,constROI*roi);

Page 394: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSpatiallycorrectsanimagebyapplyingthecalibrationinformationassociatedwiththeimage.

NoteYoumustfirstattachcalibrationinformationtothisimagebyusingoneofthefollowingfunctions:imaqCopyCalibrationInfo2()imaqLearnCalibrationGrid()imaqLearnCalibrationPoints()imaqSetSimpleCalibration()

Page 395: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 396: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thecalibratedimagethatthefunction

corrects.fill PixelValue Thevaluethatthefunctionfillspixelsina

correctedimagewith.Thesepixelswerenotpartoftheoriginalimage.

method InterpolationMethod Themethodofinterpolation.ThevalidinterpolationmethodsforcorrectionareIMAQ_ZERO_ORDERandIMAQ_BILINEAR.

roi constROI* Specifiestheregionoftheimagethefunctioncorrects.SetthisparametertoNULLtocorrectthewholeimage.

Page 397: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 398: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCorrelateUsageintimaqCorrelate(Image*dest,Image*source,constImage*templateImage,Rectrect);

Page 399: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputesthenormalizedcross-correlationbetweenasourceimageandatemplateimage.Thisoperationistime-intensive.Toreducethecorrelationtime,useasmalltemplate,reducethesearchareabyusingthearearectangle,andmakethetemplateimagewidthamultipleof4.

Page 400: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 401: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source Image* Thesourceimage.Thecorrelation

modifiestheborderofthesourceimage.Thebordermustbeatleasthalfaslargeasthelargerdimensionofthetemplateimage.

templateImage constImage* Thetemplateimagetocorrelateagainstthesource.

rect Rect Theareaofthesourceimageonwhichtoperformthecorrelation.SetthisparametertoIMAQ_NO_RECTtoperformthecorrelationonthewholesourceimage.

Page 402: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 403: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 404: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCountObjectsUsageObjectReport*imaqCountObjects(Image*image,RotatedRectsearchRect,constCountObjectsOptions*options,constCoordinateTransform2*transform,int*numObjects);

Page 405: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeLocates,counts,andmeasuresobjectsinarectangularsearcharea.Thisfunctionusesathresholdonthepixelintensitiestosegmenttheobjectsfromtheirbackground.Thefunctionthenlocatesandmeasuresthesegmentedobjects.

Page 406: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 407: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagethatthefunctionusesforobjectanalysis.

searchRect RotatedRect Thecoordinatelocationoftherectangularsearchareaoftheobjectanalysis.SetthisparametertoIMAQ_NO_ROTATED_RECTtosearchtheentireimage.

options constCountObjectsOptions* Definestheparametersofthealgorithmthefunctionusestolocatetheobjectsandtheinformationthefunctionoverlaystotheimage.

transform constCoordinateTransform2* AnoptionalspecificationofthecoordinatetransformforsearchRect.Thisparameterspecifieshowtotransformthelocationoftheobjectdetectionbasedonthedifferencebetweenthereferencecoordinatesystemandthemeasurementcoordinatesystem.SetthisparametertoNULLifyoudonotneedtotransformsearchRect.

numObjects int* Onreturn,thenumberofobjectsthatthefunctionfound.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 408: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ObjectReport* Onsuccess,thisfunctionreturnsanarrayofreportsdescribingeachoftheobjectsfoundbythefunction.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDispose().

Page 409: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:

type IMAQ_BRIGHT_OBJECTSthreshold 128rejectBorder FALSEfillHoles FALSEuseMinSize FALSEminSize 0useMaxSize FALSEmaxSize 0showSearchArea FALSEshowObjectCenter TRUEshowBoundingBox TRUE

Page 410: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCountParticlesUsageintimaqCountParticles(Image*image,intconnectivity8,int*numParticles);

Page 411: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCountsthenumberofparticlesinabinaryimage,andmakesbasiccalculationsabouttheparticlestoincreasetheefficiencyoftheimaqMeasureParticle()function.

Page 412: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 413: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageonwhichtocountparticles.connectivity8 int SetthisparametertoTRUEtouseconnectivity-8

todeterminewhetherpixelsarepartofthesameparticle.SetthisparametertoFALSEtouseconnectivity-4todeterminewhetherpixelsarepartofthesameparticle.Formoreinformationaboutconnectivity,refertoChapter9,BinaryMorphology,intheNIVisionConceptsManual.

numParticles int* Onreturn,thenumberofparticlesintheimage.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 414: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 415: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCreateAVIUsageAVISessionimaqCreateAVI(constchar*fileName,constchar*compressionFilter,intquality,unsignedintframesPerSecond,unsignedintmaxDataSize);

Page 416: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeThisfunctioncreatesanAVIfilesothatimagesanddatacanbewrittentoit.

Page 417: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

fileName constchar* ThenameoftheAVIfiletocreate.Thefileextensionmustbe

compressionFilter constchar* Thenameofthecompressionfiltertouse,ifany.CallimaqGetFilterNames()foralistofavailablecompressionfilters.SetthisparametertoNULLtowriteuncompressedimages.

quality int Ifcompressionisbeingused,thequalityofthecompression,between0-1000.UseIMAQ_USE_DEFAULT_QUALITYtousethedefaultforthecompressionfilter.Notethatnotallcompressionfiltersallowyoutosetthequality.

framesPerSecond unsignedint

ThenumberofframespersecondatwhichtoplaytheAVI.NotethatthisparameterindicatesthedesiredplaybackratefortheAVIyoucreate.TheAVImayplayataslowerratedependingontheperformanceofthesystemonwhichitplays.

maxDataSize unsignedint

Themaximumsizeofthedataattachedtoeachframe.Setthisparameterto0ifyoudonotwanttoattachdatatothisAVI.

Page 418: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

AVISession Onsuccess,thisfunctionreturnsasessionIDassociatedwiththegivenAVIfile.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 419: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCreateCharSetUsageCharSet*imaqCreateCharSet();

Page 420: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCreatesanew,emptycharacterset.

Page 421: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

CharSet* Onsuccess,thisfunctionreturnsapointertoanew,emptyCharSet.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetError().Whenyoufinishwiththecharacterset,disposeofitbycallingimaqDispose().

Page 422: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCreateClassifierUsageClassifierSession*imaqCreateClassifier(ClassifierTypetype);

Page 423: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCreatesanewclassifiersession.

Page 424: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

type ClassifierType Thetypeoftheclassifiersessiontocreate.

Page 425: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ClassifierSession* Onsuccess,thisfunctionreturnsanewclassifiersession.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeoftheinformationbycallingimaqDispose().

Page 426: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCreateImageUsageImage*imaqCreateImage(ImageTypetype,intborderSize);

Page 427: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCreatesanimage.Thecreatedimagewillbe0x0pixelsinsize.Tochangetheimagesize,useimaqSetImageSize().

Page 428: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 429: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

type ImageType Thetypeofimagetocreate.borderSize int Thesizeoftheimageborder.Formore

informationaboutborders,refertoChapter1,DigitalImages,oftheNIVisionConceptsManual.

Page 430: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

Image* Onsuccess,thisfunctionreturnsthecreatedimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththecreatedimage,disposeofitbycallingimaqDispose().

Page 431: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCreateROIUsageROI*imaqCreateROI();

Page 432: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCreatesanew,emptyregionofinterest(ROI).

Page 433: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ROI* Onsuccess,thisfunctionreturnsapointertoanew,emptyROI.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().WhenyouarefinishedwiththeROI,disposeofthepointerbycallingimaqDispose().

Page 434: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqDanielssonDistanceUsageintimaqDanielssonDistance(Image*dest,Image*source);

Page 435: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCreatesaveryaccuratedistancemapbasedontheDanielssondistancealgorithm.Thefunctionencodesthepixelvalueofaparticleasafunctionofthedistanceofthepixelfromtheparticleperimeter.Forafasterbutlessprecisealgorithm,useimaqSimpleDistance().

Page 436: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16

Page 437: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source Image* Theimagethatthefunctionusestocomputethe

distancemap.Thefunctionmodifiestheborderofthesourceimage.Thebordermustbeatleastonepixelwide.

Page 438: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 439: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 440: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqDeleteCharUsageintimaqDeleteChar(CharSet*set,intindex);

Page 441: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeDeletesacharacterfromthetrainedcharacterset.

Page 442: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

set CharSet* Thecharactersetthisfunctionoperateson.Tocreateacharacterset,useimaqCreateCharSet().ThisparameterisrequiredandcannotbeNULL.

index int Theindexofacharacterinthetrainedcharactersettodelete.SetthisparametertoIMAQ_ALL_CHARACTERStocleartheentiretrainedcharacterset.

Page 443: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 444: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqDeleteClassifierSampleUsageintimaqDeleteClassifierSample(ClassifierSession*session,intindex);

Page 445: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeDeletesasamplefromaclassifiersession.

Page 446: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

session ClassifierSession* Thesessioncontainingthesampletodelete.index int Theindexofthesampletodelete.Use

IMAQ_ALL_SAMPLEStodeleteallsamplesfromthissession.

Page 447: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 448: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqDetectCirclesUsageCircleMatch*imaqDetectCircles(constImage*image,constCircleDescriptor*circleDescriptor,constCurveOptions*curveOptions,constShapeDetectionOptions*shapeDetectionOptions,constROI*roi,int*numMatchesReturned);

Page 449: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSearchesforcirclesinanimage.

Page 450: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 451: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageonwhichtodetectcircles.

circleDescriptor constCircleDescriptor* Astructurethatdescribesthecirclestosearchforintheimage.ThisparameterisrequiredandcannotbeNULL.

curveOptions constCurveOptions* Describeshowthefunctionidentifiesthecurvesintheimage.ThisfunctiondoesnotsupportidentifyingcurveswithsubpixelaccuracyandthereforeignoresthesubpixelAccuracyelementofthisparameter.

shapeDetectionOptions constShapeDetectionOptions* Theoptionstousewhendetectingcircles.

roi constROI* Theregionofinterestappliedtotheimagethatspecifieswherecirclescanbedetected.SetthisparametertoNULL

Page 452: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

tosearchtheentireimage.

numMatchesReturned int* Onreturn,thenumberofcirclesthatthefunctionmatched.SetthisparametertoNULLifyoudonotwishtoreturninformationaboutthenumberofmatchedcircles.

Page 453: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

CircleMatch* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thevalueisNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().

Page 454: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussioncurveOptions—SetcurveOptionstoNULLtousethedefaultcurveoptions,asfollows:

extractionMode IMAQ_NORMAL_IMAGEthreshold 75filterSize IMAQ_NORMALminLength 25rowStepSize 15columnStepSize 15maxEndPointGap 10onlyClosed FALSEsubpixelAccuracy FALSE

shapeDetectionOptions—SetshapeDetectionOptionstoNULLtousethedefaultshapedetectionoptions,asfollows:

mode IMAQ_GEOMETRIC_MATCH_SHIFT_INVARIANTorientationRanges NULLnumOrientationRanges 0scaleRange {75,125}minMatchScore 800

Page 455: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqDetectEllipsesUsageEllipseMatch*imaqDetectEllipses(constImage*image,constEllipseDescriptor*ellipseDescriptor,constCurveOptions*curveOptions,constShapeDetectionOptions*shapeDetectionOptions,constROI*roi,int*numMatchesReturned);

Page 456: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSearchesforellipsesinanimage.

Page 457: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 458: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageonwhichtodetectellipses.

ellipseDescriptor constEllipseDescriptor* Astructurethatdescribestheellipsestosearchforintheimage.ThisparameterisrequiredandcannotbeNULL.

curveOptions constCurveOptions* Describeshowthefunctionidentifiesthecurvesintheimage.ThisfunctiondoesnotsupportidentifyingcurveswithsubpixelaccuracyandthereforeignoresthesubpixelAccuracyelementofthisparameter.

shapeDetectionOptions constShapeDetectionOptions* Theoptionstousewhendetectingellipses.

roi constROI* Theregionofinterestappliedtotheimagethatspecifieswhereellipsescanbedetected.SetthisparametertoNULL

Page 459: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

tosearchtheentireimage.

numMatchesReturned int* Onreturn,thenumberofellipsesthatthefunctionmatched.SetthisparametertoNULLifyoudonotwishtoreturninformationaboutthenumberofmatchedellipses.

Page 460: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

EllipseMatch* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().

Page 461: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussioncurveOptions—SetcurveOptionstoNULLtousethedefaultcurveoptions,asfollows:

extractionMode IMAQ_NORMAL_IMAGEthreshold 75filterSize IMAQ_NORMALminLength 25rowStepSize 15columnStepSize 15maxEndPointGap 10onlyClosed FALSEsubpixelAccuracy FALSE

shapeDetectionOptions—SetshapeDetectionOptionstoNULLtousethedefaultshapedetectionoptions,asfollows:

mode IMAQ_GEOMETRIC_MATCH_SHIFT_INVARIANTorientationRanges NULLnumOrientationRanges 0scaleRange {75,125}minMatchScore 800

Page 462: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqDetectExtremesUsageExtremeReport*imaqDetectExtremes(constdouble*pixels,intnumPixels,DetectionModemode,constDetectExtremesOptions*options,int*numExtremes);

Page 463: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFindsthelocation,amplitude,andsecondderivativeoftheextremes(eitherpeaksorvalleys)intheinputarray.Thisfunctionusesanalgorithmthatfitsaquadraticpolynomialtosequentialgroupsofdatapoints.

Page 464: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

pixels constdouble* Thearrayofpixeldatathefunctionprocesses.

numPixels int Thenumberofpixelsinthesuppliedarray.Youmustsupplyatleastasmanypixelsasthevalueyousupplyforthewidthelementintheoptionsparameter.

mode DetectionMode Determinesifthefunctiondetectspeaksordetectsvalleys.

options constDetectExtremesOptions* Describeshowthefunctioncalculatestheextremes.

numExtremes int* Onreturn,thenumberofextremesfoundbythefunction.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 465: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ExtremeReport* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachextremefound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().

Page 466: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:

threshold 0width 3

Page 467: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqDetectLinesUsageLineMatch*imaqDetectLines(constImage*image,constLineDescriptor*lineDescriptor,constCurveOptions*curveOptions,constShapeDetectionOptions*shapeDetectionOptions,constROI*roi,int*numMatchesReturned);

Page 468: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSearchesforlinesinanimage.

Page 469: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 470: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageonwhichtodetectlines.

lineDescriptor constLineDescriptor* Astructurethatdescribesthelinestosearchforintheimage.ThisparameterisrequiredandcannotbeNULL.

curveOptions constCurveOptions* Describeshowthefunctionidentifiesthecurvesintheimage.ThisfunctiondoesnotsupportidentifyingcurveswithsubpixelaccuracyandthereforeignoresthesubpixelAccuracyelementofthisparameter.

shapeDetectionOptions constShapeDetectionOptions* Theoptionstousewhendetectinglines.

roi constROI* Theregionofinterestappliedtotheimagethatspecifieswherelinescanbedetected.SetthisparametertoNULL

Page 471: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

tosearchtheentireimage.

numMatchesReturned int* Onreturn,thenumberoflinesthatthefunctionmatched.SetthisparametertoNULLifyoudonotwishtoreturninformationaboutthenumberofmatchedlines.

Page 472: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

LineMatch* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().

Page 473: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussioncurveOptions—SetcurveOptionstoNULLtousethedefaultcurveoptions,asfollows:

extractionMode IMAQ_NORMAL_IMAGEthreshold 75filterSize IMAQ_NORMALminLength 25rowStepSize 15columnStepSize 15maxEndPointGap 10onlyClosed FALSEsubpixelAccuracy FALSE

shapeDetectionOptions—SetshapeDetectionOptionstoNULLtousethedefaultshapedetectionoptions,asfollows:

mode IMAQ_GEOMETRIC_MATCH_SHIFT_INVARIANTorientationRanges NULLnumOrientationRanges 0scaleRange {75,125}minMatchScore 800

Page 474: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqDetectRectanglesUsageRectangleMatch*imaqDetectRectangles(constImage*image,constRectangleDescriptor*rectangleDescriptor,constCurveOptions*curveOptions,constShapeDetectionOptions*shapeDetectionOptions,constROI*roi,int*numMatchesReturned);

Page 475: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSearchesforrectanglesinanimage.

Page 476: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 477: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageonwhichtodetectrectangles.

rectangleDescriptor constRectangleDescriptor* Astructurethatdescribestherectanglestosearchforintheimage.ThisparameterisrequiredandcannotbeNULL.

curveOptions constCurveOptions* Describeshowthefunctionidentifiesthecurvesintheimage.ThisfunctiondoesnotsupportidentifyingcurveswithsubpixelaccuracyandthereforeignoresthesubpixelAccuracyelementofthisparameter.

shapeDetectionOptions constShapeDetectionOptions* Theoptionstousewhendetectingrectangles.

roi constROI* Theregionofinterestappliedtotheimagethatspecifieswhererectanglescanbedetected.Setthis

Page 478: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

parametertoNULLtosearchtheentireimage.

numMatchesReturned int* Onreturn,thenumberofrectanglesthatthefunctionmatched.SetthisparametertoNULLifyoudonotwishtoreturninformationaboutthenumberofmatchedrectangles.

Page 479: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

RectangleMatch* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().

Page 480: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussioncurveOptions—SetcurveOptionstoNULLtousethedefaultcurveoptions,asfollows:

extractionMode IMAQ_NORMAL_IMAGEthreshold 75filterSize IMAQ_NORMALminLength 25rowStepSize 15columnStepSize 15maxEndPointGap 10onlyClosed FALSEsubpixelAccuracy FALSE

shapeDetectionOptions—SetshapeDetectionOptionstoNULLtousethedefaultshapedetectionoptions,asfollows:

mode IMAQ_GEOMETRIC_MATCH_SHIFT_INVARIANTorientationRanges NULLnumOrientationRanges 0scaleRange {75,125}minMatchScore 800

Page 481: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqDetectRotationUsageintimaqDetectRotation(constImage*referenceImage,constImage*testImage,PointFloatreferenceCenter,PointFloattestCenter,intradius,floatprecision,double*angle);

Page 482: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeDetectstherotationalshiftbetweentwoimages,usuallyareferenceimagecontainingapartataknownorientationandanotherimagecontainingthepartinanunknownposition.Thisfunctionextractspixelvaluesaroundacircularregioninthereferenceimageandcomparesthesevaluestothesameregioninthetestimage.Thealgorithmlooksfortherotationalshiftbetweenthosetwosamples.

Page 483: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 484: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

referenceImage constImage* Thereferenceimage.testImage constImage* Thetestimage.referenceCenter PointFloat Thecenterpointofthecircularregionin

thereferenceimage.testCenter PointFloat Thecenterpointofthecircularregionin

thetestimage.radius int Theradiusofthecirclesusedtodetect

rotation.precision float Thesamplingperiod,indegrees,ofthe

pixelvaluesthatthefunctionextractsfromthecircularregion.

angle double* Onreturn,theangle,indegrees,betweenthetwoimages.ThisparameterisrequiredandcannotbeNULL.

Page 485: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 486: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionprecision—Thesamplingperioddirectlyaffectsthespeedofthefunction.Ifthesamplingperiodishigh(meaningthatthenumberofsamplesalongthecircularregionissmall),theprocessingspeedofthefunctionincreasesatthecostofreducedaccuracyinthecomputedrotationalshift.Inmanycases,youdonotneedaprecisionhigherthan5degreestopositiontheregionsofinspectionofapart.Ifthesamplingperiodislessthanorequalto0,thefunctionreturnsanerror.

Page 487: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqDisplayImageUsageintimaqDisplayImage(constImage*image,intwindowNumber,intresize);

Page 488: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeDisplaysanimageinanimagewindow.Thewindowbecomesvisiblewhenyoucallthefunction.Thewindowisassociatedwiththeimageuntilyouclosethewindow,disposeoftheimage,orcallthisfunctionagainwiththesamewindownumber.Callthisfunctiontorefreshthedisplayofthewindow,includingoverlays.UseimaqSetBitDepth()tosetthebitdepthof16-bitmonochromeand64-bitRGBimages.imaqDisplayImageusesthisspecifiedbitdepthtodisplaytheimage.UseimaqSetWindowDisplayMapping()tosetthepixelmappingpolicyfordisplaying16-bitmonochromeimagesofanunspecifiedbitdepth.

Page 489: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 490: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagetodisplayinthewindow.windowNumber int Thewindownumberofthewindowin

whichtodisplaytheimage.Thereare16imagewindows,whichhavewindownumbers0-15.Toobtainawindownumbernotinuse,callimaqGetWindowHandle().

resize int IfyousetthisparametertoTRUE,thefunctionresizesthewindowtothesizeoftheimage.IfyousetthisparametertoFALSE,thewindowsizedoesnotchange.

Page 491: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 492: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqDisposeUsageintimaqDispose(void*object);

Page 493: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCleansupresourcesassociatedwithimages,regionsofinterest(ROIs),arrays,andreportsthatyounolongerneed.Afteryoudisposeofsomething,youcannolongeruseit.

Page 494: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 495: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

object void* Theimage,ROI,array,orreportwhosememoryyouwanttofree.

Page 496: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 497: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqDisposeCircularEdgeReportUsageintimaqDisposeCircularEdgeReport(CircularEdgeReport*report);

Page 498: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCleansupresourcesassociatedwithaCircularEdgeReportstructure.

Page 499: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

report CircularEdgeReport* Thereportwhosememoryyouwanttofree.

Page 500: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 501: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqDisposeObjectReportUsageintimaqDisposeObjectReport(ObjectReport*report);

Page 502: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCleansupresourcesassociatedwithanarrayofObjectReportstructures.

Page 503: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

report ObjectReport* Thearrayofreportswhosememoryyouwanttofree.

Page 504: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 505: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqDisposeStraightEdgeReportUsageintimaqDisposeStraightEdgeReport(StraightEdgeReport*report);

Page 506: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCleansupresourcesassociatedwithaStraightEdgeReportstructure.

Page 507: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

report StraightEdgeReport* Thereportwhosememoryyouwanttofree.

Page 508: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 509: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqDivide2UsageintimaqDivide2(Image*dest,constImage*sourceA,constImage*sourceB,RoundingModeroundingMode);

Page 510: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeDividestwoimages.

Page 511: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB

Page 512: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.sourceA constImage* Thefirstimagetodivide.sourceB constImage* Thesecondimagetodivide.roundingMode RoundingMode Specifiesthetypeofroundingtouse

whendividingimagepixels.

Page 513: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 514: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionTheimagetypeofsourceBdependsontheimagetypeofsourceA,asfollows:

IfsourceAisIMAQ_IMAGE_I16,sourceBmustbeIMAQ_IMAGE_I16orIMAQ_IMAGE_U8.IfsourceAisIMAQ_IMAGE_SGL,sourceBmustbeIMAQ_IMAGE_SGL,IMAQ_IMAGE_I16,orIMAQ_IMAGE_U8.IfsourceAisIMAQ_IMAGE_COMPLEX,sourceBmustbeIMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_SGL,IMAQ_IMAGE_I16,orIMAQ_IMAGE_U8.IfsourceAisIMAQ_IMAGE_RGB,sourceBmustbeIMAQ_IMAGE_RGBorIMAQ_IMAGE_U8.

Otherwise,sourceBmustbethesametypeassourceA.

Page 515: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqDivideConstant2UsageintimaqDivideConstant2(Image*dest,constImage*source,PixelValuevalue,RoundingModeroundingMode);

Page 516: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeDivideseachpixelinanimagebyaconstant.

Page 517: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB

Page 518: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagebywhichthefunctiondivides

ascalarconstant.value PixelValue Thevaluebywhichthefunctiondivides

thesourceimage.Setthememberofvaluethatcorrespondstotheimagetype.

roundingMode RoundingMode Specifiesthetypeofroundingtousewhendividingimagepixels.

Page 519: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 520: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqDrawLineOnImageUsageintimaqDrawLineOnImage(Image*dest,constImage*source,DrawModemode,Pointstart,Pointend,floatnewPixelValue);

Page 521: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeDrawsalineonanimage.

Page 522: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_SGL

Page 523: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.mode DrawMode Themethodthatthefunctionusestodraw

aline.ValidvaluesareIMAQ_DRAW_VALUEorIMAQ_DRAW_INVERT.

start Point Thecoordinatelocationofthestartingpointoftheline.

end Point Thecoordinatelocationoftheendingpointoftheline.

newPixelValue float IfyousetmodetoIMAQ_DRAW_VALUE,newPixelValuesetsthepixelvalueinwhichthefunctiondrawstheline.IfyousetmodetoIMAQ_DRAW_INVERT,thefunctionignoresthisparameter.

Page 524: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 525: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqDrawShapeOnImageUsageintimaqDrawShapeOnImage(Image*dest,constImage*source,Rectrect,DrawModemode,ShapeModeshape,floatnewPixelValue);

Page 526: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeDrawsashapeonanimage.

Page 527: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_SGL

Page 528: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.rect Rect Theboundingrectangleoftheshape.mode DrawMode Themethodthatthefunctionusestodraw

theshape.shape ShapeMode Theshapetodraw.newPixelValue float IfyousetmodetoIMAQ_DRAW_VALUE

orIMAQ_PAINT_VALUE,newPixelValuesetsthepixelvaluethatthefunctionusestodrawashape.

Page 529: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 530: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqDrawTextOnImageUsageintimaqDrawTextOnImage(Image*dest,constImage*source,Pointcoord,constchar*text,constDrawTextOptions*options,int*fontNameUsed);

Page 531: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeDrawstextonanimage.

Page 532: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB

Page 533: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.coord Point Thecoordinatesofthetext

referencepoint.text constchar* Thetextthatthefunction

draws.ThisparameterisrequiredandcannotbeNULL.

options constDrawTextOptions* Themethodthatthefunctionusestodrawtext.

fontNameUsed int* Onreturn,equalsTRUEiftheusersuppliedfontnameinoptionswasused,andFALSEifthedefaultfontnamewasused.

Page 534: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 535: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:

fontName ArialfontSize 12bold FALSEitalic FALSEunderline FALSEstrikeout FALSEtextAlignment IMAQ_LEFTfontColor IMAQ_WHITE

Page 536: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqDuplicateUsageintimaqDuplicate(Image*dest,constImage*source);

Page 537: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCopiesthesourceimagetothedestinationimage,includingthebordersizeandvisioninformation.Tocopyanareaofoneimagetoanareaofanotherimage,useimaqCopyRect().

Page 538: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 539: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Theduplicatedimage.source constImage* Theimagetocopy.

Page 540: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 541: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqEasyAcquireUsageImage*imaqEasyAcquire(constchar*interfaceName);

Page 542: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeConfigurestheimageacquisitiondevicespecifiedbyinterfaceName,acquiresoneimage,andreturnstheacquiredimage.

Page 543: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 544: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

interfaceName constchar* Anull-terminatedstringthatspecifiesthenameoftheinterfacetoopen.Examplesofinterfacesareimg0andimg1.Formoreinformationaboutinterfaces,refertotheNIVisionHardwareHelportheMeasurement&AutomationExplorerhelp.

Page 545: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

Image* Onsuccess,thisfunctionreturnstheacquiredimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeimage,disposeofitbycallingimaqDispose().

Page 546: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqEdgeFilterUsageintimaqEdgeFilter(Image*dest,Image*source,OutlineMethodmethod,constImage*mask);

Page 547: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeAppliesanonlinearfiltertohighlightedges.

Page 548: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 549: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source Image* Theimageofwhichthefunctionhighlights

edges.Theconvolutionmodifiestheborderofthesourceimage.Thebordermustbeatleastonepixelwide.

method OutlineMethod Methodtousewhenoutliningtheedges.mask constImage* Anoptionalmaskimage.Thisimagemustbean

IMAQ_IMAGE_U8image.Thefunctionfiltersonlythosepixelsinthesourceimagewhosecorrespondingpixelsinthemaskarenon-zero.SetthisparametertoNULLtofilterthewholesourceimage.

Page 550: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 551: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 552: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqEdgeTool4UsageEdgeReport2*imaqEdgeTool4(Image*image,ROI*roi,EdgeProcessprocessType,EdgeOptions2*edgeOptions,constunsignedintreverseDirection);

Page 553: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFindsedgesalonganROIinanimage.

Page 554: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 555: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageinwhichtofindtheedges.roi ROI* TheROItofindedgesalong.processType EdgeProcess Theedgeprocesstype.edgeOptions EdgeOptions2* Specifiestheparametersthatare

usedtocomputetheedgeprofileanddetectedges.

reverseDirection constunsignedint

SetthisparametertoTRUEtoreversethedirectionthatroiistraversedtofindedges.

Page 556: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

EdgeReport2* Onsuccess,thisfunctionreturnsastructureofinformationabouttheedgesfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisstructure,disposeofitbycallingimaqDispose().

Page 557: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionedgeOptions—SetedgeOptionstoNULLtousethefollowingdefaultvalues:

polarity IMAQ_SEARCH_FOR_ALL_EDGESkernelSize 3width 3minThreshold 10.0interpolationType IMAQ_BILINEAR_FIXEDcolumnProcessingMode IMAQ_MEDIAN_COLUMNS

Page 558: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqEnumerateCustomKeysUsagechar**imaqEnumerateCustomKeys(constImage*image,unsignedint*size);

Page 559: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFindsallthecustomdatakeysassociatedwithanimage.

Page 560: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 561: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagefromwhichtoenumeratedatakeys.size unsignedint* Thenumberofkeysfoundintheimage.

Page 562: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

char** Thisfunctionreturnsanarraycontaininganumberofstringsequaltothevaluereturnedinthesizeparameter.Eachstringisthekeytoonecustomdataitemavailableintheimage.

Page 563: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqEqualizeUsageintimaqEqualize(Image*dest,constImage*source,floatmin,floatmax,constImage*mask);

Page 564: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCalculatesthehistogramofanimageandredistributespixelvaluesacrossthedesiredrangetomaintainthesamepixelvaluedistribution.Pixelswhosevaluesarethesamebeforetheredistributionalsohavecommonpixelvaluesaftertheredistribution.

Page 565: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 566: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.min float Theminimumvalueoftherangetowhichthe

functionequalizestheimage.max float Themaximumvalueoftherangetowhichthe

functionequalizestheimage.mask constImage* Anoptionalmaskimage.Thisimagemustbean

IMAQ_IMAGE_U8image.Thefunctionequalizesonlythosepixelsinthesourceimagewhosecorrespondingpixelsinthemaskarenon-zero.SetthisparametertoNULLtoequalizethewholeimage.

Page 567: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 568: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqExtractColorPlanesUsageintimaqExtractColorPlanes(constImage*image,ColorModemode,Image*plane1,Image*plane2,Image*plane3);

Page 569: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeExtractstheindividualcolorplanesfromacolorimage.Theplaneyouextractmaybeindependentfromthetypeoftheimage.Forexample,youcanextractthehueplanefroma32-bitRGBimageorthegreenplanefromanHSLimage.

NoteThisfunctiondoesnotsupporttheCIEL*a*b*andCIEXYZcolormodes.ThisfunctiononlysupportstheRGBcolormodefor64-bitRGBimages.

Page 570: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 571: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Thesourceimagethatthefunctionextractstheplanesfrom.

mode ColorMode Thecolorspacethatthefunctionextractstheplanesfrom.

plane1 Image* Onreturn,thefirstextractedplane.SetthisparametertoNULLifyoudonotneedthisinformation.

plane2 Image* Onreturn,thesecondextractedplane.SetthisparametertoNULLifyoudonotneedthisinformation.

plane3 Image* Onreturn,thethirdplane.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 572: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 573: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionplane1—Thedatacontainedinplane1dependsonthemode,asfollows:

Mode PlaneIMAQ_RGB RedIMAQ_HSL HueIMAQ_HSV HueIMAQ_HSI Hue

plane2—Thedatacontainedinplane2dependsonthemode,asfollows:

Mode PlaneIMAQ_RGB GreenIMAQ_HSL SaturationIMAQ_HSV SaturationIMAQ_HSI Saturation

plane3—Thedatacontainedinplane3dependsonthemode,asfollows:

Mode PlaneIMAQ_RGB BlueIMAQ_HSL LuminanceIMAQ_HSV ValueIMAQ_HSI Intensity

Page 574: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqExtractComplexPlaneUsageintimaqExtractComplexPlane(Image*dest,constImage*source,ComplexPlaneplane);

Page 575: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeExtractsaplanefromacompleximageandplacestheplaneintoanotherimage.

Page 576: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_COMPLEX

Page 577: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.ValidimagetypesfordestareIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAGE_IMAGE_SLG,andIMAQ_IMAGE_COMPLEX.

source constImage* Theimagewhoseplanethefunctionextracts.plane ComplexPlane Theplanetoextract.

Page 578: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 579: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqExtractCurvesUsageCurve*imaqExtractCurves(constImage*image,constROI*roi,constCurveOptions*curveOptions,unsignedint*numCurves);

Page 580: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFindscurvesinanimage.

Page 581: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 582: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageinwhichtofindcurves.roi constROI* TheROIthatthefunctionperforms

thisoperationon.PassNULLtousetheentireimageforthisoperation.

curveOptions constCurveOptions* Describeshowthefunctionidentifiesthecurvesintheimage.ThisfunctiondoesnotsupportidentifyingcurveswithsubpixelaccuracyandthereforeignoresthesubpixelAccuracyelementofthisparameter.

numCurves unsignedint* Onreturn,thenumberofcurveslocatedintheimage.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 583: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

Curve* Onsuccess,thisfunctionreturnsapointertoanarrayofreportsthatdescribethecurvesintheimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().

Page 584: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussioncurveOptions—SetcurveOptionstoNULLtousethedefaultcurveoptions,asfollows:

extractionMode IMAQ_NORMAL_IMAGEthreshold 75filterSize IMAQ_NORMALminLength 25rowStepSize 15columnStepSize 15maxEndPointGap 10onlyClosed FALSEsubpixelAccuracy FALSE

shapeDetectionOptions—SetshapeDetectionOptionstoNULLtousethedefaultshapedetectionoptions,asfollows:

mode IMAQ_GEOMETRIC_MATCH_SHIFT_INVARIANTorientationRanges NULLnumOrientationRanges 0scaleRange {75,125}minMatchScore 800

Page 585: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqExtractFromRingUsageImage*imaqExtractFromRing(SESSION_IDsessionID,intimageToExtract,int*imageNumber);

Page 586: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeExtractsanimagefromaliveacquisition.Thisfunctionletsyoulockanimageoutofacontinuousloopforprocessingduringaringacquisition.Tounlocktheimage,callimaqReleaseImage().Theacquisitionpauseswhenthecontinuousloopreachestheimageyoulockedout.

Page 587: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 588: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

sessionID SESSION_ID AvalidsessionID.imageToExtract int Thecumulativebufferindexoftheimage

toextract.IfanotherimagehasoverwrittenimageToExtract,thefunctionreturnsthenextavailableimage.

imageNumber int* Thecumulativebufferindexoftheextractedimage.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 589: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

Image* Onsuccess,thisfunctionreturnsapointertotheextractedimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().BecausethereturnvalueisapointertoanimagethatyouprovidedtoimaqSetupRing(),youshouldnotdisposeoftheimageuntiltheacquisitionisfinished.

Page 590: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFFTUsageintimaqFFT(Image*dest,constImage*source);

Page 591: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputestheFouriertransformofanimage.Theimagecanbeanysize,butthefunctionworksfasteriftheimagedimensionsarepowersof2.Thedestinationimagemustbedifferentthanthesourceimagetoperformthisoperation.

Page 592: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX

Page 593: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.Thedestinationimagemustbeacompleximageandmustbedifferentthansourceimage.

source constImage* TheimagewhoseFouriertransformthefunctioncomputes.

Page 594: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 595: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFillBorderUsageintimaqFillBorder(Image*image,BorderMethodmethod);

Page 596: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeModifiestheborderofanimage.

Page 597: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAQ_RGB_U64

Page 598: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagewhoseborderthefunctionmodifies.method BorderMethod Themethodbywhichthefunctionmodifiesthe

border.

Page 599: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 600: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFillHolesUsageintimaqFillHoles(Image*dest,constImage*source,intconnectivity8);

Page 601: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFillsholesinparticles.Thefunctionfillstheholeswithapixelvalueof1.Thefunctiondoesnotfillareastouchingtheedgeoftheimagethatappeartobeholesbecausetheseareascouldbeeitherholesorareasofconcavity.

Page 602: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 603: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagecontainingparticleswithholes.connectivity8 int SetthisparametertoTRUEtouse

connectivity-8todeterminewhetherparticlesaretouching.SetthisparametertoFALSEtouseconnectivity-4todeterminewhetherparticlesaretouching.Formoreinformationaboutconnectivity,seeChapter9,BinaryMorphology,intheNIVisionConceptsManual.

Page 604: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 605: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFillImageUsageintimaqFillImage(Image*image,PixelValuevalue,constImage*mask);

Page 606: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetseachpixelinanimagetoaspecifiedvalue.

Page 607: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 608: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagewhosepixelvaluesthefunctionoverwriteswiththegivenvalue.

value PixelValue Thevaluewithwhichthefunctionfillstheimagepixels.

mask constImage* Amaskimage.ThisimagemustbeanIMAQ_IMAGE_U8image.Thefunctionsetsonlythosesourcepixelswhosecorrespondingmaskpixelsarenon-zerotothespecifiedvalue.SetthisparametertoNULLifyouwantthefunctiontoseteverypixelinthesourceimagetothespecifiedvalue.

Page 609: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 610: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFindCirclesUsageCircleReport*imaqFindCircles(Image*dest,Image*source,floatminRadius,floatmaxRadius,int*numCircles);

Page 611: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSeparatesoverlappingcircularobjectsandclassifiesthemdependingontheirradii.Thisfunctionalsodrawsthedetectedcirclesintothedestinationimage.

Page 612: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 613: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Onreturn,animagecontainingcirclesthatthefunctionlocated.

source Image* Theimageinwhichthefunctionfindscircles.minRadius float Thesmallestradius(inpixels)tobedetected.

Circleswithradiismallerthanthisvaluedonotappearinthedestinationimageorthereturnedreportarray.

maxRadius float Thelargestradius(inpixels)tobedetected.Circleswithradiilargerthanthisvaluedonotappearinthedestinationimageorthereturnedreportarray.

numCircles int* Onreturn,thenumberofcirclesthatthefunctiondetectedintheimage.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 614: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

CircleReport* Onsuccess,thisfunctionreturnsanarrayofstructurescontaininginformationabouteachofthefoundcircles.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththearray,disposeofitbycallingimaqDispose().

Page 615: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 616: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFindCircularEdgeUsageCircularEdgeReport*imaqFindCircularEdge(Image*image,AnnulussearchArea,SpokeDirectiondirection,constFindEdgeOptions*options,constCoordinateTransform2*transform);

Page 617: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeLocatesacircularedgeinanannularsearcharea.Thisfunctionlocatestheintersectionpointsbetweenasetofsearchlinesdefinedbyaspokeandtheedgeofanobject.Thefunctiondeterminestheintersectionpointsbasedontheircontrastandslopeandcalculatesabest-fitcirclebasedonthesepoints.

Page 618: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 619: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagewhichthefunctionusestocomputethelocationoftheedge.

searchArea Annulus Thecoordinatelocationoftheannularsearchareathefunctionlooksinfortheedge.

direction SpokeDirection Thedirectionthefunctionsearchforedgesalongthesearchlines.

options constFindEdgeOptions* Describeshowtosearchfortheedgeandtheinformationthefunctionoverlaystotheimage.

transform constCoordinateTransform2* AnoptionalspecificationofthecoordinatetransformforsearchArea.Thisparameterspecifieshowtotransformthelocationoftheedgedetectionbasedonthedifferencebetweenthereferencecoordinatesystemandthemeasurementcoordinatesystem.SetthisparametertoNULLifyoudonotneedtotransformsearchArea.

Page 620: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

CircularEdgeReport* Onsuccess,thisfunctionreturnsinformationdescribingthecalculatededge.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDisposeCircularEdgeReport().

Page 621: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:

threshold 40width 4steepness 2subsamplingRatio 5showSearchArea FALSEshowSearchLines FALSEshowEdgesFound FALSEshowResult TRUE

Page 622: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFindConcentricEdgeUsageStraightEdgeReport*imaqFindConcentricEdge(Image*image,AnnulussearchArea,ConcentricRakeDirectiondirection,constFindEdgeOptions*options,constCoordinateTransform2*transform);

Page 623: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeLocatesastraightedgeinaannularsearcharea.Thisfunctionlocatestheintersectionpointsbetweenasetofconcentricsearchlinesandtheedgeofanobject.Thefunctiondeterminestheintersectionpointsbasedontheircontrastandslopeandcalculatesabest-fitlinebasedonthesepoints.

Page 624: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 625: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagewhichthefunctionusestocomputethelocationoftheedge.

searchArea Annulus Thecoordinatelocationoftheannularsearchareathefunctionlooksinfortheedge.

direction ConcentricRakeDirection Thedirectionthefunctionsearchforedgesalongthesearchlines.

options constFindEdgeOptions* Describeshowtosearchfortheedgeandtheinformationthefunctionoverlaystotheimage.

transform constCoordinateTransform2* AnoptionalspecificationofthecoordinatetransformforsearchArea.Thisparameterspecifieshowtotransformthelocationoftheedgedetectionbasedonthedifferencebetweenthereferencecoordinatesystemandthemeasurementcoordinatesystem.SetthisparametertoNULLifyoudonotneedtotransformsearchArea.

Page 626: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

StraightEdgeReport* Onsuccess,thisfunctionreturnsinformationdescribingthecalculatededge.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDisposeStraightEdgeReport().

Page 627: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:

threshold 40width 4steepness 2subsamplingRatio 5showSearchArea FALSEshowSearchLines FALSEshowEdgesFound FALSEshowResult TRUE

Page 628: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFindEdge2UsageFindEdgeReport*imaqFindEdge2(Image*image,constROI*roi,constCoordinateSystem*baseSystem,constCoordinateSystem*newSystem,constFindEdgeOptions2*findEdgeOptions,constStraightEdgeOptions*straightEdgeOptions);

Page 629: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeDetectsstraightedgesinsideanROI,andoptionallyoverlaystheinformationusedtosearchfortheedges.

Page 630: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 631: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageinwhichtofindedges.

roi constROI* Therectangularregionthefunctionlooksinfortheedges.Thefirstcontourofroimustbearectangleorarotatedrectangle.

baseSystem constCoordinateSystem* Describesthebasecoordinatesystem.

newSystem constCoordinateSystem* Describesthenewcoordinatesystem.

findEdgeOptions constFindEdgeOptions2* Describeshowyouwantthefunctiontosearchforedgesandtheinformationthefunctionoverlaystotheimage.

straightEdgeOptions constStraightEdgeOptions* Specifiestheoptionsusedtofitalineintheroi.

Page 632: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

FindEdgeReport* Onsuccess,thisfunctionreturnsinformationdescribingthecalculatededges.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDispose().

Page 633: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionfindEdgeOptions—SetfindEdgeOptionstoNULLtousethedefaultoptions,asfollows:

direction IMAQ_LEFT_TO_RIGHTshowSearchArea FALSEshowSearchLines FALSEshowEdgesFound FALSEshowResult TRUEsearchAreaColor IMAQ_RGB_GREENsearchLinesColor IMAQ_RGB_BLUEsearchEdgesColor IMAQ_RGB_YELLOWresultColor IMAQ_RGB_REDoverlayGroupName ""(defaultgroup)edgeOptions.polarity IMAQ_SEARCH_FOR_ALL_EDGESedgeOptions.kernelSize 3edgeOptions.numSearchLines 3edgeOptions.minThreshold 10.0edgeOptions.interpolationType IMAQ_BILINEAR_FIXEDedgeOptions.columnProcessingMode IMAQ_MEDIAN_COLUMNS

straightEdgeOptions—SetstraightEdgeOptionstoNULLtousethefollowingdefaultvalues:

numLines 1searchMode IMAQ_USE_BEST_PROJECTION_EDGEminScore 10.0maxSize 1000.0orientation 0.0angleRange 10.0angleTolerance 1.0

Page 634: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

stepSize 3minSignalToNoiseRatio 0.0minCoverage 25.0houghIterations 5

Page 635: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFindLCDSegmentsUsageintimaqFindLCDSegments(ROI*roi,constImage*image,constLCDOptions*options);

Page 636: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeTakesaregionofinterest(ROI)withasinglerectangularcontouraroundanentireseven-segmentLCDandupdatestheROItocontainseveralrectangularcontours,eacharoundasingleLCDdigit.YoucanthenprocessthismodifiedROIwiththeimaqReadLCD()function.

NoteAllsegmentsoftheLCDmustbeonforthisfunctiontoproperlyfindthedigits.

Page 637: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 638: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi ROI* Theregionofinteresttotransform.Whennecessary,thefunctionconvertsarectangularcontourcontainedinroitoarotatedrectanglecontour.

image constImage* TheimagecontainingtheLCD.AllsegmentsoftheLCDmustbelit.

options constLCDOptions* Controlshowthefunctionperformsthesearch.

Page 639: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 640: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:

litSegments FALSEthreshold 8sign FALSEdecimalPoint FALSE

Page 641: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFindPatternUsagePatternMatch*imaqFindPattern(Image*image,Image*pattern,RotatedRectsearchRect,constFindPatternOptions*options,constCoordinateTransform2*transform,int*numMatches);

Page 642: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSearchesforatemplateimageinarectangularsearchareaoftheimage.

Page 643: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 644: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageinwhichthefunctionfindsmatchestothetemplateimage.

pattern Image* Thetemplateimagewhichthefunctionattemptstolocate.AttachpatternmatchinginformationtothisimageusingimaqLearnPattern().Ifyouhavenotattachedpatternmatchinginformationtotheimage,thefunctionlearnsthepatternandappendsthepatternmatchinginformationtotheimage.Ifyouattachpatternmatchinginformationtotheimagethatdoesnotcontaintheinformationspecifiedbythemodeelementoftheoptionsparameter,thefunctiongeneratesanerror.

searchRect RotatedRect Thecoordinatelocationoftherectangularsearchareathefunctionlooksinforthepattern.ThefunctionsearchestheboundingrectangleofsearchRect.Tosearchtheentireimage,setthisparametertoIMAQ_NO_ROTATED_RECT.

options constFindPatternOptions* Describeshowyouwantthefunctiontosearchforthe

Page 645: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

templateimageandtheinformationthefunctionoverlaystotheimage.Tousedefaultoptions,setthisparametertoNULL.

transform constCoordinateTransform2* AnoptionalspecificationofthecoordinatetransformforsearchRect.Thisparameterspecifieshowtotransformthelocationofthepatternsearchbasedonthedifferencebetweenthereferencecoordinatesystemandthemeasurementcoordinatesystem.SetthisparametertoNULLifyoudonotneedtotransformsearchRect.

numMatches int* Onreturn,thenumberofmatchestothetemplateimagethatthefunctionfound.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 646: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

PatternMatch* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDispose().

Page 647: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:

mode IMAQ_MATCH_SHIFT_INVARIANTnumMatchesRequested 1minMatchScore 800subpixelAccuracy FALSEangleRanges NULLnumRanges 0showSearchArea FALSEshowResult TRUE

Page 648: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFindTransformPatternUsageintimaqFindTransformPattern(Image*image,Image*pattern,CoordinateTransform2*transform,RotatedRectsearchRect,FindTransformModemode,constFindTransformPatternOptions*options,AxisReport*report);

Page 649: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputesacoordinatetransformbasedonthepositionofatemplateimageinasearchareaofanimage.Thefunctionusesthelocationandorientationofthecoordinatesystemitfindstocreatethereferencesystemofacoordinatetransformortoupdatethemeasurementsystemofanexistingcoordinatetransform.

Page 650: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 651: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagewhichthefunctionusestocomputethecoordinatetransform.

pattern Image* Thetemplateimagewhichthefunctionattemptstolocate.AttachpatternmatchinginformationtothisimageusingimaqLearnPattern().Ifyouhavenotattachedpatternmatchinginformationtotheimage,thefunctionlearnsthepatternandappendsthepatternmatchinginformationtotheimage.IfyouattachpatternmatchinginformationtotheimagethatdoesnotcontaintheinformationspecifiedbythematchModeelementoftheoptionsparameter,thefunctiongeneratesanerror.

transform CoordinateTransform2* Thecoordinatetransformthefunctionupdatesbasedonthelocationandpositionofthepattern.ThisparameterisrequiredandcannotbeNULL.

searchRect RotatedRect Thecoordinatelocationoftherectangularsearchareathefunctionlooksinforthepattern.Thefunctionsearchesthebounding

Page 652: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

rectangleofsearchRect.Tosearchtheentireimage,setthisparametertoIMAQ_NO_ROTATED_RECT.

mode FindTransformMode Specifieshowthefunctionupdatesthecoordinatetransform.

options constFindTransformPatternOptions* Definestheparametersofthealgorithmthefunctionusestolocatethepatternandtheinformationthefunctionoverlaystotheimage.

report AxisReport* Onreturn,areportdescribingthelocationofthepatterncorrespondingtothemainaxisandthesecondaryaxis.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 653: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 654: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:

matchMode IMAQ_MATCH_SHIFT_INVARIANTminMatchScore 500subpixelAccuracy FALSEangleRanges NULL(allanglesallowed)numRanges 0showSearchArea FALSEshowFeatureFound FALSEshowResult TRUE

Page 655: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFindTransformRect2UsageintimaqFindTransformRect2(Image*image,constROI*roi,FindTransformModemode,CoordinateSystem*baseSystem,CoordinateSystem*newSystem,constFindTransformRectOptions2*findTransformOptions,constStraightEdgeOptions*straightEdgeOptions,AxisReport*axisReport);

Page 656: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputesacoordinatetransformbasedonthepositionofanobjectinasearchareaofanimage.Thefunctionusesthelocationandorientationofthecoordinatesystemitfindstocreatethereferencesystemofacoordinatetransformortoupdatethemeasurementsystemofanexistingcoordinatetransform.imaqFindTransformRect2()usesthefollowingalgorithm.Firstthefunctiondeterminesthepositionofthemainaxisofthecoordinatesystem.Itlocatestheintersectionpointsbetweenasetofparallelsearchlines,orrake,andtheedgeofanobject.Thefunctiondeterminestheintersectionpointsbasedontheircontrast,width,andsteepness.Thefunctioncalculatesabest-fitlineusingthepointsfound.Thislinedefinesthemainaxisofthecoordinatesystem.Thefunctionthenlocatestheintersectionpointsbetweenasetofparallelsearchlinesthatareperpendiculartothemainaxisandtheedgeoftheobject.Itcalculatesahit-linetotheobjectfromtheedgeclosesttothesearchareadetectedandperpendiculartothemainaxis.Thislinedefinesthesecondaryaxisofthecoordinatesystem.Theintersectionbetweenthemainaxisandsecondaryaxisistheoriginofthecoordinatesystem.

Page 657: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 658: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagewhichthefunctionusestocomputethecoordinatetransform.

roi constROI* Definestheareawithinwhichtheedgedetectionisperformed.

mode FindTransformMode Specifieshowthefunctionupdatesthecoordinatetransform.

baseSystem CoordinateSystem* Describesthebasecoordinatesystem.ThisparameterisrequiredandcannotbeNULL.

newSystem CoordinateSystem* Describesthenewcoordinatesystem.Thisparameterisrequiredandcannotbe

Page 659: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

NULL.findTransformOptions constFindTransformRectOptions2* Specifies

optionsfordetectingedgesalongsearchlinesineachROIandforoverlayingsearchinformation

straightEdgeOptions constStraightEdgeOptions* Specifiestheoptionsusedtofitalineintheroi.

axisReport AxisReport* Onreturn,containstheaxesthatwerelocated.SetthisparametertoNULLifyoudonotwanttoreturntheaxisinformation.

Page 660: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 661: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionfindCoordSysOptions—SetfindCoordSysOptionstoNULLtousethedefaultoptions,asfollows:

direction IMAQ_LEFT_TO_RIGHT_DIRECTshowSearchArea FALSEshowSearchLines FALSEshowEdgesFound FALSEshowResult TRUEsearchAreaColor IMAQ_RGB_GREENsearchLinesColor IMAQ_RGB_BLUEsearchEdgesColor IMAQ_RGB_YELLOWresultColor IMAQ_RGB_REDoverlayGroupName ""(defaultgroup)edgeOptions.polarity IMAQ_SEARCH_FOR_ALL_EDGESedgeOptions.kernelSize 3edgeOptions.numSearchLines 3edgeOptions.minThreshold 10.0edgeOptions.interpolationType IMAQ_BILINEAR_FIXEDedgeOptions.columnProcessingMode IMAQ_MEDIAN_COLUMNS

Page 662: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFindTransformRects2UsageintimaqFindTransformRects2(Image*image,constROI*primaryROI,constROI*secondaryROI,FindTransformModemode,CoordinateSystem*baseSystem,CoordinateSystem*newSystem,constFindTransformRectsOptions2*findTransformOptions,constStraightEdgeOptions*primaryStraightEdgeOptions,constStraightEdgeOptions*secondaryStraightEdgeOptions,AxisReport*axisReport);

Page 663: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputesacoordinatetransformbasedonthepositionofanobjectinasearchareaofanimage.Thefunctionusesthelocationandorientationofthecoordinatesystemitfindstocreatethereferencesystemofacoordinatetransformortoupdatethemeasurementsystemofanexistingcoordinatetransform.imaqFindTransformRects2()usesthefollowingalgorithm.Firstthefunctiondeterminesthepositionofthemainaxisofthecoordinatesystem.Itlocatestheintersectionpointsbetweenasetofparallelsearchlinesintheprimaryrectangleandtheedgeofanobject.Thefunctiondeterminestheintersectionpointsbasedontheircontrast,width,andsteepness.Thefunctioncalculatesabest-fitlinethroughthepointsfound.Thislinedefinesthemainaxisofthecoordinatesystem.Theprocessisrepeatedperpendicularlyinthesecondaryrectangleinordertolocatethesecondaryaxis.Theintersectionbetweenthemainaxisandthesecondaryaxisistheoriginofthecoordinatesystem.

Page 664: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 665: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagewhichthefunctionusestocomputethecoordinatetransform.

primaryROI constROI* Definestheareawithinwhichtheedgedetectionisperformedfortheprimaryaxis.

secondaryROI constROI* Definestheareawithinwhichtheedgedetectionisperformedforthesecondaryaxis.

mode FindTransformMode Specifieshowthefunctionupdatesthecoordinatetransform.

baseSystem CoordinateSystem* Describesthebasecoordinatesystem.ThisparameterisrequiredandcannotbeNULL.

Page 666: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

newSystem CoordinateSystem* Describesthenewcoordinatesystem.ThisparameterisrequiredandcannotbeNULL.

findTransformOptions constFindTransformRectsOptions2* Definestheparametersofthealgorithmthefunctionusestolocatetheobjectandtheinformationthefunctionoverlaystotheimage.

primaryStraightEdgeOptions constStraightEdgeOptions* SpecifiestheoptionsusedtofitalineintheprimaryROI

secondaryStraightEdgeOptions constStraightEdgeOptions* SpecifiestheoptionsusedtofitalineinthesecondaryROI

axisReport AxisReport* Onreturn,containstheaxesthatwerelocated.SetthisparametertoNULLifyoudonotwanttoreturntheaxisinformation.

Page 667: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 668: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionfindCoordSysOptions—SetfindCoordSysOptionstoNULLtousethedefaultoptions,asfollows:

direction IMAQ_LEFT_TO_RIGHT_DIRECTshowSearchArea FALSEshowSearchLines FALSEshowEdgesFound FALSEshowResult TRUEsearchAreaColor IMAQ_RGB_GREENsearchLinesColor IMAQ_RGB_BLUEsearchEdgesColor IMAQ_RGB_YELLOWresultColor IMAQ_RGB_REDoverlayGroupName ""(defaultgroup)primaryEdgeOptions.polarity IMAQ_SEARCH_FOR_ALL_EDGESprimaryEdgeOptions.kernelSize 3primaryEdgeOptions.numSearchLines 3primaryEdgeOptions.minThreshold 10.0primaryEdgeOptions.interpolationType IMAQ_BILINEAR_FIXEDprimaryEdgeOptions.columnProcessingMode IMAQ_MEDIAN_COLUMNSsecondaryEdgeOptions.polarity IMAQ_SEARCH_FOR_ALL_EDGESsecondaryEdgeOptions.kernelSize 3secondaryEdgeOptions.numSearchLines 3secondaryEdgeOptions.minThreshold 10.0secondaryEdgeOptions.interpolationType IMAQ_BILINEAR_FIXEDsecondaryEdgeOptions.columnProcessingMode IMAQ_MEDIAN_COLUMNS

Page 669: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFitCircle2UsageBestCircle2*imaqFitCircle2(constPointFloat*points,intnumPoints,constFitCircleOptions*options);

Page 670: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFindsthecirclethatbestrepresentsthesetofpoints.

Page 671: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

points constPointFloat* Thearrayofpointstofittotheedgeofthecircle.

numPoints int Thenumberofpointsinthesuppliedarray.Youmustsupplyatleastthreepoints.

options constFitCircleOptions* Describeshowthefunctioncalculatesthebestfitcircle.

Page 672: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

BestCircle2* Onsuccess,thisfunctionreturnsastructuredescribingthecirclethatbestfitthepoints.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththestructure,disposeofitbycallingimaqDispose().

Page 673: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFitEllipse2UsageBestEllipse2*imaqFitEllipse2(constPointFloat*points,intnumPoints,constFitEllipseOptions*options);

Page 674: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFindstheellipsethatbestrepresentsthesetofpoints.

Page 675: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

points constPointFloat* Thearrayofpointstofittotheedgeoftheellipse.

numPoints int Thenumberofpointsinthesuppliedarray.IftherejectOutlierselementoftheoptionsinputisTRUE,youmustsupplyatleastfivepoints.Otherwise,youmustsupplyatleastsixpoints.

options constFitEllipseOptions* Describeshowthefunctioncalculatesthebestfitellipse.

Page 676: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

BestEllipse2* Onsuccess,thisfunctionreturnsastructuredescribingtheellipsethatbestfitthepoints.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththestructure,disposeofitbycallingimaqDispose().

Page 677: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFitLineUsageBestLine*imaqFitLine(constPointFloat*points,intnumPoints,constFitLineOptions*options);

Page 678: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFindsthelinethatbestrepresentsasetofpoints.

Page 679: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

points constPointFloat* Thearrayofpointstofittotheline.Theresultinglinemaytakeintoaccountonlyasubsetoftheinputpoints.

numPoints int Thenumberofpointsinthesuppliedarray.Youmustsupplyatleasttwopoints.

options constFitLineOptions* Describeshowthefunctioncalculatesthebestfitline.

Page 680: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

BestLine* Onsuccess,thisfunctionreturnsastructuredescribingthelinethatbestfitsthepoints.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththestructure,disposeofitbycallingimaqDispose().

Page 681: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:

minScore 900pixelRadius 3numRefinements 0

Page 682: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFlattenUsagevoid*imaqFlatten(constImage*image,FlattenTypetype,CompressionTypecompression,intquality,unsignedint*size);

Page 683: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsadatarepresentationofanimage.ThisrepresentationcanbeconvertedbacktoanimagewithimaqUnflatten().

Page 684: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 685: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagetoflatten.type FlattenType Whatpartsoftheimagetoflatten.compression CompressionType Whattypeofcompressiontouseonthe

pixeldataoftheimage.quality int Ifcompressionisbeingused,the

qualityofthecompression,between0-1000.

NoteThequalityparameterisonlyusedifthecompressionisIMAQ_COMPRESSION_JPEG.

size unsignedint* Onreturn,thesizeofthedata,inbytes.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 686: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

void* Onsuccess,thisfunctionreturnsadatarepresentationoftheimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().

Page 687: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFlipUsageintimaqFlip(Image*dest,constImage*source,FlipAxisaxis);

Page 688: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFlipsanimageoveranaxis.

Page 689: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 690: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagethatthefunctionflipsoveranaxis.axis FlipAxis Theaxistofliptheimageover.

Page 691: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 692: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFlipFrequenciesUsageintimaqFlipFrequencies(Image*dest,constImage*source);

Page 693: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeTransposesthehighandlowfrequenciesofacompleximage.

Page 694: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_COMPLEX

Page 695: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thecompleximagewhosefrequenciesthe

functionflips.

Page 696: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 697: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetAngleUsageintimaqGetAngle(PointFloatstart1,PointFloatend1,PointFloatstart2,PointFloatend2,float*angle);

Page 698: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnstheangle,indegrees,betweentwolines.Thereturnedanglerepresentstherotationaroundstart1requiredsothatthelinefromstart1toend1isparallelwiththelinefromstart2toend2.Thefollowingfigureillustrateshowthefunctioncalculatestheanglebetweentwolines.

Page 699: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

start1 PointFloat Thestartpointofthefirstline.end1 PointFloat Theendpointofthefirstline.start2 PointFloat Thestartpointofthesecondline.end2 PointFloat Theendpointofthesecondline.angle float* Onreturn,theangle,indegrees,betweenthelines.

ThisparameterisrequiredandcannotbeNULL.

Page 700: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 701: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetAVIInfoUsageintimaqGetAVIInfo(AVISessionsession,AVIInfo*info);

Page 702: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeThisfunctiongetsinformationaboutanAVIfilethathasbeenopened.

Page 703: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

session AVISession Thesessiontouse.info AVIInfo* Onreturn,theinformationabouttheAVIfile.

Page 704: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 705: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetBisectingLineUsageintimaqGetBisectingLine(PointFloatstart1,PointFloatend1,PointFloatstart2,PointFloatend2,PointFloat*bisectStart,PointFloat*bisectEnd);

Page 706: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputesalinethatbisectstwolines.

Page 707: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

start1 PointFloat Thestartpointofthefirstline.end1 PointFloat Theendpointofthefirstline.start2 PointFloat Thestartpointofthesecondline.end2 PointFloat Theendpointofthesecondline.bisectStart PointFloat* Onreturn,filledwiththecoordinatelocationof

thestartofthebisectingline.ThisparameterisrequiredandcannotbeNULL.

bisectEnd PointFloat* Onreturn,filledwiththecoordinatelocationoftheendofthebisectingline.ThisparameterisrequiredandcannotbeNULL.

Page 708: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 709: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetBitDepthUsageintimaqGetBitDepth(constImage*image,unsignedint*bitDepth);

Page 710: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsthebitdepthoftheimage.ThebitdepthofanimagedetermineshowNIVisiondisplays,saves,andconvertsimageswithmorethan8bitsperchannel.

Page 711: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB_U64

Page 712: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagethefunctionqueriesthebitdepthfor.bitDepth unsigned

int*Onreturn,thebitdepthoftheimage.Abitdepthof0indicatesthatNIVisionisusingtheentirerangeoftheimagedatatype.ThisparameterisrequiredandcannotbeNULL.

Page 713: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 714: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetBorderSizeUsageintimaqGetBorderSize(constImage*image,int*borderSize);

Page 715: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsthebordersizeofthegivenimage.

Page 716: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 717: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagewhosebordersizethefunctionqueries.

borderSize int* Onreturn,thebordersizeoftheimage.ThisparameterisrequiredandcannotbeNULL.

Page 718: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 719: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetBytesPerPixelUsageintimaqGetBytesPerPixel(constImage*image,int*byteCount);

Page 720: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsthenumberofbytesthatasinglepixeloccupiesinthegivenimage.

Page 721: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 722: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagewhosebytesperpixelthefunctionqueries.

byteCount int* Onreturn,thenumberofbytesperpixel.ThisparameterisrequiredandcannotbeNULL.

Page 723: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 724: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetCalibrationInfo2UsageCalibrationInfo*imaqGetCalibrationInfo2(constImage*image);

Page 725: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnscalibrationinformationassociatedwithanimage.

Page 726: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 727: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagethefunctionreturnscalibrationinformationfor.

Page 728: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

CalibrationInfo* Onsuccess,thisfunctionreturnsinformationdescribingthecalibrationoftheimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDispose().

Page 729: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetCharCountUsageintimaqGetCharCount(constCharSet*set);

Page 730: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsthenumberoftrainedcharactersinacharacterset.

Page 731: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

set constCharSet* Thecharactersetthisfunctionoperateson.Tocreateacharacterset,useimaqCreateCharSet().ThisparameterisrequiredandcannotbeNULL.

Page 732: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsthenumberoftrainedcharactersinthecharacterset.Onfailure,thisfunctionreturns—1.Togetextendederrorinformation,callimaqGetLastError().

Page 733: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetCharInfo2UsageCharInfo2*imaqGetCharInfo2(constCharSet*set,intindex);

Page 734: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsinformationaboutaparticulartrainedcharacter.Thestructurethatthefunctionreturnscontainsacopyofthedatafromthecharacterset.Modificationstotheinformationinthestructuredonotaffectthecharacterset.

Page 735: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

set constCharSet* Thecharactersetthisfunctionoperateson.Tocreateacharacterset,useimaqCreateCharSet().ThisparameterisrequiredandcannotbeNULL.

index int Theindexofatrainedcharacterinthecharactersetfromwhichthefunctiongetsinformation.

Page 736: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

CharInfo2* Onsuccess,thisfunctionreturnsareportthatcontainsinformationaboutthecharacter.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyoufinishwiththecharacterinformation,callimaqDispose()todisposeofit.

Page 737: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetClassifierAccuracyUsageClassifierAccuracyReport*imaqGetClassifierAccuracy(constClassifierSession*session);

Page 738: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsareportontheaccuracyofatrainedclassifier.

Page 739: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

session constClassifierSession* Theclassifiersessionofwhichtogettheaccuracy.

Page 740: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ClassifierAccuracyReport* Onsuccess,thisfunctionreturnsareportontheaccuracyoftheclassifier.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeoftheinformationbycallingimaqDispose().

Page 741: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetClassifierSampleInfoUsageClassifierSampleInfo*imaqGetClassifierSampleInfo(constClassifierSession*session,intindex,int*numSamples);

Page 742: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeGetsampleinformationfromaclassifiersession.

Page 743: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

session constClassifierSession* Theclassifiersessiontouse.index int Theindexofthesampletoget

informationabout.Useavalueof–1togetonlythenumberofsamplesintheclassifiersession.

numSamples int* Onreturn,thetotalnumberofsamplesintheclassifiersession.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 744: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ClassifierSampleInfo* Onsuccess,thisfunctionreturnsinformationaboutthespecifiedsample.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeoftheinformationbycallingimaqDispose().

Page 745: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetContourUsageContourIDimaqGetContour(constROI*roi,unsignedintindex);

Page 746: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnstheContourIDofthecontouratthespecifiedindexlocationwithinaregionofinterest(ROI).

Page 747: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi constROI* TheROIcontainingthedesiredcontour.index unsignedint Thezero-offsetindexofthecontourtoget.

Page 748: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ContourID Onsuccess,thisfunctionreturnstheContourIDoftherequestedcontour.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 749: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetContourColorUsageintimaqGetContourColor(constROI*roi,ContourIDid,RGBValue*contourColor);

Page 750: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsthecolorofacontour.

Page 751: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi constROI* Theregionofinterest(ROI)containingthecontourfromwhichthefunctiongetscolorinformation.

id ContourID TheContourIDofthecontourfromwhichthefunctiongetscolorinformation.

contourColor RGBValue* Onreturn,thecolorofthecontour.

Page 752: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 753: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetContourCountUsageintimaqGetContourCount(constROI*roi);

Page 754: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsthenumberofcontoursinaregionofinterest(ROI).

Page 755: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi constROI* TheROIfromwhichthefunctiongetsthecontourcount.

Page 756: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsthenumberofcontoursintheROI.Onfailure,thisfunctionreturns–1.Togetextendederrorinformation,callimaqGetLastError().

Page 757: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetContourInfo2UsageContourInfo2*imaqGetContourInfo2(constROI*roi,ContourIDid);

Page 758: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsinformationaboutaparticularcontour.Thestructurethatthefunctionreturnscontainsacopyofthedatafromthecontour.Modificationstotheinformationinthestructuredonotaffectthecontour.

Page 759: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi constROI* Theregionofinterest(ROI)containingthecontourfromwhichthefunctiongetstheinformation.

id ContourID TheContourIDofthecontouraboutwhichthefunctiongetsinformation.

Page 760: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ContourInfo2* Onsuccess,thisfunctionreturnsapointertothestructurecontaininginformationabouttherequestedcontour.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisstructure,disposeofthepointerbycallingimaqDispose().

Page 761: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetCurrentToolUsageintimaqGetCurrentTool(Tool*currentTool);

Page 762: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsthecurrentlyselectedtoolfromthetoolwindow.

Page 763: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

currentTool Tool* Onreturn,containsthecurrentlyselectedtool.ThisparameterisrequiredandcannotbeNULL.

Page 764: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 765: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetDistanceUsageintimaqGetDistance(PointFloatpoint1,PointFloatpoint2,float*distance);

Page 766: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputesthedistancebetweentwopoints.

Page 767: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

point1 PointFloat Thecoordinatelocationofthefirstpoint.point2 PointFloat Thecoordinatelocationofthesecondpoint.distance float* Onreturn,thedistancebetweenthetwopoints.

ThisparameterisrequiredandcannotbeNULL.

Page 768: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 769: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetErrorTextUsagechar*imaqGetErrorText(interrorCode);

Page 770: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnstheerrortextcorrespondingtoanerrorcode.Theerrortextisadescriptionofwhattheerrorcodesignifies.

Page 771: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

errorCode int Theerrorcodewhoseerrortextthefunctionreturns.YoucanobtainthiserrorcodebycallingimaqGetLastError().

Page 772: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

char* Thisfunctionreturnstheerrortextcorrespondingtotheerrorcodeinput.ThisfunctionreturnsUNKNOWN_ERRORifnoerrortextcorrespondstotheerrorcodeyouspecified.Whenyouarefinishedwiththisstring,disposeofitbycallingimaqDispose().

Page 773: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetFileInfoUsageintimaqGetFileInfo(constchar*fileName,CalibrationUnit*calibrationUnit,float*calibrationX,float*calibrationY,int*width,int*height,ImageType*imageType);

Page 774: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsinformationregardingthecontentsofanimagefile.Youcanretrieveinformationfromthefollowingimagefileformats:PNG,JPEG,JPEG2000,TIFF,AIPD,andBMP.

Page 775: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

fileName constchar* Thenameofthefilefromwhichthefunctiongetsinformation.ThisparameterisrequiredandcannotbeNULL.

calibrationUnit CalibrationUnit* Onreturn,thecalibrationunitoftheimage.Ifthefiledoesnothavecalibrationinformation,thefunctionsetscalibrationUnittoIMAQ_UNDEFINED.SetthisparametertoNULLifyoudonotneedthisinformation.

calibrationX float* Onreturn,theinterpixeldistanceinthex-direction.Ifthefiledoesnothavecalibrationinformation,thefunctionsetscalibrationXto1.SetthisparametertoNULLifyoudonotneedthisinformation.

calibrationY float* Onreturn,theinterpixeldistanceinthey-direction.Ifthefiledoesnothavecalibrationinformation,thefunctionsetscalibrationYto1.SetthisparametertoNULLifyoudonotneedthisinformation.

width int* Onreturn,thewidthoftheimage.SetthisparametertoNULLifyoudonotneedthisinformation.

height int* Onreturn,theheightoftheimage.SetthisparametertoNULLifyoudonotneedthisinformation.

imageType ImageType* Onreturn,thetypeoftheimage.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 776: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 777: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetFilterNamesUsageFilterName*imaqGetFilterNames(int*numFilters);

Page 778: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsanarrayofthecompressionfiltersonthissystemavailabletobeusedtocreateAVIfiles.

Page 779: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

numFilters int* Onreturn,thenumberoffiltersinthereturnedarray.

Page 780: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

FilterName* Onsuccess,thisfunctionreturnsanarrayofnamesofcompressionfiltersthatareavailabletocompressAVIfilesonthissystem.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofitbycallingimaqDispose().

Page 781: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetGeometricFeaturesFromCurvesUsageFeatureData*imaqGetGeometricFeaturesFromCurves(constCurve*curves,unsignedintnumCurves,constFeatureType*featureTypes,unsignedintnumFeatureTypes,unsignedint*numFeatures);

Page 782: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsthegeometricfeaturesdescribedbyasetofcurves.

Page 783: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAGE_U8

Page 784: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

curves constCurve* Thearrayofcurvereports.UseimaqExtractCurves()togeneratethisarray.TheparameterisrequiredandcannotbeNULL.

numCurves unsignedint Thenumberofcurvesinthesuppliedcurvesarray.

featureTypes constFeatureType* Anarrayofthetypesofgeometricfeaturestoextractfromthepassedcurves.SetthisparametertoNULLtoextractallofthefeatures.

numFeatureTypes unsignedint ThesizeofthepassedfeatureTypesarray.

numFeatures unsignedint* Onreturn,thenumberoffeaturesdescribedbythecurves.SetthisparametertoNULLifyoudonotwishtoreturninformationaboutthenumberoffeaturesdescribedbythecurves.

Page 785: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

FeatureData* Onsuccess,thisfunctionreturnsanarrayoffeaturesdescribedbythecurves.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().

Page 786: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetGeometricTemplateFeatureInfoUsageFeatureData*imaqGetGeometricTemplateFeatureInfo(constImage*pattern,unsignedint*numFeatures);

Page 787: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsthegeometricfeaturesdescribedbythetemplate.

Page 788: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAGE_U8

Page 789: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

pattern constImage* Thetemplatetoextractfeaturesfrom.numFeatures unsigned

int*Onreturn,thenumberoffeaturesdescribedbythetemplate.SetthisparametertoNULLifyoudonotwishtoreturninformationaboutthenumberoffeaturesdescribedbythetemplate.

Page 790: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

FeatureData* Onsuccess,thisfunctionreturnsanarrayoffeaturesdescribedbythetemplate.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().

Page 791: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetImageInfoUsageintimaqGetImageInfo(constImage*image,ImageInfo*info);

Page 792: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsthesize,border,type,calibration,andmemorylayoutofanimage.

Page 793: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 794: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagewhoseinformationthefunctionreturns.info ImageInfo* Onreturn,theinformationabouttheimage.This

parameterisrequiredandcannotbeNULL.

Page 795: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 796: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetImageSizeUsageintimaqGetImageSize(constImage*image,int*width,int*height);

Page 797: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsthesizeofagivenimage.

Page 798: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 799: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagewhosesizethefunctionqueries.width int* Onreturn,thewidthoftheimage.Setthis

parametertoNULLifyoudonotneedthisinformation.

height int* Onreturn,theheightoftheimage.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 800: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 801: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetImageTypeUsageintimaqGetImageType(constImage*image,ImageType*type);

Page 802: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsthetypeofthegivenimage.

Page 803: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 804: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagewhosetypethefunctionqueries.type ImageType* Onreturn,thetypeoftheimage.Thisparameteris

requiredandcannotbeNULL.

Page 805: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 806: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetIntersectionUsageintimaqGetIntersection(PointFloatstart1,PointFloatend1,PointFloatstart2,PointFloatend2,PointFloat*intersection);

Page 807: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputestheintersectionpointbetweentwolines.

Page 808: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

start1 PointFloat Thestartpointofthefirstline.end1 PointFloat Theendpointofthefirstline.start2 PointFloat Thestartpointofthesecondline.end2 PointFloat Theendpointofthesecondline.intersection PointFloat* Onreturn,thecoordinatelocationofthe

intersectionofthetwolines.ThisparameterisrequiredandcannotbeNULL.

Page 809: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 810: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetKernelUsageconstfloat*imaqGetKernel(KernelFamilyfamily,intsize,intnumber);

Page 811: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsapointertoapredefinedconvolutionmatrix.YoucanusethereturnedpointerinconjunctionwithimaqConvolve().Youcannotdisposeoforalterthereturnedpointerbecauseitisareferencetostaticmemory.Ifyouneedtoalterthekernel,copythedatafromthesuppliedkerneltothememoryspaceyouhaveallocatedyourself.

Page 812: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

family KernelFamily Thefamilyofthekernelmatrix.size int Thehorizontalandverticalmatrixsize.Valid

valuesare3,5,and7,correspondingtotheconvolutionmatrixsizesof3x3,5x5,and7x7.

number int Referencestheparticulardesiredmatrixamongthepredefinedmatricesthatareavailableforeachfamilyandsize.

Page 813: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

constfloat* Onsuccess,thisfunctionreturnsapointertotherequestedmatrix.Thispointerpointstoconstantdatainmemorythatyoushouldnotalter.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().YoudonotneedtocallimaqDispose()onthepointer.

Page 814: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetLastErrorUsageintimaqGetLastError();

Page 815: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnstheerrorcodeofthelastNIVisionfunctionexecutedinthecallingthread.

Page 816: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Thisfunctionreturnsthelasterrorcode.ThisfunctionreturnsERR_SUCCESSifthereisnopendingerror.

Page 817: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetLastErrorFuncUsageconstchar*imaqGetLastErrorFunc();

Page 818: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsthenameofthefunctioninwhichthelasterroroccurred.

Page 819: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

constchar* Thisfunctionreturnsthenameofthelastfunctionthatfailed.Thefunctionreturnsanemptystringifthereisnopendingerror.Whenyouarefinishedwiththereturnvalue,disposeofthestringbycallingimaqDispose().

Page 820: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetLastEventUsageintimaqGetLastEvent(WindowEventType*type,int*windowNumber,Tool*tool,Rect*rect);

Page 821: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsthelasteventthattheuserperformedonanimagewindow.

NoteDonotusethisfunctionifyouhaveregisteredaneventcallbackwithimaqSetEventCallback().

Page 822: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

type WindowEventType* Onreturn,thelasteventthatoccurred,suchasIMAQ_DOUBLE_CLICK_EVENT-Theuserhasdoubleclickedinawindow.SetthisparametertoNULLifyoudonotneedthisinformation.

windowNumber int* Onreturn,thewindownumberofthewindowinwhichthelasteventoccurred.SetthisparametertoNULLifyoudonotneedthisinformation.

tool Tool* IftheeventwasIMAQ_DRAW_EVENT,toolistheROItoolthattheuserdrewwith.ToolinformationisalsoreturnedfortheIMAQ_CLICK_EVENTandIMAQ_DOUBLE_CLICK_EVENT.IftheeventwasnotIMAQ_DRAW_EVENT,IMAQ_CLICK_EVENT,orIMAQ_DOUBLE_CLICK_EVENT,thefunctionignoresthisparameter.SetthisparametertoNULLifyoudonotneedthisinformation.

rect Rect* Arectangledescribingthelocationoftheevent.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 823: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 824: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionrect—Forrect,thecontentsoftherectangledependonthetype,asfollows:

IMAQ_CLICK_EVENT—Thetopleftcorneroftherectangleisthelocationoftheclick.Thewidthandheightoftherectangleare0.IMAQ_SCROLL_EVENT—Thetopleftoftherectangleisthecenterofthedisplayedimage.Thewidthandheightoftherectangleare0.IMAQ_DRAW_EVENT—Therectangleistheboundingrectangleofthedrawnshape.IMAQ_MOVE_EVENTorIMAQ_SIZE_EVENT—Therectangleisthenewlocationofthewindowonthescreen.

Forallotherevents,thefunctionignorestherectangle.

Page 825: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetLastKeyUsageintimaqGetLastKey(char*keyPressed,int*windowNumber,int*modifiers);

Page 826: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsthelastkeypressedinanactiveimagewindow.

Page 827: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

keyPressed char* Onreturn,keyPressedcontainsthelastkeypressed.ThefunctionsetskeyPressedto-1iftherewasnonewkeypresstoretrieve.SetthisparametertoNULLifyoudonotneedthisinformation.

windowNumber int* Onreturn,windowNumcontainsthewindownumberofthewindowinwhichthekeypresswascaught.ThefunctionsetswindowNumto-1iftherewasnonewkeypresstoretrieve.SetthisparametertoNULLifyoudonotneedthisinformation.

modifiers int* Onreturn,modifierscontainsabit-shiftedvalueindicatingwhatmodifiers,ifany,thefunctionappliedtothekeypress.Thefollowingarepossiblemodifiers:IMAQ_SHIFTIMAQ_ALTIMAQ_CTRLIMAQ_CAPS_LOCKSetthisparametertoNULLifyoudonotneedthisinformation.

Page 828: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 829: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetLineUsagevoid*imaqGetLine(constImage*image,Pointstart,Pointend,int*numPoints);

Page 830: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsthepixelvaluesalongagivenlineinanimage.Ifthestartingorendingpointofthelineisoutsidetheimage,thelineclipsatthelastvisiblepixel.

Page 831: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 832: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagecontainingalinewhosepixelsthefunctionreturns.

start Point Thecoordinatelocationofthestartingpointoftheline.

end Point Thecoordinatelocationoftheendingpointoftheline.

numPoints int* Thenumberofelementsinthereturnedarray.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 833: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

void* Onsuccess,thisfunctionreturnsthevaluesofthepixelsalongthegivenlineintheimage.Thetypeofarraythefunctionreturnsdependsontheimagetype,asfollows:

ImageType ArrayTypeIMAQ_IMAGE_U8 unsignedcharIMAQ_IMAGE_U16 unsignedshortIMAQ_IMAGE_I16 shortIMAQ_IMAGE_SGL floatIMAQ_IMAGE_RGB RGBValuestructuresIMAQ_IMAGE_HSL HSLValuestructuresIMAQ_IMAGE_RGB_U64 RGBU64Valuestructures

Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththearray,disposeofitbycallingimaqDispose().

Page 834: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetMaskOffsetUsageintimaqGetMaskOffset(constImage*image,Point*offset);

Page 835: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRetrievesthepointinthesourceimageatwhichthefunctionplacesthe(0,0)pixelofthemaskimage,assetbyimaqSetMaskOffset().

Page 836: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 837: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Themaskimagethatthefunctionretrievestheoffsetfor.

offset Point* Onreturn,thecoordinateswherethefunctionappliesthemask.ThisparameterisrequiredandcannotbeNULL.

Page 838: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 839: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetMeterArcUsageMeterArc*imaqGetMeterArc(intlightNeedle,MeterArcModemode,constROI*roi,PointFloatbase,PointFloatstart,PointFloatend);

Page 840: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsthearcinformationofameter.imaqReadMeter()usesthisinformationtoreadameter.

Page 841: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

lightNeedle int SetthisparametertoTRUEtofindalight-coloredneedleonadarkbackground.SetthisparametertoFALSEtofindadark-coloredneedleonalightbackground.

mode MeterArcMode Describeshowtodeterminethearc.roi constROI* Aregionconsistingoftwolinecontours,

eachdrawnfromthetipoftheneedletoitsbase.Thefirstlinecontourrepresentstheminimumpositionoftheneedle,andthesecondlinecontourrepresentsthemaximumpositionoftheneedle.IfmodeisIMAQ_METER_ARC_ROI,roiisrequiredandcannotbeNULL.IfmodeisIMAQ_METER_ARC_POINTS,thefunctionignoresroi,andtheparametercanbeNULL.

base PointFloat Thelocationofthebaseoftheneedle.IfmodeisIMAQ_METER_ARC_POINTS,baseisrequiredandcannotbeNULL.IfmodeisIMAQ_METER_ARC_ROI,thefunctionignoresbase.

start PointFloat Thelocationofthetipoftheneedlewhentheneedleisattheminimumsweepposition.IfmodeisIMAQ_METER_ARC_POINTS,startisrequiredandcannotbeNULL.IfmodeisIMAQ_METER_ARC_ROI,thefunctionignoresstart.

end PointFloat Thelocationofthetipoftheneedlewhentheneedleisatthemaximumsweepposition.IfmodeisIMAQ_METER_ARC_POINTS,endis

Page 842: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

required.IfmodeisIMAQ_METER_ARC_ROI,thefunctionignoresend.

Page 843: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

MeterArc* Onsuccess,thisfunctionreturnsastructuredescribingthearcacrosswhichametersweeps.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofitbycallingimaqDispose().

Page 844: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetMidLineUsageintimaqGetMidLine(PointFloatrefLineStart,PointFloatrefLineEnd,PointFloatpoint,PointFloat*midLineStart,PointFloat*midLineEnd);

Page 845: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputesthemidlinebetweenapointandareferenceline.Themidlineisthelinethatisparalleltothereferencelineandliesmidwaybetweenthepointandthereferenceline.

Page 846: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

refLineStart PointFloat Thecoordinatelocationofthestartofthereferenceline.

refLineEnd PointFloat Thecoordinatelocationoftheendofthereferenceline.

point PointFloat Thecoordinatelocationofthepoint.midLineStart PointFloat* Onreturn,thecoordinatelocationofthestart

ofthemidline.ThisparameterisrequiredandcannotbeNULL.

midLineEnd PointFloat* Onreturn,thecoordinatelocationoftheendofthemidline.ThisparameterisrequiredandcannotbeNULL.

Page 847: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 848: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetMousePosUsageintimaqGetMousePos(Point*position,int*windowNumber);

Page 849: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsthemousecursorcoordinatesandwindownumberofthemostrecentinstancethatthemousecursorwaslocatedoveranactivewindow.

Page 850: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

position Point* Onreturn,thecoordinatesofthemouseintheactiveimagewindow.SetthisparametertoNULLifyoudonotneedthisinformation.

windowNumber int* Onreturn,containsthewindownumberoftheactivewindow.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 851: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 852: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetNearestNeighborOptionsUsageintimaqGetNearestNeighborOptions(constClassifierSession*session,NearestNeighborOptions*options);

Page 853: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeGetoptionsfromthenearestneighborenginethattheclassifiersessionwastrainedwith.

Page 854: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

session constClassifierSession* Theclassifiersessionfromwhichtogettheoptions.

options NearestNeighborOptions* Onreturn,thenearestneighboroptions.ThisparameterisrequiredandcannotbeNULL.

Page 855: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 856: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetOverlayPropertiesUsageintimaqGetOverlayProperties(Image*image,constchar*group,TransformBehaviors*transformBehaviors);

Page 857: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnstransformationbehaviorinformationforaspecifiedoverlaygroup.

Page 858: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 859: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageforwhichyouwanttoreturnoverlayproperties.

group constchar* Specifiesanoverlaygroupnamewithintheimage.SetthisparametertoNULLtospecifyallgroups.

transformBehaviors TransformBehaviors* Describesthecurrentoverlaybehaviorwhenanimageistransformed.

Page 860: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 861: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetParticleClassifierOptionsUsageintimaqGetParticleClassifierOptions(constClassifierSession*session,ParticleClassifierPreprocessingOptions*preprocessingOptions,ParticleClassifierOptions*options);

Page 862: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeGetoptionsfromaparticleclassifiersession.

Page 863: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

session constClassifierSession* Theclassifiersessionfromwhichtogettheoptions.

preprocessingOptions ParticleClassifierPreprocessingOptions* Onreturn,theoptionsusedtoprocessparticlesbeforeclassification.SetthisparametertoNULLifyoudonotneedthisinformation.

options ParticleClassifierOptions* Onreturn,theoptionsusedtoclassifyparticles.SetthisparametertoNULLifyoudonotrequirethisinformation.

Page 864: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 865: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetPerpendicularLineUsageintimaqGetPerpendicularLine(PointFloatrefLineStart,PointFloatrefLineEnd,PointFloatpoint,PointFloat*perpLineStart,PointFloat*perpLineEnd,double*distance);

Page 866: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputesalinethatpassesthroughapointandisperpendiculartoareferenceline.

Page 867: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

refLineStart PointFloat Thecoordinatelocationofthestartofthereferenceline.

refLineEnd PointFloat Thecoordinatelocationoftheendofthereferenceline.

point PointFloat Thecoordinatelocationofthepoint.perpLineStart PointFloat* Onreturn,thecoordinatelocationofthestart

oftheperpendicularline.Thispointispoint.SetthisparametertoNULLifyoudonotneedthisinformation.

perpLineEnd PointFloat* Onreturn,thecoordinatelocationoftheendoftheperpendicularline.Thispointliesonthereferenceline.SetthisparametertoNULLifyoudonotneedthisinformation.

distance double* Onreturn,theshortest(Euclidean)distancefromthepointtothereferenceline.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 868: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 869: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionperpLineStart,perpLineEnd—Ifpointliesonthereferenceline,perpLineStartisnotthesameaspoint.perpLineEndispoint,andperpLineStartliesonthelineperpendiculartothereferenceline.

Page 870: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetPixelUsageintimaqGetPixel(constImage*image,Pointpixel,PixelValue*value);

Page 871: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsthevalueofapixelwithinanimage.

Page 872: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 873: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagewhosepixelvaluethefunctionqueries.pixel Point Thecoordinatesofthepixelthatthefunction

queries.value PixelValue* Onreturn,thevalueoftheimagepixel.This

parameterisrequiredandcannotbeNULL.

Page 874: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 875: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetPixelAddressUsagevoid*imaqGetPixelAddress(constImage*image,Pointpixel);

Page 876: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnstheaddressofagivenpixelinanimage.Iftherequestedpixellocationisoutsideoftheimage,thefunctionfailsandreturnsNULL.

Page 877: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 878: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagecontainingtherequestedpixel.pixel Point Thecoordinatesofthepixelwhosepointerthe

functionretrieves.

Page 879: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

void* Onsuccess,thisfunctionreturnsapointertotherequestedpixelintheimage.Thetypeofthepointerthefunctionreturnsdependsonthetypeoftheimage,asfollows:

ImageType PointerTypeIMAQ_IMAGE_U8 unsignedcharIMAQ_IMAGE_U16 unsignedshortIMAQ_IMAGE_I16 shortIMAQ_IMAGE_SGL floatIMAQ_IMAGE_COMPLEX ComplexstructureIMAQ_IMAGE_RGB RGBValuestructureIMAQ_IMAGE_HSL HSLValuestructureIMAQ_IMAGE_RGB_U64 RGBU64Valuestructure

Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().

Page 880: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetPointsOnContourUsageSegmentInfo*imaqGetPointsOnContour(constImage*image,int*numSegments);

Page 881: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFindsthenumberofedgesegmentsinanimageandreturnsthecoordinatesofthepixelsineachsegment.Anypixelthatisgreaterthanzeroisconsideredanedgelocation.Thisfunctiongroupsadjoiningedgepixelsintoedgesegments.Anedgesegmentisconsideredclosedifitformsaloop.Eachedgesegmentisgivenaweightbasedonthepixelgrayvaluesalongthatedge.Anedgesegmentwithhighgrayvalueshasahigherweight.

Page 882: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 883: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageinwhichtofindthesegments.numSegments int* Onreturn,thenumberofsegmentsfound.

SetthisparametertoNULLifyoudonotneedthisinformation.

Page 884: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

SegmentInfo* Onsuccess,thisfunctionreturnsanarrayofinformationaboutthesegments.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDispose().

Page 885: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetPointsOnLineUsagePoint*imaqGetPointsOnLine(Pointstart,Pointend,int*numPoints);

Page 886: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeGiventheendpointsofaline,thisfunctionreturnsallthepointscomprisingtheline.

Page 887: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

start Point Thefirstpointoftheline.end Point Thelastpointoftheline.numPoints int* Onreturn,thenumberofpointsputintothereturned

array.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 888: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

Point* Onsuccess,thisfunctionreturnsanarrayofthepointsontheline.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisarray,disposeofitbycallingimaqDispose().

Page 889: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetPolygonAreaUsageintimaqGetPolygonArea(constPointFloat*points,intnumPoints,float*area);

Page 890: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputestheareaofapolygondescribedbythecoordinatesofitsvertices.

Page 891: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

points constPointFloat* Thearrayofpointsthatdescribethecoordinatelocationsoftheverticesofthepolygon.

numPoints int Thenumberofpointsinthesuppliedarray.Youmustsupplyatleastthreepoints.

area float* Onreturn,theareaofthepolygon.ThisparameterisrequiredandcannotbeNULL.

Page 892: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 893: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetROIBoundingBoxUsageintimaqGetROIBoundingBox(constROI*roi,Rect*boundingBox);

Page 894: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnstheboundingrectanglefortheregionofinterest(ROI).TheboundingrectangleisthesmallestrectanglethatcontainsallofthecontoursthatcomprisetheROI.

Page 895: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi constROI* TheROIfromwhichthefunctiongetstheboundingrectangleinformation.

boundingBox Rect* Onreturn,theboundingrectangle.ThisparameterisrequiredandcannotbeNULL.

Page 896: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 897: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetROIColorUsageintimaqGetROIColor(constROI*roi,RGBValue*roiColor);

Page 898: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsthecolorofaregionofinterest(ROI).

Page 899: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi constROI* TheROIfromwhichthefunctiongetscolorinformation.

roiColor RGBValue* Onreturn,thecoloroftheROI.ThisparameterisrequiredandcannotbeNULL.

Page 900: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 901: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetSystemWindowHandleUsagevoid*imaqGetSystemWindowHandle(intwindowNumber);

Page 902: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnstheWindowsHWNDforagivenNIVisionimagewindow.

Page 903: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int ThewindownumberofthewindowwhoseHWNDtoretrieve.

Page 904: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

void* Onsuccess,thisfunctionreturnstheWindowsHWNDforthewindow.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().

Page 905: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetToolWindowHandleUsagevoid*imaqGetToolWindowHandle();

Page 906: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnstheWindowsHWNDofthetoolwindow.

Page 907: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

void* Onsuccess,thisfunctionreturnstheWindowsHWNDforthetoolwindow.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().

Page 908: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetToolWindowPosUsageintimaqGetToolWindowPos(Point*position);

Page 909: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRetrievesthecurrentlocationofthetoolwindow.ThefunctionbehavesinthesamemannerasimaqGetWindowPos().

Page 910: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

position Point* Onreturn,thepositionoftheupperleftcornerofthetoolwindow.ThisparameterisrequiredandcannotbeNULL.

Page 911: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 912: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetVisionInfoTypesUsageintimaqGetVisionInfoTypes(constImage*image,unsignedint*present);

Page 913: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRetrievesallthetypesofVisioninformationassociatedwithanimage.

Page 914: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 915: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* TheimagethatthefunctionchecksforthepresenceofVisioninformation.

present unsignedint*

Onreturn,thisparameterhasabitflagsetforeachVisioninformationtypepresentintheimage.

Page 916: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 917: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetWindowBackgroundUsageintimaqGetWindowBackground(intwindowNumber,WindowBackgroundFillStyle*fillStyle,WindowBackgroundHatchStyle*hatchStyle,RGBValue*fillColor,RGBValue*backgroundColor);

Page 918: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRetrievesthebackgroundstyleandcolorinformationforthedisplaywindow.

Page 919: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.

fillStyle WindowBackgroundFillStyle* Onreturn,thefillstyleofthedisplaywindow.SetthisparametertoNULLifyoudonotneedthisinformation.

hatchStyle WindowBackgroundHatchStyle* Onreturn,thehatchstyleofthedisplaywindow.SetthisparametertoNULLifyoudonotneedthisinformation.

fillColor RGBValue* Onreturn,thefillcolorofthedisplaywindow.SetthisparametertoNULLifyoudonotneedthisinformation.

backgroundColor RGBValue* Onreturn,thebackgroundcolorofthedisplaywindow.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 920: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 921: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetWindowCenterPosUsageintimaqGetWindowCenterPos(intwindowNumber,Point*centerPosition);

Page 922: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeThisfunctiongetsthecurrentpositionoftheimageinthecenterofthegivenwindow.Thisfunctionisusefulfordeterminingwhatpixellocationtheuserclickedwhenyoudetectazoomevent.

Page 923: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thenumberofthewindow.centerPosition Point* Onreturn,containsthecurrentpositionofthe

imageinthecenterofthegivenimagewindow.ThisparameterisrequiredandcannotbeNULL.

Page 924: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 925: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetWindowDisplayMappingUsageintimaqGetWindowDisplayMapping(intwindowNum,DisplayMapping*mapping);

Page 926: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeGetsthepixelmappingpolicyfordisplaying16-bitimagesofanunspecifiedbitdepth.16-bitgrayscaleimagescannotbedisplayedwiththeirfullresolutionon32-bitcolordisplaysusingcommonvideoadapterslimitedto8-bitresolution/perpixel/color.Youmustmap16-bitimagestothe8-bitrange(0to255).

Page 927: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNum int Thenumberofthewindowwhosepixelmappingpolicythefunctiongets.

mapping DisplayMapping* Onreturn,describesthemappingpolicyfortheselectedwindow.ThisparameterisrequiredandcannotbeNULL.

Page 928: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 929: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetWindowGridUsageintimaqGetWindowGrid(intwindowNumber,int*xResolution,int*yResolution);

Page 930: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRetrievesthegridresolutionoftheimagewindow.Gridresolutionisthenumberofpixelsbetweengridlines.NIVisionusesthegridresolutionwhendrawingregionsofinterestonthewindowusingtoolsinthetoolwindow.Youcanusethegridtotracearegionofinterestaccurately.

Page 931: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.xResolution int* Onreturn,thenumberofpixelsbetweengrid

linesinthexdirection.SetthisparametertoNULLifyoudonotneedthisinformation.

yResolution int* Onreturn,thenumberofpixelsbetweengridlinesintheydirection.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 932: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 933: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetWindowHandleUsageintimaqGetWindowHandle(int*handle);

Page 934: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsanunusedwindownumber.YoucanusethewindownumberinconjunctionwithfunctionssuchasimaqDisplayImage().Thisfunctiondoesnotreservethewindownumberuntilyoucallafunctionthatusesthewindownumber.

Page 935: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

handle int* Onreturn,anunusedwindownumber.Ifnounusedwindownumbersareavailable,thefunctionsetsthisparameterto–1.ThisparameterisrequiredandcannotbeNULL.

Page 936: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 937: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetWindowPosUsageintimaqGetWindowPos(intwindowNumber,Point*position);

Page 938: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRetrievesthecurrentlocationofthegivenimagewindow.

Page 939: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.position Point* Onreturn,thepositionoftheupperleftcorner

ofthegivenimagewindow.ThisparameterisrequiredandcannotbeNULL.

Page 940: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 941: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetWindowROIUsageROI*imaqGetWindowROI(intwindowNumber);

Page 942: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRetrievesacopyoftheregionofinterest(ROI)associatedwithagivenimagewindow.

Page 943: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.

Page 944: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ROI* Onsuccess,thisfunctionreturnsacopyoftheROIassociatedwiththegivenwindow.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().WhenyouarefinishedwiththeROI,disposeofitbycallingimaqDispose().

Page 945: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetWindowSizeUsageintimaqGetWindowSize(intwindowNumber,int*width,int*height);

Page 946: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRetrievesthesizeofagivenimagewindow.

Page 947: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.width int* Onreturn,thewidthofthewindow.Setthis

parametertoNULLifyoudonotneedthisinformation.

height int* Onreturn,theheightofthewindow.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 948: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 949: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetWindowTitleUsagechar*imaqGetWindowTitle(intwindowNumber);

Page 950: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRetrievesthecurrenttitleofanimagewindow.

Page 951: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.

Page 952: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

char* Onsuccess,thisfunctionreturnsthetitleofthegivenwindow.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththetitle,disposeofitbycallingimaqDispose().

Page 953: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetWindowZoom2UsageintimaqGetWindowZoom2(intwindowNumber,float*xZoom,float*yZoom);

Page 954: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRetrievesthecurrentzoomfactorsforagivenimagewindow.Thezoomfactorindicatesanincreaseordecreaseinthemagnificationofanimageandthisvalueisexpressedasaratiooftheimagesize.Anumbergreaterthan1indicatesamagnificationbytheamountspecified.Forexample,azoomfactorof3indicatesthattheimageisdisplayedatthreetimesitsactualsize(3:1).Anumberlessthan1indicatesthattheimageisdecreasedinmagnificationbythespecifiedamount.Forexample,azoomfactorof0.2indicatesthattheimageisdisplayedatone-fifthitsactualsize(1:5).

Page 955: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.xZoom float* Onreturn,thecurrentzoomfactorinthex

directionforthewindow.yZoom float* Onreturn,thecurrentzoomfactorinthey

directionforthewindow

Page 956: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 957: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGrabUsageImage*imaqGrab(SESSION_IDsessionID,Image*image,intimmediate);

Page 958: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsacopyofthecurrentimageinthegrabbuffer.Agrabperformsanacquisitionthatloopscontinuallyononebuffer.CallthisfunctiononlyaftercallingimaqSetupGrab().

Page 959: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 960: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

sessionID SESSION_ID AvalidsessionID.image Image* Apointertotheacquiredimage.Ifimageis

NULL,imaqGrab()createstheimageintowhichthefunctioncopiesthegrabbuffer.

immediate int Determinestheacquisitiontimingmethod.SetthisparametertoFALSEifyouwantthegraboperationtosynchronizeontheverticalblank.SettheparametertoTRUEifyouwantanimmediatetransfer.RefertotheNIVisionHardwareHelpformoreinformationaboutacquisitiontimingmethods.

Page 961: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

Image* Onsuccess,thisfunctionreturnstheacquiredimage.IfyousetimagetoNULL,thefunctionreturnsanewimage.Otherwise,thefunctionreturnsapointertoimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().

Page 962: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGradeDataMatrixBarcodeAIMUsageintimaqGradeDataMatrixBarcodeAIM(constImage*image,AIMGradeReport*report);

Page 963: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeGradesaDataMatrixbarcodeusingtheAIMPrintQualitymetrics(includedintheISO16022specification).

Page 964: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 965: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* TheimagecontainingtheDataMatrixbarcodetograde.YoumustfirstpreparethisimageforgradingusingimaqReadDataMatrixBarcode2().

report AIMGradeReport* Uponreturn,theAIMstandardgradesfortheDataMatrixbarcodeandtherawscoresusedtoderivethegrades.IfaDataMatrixbarcodecannotbelocatedbyimaqReadDataMatrixBarcode2(),thefunctionassignsthebarcodeIMAQ_AIM_GRADE_Fforallgradesand0forallrawscores.ThisparameterisrequiredandcannotbeNULL.

Page 966: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 967: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGrayMorphologyUsageintimaqGrayMorphology(Image*dest,Image*source,MorphologyMethodmethod,constStructuringElement*structuringElement);

Page 968: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeAppliesmorphologicaltransformationstograylevelimages.

Page 969: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 970: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source Image* Theimageonwhichthe

functionperformsthemorphologicaloperation.Thecalculationmodifiestheborderofthesourceimage.Thebordermustbeatleasthalfaslargeasthelargerofthedimensionsofthestructuringelement.

method MorphologyMethod Themorphologicaltransformationtoapply.

structuringElement constStructuringElement* Thestructuringelementusedintheoperation.SetthisparametertoNULLifyoudonotwantacustomstructuringelement.

Page 971: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 972: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 973: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqHistogramUsageHistogramReport*imaqHistogram(constImage*image,intnumClasses,floatmin,floatmax,constImage*mask);

Page 974: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCalculatesthehistogram,orpixeldistribution,ofanimage.

Page 975: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 976: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagewhosehistogramthefunctioncalculates.

numClasses int Thenumberofclassesintowhichthefunctionseparatesthepixels.

min float Theminimumpixelvaluetoconsiderforthehistogram.Thefunctiondoesnotcountpixelswithvalueslessthanmin.

max float Themaximumpixelvaluetoconsiderforthehistogram.Thefunctiondoesnotcountpixelswithvaluesgreaterthanmax.

mask constImage* Anoptionalmaskimage.ThisimagemustbeanIMAQ_IMAGE_U8image.Whencalculatingthehistogram,thefunctionconsidersonlythosepixelsinimagewhosecorrespondingpixelsinmaskarenon-zero.SetthisparametertoNULLifyouwantthefunctiontoperformahistogramonthewholeimage.

Page 977: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

HistogramReport* Onsuccess,thisfunctionreturnsareportdescribingthepixelvalueclassification.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereport,disposeofitbycallingimaqDispose().

Page 978: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionmin—Settingbothminandmaxto0causesthefunctiontosetminto0for8-bitimagesandtotheactualminimumvalueoftheimageforallotherimagetypes.max—Settingbothminandmaxto0causesthefunctiontosetmaxto255for8-bitimagesandtotheactualmaximumvalueoftheimageforallotherimagetypes.

Page 979: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqImageToArrayUsagevoid*imaqImageToArray(constImage*image,Rectrect,int*columns,int*rows);

Page 980: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCreatesatwo-dimensionalarrayfromanimage.

Page 981: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 982: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagefromwhichthefunctionmakesthearray.

rect Rect Specifiesarectangularregionoftheimagetoreturn.SetthisparametertoIMAQ_NO_RECTifyouwantthefunctiontoreturnthewholeimage.

columns int* Thenumberofcolumnsinthereturnedarray.SetthisparametertoNULLifyoudonotneedthisinformation.

rows int* Thenumberofrowsinthereturnedarray.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 983: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

void* Onsuccess,thisfunctionreturnsatwo-dimensionalarray.Thetypeofthereturnedarraydependsontheimagetype,asfollows:

ImageType PointerTypeIMAQ_IMAGE_U8 unsignedcharIMAQ_IMAGE_U16 unsignedshortIMAQ_IMAGE_I16 shortIMAQ_IMAGE_SGL floatIMAQ_IMAGE_COMPLEX ComplexstructuresIMAQ_IMAGE_RGB RGBValuestructuresIMAQ_IMAGE_HSL HSLValuestructuresIMAQ_IMAGE_RGB_U64 RGBU64Valuestructures

Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththearray,disposeofitbycallingimaqDispose().

Page 984: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqImageToClipboardUsageintimaqImageToClipboard(constImage*image,constRGBValue*palette);

Page 985: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCopiesanimageontotheclipboard.

Page 986: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB

Page 987: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagetocopyontotheclipboard.palette constRGBValue* Anoptionalpalettetoassociatewith8-bit

images.IfthisparameterisnotNULL,itmustpointtoanarrayof256colors,whichrepresentthecolorpalettethatthefunctionassociateswiththeimage.IfthisparameterisNULL,thefunctionassociatesagrayscalepalettewiththeimage.

Page 988: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 989: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqInterlaceCombineUsageintimaqInterlaceCombine(Image*frame,constImage*odd,constImage*even);

Page 990: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCombinestwofieldimagestocreateasingleframeimage.

Page 991: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 992: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

frame Image* Onreturn,thecombinedimage.odd constImage* Theoddfield.even constImage* Theevenfield.

Page 993: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 994: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqInterlaceSeparateUsageintimaqInterlaceSeparate(constImage*frame,Image*odd,Image*even);

Page 995: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSeparatesaframeimageintotwofieldimages.

Page 996: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 997: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

frame constImage* Theframeimagethatthefunctionseparatesintooddandevenfields.

odd Image* Theimageintowhichthefunctionplacestheoddfieldoftheframearea.SetthisparametertoNULLifyoudonotneedtheoddfield.

even Image* Theimageintowhichthefunctionplacestheevenfieldoftheframearea.SetthisparametertoNULLifyoudonotneedtheevenfield.

Page 998: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 999: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqInterpolatePointsUsagefloat*imaqInterpolatePoints(constImage*image,constPoint*points,intnumPoints,InterpolationMethodmethod,intsubpixel,int*interpCount);

Page 1000: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeInterpolatesthepixelvaluesofanimageoverspecifiedpoints.

Page 1001: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1002: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagecontainingthevaluestointerpolate.

points constPoint* Thepointsoverwhichtointerpolate.Allthepointsinthisarraymustbewithintheimage.ThisparameterisrequiredandcannotbeNULL.

numPoints int Thenumberofpointsintheinputpointsarray.

method InterpolationMethod Specifiesthemethodfortheinterpolation.ThevalidinterpolationmethodsforrotationareIMAQ_BILINEAR,IMAQ_QUADRATICandIMAQ_CUBIC_SPLINE.

subpixel int Thenumberofsubdivisionsintowhichtointerpolate.Forexample,avalueof0causesthefunctiontoreturnonlythepixelvaluesatthegivenpoints,whereasavalueof1returnsthepixelvaluesatthegivenpointsandatthemidpointofeachpair.

interpCount int* Onreturn,thenumberofinterpolatedvaluesinthearrayreturnedbythefunction.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1003: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

float* Onsuccess,thisfunctionreturnsanarrayoftheinterpolatedvalues.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisarray,disposeofitbycallingimaqDispose().

Page 1004: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqInverseUsageintimaqInverse(Image*dest,constImage*source,constImage*mask);

Page 1005: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeInvertsthepixelintensitiesofanimageusingthefollowingequation:f(p)=dynamicMax-p+dynamicMinwhereprepresentsthevalueofapixel.dynamicMinrepresents0(8-bitimages)orthesmallestpixelvalueinthesourceimage(16-bitandfloatingpointimages).dynamicMaxrepresents255(8-bitimages)orthelargestpixelvalueinthesourceimage(16-bitandfloatingpointimages).

Page 1006: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1007: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagetoinvert.mask constImage* Anoptionalmaskimage.Thisimagemustbean

IMAQ_IMAGE_U8image.Thefunctioninvertsonlythosepixelsinthesourceimagewhosecorrespondingpixelsinthemaskarenon-zero.SetthisparametertoNULLtoinvertthepixelintensitiesoftheentiresourceimage.

Page 1008: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1009: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqInverseFFTUsageintimaqInverseFFT(Image*dest,constImage*source);

Page 1010: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeTakestheinverseFouriertransformofanimage.Thedestinationimagemustbedifferentthanthesourceimagetoperformthisoperation.

Page 1011: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_COMPLEX

Page 1012: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.ValidimagetypesareIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,orIMAQ_IMAGE_COMPLEX.Thedestinationimagemustbedifferentfromthesourceimage.

source constImage* TheimagewhoseinverseFouriertransformthefunctiontakes.

Page 1013: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1014: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqIsImageEmptyUsageintimaqIsImageEmpty(constImage*image,int*empty);

Page 1015: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeTeststoseeifthesuppliedimageisempty.Anemptyimageisanimagethatcontainsonlypixelswithavalueequaltozero.UsethisfunctioninconjunctionwithimaqCompare()andimaqCompareConstant()toseeifthecompareoperationclearedallofthepixelsinanimage.

Page 1016: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1017: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagethatthefunctionchecksforemptiness.empty int* Onreturn,thisparameterequalsTRUEiftheimage

isemptyandFALSEiftheimagecontainspixelswithvaluesotherthan0.ThisparameterisrequiredandcannotbeNULL.

Page 1018: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1019: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqIsToolWindowVisibleUsageintimaqIsToolWindowVisible(int*visible);

Page 1020: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRetrieveswhetherthetoolwindowisvisible.ThisfunctionbehavesinthesamemannerasimaqIsWindowVisible().

Page 1021: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

visible int* Onreturn,thisparameterisTRUEifthetoolwindowisvisibleandFALSEifthetoolwindowishidden.ThisparameterisrequiredandcannotbeNULL.

Page 1022: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1023: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqIsWindowNonTearingUsageintimaqIsWindowNonTearing(intwindowNumber,int*nonTearing);

Page 1024: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeGetsthecurrentnon-tearingstatusofthedisplaywindow.Formoreinformationonnon-tearing,refertoimaqSetWindowNonTearing().

Page 1025: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.nonTearing int* Onreturn,thisparameterisTRUEifthegiven

windowisnon-tearingandFALSEifthewindowisoperatingnormally.ThisparameterisrequiredandcannotbeNULL.

Page 1026: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1027: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqIsWindowVisibleUsageintimaqIsWindowVisible(intwindowNumber,int*visible);

Page 1028: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRetrieveswhetherthegivenwindowisvisible.

Page 1029: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.visible int* Onreturn,thisparameterisTRUEifthegiven

windowisvisibleandFALSEifthewindowishidden.ThisparameterisrequiredandcannotbeNULL.

Page 1030: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1031: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLabel2UsageintimaqLabel2(Image*dest,Image*source,intconnectivity8,int*particleCount);

Page 1032: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeLabelstheparticlesinabinaryimagebyapplyingauniquevaluetoallpixelswithinaparticle.Thisvalueisencodedin8or16bits,dependingontheimagetype.Thefunctioncanlabel255particlesinan8-bitimageand65,535particlesina16-bitimage.

Page 1033: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1034: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source Image* Thesourceimage.Thelabelingprocess

modifiestheborderofthesourceimage.Thebordermustbeatleastonepixelwideifyouuseconnectivity-4ortwopixelswideifyouuseconnectivity-8.

connectivity8 int SetthisparametertoTRUEtouseconnectivity-8todeterminewhetherparticlesaretouching.SetthisparametertoFALSEtouseconnectivity-4todeterminewhetherparticlesaretouching.Formoreinformationaboutconnectivity,seeChapter9,BinaryMorphology,intheNIVisionConceptsManual

particleCount int* Onreturn,thenumberofparticlesthatthefunctionfound.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1035: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1036: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 1037: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLearnCalibrationGridUsageintimaqLearnCalibrationGrid(Image*image,constROI*roi,constLearnCalibrationOptions*options,constGridDescriptor*grid,constCoordinateSystem*system,constRangeFloat*range,float*quality);

Page 1038: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeLearnsacalibrationfromanimageofagridofcircles.Thefunctionattachescalibrationinformationtothegridimage,whichyoucanthenusewithimaqCopyCalibrationInfo2()tocalibrateanuncalibratedimage.RefertoChapter6,CalibratingImages,oftheNIVisionforLabWindows/CVIUserManual.formoreinformationaboutcreatingagridimage.

Page 1039: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16

Page 1040: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Thetemplateusedforcalibratingyoursystem.Itshouldbeanimageofagridofcircles.

roi constROI* Determinestheregionoftheimagethatthefunctionusesinthelearningprocess.Thefunctionignoresallthecirclesinthegridthatareoutsidethedefinedregionwhenestimatingthecalibrationtransformation.Tolearntheentireimage,setthisparametertoNULL.

options constLearnCalibrationOptions* Describeshowthefunctionlearnsthecalibrationinformation.

grid constGridDescriptor* Containsscalingconstantsforthegridimagethatthefunctionusestolearnthecalibration.

system constCoordinateSystem* Definesthecoordinatesystemforrealworldcoordinates.

range constRangeFloat* Therangeofthegrayscalethefunctionusestorepresentthecirclesinthegridimage.

quality float* Onreturn,thequalityscoreofthelearningprocess,whichisavaluebetween0-1000.Aqualityof1000meansthatthefunctionlearnedthefeaturepointsperfectlywiththechosenalgorithm.Itdoesnotnecessarilyreflecttheabsoluteaccuracyoftheestimatedcalibration

Page 1041: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

mapping,butinsteadreflectshowwellthecalibrationmappingadaptstothelearnedgrid.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1042: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1043: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:

mode IMAQ_PERSPECTIVEmethod IMAQ_SCALE_TO_PRESERVE_AREAroi IMAQ_USER_ROIlearnMap FALSElearnTable FALSE

grid—SetgridtoNULLtousethefollowingdefaultscalingconstants:

xStep 1yStep 1unit IMAQ_UNDEFINED

system—SetsystemtoNULLtousethefollowingdefaultcoordinatesystem:

origin {0,0}angle 0axisOrientation IMAQ_INDIRECT

range—SettherangeparametertoNULLtousethedefaultrange,asfollows:

minValue 0maxValue 180

Page 1044: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLearnCalibrationPointsUsageintimaqLearnCalibrationPoints(Image*image,constCalibrationPoints*points,constROI*roi,constLearnCalibrationOptions*options,constGridDescriptor*grid,constCoordinateSystem*system,float*quality);

Page 1045: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeLearnsacalibrationfromasetofpixelcoordinatesandcorrespondingreal-worldcoordinates.Afterremovingcoordinatesoutsidetheoptionalregionofinterest(ROI),thefunctionrequiresatleastfourpixelcoordinatesandfourreal-worldcoordinatestosuccessfullylearnthecalibrationinformation.

Page 1046: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1047: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagetowhichthefunctionattachescalibrationinformation.

points constCalibrationPoints* Thesetofreferencepointsthefunctionusestolearnthecalibrationinformation.ThisparameterisrequiredandcannotbeNULL.

roi constROI* Determineswhichpixelcoordinatesthefunctionusesinthelearningprocess.Thefunctionignoresallpixelcoordinatesthatareoutsidethedefinedregionwhenestimatingthecalibrationtransformation.Tolearnallofthepixelcoordinates,setthisparametertoNULL.

options constLearnCalibrationOptions* Describeshowthefunctionlearnsthecalibrationinformation.

grid constGridDescriptor* Containsscalingconstantsforthereal-worldcoordinatesthatthefunctionusestolearnthecalibration.

system constCoordinateSystem* Definesthecoordinatesystemforreal-worldcoordinates.

quality float* Onreturn,thequalityscoreofthelearningprocess,whichisavaluebetween0-1000.Aqualityof1000meansthatthefunctionlearnedthefeaturepointsperfectlywiththechosenalgorithm.Itdoesnotnecessarily

Page 1048: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

reflecttheabsoluteaccuracyoftheestimatedcalibrationmapping,butinsteadreflectshowwellthecalibrationmappingadaptstothelearnedpoints.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1049: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1050: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:

mode IMAQ_PERSPECTIVEmethod IMAQ_SCALE_TO_FEATURESroi IMAQ_USER_ROIlearnMap FALSElearnTable FALSE

grid—SetgridtoNULLtousethefollowingdefaultscalingconstants:

xStep 1yStep 1unit IMAQ_UNDEFINED

system—SetsystemtoNULLtousethefollowingdefaultcoordinatesystem:

origin Thefunctionplacestheoriginatthepointwithax-coordinateequaltothelowestx-coordinatevalueinthepointlist.

angle 0axisOrientation IMAQ_INDIRECT

Page 1051: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLearnColorUsageColorInformation*imaqLearnColor(constImage*image,constROI*roi,ColorSensitivitysensitivity,intsaturation);

Page 1052: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeExtractsthecolorfeaturesofanimage.UsethesefeaturesforcolormatchingwithimaqMatchColor().

Page 1053: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1054: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagecontainingthecolorinformationtolearn.

roi constROI* Theregionaboutwhichthefunctionlearnsthecolorinformation.SetthisparametertoNULLtolearncolorinformationaboutthewholeimage.

sensitivity ColorSensitivity Specifiesthesensitivityofthecolorinformationintheimage.

saturation int Setsathresholdvaluewhichthefunctionusestoseparatecolorswithsimilarhues.Thefunctionclassifiescolorsbelowthegivensaturationvalueseparatelyfromcolorsabovethegivensaturationvalue.

Page 1055: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ColorInformation* Onsuccess,thisfunctionreturnsacolorinformationstructurewhichyoucanpassintoimaqMatchColor().Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisstructure,disposeofitbycallingimaqDispose().

Page 1056: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLearnColorPatternUsageintimaqLearnColorPattern(Image*image,constLearnColorPatternOptions*options);

Page 1057: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposePreparesanimageforuseasacolortemplateforimaqMatchColorPattern().Ifyouchangethecolortemplateimageaftercallingthisfunction,youmustcallthefunctionagaintolearnthemodifiedimage.

Page 1058: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1059: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageaboutwhichthefunctionlearnspatternmatchinginformation.Thefunctionappendsthepatternmatchinginformationtotheimage.

options constLearnColorPatternOptions* Describestheinformationthealgorithmlearnsaboutthecolorpattern.

Page 1060: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1061: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:

learnMode IMAQ_LEARN_SHIFT_INFORMATIONfeatureMode IMAQ_COLOR_AND_SHAPE_FEATURESthreshold 80ignoreMode IMAQ_IGNORE_NONEcolorsToIgnore NULL(Useallcolors)numColorsToIgnore 0

Page 1062: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLearnGoldenTemplateUsageintimaqLearnGoldenTemplate(Image*goldenTemplate,PointFloatoriginOffset,constImage*mask);

Page 1063: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposePreparesanimageforuseinimaqCompareGoldenTemplate().

Page 1064: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 1065: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

goldenTemplate Image* Thegoldentemplatetolearnforinspection.

originOffset PointFloat Specifiesthenumberofpixelsthefunctionshiftstheoriginofthetemplatefromthecenterofthetemplateimage.SetthisparametertoIMAQ_NO_OFFSETtousethecenterofthetemplateimageastheoriginofthetemplate.

mask constImage* Anoptional,8-bitimageofthesamesizeasthetemplatethatspecifieswhatregionsandedgestoignoreinthetemplate.

Page 1066: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1067: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionmask—Useoneormoreofthefollowingpixelvalueswhenconstructingthemask:0–Maintainsthedefaultbehavior.1–Thecorrespondingpixelinthetemplateimageshouldalwaysbeignored.2–ThecorrespondingpixelinthetemplateimageisanedgeandshouldbedilatedaccordingtotheedgeThicknessToIgnoreelementoftheoptionsparameterofimaqCompareGoldenTemplate().

Page 1068: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLearnGeometricPatternUsageintimaqLearnGeometricPattern(Image*image,PointFloatoriginOffset,constCurveOptions*curveOptions,constLearnGeometricPatternAdvancedOptions*advancedLearnOptions,constImage*mask);

Page 1069: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCreatesadescriptionofthetemplateimageyouwanttosearchforduringthematchingphase.

Page 1070: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 1071: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageaboutwhichthefunctionlearnspatternmatchinginformation.Thefunctionappendsthepatternmatchinginformationtothisimage.

originOffset PointFloat Specifiesthenumberofpixelsthefunctionshiftstheoriginofthetemplatefromthecenterofthetemplateimage.TheoriginofthetemplateisusedbyimaqMatchGeometricPattern()tosetthetheresultingGeometricPatternMatchstructforeachtemplatematchwithinatargetimage.SetthisparametertoIMAQ_NO_OFFSETtousethecenterofthetemplateimageastheoriginofthetemplate.

curveOptions constCurveOptions* Describeshowthefunctionidentifiesthecurvesintheimagethefunctionwillusetocreatethetemplateimage.ThisfunctiondoesnotsupportidentifyingcurveswithsubpixelaccuracyandthereforeignoresthesubpixelAccuracyofthisparameter.

Page 1072: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

advancedLearnOptions constLearnGeometricPatternAdvancedOptions* Advancedoptionsfordeterminingtheinformationthealgorithmlearnsaboutthegeometricpattern.

mask constImage* Anoptionalimage,whichisthesamesizeasthetemplate,thatspecifieswheretosearchforcurvesinthetemplate.IMAQ_IMAGE_U8image.Toallowthefunctiontoprocessallofthepixelstodetermineifthepixelscontaincurves,setthisparametertoNULL.

Page 1073: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1074: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussioncurveOptions—SetcurveOptionstoNULLtousethedefaultcurveoptions,asfollows:

extractionMode IMAQ_NORMAL_IMAGEthreshold 75filterSize IMAQ_NORMALminLength 25rowStepSize 15columnStepSize 15maxEndPointGap 10onlyClosed FALSEsubpixelAccuracy FALSE

advancedLearnOptions—SetadvancedLearnOptionstoNULLtousethedefaultadvancedlearningoptions,asfollows:

minRectLength 10minRectAspectRatio 0.2minRadius 5minLineLength 15minFeatureStrength 0.5maxFeaturesUsed 25maxPixelDistanceFromLine 2

mask—Useoneormoreofthefollowingpixelvalueswhenconstructingthemask:0–Maintainsthedefaultbehavior.ThecorrespondingpixelinthetemplateimageisconsideredpartofacurveonlyifitmeetstheconditionsspecifiedbycurveOptions.1–Thecorrespondingpixelinthetemplateimageisneverconsideredpartofacurve.2–Thecorrespondingpixelinthetemplateimageisalwaysconsidered

Page 1075: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

partofacurve.4–ThecorrespondingpixelinthetemplateimageisnotusedbyimaqMatchGeometricPattern()whencomputingthecorrelationScorereturnedforeachmatch.Youcancombinethispixelvaluewithvalues1or2tocontrolboththecurvedetectionandscoringforthecorrespondingpixel.

Page 1076: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLearnMultipleGeometricPatternsUsageMultipleGeometricPattern*imaqLearnMultipleGeometricPatterns(constImage**patterns,unsignedintnumberOfPatterns,constString255*labels);

Page 1077: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCombinesthedescriptionsofthepatternsyouwanttosearchforduringthematchingphaseintoamultiplegeometrictemplate.Usethemultiplegeometrictemplatetosearchforthesetemplatesimagesinthetargetimage.

Page 1078: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 1079: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

patterns constImage** Thearrayofpatternsyouwanttosearchforinthetargetimage.NIVisionmustlearneachofthetemplateimagesinthearrayusingimaqLearnGeometricPattern()beforeusingitinthisfunction.

numberOfPatterns unsignedint Thenumberofpatternsinpatterns.

labels constString255* Thearrayoflabelsthatidentifythepatterns.ThesizeofthisarraymustbeequaltonumberOfPatterns.

Page 1080: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

MultipleGeometricPattern* Onsuccess,thisfunctionreturnsamultiplegeometrictemplate.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().

Page 1081: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLearnPattern3UsageintimaqLearnPattern3(Image*image,LearningModelearningMode,LearnPatternAdvancedOptions*advancedOptions,constImage*mask);

Page 1082: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCreatesadescriptionofthetemplateimageyouwanttosearchforduringthematchingphase.

Page 1083: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 1084: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageaboutwhichthefunctionlearnspatternmatchinginformation.Thefunctionappendsthepatternmatchinginformationtotheimage.

learningMode LearningMode Themodeinwhichthefunctionlearnsthetemplateimage.

advancedOptions LearnPatternAdvancedOptions* Advancedoptionstothealgorithm.

mask constImage* Anoptionalmaskimage.ThisimagemustbeanIMAQ_IMAGE_U8image.Thefunctionlearnsonlythosepixelsinthesourceimagewhosecorrespondingpixelsinthemaskarenon-zero.SetthisparametertoNULLtolearnthewholeimage.

Page 1085: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1086: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLightMeterLineUsageLineProfile*imaqLightMeterLine(Image*image,Pointstart,Pointend,intshowMeasurement,constCoordinateTransform2*transform);

Page 1087: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeMeasuresthepixelintensitiesonalineofanimage.

Page 1088: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1089: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagethatthefunctionusesforintensitymeasurement.

start Point Thecoordinatelocationofthestartoftheline.

end Point Thecoordinatelocationoftheendoftheline.

showMeasurement int SetthisparametertoTRUEtooverlaythelocationoftheintensitymeasurementontheimage.SetthisparametertoFALSEtoleavetheimageunmodified.

transform constCoordinateTransform2* Anoptionalspecificationofthecoordinatetransformfortheline.Thisparameterspecifieshowtotransformthelocationoftheintensitymeasurementbasedonthedifferencebetweenthereferencecoordinatesystemandthemeasurementcoordinatesystem.SetthisparametertoNULLifyoudonot

Page 1090: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

needtotransformtheline.

Page 1091: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

LineProfile* Onsuccess,thisfunctionreturnsareportcontaininginformationabouttheline.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththelineprofile,disposeofitbycallingimaqDispose().

Page 1092: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLightMeterPointUsageintimaqLightMeterPoint(Image*image,Pointpoint,intshowMeasurement,float*intensity,constCoordinateTransform2*transform);

Page 1093: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeMeasuresthepixelintensitiesina3x3pixelneighborhoodcenteredonapointofanimage.

Page 1094: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1095: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagethatthefunctionusesforintensitymeasurement.

point Point Thecoordinatelocationoftheintensitymeasurement.Theintensitymeasurementismadeina3x3blockcenteredonthepoint.

showMeasurement int SetthisparametertoTRUEtooverlaythelocationoftheintensitymeasurementontheimage.SetthisparametertoFALSEtoleavetheimageunmodified.

intensity float* Onreturn,theaverageintensityofthepixelsina3x3neighborhoodcenteredonthepoint.ThisparameterisrequiredandcannotbeNULL.

transform constCoordinateTransform2* Anoptionalspecificationofthecoordinatetransformforpoint.Thisparameterspecifieshowtotransformthe

Page 1096: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

locationoftheintensitymeasurementbasedonthedifferencebetweenthereferencecoordinatesystemandthemeasurementcoordinatesystem.SetthisparametertoNULLifyoudonotneedtotransformpoint.

Page 1097: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1098: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLightMeterRectUsageHistogramReport*imaqLightMeterRect(Image*image,RotatedRectrect,intshowMeasurement,constCoordinateTransform2*transform);

Page 1099: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeMeasuresthepixelintensitiesinarectangleofanimage.

Page 1100: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1101: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagethatthefunctionusesforintensitymeasurement.

rect RotatedRect Thecoordinatelocationoftherectangularareaoftheintensitymeasurement.

showMeasurement int SetthisparametertoTRUEtooverlaythelocationoftheintensitymeasurementontheimage.SetthisparametertoFALSEtoleavetheimageunmodified.

transform constCoordinateTransform2* Anoptionalspecificationofthecoordinatetransformforrect.Thisparameterspecifieshowtotransformthelocationoftheintensitymeasurementbasedonthedifferencebetweenthereferencecoordinatesystemandthemeasurementcoordinatesystem.SetthisparametertoNULLifyoudonotneedtotransform

Page 1102: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

rect.

Page 1103: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

HistogramReport* Onsuccess,thisfunctionreturnsareportdescribingthepixelvalueclassification.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereport,disposeofitbycallingimaqDispose().

Page 1104: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLinearAverages2UsageLinearAverages*imaqLinearAverages2(Image*image,LinearAveragesModemode,Rectrect);

Page 1105: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputesthemeanlineprofileofanimage.

Page 1106: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1107: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageonwhichthefunctioncalculatespixelvalueaverages.

mode LinearAveragesMode Thetypesoflinearaveragesthefunctionshouldcompute.

rect Rect Setstherectangularareainwhichthefunctioncalculatestheaverages.SetthisparametertoIMAQ_NO_RECTtocalculatetheaveragesonthewholeimage.

Page 1108: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

LinearAverages* Onsuccess,thisfunctionreturnsastructurecontainingthelinearaveragesoftheimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().

Page 1109: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLineGaugeTool2UsageintimaqLineGaugeTool2(constImage*image,Pointstart,Pointend,LineGaugeMethodmethod,constEdgeOptions*edgeOptions,constCoordinateTransform2*transform,float*distance);

Page 1110: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeMeasuresthedistancebetweenselectededgesofalinewithhigh-precisionsubpixelaccuracy.

Page 1111: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1112: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageinwhichthefunctionmeasuresthedistancebetweenedges.

start Point Thestartingpointoftheline.end Point Theendingpointoftheline.method LineGaugeMethod Themeasurementmethod.edgeOptions constEdgeOptions* Describeshowyouwantthe

functiontofindedges.IfyousetmethodtoIMAQ_POINT_TO_POINT,thefunctionignoresedgeOptions.IfyousetmethodtoanythingotherthanIMAQ_POINT_TO_POINT,thisparameterisrequiredandcannotbeNULL.

transform constCoordinateTransform2* Anoptionalspecificationofthecoordinatetransformfortheline.Thisparameterspecifieshowtotransformthelocationoftheedgedetectionbasedonthedifferencebetweenthereferencecoordinatesystemandthemeasurementcoordinatesystem.SetthisparametertoNULLifyoudonotneedtotransformtheline.

distance float* Onreturn,thedistancebetweenedgesand/or

Page 1113: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

points.ThisparameterisrequiredandcannotbeNULL.

Page 1114: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1115: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLineProfileUsageLineProfile*imaqLineProfile(constImage*image,Pointstart,Pointend);

Page 1116: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputestheprofileofalineofpixels.

Page 1117: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1118: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagecontainingalinewhoseprofilethefunctioncomputes.

start Point Thefirstpointoftheline.end Point Thelastpointoftheline.

Page 1119: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

LineProfile* Onsuccess,thisfunctionreturnsareportcontaininginformationabouttheline.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththelineprofile,disposeofitbycallingimaqDispose().

Page 1120: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLoadImagePopupUsagechar**imaqLoadImagePopup(constchar*defaultDirectory,constchar*defaultFileSpec,constchar*fileTypeList,constchar*title,intallowMultiplePaths,ButtonLabelbuttonLabel,intrestrictDirectory,intrestrictExtension,intallowCancel,intallowMakeDirectory,int*cancelled,int*numPaths);

Page 1121: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeDisplaysafileselectiondialogboxthatpreviewsimagesandwaitsfortheusertoselectanimagefile(s)orclickCancel.

Page 1122: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

defaultDirectory constchar* Thedirectorythatthedialogboxopensto.

defaultFileSpec constchar* Stringthatspecifiesthefilestodisplay.Forexample,avalueof*.bmpdisplaysallfileswiththe.bmpextension.

fileTypeList constchar* Stringthatspecifiesotherfiletypestheusercanchoosetodisplay,suchas.jpgor.png.Useasemicolon(;)ordelimiterbetweeneachfiletypeextension.

title constchar* Thetitleofthedialogbox.allowMultiplePaths int SetthisparametertoTRUEtoallow

theusertoselectmultiplefiles.SetthisparametertoFALSEtoallowtheusertoonlyselectonefile.

buttonLabel ButtonLabel ThelabelontheOKbutton.restrictDirectory int SetthisparametertoTRUEto

preventtheuserfromchangingdirectoriesordrives.SetthisparametertoFALSEtoallowtheusertochangedirectoriesordrives.

restrictExtension int SetthisparametertoTRUEtolimittheusertoselectingfileswiththedefaultextensionspecifiedbydefaultFileSpec.SetthisparametertoFALSEtoallowtheusertoselectfileswithanyextension.

allowCancel int SetthisparametertoTRUEtoallowtheusertocanceloutofthedialogbox.SetthisparametertoFALSEto

Page 1123: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

forcetheusertomakeaselectionbeforeclosingthedialogbox.

allowMakeDirectory int SetthisparametertoTRUEtoallowtheusertomakeanewdirectoryfromwithinthedialogbox.SetthisparametertoFALSEtopreventtheuserfrommakinganewdirectory.

cancelled int* Onreturn,specifieswhethertheusercancelledthedialogbox.SetthisparametertoNULLifyoudonotneedthisinformation.

numPaths int* Onreturn,thenumberoffilestheuserselected.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1124: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

char** Onsuccess,thisfunctionreturnsanarrayoffilepathsthattheuserselected.ThearraycontainsanumberofstringsequaltothevalueofnumPaths.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththearray,disposeofitbycallingimaqDispose().

Page 1125: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLocalThresholdUsageintimaqLocalThreshold(Image*dest,constImage*source,unsignedintwindowWidth,unsignedintwindowHeight,LocalThresholdMethodmethod,doubledeviationWeight,ObjectTypetype,floatreplaceValue);

Page 1126: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeAutomaticallythresholdsanimageintoabinaryimagebasedontherequestedlocaladaptivethresholdingmethod.

Page 1127: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16

Page 1128: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagetothreshold.windowWidth unsignedint Thewidthoftherectangular

windowaroundthepixelonwhichthefunctionperformsthelocalthreshold.Thisnumbermustbeatleast3andcannotbelargerthanthewidthofsource.

windowHeight unsignedint Theheightoftherectangularwindowaroundthepixelonwhichthefunctionperformsthelocalthreshold.Thisnumbermustbeatleast3andcannotbelargerthantheheightofsource.

method LocalThresholdMethod Specifiesthelocalthresholdingmethodthefunctionuses.

deviationWeight double SpecifiesthekconstantusedintheNiblacklocalthresholdingalgorithm,whichdeterminestheweightappliedtothevariancecalculation.Validkconstantsrangefrom0to1.Settingsthisvalueto0willincreasetheperformanceofthefunctionbecausethefunctionwillnotcalculatethevarianceforanyofthepixels.ThefunctionignoresthisvalueifmethodisnotsettoIMAQ_NIBLACK.

Page 1129: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

type ObjectType Specifiesthetypeofobjectsforwhichyouwanttolook.

replaceValue float Specifiesthereplacementvaluethefunctionusesforthepixelsofthekeptobjectsinthedestinationimage.

Page 1130: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1131: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionwindowWidth,windowHeight—Thewindowshouldbesizedaslargeaspossiblebutsmallenoughthateachwindowcontainspixelsundersimilarlightingconditions.Thefunctionwillproduceinconsistentresultsforwindowsthatcontainuniformpixelvalues.

Page 1132: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLogicalDifferenceUsageintimaqLogicalDifference(Image*dest,constImage*sourceA,constImage*sourceB);

Page 1133: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputesabitwiselogicaldifference(AANDNOTB)betweentwoimages.

Page 1134: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1135: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.sourceA constImage* Thefirstsourceimage.sourceB constImage* Thesecondsourceimage,whichmustbethe

sametypeofimageassourceA.

Page 1136: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1137: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLogicalDifferenceConstantUsageintimaqLogicalDifferenceConstant(Image*dest,constImage*source,PixelValuevalue);

Page 1138: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposePerformsabitwiselogicaldifference(AANDNOTB)betweenanimageandaconstant.

Page 1139: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1140: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.value PixelValue ThevaluetoANDNOTtothesourceimage.Set

thememberofvaluethatcorrespondstotheimagetype.

Page 1141: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1142: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLookupUsageintimaqLookup(Image*dest,constImage*source,constshort*table,constImage*mask);

Page 1143: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposePerformsatransformationonanimagebyreplacingeachpixelvaluewiththelookuptableentrycorrespondingtothatvalue.

Page 1144: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16

Page 1145: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.table constshort* Thelookuptable.For8-bitimages,thelookup

tablemustcontain256elements.Thefunctionreplaceseachpixelvaluevwithtable[v].For16-bitimages,thelookuptablemustcontain65,536elements.Thefunctionreplaceseachnon-negativepixelvaluevwithtable[v]andreplaceseachnegativepixelvaluevwithtable[65536+v].

mask constImage* Anoptionalmaskimage.ThisimagemustbeanIMAQ_IMAGE_U8image.Thefunctionappliesthelookuponlytothosesourcepixelswhosecorrespondingmaskpixelsarenon-zero.Allotherpixelsremainunchanged.SetthisparametertoNULLtoapplythelookuptotheentiresourceimage.

Page 1146: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1147: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLowPassUsageintimaqLowPass(Image*dest,Image*source,intwidth,intheight,floattolerance,constImage*mask);

Page 1148: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFiltersanimageusinganon-linearfilter.Foreachpixel,thealgorithmconsiderstheneighborhoodspecifiedbythegivenfiltersizes.Ifthecurrentpixelvaluevariesfromthevalueofitsneighborsmorethanthespecifiedtolerance,thefunctionsetsthepixelvaluetotheaveragevalueofitsneighborhood.Ifthecurrentpixelvaluevariesfromthevalueofitsneighborslessthanthespecifiedtolerance,thefunctiondoesnotchangethevalueofthepixel.

Page 1149: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1150: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source Image* Theimagetofilter.Thefiltermodifiestheborder

ofthesourceimage.Thebordermustbeatleasthalfaslargeasthelargeroftheneighborhooddimensions.

width int Thewidthoftherectangularneighborhoodaroundthepixelonwhichthefunctionoperates.Thisnumbermustbeodd.

height int Theheightoftherectangularneighborhoodaroundthepixelonwhichthefunctionoperates.Thisnumbermustbeodd.

tolerance float Themaximumallowablevariance.mask constImage* Anoptionalmaskimage.Thisimagemustbean

IMAQ_IMAGE_U8image.Thefunctionfiltersonlythosepixelsinthesourceimagewhosecorrespondingpixelsinthemaskarenon-zero.SetthisparametertoNULLtoapplythefiltertotheentiresourceimage.

Page 1151: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1152: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 1153: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMagicWandUsageintimaqMagicWand(Image*dest,constImage*source,Pointcoord,floattolerance,intconnectivity8,floatreplaceValue);

Page 1154: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCreatesamaskofaparticleinanimagebyselectingaparticleatthegivenlocationandsettingallthepixelsofthatparticletoaspecifiedvalue.Thefunctionsetsallotherpixelvaluesto0.

Page 1155: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1156: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Onreturn,themaskimage.ThisimagemustbeanIMAQ_IMAGE_U8image.

source constImage* Thesourceimagecontainingtheparticletomask.

coord Point Thecoordinatesofthereferencepointintheparticletomask.

tolerance float Specifiesthepixelvaluetolerancethatthefunctionusestodeterminewhetherneighborsofthereferencepointarepartoftheparticle.

connectivity8 int SetthisparametertoTRUEtouseconnectivity-8todeterminewhetherpixelsarepartofthesameparticle.SetthisparametertoFALSEtouseconnectivity-4todeterminewhetherpixelsarepartofthesameparticle.Formoreinformationaboutconnectivity,refertoChapter9,BinaryMorphology,intheNIVisionConceptsManual.

replaceValue float Thevaluetowhichpixelsintheselectedobjectareset.Pixelsnotintheobjectaresetto0.

Page 1157: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1158: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMakeAnnulusUsageAnnulusimaqMakeAnnulus(Pointcenter,intinnerRadius,intouterRadius,doublestartAngle,doubleendAngle);

Page 1159: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsanAnnulusstructurewiththevaluesyouspecify.TheAnnulusstructuredefinesthelocationandsizerotationofanannulus.YoucanembedacalltoimaqMakeAnnulus()incallstootherNIVisionfunctionsthatrequireAnnulusstructuresasinputparameters,therebyeliminatingtheneedtodeclareanAnnulusvariable.

Page 1160: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

center Point Thelocationofthecenteroftheannulus.innerRadius int Theinternalradiusoftheannulus.outerRadius int Theexternalradiusoftheannulus.startAngle double Thestartangle,indegrees,oftheannulus.endAngle double Theendangle,indegrees,oftheannulus.

Page 1161: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

Annulus ThisfunctionreturnsanAnnulusstructurecontainingthecoordinatevaluesyouspecify.

Page 1162: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMakePointUsagePointimaqMakePoint(intxCoordinate,intyCoordinate);

Page 1163: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsaPointstructurewiththevaluesyouspecify.ThePointstructuredefinesthelocationofapoint.YoucanembedacalltoimaqMakePoint()incallstootherNIVisionfunctionsthatrequirePointstructuresasinputparameters,therebyeliminatingtheneedtodeclareaPointvariable.

Page 1164: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

xCoordinate int Horizontallocationofthepoint.yCoordinate int Verticallocationofthepoint.

Page 1165: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

Point ThisfunctionreturnsaPointstructurecontainingthecoordinatevaluesyouspecify.

Page 1166: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMakePointFloatUsagePointFloatimaqMakePointFloat(floatxCoordinate,floatyCoordinate);

Page 1167: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsaPointFloatstructurewiththevaluesyouspecify.ThePointFloatstructuredefinesthelocationofapoint.YoucanembedacalltoimaqMakePointFloat()incallstootherNIVisionfunctionsthatrequirePointFloatstructuresasinputparameters,therebyeliminatingtheneedtodeclareaPointFloatvariable.

Page 1168: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

xCoordinate float Horizontallocationofthepoint.yCoordinate float Verticallocationofthepoint.

Page 1169: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

PointFloat ThisfunctionreturnsaPointFloatstructurecontainingthecoordinatevaluesyouspecify.

Page 1170: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMakeRectUsageRectimaqMakeRect(inttop,intleft,intheight,intwidth);

Page 1171: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsaRectstructurewiththevaluesyouspecify.TheRectstructuredefinesthelocationandsizeofarectangle.YoucanembedacalltoimaqMakeRect()incallstootherNIVisionfunctionsthatrequireRectstructuresasinputparameters,therebyeliminatingtheneedtodeclareaRectvariable.IfyouareusingLabWindows/CVI,notethatthisfunctionduplicatesthefunctionalityoftheLabWindows/CVIfunctionMakeRect().

Page 1172: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

top int Locationofthetopedgeoftherectangle.left int Locationoftheleftedgeoftherectangle.height int Heightoftherectangle.width int Widthoftherectangle.

Page 1173: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

Rect ThisfunctionreturnsaRectstructurecontainingthecoordinatevaluesyouspecify.

Page 1174: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMakeRectFromRotatedRectUsageRectimaqMakeRectFromRotatedRect(RotatedRectrotatedRect);

Page 1175: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsaRectstructurethatrepresentstheboundingrectangleoftherotatedrectanglewiththevaluesyouspecify.Notethatifyousupplyarotatedrectanglewithanangleotherthan0,90,180,or270degrees,thefunctionreturnsaboundingrectanglelargerthentherotatedrectangle.YoucanembedacalltoimaqMakeRectFromRotatedRect()incallstootherNIVisionfunctionsthatrequireRectstructuresasinputparameters,therebyeliminatingtheneedtodeclareaRectvariable.

Page 1176: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

rotatedRect RotatedRect Therotatedrectangleforwhichthefunctionreturnstheboundingrectangle.

Page 1177: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

Rect ThisfunctionreturnsaRectstructurerepresentingtheboundingboxoftherotatedrectangleyouspecify.

Page 1178: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMakeRotatedRectUsageRotatedRectimaqMakeRotatedRect(inttop,intleft,intheight,intwidth,doubleangle);

Page 1179: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsaRotatedRectstructurewiththevaluesyouspecify.TheRotatedRectstructuredefinesthelocation,size,androtationofarectangle.YoucanembedacalltoimaqMakeRotatedRect()incallstootherNIVisionfunctionsthatrequireRotatedRectstructuresasinputparameters,therebyeliminatingtheneedtodeclareaRotatedRectvariable.

Page 1180: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

top int Locationofthetopedgeoftherectanglebeforerotation.left int Locationoftheleftedgeoftherectanglebeforerotation.height int Heightoftherectangle.width int Widthoftherectangle.angle double Therotation,indegrees,oftherectangle.

Page 1181: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

RotatedRect ThisfunctionreturnsaRotatedRectstructurecontainingthecoordinatevaluesyouspecify.

Page 1182: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMakeRotatedRectFromRectUsageRotatedRectimaqMakeRotatedRectFromRect(Rectrect);

Page 1183: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsaRotatedRectstructureequivalentinsizeandlocationtotherectangleyouspecify.Theangleoftheresultingrotatedrectangleisalwayszero.TheRotatedRectstructuredefinesthelocation,size,androtationofarectangle.YoucanembedacalltoimaqMakeRotatedRect()incallstootherNIVisionfunctionsthatrequireRotatedRectstructuresasinputparameters,therebyeliminatingtheneedtodeclareaRotatedRectvariable.

Page 1184: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

rect Rect Therectanglethefunctionconvertsintoarotatedrectangle.

Page 1185: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

RotatedRect ThisfunctionreturnsaRotatedRectequivalentinsizeandlocationtotherectangleyouspecify.

Page 1186: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMaskUsageintimaqMask(Image*dest,constImage*source,constImage*mask);

Page 1187: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCopiesthesourceimagetothedestinationimageinthefollowingmanner:Ifapixelinthemaskhasavalueof0,thefunctionsetsthecorrespondingsourcepixelto0.Otherwise,thefunctioncopiesthecorrespondingsourcepixeltothedestinationimage.

Page 1188: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1189: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.mask constImage* Themaskimage.Thisimagemustbean

IMAQ_IMAGE_U8image.

Page 1190: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1191: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMaskToROIUsageROI*imaqMaskToROI(constImage*mask,int*withinLimit);

Page 1192: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeTransformsamaskimageintoaregionofinterest(ROI)descriptor.

Page 1193: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 1194: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

mask constImage* ThemaskimagethatthefunctiontransformsintoaROI.ThisimagemustbeanIMAQ_IMAGE_U8image.

withinLimit int* Onreturn,thisparameterindicateswhethertheROIisatruerepresentationofthemask.IfTRUE,thenumberofpointsiswithintheINT_MAXpointlimit.IfFALSE,thenumberofpointsexceedstheINT_MAXpointlimit,andtheROImaynotrepresentthemaskcompletely.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1195: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ROI* Onsuccess,thisfunctionreturnsapointertotheROIdescriptor.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisdescriptor,disposeofthepointerbycallingimaqDispose().

Page 1196: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMatchColorUsageint*imaqMatchColor(constImage*image,constColorInformation*info,constROI*roi,int*numScores);

Page 1197: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeDetermineshowcloselycolorsinanimagematchcolorsinthegivencolorinformation.

Page 1198: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1199: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagecontainingcolorsyouwanttocomparewiththegivencolorinformation.

info constColorInformation* Thecolorinformation.CallimaqLearnColor()togetthecolorinformation.ThisparameterisrequiredandcannotbeNULL.

roi constROI* Theregionoftheimageinwhichtocomparethecolors.Allregioncontoursareconsideredtobeexternal.Ifroicontainsmultipleregions,thecolorinformationineachregioniscomparedindividuallytothecolorinformationspecifiedbytheinfoparameterandthematchresultsarereportedforeachregionSettheparametertoNULLtocomparecolorsintheentireimage.

numScores int* Onreturn,containsthenumberofvaluesinthescorearray.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1200: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int* Onsuccess,thisfunctionreturnsanarrayfilledwithscoresdescribingtheclosenessofamatchbetweeneachcontourintheregionofinterest(ROI)andthecolorinformation.Ascoreof1,000indicatesaperfectmatch.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisarray,disposeofitbycallingimaqDispose().

Page 1201: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMatchColorPatternUsagePatternMatch*imaqMatchColorPattern(constImage*image,Image*pattern,constMatchColorPatternOptions*options,RectsearchRect,int*numMatches);

Page 1202: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSearchesforareasinanimagethatmatchagivencolortemplateimage.

Page 1203: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1204: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageinwhichthefunctionfindsmatchestothecolortemplateimage.

pattern Image* Thecolortemplateimagetofindintheimage.NIVisionmustlearnthistemplateimageinimaqLearnColorPattern()beforeusingitinthisfunction.

options constMatchColorPatternOptions* Describeshowtosearchforthecolortemplateimage.

searchRect Rect Specifiesarectangleintheimageinwhichtosearchforthetemplateimage.SetthisparametertoIMAQ_NO_RECTtosearchforthepatternimageintheentireimage.

numMatches int* Onreturn,thenumberofmatchestothetemplateimagethatthefunctionfound.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1205: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

PatternMatch* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().

Page 1206: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:

matchMode IMAQ_MATCH_SHIFT_INVARIANTfeatureMode IMAQ_COLOR_AND_SHAPEminContrast 0subpixelAccuracy FALSEangleRanges NULL(allanglesallowed)numRanges 0colorScoreWeight 500colorSensitivity IMAQ_SENSITIVITY_LOWsearchStrategy IMAQ_CONSERVATIVEnumMatchesRequested 1minMatchScore 800

Page 1207: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMatchGeometricPattern2UsageGeometricPatternMatch2*imaqMatchGeometricPattern2(constImage*image,constImage*pattern,constCurveOptions*curveOptions,constMatchGeometricPatternOptions*matchOptions,constMatchGeometricPatternAdvancedOptions2*advancedMatchOptions,constROI*roi,int*numMatches);

Page 1208: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSearchesforareasinanimagethatmatchagivengeometrictemplateimage.

Page 1209: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 1210: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type

image constImage*

pattern constImage*

curveOptions constCurveOptions*

matchOptions constMatchGeometricPatternOptions*

Page 1211: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

advancedMatchOptions constMatchGeometricPatternAdvancedOptions2*

roi constROI*

numMatches int*

Page 1212: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

GeometricPatternMatch2* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().

Page 1213: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionmatchOptions—SetmatchOptionstoNULLtousethedefaultmatchoptions,asfollows:

mode IMAQ_GEOMETRIC_MATCH_ROTATION_INVARIANTsubpixelAccuracy FALSEangleRanges NULL(allanglesallowed)numRanges 0scaleRange {75,125}occlusionRange {0,25}numMatchesRequested 1minMatchScore 800

advancedMatchOptions—SetadvancedMatchOptionstoNULLtousethedefaultadvancedmatchoptions,asfollows:

minFeaturesUsed 5maxFeaturesUsed 5subpixelIterations 20subpixelTolerance 0initialMatchListLength 200matchTemplateCurveScore FALSEcorrelationScore TRUEminMatchSeparationDistance 20minMatchSeparationAngle 10minMatchSeparationScale 10maxMatchOverlap 80coarseResult FALSEsmoothContours FALSEenableCalibrationSupport TRUE

Page 1214: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMatchMultipleGeometricPatternsUsageGeometricPatternMatch2*imaqMatchMultipleGeometricPatterns(constImage*image,constMultipleGeometricPattern*multiplePattern,constROI*roi,int*numMatches);

Page 1215: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSearchesfortheareasintheimagethatmatchthetemplateimagesinthegivenmultiplegeometrictemplate.

Page 1216: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 1217: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageinwhichthefunctionfindsmatchestothetemplateimages.

multiplePattern constMultipleGeometricPattern* Thepatternstofindintheimage.YoumustlearnthismultiplegeometrictemplateusingimaqLearnMultipleGeometricPatterns()beforeusingitinthisfunction.ThisparameterisrequiredandcannotbeNULL.

roi constROI* Specifieswhere,inimagefunctionsearchesforthetemplateimages.Thefirstandonlycontourofroimustbearectangleorarotatedrectangle.SetthisparametertoNULLtospecifythatthefunctionsearchesintheentireimage.

numMatches int* Onreturn,thenumberofmatchesthatthefunctionfound.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1218: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

GeometricPatternMatch2* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().

Page 1219: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMatchPattern2UsagePatternMatch*imaqMatchPattern2(constImage*image,constImage*pattern,constMatchPatternOptions*options,constMatchPatternOptions*advancedOptions,RectsearchRect,int*numMatches);

Page 1220: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSearchesforareasinanimagethatmatchagiventemplateimage.

Page 1221: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 1222: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageinwhichthefunctionfindsmatchestothetemplateimage.

pattern constImage* Thepatternimagetofindintheimage.UseimaqLearnPattern2()tolearnthetemplateimagebeforeusingitwiththisfunction.

options constMatchPatternOptions* Describeshowtosearchforthetemplateimage.

advancedOptions constMatchPatternOptions* Describesadditionallyhowtosearchforthetemplateimage.

searchRect Rect Specifiesarectangleintheimageinwhichtosearchforthetemplateimage.SetthisparametertoIMAQ_NO_RECTtosearchforthetemplateimageintheentireimage.

numMatches int* Onreturn,thenumberofmatchestothetemplateimagethatthefunctionfound.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1223: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

PatternMatch* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().

Page 1224: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:

mode IMAQ_MATCH_SHIFT_INVARIANTminContrast 10subpixelAccuracy FALSEangleRanges NULL(allanglesallowed)numRanges 0numMatchesRequested 1matchFactor 0minMatchScore 800

Page 1225: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMatchShapeUsageShapeReport*imaqMatchShape(Image*dest,Image*source,constImage*templateImage,intscaleInvariant,intconnectivity8,doubletolerance,int*numMatches);

Page 1226: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFindsashapeinanimage.Inmostcases,useimaqMatchPattern()insteadofthisfunction.Forinformationaboutwhentouseshapematching,seeChapter12,PatternMatching,oftheNIVisionConceptsManual.

Page 1227: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16

Page 1228: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Onreturn,theobjectsinthesourceimagethatmatchtheobjectinthetemplateimage.

source Image* Theimageinwhichthefunctionsearchesforshapes.

templateImage constImage* The8-bitimagecontainingtheshapetofind.

scaleInvariant int SetthisparametertoTRUEtosearchforshapesregardlessofsize.SetthisparametertoFALSEtosearchforshapesthatare±10percentofthesizeofthetemplateshape.

connectivity8 int SetthisparametertoTRUEtouseconnectivity-8todeterminewhetherparticlesaretouching.SetthisparametertoFALSEtouseconnectivity-4todeterminewhetherparticlesaretouching.Formoreinformationaboutconnectivity,seeChapter9,BinaryMorphology,intheNIVisionConceptsManual.

tolerance double Indicatestheallowabledifferencebetweenthetemplateshapeandsimilarshapesintheimage.Thedifferenceisexpressedasavaluefrom0to1.

numMatches int* Onreturn,thenumberofmatchestothetemplateimage.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1229: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ShapeReport* Onsuccess,thisfunctionreturnsanarrayofreportsdescribingthematchestothegiventemplateshape.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththearray,disposeofitbycallingimaqDispose().

Page 1230: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 1231: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMathTransformUsageintimaqMathTransform(Image*dest,constImage*source,MathTransformMethodmethod,floatrangeMin,floatrangeMax,floatpower,constImage*mask);

Page 1232: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeTransformsanimagebyapplyingatransferfunctiontothevalueofeachpixel.ThefunctionappliesthetransformT(x)overaspecifiedinputrange[rangeMin,rangeMax]inthefollowingmanner:T(x)=dynamicMinifx<=rangeMinf(x)ifrangeMin<x<=rangeMaxdynamicMaxifx>rangeMaxwheredynamicMin=0(8-bitimages)orthesmallestinitialpixelvalue(16-bitandfloatingpointimages)dynamicMax=255(8-bitimages)orthelargestinitialpixelvalue(16-bitandfloatingpointimages)dynamicRange=dynamicMax-dynamicMinThefunctionscalesf(x)sothatf(rangeMin)=dynamicMinandf(rangeMax)=dynamicMax.f(x)behaveson(rangeMin,rangeMax)accordingtothemethodyouselect.

Page 1233: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1234: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.method MathTransformMethod Thetransformfunctiontouse.rangeMin float Thesmallestpixelvalueonwhichthe

functionappliesthetransform.rangeMax float Thelargestpixelvalueonwhichthe

functionappliesthetransform.power float Ifyousetmethodto

IMAQ_TRANSFORM_POWXorIMAQ_TRANSFORM_POW1X,powerspecifiesthepowertowhichthefunctionraisesthevalue.

mask constImage* Anoptionalmask.ThisimagemustbeanIMAQ_IMAGE_U8image.Thefunctiontransformsonlythosesourcepixelswhosecorrespondingmaskpixelsarenon-zero.Allotherpixelsremainunchanged.SetthisparametertoNULLtoapplythetransformtotheentiresourceimage.

Page 1235: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1236: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMaxUsageintimaqMax(Image*dest,constImage*sourceA,constImage*sourceB);

Page 1237: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCopiesthelargerpixelvalueofthetwosourcesintothedestinationforeachpixel.

Page 1238: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1239: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.sourceA constImage* Thefirstsourceimage.sourceB constImage* Thesecondsourceimage,whichmustbethe

sametypeofimageassourceA.

Page 1240: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1241: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMaxConstantUsageintimaqMaxConstant(Image*dest,constImage*source,PixelValuevalue);

Page 1242: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCopiesthesourceimagetothedestinationinthefollowingmanner:Ifthesourceimagepixelvalueisgreaterthanthegivenconstant,thefunctioncopiesthesourcepixeltothedestination.Otherwise,thefunctioncopiestheconstanttothedestination.

Page 1243: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1244: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thefirstsourceimage.value PixelValue Thevaluetouseinthecomputation.Usethe

grayscalememberofthePixelValueunion.

Page 1245: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1246: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMeasureParticleUsageintimaqMeasureParticle(Image*image,intparticleNumber,intcalibrated,MeasurementTypemeasurement,double*value);

Page 1247: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsameasurementassociatedwithaparticle.CallimaqCountParticles()beforecallingimaqMeasureParticle().

Page 1248: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1249: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagecontainingtheparticletogetinformationabout.

particleNumber int Thenumberoftheparticletogetinformationabout.

calibrated int Specifieswhethertoreturnthemeasurementasareal-worldvalue.

measurement MeasurementType Themeasurementtomakeontheparticle.

value double* Onreturn,thevalueoftherequestedmeasurement.ThisparametercannotbeNULL.

Page 1250: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1251: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 1252: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMedianFilterUsageintimaqMedianFilter(Image*dest,Image*source,intwidth,intheight,constImage*mask);

Page 1253: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFiltersanimageusinganonlinearfilter.Foreachpixel,thealgorithmtakestheneighborhoodspecifiedbythegivenfiltersizesandreplacesthepixelwiththemedianvalueoftheneighborhood.

Page 1254: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1255: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source Image* Theimagetofilter.Thefiltermodifiestheborderof

thesourceimage.Thebordermustbeatleasthalfaslargeasthelargeroftheneighborhooddimensions.

width int Thewidthoftherectangularneighborhoodaroundthepixelonwhichthefunctionoperates.Thisnumbermustbeodd.

height int Theheightoftherectangularneighborhoodaroundthepixelonwhichthefunctionoperates.Thisnumbermustbeodd.

mask constImage* Anoptionalmask.ThisimagemustbeanIMAQ_IMAGE_U8image.Thefunctionfiltersonlythosesourcepixelswhosecorrespondingmaskpixelsarenon-zero.SetthisparametertoNULLtoapplythefiltertotheentiresourceimage.

Page 1256: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1257: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 1258: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMergeOverlayUsageintimaqMergeOverlay(Image*dest,constImage*source,constRGBValue*palette,unsignedintnumColors,constchar*group);

Page 1259: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeMakesanondestructiveoverlaypartoftheimagecontent.Thisprocesscreatesadestructiveoverlay.TheVIthenremovesthenondestructiveoverlay.TheresultingimageisanRGBimage.

Page 1260: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1261: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.palette constRGBValue* Anoptionalpalettetoassociatewith8-bit

images.IfthisparameterisnotNULL,itmustpointtoanarrayof256colors,whichrepresentthecolorpalettethatthefunctionassociateswiththeimage.IfthisparameterisNULL,thefunctionassociatesagrayscalepalettewiththeimage.

numColors unsignedint ThenumberofRGBValuesinthepalettearray.Iftherearelessthan256entriesinpalette,thefunctionmapsallpixelvaluespastthelastelementinpalettetotheassociatedgrayscalevalue.

group constchar* Overlaygroupnametomerge.SetthisparametertoNULLtomergealloverlays.

Page 1262: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1263: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMinUsageintimaqMin(Image*dest,constImage*sourceA,constImage*sourceB);

Page 1264: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCopiesthesmallerpixelvalueofthetwosourcesintothedestinationforeachpixel.

Page 1265: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1266: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.sourceA constImage* Thefirstsourceimage.sourceB constImage* Thesecondsourceimage,whichmustbethe

sametypeofimageassourceA.

Page 1267: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1268: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMinConstantUsageintimaqMinConstant(Image*dest,constImage*source,PixelValuevalue);

Page 1269: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCopiesthesourceimagetothedestinationinthefollowingmanner:Ifthesourceimagepixelvalueislessthanthegivenconstant,thefunctioncopiesthesourcepixeltothedestination.Otherwisethefunctioncopiestheconstanttothedestination.

Page 1270: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1271: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thefirstsourceimage.value PixelValue Thevaluetouseinthecomputation.Usethe

grayscalememberofthePixelValueunion.

Page 1272: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1273: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqModuloUsageintimaqModulo(Image*dest,constImage*sourceA,constImage*sourceB);

Page 1274: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeModulodividestwoimages.

Page 1275: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB

Page 1276: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.sourceA constImage* Thefirstimagetomodulodivide.sourceB constImage* Thesecondimagetomodulodivide.

Page 1277: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1278: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionTheimagetypeofsourceBdependsontheimagetypeofsourceA,asfollows:

IfsourceAisIMAQ_IMAGE_I16,sourceBmustbeIMAQ_IMAGE_I16orIMAQ_IMAGE_U8.IfsourceAisIMAQ_IMAGE_SGL,sourceBmustbeIMAQ_IMAGE_SGL,IMAQ_IMAGE_I16,orIMAQ_IMAGE_U8.IfsourceAisIMAQ_IMAGE_RGB,sourceBmustbeIMAQ_IMAGE_RGBorIMAQ_IMAGE_U8.

Otherwise,sourceBmustbethesametypeassourceA.

Page 1279: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqModuloConstantUsageintimaqModuloConstant(Image*dest,constImage*source,PixelValuevalue);

Page 1280: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposePerformsamodulodivisionoperationwitheachpixelinanimagebyaconstant.

Page 1281: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB

Page 1282: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagetobemodulodividedbythescalar

constant.value PixelValue Thevaluetouseasthedivisorintheoperation.

Setthememberofvaluethatcorrespondstotheimagetype.

Page 1283: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1284: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMorphologyUsageintimaqMorphology(Image*dest,Image*source,MorphologyMethodmethod,constStructuringElement*structuringElement);

Page 1285: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeAppliesmorphologicaltransformationstobinaryimages.

Page 1286: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 1287: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source Image* Theimageonwhichthe

functionperformsthemorphologicaloperations.Thecalculationmodifiestheborderofthesourceimage.Thebordermustbeatleasthalfaslargeasthelargerdimensionofthestructuringelement.

method MorphologyMethod Themorphologicaltransformtoapply.

structuringElement constStructuringElement* Thestructuringelementusedintheoperation.SetthisparametertoNULLifyoudonotwantacustomstructuringelement.

Page 1288: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1289: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 1290: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMoveContourUsageintimaqMoveContour(ROI*roi,ContourIDid,intdeltaX,intdeltaY);

Page 1291: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeMovesacontour.

Page 1292: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi ROI* Theregionofinterest(ROI)containingthecontourtomove.

id ContourID TheContourIDofthecontourtomove.deltaX int Theamounttomovethecontourinthexdirection.deltaY int Theamounttomovethecontourintheydirection.

Page 1293: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1294: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMoveToolWindowUsageintimaqMoveToolWindow(Pointposition);

Page 1295: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeMovesthetoolwindow.

Page 1296: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

position Point Thenewposition,inscreencoordinates,oftheupperleftcornerofthetoolwindow.

Page 1297: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1298: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMoveWindowUsageintimaqMoveWindow(intwindowNumber,Pointposition);

Page 1299: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeMovesanimagewindow.

Page 1300: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.position Point Thenewposition,inscreencoordinates,ofthe

upperleftcornerofthewindow.

Page 1301: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1302: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMulDivUsageintimaqMulDiv(Image*dest,constImage*sourceA,constImage*sourceB,floatvalue);

Page 1303: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputesaratiobetweenthetwosourceimages.Youfindtheratiobymultiplyingeachpixelvalueinthefirstsourceimagebytheconstantvalueyousupply.Thisresultisdividedbythecorrespondingpixelinthesecondsource,andthefinalresultisstoredinthedestinationimage.Youcanusethisfunctiontocorrectabackgroundifthebackgroundislighterthantheimage.Inabackgroundcorrection,thefirstsourceimageistheacquiredimageandthesecondsourceimageisthebackgroundimage.

Page 1304: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB

Page 1305: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.sourceA constImage* Thefirstsourceimage.sourceB constImage* Thesecondsourceimage,whichmustbethe

sametypeofimageassourceA.value float Thevaluebywhichthefunctionmultipliesthe

firstimage.

Page 1306: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1307: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMulticoreOptionsUsageintimaqMulticoreOptions(MulticoreOperationoperation,unsignedint*customNumCores);

Page 1308: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthenumberofavailablecorestouseforNIVisionapplications.

Page 1309: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

operation MulticoreOperation SpecifieswhethertheVIgetsorsetsthenumberofcoresavailabletoNIVision.

customNumCores unsignedint* ThenumberofprocessorcoresavailabletoNIVision.

Page 1310: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1311: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMultiplyUsageintimaqMultiply(Image*dest,constImage*sourceA,constImage*sourceB);

Page 1312: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeMultipliestwoimages.

Page 1313: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB

Page 1314: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.sourceA constImage* Thefirstimagetomultiply.sourceB constImage* Thesecondimagetomultiply.

Page 1315: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1316: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionTheimagetypeofsourceBdependsontheimagetypeofsourceA,asfollows:

IfsourceAisIMAQ_IMAGE_U8,sourceBmustbeIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,orIMAQ_IMAGE_RGB.IfsourceAisIMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,orIMAQ_IMAGE_COMPLEX,sourceBmustbeIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,orIMAQ_IMAGE_COMPLEX.IfsourceAisIMAQ_IMAGE_RGB,sourceBmustbeIMAQ_IMAGE_RGBorIMAQ_IMAGE_U8.

Page 1317: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMultiplyConstantUsageintimaqMultiplyConstant(Image*dest,constImage*source,PixelValuevalue);

Page 1318: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeMultiplieseachpixelinanimagebyaconstant.

Page 1319: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB

Page 1320: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thefirstsourceimage.value PixelValue Thevaluebywhichtomultiply.Setthememberof

valuethatcorrespondstotheimagetype.

Page 1321: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1322: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMultithresholdUsageintimaqMultithreshold(Image*dest,constImage*source,constThresholdData*ranges,intnumRanges);

Page 1323: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeThresholdsanimageintomultipleclasses.Thefunctionclassifieseachpixelintothefirstthresholdrangeofwhichitisamember.Ifapixelisnotamemberofanyofthegivenranges,thefunctionsetsitto0.Forexample,giventwothresholdranges:

rangeMin rangeMax useNewValue newValue80 150 TRUE 10120 200 FALSE ignored

Thefunctionoperatesasfollows:Thefunctionreplacespixelvaluesbelow80with0.Thefunctionreplacespixelvaluesfrom80to150with10.Thefunctiondoesnotchangepixelvaluesfrom151to200.Thefunctionreplacespixelvaluesabove200with0.

Formoreinformationaboutthresholding,refertoimaqThreshold().

Page 1324: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1325: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.ranges constThresholdData* Anarrayofthresholdranges.This

arrayisrequiredandcannotbeNULL.

numRanges int Thenumberofelementsintherangesarray.

Page 1326: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1327: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqNandUsageintimaqNand(Image*dest,constImage*sourceA,constImage*sourceB);

Page 1328: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputesabitwiseNANDbetweentwoimages.

Page 1329: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1330: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.sourceA constImage* Thefirstsourceimage.sourceB constImage* Thesecondsourceimage,whichmustbethe

sametypeofimageassourceA.

Page 1331: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1332: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqNandConstantUsageintimaqNandConstant(Image*dest,constImage*source,PixelValuevalue);

Page 1333: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposePerformsabitwiseNANDbetweenanimageandaconstant.

Page 1334: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1335: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.value PixelValue ThevaluetoNANDwiththesourceimage.Setthe

memberofvaluethatcorrespondstotheimagetype.

Page 1336: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1337: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqNorUsageintimaqNor(Image*dest,constImage*sourceA,constImage*sourceB);

Page 1338: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputesabitwiseNORbetweentwoimages.

Page 1339: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1340: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.sourceA constImage* Thefirstsourceimage.sourceB constImage* Thesecondsourceimage,whichmustbethe

sametypeofimageassourceA.

Page 1341: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1342: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqNorConstantUsageintimaqNorConstant(Image*dest,constImage*source,PixelValuevalue);

Page 1343: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposePerformsabitwiseNORbetweenanimageandaconstant.

Page 1344: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1345: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.value PixelValue ThevaluetoNORwiththesourceimage.Setthe

memberofvaluethatcorrespondstotheimagetype.

Page 1346: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1347: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqNthOrderFilterUsageintimaqNthOrderFilter(Image*dest,Image*source,intwidth,intheight,intn,constImage*mask);

Page 1348: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFiltersanimageusinganon-linearfilter.Foreachpixel,thealgorithmtakestheneighborhoodspecifiedbythegivenfiltersizesandreplacesthepixelwiththenthsmallestvalueintheneighborhood.

Page 1349: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1350: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source Image* Theimagetofilter.Thefiltermodifiestheborderof

thesourceimage.Thebordermustbeatleasthalfaslargeasthelargeroftheneighborhooddimensions.

width int Thewidthoftherectangularneighborhoodaroundthepixelonwhichthefunctionoperates.Thisnumbermustbeodd.

height int Theheightoftherectangularneighborhoodaroundthepixelonwhichthefunctionoperates.Thisnumbermustbeodd.

n int Specifieswhichvalueintheneighborhoodtoplaceinthedestination.Setnto0toselectthesmallestvalueintheneighborhood,setnto1toselectthenextsmallestvalue,andsoon.

mask constImage* Anoptionalimagemask.ThisimagemustbeanIMAQ_IMAGE_U8image.Thefunctionfiltersonlythosepixelsinthesourceimagewhosecorrespondingpixelsinthemaskarenon-zero.SetthisparametertoNULLtofiltertheentiresourceimage.

Page 1351: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1352: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 1353: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqOpenAVIUsageAVISessionimaqOpenAVI(constchar*fileName);

Page 1354: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeThisfunctionopensanexistingAVIfilesothatimagesanddatacanbereadfromit.

Page 1355: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

fileName constchar* ThenameoftheAVIfiletoopen.

Page 1356: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

AVISession Onsuccess,thisfunctionreturnsasessionIDassociatedwiththegivenAVIfile.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1357: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqOrUsageintimaqOr(Image*dest,constImage*sourceA,constImage*sourceB);

Page 1358: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputesabitwiseORbetweentwoimages.

Page 1359: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1360: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.sourceA constImage* Thefirstsourceimage.sourceB constImage* Thesecondsourceimage,whichmustbethe

sametypeofimageassourceA.

Page 1361: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1362: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqOrConstantUsageintimaqOrConstant(Image*dest,constImage*source,PixelValuevalue);

Page 1363: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposePerformsabitwiseORbetweenanimageandaconstant.

Page 1364: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1365: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.value PixelValue ThevaluetoORtothesourceimage.Setthe

memberofvaluethatcorrespondstotheimagetype.

Page 1366: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1367: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqOverlayArcUsageintimaqOverlayArc(Image*image,constArcInfo*arc,constRGBValue*color,DrawModedrawMode,constchar*group);

Page 1368: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeOverlaysanarcontoanimage.

Page 1369: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1370: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageonwhichtooverlaythearc.arc constArcInfo* Thelocationandsizeofthearc.color constRGBValue* Thecolorofthearc.Thealphacolor

channelisnotsupported.Settingthecolortotransparenthasthesameeffectasselectingblack.ThisparameterisrequiredandcannotbeNULL.

drawMode DrawMode Themodebywhichtodrawtheoverlay.ValidoptionsareIMAQ_DRAW_VALUEandIMAQ_PAINT_VALUE.

group constchar* Thegrouptowhichyouwanttoaddtheoverlay.SetthisparametertoNULLtoaddtheoverlaytothedefaultgroup.

Page 1371: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1372: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqOverlayBitmapUsageintimaqOverlayBitmap(Image*image,PointdestLoc,constRGBValue*bitmap,unsignedintnumCols,unsignedintnumRows,constchar*group);

Page 1373: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeOverlaysabitmapontoanimage.

Page 1374: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1375: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageonwhichtooverlaythebitmap.destLoc Point Thecoordinatesofthepixelintheimage

wherethefunctioncopiesthetop-leftpixelofthebitmap.

bitmap constRGBValue* Thetwo-dimensionalarrayofbitmapvaluestooverlayontheimage.ThisparameterisrequiredandcannotbeNULL.

numCols unsignedint Thenumberofcolumnsinthebitmaparray.

numRows unsignedint Thenumberofrowsinthebitmaparray.group constchar* Thegrouptowhichyouwanttoaddthe

overlay.SetthisparametertoNULLtoaddtheoverlaytothedefaultgroup.

Page 1376: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1377: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqOverlayClosedContourUsageintimaqOverlayClosedContour(Image*image,constPoint*points,intnumPoints,constRGBValue*color,DrawModedrawMode,constchar*group);

Page 1378: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeOverlaysanclosedcontourontoanimage.Tomakethecontour,thefunctionconnectseachpointinthearraytothenextpointinthearray,anditconnectsthelastpointinthearraytothefirstpointinthearray.

Page 1379: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1380: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageonwhichtooverlaytheopencontour.

points constPoint* Anarrayofpointsdescribingthelocationandshapeofthecontour.ThisparameterisrequiredandcannotbeNULL.

numPoints int Thenumberofpointsinthearray.color constRGBValue* Thecolorofthecontour.Thealphacolor

channelisnotsupported.Settingthecolortotransparenthasthesameeffectasselectingblack.ThisparameterisrequiredandcannotbeNULL.

drawMode DrawMode Themodebywhichtodrawtheoverlay.IMAQ_DRAW_VALUEandIMAQ_PAINT_VALUEarevalidoptions.

group constchar* Thegrouptowhichyouwanttoaddtheoverlay.SetthisparametertoNULLtoaddtheoverlaytothedefaultgroup.

Page 1381: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1382: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqOverlayLineUsageintimaqOverlayLine(Image*image,Pointstart,Pointend,constRGBValue*color,constchar*group);

Page 1383: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeOverlaysalineontoanimage.

Page 1384: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1385: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageonwhichtooverlaytheline.start Point Thecoordinatelocationofthestartoftheline.end Point Thecoordinatelocationoftheendoftheline.color constRGBValue* Thecoloroftheline.Thealphacolorchannelis

notsupported.Settingthecolortotransparenthasthesameeffectasselectingblack.ThisparameterisrequiredandcannotbeNULL.

group constchar* Thegrouptowhichyouwanttoaddtheoverlay.SetthisparametertoNULLtoaddtheoverlaytothedefaultgroup.

Page 1386: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1387: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqOverlayMetafileUsageintimaqOverlayMetafile(Image*image,constvoid*metafile,Rectrect,constchar*group);

Page 1388: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeOverlaysametafileontoanimage.

Page 1389: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1390: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageonwhichtooverlaythemetafile.metafile constvoid* TheWindowshandletothemetafilethatyouwant

toconvertintoanoverlay.ThehandlemaybeeitheranHMETAFILEorHENHMETAFILE.ThisparameterisrequiredandcannotbeNULL.

rect Rect Thelocationofrectangularregionwithintheimagethatthefunctionoverlaysthemetafile.Tousetheboundingrectangleinformationstoredinthemetafile,setthisparametertoIMAQ_NO_RECT.

group constchar* Thegrouptowhichyouwanttoaddtheoverlay.SetthisparametertoNULLtoaddtheoverlaytothedefaultgroup.

Page 1391: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1392: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqOverlayOpenContourUsageintimaqOverlayOpenContour(Image*image,constPoint*points,intnumPoints,constRGBValue*color,constchar*group);

Page 1393: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeOverlaysanopencontourontoanimage.Tomakethecontour,thefunctionconnectseachpointinthearraytothenextpointinthearray.Thefunctiondoesnotconnectthelastpointinthearraytothefirstpointinthearray.

Page 1394: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1395: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageonwhichtooverlaytheopencontour.

points constPoint* Anarrayofpointsdescribingthelocationandshapeofthecontour.ThisparameterisrequiredandcannotbeNULL.

numPoints int Thenumberofpointsinthearray.color constRGBValue* Thecolorofthecontour.Thealphacolor

channelisnotsupported.Settingthecolortotransparenthasthesameeffectasselectingblack.ThisparameterisrequiredandcannotbeNULL.

group constchar* Thegrouptowhichyouwanttoaddtheoverlay.SetthisparametertoNULLtoaddtheoverlaytothedefaultgroup.

Page 1396: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1397: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqOverlayOvalUsageintimaqOverlayOval(Image*image,RectboundingBox,constRGBValue*color,DrawModedrawMode,char*group);

Page 1398: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeOverlaysanovalontoanimage.

Page 1399: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1400: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageonwhichtooverlaytheoval.

boundingBox Rect Thecoordinatelocationoftheboundingrectangleoftheoval.

color constRGBValue* Thecoloroftheoval.Thealphacolorchannelisnotsupported.Settingthecolortotransparenthasthesameeffectasselectingblack.ThisparameterisrequiredandcannotbeNULL.

drawMode DrawMode Themodebywhichtodrawtheoverlay.ValidoptionsareIMAQ_DRAW_VALUEandIMAQ_PAINT_VALUE.

group char* Thegrouptowhichyouwanttoaddtheoverlay.SetthisparametertoNULLtoaddtheoverlaytothedefaultgroup.

Page 1401: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1402: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqOverlayPointsUsageintimaqOverlayPoints(Image*image,constPoint*points,intnumPoints,constRGBValue*colors,intnumColors,PointSymbolsymbol,constUserPointSymbol*userSymbol,constchar*group);

Page 1403: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeOverlaysaseriesofpointsontoanimage.

Page 1404: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1405: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageonwhichtooverlaythepoints.

points constPoint* Anarraydescribingthecoordinatelocationofeachpointtooverlay.ThisparameterisrequiredandcannotbeNULL.

numPoints int Thenumberofpointsinthearray.colors constRGBValue* Anarraydescribingthecolorofeach

pointtooverlay.Ifthearrayofcolorsissmallerthenthearrayofpoints,thefunctionassignsthefinalcolorinthearraytoeachpointthatdoesnothaveacorrespondingcolor.Thealphacolorchannelisnotsupported.Settingthecolortotransparenthasthesameeffectasselectingblack.ThisparameterisrequiredandcannotbeNULL.

numColors int ThenumberofRGBValuesinthearray.

symbol PointSymbol Thesymbolthefunctionusestorepresenteachpointthefunctionoverlays.

userSymbol constUserPointSymbol* IfsymbolisIMAQ_POINT_AS_USER_DEFINED,thisparameterdefinesthesymbol.Otherwise,thefunctionignoresthisparameterandyoushouldsetittoNULL.

group constchar* Thegrouptowhichyouwanttoaddtheoverlay.SetthisparametertoNULLtoaddtheoverlaytothe

Page 1406: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

defaultgroup.

Page 1407: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1408: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqOverlayRectUsageintimaqOverlayRect(Image*image,Rectrect,constRGBValue*color,DrawModedrawMode,constchar*group);

Page 1409: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeOverlaysarectangleontoanimage.

Page 1410: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1411: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageonwhichtooverlaytherectangle.

rect Rect Thecoordinatelocationoftherectangle.color constRGBValue* Thecoloroftherectangle.Thealphacolor

channelisnotsupported.Settingthecolortotransparenthasthesameeffectasselectingblack.ThisparameterisrequiredandcannotbeNULL.

drawMode DrawMode Themodebywhichtodrawtheoverlay.ValidmodesareIMAQ_DRAW_VALUE,IMAQ_PAINT_VALUE,andIMAQ_HIGHLIGHT_VALUE.

group constchar* Thegrouptowhichyouwanttoaddtheoverlay.SetthisparametertoNULLtoaddtheoverlaytothedefaultgroup.

Page 1412: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1413: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqOverlayROIUsageintimaqOverlayROI(Image*image,constROI*roi,PointSymbolsymbol,constUserPointSymbol*userSymbol,constchar*group);

Page 1414: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeOverlaysaregionofinterestontoanimage.

Page 1415: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1416: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageonwhichtooverlaytheregionofinterest.

roi constROI* Theregionofinteresttooverlayontotheimage.

symbol PointSymbol Thesymboltorepresentapointcontourintheoverlay.

userSymbol constUserPointSymbol* IfsymbolisIMAQ_POINT_AS_USER_DEFINED,thisparameterdefinesthesymbol.Otherwise,thefunctionignoresthisparameterandyoushouldsetittoNULL.

group constchar* Thegrouptowhichyouwanttoaddtheoverlay.SetthisparametertoNULLtoaddtheoverlaytothedefaultgroup.

Page 1417: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1418: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqOverlayTextUsageintimaqOverlayText(Image*image,Pointorigin,constchar*text,constRGBValue*color,constOverlayTextOptions*options,constchar*group);

Page 1419: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeOverlaysastringoftextontoanimage.

Page 1420: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1421: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageonwhichtooverlaythetext.

origin Point Thecoordinatelocationofthetextreferencepoint.

text constchar* Thetextthatthefunctionoverlays.ThisparameterisrequiredandcannotbeNULL.

color constRGBValue* Thecolorofthetext.Thealphacolorchannelisnotsupported.Settingthecolortotransparenthasthesameeffectasselectingblack.ThisparameterisrequiredandcannotbeNULL.

options constOverlayTextOptions* Themethodthatthefunctionusestooverlaytext.

group constchar* Thegrouptowhichyouwanttoaddtheoverlay.SetthisparametertoNULLtoaddtheoverlaytothedefaultgroup.

Page 1422: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1423: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:

fontName ArialfontSize 12bold FALSEitalic FALSEunderline FALSEstrikeout FALSEhorizontalTextAlignment IMAQ_LEFTverticalTextAlignment IMAQ_BOTTOMbackgroundColor IMAQ_RGB_TRANSPARENTangle 0

Page 1424: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqParticleFilter4UsageintimaqParticleFilter4(Image*dest,Image*source,constParticleFilterCriteria2*criteria,intcriteriaCount,constParticleFilterOptions2*options,constROI*roi,int*numParticles);

Page 1425: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFiltersparticlesbasedontheirmorphologicalmeasurements.

Page 1426: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1427: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimagethatwillcontainonlythefilteredparticles.

source Image* Theimagecontainingtheparticlestofilter.

criteria constParticleFilterCriteria2* Anarrayofcriteriatoapplytotheparticlesinthesourceimage.ThisarraycannotbeNULL.

criteriaCount int Thenumberofelementsinthecriteriaarray.

options constParticleFilterOptions2* Theoptionsusedbythefunctiontofilterbinaryparticles.

roi constROI* TheROIwhosecontoursaparticlemustbecontainedintoavoidbeingfilteredout.IfrejectBorderistrueinoptions,anyparticletouchingtheborderofacontourinroiwillalsobefilteredout.SetthisparametertoNULLtofilterparticlesintheentireimagebasedonthecriteriaarray.

numParticles int* Onreturn,thenumberofparticlesleftintheimage.

Page 1428: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1429: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.options—SetoptionstoNULLtousethefollowingdefaultvalues:

rejectMatches FALSErejectBorder FALSEfillHoles FALSEconnectivity8 TRUE

Page 1430: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqQuantifyUsageQuantifyReport*imaqQuantify(constImage*image,constImage*mask);

Page 1431: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCalculatesstatisticalparametersonanimage.

Page 1432: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1433: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagetoquantify.mask constImage* Ifprovided,alabeledversionofthesourceimage

specifyingtheregionstoquantify.ThisimagemustbeanIMAQ_IMAGE_U8imageorIMAQ_IMAGE_I16image.Onlythepixelsintheoriginalimagethatcorrespondtoanequivalentpixelinthemaskdifferentfrom0areusedforthequantification.Eachpixelinthismaskindicates,byitsvalue,whichregionbelongstothecorrespondingpixelintheimage.Upto255differentregionsforanIMAQ_IMAGE_U8image,or65,535regionsforanIMAQ_IMAGE_I16image,canbequantifieddirectlyfromtheimage.SetthisparametertoNULLifyouwantthefunctiontoquantifythewholeimageasoneregion.

Page 1434: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

QuantifyReport* Onsuccess,thisfunctionreturnsapointertoareportdescribingthestatisticalparametersoftheimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().

Page 1435: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqRake2UsageRakeReport2*imaqRake2(Image*image,ROI*roi,RakeDirectiondirection,EdgeProcessprocess,intstepSize,EdgeOptions2*edgeOptions);

Page 1436: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFindsedgesalongasetofparallellinesdefinedinsidearectangularregion.

Page 1437: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1438: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageinwhichtofindedges.roi ROI* Therectangularregionthefunctionlooks

infortheedges.Thefirstcontourofroimustbearectangleorarotatedrectangle.

direction RakeDirection Thedirectionthefunctionsearchesforedgesalongthesearchlines.

process EdgeProcess Definestheedgesforwhichthefunctionlooks.

stepSize int Specifiesthenumberofpixelsbetweeneachsearchline.

edgeOptions EdgeOptions2* Specifiestheparametersthatareusedtocomputetheedgeprofileanddetectedges.

Page 1439: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

RakeReport2* Onsuccess,thisfunctionreturnsinformationdescribingthecalculatededgesandtherakeusedbythefunction.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDispose().

Page 1440: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionedgeOptions—SetedgeOptionstoNULLtousethedefaultoptions,asfollows:

polarity IMAQ_SEARCH_FOR_ALL_EDGESkernelSize 3numSearchLines 3minThreshold 10.0interpolationType IMAQ_BILINEAR_FIXEDcolumnProcessingMode IMAQ_MEDIAN_COLUMNS

Page 1441: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqReadAVIFrameUsageintimaqReadAVIFrame(Image*image,AVISessionsession,unsignedintframeNum,void*data,unsignedint*dataSize);

Page 1442: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeThisfunctionreadstheimageandanyattacheddatafromanAVIfile.

Page 1443: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB

Page 1444: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageinwhichtheframeisstored.session AVISession Thesessiontouse.frameNum unsigned

intTheframenumbertoread.

data void* IftheAVIcontainsdataattachedtothisframe,thedatawillbestoredhere.

dataSize unsignedint*

Thesizeofthedatabufferpassedin.Onreturn,thesizeofthedata.IfNULLispassedin,nodatawillbereturned.

Page 1445: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1446: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqReadBarcodeUsageBarcodeInfo*imaqReadBarcode(constImage*image,BarcodeTypetype,constROI*roi,intvalidate);

Page 1447: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReadsabarcodefromanimage.

Page 1448: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1449: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagecontainingthebarcodetoread.type BarcodeType Thetypeofthebarcodetoread.roi constROI* Aregionofinterestspecifyingthelocationofthe

barcodeintheimage.Thefirstcontourofroimustbearectangle.SetthisparametertoNULLtousetheentireimage.

validate int IftypeisIMAQ_I2_OF_5,IMAQ_CODE39,orIMAQ_CODABAR,setvalidatetoTRUEtousetheerrorcorrectioninformationofthebarcodetovalidatethedata.IftypeisnotIMAQ_I2_OF_5,IMAQ_CODE39,orIMAQ_CODABAR,orifyousetvalidatetoFALSE,thefunctiondoesnotvalidatethedata.

Page 1450: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

BarcodeInfo* Onsuccess,thisfunctionreturnsastructurecontaininginformationaboutthebarcode.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisstructure,disposeofitbycallingimaqDispose().

Page 1451: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqReadClassifierFileUsageClassifierSession*imaqReadClassifierFile(ClassifierSession*session,constchar*fileName,ReadClassifierFileModemode,ClassifierType*type,ClassifierEngineType*engine,String255description);

Page 1452: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReadsaclassifiersessionfromfile.

Page 1453: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

session ClassifierSession* Thesessioninwhichtoloadtheclassifierfile,orNULLtocreateanewsession.

fileName constchar* Thenameofthefiletoread.ThisparameterisrequiredandcannotbeNULL.

mode ReadClassifierFileMode Themodetousewhenreadingtheclassifiersessionfromfile.

type ClassifierType* Thetypeofclassifiersessionthatwasreadfromfile.SetthisparametertoNULLifyoudonotneedthisinformation.

engine ClassifierEngineType* Thetypeofenginethesessionwastrainedwith.SetthisparametertoNULLifyoudonotneedthisinformation.

description String255 Onreturn,thedescriptionoftheclassificationsession.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1454: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ClassifierSession* Onsuccess,thisfunctionreturnsanewclassifiersession.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeoftheinformationbycallingimaqDispose().

Page 1455: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqReadCustomDataUsagevoid*imaqReadCustomData(constImage*image,constchar*key,unsignedint*size);

Page 1456: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReadsthecustomdataassociatedwithakeyinanimage.

Page 1457: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1458: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagethathasthedatatoread.key constchar* Thekeyusedtofindthedataintheimage.size unsigned

int*Onreturn,thesizeofthedata,inbytes.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1459: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

void* Ifthekeyisfoundintheimage,thisfunctionreturnsacopyofthedataassociatedwiththatkey.Whenyouarefinishedwiththisdata,disposeofitbycallingimaqDispose().

Page 1460: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqReadDataMatrixBarcode2UsageDataMatrixReport*imaqReadDataMatrixBarcode2(Image*image,constROI*roi,DataMatrixGradingModeprepareForGrading,constDataMatrixDescriptionOptions*descriptionOptions,constDataMatrixSizeOptions*sizeOptions,constDataMatrixSearchOptions*searchOptions);

Page 1461: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeLocatesandthenreadsthevalueencodedinaDataMatrixbarcode.Youcancomparethedecodeddatatoareferencestringorcheckwhetherthedatacontainsaspecificpattern.ManyoftheoptionsprovidedbythisfunctionallowforautomaticdetectionofpropertiesoftheDataMatrixbarcodeorwhatmethodsthefunctionshouldusetolocateanddecodethebarcode.Specifyingspecificpropertiesandmethodsfortheseoptionswillgreatlyincreasetheperformanceofthefunction.

Page 1462: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 1463: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* TheimagecontainingtheDataMatrixbarcodetoread.

roi constROI* Aregionofinterestspecifyingthelocationofthebarcodeintheimage.Thefirstcontourofroimustbearectangle,rotatedrectangle,orclosedcontour.IfskipLocationofthesearchOptionsparameterissettoTRUE,aclosedcontourhasanadditionalconstraintofbeingfour-sided.SetthisparametertoNULLtousetheentireimage.

prepareForGrading DataMatrixGradingMode Specifiesifthefunctionshould

Page 1464: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

makecalculationsneededtopreparetogradetheDataMatrixbarcode.

descriptionOptions constDataMatrixDescriptionOptions* DescribestheDataMatrixbarcodethefunctionshouldlookfor.

sizeOptions constDataMatrixSizeOptions* DescribessizinginformationfortheDataMatrixbarcodethefunctionshouldlookfor.

searchOptions constDataMatrixSearchOptions* DescribesthemethodsandlimitationsthefunctionshouldusewhensearchingfortheDataMatrixbarcode.

Page 1465: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

DataMatrixReport* Onsuccess,thisfunctionreturnsastructurecontaininginformationabouttheDataMatrixbarcode.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisstructure,disposeofitbycallingimaqDispose().

Page 1466: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussiondescriptionOptions—SetthedescriptionOptionsparametertoNULLtousethedefaultoptions,asfollows:

aspectRatio 0.0rows 0columns 0rectangle FALSEecc IMAQ_AUTO_DETECT_ECCpolarity IMAQ_AUTO_DETECT_POLARITYcellFillPercentage IMAQ_AUTO_DETECT_CELL_FILL_PERCENTAGEminBorderIntegrity 80.0mirrorMode IMAQ_AUTO_DETECT_MIRROR

sizeOptions—SetthesizeOptionsparametertoNULLtousethedefaultoptions,asfollows:

minSize 0maxSize 0quietZoneWidth 10

searchOptions—SetthesearchOptionsparametertoNULLtousethedefaultoptions,asfollows:

rotationMode IMAQ_UNLIMITED_ROTATIONskipLocation FALSEedgeThreshold 30demodulationMode IMAQ_AUTO_DETECT_DEMODULATION_MODEcellSampleSize IMAQ_AUTO_DETECT_CELL_SAMPLE_SIZEcellFilterMode IMAQ_AUTO_DETECT_CELL_FILTER_MODEskewDegreesAllowed 5maxIterations 500initialSearchVectorWidth 5

Page 1467: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqReadFileUsageintimaqReadFile(Image*image,constchar*fileName,RGBValue*colorTable,int*numColors);

Page 1468: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCreatesanNIVisionimagefromtheinformationinafile.Thefilecanbeinoneofthefollowingformats:PNG,JPEG,JPEG2000,TIFF,AIPD,orBMP.

Page 1469: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1470: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageinwhichthefunctionstoresdataitreadsfromthefile.

fileName constchar* Thenameofthefiletoread.ThisparameterisrequiredandcannotbeNULL.

colorTable RGBValue* Anoptionalarrayofupto256elements.Ifthefilehasacolortable,thefunctionfillsthisparameterwiththecolortablevalues.Ifthefiledoesnotcontainacolortable,thefunctionreturnsanemptyarray.SetthisparametertoNULLifyoudonotwantthefunctiontoloadthecolortable.

numColors int* IfcolorTableisnotNULL,thefunctionfillsthisparameterwiththenumberofcolorsinthecolortable.IfcolorTableisNULL,thefunctionignoresthisparameter.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1471: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1472: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqReadLCDUsageLCDReport*imaqReadLCD(constImage*image,constROI*roi,constLCDOptions*options);

Page 1473: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReadsthenumericvalueofaseven-segmentLCD.

Page 1474: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1475: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* TheimagecontainingtheLCDtoread.roi constROI* Aregionofinterest(ROI)consistingof

rectanglesaroundeachofthedigitsoftheLCD.GeneratethisROIbycallingimaqFindLCDSegments().

options constLCDOptions* ControlshowtheLCDisread.

Page 1476: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

LCDReport* Onsuccess,thisfunctionreturnsastructuredescribingthestateoftheLCD.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().

Page 1477: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:

litSegments FALSEthreshold 8sign FALSEdecimalPoint FALSE

Page 1478: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqReadMeterUsageintimaqReadMeter(constImage*image,constMeterArc*arcInfo,double*percentage,PointFloat*endOfNeedle);

Page 1479: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReadsameter.YoumusthavealreadydeterminedthearcinformationwithimaqGetMeterArc().

Page 1480: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1481: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageofthemetertoread.arcInfo constMeterArc* Informationaboutthemeter'sarc.This

informationisreturnedbyimaqGetMeterArc()

percentage double* Returnsthecurrentsweeppositionoftheneedleincomparisontothemaximumsweepposition,expressedasapercentage.Forexample,avalueof100indicatestheneedleisatthemaximumsweepposition.SetthisparametertoNULLifyoudonotneedthisinformation.

endOfNeedle PointFloat* Returnsthelocationoftheendpointoftheneedle.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1482: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1483: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqReadMultipleGeometricPatternFileUsageMultipleGeometricPattern*imaqReadMultipleGeometricPatternFile(constchar*fileName,String255description);

Page 1484: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReadsamultiplegeometricpatternfile.

Page 1485: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

fileName constchar* Thenameofthefiletoread.ThisparameterisrequiredandcannotbeNULL.

description String255 Thedescriptionofthemultiplegeometricpatternfile.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1486: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

MultipleGeometricPattern* Onsuccess,thisfunctionreturnsamultiplegeometrictemplate.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().

Page 1487: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqReadOCRFileUsageintimaqReadOCRFile(constchar*fileName,CharSet*set,String255setDescription,ReadTextOptions*readOptions,OCRProcessingOptions*processingOptions,OCRSpacingOptions*spacingOptions);

Page 1488: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReadsacharactersetandtheappropriateNIVisionstructuresfromthefilespecifiedbyfileName.

Page 1489: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

fileName constchar* Filethatthefunctionusesforthisoperation.ThisparameterisrequiredandcannotbeNULL.

set CharSet* Thecharactersetthefunctionoperateson.TocreateacharactersetuseimaqCreateCharSet().Ifthecharactersetalreadycontainstrainedcharacters,thefunctionappendsthetrainedcharactersfromthefiletotheexistingtrainedcharacters.SetthisparametertoNULLifyoudonotneedthisinformation.

setDescription String255 Onreturn,thedescriptionofthecharactersetcontainedinthefile.SetthisparametertoNULLifyoudonotneedthisinformation.

readOptions ReadTextOptions* Onreturn,theoptionsusedtoreadtextcontainedinthefile.SetthisparametertoNULLifyoudonotneedthisinformation.

processingOptions OCRProcessingOptions* Onreturn,theimageprocessingoptionscontainedinthefile.Set

Page 1490: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

thisparametertoNULLifyoudonotneedthisinformation.

spacingOptions OCRSpacingOptions* Onreturn,thecharactersizespacingoptionscontainedinthefile.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1491: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1492: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqReadPDF417BarcodeUsageBarcode2DInfo*imaqReadPDF417Barcode(constImage*image,constROI*roi,Barcode2DSearchModesearchMode,unsignedint*numBarcodes);

Page 1493: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReadsPDF417barcodesfromanimage.

Page 1494: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 1495: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagecontainingthebarcodestoread.roi constROI* Aregionofinterestspecifyingthelocationof

thebarcodesintheimage.Thefirstcontourofroimustbearectangle,rotatedrectangle,oval,annulusorclosedcontour.SetthisparametertoNULLtousetheentireimage.

searchMode Barcode2DSearchMode Specifiesthemodethefunctionusestosearchforbarcodes.ThisfunctionsupportssearchModevaluesofIMAQ_SEARCH_MULTIPLEandIMAQ_SEARCH_SINGLE_CONSERVATIVE.

numBarcodes unsignedint* Onreturn,thenumberofbarcodesthatthefunctionfound.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1496: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

Barcode2DInfo* Onsuccess,thisfunctionreturnsanarrayofstructurescontaininginformationaboutthebarcodes.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisarray,disposeofitbycallingimaqDispose().

Page 1497: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqReadQRCodeUsageQRCodeReport*imaqReadQRCode(Image*image,constROI*roi,QRGradingModereserved,constQRCodeDescriptionOptions*descriptionOptions,constQRCodeSizeOptions*sizeOptions,constQRCodeSearchOptions*searchOptions);

Page 1498: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeLocatesandreadsthevalueencodedinaQRcode.Youcancomparethedecodeddatatoareferencestringorcheckwhetherthedatacontainsaspecificpattern.ManyoftheoptionsprovidedbythisfunctionallowforautomaticdetectionofpropertiesoftheQRcodeorwhatmethodsthefunctionshouldusetolocateanddecodethecode.Selectingspecificpropertiesandmethodsfortheseoptionswillgreatlyincreasetheperformanceofthefunction.

Page 1499: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 1500: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* TheimagecontainingtheQRcodetobedetected.

roi constROI* Aregionofinterestspecifyingthelocationofthecodeintheimage.Thefirstcontourofroimustbearectangle,rotatedrectangle,orclosedcontour.IfskipLocationofthesearchOptionsparameterissettoTRUE,aclosedcontourhasanadditionalconstraintofbeingfour-sided.SetthisparametertoNULLtousetheentireimage.

reserved QRGradingMode Thisisreservedforfutureuse.SetthisparametertoIMAQ_QR_NO_GRADING.

descriptionOptions constQRCodeDescriptionOptions* DescribestheQRcodethefunctionshouldlookfor.

sizeOptions constQRCodeSizeOptions* DescribessizinginformationfortheQRcodethefunctionshouldlookfor.

searchOptions constQRCodeSearchOptions* DescribesthemethodsandlimitationsthefunctionshouldusewhensearchingfortheQRcode.

Page 1501: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

QRCodeReport* Onsuccess,thisfunctionreturnsastructurecontaininginformationabouttheQRcode.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisstructure,disposeofitbycallingimaqDispose().

Page 1502: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussiondescriptionOptions—SetdescriptionOptionstoNULLtousethefollowingdefaultvalues:

dimensions IMAQ_QR__DIMENSIONS_AUTO_DETECTpolarity IMAQ_QR_POLARITY_AUTO_DETECTmirror IMAQ_QR_MIRROR_MODE_AUTO_DETECTmodelType IMAQ_QR_MODELTYPE_AUTO_DETECT

sizeOptions—SetsizeOptionstoNULLtousethefollowingdefaultvalues:

minSize 0maxSize 0

searchOptions—SetsearchOptionstoNULLtousethefollowingdefaultvalues:

rotationMode IMAQ_QR_ROTATION_MODE_UNLIMITEDskipLocation FALSEedgeThreshold 30demodulationMode IMAQ_QR_DEMODULATION_MODE_AUTO_DETECTcellSampleSize IMAQ_QR_CELL_SAMPLE_SIZE_AUTO_DETECTcellFilterMode IMAQ_QR_CELL_FILTER_MODE_AUTO_DETECTskewDegreesAllowed 5

Page 1503: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqReadText3UsageReadTextReport3*imaqReadText3(constImage*image,constCharSet*set,constROI*roi,constReadTextOptions*readOptions,constOCRProcessingOptions*processingOptions,constOCRSpacingOptions*spacingOptions);

Page 1504: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReadsthetextfromtheimage.Thefunctionidentifiesallobjectsintheimagebasedontheattributesthatyouset,andthencompareseachobjectwitheverytrainedcharacter.Foreachobject,thefunctionselectsthecharacterthatmostcloselymatchestheobject.Thefunctionusesthesubstitutioncharacterforanyobjectthatdoesnotmatchanyofthetrainedcharacters.

Page 1505: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1506: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Thesourceimageforthisoperation.

set constCharSet* Thecharactersetthisfunctionoperateson.Tocreateacharacterset,useimaqCreateCharSet().ThisparameterisrequiredandcannotbeNULL.

roi constROI* TheROIthatthefunctionperformsthisoperationon.PassNULLtousetheentireimageforthisoperation.

readOptions constReadTextOptions* Theoptionsyouusetoconfigurehowthefunctionreadstext.

processingOptions constOCRProcessingOptions* Theoptionsyouusetoconfigurehowthefunctionprocessesthecontentsoftheimagebeforeattemptingtoreadtext.

spacingOptions constOCRSpacingOptions* Thesizeandspacingconstraintsyoucanapplytocharactersintheimage.

Page 1507: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ReadTextReport3* Onsuccess,thisfunctionreturnsareportthatcontainsinformationaboutthetextcontainedintheimage.Onfailure,thefunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyoufinishwiththereport,callimaqDispose()todisposeofit.

Page 1508: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionreadOptions—SetreadOptionstoNULLtousethefollowingdefaultreadingoptions:

validChars NULLnumValidChars 0substitutionChar ?readStrategy IMAQ_READ_AGGRESSIVEacceptanceLevel 700aspectRatio 400readResolution IMAQ_LOW_RESOLUTION

processingOptions—SetprocessingOptionstoNULLtousethefollowingdefaultprocessingoptions:

mode IMAQ_COMPUTED_UNIFORMlowThreshold 0highThreshold 255blockCount 4fastThreshold FALSEbiModalCalculation FALSEdarkCharacters TRUEremoveObjectsTouchingROI FALSEerosionCount 0

spacingOptions—SetspacingOptionstoNULLtousethefollowingdefaultspacingoptions:

minCharSpacing 1minCharSize 20maxCharSize 65536maxHorizontalElementSpacing 1maxVerticalElementSpacing 0

Page 1509: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

minBoundingRectWidth 1maxBoundingRectWidth 65536minBoundingRectHeight 1maxBoundingRectHeight 65536autoSplit FALSE

Page 1510: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqReadVisionFileUsageintimaqReadVisionFile(Image*image,constchar*fileName,RGBValue*colorTable,int*numColors);

Page 1511: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCreatesanimagefromtheinformationinafileandthenattachesadditionalVisioninformationcontainedinthefiletotheimage.ThefilemustbeaPNGformatfile.

Page 1512: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1513: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageinwhichthefunctionstoresdataitreadsfromthefile.

fileName constchar* Thenameofthefiletoread.ThisparameterisrequiredandcannotbeNULL.

colorTable RGBValue* Anoptionalarrayofupto256elements.Ifthefilehasacolortable,thefunctionfillsthisparameterwiththecolortablevalues.Ifthefiledoesnotcontainacolortable,thefunctionreturnsanemptyarray.SetthisparametertoNULLifyoudonotwantthefunctiontoloadthecolortable.

numColors int* IfcolorTableisnotNULL,thefunctionfillsthisparameterwiththenumberofcolorsinthecolortable.IfcolorTableisNULL,thefunctionignoresthisparameter.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1514: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1515: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqRefineMatchesUsagePatternMatch*imaqRefineMatches(constImage*image,constImage*pattern,constPatternMatch*candidatesIn,intnumCandidatesIn,MatchPatternOptions*options,MatchPatternAdvancedOptions*advancedOptions,int*numCandidatesOut);

Page 1516: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRefinesmatchesreturnedfromimaqMatchPattern2()usingsubpixelinformationlearnedwithimaqLearnPattern().

Page 1517: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 1518: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theinspectionimageinwhichyouoriginallylocatedthematchesyouwanttorefine.

pattern constImage* Thetemplateforwhichyouwanttosearchduringtherefinementphase.ThetemplateimageisanoutputofimaqLearnPattern2()

candidatesIn constPatternMatch* Thecandidatematchestorefine.

numCandidatesIn int Thenumberofcandidatesbeingpassedin.

options MatchPatternOptions* TheoptionspassedintoimaqMatchPattern2()

advancedOptions MatchPatternAdvancedOptions* TheoptionspassedintoimaqMatchPattern2()

numCandidatesOut int* Onreturn,thenumberofcandidatesreturned.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1519: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

PatternMatch* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().

Page 1520: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqRejectBorderUsageintimaqRejectBorder(Image*dest,Image*source,intconnectivity8);

Page 1521: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeEliminatesparticlesthattouchtheborderoftheimage.

Page 1522: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 1523: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source Image* Thesourceimage.Iftheimagehasaborder,the

functionsetsallborderpixelvaluesto0.connectivity8 int SetthisparametertoTRUEtouseconnectivity-8

todeterminewhetherparticlesaretouching.SetthisparametertoFALSEtouseconnectivity-4todeterminewhetherparticlesaretouching.Formoreinformationaboutconnectivity,seeChapter9,BinaryMorphology,intheNIVisionConceptsManual.

Page 1524: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1525: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 1526: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqRelabelClassifierSampleUsageintimaqRelabelClassifierSample(ClassifierSession*session,intindex,constchar*newClass);

Page 1527: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRelabelsasampleinaclassifiersessionandsetsittobeinadifferentclass.

Page 1528: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

session ClassifierSession* Thesessioncontainingthesampletorelabel.

index int Theindexofthesampletorelabel.newClass constchar* Thenewclassofthesample.

Page 1529: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1530: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqReleaseImageUsageintimaqReleaseImage(SESSION_IDsessionID);

Page 1531: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReleasesanimagethatimaqExtractFromRing()previouslyextracted.Afterthefunctionreleasestheimage,theliveacquisitioncontinuesiftheacquisitionhadpaused.

Page 1532: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

sessionID SESSION_ID AvalidsessionID.

Page 1533: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1534: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqRemoveContourUsageintimaqRemoveContour(ROI*roi,ContourIDid);

Page 1535: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeDeletesthespecifiedcontourfromthespecifiedregionofinterest(ROI),freeingallallocatedmemoryassociatedwiththecontour.

Page 1536: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi ROI* TheROIcontainingthecontourtoremove.id ContourID TheContourIDofthecontourtoremove.Afterthis

operation,theContourIDnolongercorrelatestoavalidcontour.SetthisparametertoIMAQ_ALL_CONTOURStoremoveallcontours.

Page 1537: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1538: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqRemoveCustomDataUsageintimaqRemoveCustomData(Image*image,constchar*key);

Page 1539: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRemovesacustomdatakeyanditsassociateddatafromanimage.

Page 1540: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1541: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagetoremovethecustomdatafrom.key constchar* Thekeytoremovefromtheimage.

Page 1542: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1543: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqRemoveVisionInfo2UsageintimaqRemoveVisionInfo2(constImage*image,unsignedintinfo);

Page 1544: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRemovesthespecifiedVisioninformationtypesfromthegivenimage.

Page 1545: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1546: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* TheimagethatthefunctionremovesVisioninformationfrom.

info unsignedint Flagsrepresentingwhichinfotypestoremove.CombinevaluesfromtheVisionInfoType2enumerationtocreatethis

Page 1547: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1548: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqRenameCharUsageintimaqRenameChar(CharSet*set,intindex,constchar*newCharValue);

Page 1549: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRenamesatrainedcharacter.

Page 1550: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

set CharSet* Thecharactersetthisfunctionoperateson.Tocreateacharacterset,useimaqCreateCharSet().ThisparameterisrequiredandcannotbeNULL.

index int Theindexofacharactertorename.newCharValue constchar* Thenewcharactervaluethatyouwantto

assigntothecharacter.Thelengthofthisstringmustnotexceed255characters.

Page 1551: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1552: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqReplaceColorPlanesUsageintimaqReplaceColorPlanes(Image*dest,constImage*source,ColorModemode,constImage*plane1,constImage*plane2,constImage*plane3);

Page 1553: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReplacesoneormoreofthecolorplanesofacolorimage.Theplaneyoureplacemaybeindependentoftheimagetype.Forexample,youcanreplacethegreenplaneofanRGBimageorthehueplaneofanHSLimage.

NoteThisfunctiondoesnotsupporttheCIEL*a*b*andCIEXYZcolormodes.ThisfunctiononlysupportstheRGBcolormodefor64-bitimages.

Page 1554: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1555: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.mode ColorMode Thecolorspaceinwhichthefunctionreplaces

planes.plane1 constImage* Thefirstplaneofreplacementdata.Setthis

parametertoNULLifyoudonotwanttochangethefirstplaneofthesourceimage.

plane2 constImage* Thesecondplaneofreplacementdata.SetthisparametertoNULLifyoudonotwanttochangethesecondplaneofthesourceimage.

plane3 constImage* Thethirdplaneofreplacementdata.SetthisparametertoNULLifyoudonotwanttochangethethirdplaneofthesourceimage.

Page 1556: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1557: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionplane1—Thedatacontainedheredependsonmode,asfollows:

Mode PlaneIMAQ_RGB RedIMAQ_HSL HueIMAQ_HSV HueIMAQ_HSI Hue

plane2—Thedatacontainedheredependsonmode,asfollows:

Mode PlaneIMAQ_RGB GreenIMAQ_HSL SaturationIMAQ_HSV SaturationIMAQ_HSI Saturation

plane3—Thedatacontainedheredependsonmode,asfollows:

Mode PlaneIMAQ_RGB BlueIMAQ_HSL LuminanceIMAQ_HSV ValueIMAQ_HSI Intensity

Page 1558: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqReplaceComplexPlaneUsageintimaqReplaceComplexPlane(Image*dest,constImage*source,constImage*newValues,ComplexPlaneplane);

Page 1559: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReplacesaplaneofacompleximagewiththepixelvaluesfromagivenimage.

Page 1560: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX

Page 1561: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagewhosedatathefunctionmodifies.newValues constImage* Theimagecontainingthereplacement

values.ThisimagemaybeIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,orIMAQ_IMAGE_COMPLEX.

plane ComplexPlane Thecompleximageplanetoreplace.SetthisvaluetoIMAQ_REALorIMAQ_IMAGINARY.IfsourceisaCompleximage,thenthisparameteralsoselectswhichplaneofthesourceimageisusedasthereplacement.

Page 1562: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1563: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqResampleUsageintimaqResample(Image*dest,constImage*source,intnewWidth,intnewHeight,InterpolationMethodmethod,Rectrect);

Page 1564: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeResizesanimagetoagivenresolution.Thesourceimageanddestinationimagemustbethesameimagetype.Afterexecution,thesizeofthedestinationimageisnewWidthxnewHeight.Forfastzero-orderscaling,useimaqScale().

Page 1565: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1566: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Theimageintowhichthefunctionplacestheresampleddata.Theimagemaybethesameassource.

source constImage* Theimagetoresample.newWidth int Thewidthoftheresampledarea.newHeight int Theheightoftheresampledarea.method InterpolationMethod Themethodofinterpolation.rect Rect Specifiesanareaofthesourceimage

toresample.SetthisparametertoIMAQ_NO_RECTtoresampletheentireimage.

Page 1567: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1568: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqROIProfileUsageROIProfile*imaqROIProfile(constImage*image,constROI*roi);

Page 1569: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCalculatestheprofileofthepixelsalongtheedgeofeachcontourinaregionofinterest(ROI).

Page 1570: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1571: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagefromwhichthefunctiongetstheprofile.roi constROI* TheROIdescribingthepixelsaboutwhichthe

functiongetsinformation.

Page 1572: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ROIProfile* Onsuccess,thisfunctionreturnsapointertoinformationaboutthepointsalongtheedgeofeachcontourintheROI.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofitbycallingimaqDispose().

Page 1573: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqROIToMaskUsageintimaqROIToMask(Image*mask,constROI*roi,intfillValue,constImage*imageModel,int*inSpace);

Page 1574: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeTransformsaregionofinterest(ROI)intoamaskimage.

Page 1575: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 1576: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

mask Image* Theresultingmaskimage.roi constROI* ThedescriptordefiningtheROI.fillValue int Thepixelvalueofthemask.Allpixelsinside

theROIreceivethisvalue.imageModel constImage* Anoptionaltemplateforthedestinationmask

image.ThisparametercanbeanyimagetypethatNIVisionsupports.IfyousupplyanimageModel,themaskimageisthesizeofthemodel.IfyousetimageModeltoNULL,thesizeofmaskisequaltothesizeoftheboundingrectangleoftheROI,whichreducestheamountofmemoryused.ThefunctionsetstheoffsetofthemaskimagetoreflecttherealpositionoftheROI.

inSpace int* IfyouusedimageModel,thisparameterindicatesonreturnwhetherthemaskisatruerepresentationoftheROI.IfTRUE,theROIdataiscompletelywithinimageModel.IfFALSE,someoftheROIdatafelloutsidethespaceassociatedwithimageModel.SetthisparametertoNULLifyoudonotneedthisinformation,orifyoudidnotuseimageModel.

Page 1577: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1578: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqRotate2UsageintimaqRotate2(Image*dest,constImage*source,floatangle,PixelValuefill,InterpolationMethodmethod,intmaintainSize);

Page 1579: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRotatesanimagecounterclockwise.

Page 1580: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB

Page 1581: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagetorotate.angle float Theangle,indegrees,torotatethe

image.fill PixelValue Thevaluethefunctionappliestothe

imagepixelsnotcoveredbytherotatedimage.

method InterpolationMethod Themethodofinterpolation.ThevalidinterpolationmethodsforrotationareIMAQ_ZERO_ORDERandIMAQ_BILINEAR.

maintainSize int SetthisparametertoTRUEtomaintainthesizeoftheimage.

Page 1582: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1583: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqScaleUsageintimaqScale(Image*dest,constImage*source,intxScale,intyScale,ScalingModescaleMode,Rectrect);

Page 1584: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeScalesanimageorareaofanimage.Thesourceimageanddestinationimagemustbethesameimagetype.Thisfunctionmakesanimagelargerbyduplicatingpixels,anditmakesanimagesmallerbysubsamplingpixels.Formoresophisticatedscalingtechniques,useimaqResample().

Page 1585: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1586: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimagetoscale.xScale int Thescalingfactorinthexdirection.Ifyouset

scaleModetoIMAQ_SCALE_LARGER,xScaleisamultiplicationfactor,meaningthefunctionduplicateseachsourcepixelxScaletimes.IfyousetscaleModetoIMAQ_SCALE_SMALLER,xScaleisadivisionfactor,meaningthefunctiontakesonepixelforeveryxScalepixels.

yScale int Thescalingfactorintheydirection.IfyousetscaleModetoIMAQ_SCALE_LARGER,yScaleisamultiplicationfactor,meaningthefunctionduplicateseachsourcepixelyScaletimes.IfyousetscaleModetoIMAQ_SCALE_SMALLER,yScaleisadivisionfactor,meaningthefunctiontakesonepixelforeveryyScalepixels.

scaleMode ScalingMode Thescalingmode.rect Rect Specifiestherectangularregionofthesource

imagetoscale.SetthisparametertoIMAQ_NO_RECTtoscalethewholeimage.

Page 1587: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1588: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSegmentationUsageintimaqSegmentation(Image*dest,Image*source);

Page 1589: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCalculateszonesofinfluencearoundparticlesinalabeledimage.Thefunctionfindsthenearestparticleofeachpixelinthesourceimageandsetsthepixelvaluetothelabeledvalueofthatparticle.BeforecallingimaqSegmentation(),youmustlabeltheparticleswithimaqLabel().

Page 1590: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16

Page 1591: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source Image* Theimagetosegment.Thesegmentationmodifiesthe

borderofthesourceimage.Thebordermustbeatleastonepixelwide.

Page 1592: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1593: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 1594: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSelectAnnulusUsageintimaqSelectAnnulus(constImage*image,Annulus*annulus,constConstructROIOptions*options,int*okay);

Page 1595: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeDisplaystheimageinamodalwindowandallowstheusertodrawanannulusonit.Aftertheuserdrawstheannulus,thefunctionhidesthewindow.

Page 1596: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1597: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagefromwhichtheuserselectsanannulus.

annulus Annulus* Onreturn,thisparameterspecifiesthecoordinatesoftheannuluschosenbytheuser.Iftheuserdoesnotselectanannulus,thefunctionsetsalloftheelementsofannulusto–1.ThisparameterisrequiredandcannotbeNULL.

options constConstructROIOptions* Describeshowafunctionpresentstheannulusconstructorwindow.

okay int* Onreturn,thisparameterisTRUEiftheuserpressedtheOKbuttontoendtheselectionofanannulus.Otherwise,thisparameterisFALSE.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1598: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1599: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:

windowNumber IMAQ_MODAL_DIALOGwindowTitle "SelectanAnnulus"type IMAQ_PALETTE_GRAYpalette NULLnumColors 0

Page 1600: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSelectLineUsageintimaqSelectLine(constImage*image,Point*start,Point*end,constConstructROIOptions*options,int*okay);

Page 1601: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeDisplaystheimageinamodalwindowandallowstheusertodrawalineonit.Aftertheuserdrawstheline,thefunctionhidesthewindow.

Page 1602: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1603: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagefromwhichtheuserselectsaline.

start Point* Onreturn,thisparameterspecifiesthecoordinatesofthestartofthelinechosenbytheuser.Iftheuserdoesnotselectaline,thefunctionsetsalloftheelementsofstartto–1.ThisparameterisrequiredandcannotbeNULL.

end Point* Onreturn,thisparameterspecifiesthecoordinatesoftheendofthelinechosenbytheuser.Iftheuserdoesnotselectaline,thefunctionsetsalloftheelementsofendto–1.ThisparameterisrequiredandcannotbeNULL.

options constConstructROIOptions* Describeshowafunctionpresentsthelineconstructorwindow.

okay int* Onreturn,thisparameterisTRUEiftheuserpressedtheOKbuttontoendtheselectionofaline.Otherwise,thisparameterisFALSE.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1604: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1605: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:

windowNumber IMAQ_MODAL_DIALOGwindowTitle "SelectaLine"type IMAQ_PALETTE_GRAYpalette NULLnumColors 0

Page 1606: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSelectPointUsageintimaqSelectPoint(constImage*image,Point*point,constConstructROIOptions*options,int*okay);

Page 1607: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeDisplaystheimageinamodalwindowandallowstheusertodrawapointonit.Aftertheuserdrawsthepoint,thefunctionhidesthewindow.

Page 1608: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1609: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagefromwhichtheuserselectsapoint.

point Point* Onreturn,thisparameterspecifiesthecoordinatesofthepointchosenbytheuser.Iftheuserdoesnotselectapoint,thefunctionsetsalloftheelementsofpointto–1.ThisparameterisrequiredandcannotbeNULL.

options constConstructROIOptions* Describeshowafunctionpresentsthepointconstructorwindow.

okay int* Onreturn,thisparameterisTRUEiftheuserpressedtheOKbuttontoendtheselectionofapoint.Otherwise,thisparameterisFALSE.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1610: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1611: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:

windowNumber IMAQ_MODAL_DIALOGwindowTitle "SelectaPoint"type IMAQ_PALETTE_GRAYpalette NULLnumColors 0

Page 1612: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSelectRectUsageintimaqSelectRect(constImage*image,RotatedRect*rect,constConstructROIOptions*options,int*okay);

Page 1613: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeDisplaystheimageinamodalwindowandallowstheusertodrawarectangleonit.Aftertheuserdrawstherectangle,thefunctionhidesthewindow.

Page 1614: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1615: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagefromwhichtheuserselectsarectangle.

rect RotatedRect* Onreturn,thisparameterspecifiesthecoordinatesoftherectanglechosenbytheuser.Iftheuserdoesnotselectarectangle,thefunctionsetsalloftheelementsofrectto–1.ThisparameterisrequiredandcannotbeNULL.

options constConstructROIOptions* Describeshowafunctionpresentstherectangleconstructorwindow.

okay int* Onreturn,thisparameterisTRUEiftheuserpressedtheOKbuttontoendtheselectionofarectangle.Otherwise,thisparameterisFALSE.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1616: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1617: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:

windowNumber IMAQ_MODAL_DIALOGwindowTitle "SelectaRectangle"type IMAQ_PALETTE_GRAYpalette NULLnumColors 0

Page 1618: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSeparationUsageintimaqSeparation(Image*dest,Image*source,interosions,constStructuringElement*structuringElement);

Page 1619: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSeparatestouchingparticlesbyerodingtheimagetoremovesmallisthmusesbetweentheparticles.Afterperformingtheerosion,thealgorithmreconstructstheimage.

Page 1620: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 1621: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source Image* Theimagecontaining

particlestoseparate.Theseparationmodifiestheborderofthesourceimage.Thebordermustbeatleasthalfaslargeasthelargerdimensionofthestructuringelement.

erosions int Thenumberoferosionstoperform.

structuringElement constStructuringElement* Thestructuringelementusedintheoperation.SetthisparametertoNULLifyoudonotwantacustomstructuringelement.

Page 1622: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1623: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 1624: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetBitDepthUsageintimaqSetBitDepth(Image*image,unsignedintbitDepth);

Page 1625: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthebitdepthoftheimage.ThebitdepthofanimagedetermineshowNIVisiondisplays,savesandconvertsimageswithmorethan8bitsperchannel.

Page 1626: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB_U64

Page 1627: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagewhosebitdepththefunctionsets.bitDepth unsigned

intThenewbitdepthoftheimage.Thevaluemustbefrom8to15forIMAQ_IMAGE_I16images,from8to16forIMAQ_IMAGE_U16andIMAQ_IMAGE_RGB_U64images,or0.Avalueof0indicatesthatNIVisionshouldusetheentirerangeoftheimagedatatype.

Page 1628: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1629: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetBorderSizeUsageintimaqSetBorderSize(Image*image,intsize);

Page 1630: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthebordersizeofanimage.Thisoperationpreservesimagepixels.

Page 1631: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1632: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagewhosebordersizethefunctionsets.size int Thenewbordersize.Validbordersizesrangefrom0-50.

Page 1633: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1634: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetContourColorUsageintimaqSetContourColor(ROI*roi,ContourIDid,constRGBValue*color);

Page 1635: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthecolorofacontour.

Page 1636: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi ROI* Theregionofinterest(ROI)containingthecontourwhosecolorthefunctionsets.

id ContourID TheContourIDofthecontourwhosecolorthefunctionsets.

color constRGBValue* Thecolortowhichthefunctionsetsthecontour.ThisparameterisrequiredandcannotbeNULL.

Page 1637: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1638: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetCoordinateSystemUsageintimaqSetCoordinateSystem(Image*image,constCoordinateSystem*system);

Page 1639: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthecoordinatesystemandscalingconstantsforthecalibratedreal-worldcoordinatesoftheimage.

Page 1640: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1641: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagewhosecoordinatesystemthefunctionsets.Thisimagemustalreadycontaincalibrationinformation.

system constCoordinateSystem* Definesthecoordinatesystemforthecalibratedreal-worldcoordinates.

Page 1642: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1643: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsystem—SetsystemtoNULLtousethefollowingdefaultcoordinatesystem:

origin {0,0}angle 0axisOrientation IMAQ_INDIRECT

Page 1644: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetCurrentToolUsageintimaqSetCurrentTool(ToolcurrentTool);

Page 1645: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthecurrentlyselectedtoolinthetoolwindow.

Page 1646: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

currentTool Tool Thetooltomaketheselectedregiontool.

Page 1647: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1648: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetErrorUsageintimaqSetError(interrorCode,constchar*function);

Page 1649: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthecurrenterror.

Page 1650: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

errorCode int Thecodeoftheerrortoset.function constchar* Thenameofthefunctioninwhichtheerror

occurred.SetthisparametertoNULLtorecordnofunction.

Page 1651: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Setsthecurrenterror.

Page 1652: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetEventCallbackUsageintimaqSetEventCallback(EventCallbackcallback,intsynchronous);

Page 1653: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsacallbackfunctionthatNIVisioncallswhenaneventoccursinawindow.Whenausergeneratesanevent,NIVisioncallsthecallbackfunctionusingthefollowingparameters:event,windownumber,tool,andlocationoftheevent.Forafulldescriptionoftheseparameters,refertoimaqGetLastEvent().

Page 1654: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

callback EventCallback Thefunctiontocall.SetthisparametertoNULLifyouwanttodisableeventprocessingusingacallback.Ifyoudisablecallbacks,youcanprocesseventsusingimaqGetLastEvent().

synchronous int SetthisparametertoTRUEtocallthecallbackfunctioninthethreadthatcallsimaqSetEventCallback().SetthisparametertoFALSEtocallthecallbackfunctionasynchronouslyinaseparatethread.Toprocesscallbackssynchronously,yourapplicationmusthaveamessagepump.InLabWindows/CVI,callingRunUserInterface()startsamessagepump.ThefunctionignoresthisparameterifcallbackisNULL.

Page 1655: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1656: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussioncallback—callbackshouldhavethefollowingprototype:voidIMAQ_CALLBACKMyCallback(WindowEventType,intwindowNumber,Tooltool,Rectrect);

Page 1657: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetImageSizeUsageintimaqSetImageSize(Image*image,intwidth,intheight);

Page 1658: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthesizeofanimage.Theoriginalpixelsarenottransferredtothenewimage.Thenewimagewillcontainuninitializedpixels.Toresizetheimageandretaintheoriginalinformation,useimaqScale()orimaqResample().

Page 1659: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1660: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagetoresize.width int Thenewwidthoftheimage.height int Thenewheightoftheimage.

Page 1661: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1662: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetLineUsageintimaqSetLine(Image*image,constvoid*array,intarraySize,Pointstart,Pointend);

Page 1663: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthepixelvaluesalongalineinanimage.

Page 1664: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1665: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagewhoselinepixelvaluesthefunctionmodifies.

array constvoid* Theone-dimensionalarrayofpixelvaluesthatthefunctionusestoreplacethevaluesintheline.Thetypeofarrayyouprovidedependsontheimagetype,asfollows:

ImageType ArrayTypeIMAQ_IMAGE_U8 unsignedcharIMAQ_IMAGE_U16 unsignedshortIMAQ_IMAGE_I16 shortIMAQ_IMAGE_SGL floatIMAQ_IMAGE_RGB RGBValuestructuresIMAQ_IMAGE_HSL HSLValuestructuresIMAQ_IMAGE_RGB_U64 RGBU64Value

structures

arraySize int Thenumberofpixelsinthearray.start Point Thecoordinatelocationofthestartingpointofthe

line.end Point Thecoordinatelocationoftheendingpointofthe

line.

Page 1666: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1667: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetMaskOffsetUsageintimaqSetMaskOffset(Image*image,Pointoffset);

Page 1668: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeWhenthegivenimageisusedasamask,setsthelocationinthesourceimageatwhichthefunctionplacesthe(0,0)pixelofthemaskimage.

Page 1669: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1670: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Themaskimagewhoseoffsetthefunctionsets.offset Point Thecoordinateswherethefunctionappliesthemask.

Page 1671: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1672: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetMultipleGeometricPatternsOptionsUsageintimaqSetMultipleGeometricPatternsOptions(MultipleGeometricPattern*multiplePattern,constchar*label,constCurveOptions*curveOptions,constMatchGeometricPatternOptions*matchOptions,constMatchGeometricPatternAdvancedOptions2*advancedMatchOptions);

Page 1673: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetstheoptionsusedbyimaqMatchMultipleGeometricPatterns()tomatchthetemplateimagecorrespondingtothespecifiedlabelinmultiplePattern.

Page 1674: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type

multiplePattern MultipleGeometricPattern*

label constchar*

curveOptions constCurveOptions*

Page 1675: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

matchOptions constMatchGeometricPatternOptions*

advancedMatchOptions constMatchGeometricPatternAdvancedOptions2*

Page 1676: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1677: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionmatchOptions—SetmatchOptionstoNULLtousethedefaultmatchoptions,asfollows:

mode IMAQ_GEOMETRIC_MATCH_ROTATION_INVARIANTsubpixelAccuracy FALSEangleRanges NULL(allanglesallowed)numRanges 0scaleRange {75,125}occlusionRange {0,25}numMatchesRequested 1minMatchScore 800

advancedMatchOptions—SetadvancedMatchOptionstoNULLtousethedefaultadvancedmatchoptions,asfollows:

minFeaturesUsed 5maxFeaturesUsed 5subpixelIterations 20subpixelTolerance 0initialMatchListLength 200matchTemplateCurveScore FALSEcorrelationScore TRUEminMatchSeparationDistance 20minMatchSeparationAngle 10minMatchSeparationScale 10maxMatchOverlap 80coarseResult FALSEsmoothContours FALSEenableCalibrationSupport TRUE

Page 1678: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetOverlayPropertiesUsageintimaqSetOverlayProperties(Image*image,constchar*group,TransformBehaviors*transformBehaviors);

Page 1679: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthetransformationbehaviorinformationforaspecifiedoverlaygroup.

Page 1680: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1681: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageforwhichyouwanttosettheoverlayproperties.

group constchar* Specifiesanoverlaygroupnamewithintheimage.SetthisparametertoNULLtospecifyallgroups.

transformBehaviors TransformBehaviors* Specifiesthecurrentoverlaybehaviorwhenanimageistransformed.

Page 1682: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1683: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetParticleClassifierOptionsUsageintimaqSetParticleClassifierOptions(ClassifierSession*session,constParticleClassifierPreprocessingOptions*preprocessingOptions,constParticleClassifierOptions*options);

Page 1684: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetoptionsonaparticleclassifiersession.

Page 1685: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

session ClassifierSession* Theclassifiersessionfromwhichtosettheoptions.

preprocessingOptions constParticleClassifierPreprocessingOptions* Thepreprocessingoptionstoset.SetthisparametertoNULLifyoudonotwanttosetthepreprocessingoptions.

options constParticleClassifierOptions* Theclassificationoptionstoset.SetthisparametertoNULLifyoudonotwanttosettheclassificationoptions.

Page 1686: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1687: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetPixelUsageintimaqSetPixel(Image*image,Pointcoord,PixelValuevalue);

Page 1688: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthevalueofapixelwithinanimage.

Page 1689: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1690: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagewhosepixelvaluethefunctionsets.coord Point Thecoordinatesofthepixelthefunctionsets.value PixelValue Thevaluetowhichthefunctionsetstheimagepixel.

Page 1691: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1692: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetReferenceCharUsageintimaqSetReferenceChar(constCharSet*set,intindex,intisReferenceChar);

Page 1693: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsacharacterasthereferencecharacterforthecharacterclass.Ifthecharacterclassalreadyhasareferencecharacter,thenewcharacterwillreplacetheoldcharacterasthereferencecharacter.

Page 1694: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

set constCharSet* Thecharactersetthisfunctionoperateson.Tocreateacharacterset,useimaqCreateCharSet().ThisparameterisrequiredandcannotbeNULL.

index int Theindexofacharactertosetasthereferencecharacterforitscharacterclass.

isReferenceChar int SetthisparametertoTRUEtosetthecharacterasthereferencecharacter.SetthisparametertoFALSEtounsetthecharacterasthereferencecharacter.

Page 1695: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1696: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetROIColorUsageintimaqSetROIColor(ROI*roi,constRGBValue*color);

Page 1697: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthecolorofallthecontourscurrentlyinaregionofinterest(ROI).AllcontoursyouaddtotheROIbecomethiscolorafteryoucallthisfunction.UseimaqSetContourColor()tochangethecolorofindividualcontourswithintheROI.

Page 1698: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi ROI* TheROIwhosecolorthefunctionsets.color constRGBValue* ThecolortowhichthefunctionsetstheROI.

ThisparameterisrequiredandcannotbeNULL.

Page 1699: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1700: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetSimpleCalibrationUsageintimaqSetSimpleCalibration(Image*image,ScalingMethodmethod,intlearnTable,constGridDescriptor*grid,constCoordinateSystem*system);

Page 1701: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsasimplecalibrationforanimage.Inasimplecalibration,apixelcoordinateistransformedtoareal-worldcoordinatethroughscalinginthehorizontalandverticaldirections.

NoteSimplecalibrationcannotcorrectforperspectivedistortionornonlinearlensdistortion.

Page 1702: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1703: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagethefunctionsetscalibrationinformationfor.Thisimageshouldeitherhavenoassociatedcalibrationinformationorsimplecalibrationinformation.

method ScalingMethod Definesthescalingmethodcorrectionfunctionsusedtocorrecttheimage.Iftheimagehasbeencalibratedpreviously,usingtheimaqLearnCalibrationPoints()orimaqLearnCalibrationGrid(),thisparameterisignoredandthepreviouslydefinedscalingisused.IMAQ_SCALE_TO_PRESERVE_AREAandIMAQ_SCALE_TO_FITarevalidoptions.

learnTable int SetthisparametertoTRUEtoprocessandstorethecorrectiontable.Thecorrectiontableacceleratestheprocessofcorrectinganimageandisusefulifyouplantocorrectseveralimagesusingthiscalibrationsetup.

grid constGridDescriptor* Definesscalingconstantsfortheimage.Iftheimagehasbeencalibratedpreviously,usingtheimaqLearnCalibrationPoints()orimaqLearnCalibrationGrid(),thisparameterisignoredandthepreviouslydefinedscalingconstantsareused.

system constCoordinateSystem* Definesthecoordinatesystemforthecalibratedreal-worldcoordinates.

Page 1704: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1705: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussiongrid—SetgridtoNULLtousethefollowingdefaultscalingconstants:

xStep 1yStep 1unit IMAQ_UNDEFINED

system—SetsystemtoNULLtousethefollowingdefaultcoordinatesystem:

origin {0,0}angle 0axisOrientation IMAQ_INDIRECT

Page 1706: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetToolColorUsageintimaqSetToolColor(constRGBValue*color);

Page 1707: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthecolorinwhichthetoolsfromthetoolwindowdraw.

Page 1708: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

color constRGBValue* Thetooldrawingcolor.ThisparameterisrequiredandcannotbeNULL.

Page 1709: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1710: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetToolContextSensitivityUsageintimaqSetToolContextSensitivity(intsensitive);

Page 1711: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeEnableordisablethecontextsensitivityforallthetools.

Page 1712: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

sensitive int SetvaluetoTRUEtoenablecontext-sensitivetoolselection.SetvaluetoFALSEtodisablecontext-sensitivetoolselection.

Page 1713: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1714: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetupGrabUsageintimaqSetupGrab(SESSION_IDsessionID,Rectrect);

Page 1715: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeConfiguresandstartsagrabacquisition.Agrabperformsanacquisitionthatloopscontinuallyononebuffer.UseimaqGrab()tocopyanimageoutofthebuffer.UseimaqStopAcquisition()toendtheacquisition.

Page 1716: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

sessionID SESSION_ID AvalidsessionID.rect Rect Theareatoacquire.Ifyousetthisparameter

toIMAQ_NO_RECT,thefunctionusestheentireacquisitionwindow.

Page 1717: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1718: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetupRingUsageintimaqSetupRing(SESSION_IDsessionID,Image**images,intnumImages,intskipCount,Rectrect);

Page 1719: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeConfiguresaringacquisition.Aringacquisitionacquiresimagescontinuouslyandloopsthemintoabufferlist.Tostarttheacquisition,callimaqStartAcquisition().Tostoptheacquisition,callimaqStopAcquisition().Togetanimagefromthering,callimaqExtractFromRing()orimaqCopyFromRing().DonotmodifyordisposeoftheimagesintheringuntilyouendtheacquisitionwithimaqStopAcquisition().

Page 1720: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1721: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

sessionID SESSION_ID AvalidsessionID.images Image** Anarrayofimages.Eachelementinthe

arraymustbeapointertoavalidimage.numImages int Thenumberofimagesintheimagesarray.skipCount int Thenumberofframestoskipbetweeneach

acquiredimage.AskipCountof0acquiresimagescontinuouslywithoutskippingframesbetweenacquiredimages.

rect Rect Theareatoacquire.SetthisparametertoIMAQ_NO_RECTtoacquiretheentireacquisitionwindow.

Page 1722: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1723: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetupSequenceUsageintimaqSetupSequence(SESSION_IDsessionID,Image**images,intnumImages,intskipCount,Rectrect);

Page 1724: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeConfiguresasequenceacquisition.Asequenceacquisitionacquiresafullsequenceofimagesintotheimagearray.Tostarttheacquisition,callimaqStartAcquisition().TheacquisitionfinishesuponreachingtheendofthesequenceorwhenyoucallimaqStopAcquisition().Donotmodifyordisposeoftheimagesinthesequenceuntiltheacquisitionhasfinished.

Page 1725: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1726: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

sessionID SESSION_ID AvalidsessionID.images Image** Anarrayofimages.Eachelementinthe

arraymustbeapointertoavalidimage.numImages int Thenumberofimagesintheimagesarray.skipCount int Thenumberofframestoskipbetweeneach

acquiredimage.AskipCountof0acquiresimagescontinuouslywithoutskippingframesbetweenacquiredimages.

rect Rect Theareatoacquire.SetthisparametertoIMAQ_NO_RECTtoacquiretheentireacquisitionwindow.

Page 1727: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1728: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetupToolWindowUsageintimaqSetupToolWindow(intshowCoordinates,intmaxIconsPerLine,constToolWindowOptions*options);

Page 1729: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeConfigurestheappearanceandavailabilityofthetoolsinthetoolwindow.

Page 1730: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

showCoordinates int Determineswhetheractivepixelcoordinatesarevisible.SetthisparametertoTRUEtodisplaytheactivepixelcoordinates.SetthisparametertoFALSEifyoudonotwantthecoordinatestoshow.

maxIconsPerLine int Themaximumnumberoftooliconstoshowoneachline.Thetoolwindowusestheminimumnumberoflinesneededtodisplayallofthetoolsbasedonthisparameteranddistributesthetoolsasevenlyaspossible.

options constToolWindowOptions* Determinestheavailabilityoftoolsinthetoolwindow.SetoptionstoNULLtodisplayallthetools.

Page 1731: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1732: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetupWindowUsageintimaqSetupWindow(intwindowNumber,intconfiguration);

Page 1733: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthepropertiesofanimagewindow.

Page 1734: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.configuration int AnyoftheWindowOptionsflagscombined

together.

Page 1735: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1736: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetWindowBackgroundUsageintimaqSetWindowBackground(intwindowNumber,WindowBackgroundFillStylefillStyle,WindowBackgroundHatchStylehatchStyle,constRGBValue*fillColor,constRGBValue*backgroundColor);

Page 1737: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthebackgroundstyleandcolorinformationforthedisplaywindow.

Page 1738: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.

fillStyle WindowBackgroundFillStyle Thefillstyleofthedisplaywindow.

hatchStyle WindowBackgroundHatchStyle Thehatchstyleofthedisplaywindow.

fillColor constRGBValue* Thefillcolorofthedisplaywindow.SetthisparametertoNULLtousethecurrentfillcolor.

backgroundColor constRGBValue* Thebackgroundcolorofthedisplaywindow.SetthisparametertoNULLtousethecurrentbackgroundcolor.

Page 1739: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1740: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetWindowDisplayMappingUsageintimaqSetWindowDisplayMapping(intwindowNumber,constDisplayMapping*mapping);

Page 1741: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthepixelmappingpolicyfordisplaying16-bitimagesofanunspecifiedbitdepth.Because16-bitgrayscaleimagescannotbedisplayedwiththeirfullresolutionon32-bitcolordisplaysusingcommonvideoadapterslimitedto8-bitresolution/perpixel/color,16-bitimagesneedtobemappedtothe8-bitrange(0to255).

Page 1742: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thenumberofthewindowthefunctionsetsthepixelmappingpolicyfor.

mapping constDisplayMapping* Describesthemappingpolicythefunctionsetsforthewindows.

Page 1743: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1744: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionmapping—SetmappingtoNULLtousethedefaultoptions,asfollows:

conversionMethod IMAQ_FULL_DYNAMICminimumValue 0maximumValue 0shiftCount 0

Page 1745: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetWindowGridUsageintimaqSetWindowGrid(intwindowNumber,intxResolution,intyResolution);

Page 1746: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthegridresolutionoftheimagewindow.Gridresolutionisthenumberofpixelsbetweengridlines.NIVisionusesthegridresolutionwhendrawingregionsofinterestonthewindowusingtoolsinthetoolwindow.Youcanusethegridtotracearegionofinterestaccurately.

Page 1747: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.xResolution int Thexresolutionofthegrid.yResolution int Theyresolutionofthegrid.

Page 1748: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1749: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetWindowMaxContourCountUsageintimaqSetWindowMaxContourCount(intwindowNumber,unsignedintmaxContourCount);

Page 1750: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthemaximumnumberofregionofinterest(ROI)contoursthatcanbedrawnonanimagewindow.

Page 1751: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.maxContourCount unsigned

intThemaximumnumberofcontourstheROIthisimagewindowcontainscanhave.

Page 1752: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1753: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetWindowNonTearingUsageintimaqSetWindowNonTearing(intwindowNumber,intnonTearing);

Page 1754: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeEnablesordisablesthenon-tearingstateofthedisplaywindow.Tearingimagescanoccurwhentheimagedisplayrateisnotinsyncwiththerefreshrateofthemonitor.Thedifferencebetweenthedisplayrateandthemonitorrefreshratecancausepartsoftwodifferentimagestobedisplayedatthesametime,whichcausesasplitintheimage.Byenablingnon-tearing,theimagedisplayissyncedtotherefreshofthemonitorandtearingiseliminated.

Page 1755: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.nonTearing int SetthisparametertoTRUEifthegivenwindow

shouldbenon-tearingandFALSEifthewindowshouldoperatenormally.

Page 1756: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1757: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetWindowPaletteUsageintimaqSetWindowPalette(intwindowNumber,PaletteTypetype,constRGBValue*palette,intnumColors);

Page 1758: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthecolorpalettetousewhendisplayingamonochromeimageinanimagewindow.

Page 1759: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.

type PaletteType Thepalettetypetouse.palette constRGBValue* IftypeisIMAQ_PALETTE_USER,

thisarrayisthepaletteofcolorstousewiththewindow.IftypeisnotIMAQ_PALETTE_USER,thefunctionignoresthisparameter,andyoucansetittoNULL.Themaximumnumberofcolorsinapaletteis256.palette[n]mapstopixelvaluen.Iftherearelessthan256elementsinpalette,thefunctionmapsallpixelvaluespastthelastelementinpalettetotheassociatedgrayscalevalue.

numColors int IftypeisIMAQ_PALETTE_USER,thisparameteristhenumberofcolorsinthepalettearray.IftypeisnotIMAQ_PALETTE_USER,thefunctionignoresthisparameter.

Page 1760: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1761: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetWindowROIUsageintimaqSetWindowROI(intwindowNumber,constROI*roi);

Page 1762: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetstheregionofinterest(ROI)associatedwithagivenwindow.

Page 1763: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.roi constROI* TheROItoassociatewiththewindow.Set

thisparametertoNULLtoremoveanyROIsfromthewindow.

Page 1764: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1765: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetWindowSizeUsageintimaqSetWindowSize(intwindowNumber,intwidth,intheight);

Page 1766: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthesizeofanimagewindow.

Page 1767: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.width int Thenewwidthofthewindow.height int Thenewheightofthewindow.

Page 1768: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1769: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetWindowThreadPolicyUsageintimaqSetWindowThreadPolicy(WindowThreadPolicypolicy);

Page 1770: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeDeterminesthethreadinwhichNIVisioncreateswindows.Bydefault,NIVisionusesIMAQ_CALLING_THREAD.Thispolicycreateswindowsinthethreadthatmakesthefirstdisplayfunctioncallforagivenwindownumber.Ifthatthreaddoesnotprocessmessages,setthewindowthreadpolicytoIMAQ_SEPARATE_THREAD.Usingthispolicy,NIVisioncreateswindowsinaseparatethreadandprocessesmessagesforthewindowsautomatically.

Page 1771: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

policy WindowThreadPolicy Thethreadpolicy.

Page 1772: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1773: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetWindowTitleUsageintimaqSetWindowTitle(intwindowNumber,constchar*title);

Page 1774: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthetitleofanimagewindow.

Page 1775: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.title constchar* Thenewtitleofthewindow.This

parameterisrequiredandcannotbeNULL.

Page 1776: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1777: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetWindowZoomToFitUsageintimaqSetWindowZoomToFit(intwindowNumber,intzoomToFit);

Page 1778: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetswhetherthewindowisinzoomtofitmode.

Page 1779: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.zoomToFit int SetthisparametertoTRUEifthegivenwindow

shouldautomaticallyzoomtofittheimageandFALSEifthewindowshouldoperatenormally.

Page 1780: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1781: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqShiftUsageintimaqShift(Image*dest,constImage*source,intshiftX,intshiftY,PixelValuefill);

Page 1782: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeShiftsanimage.

Page 1783: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1784: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagetoshift.shiftX int Specifieshowmanypixelstotherighttoshiftthe

image.shiftY int Specifieshowmanypixelsdowntoshiftthe

image.fill PixelValue Thevaluewithwhichthefunctionfillsthe

uncoveredimagepixels.

Page 1785: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1786: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqShowScrollbarsUsageintimaqShowScrollbars(intwindowNumber,intvisible);

Page 1787: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeShowsorhidesthescrollbarsonanimagewindow.

Page 1788: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.visible int IfTRUE,thescrollbarsofthewindoware

visible.IfFALSE,thescrollbarsofthewindowarehidden.

Page 1789: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1790: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqShowToolWindowUsageintimaqShowToolWindow(intvisible);

Page 1791: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeShowsorhidesthetoolwindow.

Page 1792: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

visible int IfTRUE,thetoolwindowisvisible.IfFALSE,thetoolwindowishidden.

Page 1793: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1794: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqShowWindowUsageintimaqShowWindow(intwindowNumber,intvisible);

Page 1795: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeShowsorhidesanimagewindow.

Page 1796: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.visible int IfTRUE,thegivenwindowisvisible.IfFALSE,

thegivenwindowishidden.

Page 1797: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1798: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSimpleDistanceUsageintimaqSimpleDistance(Image*dest,Image*source,constStructuringElement*structuringElement);

Page 1799: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCreatesadistancemap.Thefunctionencodesaparticlepixelvalueasafunctionofthedistanceofthepixelfromtheparticleborder.Foramoreprecisebutsloweralgorithm,useimaqDanielssonDistance().

Page 1800: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 1801: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source Image* Theimagethatthe

functionusestocomputethedistancemap.Thefunctionmodifiestheborderofthesourceimage.Thebordermustbeatleasthalfaslargeasthelargerofthestructuringelementdimensions.

structuringElement constStructuringElement* Thestructuringelementusedintheoperation.SetthisparametertoNULLifyoudonotwantacustomstructuringelement.

Page 1802: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1803: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 1804: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSimpleEdgeUsagePointFloat*imaqSimpleEdge(constImage*image,constPoint*points,intnumPoints,constSimpleEdgeOptions*options,int*numEdges);

Page 1805: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFindsprominentedgesalonganarrayofpixelcoordinates.Thisfunctioncanreturnthefirstedge,thefirstandthelastedges,oralltheedges.

Page 1806: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1807: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageinwhichyouwanttofindedges.

points constPoint* Thepathalongwhichthefunctiondetectsedges.ThisparameterisrequiredandcannotbeNULL.

numPoints int Thenumberofpointsinthepointsarray.

options constSimpleEdgeOptions* Describeshowyouwantthefunctiontofindedges.ThisparameterisrequiredandcannotbeNULL.

numEdges int* Onreturn,thenumberofedgesthatthefunctionfound.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1808: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

PointFloat* Onsuccess,thisfunctionreturnsanarrayofpointsindicatingthelocationoftheedges.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthearraybycallingimaqDispose().

Page 1809: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSizeFilterUsageintimaqSizeFilter(Image*dest,Image*source,intconnectivity8,interosions,SizeTypekeepSize,constStructuringElement*structuringElement);

Page 1810: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFiltersparticlesbasedontheirsize.Thealgorithmerodestheimageaspecifiednumberoftimesandeitherkeepsordiscardstheparticlesfromtheoriginalimagethatremainintheerodedimage.

Page 1811: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 1812: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source Image* Theimageonwhichthe

functionappliesthefilter.Thecalculationmodifiestheborderofthesourceimage.Thebordermustbeatleasthalfaslargeasthelargerofthestructuringelementdimensions.

connectivity8 int SetthisparametertoTRUEtouseconnectivity-8todeterminewhetherparticlesaretouching.SetthisparametertoFALSEtouseconnectivity-4todeterminewhetherparticlesaretouching.Formoreinformationaboutconnectivity,seeChapter9,BinaryMorphology,intheNIVisionConceptsManual.

erosions int Thenumberoferosionstoperform.

keepSize SizeType Determinesthesizeoftheparticlesthefunctionkeepsaftertheerosion.

structuringElement constStructuringElement* Thestructuringelementusedintheoperation.

Page 1813: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

SetthisparametertoNULLifyoudonotwantacustomstructuringelement.

Page 1814: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1815: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 1816: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSkeletonUsageintimaqSkeleton(Image*dest,Image*source,SkeletonMethodmethod);

Page 1817: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCalculatestheskeletonoftheparticlesinsidetheimage.Theskeletonismadeupoflinesseparatingthezonesofinfluenceintheimage.

Page 1818: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 1819: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source Image* Theimagewhoseskeletonthefunction

derives.Thecalculationmodifiestheborderofthesourceimage.Thebordermustbeatleastonepixelwide.

method SkeletonMethod Themethodthatthefunctionusestocalculatetheskeleton.

Page 1820: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1821: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 1822: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSnapUsageImage*imaqSnap(SESSION_IDsessionID,Image*image,Rectrect);

Page 1823: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeAcquiresasingleimage.

Page 1824: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1825: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

sessionID SESSION_ID AvalidsessionID.image Image* Theimageintowhichtoacquire.Ifimageis

NULL,imaqSnap()createsanewimage.rect Rect Theareatoacquire.Setthisparameterto

IMAQ_NO_RECTtoacquiretheentireacquisitionwindow.

Page 1826: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

Image* Onsuccess,thisfunctionreturnstheacquiredimage.IfyousetimagetoNULL,thefunctionreturnsanewimage.Otherwise,thefunctionreturnsapointertoimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().

Page 1827: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSpoke2UsageSpokeReport2*imaqSpoke2(Image*image,ROI*roi,SpokeDirectiondirection,EdgeProcessprocess,intstepSize,EdgeOptions2*edgeOptions);

Page 1828: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFindsedgesalongradiallinesspecifiedinsideanannularregion.

Page 1829: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1830: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageinwhichtofindedges.roi ROI* Therectangularregionthefunctionlooks

infortheedges.Thefirstcontourofroimustbearectangleorarotatedrectangle.

direction SpokeDirection Thedirectionthefunctionsearchforedgesalongthesearchlines.

process EdgeProcess Definestheedgesforwhichthefunctionlooks.

stepSize int Specifiesthenumberofpixelsbetweeneachsearchline.

edgeOptions EdgeOptions2* Specifiestheparametersthatareusedtocomputetheedgeprofileanddetectedges.

Page 1831: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

SpokeReport2* Onsuccess,thisfunctionreturnsinformationdescribingthecalculatededgesandthespokeusedbythefunction.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDispose().

Page 1832: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionedgeOptions—SetedgeOptionstoNULLtousethedefaultoptions,asfollows:

polarity IMAQ_SEARCH_FOR_ALL_EDGESkernelSize 3numSearchLines 3minThreshold 10.0interpolationType IMAQ_BILINEAR_FIXEDcolumnProcessingMode IMAQ_MEDIAN_COLUMNS

Page 1833: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqStartAcquisitionUsageintimaqStartAcquisition(SESSION_IDsessionID);

Page 1834: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeStartsanacquisitionidentifiedbysessionID.Usethisfunctionwithsequenceandringfunctions.

Page 1835: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

sessionID SESSION_ID AvalidsessionID.

Page 1836: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1837: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqStopAcquisitionUsageintimaqStopAcquisition(SESSION_IDsessionID);

Page 1838: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeStopsasessionacquisitionidentifiedbysessionID.Usethisfunctionwithgrab,ring,andsequencefunctions.

Page 1839: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

sessionID SESSION_ID AvalidsessionID.

Page 1840: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1841: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqStraightEdgeUsageStraightEdgeReport2*imaqStraightEdge(constImage*image,constROI*roi,SearchDirectionsearchDirection,constEdgeOptions2*edgeOptions,constStraightEdgeOptions*straightEdgeOptions);

Page 1842: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFindsstraightedgesinsideanROIinanimage.

Page 1843: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1844: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageinwhichtofindedges.

roi constROI* TheROItofindstraightedgesinside.

searchDirection SearchDirection Thedirectiontosearchforstraightlines.Thefirstcontourofroimustbearectangle,rotatedrectangle,ora4-sidedclosedcontour.

edgeOptions constEdgeOptions2* Specifiestheparametersthatareusedtocomputetheedgeprofileanddetectedges.

straightEdgeOptions constStraightEdgeOptions* Specifiestheoptionsusedtofitalineintheroi.

Page 1845: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

StraightEdgeReport2* Onsuccess,thisfunctionreturnsastructureofinformationabouttheedgesfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisstructure,disposeofitbycallingimaqDispose().

Page 1846: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionedgeOptions—SetedgeOptionstoNULLtousethefollowingdefaultvalues:

polarity IMAQ_SEARCH_FOR_ALL_EDGESkernelSize 3width 3minThreshold 10.0interpolationType IMAQ_BILINEAR_FIXEDcolumnProcessingMode IMAQ_MEDIAN_COLUMNS

straightEdgeOptions—SetstraightEdgeOptionstoNULLtousethefollowingdefaultvalues:

numLines 1searchMode IMAQ_USE_BEST_PROJECTION_EDGEminScore 10.0maxSize 1000.0orientation 0.0angleRange 10.0angleTolerance 1.0stepSize 3minSignalToNoiseRatio 0.0minCoverage 25.0houghIterations 5

Page 1847: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSubtractUsageintimaqSubtract(Image*dest,constImage*sourceA,constImage*sourceB);

Page 1848: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSubtractstwoimages.

Page 1849: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_COMPLEX

Page 1850: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.sourceA constImage* Thefirstimagetosubtract.sourceB constImage* Thesecondimagetosubtract.

Page 1851: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1852: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsourceB—ThetypeofthesourceBimagedependsonthetypeofthesourceA,asfollows:

IfsourceAisIMAQ_IMAGE_I16,sourceBmustbeIMAQ_IMAGE_I16orIMAQ_IMAGE_U8.IfsourceAisIMAQ_IMAGE_SGL,sourceBmustbeIMAQ_IMAGE_SGL,IMAQ_IMAGE_I16,orIMAQ_IMAGE_U8.IfsourceAisIMAQ_IMAGE_RGB,sourceBmustbeIMAQ_IMAGE_RGBorIMAQ_IMAGE_U8.IfsourceAisIMAQ_IMAGE_COMPLEX,sourceBmustbeIMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_SGL,IMAQ_IMAGE_I16,orIMAQ_IMAGE_U8.

Otherwise,sourceBmustbethesametypeassourceA.

Page 1853: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSubtractConstantUsageintimaqSubtractConstant(Image*dest,constImage*source,PixelValuevalue);

Page 1854: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSubtractseachpixelinanimagebyaconstant.

Page 1855: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_COMPLEX

Page 1856: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagefromwhichthefunctionsubtractsa

scalarconstant.value PixelValue Thevaluetosubtractfromthesourceimage

pixels.Setthememberofvaluethatcorrespondstotheimagetype.

Page 1857: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1858: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqThresholdUsageintimaqThreshold(Image*dest,constImage*source,floatrangeMin,floatrangeMax,intuseNewValue,floatnewValue);

Page 1859: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeThresholdsanimage.Thefunctionsetspixelsvaluesoutsideofthegivenrangeto0.Thefunctionsetspixelvalueswithintherangetoagivenvalueorleavesthevaluesunchanged.

Page 1860: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 1861: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.rangeMin float Thelowerboundaryoftherangeofpixel

valuestokeep.rangeMax float Theupperboundaryoftherangeofpixel

valuestokeep.useNewValue int SetthisparametertoTRUEtosetthepixel

valueswithin[rangeMin,rangeMax]tothevaluespecifiedinnewValue.SetthisfieldtoFALSEtoleavethepixelvaluesunchanged.

newValue float IfyousetuseNewValuetoTRUE,newValueisthereplacementvalueforpixelswithintherange.IfyousetuseNewValuetoFALSE,thefunctionignoresthisparameter.

Page 1862: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1863: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqTrainCharsUsageintimaqTrainChars(constImage*image,CharSet*set,intindex,constchar*charValue,constROI*roi,constOCRProcessingOptions*processingOptions,constOCRSpacingOptions*spacingOptions);

Page 1864: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeAssignscharactervaluestotheidentifiableobjectsintheimageandappendsthenewlytrainedcharacterstothecharacterset.

Page 1865: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1866: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Thesourceimageforthisoperation.

set CharSet* Thecharactersetthisfunctionoperateson.Tocreateacharacterset,useimaqCreateCharSet().ThisparameterisrequiredandcannotbeNULL.

index int TheindexoftheobjectidentifiedwithintheROIthatyouwanttotrain.PassIMAQ_ALL_OBJECTStotrainalltheobjectsthatthefunctionidentifiesintheROI.

charValue constchar* Anull-terminatedstringofcharactersthatspecifiesthevalueoftheobjectattheindex.Thelengthofthestringmustnotexceed255characters.IfyousetindextoIMAQ_ALL_OBJECTS,eachcharacterincharValueisthevaluefortheobjectatthecorrespondingindexinthesetofobjects

Page 1867: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

identifiedwithintheROI.Forexample,thecharacterinthefirstpositionofcharValueisthevaluefortheobjectatindex0.IfyousetindextoIMAQ_ALL_OBJECTS,thelengthofcharValuemustmatchthenumberofobjectsidentifiedwithintheROI.

roi constROI* TheROIthatthefunctionperformsthisoperationon.PassNULLtousetheentireimageforthisoperation.

processingOptions constOCRProcessingOptions* Theoptionsyouusetoconfigurehowthefunctionprocessesthecontentsoftheimagebeforeattemptingtoreadtext.

spacingOptions constOCRSpacingOptions* Thesizeandspacingconstraintsyoucanapplytocharactersintheimage.

Page 1868: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1869: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionprocessingOptions—SettheprocessingOptionsparametertoNULLtousethefollowingdefaultprocessingoptions:

mode IMAQ_COMPUTED_UNIFORMlowThreshold 0highThreshold 255blockCount 4fastThreshold FALSEbiModalCalculation FALSEdarkCharacters TRUEremoveObjectsTouchingROI FALSEerosionCount 0

spacingOptions—SetthespacingOptionsparametertoNULLtousethefollowingdefaultspacingoptions:

minCharSpacing 1minCharSize 20maxCharSize 65536maxHorizontalElementSpacing 1maxVerticalElementSpacing 0minBoundingRectWidth 1maxBoundingRectWidth 65536minBoundingRectHeight 1maxBoundingRectHeight 65536autoSplit FALSE

Page 1870: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqTrainNearestNeighborClassifierUsageNearestNeighborTrainingReport*imaqTrainNearestNeighborClassifier(ClassifierSession*session,constNearestNeighborOptions*options);

Page 1871: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeTrainsaclassifierwiththenearestneighborengine.

Page 1872: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

session ClassifierSession* Theclassifiersessiontotrain.options constNearestNeighborOptions* Theoptionstousewhen

training.

Page 1873: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

NearestNeighborTrainingReport* Onsuccess,thisfunctionreturnsareportcontainingtheresultsofthetraining.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthereportbycallingimaqDispose().

Page 1874: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqTransformPixelToRealWorldUsageTransformReport*imaqTransformPixelToRealWorld(constImage*image,constPointFloat*pixelCoordinates,intnumCoordinates);

Page 1875: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeTransformspixelcoordinatestoreal-worldcoordinates,accordingtothecalibrationinformationcontainedinanimage.

NoteYoumustfirstattachcalibrationinformationtothisimagebyusingoneofthefollowingfunctions:imaqCopyCalibrationInfo2()imaqLearnCalibrationGrid()imaqLearnCalibrationPoints()imaqSetSimpleCalibration()

Page 1876: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1877: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagewhosecalibrationinformationthefunctionusestotransformthepixelcoordinates.

pixelCoordinates constPointFloat* Thearrayofpixelcoordinatesthefunctiontransformstoreal-worldcoordinates.ThisparameterisrequiredandcannotbeNULL.

numCoordinates int Thenumberofcoordinatesinthearray.

Page 1878: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

TransformReport* Onsuccess,thisfunctionreturnsareportdescribingtherealworldcoordinates.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereport,disposeofitbycallingimaqDispose().

Page 1879: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqTransformRealWorldToPixelUsageTransformReport*imaqTransformRealWorldToPixel(constImage*image,constPointFloat*realWorldCoordinates,intnumCoordinates);

Page 1880: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeTransformsreal-worldcoordinatestopixelcoordinates,accordingtothecalibrationinformationcontainedinanimage.

NoteYoumustfirstattachcalibrationinformationtothisimagebyusingoneofthefollowingfunctions:imaqCopyCalibrationInfo2()imaqLearnCalibrationGrid()imaqLearnCalibrationPoints()imaqSetSimpleCalibration()

Page 1881: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1882: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagewhosecalibrationinformationthefunctionusestotransformthereal-worldcoordinates.

realWorldCoordinates constPointFloat* Thearrayofreal-worldcoordinatesthefunctiontransformstopixelcoordinate.ThisparameterisrequiredandcannotbeNULL.

numCoordinates int Thenumberofcoordinatesinthearray.

Page 1883: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

TransformReport* Onsuccess,thisfunctionreturnsareportdescribingthepixelcoordinates.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereport,disposeofitbycallingimaqDispose().

Page 1884: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqTransformROI2UsageintimaqTransformROI2(ROI*roi,constCoordinateSystem*baseSystem,constCoordinateSystem*newSystem);

Page 1885: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRotatesandtranslatesaregionofinterest(ROI)fromonecoordinatesystemtoanothercoordinatesystemwithinanimage.

Page 1886: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi ROI* TheROItotransform.ThisparameterisrequiredandcannotbeNULL.

baseSystem constCoordinateSystem* Describesthebasecoordinatesystem.ThisparameterisrequiredandcannotbeNULL.

newSystem constCoordinateSystem* Describesthenewcoordinatesystem.ThisparameterisrequiredandcannotbeNULL.

Page 1887: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1888: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionroi—Ifnecessary,thefunctionconvertsrectanglecontoursinsideroitorotatedrectanglecontours.Ifnecessary,thefunctionconvertsovalcontoursinsideroitoclosedcontours.

Page 1889: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqTransposeUsageintimaqTranspose(Image*dest,constImage*source);

Page 1890: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeTransposesanimage.

Page 1891: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1892: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagetotranspose.

Page 1893: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1894: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqTruncateUsageintimaqTruncate(Image*dest,constImage*source,TruncateModehighlow,floatratioToKeep);

Page 1895: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeTruncatesthefrequenciesofacompleximage.

Page 1896: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_COMPLEX

Page 1897: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagewhosefrequenciesthefunction

truncates.highlow TruncateMode Specifieswhichfrequenciesthefunction

truncates.ratioToKeep float Specifiesthepercentageoffrequenciesthat

thefunctionretains.Forexample,setthisparameterto10.0toretain10percentofthefrequenciesandattenuate90percentofthefrequencies.

Page 1898: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1899: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqUnflattenUsageintimaqUnflatten(Image*image,constvoid*data,unsignedintsize);

Page 1900: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeConvertsdatareturnedfromimaqFlatten()toanimage.

Page 1901: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1902: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageinwhichthefunctionstoresthedata.data constvoid* Thedatatounflatten.Thisparameterisrequiredand

cannotbeNULL.size unsigned

intSizeofthedata,inbytes.

Page 1903: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1904: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqUnwrapImageUsageintimaqUnwrapImage(Image*dest,constImage*source,Annulusannulus,RectOrientationorientation,InterpolationMethodmethod);

Page 1905: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeThisfunctionunwrapsanannulusfromanimageintoarectangularimage.

Page 1906: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB

Page 1907: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimagefortheunwrappedpixels.

source constImage* Theimagecontainingtheannulusofpixelstobeunwrapped.

annulus Annulus Thecoordinatelocationoftheannulusthefunctionunwraps.

orientation RectOrientation Specifiestheorientationoftheresultingrectangularimagerelativetotheannulus.

method InterpolationMethod Specifiestheinterpolationalgorithmusedintheunwrappingprocess.ValidmethodsareIMAQ_ZERO_ORDERandIMAQ_BILINEAR.

Page 1908: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1909: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqVerifyPatternsUsageint*imaqVerifyPatterns(constImage*image,constCharSet*set,constString255*expectedPatterns,intpatternCount,constROI*roi,int*numScores);

Page 1910: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeVerifiestheaccuracyofthetextintheimage.Foreachpattern,thefunctionchecksfortheexistenceofareferencecharacterfortheexpectedcharacterclassandcomparesthecharacterfromtheimagetothereferencecharacter.

Page 1911: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1912: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Thesourceimageforthisoperation.set constCharSet* Thecharactersetthisfunction

operateson.Tocreateacharacterset,useimaqCreateCharSet().ThisparameterisrequiredandcannotbeNULL.

expectedPatterns constString255* Thearrayofexpectedpatternsintheregionofinterest.ThisparameterisrequiredandcannotbeNULL.

patternCount int ThenumberofpatternsintheexpectedPatternsarray.

roi constROI* TheROIthatthefunctionperformsthisoperationon.PassNULLtousetheentireimageforthisoperation.IftheROIhasmultiplecontours,eachcontourisinterpretedasapatternlocationintheimage.IftheROIonlyhasonecontour,thefunctionsearchestheROIfortheexpectedpatterns.

numScores int* Onreturn,thenumberofscoresreturnedbythefunction.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1913: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int* Onsuccess,thisfunctionreturnsanarrayofverificationscoresforthefirstnumScoreselementsoftheexpectedPatternsarray.Ifareferencecharacterdoesnotexistforthecharacterclassofacharacter,thefunctionsetsthescorecorrespondingtothatcharacterto0.Onfailure,thisfunctionreturnsNULL.TogetextendederrorinformationcallimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().

Page 1914: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqVerifyTextUsageint*imaqVerifyText(constImage*image,constCharSet*set,constchar*expectedString,constROI*roi,int*numScores);

Page 1915: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeVerifiestheaccuracyofthetextintheimage.Foreachcharacter,thefunctionchecksfortheexistenceofareferencecharacterfortheexpectedcharacterclassandcomparesthecharacterfromtheimagetothereferencecharacter.

Page 1916: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1917: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Thesourceimageforthisoperation.set constCharSet* Thecharactersetthisfunctionoperates

on.Tocreateacharacterset,useimaqCreateCharSet().ThisparameterisrequiredandcannotbeNULL.

expectedString constchar* Theexpectedcharactervaluesintheregionofinterest.ThisparameterisrequiredandcannotbeNULL.

roi constROI* TheROIthatthefunctionperformsthisoperationon.PassNULLtousetheentireimageforthisoperation.IftheROIhasmultiplecontours,eachcontourisinterpretedasapatternlocationintheimage.IftheROIonlyhasonecontour,thefunctionsearchestheROIfortheexpectedpatterns.

numScores int* Onreturn,thenumberofscoresreturnedbythefunction.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1918: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int* Onsuccess,thisfunctionreturnsanarrayofverificationscoresforthefirstnumScorescharactersintheexpectedStringarray.Ifareferencecharacterdoesnotexistforthecharacterclassofacharacter,thefunctionsetsthescorecorrespondingtothatcharacterto0.Onfailure,thisfunctionreturnsNULL.TogetextendederrorinformationcallimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().

Page 1919: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqView3DUsageintimaqView3D(Image*dest,Image*source,constView3DOptions*options);

Page 1920: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeThisfunctioncreatesathree-dimensionalrepresentationofanimagefordisplaypurposes.

Page 1921: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_HSL

Page 1922: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source Image* Theimageofwhichtocreatea3D

representation.options constView3DOptions* Specifieshowtoconverttheimagetoa

three-dimensionalrepresentation.

Page 1923: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1924: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.options—SetoptionstoNULLtousethedefaultoptions,asfollows:

sizeReduction 2maxHeight 64direction IMAQ_3D_NWalpha 30beta 30border 20background 85plane IMAQ_3D_MAGNITUDE

Page 1925: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqWatershedTransformUsageintimaqWatershedTransform(Image*dest,constImage*source,intconnectivity8,int*zoneCount);

Page 1926: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputesthewatershedtransformonanimage.RefertotheNIVisionConceptsManualformoreinformationaboutwatershedtransform.

Page 1927: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16

Page 1928: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.connectivity8 int Specifieshowthewatershedtransform

algorithmdetermineswhetheranadjacentpixelbelongstothesameordifferentcatchmentorwatershedline.

zoneCount int* Onreturn,specifiesthenumberofzonesdetectedintheimage.Azoneisaregionoftheimageinwhichallofthepixelsbelongtothesamecatchmentbasin.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 1929: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1930: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussiondest—IfdestisoftypeIMAQ_IMAGE_U8,thefunctioncanstoreupto255uniquelabelsnotincludingthewatershedlinevalueof0.IfdestisoftypeIMAQ_IMAGE_I16,thefunctioncanstoreupto32,767uniquelabelsnotincludingthewatershedlinevalueof0.

Page 1931: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqWriteAVIFrameUsageintimaqWriteAVIFrame(Image*image,AVISessionsession,constvoid*data,unsignedintdataLength);

Page 1932: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeThisfunctionwritesanimagetoanAVIfile,aswellasdatatoattachtothisimage(iftheAVIfilewascreatedtoallowthis).

Page 1933: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB

Page 1934: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* TheimagetowritetotheAVI.session AVISession Thesessiontouse.data constvoid* IfthisAVIhasdataattachedtoit,thedatato

attachtothisframe.dataLength unsigned

intIfdataisnon-NULL,thelengthofthedatatoattachtothisframe.ThislengthmustnotexceedthemaxDataLengthparameterofimaqCreateAVI.

Page 1935: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1936: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqWriteBMPFileUsageintimaqWriteBMPFile(constImage*image,constchar*fileName,intcompress,constRGBValue*colorTable);

Page 1937: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeWritesanimagetoaBMPfile.ThefunctionalsostoresaCalibrationUnitofIMAQ_METERonly.IfyoupassanimagetothisfunctionthathasaCalibrationUnitotherthanIMAQ_METER,thefunctionconvertsxStepandyStepfromthesuppliedunitintometers.

Page 1938: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB

Page 1939: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagetowritetoafile.fileName constchar* Thenameofthefiletowrite.This

parameterisrequiredandcannotbeNULL.

compress int SetthisparametertoTRUEtocompresstheBMP.SetthisparametertoFALSEtowriteanuncompressedBMP.

colorTable constRGBValue* Anoptionalcolortabletoassociatewith8-bitimages.Ifyouwanttoprovideacolortable,thetablemusthave256elements.SetthisparametertoNULLtowriteagrayscalepalettetothefile.

Page 1940: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1941: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqWriteClassifierFileUsageintimaqWriteClassifierFile(constClassifierSession*session,constchar*fileName,WriteClassifierFileModemode,constString255description);

Page 1942: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeWritesaclassifiersessiontofile.

Page 1943: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

session constClassifierSession* Theclassifiersessiontowritetofile.

fileName constchar* Thenameofthefiletowrite.ThisparameterisrequiredandcannotbeNULL.

mode WriteClassifierFileMode Themodetousewhenwritingtheclassificationsessiontofile.

description constString255 Adescriptionoftheclassificationsession.SetthisparametertoNULLifyoudonotneedadescriptionforthisfile.

Page 1944: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1945: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqWriteCustomDataUsageintimaqWriteCustomData(Image*image,constchar*key,constvoid*data,unsignedintsize);

Page 1946: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeAssociatessomedatawithatextkeyinanimage.

Page 1947: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1948: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageinwhichtowritethecustomdata.key constchar* Thekeyusedtofindthedataintheimage.This

parameterisrequiredandcannotbeNULL.data constvoid* Thedataassociatedwiththekey.Thisparameteris

requiredandcannotbeNULL.size unsigned

intSizeofthedata,inbytes.

Page 1949: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1950: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqWriteFileUsageintimaqWriteFile(constImage*image,constchar*fileName,constRGBValue*colorTable);

Page 1951: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeThisfunctionwritesanimagetoafile.Inadditiontowritingpixelinformation,thefunctionwritescalibrationinformationifthefileformatsupportscalibrationinformation.Thefollowinglistdetailsfileformatsthatsupportcalibrationinformation.

AIPDFiles—StoresanytypeofCalibrationUnitbutstoresonlyonestepsize.ThefunctionstoresthexStepfromthesuppliedimageasthestepsize.BMPandJPEG2000Files—StoresaCalibrationUnitofIMAQ_METERonly.IfyoupassanimagetothisfunctionthathasaCalibrationUnitotherthanIMAQ_METER,thefunctionconvertsxStepandyStepfromthesuppliedunitintometers.JPEGandTIFFFiles—StoresaCalibrationUnitofIMAQ_CENTIMETERorIMAQ_INCHonly.IfyoupassanimagetothisfunctionthathasametricCalibrationUnitotherthanIMAQ_CENTIMETER,thefunctionconvertsxStepandyStepfromthesuppliedunitintocentimeters.IfyoupassanimagetothisfunctionthathasanEnglishCalibrationUnitotherthanIMAQ_INCH,thefunctionconvertsxStepandyStepfromthesuppliedunitintoinches.PNGFiles—StoresanytypeofCalibrationUnit.

Towritespecificfiletypeswithmoreflexibility,useimaqWriteBMPFile(),imaqWriteJPEGFile(),imaqWriteJPEG2000File,imaqWriteTIFFFile(),orimaqWritePNGFile2().Thefiletypeisdeterminedbytheextension,asfollows:

Extension FileType.aipdor.apd AIPD.bmp BMP.jpgor.jpeg JPEG.jp2 JPEG2000.png PNG.tifor.tiff TIFF

Thefollowingarethesupportedimagetypesforeachfiletype:

Page 1952: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FileTypes ImageTypesAIPD allimagetypesBMP,JPEG 8-bit,RGBPNG,TIFF,JPEG2000 8-bit,16-bit,RGB,RGBU64

Page 1953: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1954: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagetowritetoafile.Thefunctioncannotwriteallimagetypestoallfiletypes.

fileName constchar* Thenameofthefile.ThisparameterisrequiredandcannotbeNULL.

colorTable constRGBValue* Anoptionalcolortabletoassociatewith8-bitimages.Ifyouprovideacolortable,thetablemusthave256elements.SetthisparametertoNULLtowriteagrayscalepalettetotheimage.

Page 1955: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1956: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqWriteJPEG2000FileUsageintimaqWriteJPEG2000File(constImage*image,constchar*fileName,intlossless,floatcompressionRatio,constJPEG2000FileAdvancedOptions*advancedOptions,constRGBValue*colorTable);

Page 1957: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeWritesanimagetoaJPEG2000file.

Page 1958: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_RGB_U64

Page 1959: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagetowritetoafile.

fileName constchar* Thenameofthefiletowrite.ThisparameterisrequiredandcannotbeNULL.

lossless int SetthisparametertoTRUEtowritetheJPEG2000filewithoutlossofinformation.SetthisparametertoFALSEtowritetheJPEG2000fileasanapproximationtotheimage.

compressionRatio float SpecifiesthedegreetowhichtocompresstheJPEG2000file.Forexample,acompressionRatioof50meansthattheresultingJPEG2000filewillbe50timessmallerthanthesizeoftheimageinmemory.Thisparameteris

Page 1960: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ignorediflosslessisTRUE.

advancedOptions constJPEG2000FileAdvancedOptions* SpecifiesadvancedbehaviorswhenwritingaJPEG2000file.

colorTable constRGBValue* Anoptionalcolortabletoassociatewith8-bitimages.Ifyouprovideacolortable,thetablemusthave256elements.SetthisparametertoNULLtowriteagrayscalepalettetotheimage.

Page 1961: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1962: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionadvancedOptions—SetadvancedOptionstoNULLtousethefollowingdefaultvalues:

waveletMode IMAQ_WAVELET_TRANSFORM_INTEGERuseMultiComponentTransform TRUEmaxWaveletTransformLevel 5quantizationStepSize 0

Page 1963: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqWriteJPEGFileUsageintimaqWriteJPEGFile(constImage*image,constchar*fileName,unsignedintquality,void*colorTable);

Page 1964: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeWritesanimagetoaJPEGfile.ThefunctionalsostoresaCalibrationUnitofIMAQ_CENTIMETERorIMAQ_INCHonly.IfyoupassanimagetothisfunctionthathasametricCalibrationUnitotherthanIMAQ_CENTIMETER,thefunctionconvertsxStepandyStepfromthesuppliedunitintocentimeters.IfyoupassanimagetothisfunctionthathasanEnglishCalibrationUnitotherthanIMAQ_INCH,thefunctionconvertsxStepandyStepfromthesuppliedunitintoinches.

Page 1965: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB

Page 1966: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagetowritetoafile.fileName constchar* Thenameofthefiletowrite.Thisparameteris

requiredandcannotbeNULL.quality unsignedint Representsthequalityoftheimage.Asquality

increases,thefunctionuseslesslossycompression.Acceptablevaluesrangefrom0to1,000,with750asthedefault.

NoteThisfunctionuseslossycompressionevenifyousetthequalityto1,000.

colorTable void* Reserved.JPEGfilesdonotsupportcolorpalettesforgrayscaleimages.

Page 1967: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1968: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqWriteMultipleGeometricPatternFileUsageintimaqWriteMultipleGeometricPatternFile(constMultipleGeometricPattern*multiplePattern,constchar*fileName,constchar*description);

Page 1969: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeWritesamultiplegeometrictemplatetofile.

Page 1970: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

multiplePattern constMultipleGeometricPattern* Themultiplegeometrictemplatetowritetofile.ThisparameterisrequiredandcannotbeNULL.

fileName constchar* Thenameofthefiletowrite.ThisparameterisrequiredandcannotbeNULL.

description constchar* Adescriptionoftheclassificationsession.SetthisparametertoNULLifyoudonotneedadescriptionforthisfile.

Page 1971: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1972: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqWriteOCRFileUsageintimaqWriteOCRFile(constchar*fileName,constCharSet*set,constchar*setDescription,constReadTextOptions*readOptions,constOCRProcessingOptions*processingOptions,constOCRSpacingOptions*spacingOptions);

Page 1973: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeStoresacharactersetandthevaluesoftheappropriateNIVisionstructuresinthefilespecifiedbyfileName.

Page 1974: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

fileName constchar* Filethatthefunctionusesforthisoperation.ThisparameterisrequiredandcannotbeNULL.

set constCharSet* Thetrainedcharacterstostoreinthefile.SetthisparametertoNULLtowriteanemptycharactersettothefile.

setDescription constchar* Thetrainedcharactersetdescriptiontostoreinthefile.Thedescriptionmustnotexceed255characters.SetthisparametertoNULLifyoudonotneedtostorethisinformation.

readOptions constReadTextOptions* Theoptionsforreadingtexttostoreinthefile.SetthisparametertoNULLtowritethedefaultreadingoptions.

processingOptions constOCRProcessingOptions* Theoptionsforimageprocessingtostoreinthefile.SetthisparametertoNULLtowritethedefaultprocessing

Page 1975: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

options.spacingOptions constOCRSpacingOptions* Thecharactersize

andspacingoptionstostoreinthefile.SetthisparametertoNULLtowritethedefaultcharactersizeandspacingoptions.

Page 1976: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1977: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionreadOptions—SetreadOptionstoNULLtousethefollowingdefaultreadingoptions:

validChars NULLnumValidChars 0substitutionChar ?readStrategy IMAQ_READ_AGGRESSIVEacceptanceLevel 700aspectRatio 400readResolution IMAQ_LOW_RESOLUTION

processingOptions—SetprocessingOptionstoNULLtousethefollowingdefaultprocessingoptions:

mode IMAQ_COMPUTED_UNIFORMlowThreshold 0highThreshold 255blockCount 4fastThreshold FALSEbiModalCalculation FALSEdarkCharacters TRUEremoveObjectsTouchingROI FALSEerosionCount 0

spacingOptions—SetspacingOptionstoNULLtousethefollowingdefaultspacingoptions:

minCharSpacing 1minCharSize 20maxCharSize 65536maxHorizontalElementSpacing 1maxVerticalElementSpacing 0

Page 1978: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

minBoundingRectWidth 1maxBoundingRectWidth 65536minBoundingRectHeight 1maxBoundingRectHeight 65536autoSplit FALSE

Page 1979: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqWritePNGFile2UsageintimaqWritePNGFile2(constImage*image,constchar*fileName,unsignedintcompressionSpeed,constRGBValue*colorTable,intuseBitDepth);

Page 1980: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeWritesanimagetoaPNGfile.ThisfunctionstoresanytypeofCalibrationUnitinaformatthatNIVisioncanread.Thisfunctionalsoconvertscalibrationinformationintometers,whichanyPNGfilereadercaninterpret.

Page 1981: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_RGB_U64

Page 1982: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagetowritetoafile.fileName constchar* Thenameofthefiletowrite.

ThisparameterisrequiredandcannotbeNULL.

compressionSpeed unsignedint Representstherelativespeedofthecompressionalgorithm.Asthisvalueincreases,thefunctionspendslesstimecompressingtheimage.Acceptablevaluesrangefrom0to1,000,with750asthedefault.PNGformatalwaysstoresimagesinalosslessfashion.

colorTable constRGBValue* Anoptionalcolortabletoassociatewith8-bitimages.Ifyouprovideacolortable,thetablemusthave256elements.SetthisparametertoNULLtowriteagrayscalepalettetotheimage.

useBitDepth int Whensavingasigned16-bitimagetoaPNGfile,NIVisionmustconvertthedatatoanunsignedformatandshiftthedatasothatthemostsignificantbitisalwaystheleftmostbit.SetthisparametertoTRUEtousethebitdepthinformationattachedtoimagetoperformtheseconversions.SetthisparametertoFALSEtobiastheimagebyaddingaconstantvaluetoallthepixelsinthe

Page 1983: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imagesuchthatthelowestnegativepixelvalueintheimagemapstozero,andthenshiftingtheimagedatabasedonthehighestpixelvalueintheimage.

Page 1984: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1985: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqWriteTIFFFileUsageintimaqWriteTIFFFile(constImage*image,constchar*fileName,constTIFFFileOptions*options,constRGBValue*colorTable);

Page 1986: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeWritesanimagetoaTIFFfile.ThisfunctionstoresaCalibrationUnitofIMAQ_CENTIMETERorIMAQ_INCHonly.IfyoupassanimagetothisfunctionthathasametricCalibrationUnitotherthanIMAQ_CENTIMETER,thefunctionconvertsxStepandyStepfromthesuppliedunitintocentimeters.IfyoupassanimagetothisfunctionthathasanEnglishCalibrationUnitotherthanIMAQ_INCH,thefunctionconvertsxStepandyStepfromthesuppliedunitintoinches.

Page 1987: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_RGB_U64

Page 1988: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagetowritetoafile.fileName constchar* Thenameofthefiletowrite.This

parameterisrequiredandcannotbeNULL.

options constTIFFFileOptions* AstructuredefiningthespecificoptionstousewhilewritingtheTIFFfile.

colorTable constRGBValue* Anoptionalcolortabletoassociatewith8-bitimages.Ifyouprovideacolortable,thetablemusthave256elements.SetthisparametertoNULLtowriteagrayscalepalettetotheimage.IfthecompressionTypeelementofoptionsisIMAQ_JPEG,thefunctionignoresthisparameter.

Page 1989: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1990: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:

rowsPerStrip 0,whichwritesalldatainonestripphotoInterp IMAQ_BLACK_IS_ZEROcompressionType IMAQ_NO_COMPRESSION

Page 1991: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqWriteVisionFileUsageintimaqWriteVisionFile(constImage*image,constchar*fileName,constRGBValue*colorTable);

Page 1992: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeThisfunctionwritesanimagetoaPNGfile.Inadditiontowritingpixelinformation,thefunctionwritesanyVisioninformationcontainedintheimagetothefile.

Page 1993: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64

Page 1994: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagetowritetoafile.fileName constchar* Thenameofthefiletowrite.This

parameterisrequiredandcannotbeNULL.

colorTable constRGBValue* Anoptionalcolortabletoassociatewith8-bitimages.Ifyouprovideacolortable,thetablemusthave256elements.SetthisparametertoNULLtowriteagrayscalepalettetotheimage.

Page 1995: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 1996: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqXnorUsageintimaqXnor(Image*dest,constImage*sourceA,constImage*sourceB);

Page 1997: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputesabitwiseXNORbetweentwoimages.

Page 1998: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 1999: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.sourceA constImage* Thefirstsourceimage.sourceB constImage* Thesecondsourceimage,whichmustbethe

sametypeofimageassourceA.

Page 2000: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2001: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqXnorConstantUsageintimaqXnorConstant(Image*dest,constImage*source,PixelValuevalue);

Page 2002: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposePerformsabitwiseXNORbetweenanimageandaconstant.

Page 2003: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 2004: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.value PixelValue ThevaluetoXNORwiththesourceimage.Setthe

memberofvaluethatcorrespondstotheimagetype.

Page 2005: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2006: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqXorUsageintimaqXor(Image*dest,constImage*sourceA,constImage*sourceB);

Page 2007: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputesabitwiseXORbetweentwoimages.

Page 2008: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 2009: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.sourceA constImage* Thefirstsourceimage.sourceB constImage* Thesecondsourceimage,whichmustbethe

sametypeofimageassourceA.

Page 2010: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2011: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqXorConstantUsageintimaqXorConstant(Image*dest,constImage*source,PixelValuevalue);

Page 2012: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposePerformsabitwiseXORbetweenanimageandaconstant.

Page 2013: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 2014: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Thesourceimage.value PixelValue ThevaluetoXORwiththesourceimage.Setthe

memberofvaluethatcorrespondstotheimagetype.

Page 2015: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2016: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqZoomWindow2UsageintimaqZoomWindow2(intwindowNumber,floatxZoom,floatyZoom,Pointcenter);

Page 2017: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthecurrentzoomfactorsforagivenimagewindow.Thezoomfactorindicatesanincreaseordecreaseinthemagnificationofanimageandthisvalueisexpressedasaratiooftheimagesize.Anumbergreaterthan1indicatesamagnificationbytheamountspecified.Forexample,azoomfactorof3indicatesthattheimageisdisplayedatthreetimesitsactualsize(3:1).Anumberlessthan1indicatesthattheimageisdecreasedinmagnificationbythespecifiedamount.Forexample,azoomfactorof0.2indicatesthattheimageisdisplayedatone-fifthitsactualsize(1:5).

Page 2018: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.xZoom float Thezoomfactorforthexdirection.SetxZoom

tozerotomaintainthecurrentzoomfactorforthexdirection.

yZoom float Thezoomfactorfortheydirection.SetyZoomtozerotomaintainthecurrentzoomfactorfortheydirection.

center Point Thecenterpointaroundwhichtozoom.SetthisparametertoIMAQ_NO_POINTtomaintainthecurrentcenterpoint.

Page 2019: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2020: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ErrorCodesNIVisioncanreturnthefollowingerrorcodes.

Code Name0 ERR_SUCCESS-1074396160 ERR_SYSTEM_ERROR-1074396159 ERR_OUT_OF_MEMORY

-1074396158 ERR_MEMORY_ERROR-1074396157 ERR_UNREGISTERED-1074396156 ERR_NEED_FULL_VERSION

-1074396155 ERR_UNINIT

-1074396154 ERR_IMAGE_TOO_SMALL

-1074396153 ERR_BARCODE_CODABAR

-1074396152 ERR_BARCODE_CODE39

-1074396151 ERR_BARCODE_CODE93

-1074396150 ERR_BARCODE_CODE128

-1074396149 ERR_BARCODE_EAN8

-1074396148 ERR_BARCODE_EAN13

-1074396147 ERR_BARCODE_I25

-1074396146 ERR_BARCODE_MSI

-1074396145 ERR_BARCODE_UPCA

Page 2021: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074396144 ERR_BARCODE_CODE93_SHIFT

-1074396143 ERR_BARCODE_TYPE-1074396142 ERR_BARCODE_INVALID

-1074396141 ERR_BARCODE_CODE128_FNC

-1074396140 ERR_BARCODE_CODE128_SET

-1074396139 ERR_ROLLBACK_RESOURCE_OUT_OF_MEMORY

-1074396138 ERR_ROLLBACK_NOT_SUPPORTED

-1074396137 ERR_DIRECTX_DLL_NOT_FOUND

-1074396136 ERR_DIRECTX_INVALID_FILTER_QUALITY

-1074396135 ERR_INVALID_BUTTON_LABEL-1074396134 ERR_THREAD_INITIALIZING

-1074396133 ERR_THREAD_COULD_NOT_INITIALIZE

-1074396132 ERR_MASK_NOT_TEMPLATE_SIZE

-1074396130 ERR_NOT_RECT_OR_ROTATED_RECT

Page 2022: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074396129 ERR_ROLLBACK_UNBOUNDED_INTERFACE

-1074396128 ERR_ROLLBACK_RESOURCE_CONFLICT_3

-1074396127 ERR_ROLLBACK_RESOURCE_CONFLICT_2

-1074396126 ERR_ROLLBACK_RESOURCE_CONFLICT_1

-1074396125 ERR_INVALID_CONTRAST_THRESHOLD

-1074396124 ERR_INVALID_CALIBRATION_ROI_MODE

-1074396123 ERR_INVALID_CALIBRATION_MODE

-1074396122 ERR_DRAWTEXT_COLOR_MUST_BE_GRAYSCALE

-1074396121 ERR_SATURATION_THRESHOLD_OUT_OF_RANGE

-1074396120 ERR_NOT_IMAGE-1074396119 ERR_CUSTOMDATA_INVALID_KEY

Page 2023: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074396118 ERR_INVALID_STEP_SIZE

-1074396117 ERR_MATRIX_SIZE

-1074396116 ERR_CALIBRATION_INSF_POINTS

-1074396115 ERR_CALIBRATION_IMAGE_CORRECTED

-1074396114 ERR_CALIBRATION_INVALID_ROI

-1074396113 ERR_CALIBRATION_IMAGE_UNCALIBRATED

-1074396112 ERR_INCOMP_MATRIX_SIZE

-1074396111 ERR_CALIBRATION_FAILED_TO_FIND_GRID

-1074396110 ERR_CALIBRATION_INFO_VERSION

-1074396109 ERR_CALIBRATION_INVALID_SCALING_FACTOR

-1074396108 ERR_CALIBRATION_ERRORMAP

-1074396107 ERR_CALIBRATION_INFO_1

-1074396106 ERR_CALIBRATION_INFO_2

Page 2024: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074396105 ERR_CALIBRATION_INFO_3

-1074396104 ERR_CALIBRATION_INFO_4

-1074396103 ERR_CALIBRATION_INFO_5

-1074396102 ERR_CALIBRATION_INFO_6

-1074396101 ERR_CALIBRATION_INFO_MICRO_PLANE

-1074396100 ERR_CALIBRATION_INFO_PERSPECTIVE_PROJECTION

-1074396099 ERR_CALIBRATION_INFO_SIMPLE_TRANSFORM

-1074396098 ERR_RESERVED_MUST_BE_NULL

-1074396097 ERR_INVALID_PARTICLE_PARAMETER_VALUE

-1074396096 ERR_NOT_AN_OBJECT-1074396095 ERR_CALIBRATION_DUPLICATE_REFERENCE_POINT

-1074396094 ERR_ROLLBACK_RESOURCE_CANNOT_UNLOCK

-1074396093 ERR_ROLLBACK_RESOURCE_LOCKED

Page 2025: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074396092 ERR_ROLLBACK_RESOURCE_NON_EMPTY_INITIALIZE

-1074396091 ERR_ROLLBACK_RESOURCE_UNINITIALIZED_ENABLE

-1074396090 ERR_ROLLBACK_RESOURCE_ENABLED

-1074396089 ERR_ROLLBACK_RESOURCE_REINITIALIZE

-1074396088 ERR_ROLLBACK_RESIZE

-1074396087 ERR_ROLLBACK_STOP_TIMER

-1074396086 ERR_ROLLBACK_START_TIMER-1074396085 ERR_ROLLBACK_INIT_TIMER

-1074396084 ERR_ROLLBACK_DELETE_TIMER

-1074396083 ERR_ROLLBACK_TIMEOUT-1074396082 ERR_PALETTE_NOT_SUPPORTED

-1074396081 ERR_BAD_PASSWORD-1074396080 ERR_INVALID_IMAGE_TYPE-1074396079 ERR_INVALID_METAFILE_HANDLE-1074396077 ERR_INCOMP_TYPE-1074396076 ERR_COORD_SYS_FIRST_AXIS

-1074396075 ERR_COORD_SYS_SECOND_AXIS

Page 2026: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074396074 ERR_INCOMP_SIZE-1074396073 ERR_MASK_OUTSIDE_IMAGE

-1074396072 ERR_INVALID_BORDER-1074396071 ERR_INVALID_SCAN_DIRECTION-1074396070 ERR_INVALID_FUNCTION-1074396069 ERR_INVALID_COLOR_MODE

-1074396068 ERR_INVALID_ACTION

-1074396067 ERR_IMAGES_NOT_DIFF

-1074396066 ERR_INVALID_POINTSYMBOL-1074396065 ERR_CANT_RESIZE_EXTERNAL

-1074396064 ERR_EXTERNAL_NOT_SUPPORTED

-1074396063 ERR_EXTERNAL_ALIGNMENT

-1074396062 ERR_INVALID_TOLERANCE

-1074396061 ERR_INVALID_WINDOW_SIZE

-1074396060 ERR_JPEG2000_LOSSLESS_WITH_FLOATING_POINT

Page 2027: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074396059 ERR_INVALID_MAX_ITERATIONS

-1074396058 ERR_INVALID_ROTATION_MODE-1074396057 ERR_INVALID_SEARCH_VECTOR_WIDTH

-1074396056 ERR_INVALID_MATRIX_MIRROR_MODE-1074396055 ERR_INVALID_ASPECT_RATIO

-1074396054 ERR_INVALID_CELL_FILL_TYPE-1074396053 ERR_INVALID_BORDER_INTEGRITY

-1074396052 ERR_INVALID_DEMODULATION_MODE-1074396051 ERR_INVALID_CELL_FILTER_MODE-1074396050 ERR_INVALID_ECC_TYPE-1074396049 ERR_INVALID_MATRIX_POLARITY-1074396048 ERR_INVALID_CELL_SAMPLE_SIZE-1074396047 ERR_INVALID_LINEAR_AVERAGE_MODE-1074396046 ERR_INVALID_2D_BARCODE_CONTRAST_FOR_ROI

-1074396045 ERR_INVALID_2D_BARCODE_SUBTYPE

-1074396044 ERR_INVALID_2D_BARCODE_SHAPE

Page 2028: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074396043 ERR_INVALID_2D_BARCODE_CELL_SHAPE-1074396042 ERR_INVALID_2D_BARCODE_CONTRAST-1074396041 ERR_INVALID_2D_BARCODE_TYPE-1074396040 ERR_DRIVER-1074396039 ERR_IO_ERROR-1074396038 ERR_FIND_COORDSYS_MORE_THAN_ONE_EDGE

-1074396037 ERR_TIMEOUT-1074396036 ERR_INVALID_SKELETONMODE

-1074396035 ERR_TEMPLATEIMAGE_NOCIRCLE

-1074396034 ERR_TEMPLATEIMAGE_EDGEINFO

-1074396033 ERR_TEMPLATEDESCRIPTOR_LEARNSETUPDATA-1074396032 ERR_TEMPLATEDESCRIPTOR_ROTATION_SEARCHSTRATEGY

-1074396026 ERR_INVALID_PROCESS_TYPE_FOR_EDGE_DETECTION

-1074396025 ERR_INVALID_ANGLE_RANGE_FOR_STRAIGHT_EDGE

-1074396024 ERR_INVALID_MIN_COVERAGE_FOR_STRAIGHT_EDGE

-1074396023 ERR_INVALID_ANGLE_TOL_FOR_STRAIGHT_EDGE

-1074396022 ERR_INVALID_SEARCH_MODE_FOR_STRAIGHT_EDGE

Page 2029: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074396021 ERR_INVALID_KERNEL_SIZE_FOR_EDGE_DETECTION

-1074396020 ERR_INVALID_GRADING_MODE-1074396019 ERR_INVALID_THRESHOLD_PERCENTAGE

-1074396018 ERR_INVALID_EDGE_POLARITY_SEARCH_MODE

-1074396017 ERR_OPENING_NEWER_AIM_GRADING_DATA

-1074396016 ERR_NO_VIDEO_DRIVER-1074396015 ERR_RPC_EXECUTE_IVB

-1074396014 ERR_INVALID_VIDEO_BLIT

-1074396013 ERR_INVALID_VIDEO_MODE-1074396012 ERR_RPC_EXECUTE

-1074396011 ERR_RPC_BIND

-1074396010 ERR_INVALID_FRAME_NUMBER-1074396009 ERR_DIRECTX

-1074396008 ERR_DIRECTX_NO_FILTER

Page 2030: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074396007 ERR_DIRECTX_INCOMPATIBLE_COMPRESSION_FILTER

-1074396006 ERR_DIRECTX_UNKNOWN_COMPRESSION_FILTER-1074396005 ERR_INVALID_AVI_SESSION-1074396004 ERR_DIRECTX_CERTIFICATION_FAILURE

-1074396003 ERR_AVI_DATA_EXCEEDS_BUFFER_SIZE

-1074396002 ERR_INVALID_LINEGAUGEMETHOD-1074396001 ERR_TOO_MANY_AVI_SESSIONS

-1074396000 ERR_FILE_FILE_HEADER-1074395999 ERR_FILE_FILE_TYPE-1074395998 ERR_FILE_COLOR_TABLE-1074395997 ERR_FILE_ARGERR-1074395996 ERR_FILE_OPEN-1074395995 ERR_FILE_NOT_FOUND-1074395994 ERR_FILE_TOO_MANY_OPEN-1074395993 ERR_FILE_IO_ERR-1074395992 ERR_FILE_PERMISSION-1074395991 ERR_FILE_INVALID_TYPE

Page 2031: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395990 ERR_FILE_GET_INFO

-1074395989 ERR_FILE_READ-1074395988 ERR_FILE_WRITE-1074395987 ERR_FILE_EOF-1074395986 ERR_FILE_FORMAT-1074395985 ERR_FILE_OPERATION-1074395984 ERR_FILE_INVALID_DATA_TYPE

-1074395983 ERR_FILE_NO_SPACE-1074395982 ERR_INVALID_FRAMES_PER_SECOND

-1074395981 ERR_INSUFFICIENT_BUFFER_SIZE

-1074395980 ERR_COM_INITIALIZE-1074395979 ERR_INVALID_PARTICLE_INFO

-1074395978 ERR_INVALID_PARTICLE_NUMBER-1074395977 ERR_AVI_VERSION

-1074395976 ERR_NUMBER_OF_PALETTE_COLORS

-1074395975 ERR_AVI_TIMEOUT

Page 2032: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395974 ERR_UNSUPPORTED_JPEG2000_COLORSPACE_METHOD

-1074395973 ERR_JPEG2000_UNSUPPORTED_MULTIPLE_LAYERS

-1074395972 ERR_DIRECTX_ENUMERATE_FILTERS

-1074395971 ERR_INVALID_OFFSET

-1074395960 ERR_INIT-1074395959 ERR_CREATE_WINDOW-1074395958 ERR_WINDOW_ID-1074395957 ERR_ARRAY_SIZE_MISMATCH

-1074395956 ERR_INVALID_QUALITY

-1074395955 ERR_INVALID_MAX_WAVELET_TRANSFORM_LEVEL

-1074395954 ERR_INVALID_QUANTIZATION_STEP_SIZE

-1074395953 ERR_INVALID_WAVELET_TRANSFORM_MODE

-1074395920 ERR_NUMBER_CLASS

Page 2033: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395880 ERR_PARTICLE-1074395879 ERR_BAD_MEASURE-1074395878 ERR_PROP_NODE_WRITE_NOT_SUPPORTED

-1074395877 ERR_COLORMODE_REQUIRES_CHANGECOLORSPACE2

-1074395876 ERR_UNSUPPORTED_COLOR_MODE

-1074395875 ERR_BARCODE_PHARMACODE

-1074395840 ERR_BAD_INDEX-1074395837 ERR_INVALID_COMPRESSION_RATIO

-1074395801 ERR_TOO_MANY_CONTOURS

-1074395800 ERR_PROTECTION-1074395799 ERR_INTERNAL-1074395798 ERR_INVALID_CUSTOM_SAMPLE

-1074395797 ERR_INVALID_CLASSIFIER_SESSION-1074395796 ERR_INVALID_KNN_METHOD

-1074395795 ERR_K_TOO_LOW

-1074395794 ERR_K_TOO_HIGH

-1074395793 ERR_INVALID_OPERATION_ON_COMPACT_SESSION_ATTEMPTED

Page 2034: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395792 ERR_CLASSIFIER_SESSION_NOT_TRAINED

-1074395791 ERR_CLASSIFIER_INVALID_SESSION_TYPE

-1074395790 ERR_INVALID_DISTANCE_METRIC

-1074395789 ERR_OPENING_NEWER_CLASSIFIER_SESSION

-1074395788 ERR_NO_SAMPLES

-1074395787 ERR_INVALID_CLASSIFIER_TYPE

-1074395786 ERR_INVALID_PARTICLE_OPTIONS

-1074395785 ERR_NO_PARTICLE-1074395784 ERR_INVALID_LIMITS

-1074395783 ERR_BAD_SAMPLE_INDEX

-1074395782 ERR_DESCRIPTION_TOO_LONG

-1074395781 ERR_CLASSIFIER_INVALID_ENGINE_TYPE

Page 2035: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395780 ERR_INVALID_PARTICLE_TYPE

-1074395779 ERR_CANNOT_COMPACT_UNTRAINED

-1074395778 ERR_INVALID_KERNEL_SIZE

-1074395777 ERR_INCOMPATIBLE_CLASSIFIER_TYPES

-1074395776 ERR_INVALID_USE_OF_COMPACT_SESSION_FILE

-1074395775 ERR_ROI_HAS_OPEN_CONTOURS

-1074395774 ERR_NO_LABEL-1074395773 ERR_NO_DEST_IMAGE

-1074395772 ERR_INVALID_REGISTRATION_METHOD

-1074395771 ERR_OPENING_NEWER_INSPECTION_TEMPLATE

-1074395770 ERR_INVALID_INSPECTION_TEMPLATE-1074395769 ERR_INVALID_EDGE_THICKNESS

-1074395768 ERR_INVALID_SCALE

-1074395767 ERR_INVALID_ALIGNMENT

-1074395766 ERR_DEPRECATED_FUNCTION

Page 2036: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395763 ERR_INVALID_NORMALIZATION_METHOD

-1074395762 ERR_INVALID_NIBLACK_DEVIATION_FACTOR

-1074395760 ERR_BOARD_NOT_FOUND-1074395758 ERR_BOARD_NOT_OPEN-1074395757 ERR_DLL_NOT_FOUND-1074395756 ERR_DLL_FUNCTION_NOT_FOUND-1074395754 ERR_TRIG_TIMEOUT-1074395728 ERR_INVALID_2D_BARCODE_SEARCH_MODE

-1074395727 ERR_UNSUPPORTED_2D_BARCODE_SEARCH_MODE

-1074395726 ERR_MATCHFACTOR_OBSOLETE

-1074395725 ERR_DATA_VERSION

-1074395724 ERR_CUSTOMDATA_INVALID_SIZE

-1074395723 ERR_CUSTOMDATA_KEY_NOT_FOUND

-1074395722 ERR_CLASSIFIER_CLASSIFY_IMAGE_WITH_CUSTOM_SESSION

Page 2037: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395721 ERR_INVALID_BIT_DEPTH

-1074395720 ERR_BAD_ROI-1074395719 ERR_BAD_ROI_BOX-1074395718 ERR_LAB_VERSION

-1074395717 ERR_INVALID_RANGE

-1074395716 ERR_INVALID_SCALING_METHOD

-1074395715 ERR_INVALID_CALIBRATION_UNIT

-1074395714 ERR_INVALID_AXIS_ORIENTATION

-1074395713 ERR_VALUE_NOT_IN_ENUM-1074395712 ERR_WRONG_REGION_TYPE

-1074395711 ERR_NOT_ENOUGH_REGIONS

-1074395710 ERR_TOO_MANY_PARTICLES

-1074395709 ERR_AVI_UNOPENED_SESSION

-1074395708 ERR_AVI_READ_SESSION_REQUIRED

-1074395707 ERR_AVI_WRITE_SESSION_REQUIRED

Page 2038: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395706 ERR_AVI_SESSION_ALREADY_OPEN

-1074395705 ERR_DATA_CORRUPTED

-1074395704 ERR_INVALID_COMPRESSION_TYPE-1074395703 ERR_INVALID_TYPE_OF_FLATTEN-1074395702 ERR_INVALID_LENGTH

-1074395701 ERR_INVALID_MATRIX_SIZE_RANGE

-1074395700 ERR_REQUIRES_WIN2000_OR_NEWER

-1074395656 ERR_SMOOTH_CONTOURS_MUST_BE_SAME

-1074395655 ERR_ENABLE_CALIBRATION_SUPPORT_MUST_BE_SAME

-1074395654 ERR_GRADING_INFORMATION_NOT_FOUND

Page 2039: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395653 ERR_OPENING_NEWER_MULTIPLE_GEOMETRIC_TEMPLATE

-1074395652 ERR_OPENING_NEWER_GEOMETRIC_MATCHING_TEMPLATE

-1074395651 ERR_EDGE_FILTER_SIZE_MUST_BE_SAME

-1074395650 ERR_CURVE_EXTRACTION_MODE_MUST_BE_SAME

-1074395649 ERR_INVALID_GEOMETRIC_FEATURE_TYPE

-1074395648 ERR_TEMPLATE_NOT_LEARNED

-1074395647 ERR_INVALID_MULTIPLE_GEOMETRIC_TEMPLATE

-1074395646 ERR_NO_TEMPLATE_TO_LEARN

-1074395645 ERR_INVALID_NUMBER_OF_LABELS

-1074395644 ERR_LABEL_TOO_LONG

-1074395643 ERR_INVALID_NUMBER_OF_MATCH_OPTIONS

Page 2040: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395642 ERR_LABEL_NOT_FOUND

-1074395641 ERR_DUPLICATE_LABEL

-1074395640 ERR_TOO_MANY_ZONES

-1074395639 ERR_INVALID_HATCH_STYLE

-1074395638 ERR_INVALID_FILL_STYLE

-1074395637 ERR_HARDWARE_DOESNT_SUPPORT_NONTEARING

-1074395636 ERR_DIRECTX_NOT_FOUND

-1074395635 ERR_INVALID_SHAPE_DESCRIPTOR

-1074395634 ERR_INVALID_MAX_MATCH_OVERLAP

-1074395633 ERR_INVALID_MIN_MATCH_SEPARATION_SCALE

-1074395632 ERR_INVALID_MIN_MATCH_SEPARATION_ANGLE

-1074395631 ERR_INVALID_MIN_MATCH_SEPARATION_DISTANCE

-1074395630 ERR_INVALID_MAXIMUM_FEATURES_LEARNED

Page 2041: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395629 ERR_INVALID_MAXIMUM_PIXEL_DISTANCE_FROM_LINE

-1074395628 ERR_INVALID_GEOMETRIC_MATCHING_TEMPLATE

-1074395627 ERR_NOT_ENOUGH_TEMPLATE_FEATURES_1

-1074395626 ERR_NOT_ENOUGH_TEMPLATE_FEATURES

-1074395625 ERR_INVALID_MATCH_CONSTRAINT_TYPE

-1074395624 ERR_INVALID_OCCLUSION_RANGE

-1074395623 ERR_INVALID_SCALE_RANGE

-1074395622 ERR_INVALID_MATCH_GEOMETRIC_PATTERN_SETUP_DATA

-1074395621 ERR_INVALID_LEARN_GEOMETRIC_PATTERN_SETUP_DATA

-1074395620 ERR_INVALID_CURVE_EXTRACTION_MODE-1074395619 ERR_TOO_MANY_OCCLUSION_RANGES

-1074395618 ERR_TOO_MANY_SCALE_RANGES

Page 2042: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395617 ERR_INVALID_NUMBER_OF_FEATURES_RANGE

-1074395616 ERR_INVALID_EDGE_FILTER_SIZE-1074395615 ERR_INVALID_MINIMUM_FEATURE_STRENGTH

-1074395614 ERR_INVALID_MINIMUM_FEATURE_ASPECT_RATIO

-1074395613 ERR_INVALID_MINIMUM_FEATURE_LENGTH

-1074395612 ERR_INVALID_MINIMUM_FEATURE_RADIUS

-1074395611 ERR_INVALID_MINIMUM_RECTANGLE_DIMENSION

-1074395610 ERR_INVALID_INITIAL_MATCH_LIST_LENGTH

-1074395609 ERR_INVALID_SUBPIXEL_TOLERANCE

-1074395608 ERR_INVALID_SUBPIXEL_ITERATIONS

-1074395607 ERR_INVALID_MAXIMUM_FEATURES_PER_MATCH

-1074395606 ERR_INVALID_MINIMUM_FEATURES_TO_MATCH

Page 2043: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395605 ERR_INVALID_MAXIMUM_END_POINT_GAP

-1074395604 ERR_INVALID_COLUMN_STEP

-1074395603 ERR_INVALID_ROW_STEP

-1074395602 ERR_INVALID_MINIMUM_CURVE_LENGTH

-1074395601 ERR_INVALID_EDGE_THRESHOLD

-1074395600 ERR_INFO_NOT_FOUND

-1074395598 ERR_NIOCR_INVALID_ACCEPTANCE_LEVEL

-1074395597 ERR_NIOCR_NOT_A_VALID_SESSION-1074395596 ERR_NIOCR_INVALID_CHARACTER_SIZE

-1074395595 ERR_NIOCR_INVALID_THRESHOLD_MODE-1074395594 ERR_NIOCR_INVALID_SUBSTITUTION_CHARACTER

-1074395593 ERR_NIOCR_INVALID_NUMBER_OF_BLOCKS

-1074395592 ERR_NIOCR_INVALID_READ_STRATEGY-1074395591 ERR_NIOCR_INVALID_CHARACTER_INDEX

Page 2044: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395590 ERR_NIOCR_INVALID_NUMBER_OF_VALID_CHARACTER_POSITIONS

-1074395589 ERR_NIOCR_INVALID_LOW_THRESHOLD_VALUE

-1074395588 ERR_NIOCR_INVALID_HIGH_THRESHOLD_VALUE

-1074395587 ERR_NIOCR_INVALID_THRESHOLD_RANGE

-1074395586 ERR_NIOCR_INVALID_LOWER_THRESHOLD_LIMIT

-1074395585 ERR_NIOCR_INVALID_UPPER_THRESHOLD_LIMIT

-1074395584 ERR_NIOCR_INVALID_THRESHOLD_LIMITS

-1074395583 ERR_NIOCR_INVALID_MIN_CHAR_SPACING

-1074395582 ERR_NIOCR_INVALID_MAX_HORIZ_ELEMENT_SPACING

-1074395581 ERR_NIOCR_INVALID_MAX_VERT_ELEMENT_SPACING

-1074395580 ERR_NIOCR_INVALID_MIN_BOUNDING_RECT_WIDTH

Page 2045: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395579 ERR_NIOCR_INVALID_ASPECT_RATIO

-1074395578 ERR_NIOCR_INVALID_CHARACTER_SET_FILE

-1074395577 ERR_NIOCR_CHARACTER_VALUE_CANNOT_BE_EMPTYSTRING

-1074395576 ERR_NIOCR_CHARACTER_VALUE_TOO_LONG

-1074395575 ERR_NIOCR_INVALID_NUMBER_OF_EROSIONS

-1074395574 ERR_NIOCR_CHARACTER_SET_DESCRIPTION_TOO_LONG

-1074395573 ERR_NIOCR_INVALID_CHARACTER_SET_FILE_VERSION

-1074395572 ERR_NIOCR_INTEGER_VALUE_FOR_STRING_ATTRIBUTE

-1074395571 ERR_NIOCR_GET_ONLY_ATTRIBUTE-1074395570 ERR_NIOCR_INTEGER_VALUE_FOR_BOOLEAN_ATTRIBUTE

-1074395569 ERR_NIOCR_INVALID_ATTRIBUTE-1074395568 ERR_NIOCR_STRING_VALUE_FOR_INTEGER_ATTRIBUTE

-1074395567 ERR_NIOCR_STRING_VALUE_FOR_BOOLEAN_ATTRIBUTE

-1074395566 ERR_NIOCR_BOOLEAN_VALUE_FOR_INTEGER_ATTRIBUTE

Page 2046: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395565 ERR_NIOCR_MUST_BE_SINGLE_CHARACTER

-1074395564 ERR_NIOCR_INVALID_PREDEFINED_CHARACTER

-1074395563 ERR_NIOCR_UNLICENSED

-1074395562 ERR_NIOCR_BOOLEAN_VALUE_FOR_STRING_ATTRIBUTE

-1074395561 ERR_NIOCR_INVALID_NUMBER_OF_CHARACTERS

-1074395560 ERR_NIOCR_INVALID_OBJECT_INDEX-1074395559 ERR_NIOCR_INVALID_READ_OPTION-1074395558 ERR_NIOCR_INVALID_CHARACTER_SIZE_RANGE

-1074395557 ERR_NIOCR_INVALID_BOUNDING_RECT_WIDTH_RANGE

-1074395556 ERR_NIOCR_INVALID_BOUNDING_RECT_HEIGHT_RANGE

-1074395555 ERR_NIOCR_INVALID_SPACING_RANGE

-1074395554 ERR_NIOCR_INVALID_READ_RESOLUTION-1074395553 ERR_NIOCR_INVALID_MIN_BOUNDING_RECT_HEIGHT

Page 2047: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395552 ERR_NIOCR_NOT_A_VALID_CHARACTER_SET-1074395551 ERR_NIOCR_RENAME_REFCHAR

-1074395550 ERR_NIOCR_INVALID_CHARACTER_VALUE

-1074395549 ERR_NIOCR_INVALID_NUMBER_OF_OBJECTS_TO_VERIFY

-1074395410 ERR_INVALID_ICONS_PER_LINE

-1074395409 ERR_INVALID_SUBPIXEL_DIVISIONS-1074395408 ERR_INVALID_DETECTION_MODE-1074395407 ERR_INVALID_CONTRAST

-1074395406 ERR_COORDSYS_NOT_FOUND

-1074395405 ERR_INVALID_TEXTORIENTATION

-1074395404 ERR_INVALID_INTERPOLATIONMETHOD_FOR_UNWRAP

-1074395403 ERR_EXTRAINFO_VERSION

-1074395402 ERR_INVALID_MAXPOINTS

Page 2048: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395401 ERR_INVALID_MATCHFACTOR

-1074395400 ERR_MULTICORE_OPERATION

-1074395399 ERR_MULTICORE_INVALID_ARGUMENT

-1074395397 ERR_COMPLEX_IMAGE_REQUIRED-1074395395 ERR_COLOR_IMAGE_REQUIRED

-1074395394 ERR_COLOR_SPECTRUM_MASK

-1074395393 ERR_COLOR_TEMPLATE_IMAGE_TOO_SMALL

-1074395392 ERR_COLOR_TEMPLATE_IMAGE_TOO_LARGE

-1074395391 ERR_COLOR_TEMPLATE_IMAGE_HUE_CONTRAST_TOO_LOW

-1074395390 ERR_COLOR_TEMPLATE_IMAGE_LUMINANCE_CONTRAST_TOO_LOW

-1074395389 ERR_COLOR_LEARN_SETUP_DATA-1074395388 ERR_COLOR_LEARN_SETUP_DATA_SHAPE-1074395387 ERR_COLOR_MATCH_SETUP_DATA-1074395386 ERR_COLOR_MATCH_SETUP_DATA_SHAPE-1074395385 ERR_COLOR_ROTATION_REQUIRES_SHAPE_FEATURE

-1074395384 ERR_COLOR_TEMPLATE_DESCRIPTOR

Page 2049: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395383 ERR_COLOR_TEMPLATE_DESCRIPTOR_1-1074395382 ERR_COLOR_TEMPLATE_DESCRIPTOR_2-1074395381 ERR_COLOR_TEMPLATE_DESCRIPTOR_3-1074395380 ERR_COLOR_TEMPLATE_DESCRIPTOR_4-1074395379 ERR_COLOR_TEMPLATE_DESCRIPTOR_5-1074395378 ERR_COLOR_TEMPLATE_DESCRIPTOR_6-1074395377 ERR_COLOR_TEMPLATE_DESCRIPTOR_SHIFT-1074395376 ERR_COLOR_TEMPLATE_DESCRIPTOR_NOSHIFT

-1074395375 ERR_COLOR_TEMPLATE_DESCRIPTOR_SHIFT_1-1074395374 ERR_COLOR_TEMPLATE_DESCRIPTOR_SHIFT_2-1074395373 ERR_COLOR_TEMPLATE_DESCRIPTOR_ROTATION-1074395372 ERR_COLOR_TEMPLATE_DESCRIPTOR_NOROTATION

-1074395371 ERR_COLOR_TEMPLATE_DESCRIPTOR_ROTATION_1-1074395370 ERR_COLOR_TEMPLATE_DESCRIPTOR_ROTATION_2-1074395369 ERR_COLOR_TEMPLATE_DESCRIPTOR_ROTATION_3-1074395368 ERR_COLOR_TEMPLATE_DESCRIPTOR_ROTATION_4-1074395367 ERR_COLOR_TEMPLATE_DESCRIPTOR_ROTATION_5-1074395366 ERR_COLOR_TEMPLATE_DESCRIPTOR_NOSHAPE

-1074395365 ERR_COLOR_TEMPLATE_DESCRIPTOR_NOSPECTRUM

-1074395364 ERR_IGNORE_COLOR_SPECTRUM_SET

-1074395363 ERR_INVALID_SUBSAMPLING_RATIO

Page 2050: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395362 ERR_INVALID_WIDTH-1074395361 ERR_INVALID_STEEPNESS-1074395360 ERR_COMPLEX_PLANE-1074395357 ERR_INVALID_COLOR_IGNORE_MODE-1074395356 ERR_INVALID_MIN_MATCH_SCORE

-1074395355 ERR_INVALID_NUM_MATCHES_REQUESTED

-1074395354 ERR_INVALID_COLOR_WEIGHT

-1074395353 ERR_INVALID_SEARCH_STRATEGY-1074395352 ERR_INVALID_FEATURE_MODE-1074395351 ERR_INVALID_RECT

-1074395350 ERR_INVALID_VISION_INFO

-1074395349 ERR_INVALID_SKELETONMETHOD

-1074395348 ERR_INVALID_3DPLANE

-1074395347 ERR_INVALID_3DDIRECTION

-1074395346 ERR_INVALID_INTERPOLATIONMETHOD_FOR_ROTATE

-1074395345 ERR_INVALID_FLIPAXIS

Page 2051: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395343 ERR_FILE_FILENAME_NULL

-1074395340 ERR_INVALID_SIZETYPE

-1074395336 ERR_UNKNOWN_ALGORITHM

-1074395335 ERR_DISPATCH_STATUS_CONFLICT

-1074395334 ERR_INVALID_CONVERSIONSTYLE

-1074395333 ERR_INVALID_VERTICAL_TEXT_ALIGNMENT

-1074395332 ERR_INVALID_COMPAREFUNCTION

-1074395331 ERR_INVALID_BORDERMETHOD

-1074395330 ERR_INVALID_BORDER_SIZE

-1074395329 ERR_INVALID_OUTLINEMETHOD

-1074395328 ERR_INVALID_INTERPOLATIONMETHOD

-1074395327 ERR_INVALID_SCALINGMODE

-1074395326 ERR_INVALID_DRAWMODE_FOR_LINE

Page 2052: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395325 ERR_INVALID_DRAWMODE

-1074395324 ERR_INVALID_SHAPEMODE

-1074395323 ERR_INVALID_FONTCOLOR

-1074395322 ERR_INVALID_TEXTALIGNMENT

-1074395321 ERR_INVALID_MORPHOLOGYMETHOD

-1074395320 ERR_TEMPLATE_EMPTY-1074395319 ERR_INVALID_SUBPIX_TYPE

-1074395318 ERR_INSF_POINTS

-1074395317 ERR_UNDEF_POINT

-1074395316 ERR_INVALID_KERNEL_CODE-1074395313 ERR_WRITE_FILE_NOT_SUPPORTED

-1074395312 ERR_LCD_CALIBRATE

-1074395311 ERR_INVALID_COLOR_SPECTRUM

Page 2053: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395310 ERR_INVALID_PALETTE_TYPE

-1074395309 ERR_INVALID_WINDOW_THREAD_POLICY

-1074395308 ERR_INVALID_COLORSENSITIVITY

-1074395307 ERR_PRECISION_NOT_GTR_THAN_0

-1074395306 ERR_INVALID_TOOL

-1074395305 ERR_INVALID_REFERENCEMODE

-1074395304 ERR_INVALID_MATHTRANSFORMMETHOD

-1074395303 ERR_INVALID_NUM_OF_CLASSES

-1074395302 ERR_INVALID_THRESHOLDMETHOD

-1074395301 ERR_ROI_NOT_2_LINES

-1074395300 ERR_INVALID_METERARCMODE

-1074395299 ERR_INVALID_COMPLEXPLANE

-1074395298 ERR_COMPLEXPLANE_NOT_REAL_OR_IMAGINARY

Page 2054: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395297 ERR_INVALID_PARTICLEINFOMODE

-1074395296 ERR_INVALID_BARCODETYPE

-1074395295 ERR_INVALID_INTERPOLATIONMETHOD_INTERPOLATEPOINTS

-1074395294 ERR_CONTOUR_INDEX_OUT_OF_RANGE

-1074395293 ERR_CONTOURID_NOT_FOUND

-1074395292 ERR_POINTS_ARE_COLLINEAR

-1074395291 ERR_SHAPEMATCH_BADIMAGEDATA

-1074395290 ERR_SHAPEMATCH_BADTEMPLATE

-1074395287 ERR_INVALID_LINE

-1074395286 ERR_INVALID_CONCENTRIC_RAKE_DIRECTION

-1074395285 ERR_INVALID_SPOKE_DIRECTION-1074395284 ERR_INVALID_EDGE_PROCESS-1074395283 ERR_INVALID_RAKE_DIRECTION

Page 2055: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395282 ERR_CANT_DRAW_INTO_VIEWER

-1074395281 ERR_IMAGE_SMALLER_THAN_BORDER

-1074395280 ERR_ROI_NOT_RECT

-1074395279 ERR_ROI_NOT_POLYGON-1074395278 ERR_LCD_NOT_NUMERIC-1074395277 ERR_BARCODE_CHECKSUM

-1074395276 ERR_LINES_PARALLEL

-1074395275 ERR_INVALID_BROWSER_IMAGE-1074395270 ERR_DIV_BY_ZERO-1074395269 ERR_NULL_POINTER-1074395268 ERR_LINEAR_COEFF

-1074395267 ERR_COMPLEX_ROOT

-1074395265 ERR_BARCODE

-1074395263 ERR_LCD_NO_SEGMENTS-1074395262 ERR_LCD_BAD_MATCH

-1074395261 ERR_GIP_RANGE

-1074395260 ERR_HEAP_TRASHED

-1074395258 ERR_BAD_FILTER_WIDTH

Page 2056: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395257 ERR_INVALID_EDGE_DIR

-1074395256 ERR_EVEN_WINDOW_SIZE

-1074395253 ERR_INVALID_LEARN_MODE-1074395252 ERR_LEARN_SETUP_DATA-1074395251 ERR_INVALID_MATCH_MODE-1074395250 ERR_MATCH_SETUP_DATA-1074395249 ERR_ROTATION_ANGLE_RANGE_TOO_LARGE

-1074395248 ERR_TOO_MANY_ROTATION_ANGLE_RANGES

-1074395247 ERR_TEMPLATE_DESCRIPTOR-1074395246 ERR_TEMPLATE_DESCRIPTOR_1-1074395245 ERR_TEMPLATE_DESCRIPTOR_2-1074395244 ERR_TEMPLATE_DESCRIPTOR_3-1074395243 ERR_TEMPLATE_DESCRIPTOR_4

-1074395242 ERR_TEMPLATE_DESCRIPTOR_ROTATION-1074395241 ERR_TEMPLATE_DESCRIPTOR_NOROTATION

-1074395240 ERR_TEMPLATE_DESCRIPTOR_ROTATION_1-1074395239 ERR_TEMPLATE_DESCRIPTOR_SHIFT-1074395238 ERR_TEMPLATE_DESCRIPTOR_NOSHIFT

Page 2057: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395237 ERR_TEMPLATE_DESCRIPTOR_SHIFT_1-1074395235 ERR_TEMPLATE_IMAGE_CONTRAST_TOO_LOW

-1074395234 ERR_TEMPLATE_IMAGE_TOO_SMALL

-1074395233 ERR_TEMPLATE_IMAGE_TOO_LARGE

-1074395212 ERR_OCR_TEMPLATE_WRONG_SIZE

-1074395211 ERR_OCR_BAD_TEXT_TEMPLATE

-1074395210 ERR_OCR_CANNOT_MATCH_TEXT_TEMPLATE

-1074395203 ERR_OCR_LIB_INIT

-1074395201 ERR_OCR_LOAD_LIBRARY

-1074395200 ERR_OCR_INVALID_PARAMETER

-1074395179 ERR_OCR_PREPROCESSING_FAILED

-1074395178 ERR_OCR_RECOGNITION_FAILED

-1074395175 ERR_OCR_BAD_USER_DICTIONARY

Page 2058: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395174 ERR_OCR_INVALID_AUTOORIENTMODE

-1074395173 ERR_OCR_INVALID_LANGUAGE

-1074395172 ERR_OCR_INVALID_CHARACTERSET

-1074395171 ERR_OCR_INI_FILE_NOT_FOUND

-1074395170 ERR_OCR_INVALID_CHARACTERTYPE

-1074395169 ERR_OCR_INVALID_RECOGNITIONMODE

-1074395168 ERR_OCR_INVALID_AUTOCORRECTIONMODE

-1074395167 ERR_OCR_INVALID_OUTPUTDELIMITER

-1074395166 ERR_OCR_BIN_DIR_NOT_FOUND

-1074395165 ERR_OCR_WTS_DIR_NOT_FOUND

-1074395164 ERR_OCR_ADD_WORD_FAILED

-1074395163 ERR_OCR_INVALID_CHARACTERPREFERENCE

Page 2059: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395162 ERR_OCR_INVALID_CORRECTIONMODE

-1074395161 ERR_OCR_INVALID_CORRECTIONLEVEL

-1074395160 ERR_OCR_INVALID_MAXPOINTSIZE

-1074395159 ERR_OCR_INVALID_TOLERANCE

-1074395158 ERR_OCR_INVALID_CONTRASTMODE

-1074395156 ERR_OCR_SKEW_DETECT_FAILED

-1074395155 ERR_OCR_ORIENT_DETECT_FAILED

-1074395153 ERR_FONT_FILE_FORMAT-1074395152 ERR_FONT_FILE_NOT_FOUND-1074395151 ERR_OCR_CORRECTION_FAILED

-1074395150 ERR_INVALID_ROUNDING_MODE

-1074395149 ERR_DUPLICATE_TRANSFORM_TYPE

-1074395148 ERR_OVERLAY_GROUP_NOT_FOUND

Page 2060: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

-1074395147 ERR_BARCODE_RSSLIMITED

-1074395146 ERR_QR_DETECTION_VERSION

-1074395145 ERR_QR_INVALID_READ-1074395144 ERR_QR_INVALID_BARCODE

-1074395143 ERR_QR_DETECTION_MODE

-1074395142 ERR_QR_DETECTION_MODELTYPE

-1074395141 ERR_OCR_NO_TEXT_FOUND

-1074395140 ERR_OCR_CHAR_REPORT_CORRUPTED

-1074395139 ERR_IMAQ_QR_DIMENSION_INVALID-1074395138 ERR_OCR_REGION_TOO_SMALL

Page 2061: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

KernelsAkernelisastructurethatrepresentsapixelanditsrelationshiptoitsneighbors.

Page 2062: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PredefinedGradientKernelsPrewittFiltersPrewittfiltershavethefollowingkernels.ThenotationsWest(W),South(S),East(E),andNorth(N)indicatewhichedgesofbrightregionstheyoutline.

SobelFiltersTheSobelfiltersaresimilartothePrewittfilters,excepttheyhighlightlightintensityvariationsalongaparticularaxisthatisassignedastrongerweight.TheSobelfiltershavethefollowingkernels.

Page 2063: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Thefollowingtableliststhepredefinedgradient5x5kernels.

Page 2064: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Thefollowingtableliststhepredefinedgradient7x7kernels.

Page 2065: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PredefinedLaplacianKernelsThefollowingtableslistthepredefinedLaplaciankernels.Laplacian3x3

Laplacian5x5

Page 2066: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Laplacian7x7

PredefinedSmoothingKernelsThefollowingtableslistthepredefinedsmoothingkernels.Smoothing3x3

Smoothing5x5

Smoothing7x7

Page 2067: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PredefinedGaussianKernelsThefollowingtableslistthepredefinedGaussiankernels.Gaussian3x3

Gaussian5x5

Gaussian7x7

Page 2068: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

StructuresAstructurestoresacollectionofmultipledatatypesandvaluesasasingleunit.AIMGradeReportAnnulusArcInfoArcInfo2AVIInfoAxisReportBarcode2DInfoBarcodeInfoBCGOptionsBestCircleBestCircle2BestEllipseBestEllipse2BestLineBrowserOptionsCalibrationInfoCalibrationPointsCaliperOptionsCaliperReportCannyOptionsCharacterStatisticsCharInfoCharInfo2CharReportCharReport2CharReport3

Page 2069: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CIELabValueCIEXYZValueCircleDescriptorCircleFeatureCircleMatchCircleReportCircularEdgeReportClassifierAccuracyReportClassifierReportClassifierSampleInfoClassScoreClosedContourClosedCurveFeatureColorHistogramReportColorInformationComplexConcentricRakeReportConcentricRakeReport2ConstCurveFeatureConstructROIOptionsConstructROIOptions2ContourInfoContourInfo2ContourPointCoordinateSystemCoordinateTransformCoordinateTransform2CornerFeatureCountObjectsOptions

Page 2070: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CurveCurveOptionsDataMatrixDescriptionOptionsDataMatrixOptionsDataMatrixReportDataMatrixSearchOptionsDataMatrixSizeOptionsDetectExtremesOptionsDisplayMappingDrawTextOptionsEdgeInfoEdgeLocationReportEdgeOptionsEdgeOptions2EdgeReportEdgeReport2EllipseDescriptorEllipseFeatureEllipseMatchExtremeReportFeatureDataFindEdgeOptionsFindEdgeOptions2FindEdgeReportFindPatternOptionsFindTransformPatternOptionsFindTransformRectOptionsFindTransformRectOptions2FindTransformRectsOptions

Page 2071: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FindTransformRectsOptions2FitCircleOptionsFitEllipseOptionsFitLineOptionsGeometricPatternMatchGeometricPatternMatch2GridDescriptorHistogramReportHSIValueHSLValueHSVValueImageInfoInspectionAlignmentInspectionOptionsJPEG2000FileAdvancedOptionsLCDOptionsLCDReportLCDSegmentsLearnCalibrationOptionsLearnColorPatternOptionsLearnGeometricPatternAdvancedOptionsLearnPatternAdvancedOptionsLearnPatternAdvancedRotationOptionsLearnPatternAdvancedShiftOptionsLegFeatureLineLinearAveragesLineDescriptorLineEquation

Page 2072: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LineFeatureLineFloatLineMatchLineProfileMatchColorPatternOptionsMatchGeometricPatternAdvancedOptionsMatchGeometricPatternAdvancedOptions2MatchGeometricPatternOptionsMatchPatternAdvancedOptionsMatchPatternOptionsMeterArcNearestNeighborClassResultNearestNeighborOptionsNearestNeighborTrainingReportObjectReportOCRProcessingOptionsOCRSpacingOptionsOpenContourOverlayTextOptionsPairOfParallelLinePairsFeatureParallelLinePairFeatureParticleClassifierOptionsParticleClassifierPreprocessingOptionsParticleFilterCriteriaParticleFilterCriteria2ParticleFilterOptionsParticleFilterOptions2ParticleReportPatternMatch

Page 2073: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PointPointFloatQRCodeDataTokenQRCodeDescriptionOptionsQRCodeReportQRCodeSearchOptionsQRCodeSizeOptionsQuantifyDataQuantifyReportRakeOptionsRakeReportRakeReport2RangeRangeFloatReadTextOptionsReadTextReportReadTextReport2ReadTextReport3RectRectangleDescriptorRectangleFeatureRectangleMatchRGBU64ValueRGBValueROIProfileRotatedRectRotationAngleRangeSearchArcInfoSearchLineInfo

Page 2074: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

SegmentInfoSelectParticleCriteriaShapeDetectionOptionsShapeReportSimpleEdgeOptionsSpokeOptionsSpokeReportSpokeReport2StraightEdgeStraightEdgeOptionsStraightEdgeReportStraightEdgeReport2StructuringElementThresholdDataTIFFFileOptionsToolWindowOptionsTransformBehaviorsTransformReportUserPointSymbolView3DOptions

Page 2075: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

UnionsUnionsaredatatypesthatallowdifferentmembervariablestobestoredinthesamememorylocation.Onlyonemembercanbeactiveatanygiventime.ColorColor2ContourUnionGeometricFeaturePixelValue

Page 2076: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

EnumerationsEnumerationsaredatatypesconsistingofanamedsetofvalues.AIMGradeAttenuateModeAxisOrientationBarcode2DCellShapeBarcode2DContrastBarcode2DSearchModeBarcode2DShapeBarcode2DTypeBarcodeTypeBorderMethodBrowserFrameStyleBrowserLocationButtonLabelCalibrationModeCalibrationROICalibrationUnitClassifierEngineTypeClassifierTypeColorIgnoreModeColorModeColorSensitivityColumnProcessingModeComparisonFunctionComplexPlaneCompressionTypeConcentricRakeDirection

Page 2077: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ContourTypeDataMatrixCellFillModeDataMatrixCellFilterModeDataMatrixCellSampleSizeDataMatrixDemodulationModeDataMatrixECCDataMatrixGradingModeDataMatrixMirrorModeDataMatrixPolarityDataMatrixRotationModeDataMatrixSubtypeDetectionModeDirection3DDrawModeEdgeFilterSizeEdgePolaritySearchModeEdgeProcessExtractionModeFeatureTypeFindReferenceDirectionFindTransformModeFlattenTypeFlipAxisFontColorGeometricMatchingModeGroupBehaviorImageFeatureModeImageTypeInterpolationMethod

Page 2078: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

KernelFamilyLearningModeLevelTypeLinearAveragesModeLineGaugeMethodLocalThresholdMethodMappingMethodMatchingModeMathTransformMethodMeasurementTypeMeasurementValueMeterArcModeMorphologyMethodMulticoreOperationNearestNeighborMethodNearestNeighborMetricNormalizationMethodObjectTypeOutlineMethodPaletteTypeParticleClassifierTypeParticleInfoModeParticleTypePhotometricModePlane3DPointSymbolPolarityTypeQRCellFilterModeQRCellSampleSize

Page 2079: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

QRDemodulationModeQRDimensionsQRGradingModeQRMirrorModeQRModelTypeQRPolaritiesQRRotationModeQRStreamModeRakeDirectionReadClassifierFileModeReadResolutionReadStrategyRectOrientationReferenceModeRegistrationMethodRoundingModeScalingMethodScalingModeSearchDirectionSearchStrategyShapeModeSizeTypeSkeletonMethodSpokeDirectionStraightEdgeSearchModeTextAlignmentThresholdMethodThresholdModeTIFFCompressionType

Page 2080: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ToolTruncateModeTwoEdgePolarityTypeVerticalTextAlignmentVisionInfoTypeVisionInfoType2WaveletTransformModeWindowBackgroundFillStyleWindowBackgroundHatchStyleWindowEventTypeWindowOptionsWindowThreadPolicyWriteClassifierFileMode

Page 2081: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

GlossaryA B C D E F G H I J L M N O P Q R S

T V W

Page 2082: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

AAIPD NationalInstrumentsinternalimagefileformatusedfor

savingcomplexandHSLimagesandcalibrationinformationassociatedwithanimage.AIPDimageshavethefileextensionAPD.

alignment Theprocessbywhichamachinevisionapplicationdeterminesthelocation,orientation,andscaleofapartbeinginspected.

areathreshold

Detectsobjectsbasedontheirsize,whichcanfallwithinauser-specifiedrange.

arithmeticoperators

Theimageoperationsmultiply,divide,add,subtract,andremainder.

asynchronous Propertyofafunctionoroperationthatbeginsanoperationandreturnscontroltotheprogrambeforethecompletionorterminationoftheoperation.

auto-medianfunction

Afunctionthatusesdualcombinationsofopeningandclosingoperationstosmooththeboundariesofobjects.

Page 2083: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Bbarycenter Thebarycenterofarangeofanimage'sgrayscalevalues

isthegrayscalevaluerepresentingthecentroidofthatrangeintheimagehistogram.

binaryimage

Animagecontainingobjectsusuallyrepresentedwithapixelintensityof1(or255)andthebackgroundof0.

binarymorphology

Functionsthatperformmorphologicaloperationsonabinaryimage.

blob Binarylargeobject.Aparticle,orobject,presentinabinaryimage.

blurring Reducestheamountofdetailinanimage.Blurringcommonlyoccursbecausethecameraisoutoffocus.Youcanbluranimageintentionallybyapplyingalowpassfrequencyfilter.

BMP Bitmap.Imagefileformatcommonlyusedfor8-bitandcolorimages.BMPimageshavethefileextensionBMP.

borderfunction

Removesobjects(orparticles)thattouchtheimageborderinabinaryimage.

Page 2084: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Ccaliper Findsedgepairsalongaspecifiedpathintheimage.

Thisfunctionperformsanedgeextractionandthenfindsedgepairsbasedonspecifiedcriteriasuchasthedistancebetweentheleadingandtrailingedges,edgecontrasts,andsoforth.

cell Asinglemodulethatencodesonebitofdataina2Dbarcode.

CIEL*a*b* Colorencodingschemethatclassifiescolorsaccordingtothehumanvisionsystembymimickingthelogarithmicresponseoftheeye.

CIEXYZ Colorencodingschemethatclassifiescolorsaccordingtothehumanvisionsystem.

circlefunction

Detectscircularobjectsinabinaryimage.

class Acategoryrepresentingacollectionofsimilarsamples.classification Anoperationthatassignssamplestoclassesbasedon

predefinedfeatures.classificationaccuracy

Probabilitythatasampleisclassifiedintotheclasstowhichitbelongs.

classificationconfidence

Degreeofcertaintythatasampleisassignedtooneclassinsteadofotherclasses.Seealsoclassandsample.

classificationpredictivevalue

Probabilitythatasampleclassifiedintoagivenclassbelongstothatclass.

classifier Afunctionthatassignsasampletoaclass.closedcontour

AnROIthatdescribesaninclusiveareainanimage.Typesofclosedcontoursincludethefollowing:Rectangle,Oval,Polygon,FreehandRegion,Annulus,andRotatedRectangle.

closing Adilationfollowedbyanerosion.Aclosingfillssmallholesinobjectsandsmoothstheboundariesofobjects.

CLUT Colorlookuptable.Tableforconvertingthevalueofapixelinanimageintoared,green,andblue(RGB)intensity.

codeword Numericvalueoftheprintedbar/spacepatternina1Dor

Page 2085: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DDanielssonfunction

Similartothedistancefunctions,butwithmoreaccurateresults.

densitometry Determinationofopticalorphotographicdensity.densityfunction

Foreachgraylevelinalinearhistogram,itgivesthenumberofpixelsintheimagethathavethesamegraylevel.

device Plug-indataacquisitionboardthatcancontainmultiplechannelsandconversiondevices.

differentiationfilter

Extractsthecontours(edgedetection)ingraylevel.

digitalimage Animagef(x,y)thathasbeenconvertedintoadiscretenumberofpixels.Bothspatialcoordinatesandbrightnessarespecified.

dilation Increasesthesizeofanobjectalongitsboundaryandremovestinyholesintheobject.

distancecalibration

Determinationofthephysicaldimensionsofapixelbydefiningthephysicaldimensionsofalineintheimage.

distancefunction

Assigns,toeachpixelinanobject,agray-levelvalueequaltoitsshortestEuclideandistancefromtheborderoftheobject.

Page 2086: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Eedge Definedbyasharpchange(transition)inthepixel

intensitiesinanimageoralonganarrayofpixels.edgecontrast Thedifferencebetweentheaveragepixelintensity

beforeandtheaveragepixelintensityaftertheedge.edgehysteresis

Thedifferenceinthresholdlevelsbetweenarisingandafallingedge.

edgesteepness

Thenumberofpixelsthatcorrespondtotheslopeortransitionareaofanedge.

entropy Ameasureoftherandomnessinanimage.Animagewithhighentropycontainsmorepixelvaluevariationthananimagewithlowentropy.

equalizefunction

Seehistogramequalization.

erasure Missingorundecodablecodewordataknownpositionina2Dbarcode.

erosion Reducesthesizeofanobjectalongitsboundaryandeliminatesisolatedpointsintheimage.

exponentialandgammacorrections

Expandthehighgray-levelinformationinanimagewhilesuppressinglowgray-levelinformation.

exponentialfunction

Decreasesthebrightnessandincreasesthecontrastinbrightregionsofanimageanddecreasescontrastindarkregions.

Page 2087: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Ffeature Ameasurementfromorattributeofasample.featureextraction

Anoperationthatcomputesfeaturesofasample.

featurevector

A1Darrayinwhicheachelementrepresentsadifferentfeatureofasample.

FFT FastFourierTransform.AmethodusedtocomputetheFourierTransformofanimage.

fiducial Areferencepatternonapartthathelpsamachinevisionapplicationfindthepart'slocationandorientationinanimage.

Fourierspectrum

ThemagnitudeinformationoftheFourierTransformofanimage.

FourierTransform

Transformsanimagefromthespatialdomaintothefrequencydomain.

frequencyfilters

Counterpartsofspatialfiltersinthefrequencydomain.Forimages,frequencyinformationisintheformofspatialfrequency.

Page 2088: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Ggauging Measurementofanobjectordistancesbetweenobjects.Gaussianfilter

Afiltersimilartothesmoothingfilter,butusingaGaussiankernelinthefilteroperation.TheblurringinaGaussianfilterismoregentlethanasmoothingfilter.

geometricmatching

Thetechniqueusedtolocateagrayscaletemplatethatischaracterizedbydistinctgeometricorshapeinformationwithinagrayscaleimage.

geometricfeatures

Theinformationextractedfromagrayscaletemplatethatisusedtolocatethetemplateinthetargetimage.Geometricfeaturesinanimagerangefromlow-levelfeatures,suchasedgesorcurvesdetectedintheimage,tohigh-levelfeatures,suchasthegeometricshapesmadebycurvesintheimage.

goldentemplate

Animagecontaininganidealrepresentationofanobjectunderinspection.

gradientconvolutionfilter

Seegradientfilter.

gradientfilter

Extractsthecontours(edgedetection)ingray-levelvalues.GradientfiltersincludethePrewittandSobelfilters.

graylevel Thebrightnessofapoint(pixel)inanimage.gray-leveldilation

Increasesthebrightnessofpixelsinanimagethataresurroundedbyotherpixelswithahigherintensity.

gray-levelerosion

Reducesthebrightnessofpixelsinanimagethataresurroundedbyotherpixelswithalowerintensity.

gray-levelimages

Imageswithmonochromeinformation.

gray-levelmorphology

Functionsthatperformmorphologicaloperationsonagray-levelimage.

Page 2089: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Hhighpassattenuation

Appliesalinearattenuationtothefrequenciesinanimage,withnoattenuationatthehighestfrequencyandfullattenuationatthelowestfrequency.

highpassFFTfilter

RemovesorattenuateslowfrequenciespresentintheFFTdomainofanimage.

highpassfilter

Emphasizestheintensityvariationsinanimage,detectsedges(orobjectboundaries),andenhancesfinedetailsinanimage.

highpassfrequencyfilter

Attenuatesorremoves(truncates)lowfrequenciespresentinthefrequencydomainoftheimage.Ahighpassfrequencyfiltersuppressesinformationrelatedtoslowvariationsoflightintensitiesinthespatialimage.

highpasstruncation

Removesallfrequenciesbelowacertainfrequency.

histogram Indicatesthequantitativedistributionofthepixelsofanimagepergray-levelvalue.

histogramequalization

Transformsthegray-levelvaluesofthepixelsofanimagetooccupytheentirerange(0to255inan8-bitimage)ofthehistogram,increasingthecontrastoftheimage.

histograminversion

Findsthephotometricnegativeofanimage.Thehistogramofareversedimageisequaltotheoriginalhistogramflippedhorizontallyaroundthecenterofthehistogram.

hit-missfunction

Locatesobjectsintheimagesimilartothepatterndefinedinthestructuringelement.

holefillingfunction

Fillsallholesinobjectsthatarepresentinabinaryimage.

HSI ColorencodingschemeinHue,Saturation,and,Intensity.HSL ColorencodingschemeusingHue,Saturation,and

Luminanceinformationwhereeachimageinthepixelisencodedusing32-bits:8bitsforhue,8bitsforsaturation,8bitsforluminance,and8unusedbits.

HSV ColorencodingschemeinHue,Saturation,andValue.

Page 2090: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Iimage Atwo-dimensionallightintensityfunctionf(x,y),where,

xandydenotespatialcoordinatesandthevaluefatanypoint(x,y)isproportionaltothebrightnessatthatpoint.

imagefile Afilecontainingimageinformationanddata.imageprocessing

Encompassesvariousprocessesandanalysisfunctionsthatyoucanapplytoanimage.

imageunderstanding

Atechniquethatinterpretsthecontentoftheimageatasymboliclevelratherthanapixellevel.

imagevisualization

Thepresentation(display)ofanimage(imagedata)totheuser.

innergradient Findstheinnerboundaryofobjects.inspection Theprocessbywhichpartsaretestedforsimple

defectssuchasmissingpartsorcracksonpartsurfaces.

inspectionfunctions

Detectsspecificfeaturesinanimage,includingedges,peaks,androtationalshifts.

intensitycalibration

Assigninguser-definedquantitiessuchasopticaldensitiesorconcentrationstothegray-levelvaluesinanimage.

intensityprofile

Thegray-leveldistributionofthepixelsalonganROIinanimage.

intensityrange

Definestherangeofgray-levelvaluesinanobjectofanimage.

intensitythreshold

Characterizesanobjectbasedontherangeofgray-levelvaluesintheobject.Iftheintensityrangeoftheobjectfallswithintheuser-specifiedrange,itisconsideredanobject;otherwiseitisconsideredpartofthebackground.

interpolation Thetechniqueusedtofindvaluesbetweenknownvalueswhenresamplinganimageorarrayofpixels.

invariantfeature

Afeaturevectorthatisinvarianttovariationssuchasthescale,rotation,andmirrorsymmetryofsamples.

Page 2091: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

JJPEG JointPhotographicExpertsGroup.Imagefileformatfor

storing8-bitandcolorimageswithlossycompression.JPEGimageshavethefileextensionJPG.

JPEG2000 Animagefileformatforstoring8-bit,16-bit,orcolorimageswitheitherlossyorlosslesscompression.JPEG2000imageshavethefileextensionJP2.

Page 2092: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Llabeling Amorphologyoperationthatidentifieseachobjectina

binaryimageandassignsauniquepixelvaluetoallthepixelsinanobject.Thisprocessisusefulforidentifyingthenumberofobjectsintheimageandgivingeachobjectauniquepixelintensity.

Laplacianfilter

Extractsthecontoursofobjectsintheimagebyhighlightingthevariationoflightintensitysurroundingapixel.

linegauge Measuresthedistancebetweenselectededgeswithhigh-precisionsubpixelaccuracyalongalineinanimage.Forexample,thisfunctioncanbeusedtomeasuredistancesbetweenpointsandedgesandviceversa.Thisfunctionalsocanstepandrepeatitsmeasurementsacrosstheimage.

lineprofile Representsthegray-leveldistributionalongalineofpixelsinanimage.

linearfilter Aspecialalgorithmthatcalculatesthevalueofapixelbasedonitsownpixelvalueaswellasthepixelvaluesofitsneighbors.Thesumofthiscalculationisdividedbythesumoftheelementsinthematrixtoobtainanewpixelvalue.

localthreshold

Amethodofimagesegmentationthatcategorizesapixelaspartofaparticleorthebackgroundbasedontheintensitystatisticsoftheparticle'sneighboringpixels.

logarithmicandinversegammacorrections

Expandlowgray-levelinformationinanimagewhilecompressinginformationfromthehighgray-levelranges.

logarithmicfunction

Increasesthebrightnessandcontrastindarkregionsofanimageanddecreasesthecontrastinbrightregionsoftheimage.

logicoperators

TheimageoperationsAND,NAND,OR,NOR,XOR,XNOR,difference,mask,mean,max,andmin.

losslesscompression

Compressioninwhichthedecompressedimageisidenticaltotheoriginalimage.

lossycompression

Compressioninwhichthedecompressedimageisvisuallysimilarbutnotidenticaltotheoriginalimage.

Page 2093: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Mmachinevisionapplication

Aninspectionormeasurementapplicationthatusesimagesacquiredfroma2Dsensor(typicallyaCCDcamera)tohelpwithinspectionormeasurement.

mask Isolatespartsofanimageforfurtherprocessing.maskFFTfilter Removesfrequenciescontainedinamask(range)

specifiedbytheuser.maskimage Animagecontainingavalueof1andvaluesof0.

Pixelsinthesourceimagewithacorrespondingmaskimagevalueof1areprocessed,whiletheothersareleftunchanged.

matchscore Anumberrangingfrom0to1000thatindicateshowcloselyanacquiredimagematchesthetemplateimage.Amatchscoreof1000indicatesaperfectmatch.Amatchscoreof0indicatesnomatch.

medianfilter Alowpassfilterthatassignstoeachpixelthemedianvalueofitsneighbors.Thisfiltereffectivelyremovesisolatedpixelswithoutblurringthecontoursofobjects.

MMX MultimediaExtensions.Intelchip-basedtechnologythatallowsparalleloperationsonintegers,whichresultsinacceleratedprocessingof8-bitimages.

morphologicaltransformations

Extractandalterthestructureofobjectsinanimage.Youcanusethesetransformationsforexpanding(dilating)orreducing(eroding)objects,fillingholes,closinginclusions,orsmoothingborders.Theymainlyareusedtodelineateobjectsandpreparethemforquantitativeinspectionanalysis.

M-skeleton UsesanM-shapedstructuringelementintheskeletonfunction.

multipletemplatematching

Thetechniqueusedtosimultaneouslylocatemultiplegrayscaletemplateswithinagrayscaleimage.

Page 2094: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Nneighbor Apixelwhosevalueaffectsthevaluesofnearbypixels

whenanimageisprocessed.Theneighborsofapixelareusuallydefinedbyakernel.

neighborhoodoperations

Operationsonapointinanimagethattakeintoconsiderationthevaluesofthepixelsneighboringthatpoint.

nonlinearfilter

Replaceseachpixelvaluewithanonlinearfunctionofitssurroundingpixels.

nonlineargradientfilter

Ahighpassedge-extractionfilterthatfavorsverticaledges.

nonlinearPrewittfilter

Ahighpassedge-extractionfilterthatfavorshorizontalandverticaledgesinanimage.

nonlinearSobelfilter

Ahighpassedge-extractionfilterthatfavorshorizontalandverticaledgesinanimage.

Nthorderfilter

Filtersanimageusinganonlinearfilter.Thisfilterorders(orclassifies)thepixelvaluessurroundingthepixelbeingprocessed.ThepixelbeingprocessedissettotheNthpixelvalue,whereNistheorderofthefilter.

Page 2095: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Oopencontour AnROIthatdescribesapointorareainanimage.

Typesofopencontoursincludethefollowing:Point,Line,BrokenLine,andFreeHandLine.

opening Anerosionfollowedbyadilation.Anopeningremovessmallobjectsandsmoothsboundariesofobjectsintheimage.

operators Allowmasking,combination,andcomparisonofimages.YoucanusearithmeticandlogicoperatorsinNIVision.

occlusioninvariantmatching

Ageometricmatchingtechniqueinwhichthereferencepatterncanbepartiallyobscuredinthetargetimage.

OCR Opticlecharacterrecognition.Theprocessofanalyzinganimagetodetectandrecognizecharacters/textintheimage.

OCV Opticalcharacterverification.Amachinevisionapplicationthatinspectsthequalityofprintedcharacters.

opticalrepresentation

Containsthelow-frequencyinformationatthecenterandthehigh-frequencyfrequencyinformationatthecornersofanFFT-transformedimage.

outergradient Findstheouterboundaryofobjects.

Page 2096: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Ppalette Thegradationofcolorsusedtodisplayanimageonscreen,

usuallydefinedbyacolorlookuptable.particle Aconnectedregionorgroupingofpixelsinanimagein

whichallpixelshavethesameintensitylevel.particleclassifier

Aclassifierthatclassifiesparticles.Seealsoclassifierandparticle.

patternmatching

Thetechniqueusedtolocatequicklyknownreferencepatternsorfiducialsinanimage.

pictureelement

Anelementofadigitalimage.

pixel Pictureelement.pixelcalibration

Directlycalibratingthephysicaldimensionsofapixelinanimage.

pixeldepth

Thenumberofbitsusedtorepresentthegraylevelofapixel.

PNG PortableNetworkGraphic.Imagefileformatforstoring8-bit,16-bit,andcolorimageswithlosslesscompression.

Power1/Yfunction

Similartoalogarithmicfunctionbutwithaweakereffect.

PowerYfunction

Seeexponentialfunction.

Prewittfilter

Extractsthecontours(edgedetection)ingray-levelvaluesusinga3×3filterkernel.

probabilityfunction

Definestheprobabilitythatapixelinanimagehasacertaingray-levelvalue.

proper-closing

Afinitecombinationofsuccessiveclosingandopeningoperationsthatyoucanusetofillsmallholesandsmooththeboundariesofobjects.

proper-opening

Afinitecombinationofsuccessiveopeningandclosingoperationsthatyoucanusetoremovesmallparticlesandsmooththeboundariesofobjects.

pyramidalmatching

Atechniqueusedtoincreasethespeedofapatternmatchingalgorithmbymatchingsubsampledversionsoftheimageandthereferencepattern.

Page 2097: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Qquantitativeanalysis

Obtainingvariousmeasurementsofobjectsinanimage.

Page 2098: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

RReversefunction

Invertsthepixelvaluesinanimage,producingaphotometricnegativeoftheimage.

RGB Colorencodingschemeusingred,greenandblue(RGB)colorinformationwhereeachpixelinthecolorimageisencodedusing32bits:8bitsforred,8bitsforgreen,8bitsforblue,and8bitsforthealphavalue(unused).

RGBU64

Colorencodingschemeusingred,green,andblue(RGB)colorinformationwhereeachpixelinthecolorimageisencodedusing64bits:16bitsforred,16bitsforgreen,16bitsforblue,and16bitsforthealphavalue(unused).

Robertsfilter

Extractsthecontours(edgedetection)ingraylevel,favoringdiagonaledges.

ROI Regionofinterest.Anareaoftheimagethatisgraphicallyselectedfromawindowdisplayingtheimage.Thisareacanbeusedtofocusfurtherprocessing.Thisregioncanalsobedefinedprogrammatically.

rotation-invariantmatching

Apatternmatchingtechniqueinwhichthereferencepatterncanbeatanyorientationinthetestimage.

rotationalshift

Theamountbywhichoneimageisrotatedwithrespecttoareferenceimage.Thisrotationiscomputedwithrespecttothecenteroftheimage.

Page 2099: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Ssample Anobjectinanimagethatyouwanttoclassify.scale-invariantmatching

Apatternmatchingtechniqueinwhichthereferencepatterncanbeanysizeinthetestimage.

segmentationfunction

Fullypartitionsalabeledbinaryimageintonon-overlappingsegments,witheachsegmentcontainingauniqueobject.

separationfunction

Separatesobjectsthattoucheachotherbynarrowisthmuses.

shapedescriptor

Afeaturevectorthatdescribestheshapeofasample.Seealsofeaturevectorandparticleanalysis.

shapematching

Findsobjectsinanimagewhoseshapematchestheshapeoftheobjectspecifiedbyatemplate.Thematchingprocessisinvarianttorotationandcanbesettobeinvarianttothescaleoftheobjects.

shift-invariantmatching

Apatternmatchingtechniqueinwhichthereferencepatterncanbelocatedanywhereinthetestimagebutcannotberotatedorscaled.

Sigmafilter Ahighpassfilterthatoutlinesedges.skeletonfunction

Appliesasuccessionofthinningoperationstoanobjectuntilitswidthbecomesonepixel.

skiz Obtainslinesinanimagethatseparateeachobjectfromtheothersandareequidistantfromtheobjectsthattheyseparate.

smoothingfilter

Blursanimagebyattenuatingvariationsoflightintensityintheneighborhoodofapixel.

Sobelfilter Extractsthecontours(edgedetection)ingray-levelvaluesusinga3×3filterkernel.

spatialcalibration

Assigningphysicaldimensionstotheareaofapixelinanimage.

spatialfilters Altertheintensityofapixelwithrespecttovariationsinintensitiesofitsneighboringpixels.Youcanusethesefiltersforedgedetection,imageenhancement,noisereduction,smoothing,andsoforth.

spatialresolution

Thenumberofpixelsinanimage,intermsofthenumberofrowsandcolumnsintheimage.

Page 2100: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Tthickening Alterstheshapeofobjectsbyaddingpartstotheobjectthat

matchthepatternspecifiedinthestructuringelement.thinning Alterstheshapeofobjectsbyeliminatingpartsoftheobject

thatmatchthepatternspecifiedinthestructuringelement.threshold Separatesobjectsfromthebackgroundbyassigningall

pixelswithintensitieswithinaspecifiedrangetotheobjectandtherestofthepixelstothebackground.Intheresultingbinaryimage,objectsarerepresentedwithapixelintensityof255andthebackgroundissetto0.

thresholdinterval

Twoparameters,thelowerthresholdgray-levelvalueandtheupperthresholdgray-levelvalue.

TIFF TaggedImageFileFormat.Imageformatcommonlyusedforencoding8-bitandcolorimages.TIFFimageshavethefileextensionTIF.

truthtable Atableassociatedwithalogicoperatorthatdescribestherulesusedforthatoperation.

Page 2101: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Vvirtualcorner

Acornerthatwouldbecreatediftwonon-intersectinglinesareextendeduntiltheyintersect.

Page 2102: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Wwatershedtransform

Amethodofimagesegmentationthatpartitionsanimagebasedonthetopographicsurfaceoftheimage.Theimageisseparatedintonon-overlappingsegmentswitheachsegmentcontainingauniqueparticle.

Page 2103: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImportantInformationWarrantyCopyrightTrademarksPatentsWarningRegardingUseofNIProducts

Page 2104: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

WarrantyThemediaonwhichyoureceiveNationalInstrumentssoftwarearewarrantednottofailtoexecuteprogramminginstructions,duetodefectsinmaterialsandworkmanship,foraperiodof90daysfromdateofshipment,asevidencedbyreceiptsorotherdocumentation.NationalInstrumentswill,atitsoption,repairorreplacesoftwaremediathatdonotexecuteprogramminginstructionsifNationalInstrumentsreceivesnoticeofsuchdefectsduringthewarrantyperiod.NationalInstrumentsdoesnotwarrantthattheoperationofthesoftwareshallbeuninterruptedorerrorfree.AReturnMaterialAuthorization(RMA)numbermustbeobtainedfromthefactoryandclearlymarkedontheoutsideofthepackagebeforeanyequipmentwillbeacceptedforwarrantywork.NationalInstrumentswillpaytheshippingcostsofreturningtotheownerpartswhicharecoveredbywarranty.NationalInstrumentsbelievesthattheinformationinthisdocumentisaccurate.Thedocumenthasbeencarefullyreviewedfortechnicalaccuracy.Intheeventthattechnicalortypographicalerrorsexist,NationalInstrumentsreservestherighttomakechangestosubsequenteditionsofthisdocumentwithoutpriornoticetoholdersofthisedition.ThereadershouldconsultNationalInstrumentsiferrorsaresuspected.InnoeventshallNationalInstrumentsbeliableforanydamagesarisingoutoforrelatedtothisdocumentortheinformationcontainedinit.EXCEPTASSPECIFIEDHEREIN,NATIONALINSTRUMENTSMAKESNOWARRANTIES,EXPRESSORIMPLIED,ANDSPECIFICALLYDISCLAIMSANYWARRANTYOFMERCHANTABILITYORFITNESSFORAPARTICULARPURPOSE.CUSTOMER'SRIGHTTORECOVERDAMAGESCAUSEDBYFAULTORNEGLIGENCEONTHEPARTOFNATIONALINSTRUMENTSSHALLBELIMITEDTOTHEAMOUNTTHERETOFOREPAIDBYTHECUSTOMER.NATIONALINSTRUMENTSWILLNOTBELIABLEFORDAMAGESRESULTINGFROMLOSSOFDATA,PROFITS,USEOFPRODUCTS,ORINCIDENTALORCONSEQUENTIALDAMAGES,EVENIFADVISEDOFTHEPOSSIBILITYTHEREOF.ThislimitationoftheliabilityofNationalInstrumentswillapplyregardlessoftheformofaction,whetherincontractortort,includingnegligence.AnyactionagainstNationalInstrumentsmustbebroughtwithinoneyearafterthecauseofaction

Page 2105: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

accrues.NationalInstrumentsshallnotbeliableforanydelayinperformanceduetocausesbeyonditsreasonablecontrol.Thewarrantyprovidedhereindoesnotcoverdamages,defects,malfunctions,orservicefailurescausedbyowner'sfailuretofollowtheNationalInstrumentsinstallation,operation,ormaintenanceinstructions;owner'smodificationoftheproduct;owner'sabuse,misuse,ornegligentacts;andpowerfailureorsurges,fire,flood,accident,actionsofthirdparties,orothereventsoutsidereasonablecontrol.

Page 2106: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CopyrightUnderthecopyrightlaws,thispublicationmaynotbereproducedortransmittedinanyform,electronicormechanical,includingphotocopying,recording,storinginaninformationretrievalsystem,ortranslating,inwholeorinpart,withoutthepriorwrittenconsentofNationalInstrumentsCorporation.NationalInstrumentsrespectstheintellectualpropertyofothers,andweaskouruserstodothesame.NIsoftwareisprotectedbycopyrightandotherintellectualpropertylaws.WhereNIsoftwaremaybeusedtoreproducesoftwareorothermaterialsbelongingtoothers,youmayuseNIsoftwareonlytoreproducematerialsthatyoumayreproduceinaccordancewiththetermsofanyapplicablelicenseorotherlegalrestriction.

Page 2107: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

TrademarksNationalInstruments,NI,ni.com,andLabVIEWaretrademarksofNationalInstrumentsCorporation.RefertotheTermsofUsesectiononni.com/legalformoreinformationaboutNationalInstrumentstrademarks.FireWire®istheregisteredtrademarkofAppleComputer,Inc.HandleGraphics®,MATLAB®,Real-TimeWorkshop®,Simulink®,Stateflow®,andxPCTargetBox®areregisteredtrademarks,andTargetBox™andTargetLanguageCompiler™aretrademarksofTheMathWorks,Inc.Tektronix®andTekareregisteredtrademarksofTektronix,Inc.Otherproductandcompanynamesmentionedhereinaretrademarksortradenamesoftheirrespectivecompanies.MembersoftheNationalInstrumentsAlliancePartnerProgramarebusinessentitiesindependentfromNationalInstrumentsandhavenoagency,partnership,orjoint-venturerelationshipwithNationalInstruments.

Page 2108: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PatentsForpatentscoveringNationalInstrumentsproducts,refertotheappropriatelocation:Help»Patentsinyoursoftware,thepatents.txtfileonyourCD,orni.com/patents.

Page 2109: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

WARNINGREGARDINGUSEOFNATIONALINSTRUMENTSPRODUCTS(1)NATIONALINSTRUMENTSPRODUCTSARENOTDESIGNEDWITHCOMPONENTSANDTESTINGFORALEVELOFRELIABILITYSUITABLEFORUSEINORINCONNECTIONWITHSURGICALIMPLANTSORASCRITICALCOMPONENTSINANYLIFESUPPORTSYSTEMSWHOSEFAILURETOPERFORMCANREASONABLYBEEXPECTEDTOCAUSESIGNIFICANTINJURYTOAHUMAN.(2)INANYAPPLICATION,INCLUDINGTHEABOVE,RELIABILITYOFOPERATIONOFTHESOFTWAREPRODUCTSCANBEIMPAIREDBYADVERSEFACTORS,INCLUDINGBUTNOTLIMITEDTOFLUCTUATIONSINELECTRICALPOWERSUPPLY,COMPUTERHARDWAREMALFUNCTIONS,COMPUTEROPERATINGSYSTEMSOFTWAREFITNESS,FITNESSOFCOMPILERSANDDEVELOPMENTSOFTWAREUSEDTODEVELOPANAPPLICATION,INSTALLATIONERRORS,SOFTWAREANDHARDWARECOMPATIBILITYPROBLEMS,MALFUNCTIONSORFAILURESOFELECTRONICMONITORINGORCONTROLDEVICES,TRANSIENTFAILURESOFELECTRONICSYSTEMS(HARDWAREAND/ORSOFTWARE),UNANTICIPATEDUSESORMISUSES,ORERRORSONTHEPARTOFTHEUSERORAPPLICATIONSDESIGNER(ADVERSEFACTORSSUCHASTHESEAREHEREAFTERCOLLECTIVELYTERMED"SYSTEMFAILURES").ANYAPPLICATIONWHEREASYSTEMFAILUREWOULDCREATEARISKOFHARMTOPROPERTYORPERSONS(INCLUDINGTHERISKOFBODILYINJURYANDDEATH)SHOULDNOTBERELIANTSOLELYUPONONEFORMOFELECTRONICSYSTEMDUETOTHERISKOFSYSTEMFAILURE.TOAVOIDDAMAGE,INJURY,ORDEATH,THEUSERORAPPLICATIONDESIGNERMUSTTAKEREASONABLYPRUDENTSTEPSTOPROTECTAGAINSTSYSTEMFAILURES,INCLUDINGBUTNOTLIMITEDTOBACK-UPORSHUTDOWNMECHANISMS.BECAUSEEACHEND-USERSYSTEMISCUSTOMIZEDANDDIFFERSFROMNATIONALINSTRUMENTS'TESTINGPLATFORMSANDBECAUSEAUSERORAPPLICATIONDESIGNERMAYUSENATIONALINSTRUMENTSPRODUCTSINCOMBINATIONWITHOTHERPRODUCTSINAMANNERNOTEVALUATEDORCONTEMPLATEDBYNATIONALINSTRUMENTS,THEUSEROR

Page 2110: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

APPLICATIONDESIGNERISULTIMATELYRESPONSIBLEFORVERIFYINGANDVALIDATINGTHESUITABILITYOFNATIONALINSTRUMENTSPRODUCTSWHENEVERNATIONALINSTRUMENTSPRODUCTSAREINCORPORATEDINASYSTEMORAPPLICATION,INCLUDING,WITHOUTLIMITATION,THEAPPROPRIATEDESIGN,PROCESSANDSAFETYLEVELOFSUCHSYSTEMORAPPLICATION.

Page 2111: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

TechnicalSupportandProfessionalServicesVisitthefollowingsectionsoftheNationalInstrumentsWebsiteatni.comfortechnicalsupportandprofessionalservices:

Support—Onlinetechnicalsupportresourcesatni.com/supportincludethefollowing:

Self-HelpResources—Foranswersandsolutions,visittheaward-winningNationalInstrumentsWebsiteforsoftwaredriversandupdates,asearchableKnowledgeBase,productmanuals,step-by-steptroubleshootingwizards,thousandsofexampleprograms,tutorials,applicationnotes,instrumentdrivers,andsoon.FreeTechnicalSupport—AllregisteredusersreceivefreeBasicService,whichincludesaccesstohundredsofApplicationsEngineersworldwideintheNIDiscussionForumsatni.com/forums.NationalInstrumentsApplicationsEngineersmakesureeveryquestionreceivesananswer.Forinformationaboutothertechnicalsupportoptionsinyourarea,visitni.com/servicesorcontactyourlocalofficeatni.com/contact.

TrainingandCertification—Visitni.com/trainingforself-pacedtraining,eLearningvirtualclassrooms,interactiveCDs,andCertificationprograminformation.Youalsocanregisterforinstructor-led,hands-oncoursesatlocationsaroundtheworld.SystemIntegration—Ifyouhavetimeconstraints,limitedin-housetechnicalresources,orotherprojectchallenges,NationalInstrumentsAlliancePartnermemberscanhelp.Tolearnmore,callyourlocalNIofficeorvisitni.com/alliance.

Ifyousearchedni.comandcouldnotfindtheanswersyouneed,contactyourlocalofficeorNIcorporateheadquarters.YoualsocanvisittheWorldwideOfficessectionofni.com/niglobaltoaccessthebranchofficeWebsites,whichprovideup-to-datecontactinformation,supportphonenumbers,emailaddresses,andcurrentevents.

Page 2112: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFindEdgeUsageStraightEdgeReport*imaqFindEdge(Image*image,RotatedRectsearchRect,RakeDirectiondirection,constFindEdgeOptions*options,constCoordinateTransform2*transform);

Page 2113: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeLocatesastraightedgeinarectangularsearcharea.Thisfunctionlocatestheintersectionpointsbetweenasetofparallelsearchlinesandtheedgeofanobject.Thefunctiondeterminestheintersectionpointsbasedontheircontrastandslopeandcalculatesabest-fitlinebasedonthesepoints.Usethisfunctionifyouexpecttheanglebetweenthecalculatedlineandthesearchareatobelessthan45degrees.

NoteThisfunctionisobsolete.UseimaqFindEdge2()instead.

Page 2114: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 2115: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagewhichthefunctionusestocomputethelocationoftheedge.

searchRect RotatedRect Thecoordinatelocationoftherectangularsearchareathefunctionlooksinfortheedge.

direction RakeDirection Thedirectionthefunctionsearchforedgesalongthesearchlines.

options constFindEdgeOptions* Describeshowtosearchfortheedgeandtheinformationthefunctionoverlaystotheimage.

transform constCoordinateTransform2* AnoptionalspecificationofthecoordinatetransformforsearchRect.Thisparameterspecifieshowtotransformthelocationoftheedgedetectionbasedonthedifferencebetweenthereferencecoordinatesystemandthemeasurementcoordinatesystem.SetthisparametertoNULLifyoudonotneedtotransformsearchRect.

Page 2116: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

StraightEdgeReport* Onsuccess,thisfunctionreturnsinformationdescribingthecalculatededge.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDisposeStraightEdgeReport().

Page 2117: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:

threshold 40width 4steepness 2subsamplingRatio 5showSearchArea FALSEshowSearchLines FALSEshowEdgesFound FALSEshowResult TRUE

NoteimaqFindEdge()onlyoverlaystheedgesusedinthebest-fitlinecalculation.

Page 2118: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFindTransformRectUsageintimaqFindTransformRect(Image*image,RotatedRectsearchRect,CoordinateTransform2*transform,FindTransformModemode,constFindTransformRectOptions*options,AxisReport*report);

Page 2119: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputesacoordinatetransformbasedonthepositionofanobjectinasearchareaofanimage.Thefunctionusesthelocationandorientationofthecoordinatesystemitfindstocreatethereferencesystemofacoordinatetransformortoupdatethemeasurementsystemofanexistingcoordinatetransform.imaqFindTransformRect()usesthefollowingalgorithm.Firstthefunctiondeterminesthepositionofthemainaxisofthecoordinatesystem.Itlocatestheintersectionpointsbetweenasetofparallelsearchlines,orrake,andtheedgeofanobject.Thefunctiondeterminestheintersectionpointsbasedontheircontrast,width,andsteepness.Thefunctioncalculatesabest-fitlineusingthepointsfound.Thislinedefinesthemainaxisofthecoordinatesystem.Thefunctionthenlocatestheintersectionpointsbetweenasetofparallelsearchlinesthatareperpendiculartothemainaxisandtheedgeoftheobject.Itcalculatesahit-linetotheobjectfromtheedgeclosesttothesearchareadetectedandperpendiculartothemainaxis.Thislinedefinesthesecondaryaxisofthecoordinatesystem.Theintersectionbetweenthemainaxisandsecondaryaxisistheoriginofthecoordinatesystem.

NoteThisfunctionisobsolete.UseimaqFindTransformRect2()instead.

Page 2120: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 2121: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagewhichthefunctionusestocomputethecoordinatetransform.

searchRect RotatedRect Thecoordinatelocationoftherectangularsearchareathefunctionlooksinfortheobject.

transform CoordinateTransform2* Thecoordinatetransformthefunctionupdatesbasedonthelocationandpositionoftheobject.ThisparameterisrequiredandcannotbeNULL.

mode FindTransformMode Specifieshowthefunctionupdatesthecoordinatetransform.

options constFindTransformRectOptions* Definestheparametersofthealgorithmthefunctionusestolocatetheobjectandtheinformationthefunctionoverlaystotheimage.

report AxisReport* Onreturn,areportdescribingthelocationoftheedgescorrespondingtothemainaxisandthesecondaryaxis.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 2122: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2123: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:

threshold 40width 4steepness 2subsamplingRatio 5mainAxisDirection IMAQ_BOTTOM_TO_TOPsecondaryAxisDirection IMAQ_LEFT_TO_RIGHTshowSearchArea FALSEshowSearchLines FALSEshowEdgesFound FALSEshowResult TRUE

Page 2124: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFindTransformRectsUsageintimaqFindTransformRects(Image*image,RotatedRectprimaryRect,RotatedRectsecondaryRect,CoordinateTransform2*transform,FindTransformModemode,constFindTransformRectsOptions*options,AxisReport*report);

Page 2125: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputesacoordinatetransformbasedonthepositionofanobjectinasearchareaofanimage.Thefunctionusesthelocationandorientationofthecoordinatesystemitfindstocreatethereferencesystemofacoordinatetransformortoupdatethemeasurementsystemofanexistingcoordinatetransform.imaqFindTransformRects()usesthefollowingalgorithm.Firstthefunctiondeterminesthepositionofthemainaxisofthecoordinatesystem.Itlocatestheintersectionpointsbetweenasetofparallelsearchlinesintheprimaryrectangleandtheedgeofanobject.Thefunctiondeterminestheintersectionpointsbasedontheircontrast,width,andsteepness.Thefunctioncalculatesabest-fitlinethroughthepointsfound.Thislinedefinesthemainaxisofthecoordinatesystem.Theprocessisrepeatedperpendicularlyinthesecondaryrectangleinordertolocatethesecondaryaxis.Theintersectionbetweenthemainaxisandthesecondaryaxisistheoriginofthecoordinatesystem.

NoteThisfunctionisobsolete.UseimaqFindTransformRects2()instead.

Page 2126: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 2127: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagewhichthefunctionusestocomputethecoordinatetransform.

primaryRect RotatedRect Specifiestherectangularsearchareathefunctionlooksinfortheobjectedgecorrespondingtothemainaxis.

secondaryRect RotatedRect Specifiestherectangularsearchareathefunctionlooksinfortheobjectedgecorrespondingtothesecondaryaxis.

transform CoordinateTransform2* Thecoordinatetransformthefunctionupdatesbasedonthelocationandpositionoftheobject.ThisparameterisrequiredandcannotbeNULL.

mode FindTransformMode Specifieshowthefunctionupdatesthecoordinatetransform.

options constFindTransformRectsOptions* Definestheparametersofthealgorithmthefunctionusestolocatetheobjectandthe

Page 2128: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

informationthefunctionoverlaystotheimage.

report AxisReport* Onreturn,areportdescribingthelocationoftheedgescorrespondingtothemainaxisandthesecondaryaxis.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 2129: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2130: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:

primaryThreshold 40primaryWidth 4primarySteepness 2primarySubsamplingRatio 5secondaryThreshold 40secondaryWidth 4secondarySteepness 2secondarySubsamplingRatio 5mainAxisDirection IMAQ_BOTTOM_TO_TOPsecondaryAxisDirection IMAQ_LEFT_TO_RIGHTshowSearchArea FALSEshowSearchLines FALSEshowEdgesFound FALSEshowResult TRUE

Page 2131: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqAddRotatedRectContourUsageContourIDimaqAddRotatedRectContour(ROI*roi,RotatedRectrect);

Page 2132: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeThisfunctioncreatesanewregionofinterest(ROI)contourthatrepresentsarotatedrectangleandaddsittotheprovidedROI.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqAddRotatedRectContour2(),whichcorrectsanumericalerrorthatexistsinthisversionofthefunction.

Page 2133: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi ROI* TheROItocontainthenewcontour.rect RotatedRect Thecoordinatelocationinformationfortherotated

rectangle.

Page 2134: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ContourID Onsuccess,thisfunctionreturnsaContourIDforthecontour.YoucanusetheContourIDtoreferencethecontourwithinthecontainingROI.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2135: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqAutoThresholdUsageThresholdData*imaqAutoThreshold(Image*dest,Image*source,intnumClasses,ThresholdMethodmethod);

Page 2136: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeAutomaticallythresholdsanimageintomultipleclasses.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqAutoThreshold2(),whichincorporatesthefunctionalityofimaqAutoThreshold()buthasamaskparameterthatenablesyoutocontrolwhichpixelsthefunctionthresholds.

Page 2137: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 2138: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source Image* Theimagetothreshold.numClasses int Thenumberofclassesintowhichto

thresholdtheimage.Validvaluesrangefrom2to256.

method ThresholdMethod Themethodforbinarythresholding.IfnumClassesis2(abinarythreshold),methodspecifieshowtocalculatetheclasses.IfnumClassesisnot2,thefunctionignoresthisparameter.

Page 2139: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ThresholdData* Onsuccess,thisfunctionreturnsanarrayofstructuresprovidinginformationaboutthethresholdrangesthatthefunctionapplied.ThearraycontainsanumberofThresholdDatastructuresequaltonumClasses.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththearray,disposeofitbycallingimaqDispose().

Page 2140: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqChangeColorSpaceUsageColorimaqChangeColorSpace(constColor*sourceColor,ColorModesourceSpace,ColorModedestSpace);

Page 2141: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeMapsthevalueofacolorinonecolorspaceintothevalueofthesamecolorinanothercolorspace.

NoteThisfunctiondoesnotsupporttheCIEL*a*b*orCIEXYZcolormodes.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqChangeColorSpace2().

Page 2142: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

sourceColor constColor* Thecolorinthesourcespace.ThisparameterisrequiredandcannotbeNULL.

sourceSpace ColorMode Thesourcecolorspace.destSpace ColorMode Thedestinationcolorspace.

Page 2143: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

Color Onsuccess,thisfunctionreturnsthevalueofthecolorinthedestinationcolorspace.Onfailure,thisfunctionreturnsblack.Togetextendederrorinformation,callimaqGetLastError().

Page 2144: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCirclesUsageCircleReport*imaqCircles(Image*dest,constImage*source,floatminRadius,floatmaxRadius,int*numCircles);

Page 2145: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSeparatesoverlappingcircularobjectsandclassifiesthemdependingontheirradii.Thisfunctionalsodrawsthedetectedcirclesintothedestinationimage.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqFindCircles(),whichreturnsonlycirclesthatmeettheminimumandmaximumradiusrequirements.

Page 2146: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 2147: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Onreturn,animagecontainingcirclesthatthefunctionlocated.

source constImage* Theimageinwhichthefunctionfindscircles.minRadius float Thesmallestradius(inpixels)tobedetected.

Circleswithradiismallerthanthisvaluedonotappearinthedestinationimage.Thesecirclesareinthereturnedreportarray,butthefunctionreportstheirradiiasnegative.

maxRadius float Thelargestradius(inpixels)tobedetected.Circleswithradiilargerthanthisvaluedonotappearinthedestinationimage.Thesecirclesareinthereturnedreportarray,butthefunctionreportstheirradiiasnegative.

numCircles int* Onreturn,thenumberofcirclesthatthefunctiondetectedintheimage.Ifanycirclesfalloutsidetheradiusrange,numCirclesisgreaterthanthenumberofcirclesthatthefunctiondrawsinthedestinationimage.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 2148: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

CircleReport* Onsuccess,thisfunctionreturnsanarrayofstructurescontaininginformationabouteachofthefoundcircles.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththearray,disposeofitbycallingimaqDispose().

Page 2149: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqColorHistogramUsageColorHistogramReport*imaqColorHistogram(Image*image,intnumClasses,ColorModemode,constImage*mask);

Page 2150: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCalculatesthehistogram,orpixeldistribution,ofacolorimage.

NoteThisfunctiondoesnotsupporttheCIEL*a*b*orCIEXYZcolormodes.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqColorHistogram2().

Page 2151: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 2152: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagewhosehistogramthefunctioncalculates.

numClasses int Thenumberofclassesintowhichthefunctionseparatesthepixels.

mode ColorMode Thecolorspaceinwhichtoperformthehistogram.

mask constImage* Anoptionalmaskimage.ThisimagemustbeanIMAQ_IMAGE_U8image.Thefunctioncalculatesthehistogramusingonlythosepixelsintheimagewhosecorrespondingpixelsinthemaskarenon-zero.SetthisparametertoNULLtocalculatethehistogramoftheentireimage.

Page 2153: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ColorHistogramReport* Onsuccess,thisfunctionreturnsareportdescribingtheclassificationofeachplaneinaHistogramReport.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereport,disposeofitbycallingimaqDispose().

Page 2154: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqConcentricRakeUsageConcentricRakeReport*imaqConcentricRake(constImage*image,constROI*roi,ConcentricRakeDirectiondirection,EdgeProcessprocess,constRakeOptions*options);

Page 2155: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFindsedgesalongconcentriccircularorannularpathsintheimage.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqConcentricRake2().

Page 2156: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 2157: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageinwhichtofindedges.roi constROI* Theannularregionthefunctionlooks

infortheedges.Thefirstcontourofroimustbeanannulus.

direction ConcentricRakeDirection Thedirectionthefunctionsearchesforedgesalongthesearchlines.

process EdgeProcess Definestheedgesforwhichthefunctionlooks.

options constRakeOptions* Describeshowtosearchfortheedges.

Page 2158: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ConcentricRakeReport* Onsuccess,thisfunctionreturnsinformationdescribingthecalculatededgesandtheconcentricrakeusedbythefunction.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDispose().

Page 2159: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:

threshold 40width 4steepness 2subsamplingRatio 5subpixelType IMAQ_QUADRATICsubpixelDivisions 1

Page 2160: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqConstructROIUsageintimaqConstructROI(constImage*image,ROI*roi,ToolinitialTool,constToolWindowOptions*tools,constConstructROIOptions*options,int*okay);

Page 2161: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeDisplaystheimageinamodalwindowandallowstheusertodrawaregionofinterest(ROI)onit.AftertheuserdrawstheROI,thefunctionclosesthewindow.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqConstructROI2().

Page 2162: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 2163: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* SpecifiestheimagethattheuserselectsanROIfrom.

roi ROI* SpecifiestheROIthatinitiallyappearsintheROIconstructorwindow.TheusercanthenmodifythisROIbyadding,removing,resizing,andmovingcontours.ThefunctionappliestheresultsofthesemodificationstotheROI.

initialTool Tool SpecifiestheinitiallyselectedtoolintheROIconstructorwindow.ThistoolmustbeavailableintheROIconstructorwindow.

tools constToolWindowOptions* DeterminestheavailabilityoftoolsintheROIconstructorwindow.SettoolstoNULLtodisplayallthetools.

options constConstructROIOptions* DescribeshowafunctionpresentstheROIconstructorwindow.

okay int* Uponreturn,thisparameterisTRUEiftheuserpressedOKtoendtheselectionofaline.Otherwise,thisparameterisFALSE.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 2164: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2165: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:

windowNumber IMAQ_MODAL_DIALOGwindowTitle "ROIConstructor"type IMAQ_PALETTE_GRAYpalette NULLnumColors 0

Page 2166: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqConvexUsageintimaqConvex(Image*dest,constImage*source);

Page 2167: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputestheconvexenvelopeforeachlabeledparticleinthesourceimage.Ifthesourceimagecontainsmorethanoneparticle,youmustlabeleachparticlewithimaqLabel()beforecallingthisfunction.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqConvexHull(),whichallowsyoutospecifytheconnectivityofyourparticles.

Page 2168: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16

Page 2169: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagecontainingthelabeledparticleswhose

convexenvelopesthefunctioncalculates.

Page 2170: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2171: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqConvolveUsageintimaqConvolve(Image*dest,Image*source,constfloat*kernel,intmatrixRows,intmatrixCols,floatnormalize,constImage*mask);

Page 2172: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeAppliesalinearfiltertoanimagebyconvolvingtheimagewithafilteringkernel.Theconvolutionkernelmusthaveanoddwidthandheight.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqConvolve2().

Page 2173: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 2174: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source Image* Theimagetofilter.Thisfunctionmodifiesthe

borderofthesourceimage.Thebordermustbeatleasthalfaslargeasthelargerdimensionofthekernel.

kernel constfloat* Thematrixrepresentingthelinearfilter.ThisparameterisrequiredandcannotbeNULL.

matrixRows int Thenumberofrowsinthekernelmatrix.Thisnumbermustbeodd.

matrixCols int Thenumberofcolumnsinthekernelmatrix.Thisnumbermustbeodd.

normalize float Thenormalizationfactor.Afterperformingtheconvolution,thefunctiondivideseachpixelvaluebythisvalue.Setthisparameterto0todividebythesumoftheelementsofthekernel.

mask constImage* Anoptionalmaskimage.ThisimagemustbeanIMAQ_IMAGE_U8image.Thefunctionfiltersonlythosepixelsinthesourceimagewhosecorrespondingpixelsinthemaskarenon-zero.SetthisparametertoNULLtofiltertheentireimage.

Page 2175: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2176: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 2177: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCoordinateReferenceUsageintimaqCoordinateReference(constPoint*points,ReferenceModemode,Point*origin,float*angle);

Page 2178: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeBuildsareferenceforanyarbitrarycoordinatesystemwithrespecttotheimageplane.Thereferenceofthecoordinatesystemisspecifiedasthepositionoftheoriginofthecoordinatesystemandtheorientationofitsx-axiswithrespecttothatoftheimageplane.ACoordinateSystemaccountsforthedirectionofthey-axis,whichimaqCoordinateReference()doesnotaccountfor.Inaddition,aCoordinateSystemusesaPointFloattorepresenttheorigin,whichallowsforincreasedaccuracy.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqBuildCoordinateSystem(),whichusesanewstructurecalledaCoordinateSystem.

Page 2179: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

points constPoint* Anarrayofpointsdefiningthecoordinatereference.IfmodeisIMAQ_COORD_X_Y,thepointsarraymusthavethreepoints.IfmodeisIMAQ_COORD_ORIGIN_X,thepointsarraymusthavetwopoints.

mode ReferenceMode Specifiesthemethodthatthefunctionusestocalculatethecoordinatesystem.

origin Point* Onreturn,theoriginofthecoordinatesystem.SetthisparametertoNULLifyoudonotneedthisinformation.

angle float* Onreturn,theangle,indegrees,ofthex-axisofthecoordinatesystemrelativetothex-axisofanimage.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 2180: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2181: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCopyCalibrationInfoUsageintimaqCopyCalibrationInfo(Image*dest,constImage*source);

Page 2182: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCopiescalibrationinformationfromacalibratedimagetoanuncalibratedimage.Bothimagesmustbethesamesize.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqCopyCalibrationInfo2().

Page 2183: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_U16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 2184: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Theimagewhosecalibrationinformationthefunctionsets.

source constImage* Thecalibratedimagethatcontainsthecalibrationinformationthefunctioncopiestothedestinationimage.

Page 2185: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2186: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCreateOverlayFromMetafileUsageOverlay*imaqCreateOverlayFromMetafile(constvoid*metafile);

Page 2187: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCreatesawindowoverlayfromaWindowsmetafileorenhancedmetafile.Thisfunctionisobsolete.YoushoulduseimaqOverlayMetafile()instead.Thenewfunctionoverlaysthemetafiledirectlyontotheimageinsteadofreturninganoverlay.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqOverlayMetafile(),whichoverlaysthemetafiledirectlyontotheimageinsteadofreturninganoverlay.

Page 2188: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

metafile constvoid* TheWindowshandletothemetafilethatyouwanttoconvertintoanoverlay.ThehandlemaybeeitheranHMETAFILEorHENHMETAFILE.

Page 2189: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

Overlay* Onsuccess,thisfunctionreturnsanoverlay.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeoverlay,disposeofitbycallingimaqDispose().

Page 2190: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqCreateOverlayFromROIUsageOverlay*imaqCreateOverlayFromROI(constROI*roi);

Page 2191: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCreatesawindowoverlayfromaregionofinterest(ROI).Thisfunctionisobsolete.YoushoulduseimaqOverlayROI()instead.ThenewfunctionoverlaystheROIdirectlyontotheimageinsteadofreturninganoverlay.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqOverlayROI(),whichoverlaystheROIdirectlyontotheimageinsteadofreturninganoverlay.

Page 2192: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi constROI* Theregionofinteresttoconvertintoanoverlay.

Page 2193: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

Overlay* Onsuccess,thisfunctionreturnsanoverlay.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeoverlay,disposeofitbycallingimaqDispose().

Page 2194: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqDivideUsageintimaqDivide(Image*dest,constImage*sourceA,constImage*sourceB);

Page 2195: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeDividestwoimages.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqDivide2().

Page 2196: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB

Page 2197: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.sourceA constImage* Thefirstimagetodivide.sourceB constImage* Thesecondimagetodivide.

Page 2198: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2199: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionTheimagetypeofsourceBdependsontheimagetypeofsourceA,asfollows:

IfsourceAisIMAQ_IMAGE_I16,sourceBmustbeIMAQ_IMAGE_I16orIMAQ_IMAGE_U8.IfsourceAisIMAQ_IMAGE_SGL,sourceBmustbeIMAQ_IMAGE_SGL,IMAQ_IMAGE_I16,orIMAQ_IMAGE_U8.IfsourceAisIMAQ_IMAGE_COMPLEX,sourceBmustbeIMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_SGL,IMAQ_IMAGE_I16,orIMAQ_IMAGE_U8.IfsourceAisIMAQ_IMAGE_RGB,sourceBmustbeIMAQ_IMAGE_RGBorIMAQ_IMAGE_U8.

Otherwise,sourceBmustbethesametypeassourceA.

Page 2200: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqDivideConstantUsageintimaqDivideConstant(Image*dest,constImage*source,PixelValuevalue);

Page 2201: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeDivideseachpixelinanimagebyaconstant.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqDivideConstant2().

Page 2202: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB

Page 2203: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagebywhichthefunctiondividesascalar

constant.value PixelValue Thevaluebywhichthefunctiondividesthesource

image.Setthememberofvaluethatcorrespondstotheimagetype.

Page 2204: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2205: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqEdgeToolUsageEdgeReport*imaqEdgeTool(constImage*image,constPoint*points,intnumPoints,constEdgeOptions*options,int*numEdges);

Page 2206: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFindsedgesalongapathinanimage.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqEdgeTool2().

Page 2207: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 2208: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageinwhichtofindtheedges.points constPoint* Thepathalongwhichthefunction

detectsedges.ThisparameterisrequiredandcannotbeNULL.

numPoints int Thenumberofpointsinthepointsarray.options constEdgeOptions* Describeshowyouwantthefunctionto

findedges.ThisparameterisrequiredandcannotbeNULL.

numEdges int* Onreturn,thenumberofedgesthatthefunctionfound.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 2209: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

EdgeReport* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachedge.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthisfunctionbycallingimaqDispose().

Page 2210: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqEdgeTool2UsageEdgeReport*imaqEdgeTool2(constImage*image,constPoint*points,intnumPoints,EdgeProcessprocess,constEdgeOptions*options,int*numEdges);

Page 2211: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFindsedgesalongapathinanimage.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqEdgeTool3()instead.

Page 2212: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 2213: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageinwhichtofindtheedges.points constPoint* Thepathalongwhichthefunction

detectsedges.ThisparameterisrequiredandcannotbeNULL.

numPoints int Thenumberofpointsinthepointsarray.process EdgeProcess Definestheedgesforwhichthefunction

looks.options constEdgeOptions* Describeshowyouwantthefunctionto

findedges.ThisparameterisrequiredandcannotbeNULL.

numEdges int* Onreturn,thenumberofedgesthatthefunctionfound.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 2214: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

EdgeReport* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachedge.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthisfunctionbycallingimaqDispose().

Page 2215: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqEdgeTool3UsageEdgeReport2*imaqEdgeTool3(constImage*image,constROI*roi,EdgeProcessprocessType,constEdgeOptions2*edgeOptions);

Page 2216: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFindsedgesalonganROIinanimage.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqEdgeTool4().

Page 2217: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 2218: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageinwhichtofindtheedges.

roi constROI* TheROItofindedgesalong.processType EdgeProcess Theedgeprocesstype.edgeOptions constEdgeOptions2* Specifiestheparametersthatare

usedtocomputetheedgeprofileanddetectedges.

Page 2219: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

EdgeReport2* Onsuccess,thisfunctionreturnsastructureofinformationabouttheedgesfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisstructure,disposeofitbycallingimaqDispose().

Page 2220: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionedgeOptions—SetedgeOptionstoNULLtousethefollowingdefaultvalues:

polarity IMAQ_SEARCH_FOR_ALL_EDGESkernelSize 3width 3minThreshold 10.0interpolationType IMAQ_BILINEAR_FIXEDcolumnProcessingMode IMAQ_MEDIAN_COLUMNS

Page 2221: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFitCircleUsageintimaqFitCircle(constPointFloat*points,intnumPoints,BestCircle*circle);

Page 2222: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFindsthecirclethatbestrepresentsthesetofpoints.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqFitCircle2().

Page 2223: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

points constPointFloat* Thearrayofpointstofittotheedgeofthecircle.

numPoints int Thenumberofpointsinthesuppliedarray.Youmustsupplyatleastthreepoints.

circle BestCircle* Onreturn,astructuredescribingthecirclethatbestfitthepoints.ThisparameterisrequiredandcannotbeNULL.

Page 2224: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2225: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqFitEllipseUsageintimaqFitEllipse(constPointFloat*points,intnumPoints,BestEllipse*ellipse);

Page 2226: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFindstheellipsethatbestrepresentsthesetofpoints.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqFitEllipse2().

Page 2227: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

points constPointFloat* Thearrayofpointstofittotheedgeoftheellipse.

numPoints int Thenumberofpointsinthesuppliedarray.Youmustsupplyatleastsixpoints.

ellipse BestEllipse* Onreturn,astructuredescribingtheellipsethatbestfitthepoints.ThisparameterisrequiredandcannotbeNULL.

Page 2228: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2229: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetCalibrationInfoUsageintimaqGetCalibrationInfo(constImage*image,CalibrationUnit*unit,float*xDistance,float*yDistance);

Page 2230: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsthecalibrationinformationofanimage.Thisfunctionisobsolete.ThereplacementfunctionisimaqGetCalibrationInfo2(),whichincorporatesthefunctionalityofimaqGetCalibrationInfo()withthegridelementoftheCalibrationInfostructure.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqGetCalibrationInfo2(),whichincorporatesthefunctionalityofimaqGetCalibrationInfo()withthegridelementoftheCalibrationInfostructure.

Page 2231: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 2232: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagewhosecalibrationinformationthefunctionqueries.

unit CalibrationUnit* Onreturn,theunitofmeasurethatyouspecifiedinimaqSetCalibrationInfo().SetthisparametertoNULLifyoudonotneedtheunitinformation.

xDistance float* Onreturn,thedistancebetweentwoadjacentpixelsinthex-direction.Thisvalueisintheunitsspecifiedinunit.SetthisparametertoNULLifyoudonotneedthex-distanceinformation.

yDistance float* Onreturn,thedistancebetweentwoadjacentpixelsinthey-direction.Thisvalueisintheunitsspecifiedinunit.SetthisparametertoNULLifyoudonotneedthey-distanceinformation.

Page 2233: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2234: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetCharInfoUsageCharInfo*imaqGetCharInfo(constCharSet*set,intindex);

Page 2235: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsinformationaboutaparticulartrainedcharacter.Thestructurethatthefunctionreturnscontainsacopyofthedatafromthecharacterset.Modificationstotheinformationinthestructuredonotaffectthecharacterset.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqGetCharInfo2().

Page 2236: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

set constCharSet* Thecharactersetthisfunctionoperateson.Tocreateacharacterset,useimaqCreateCharSet().ThisparameterisrequiredandcannotbeNULL.

index int Theindexofatrainedcharacterinthecharactersetfromwhichthefunctiongetsinformation.

Page 2237: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

CharInfo* Onsuccess,thisfunctionreturnsareportthatcontainsinformationaboutthecharacter.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyoufinishwiththecharacterinformation,callimaqDispose()todisposeofit.

Page 2238: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetContourInfoUsageContourInfo*imaqGetContourInfo(constROI*roi,ContourIDid);

Page 2239: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReturnsinformationaboutaparticularcontour.Thestructurethatthefunctionreturnscontainsacopyofthedatafromthecontour.Modificationstotheinformationinthestructuredonotaffectthecontour.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqGetContourInfo2(),whichreturnsanewstructurecalledContourInfo2.Thisnewstructureaccountsforthetwonewcontourtypes—theannulusandtherotatedrectangle.UsingimaqGetContourInfotogetinformationaboutoneofthenewcontourtypesreturnsmisleadinginformation.

Page 2240: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi constROI* Theregionofinterest(ROI)containingthecontourfromwhichthefunctiongetstheinformation.

id ContourID TheContourIDofthecontouraboutwhichthefunctiongetsinformation.

Page 2241: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ContourInfo* Onsuccess,thisfunctionreturnsapointertothestructurecontaininginformationabouttherequestedcontour.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisstructure,disposeofthepointerbycallingimaqDispose().

Page 2242: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetParticleInfoUsageParticleReport*imaqGetParticleInfo(Image*image,intconnectivity8,ParticleInfoModemode,int*reportCount);

Page 2243: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCalculatesvariousmeasurementsofparticlesinabinaryimage.

NoteThisfunctionisobsolete.UseimaqCountParticles()andimaqMeasureParticle()togetinformationaboutparticlesinyourimage.

Page 2244: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 2245: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Thebinaryimagecontainingparticlesonwhichthefunctiongetsparticleinformation.Thecalculationmodifiestheborderoftheimage.

connectivity8 int SetthisparametertoTRUEtouseconnectivity-8todeterminewhetherparticlesaretouching.SetthisparametertoFALSEtouseconnectivity-4todeterminewhetherparticlesaretouching.Formoreinformationaboutconnectivity,seeChapter9,BinaryMorphology,intheNIVisionConceptsManual.

mode ParticleInfoMode Controlstheextentofparticleinformationthatthefunctionreturns.

reportCount int* Onreturn,filledwiththenumberofreportsinthearrayreturnedbythefunction.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 2246: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ParticleReport* Onsuccess,thisfunctionreturnsapointertoanarrayofreportsabouttheparticlesintheimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisdata,disposeofthearraybycallingimaqDispose().

Page 2247: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 2248: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqGetWindowZoomUsageintimaqGetWindowZoom(intwindowNumber,int*xZoom,int*yZoom);

Page 2249: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRetrievesthecurrentzoomfactorsforagivenimagewindow.Thezoomfactorindicatesanincreaseordecreaseinthemagnificationofanimage.Apositivenumberindicatesamagnificationbytheamountspecified.Forexample,azoomfactorof3indicatesthattheimageisdisplayedatthreetimesitsactualsize(3:1).Anegativenumberindicatesthattheimageisdecreasedinmagnificationbythespecifiedamount.Forexample,azoomfactorof—5indicatesthattheimageisdisplayedatone-fifthitsactualsize(1:5).

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqGetWindowZoom2().

Page 2250: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.xZoom int* Onreturn,thecurrentzoomfactorinthex

directionforthewindow.yZoom int* Onreturn,thecurrentzoomfactorinthey

directionforthewindow.

Page 2251: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2252: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqIsVisionInfoPresentUsageintimaqIsVisionInfoPresent(constImage*image,VisionInfoTypetype,int*present);

Page 2253: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRetrieveswhetherthegivenimagecontainstherequestedVisioninformation.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqGetVisionInfoTypes(),whichretrievesallavailabletypesinonecall.Thenewfunctionalsorevealsmoredetailedinformation.

Page 2254: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 2255: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* TheimagethatthefunctionchecksforthepresenceofVisioninformation.

type VisionInfoType TheVisioninformationforwhichthefunctionchecks.

present int* Onreturn,thisparameterisTRUEiftheVisioninformationspecifiedbytypeispresentintheimageandFALSEiftheinformationisnotcontainedintheimage.ThisparameterisrequiredandcannotbeNULL.

Page 2256: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2257: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLabelUsageintimaqLabel(Image*dest,Image*source,intconnectivity8,int*particleCount);

Page 2258: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeLabelstheparticlesinabinaryimagebyapplyingauniquevaluetoallpixelswithinaparticle.Thisvalueisencodedin8or16bits,dependingontheimagetype.Thefunctioncanlabel255particlesinan8-bitimageand65,535particlesina16-bitimage.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqLabel2().

Page 2259: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16

Page 2260: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source Image* Thesourceimage.Thelabelingprocess

modifiestheborderofthesourceimage.Thebordermustbeatleastonepixelwideifyouuseconnectivity-4ortwopixelswideifyouuseconnectivity-8.

connectivity8 int SetthisparametertoTRUEtouseconnectivity-8todeterminewhetherparticlesaretouching.SetthisparametertoFALSEtouseconnectivity-4todeterminewhetherparticlesaretouching.Formoreinformationaboutconnectivity,seeChapter9,BinaryMorphology,intheNIVisionConceptsManual.

particleCount int* Onreturn,thenumberofparticlesthatthefunctionfound.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 2261: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2262: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 2263: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLearnPatternUsageintimaqLearnPattern(Image*image,LearningModelearningMode);

Page 2264: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeThemodeinwhichthefunctionlearnsthetemplateimage.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqLearnPattern2().

Page 2265: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 2266: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageaboutwhichthefunctionlearnspatternmatchinginformation.Thefunctionappendsthepatternmatchinginformationtotheimage.

learningMode LearningMode Themodeinwhichthefunctionlearnsthetemplateimage.

Page 2267: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2268: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLearnPattern2UsageintimaqLearnPattern2(Image*image,LearningModelearningMode,LearnPatternAdvancedOptions*advancedOptions);

Page 2269: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeCreatesadescriptionofthetemplateimageyouwanttosearchforduringthematchingphase.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqLearnPattern3().

Page 2270: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 2271: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimageaboutwhichthefunctionlearnspatternmatchinginformation.Thefunctionappendsthepatternmatchinginformationtotheimage.

learningMode LearningMode Themodeinwhichthefunctionlearnsthetemplateimage.

advancedOptions LearnPatternAdvancedOptions* Advancedoptionstothealgorithm.

Page 2272: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2273: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLinearAveragesUsageLinearAverages*imaqLinearAverages(constImage*image,Rectrect);

Page 2274: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeComputesthemeanlineprofileofanimage.Thisfunctionisobsolete.ThereplacementfunctionisimaqLinearAverages2,whichallowsyoutoselectwhichmeanlineprofilesthefunctioncomputes.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqLinearAverages2().

Page 2275: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 2276: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageonwhichthefunctioncalculatespixelvalueaverages.

rect Rect Setstherectangularareainwhichthefunctioncalculatestheaverages.SetthisparametertoIMAQ_NO_RECTtocalculatetheaveragesonthewholeimage.

Page 2277: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

LinearAverages* Onsuccess,thisfunctionreturnsastructurecontainingthelinearaveragesoftheimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().

Page 2278: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLineGaugeToolUsageintimaqLineGaugeTool(constImage*image,Pointstart,Pointend,LineGaugeMethodmethod,constEdgeOptions*edgeOptions,constCoordinateTransform*reference,float*distance);

Page 2279: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeMeasuresthedistancebetweenselectededgesofalinewithhigh-precisionsubpixelaccuracy.Thisfunctionhastheabilitytoworkonarotatedortranslatedparticle.Ifyousupplycoordinatetransforminformation,thefunctiontransformsthelineinformationyoupassfromthecoordinatesystemoftheparticletothecoordinatesystemoftheimage.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqLineGaugeTool2(),whichusestheCoordinateTransform2structuretoaccountforthedirectionofthey-axisinacoordinatesystem.

Page 2280: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 2281: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageinwhichthefunctionmeasuresthedistancebetweenedges.

start Point Thestartingpointoftheline.end Point Theendingpointoftheline.method LineGaugeMethod Themeasurementmethod.edgeOptions constEdgeOptions* Describeshowyouwantthe

functiontofindedges.IfyousetmethodtoIMAQ_POINT_TO_POINT,thefunctionignoresedgeOptions.IfyousetmethodtoanythingotherthanIMAQ_POINT_TO_POINT,thisparameterisrequiredandcannotbeNULL.

reference constCoordinateTransform* Thetransformbetweenthecoordinatesystemoftheparticleandtheimage.SetthisparametertoNULLifyoudonotwanttoapplyatransform.

distance float* Onreturn,thedistancebetweenedgesand/orpoints.ThisparameterisrequiredandcannotbeNULL.

Page 2282: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2283: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqLoadPatternUsageintimaqLoadPattern(Image*pattern,constchar*fileName);

Page 2284: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeLoadsatemplateimagepreviouslysavedwiththeimaqSavePattern()function.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqReadVisionFile(),whichcanloadfilesthatcontainadditionalvisioninformationsuchasanoverlay.FilessavedwithimaqWriteVisionFile()cannotbeloadedusingimaqLoadPattern().

Page 2285: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 2286: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

pattern Image* Thetemplateimage.fileName constchar* Thenameoftheimagefiletoload.

Page 2287: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2288: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMatchGeometricPatternUsageGeometricPatternMatch*imaqMatchGeometricPattern(constImage*image,constImage*pattern,constCurveOptions*curveOptions,constMatchGeometricPatternOptions*matchOptions,constMatchGeometricPatternAdvancedOptions*advancedMatchOptions,constROI*roi,int*numMatches);

Page 2289: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSearchesforareasinanimagethatmatchagivengeometrictemplateimage.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqMatchGeometricPattern2().

Page 2290: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 2291: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageinwhichthefunctionfindsmatchestothetemplateimage.

pattern constImage* Thepatterntofindintheimage.

curveOptions constCurveOptions* Describeshowthefunctionidentifiesthecurvesintheimagethefunctionwillusetomatchthetemplateimage.ThisfunctiondoesnotsupportidentifyingcurveswithsubpixelaccuracyandthereforeignoresthesubpixelAccuracyelementofthisparameter.SetthisparametertoNULLtousethesamecurveoptionstomatchthetemplateimageasyouusedtolearnthetemplateimage.

matchOptions constMatchGeometricPatternOptions* Describeshowtosearchforthetemplateimage.

Page 2292: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

advancedMatchOptions constMatchGeometricPatternAdvancedOptions* Specifiesadvancedbehaviorsofthefunction,whichcanbeusedtooptimizetheperformanceofthefunctionortofine-tunethematcheslocatedbythefunction.

roi constROI* Specifieswhere,inimagefunctionsearchesforthetemplateimage.Thefirstcontourofbearectangleorarotatedrectangle.SetthisparametertoNULLtospecifythatthefunctionsearchesintheentireimage.

numMatches int* Onreturn,thenumberofmatchestothetemplateimagethatthefunctionfound.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 2293: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

GeometricPatternMatch* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().

Page 2294: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionmatchOptions—SetmatchOptionstoNULLtousethedefaultmatchoptions,asfollows:

mode IMAQ_GEOMETRIC_MATCH_ROTATION_INVARIANTsubpixelAccuracy FALSEangleRanges NULL(allanglesallowed)numRanges 0scaleRange {75,125}occlusionRange {0,25}numMatchesRequested 1minMatchScore 800

advancedMatchOptions—SetadvancedMatchOptionstoNULLtousethedefaultadvancedmatchoptions,asfollows:

minFeaturesUsed 5maxFeaturesUsed 5subpixelIterations 20subpixelTolerance 0initialMatchListLength 200matchTemplateCurveScore FALSEcorrelationScore TRUEminMatchSeparationDistance 20minMatchSeparationAngle 10minMatchSeparationScale 10maxMatchOverlap 80coarseResult FALSE

Page 2295: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqMatchPatternUsagePatternMatch*imaqMatchPattern(constImage*image,Image*pattern,constMatchPatternOptions*options,RectsearchRect,int*numMatches);

Page 2296: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSearchesforareasinanimagethatmatchagiventemplateimage.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqMatchPattern2().

Page 2297: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 2298: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageinwhichthefunctionfindsmatchestothetemplateimage.

pattern Image* Thepatternimagetofindintheimage.NIVisionmustlearnthistemplateimageinimaqLearnPattern()beforeusingitinthisfunction.

options constMatchPatternOptions* Describeshowtosearchforthetemplateimage.

searchRect Rect Specifiesarectangleintheimageinwhichtosearchforthetemplateimage.SetthisparametertoIMAQ_NO_RECTtosearchforthetemplateimageintheentireimage.

numMatches int* Onreturn,thenumberofmatchestothetemplateimagethatthefunctionfound.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 2299: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

PatternMatch* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().

Page 2300: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—,SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:

mode IMAQ_MATCH_SHIFT_INVARIANTminContrast 10subpixelAccuracy FALSEangleRanges NULL(allanglesallowed)numRanges 0numMatchesRequested 1matchFactor 0minMatchScore 800

Page 2301: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqParticleFilterUsageintimaqParticleFilter(Image*dest,Image*source,constParticleFilterCriteria*criteria,intcriteriaCount,intrejectMatches,intconnectivity8);

Page 2302: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFiltersparticlesbasedontheirmorphologicalmeasurements.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqParticleFilter2().

Page 2303: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 2304: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source Image* Theimageonwhichto

performtheparticlefilter.Thecalculationmodifiestheborderofthesourceimage.Thebordermustbeatleastonepixelwideifyouuseconnectivity-4ortwopixelswideifyouuseconnectivity-8.

criteria constParticleFilterCriteria* Thearrayofcriteriaforthefilter.ThisparameterisrequiredandcannotbeNULL.

criteriaCount int Specifiesthenumberofentriesinthecriteriaarray.

rejectMatches int SetthisparametertoTRUEtotransferonlythoseparticlesthatdonotmeetallthecriteria.SetthisparametertoFALSEtotransferonlythoseparticlesthatmeetallthecriteriatothedestination.

connectivity8 int SetthisparametertoTRUEtouseconnectivity-8todeterminewhetherparticlesaretouching.SetthisparametertoFALSEtouseconnectivity-4todeterminewhetherparticlesaretouching.Formoreinformationaboutconnectivity,seeChapter9,

Page 2305: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

BinaryMorphology,intheNIVisionConceptsManual.

Page 2306: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2307: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 2308: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqParticleFilter2UsageintimaqParticleFilter2(Image*dest,Image*source,constParticleFilterCriteria2*criteria,intcriteriaCount,intrejectMatches,intconnectivity8,int*numParticles);

Page 2309: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFiltersparticlesbasedontheirmorphologicalmeasurements.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqParticleFilter3().

Page 2310: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 2311: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimagethatwillcontainonlythefilteredparticles.

source Image* Theimagecontainingtheparticlestofilter.

criteria constParticleFilterCriteria2* Anarrayofcriteriatoapplytotheparticlesinthesourceimage.ThisarraycannotbeNULL.

criteriaCount int Thenumberofelementsinthecriteriaarray.

rejectMatches int SetthisparametertoTRUEtotransferonlythoseparticlesthatdonotmeetallthecriteria.SetthisparametertoFALSEtotransferonlythoseparticlesthatmeetallthecriteriatothedestination.

connectivity8 int SetthisparametertoTRUEtouseconnectivity-8todeterminewhetherparticlesaretouching.SetthisparametertoFALSEtouseconnectivity-4todeterminewhetherparticlesaretouching.Formoreinformationaboutconnectivity,refertoChapter9,BinaryMorphology,intheNIVisionConceptsManual.

numParticles int* Onreturn,thenumberof

Page 2312: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

particlesleftintheimage.

Page 2313: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2314: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.

Page 2315: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqParticleFilter3UsageintimaqParticleFilter3(Image*dest,Image*source,constParticleFilterCriteria2*criteria,intcriteriaCount,constParticleFilterOptions*options,constROI*roi,int*numParticles);

Page 2316: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFiltersparticlesbasedontheirmorphologicalmeasurements.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqParticleFilter4().

Page 2317: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 2318: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimagethatwillcontainonlythefilteredparticles.

source Image* Theimagecontainingtheparticlestofilter.

criteria constParticleFilterCriteria2* Anarrayofcriteriatoapplytotheparticlesinthesourceimage.ThisarraycannotbeNULL.

criteriaCount int Thenumberofelementsinthecriteriaarray.

options constParticleFilterOptions* OptionsusedbyimaqParticleFiltertofilterbinaryparticles.

roi constROI* TheROIwhosecontoursaparticlemustbecontainedintoavoidbeingfilteredout.IfrejectBorderistrueinoptions,anyparticletouchingtheborderofacontourinroiwillalsobefilteredout.SetthisparametertoNULLtofilterparticlesintheentireimagebasedonthecriteriaarray.

numParticles int* Onreturn,thenumberofparticlesleftintheimage.

Page 2319: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2320: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.options—SetoptionstoNULLtousethefollowingdefaultvalues:

rejectMatches FALSErejectBorder FALSEconnectivity8 TRUE

Page 2321: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqRakeUsageRakeReport*imaqRake(constImage*image,constROI*roi,RakeDirectiondirection,EdgeProcessprocess,constRakeOptions*options);

Page 2322: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFindsedgesalongasetofparallellinesdefinedinsidearectangularregion.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqRake2().

Page 2323: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 2324: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageinwhichtofindedges.roi constROI* Therectangularregionthefunctionlooks

infortheedges.Thefirstcontourofroimustbearectangleorarotatedrectangle.

direction RakeDirection Thedirectionthefunctionsearchesforedgesalongthesearchlines.

process EdgeProcess Definestheedgesforwhichthefunctionlooks.

options constRakeOptions* Describeshowtosearchfortheedges.

Page 2325: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

RakeReport* Onsuccess,thisfunctionreturnsinformationdescribingthecalculatededgesandtherakeusedbythefunction.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDispose().

Page 2326: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:

threshold 40width 4steepness 2subsamplingRatio 5subpixelType IMAQ_QUADRATICsubpixelDivisions 1

Page 2327: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqReadDataMatrixBarcodeUsageBarcode2DInfo*imaqReadDataMatrixBarcode(constImage*image,constROI*roi,constDataMatrixOptions*options,unsignedint*numBarcodes);

Page 2328: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReadsDataMatrixbarcodesfromanimage.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqReadDataMatrixBarcode2(),whichusesanincreaseininputparameterstoofferbetterreliabilityandperformance,aswellastheabilitytoprepareimagesfordatamatrixgrading.

Page 2329: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 2330: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagecontainingthebarcodestoread.

roi constROI* Aregionofinterestspecifyingthelocationofthebarcodesintheimage.Thefirstcontourofroimustbearectangle,rotatedrectangle,oval,annulusorclosedcontour.SetthisparametertoNULLtousetheentireimage.

options constDataMatrixOptions* DescribeshowtosearchfortheDataMatrixbarcode.

numBarcodes unsignedint* Onreturn,thenumberofbarcodesthatthefunctionfound.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 2331: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

Barcode2DInfo* Onsuccess,thisfunctionreturnsanarrayofstructurescontaininginformationaboutthebarcodes.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisarray,disposeofitbycallingimaqDispose().

Page 2332: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:

searchMode IMAQ_SEARCH_SINGLE_CONSERVATIVEcontrast IMAQ_ALL_BARCODE_2D_CONTRASTScellShape IMAQ_SQUARE_CELLSbarcodeShape IMAQ_SQUARE_BARCODE_2Dsubtype IMAQ_ALL_DATA_MATRIX_SUBTYPES

Page 2333: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqReadTextUsageReadTextReport*imaqReadText(constImage*image,constCharSet*set,constROI*roi,constReadTextOptions*readOptions,constOCRProcessingOptions*processingOptions,constOCRSpacingOptions*spacingOptions);

Page 2334: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReadsthetextfromtheimage.Thefunctionidentifiesallobjectsintheimagebasedontheattributesthatyouset,andthencompareseachobjectwitheverytrainedcharacter.Foreachobject,thefunctionselectsthecharacterthatmostcloselymatchestheobject.Thefunctionusesthesubstitutioncharacterforanyobjectthatdoesnotmatchanyofthetrainedcharacters.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqReadText2().

Page 2335: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 2336: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Thesourceimageforthisoperation.

set constCharSet* Thecharactersetthisfunctionoperateson.Tocreateacharacterset,useimaqCreateCharSet().ThisparameterisrequiredandcannotbeNULL.

roi constROI* TheROIthatthefunctionperformsthisoperationon.PassNULLtousetheentireimageforthisoperation.

readOptions constReadTextOptions* Theoptionsyouusetoconfigurehowthefunctionreadstext.

processingOptions constOCRProcessingOptions* Theoptionsyouusetoconfigurehowthefunctionprocessesthecontentsoftheimagebeforeattemptingtoreadtext.

spacingOptions constOCRSpacingOptions* Thesizeandspacingconstraintsyoucanapplytocharactersintheimage.

Page 2337: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ReadTextReport* Onsuccess,thisfunctionreturnsareportthatcontainsinformationaboutthetextcontainedintheimage.Onfailure,thefunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyoufinishwiththecharacterinformation,callimaqDispose()todisposeofit.

Page 2338: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionreadOptions—SetreadOptionstoNULLtousethefollowingdefaultreadingoptions:

validChars NULLnumValidChars 0substitutionChar ?readStrategy IMAQ_READ_AGGRESSIVEacceptanceLevel 700aspectRatio 400readResolution IMAQ_LOW_RESOLUTION

processingOptions—SetprocessingOptionstoNULLtousethefollowingdefaultprocessingoptions:

mode IMAQ_COMPUTED_UNIFORMlowThreshold 0highThreshold 255blockCount 4fastThreshold FALSEbiModalCalculation FALSEdarkCharacters TRUEremoveObjectsTouchingROI FALSEerosionCount 0

spacingOptions—SetspacingOptionstoNULLtousethefollowingdefaultspacingoptions:

minCharSpacing 1minCharSize 20maxCharSize 65536maxHorizontalElementSpacing 1maxVerticalElementSpacing 0

Page 2339: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

minBoundingRectWidth 1maxBoundingRectWidth 65536minBoundingRectHeight 1maxBoundingRectHeight 65536autoSplit FALSE

Page 2340: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqReadText2UsageReadTextReport2*imaqReadText2(constImage*image,constCharSet*set,constROI*roi,constReadTextOptions*readOptions,constOCRProcessingOptions*processingOptions,constOCRSpacingOptions*spacingOptions);

Page 2341: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeReadsthetextfromtheimage.Thefunctionidentifiesallobjectsintheimagebasedontheattributesthatyouset,andthencompareseachobjectwitheverytrainedcharacter.Foreachobject,thefunctionselectsthecharacterthatmostcloselymatchestheobject.Thefunctionusesthesubstitutioncharacterforanyobjectthatdoesnotmatchanyofthetrainedcharacters.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqReadText3().

Page 2342: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 2343: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Thesourceimageforthisoperation.

set constCharSet* Thecharactersetthisfunctionoperateson.Tocreateacharacterset,useimaqCreateCharSet().ThisparameterisrequiredandcannotbeNULL.

roi constROI* TheROIthatthefunctionperformsthisoperationon.PassNULLtousetheentireimageforthisoperation.

readOptions constReadTextOptions* Theoptionsyouusetoconfigurehowthefunctionreadstext.

processingOptions constOCRProcessingOptions* Theoptionsyouusetoconfigurehowthefunctionprocessesthecontentsoftheimagebeforeattemptingtoreadtext.

spacingOptions constOCRSpacingOptions* Thesizeandspacingconstraintsyoucanapplytocharactersintheimage.

Page 2344: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ReadTextReport2* Onsuccess,thisfunctionreturnsareportthatcontainsinformationaboutthetextcontainedintheimage.Onfailure,thefunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyoufinishwiththereport,callimaqDispose()todisposeofit.

Page 2345: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionreadOptions—SetreadOptionstoNULLtousethefollowingdefaultreadingoptions:

validChars NULLnumValidChars 0substitutionChar ?readStrategy IMAQ_READ_AGGRESSIVEacceptanceLevel 700aspectRatio 400readResolution IMAQ_LOW_RESOLUTION

processingOptions—SetprocessingOptionstoNULLtousethefollowingdefaultprocessingoptions:

mode IMAQ_COMPUTED_UNIFORMlowThreshold 0highThreshold 255blockCount 4fastThreshold FALSEbiModalCalculation FALSEdarkCharacters TRUEremoveObjectsTouchingROI FALSEerosionCount 0

spacingOptions—SetspacingOptionstoNULLtousethefollowingdefaultspacingoptions:

minCharSpacing 1minCharSize 20maxCharSize 65536maxHorizontalElementSpacing 1maxVerticalElementSpacing 0

Page 2346: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

minBoundingRectWidth 1maxBoundingRectWidth 65536minBoundingRectHeight 1maxBoundingRectHeight 65536autoSplit FALSE

Page 2347: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqRotateUsageintimaqRotate(Image*dest,constImage*source,floatangle,PixelValuefill,InterpolationMethodmethod);

Page 2348: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRotatesanimagecounterclockwise.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqRotate2().

Page 2349: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB

Page 2350: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

dest Image* Thedestinationimage.source constImage* Theimagetorotate.angle float Theangle,indegrees,torotatetheimage.fill PixelValue Thevaluethefunctionappliestotheimage

pixelsnotcoveredbytherotatedimage.method InterpolationMethod Themethodofinterpolation.Thevalid

interpolationmethodsforrotationareIMAQ_ZERO_ORDERandIMAQ_BILINEAR.

Page 2351: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2352: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSavePatternUsageintimaqSavePattern(constImage*pattern,constchar*fileName);

Page 2353: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSavesapatternimagetodiskinPNGformat.Ifyoualterthecontentsofthisfile,NIVisionmaynotbeabletousethefileasapatternimage.

NoteIfyoualterthecontentsofthisfile,NIVisionmaynotbeabletousethefileasapatternimage.

NoteImagessavedwiththisfunctionloseanyadditionalvisioninformationotherthangrayscalepatternmatchinginformation.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqWriteVisionFile(),whichcansaveimagesthatcontainadditionalvisioninformationsuchasanoverlay.

Page 2354: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 2355: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

pattern constImage* Thepatternimagetosave.fileName constchar* Thenameinwhichthefunctionsavesthe

templateimage.

Page 2356: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2357: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSelectParticlesUsageParticleReport*imaqSelectParticles(constImage*image,constParticleReport*reports,intreportCount,intrejectBorder,constSelectParticleCriteria*criteria,intcriteriaCount,int*selectedCount);

Page 2358: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFiltersanarrayofparticlereportsbasedoncriteriaranges.CallimaqGetParticleInfo()beforecallingimaqSelectParticle().

NoteThisfunctionisobsolete.UseimaqCountParticles(),imaqParticleFilter2(),andimaqMeasureParticle()tomeasureparticlesthatfitacertaincriteria.

Page 2359: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8

Page 2360: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* TheimagefromwhichimaqGetParticleInfo()generatedtheparticlereports.

reports constParticleReport* ThearrayofreportsthatimaqGetParticleInfo()returned.Thefunctionmakesacopyofthereportsthatmatchthecriteria.

reportCount int Thenumberofreportsintheinputreportsarray.

rejectBorder int SetthisparametertoTRUEtofilteroutparticlestouchingtheborderoftheimage.SetthisparametertoFALSEtoprocessallparticles.

criteria constSelectParticleCriteria* Thearrayofcriteriaforthefilter.ThisparameterisrequiredandcannotbeNULL.

criteriaCount int Thenumberofcriteriainthecriteriaarray.

selectedCount int* Onreturn,thenumberofreportsthatmatchedthecriteria.SetthisparametertoNULLifyoudonotneedthisinformation.

Page 2361: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

ParticleReport* Onsuccess,thisfunctionreturnsanarrayoftheinputreportsthatmatchthefiltrationcriteria.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofitbycallingimaqDispose().

Page 2362: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetCalibrationInfoUsageintimaqSetCalibrationInfo(Image*image,CalibrationUnitunit,floatxDistance,floatyDistance);

Page 2363: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthephysicalcalibrationattributesofanimage.Thisfunctionisobsolete.ThereplacementfunctionisimaqSetSimpleCalibration(),whichincorporatesthefunctionalityofimaqSetCalibrationInfo()withthegridparameter.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqSetSimpleCalibration(),whichincorporatesthefunctionalityofimaqSetCalibrationInfo()withthegridparameter.

Page 2364: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL

Page 2365: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image Image* Theimagewhosecalibrationinformationthefunctionsets.

unit CalibrationUnit Theunitofmeasurethatthefunctionusestocalibratetheimage.

xDistance float Thedistanceinthexdirectionbetweentwoadjacentpixelsinunitsspecifiedbyunit.

yDistance float Thedistanceintheydirectionbetweentoadjacentpixelsinunitsspecifiedbyunit.

Page 2366: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2367: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSetWindowOverlayUsageintimaqSetWindowOverlay(intwindowNumber,constOverlay*overlay);

Page 2368: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsorremovestheoverlayfromawindow.Thisfunctionisobsolete.Overlaysarenowappliedtoimages,notwindows.SeetheOverlayfunctionsformoreinformation.

NoteThisfunctionisobsolete.Overlaysarenowappliedtoimages,ratherthanwindows.RefertotheOverlayfunctionstopicformoreinformation.

Page 2369: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.

overlay constOverlay* Theoverlay.SetthisparametertoNULLtoremoveanyexistingoverlayfromthegivenwindow.

Page 2370: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2371: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqSpokeUsageSpokeReport*imaqSpoke(constImage*image,constROI*roi,SpokeDirectiondirection,EdgeProcessprocess,constSpokeOptions*options);

Page 2372: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeFindsedgesalongradiallinesspecifiedinsideanannularregion.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqSpoke2().

Page 2373: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL

Page 2374: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimageinwhichtofindedges.roi constROI* Theannularregionthefunctionlooksin

fortheedges.ThefirstcontourofroiImustbeanannulus.

direction SpokeDirection Thedirectionthefunctionsearchforedgesalongthesearchlines.

process EdgeProcess Defineswhichedgesthefunctionlooksfor.

options constSpokeOptions* Describeshowtosearchfortheedges.

Page 2375: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

SpokeReport* Onsuccess,thisfunctionreturnsinformationdescribingthecalculatededgesandthespokeusedbythefunction.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDispose().

Page 2376: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:

threshold 40width 4steepness 2subsamplingRatio 5subpixelType IMAQ_QUADRATICsubpixelDivisions 1

Page 2377: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqTransformROIUsageintimaqTransformROI(ROI*roi,PointoriginStart,floatangleStart,PointoriginFinal,floatangleFinal);

Page 2378: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeRotatesandtranslatesaregionofinterest(ROI)fromonecoordinatesystemtoanothercoordinatesystemwithinanimage.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqTransformROI2().ThenewfunctionusesanewstructurecalledaCoordinateSystem.ACoordinateSystemaccountsforthedirectionofthey-axis,forwhichimaqTransformROI()doesnottakeintoaccount.Inaddition,aCoordinateSystemusesaPointFloattorepresenttheorigin,whichallowsforincreasedaccuracy.

Page 2379: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

roi ROI* TheROItotransform.originStart Point Theoriginofthestartingcoordinatesystem.angleStart float Theangle,indegrees,ofthex-axisofthestarting

coordinatesystemrelativetothex-axisoftheimage.originFinal Point Theoriginofthenewcoordinatesystem.angleFinal float Theangle,indegrees,ofthex-axisofthenew

coordinatesystemrelativetothex-axisoftheimage.

Page 2380: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2381: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqWritePNGFileUsageintimaqWritePNGFile(constImage*image,constchar*fileName,unsignedintcompressionSpeed,constRGBValue*colorTable);

Page 2382: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeWritesanimagetoaPNGfile.ThisfunctionstoresanytypeofCalibrationUnitinaformatthatNIVisioncanread.Thisfunctionalsoconvertscalibrationinformationintometers,whichanyPNGfilereadercaninterpret.

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqWritePNGFile2().ThenewfunctionusesanewparametercalleduseBitDepth,whichprovidescontroloverthemethodNIVisionusestoconvert16-bitimagesandunsigned64-bitRGBimagestoPNGfiles.

Page 2383: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB

Page 2384: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

image constImage* Theimagetowritetoafile.fileName constchar* Thenameofthefiletowrite.

ThisparameterisrequiredandcannotbeNULL.

compressionSpeed unsignedint Representstherelativespeedofthecompressionalgorithm.Asthisvalueincreases,thefunctionspendslesstimecompressingtheimage.Acceptablevaluesrangefrom0to1,000,with750asthedefault.PNGformatalwaysstoresimagesinalosslessfashion.

colorTable constRGBValue* Anoptionalcolortabletoassociatewith8-bitimages.Ifyouprovideacolortable,thetablemusthave256elements.SetthisparametertoNULLtowriteagrayscalepalettetotheimage.

Page 2385: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2386: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqZoomWindowUsageintimaqZoomWindow(intwindowNumber,intxZoom,intyZoom,Pointcenter);

Page 2387: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PurposeSetsthecurrentzoomfactorsforagivenimagewindow.Thezoomfactorindicatesanincreaseordecreaseinthemagnificationofanimage.Apositivenumberindicatesamagnificationbytheamountspecified.Forexample,azoomfactorof3indicatesthattheimageisdisplayedatthreetimesitsactualsize(3:1).Anegativenumberindicatesthattheimageisdecreasedinmagnificationbythespecifiedamount.Forexample,azoomfactorof–5indicatesthattheimageisdisplayedatone-fifthitsactualsize(1:5).

NoteThisfunctionisobsolete.ThereplacementfunctionisimaqZoomWindow2().

Page 2388: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParametersName Type Description

windowNumber int Thewindownumberoftheimagewindow.xZoom int Thezoomfactorforthexdirection.SetxZoom

tozerotomaintainthecurrentzoomfactorforthexdirection.

yZoom int Thezoomfactorfortheydirection.SetyZoomtozerotomaintainthecurrentzoomfactorfortheydirection.

center Point Thecenterpointaroundwhichtozoom.SetthisparametertoIMAQ_NO_POINTtomaintainthecurrentcenterpoint.

Page 2389: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReturnValueType Description

int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().

Page 2390: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PixelValueTheinformationnecessarytodescribeaparticulartypeofpixel.Elements

Name Type Description

grayscale float Agrayscalepixelvalue.UsethismemberforimagesoftypeIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,orIMAQ_IMAGE_SGL.

rgb RGBValue ARGBpixelvalue.UsethismemberforimagesoftypeIMAQ_IMAGE_RGB.

hsl HSLValue AHSLpixelvalue.UsethismemberforimagesoftypeIMAQ_IMAGE_HSL.

complex Complex Acomplexpixelvalue.UsethismemberforimagesoftypeIMAQ_IMAGE_COMPLEX.

rgbu64 RGBU64Value Anunsigned64-bitRGBpixelvalue.UsethismemberforimagesoftypeIMAQ_IMAGE_RGB_U64.

Page 2391: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

AnnulusDefinesthelocationandsizeofanannulus,asshowninthefollowingillustration.

Elements

Name Type Description

center Point Thecoordinatelocationofthecenteroftheannulus.

innerRadius int Theinternalradiusoftheannulus.outerRadius int Theexternalradiusoftheannulus.startAngle double Thestartangle,indegrees,oftheannulus.endAngle double Theendangle,indegrees,oftheannulus.

Page 2392: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PointDefinesthelocationofapoint.Elements

Name Type Description

x int Thex-coordinateofthepoint.y int They-coordinateofthepoint.

Page 2393: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

RectDefinesthelocationandsizeofarectangle.Elements

Name Type Description

top int Locationofthetopedgeoftherectangle.left int Locationoftheleftedgeoftherectangle.height int Heightoftherectangle.width int Widthoftherectangle.

Page 2394: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

RotatedRectDefinesthelocation,size,androtationofarotatedrectangle.Elements

Name Type Description

top int Locationofthetopedgeoftherectanglebeforerotation.left int Locationoftheleftedgeoftherectanglebeforerotation.height int Heightoftherectangle.width int Widthoftherectangle.angle double Therotation,indegrees,oftherectangle.

Page 2395: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ComplexPlaneDesignatesonwhichcomplexplanethefunctionshouldoperate.Elements

Name Value Description

IMAQ_REAL 0 Thefunctionoperatesontherealplaneofthecompleximage.

IMAQ_IMAGINARY 1 Thefunctionoperatesontheimaginaryplaneofthecompleximage.

IMAQ_MAGNITUDE 2 Thefunctionoperatesonthemagnitudeplaneofthecompleximage.

IMAQ_PHASE 3 Thefunctionoperatesonthephaseplaneofthecompleximage.

IMAQ_COMPLEX_PLANE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2396: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

AttenuateModeControlswhichfrequenciesafunctionattenuates.Elements

Name Value Description

IMAQ_ATTENUATE_LOW 0 Thefunctionattenuateslowfrequencies.

IMAQ_ATTENUATE_HIGH 1 Thefunctionattenuateshighfrequencies.

IMAQ_ATTENUATE_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2397: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ThresholdDataInformationaboutathresholdrange.Elements

Name Type Description

rangeMin float Thelowerboundaryoftherangetokeep.rangeMax float TheupperboundaryoftherangetokeepnewValue float IfuseNewValueisTRUE,newValueisthe

replacementvalueforpixelswithintherange.IfuseNewValueisFALSE,thefunctionignoresthisfield.

useNewValue int IfTRUE,thefunctionsetspixelvalueswithin[rangeMin,rangeMax]tothevaluespecifiedinnewValue.IfFALSE,thefunctionleavesthepixelvaluesunchanged.

Page 2398: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ThresholdMethodDefinesthemethodafunctionusesforbinarythresholding.Forinformationaboutautomaticthresholdingmethods,refertoChapter8,Thresholding,oftheNIVisionConceptsManual.Elements

Name Value Description

IMAQ_THRESH_CLUSTERING 0 Thefunctionusesamethodthatsortsthehistogramoftheimagewithinadiscretenumberofclassescorrespondingtothenumberofphasesperceivedinanimage.

IMAQ_THRESH_ENTROPY 1 Thefunctionusesamethodthatisbestfordetectingparticlesthatarepresentinminusculeproportionsontheimage.

IMAQ_THRESH_METRIC 2 Thefunctionusesamethodthatiswell-suitedforimagesinwhichclassesarenottoodisproportionate.

Page 2399: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_THRESH_MOMENTS 3 Thefunctionusesamethodthatissuitedforimagesthathavepoorcontrast.

IMAQ_THRESH_INTERCLASS 4 Thefunctionusesamethodthatiswell-suitedforimagesinwhichclasseshavewellseparatedpixelvaluedistributions.

IMAQ_THRESHOLD_METHOD_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2400: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

BCGOptionsTheparametersafunctionusestotransformanimage.Elements

Name Type Description

brightness float Adjuststhebrightnessoftheimage.Avalueof128leavesthebrightnessunchanged.Valuesbelow128darkentheimage,andvaluesabove128brightentheimage.

contrast float Adjuststhecontrastoftheimage.Avalueof45leavesthecontrastunchanged.Valuesbelow45decreasethecontrast,andvaluesabove45increasethecontrast.

gamma float Performsgammacorrection.Avalueof1.0leavestheimageunchanged.Valuesbelow1.0enhancecontrastfordarkerpixelattheexpenseofthebrighterpixels.Valuesabove1.0enhancecontrastforbrighterpixelsattheexpenseofdarkerpixels.

Page 2401: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PointFloatDefinesthelocationofapoint.Elements

Name Type Description

x float Thex-coordinateofthepoint.y float They-coordinateofthepoint.

Page 2402: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReferenceModeSpecifiesthemethodthatthefunctionusestocalculatethecoordinatesystem.Elements

Name Value Description

IMAQ_COORD_X_Y 0 Thismethodrequiresthreeelementsinthepointsarray.Thefirsttwopointsareonthex-axisofthecoordinatesystem,andthethirdpointisonthey-axis.

IMAQ_COORD_ORIGIN_X 1 Thismethodrequirestwoelementsinthepointsarray.Thefirstpointistheoriginofthecoordinatesystem,andthesecondpointisonthex-axis.

IMAQ_REFERENCE_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2403: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

AxisOrientationThedirectionofthey-axisofacoordinatesystem,asshowninthefollowingillustration.

Elements

Name Value Description

IMAQ_DIRECT 0 They-axisdirectioncorrespondstothey-axisdirectionoftheCartesiancoordinatesystem.

IMAQ_INDIRECT 1 They-axisdirectioncorrespondstothey-axisdirectionofanimage.

IMAQ_AXIS_ORIENTATION_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2404: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CoordinateSystemDefinesasetofcoordinateaxes.Elements

Name Type Description

origin PointFloat Theoriginofthecoordinatesystem.angle float Theangle,indegrees,ofthex-axisof

thecoordinatesystemrelativetotheimagex-axis.

axisOrientation AxisOrientation Thedirectionofthey-axisofthecoordinatereferencesystem.

Page 2405: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParticleReportInformationaboutaparticleinanimage.Elements

Name Type Description

area int Thenumberofpixelsintheparticle.calibratedArea float Thesizeoftheparticle,calibratedtothe

calibrationinformationoftheimage.perimeter float Thelengthoftheperimeter,calibratedtothe

calibrationinformationoftheimage.numHoles int Thenumberofholesintheparticle.areaOfHoles int Thetotalsurfacearea,inpixels,ofallthe

holesinaparticle.perimeterOfHoles float Thelengthoftheperimeterofalltheholesin

theparticlecalibratedtothecalibrationinformationoftheimage.

boundingBox Rect Thesmallestrectanglethatenclosestheparticle.

sigmaX float Thesumoftheparticlepixelsonthex-axis.sigmaY float Thesumoftheparticlepixelsonthey-axis.sigmaXX float Thesumoftheparticlepixelsonthex-axis,

squared.sigmaYY float Thesumoftheparticlepixelsonthey-axis,

squared.sigmaXY float Thesumoftheparticlepixelsonthex-axis

andy-axis.longestLength int Thelengthofthelongesthorizontalline

segment.longestPoint Point Thelocationoftheleftmostpixelofthe

longestsegmentintheparticle.projectionX int Thelengthoftheparticlewhenprojectedonto

Page 2406: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

thex-axis.projectionY int Thelengthoftheparticlewhenprojectedonto

they-axis.connect8 int ThiselementisTRUEifthefunctionused

connectivity-8todetermineifparticlesaretouching.ThiselementisFALSEifthefunctionusedconnectivity-4todetermineifparticlesaretouching.

Page 2407: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

MeasurementValueThemorphologicalmeasurementthatafunctionusesforfiltering.Elements

Name Value Description

IMAQ_AREA 0 Surfaceareaoftheparticleinpixels.

IMAQ_AREA_CALIBRATED 1 Surfaceareaoftheparticleincalibratedunits.

IMAQ_NUM_HOLES 2 Numberofholesintheparticle.

IMAQ_AREA_OF_HOLES 3 Surfaceareaoftheholesincalibratedunits.

IMAQ_TOTAL_AREA 4 Totalsurfacearea(holesandparticle)incalibratedunits.

IMAQ_IMAGE_AREA 5 Surfaceareaoftheentireimageincalibratedunits.

IMAQ_PARTICLE_TO_IMAGE 6 Ratio,expressedasapercentage,ofthesurfaceareaofaparticleinrelationtothetotalareaoftheparticle.

IMAQ_PARTICLE_TO_TOTAL 7 Ratio,expressedasapercentage,ofthesurfaceareaofaparticleinrelationtothetotalareaoftheparticle.

IMAQ_CENTER_MASS_X 8 X-coordinateofthe

Page 2408: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

centerofmass.IMAQ_CENTER_MASS_Y 9 Y-coordinateofthe

centerofmass.IMAQ_LEFT_COLUMN 10 Leftedgeofthe

boundingrectangle.

IMAQ_TOP_ROW 11 Topedgeoftheboundingrectangle.

IMAQ_RIGHT_COLUMN 12 Rightedgeoftheboundingrectangle.

IMAQ_BOTTOM_ROW 13 Bottomedgeofboundingrectangle.

IMAQ_WIDTH 14 Widthofboundingrectangleincalibratedunits.

IMAQ_HEIGHT 15 Heightofboundingrectangleincalibratedunits.

IMAQ_MAX_SEGMENT_LENGTH 16 Lengthoflongesthorizontallinesegment.

IMAQ_MAX_SEGMENT_LEFT_COLUMN 17 Leftmostx-coordinateoflongesthorizontallinesegment.

IMAQ_MAX_SEGMENT_TOP_ROW 18 Y-coordinateoflongesthorizontallinesegment.

IMAQ_PERIMETER 19 Outerperimeteroftheparticle.

IMAQ_PERIMETER_OF_HOLES 20 Perimeterofall

Page 2409: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

holeswithintheparticle.

IMAQ_SIGMA_X 21 Sumoftheparticlepixelsonthex-axis.

IMAQ_SIGMA_Y 22 Sumoftheparticlepixelsonthey-axis.

IMAQ_SIGMA_XX 23 Sumoftheparticlepixelsonthex-axissquared.

IMAQ_SIGMA_YY 24 Sumoftheparticlepixelsonthey-axissquared.

IMAQ_SIGMA_XY 25 Sumoftheparticlepixelsonthex-axisandy-axis.

IMAQ_PROJ_X 26 ProjectioncorrectedinX.

IMAQ_PROJ_Y 27 ProjectioncorrectedinY.

IMAQ_INERTIA_XX 28 InertiamatrixcoefficientinXX.

IMAQ_INERTIA_YY 29 InertiamatrixcoefficientinYY.

IMAQ_INERTIA_XY 30 InertiamatrixcoefficientinXY.

IMAQ_MEAN_H 31 Meanlengthofhorizontalsegments.

IMAQ_MEAN_V 32 Meanlengthofverticalsegments.

IMAQ_MAX_INTERCEPT 33 Lengthoflongestsegmentofthe

Page 2410: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

convexhull.IMAQ_MEAN_INTERCEPT 34 Meanlengthofthe

chordsinanobjectperpendiculartoitsmaxintercept.

IMAQ_ORIENTATION 35 Theorientationbasedontheinertiaofthepixelsintheparticle.Formoreinformation,seeChapter10,ParticleMeasurementstheNIVisionConceptsManual

IMAQ_EQUIV_ELLIPSE_MINOR 36 Totallengthoftheaxisoftheellipsehavingthesameareaastheparticleandamajoraxisequaltohalfthemaxintercept.

IMAQ_ELLIPSE_MAJOR 37 Totallengthofmajoraxishavingthesameareaandperimeterastheparticleincalibratedunits.

IMAQ_ELLIPSE_MINOR 38 Totallengthofminoraxishavingthesameareaandperimeterastheparticleincalibratedunits.

IMAQ_ELLIPSE_RATIO 39 Fractionofmajoraxistominoraxis.

Page 2411: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_RECT_LONG_SIDE 40 Lengthofthelongsideofarectanglehavingthesameareaandperimeterastheparticleincalibratedunits.

IMAQ_RECT_SHORT_SIDE 41 Lengthoftheshortsideofarectanglehavingthesameareaandperimeterastheparticleincalibratedunits.

IMAQ_RECT_RATIO 42 Ratioofrectanglelongsidetorectangleshortside.

IMAQ_ELONGATION 43 Maxintercept/meanperpendicularintercept.

IMAQ_COMPACTNESS 44 Particlearea/(height×width).

IMAQ_HEYWOOD 45 Particleperimeter/perimeterofthecirclehavingthesameareaastheparticle.

IMAQ_TYPE_FACTOR 46 Acomplexfactorrelatingthesurfaceareatothemomentofinertia.

IMAQ_HYDRAULIC 47 Particlearea/particleperimeter.

IMAQ_WADDLE_DISK 48 Diameterofthe

Page 2412: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

diskhavingthesameareaastheparticleinuserunits.

IMAQ_DIAGONAL 49 Diagonalofanequivalentrectangleinuserunits.

IMAQ_MEASUREMENT_VALUE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2413: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CaliperReportInformationaboutapairofedges.Elements

Name Type Description

edge1Contrast float Thecontrastofthefirstedge.edge1Coord PointFloat Thecoordinatesofthefirstedge.edge2Contrast float Thecontrastofthesecondedge.edge2Coord PointFloat Thecoordinatesofthesecondedge.separation float Thedistancebetweenthetwoedges.reserved float Thiselementisreserved.

Page 2414: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

EdgeOptionsDescribeshowyouwantthefunctiontofindedges.Elements

Name Type Description

threshold unsigned Specifiesthethresholdvalueforthecontrastoftheedge.Thefunctionidentifiesonlyedgeswithacontrastgreaterthanthisvalueinthedetectionprocess.

width unsigned Thenumberofpixelsthatthefunctionaveragestofindthecontrastateithersideoftheedge.

steepness unsigned Thespan,inpixels,oftheslopeoftheedgeprojectedalongthepathspecifiedbytheinputpoints.

subpixelType InterpolationMethod Themethodforinterpolating.ValidoptionsincludeIMAQ_QUADRATICandIMAQ_CUBIC_SPLINE.

subpixelDivisions unsigned Thenumberofsamplesthefunctionobtainsfromapixel.Forexample,setsubpixelDivisionsto4tospliteachpixelintofoursubpixels.Themaximumnumberofsubpixeldivisionsis12.

Page 2415: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CaliperOptionsDescribeshowyouwantthefunctiontochooseedgepairs.Elements

Name Type Description

polarity TwoEdgePolarityType Specifiestheedgepolarityoftheedgepairs.

separation float Thedistancebetweenedgepairs.IftheedgepairhasaseparationgreaterthanthisvalueplusorminustheseparationDeviation,thefunctionignorestheedgepair.Setthisparameterto0tofindalledgepairs.

separationDeviation float Setstherangearoundtheseparationvalue.Ifyousetseparationto0,thefunctionignoresseparationDeviation.

Page 2416: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CannyOptionsAdescriptionoffilterparameterstouseinthealgorithm.Elements

Name Type Description

sigma float ThesigmaoftheGaussiansmoothingfilterthatthefunctionappliestotheimagebeforeedgedetection.

upperThreshold float Theupperfractionofpixelvaluesintheimagefromwhichthefunctionchoosesaseedorstartingpointofanedgesegment.Thisvaluemustbebetween0and1.

lowerThreshold float ThefunctionmultipliesthisvaluebyupperThresholdtodeterminethelowerthresholdforallthepixelsinanedgesegment.

windowSize int ThewindowsizeoftheGaussianfilterthatthefunctionappliestotheimage.Thisvaluemustbeodd.

Page 2417: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageTypeDefinesthetypeofanimage.Elements

Name Value Description

IMAQ_IMAGE_U8 0 Theimagetypeis8-bitunsignedintegergrayscale.

IMAQ_IMAGE_U16 7 Theimagetypeis16-bitunsignedintegergrayscale.

IMAQ_IMAGE_I16 1 Theimagetypeis16-bitsignedintegergrayscale.

IMAQ_IMAGE_SGL 2 Theimagetypeis32-bitfloating-pointgrayscale.

IMAQ_IMAGE_COMPLEX 3 Theimagetypeiscomplex.

IMAQ_IMAGE_RGB 4 TheimagetypeisRGBcolor.

IMAQ_IMAGE_HSL 5 TheimagetypeisHSLcolor.

IMAQ_IMAGE_RGB_U64 6 Theimagetypeis64-bitunsignedRGBcolor.

IMAQ_IMAGE_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2418: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Color2Theinformationnecessarytodescribeacolorinaparticularcolorspace.Elements

Name Type Description

rgb RGBValue TheinformationneededtodescribeacolorintheRGB(Red,Green,andBlue)colorspace.

hsl HSLValue TheinformationneededtodescribeacolorintheHSL(Hue,Saturation,andLuminance)colorspace.

hsv HSVValue TheinformationneededtodescribeacolorintheHSI(Hue,Saturation,andValue)colorspace.

hsi HSIValue TheinformationneededtodescribeacolorintheHSI(Hue,Saturation,andIntensity)colorspace.

cieLab CIELabValue TheinformationneededtodescribeacolorintheCIEL*a*b*(L,a,b)colorspace.

cieXYZ CIEXYZValue TheinformationneededtodescribeacolorintheCIEXYZ(X,Y,Z)colorspace.

rawValue int Theintegervalueforthedatainthecolorunion.ThisvalueisnotvalidfortheCIEL*a*b*andCIEXYZcolorspaces.

Page 2419: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ColorModeDesignatesinwhichcolorspacethefunctionshouldoperate.Formoreinformationaboutcolorspaces,refertotheNIVisionConceptsManual.Elements

Name Value Description

IMAQ_RGB 0 ThefunctionoperatesintheRGB(Red,Blue,Green)colorspace.

IMAQ_HSL 1 ThefunctionoperatesintheHSL(Hue,Saturation,Luminance)colorspace.

IMAQ_HSV 2 ThefunctionoperatesintheHSV(Hue,Saturation,Value)colorspace.

IMAQ_HSI 3 ThefunctionoperatesintheHSI(Hue,Saturation,Intensity)colorspace.

IMAQ_CIE 4 ThefunctionoperatesintheCIEL*a*b*colorspace.

IMAQ_CIEXYZ 5 ThefunctionoperatesintheCIEXYZcolor

Page 2420: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

space.IMAQ_COLOR_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2421: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CIEXYZValueTheinformationneededtodescribeacolorintheCIEXYZcolorspace.Elements

Name Type Description

Z double TheZcolorinformation.Y double Thecolorluminance.X double TheXcolorinformation.alpha unsigned

charThealphavalueofthecolor,whichrepresentsextrainformationaboutacolorimage,suchasgammacorrection.

Page 2422: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

RakeDirectionThedirectionthefunctionfollowstosearchforedgesalongthesearchlines.Elements

Name Value Description

IMAQ_LEFT_TO_RIGHT 0 Thefunctionsearchesfromtheleftsideofthesearchareatotherightsideofthesearcharea.

IMAQ_RIGHT_TO_LEFT 1 Thefunctionsearchesfromtherightsideofthesearchareatotheleftsideofthesearcharea.

IMAQ_TOP_TO_BOTTOM 2 Thefunctionsearchesfromthetopsideofthesearchareatothebottomsideofthesearcharea.

IMAQ_BOTTOM_TO_TOP 3 Thefunctionsearchesfromthebottomsideofthesearchareatothetopsideof

Page 2423: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

thesearcharea.

IMAQ_RAKE_DIRECTION_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2424: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FindEdgeOptionsDescribeshowyouwantthefunctiontosearchforedgesandtheinformationthefunctionoverlaystotheimage.Elements

Name Type Description

threshold int Specifiesthethresholdforthecontrastofanedge.Duringthedetectionprocess,thefunctionidentifiesonlyedgeswithacontrastgreaterthanthisvalue.Contrastisdefinedasthedifferencebetweentheaveragepixelintensitybeforeanedgeandtheaveragepixelintensityafteranedge.

width int Thenumberofpixelsthatthefunctionaveragestofindthecontrastateithersideoftheedge.

steepness int Thespan,inpixels,oftheslopeoftheedgeprojectedalongthepathspecifiedbytheinputpoints.

subsamplingRatio double Thenumberofpixelsthatseparatestwoconsecutivesearchlines.

showSearchArea int IfTRUE,thefunctionoverlaysthesearchareaontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

showSearchLines int IfTRUE,thefunctionoverlaysthesearchlinesusedtolocatetheedgesontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

showEdgesFound int IfTRUE,thefunctionoverlaysthelocationsoftheedgesfoundontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

showResult int IfTRUE,thefunctionoverlaysthehitlinesto

Page 2425: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

theobjectandtheedgeusedtogeneratethehitlineontheresultimage.Whenapplicable,thefunctionalsooverlaysthelocationofanymeasurementsmadebythefunction.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

Page 2426: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CoordinateTransform2SpecifieshowtotransformpixelcoordinatesbasedonthedifferencebetweenthereferencecoordinatesystemandthemeasurementcoordinatesystemElements

Name Type Description

referenceSystem CoordinateSystem Definesthecoordinatesystemforinputcoordinates.

measurementSystem CoordinateSystem Definesthecoordinatesysteminwhichthefunctionshouldperformmeasurements.

Page 2427: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ClassifierReportAreportoftheresultsofclassification.Elements

Name Type Description

bestClassName char* Thenameofthebestclassforthesample.

classificationScore float Thesimilarityofthesampleandthetwoclosestclassesintheclassifier.

identificationScore float Thesimilarityofthesampleandtheassignedclass.

allScores ClassScore* Allclassesandtheirscores.allScoresSize int ThenumberofentriesinallScores.

Page 2428: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

RGBValueTheinformationneededtodescribeacolorintheRGB(Red,Green,andBlue)colorspace.ThereareseveralRGBconstantsalreadydefinedinNIVision.h,asfollows:

Name ValueIMAQ_RGB_TRANSPARENT {0,0,0,1}IMAQ_RGB_BLACK {0,0,0,0}IMAQ_RGB_WHITE {255,255,255,0}IMAQ_RGB_RED {0,0,255,0}IMAQ_RGB_BLUE {255,0,0,0}IMAQ_RGB_GREEN {0,255,0,0}IMAQ_RGB_YELLOW {0,255,255,0}

ThereareadditionalconstantsyoucanusetoinitializeanRGBValuestructureatdeclaration:

Name ValueIMAQ_INIT_RGB_TRANSPARENT {0,0,0,1}IMAQ_INIT_RGB_BLACK {0,0,0,0}IMAQ_INIT_RGB_WHITE {255,255,255,0}IMAQ_INIT_RGB_RED {0,0,255,0}IMAQ_INIT_RGB_BLUE {255,0,0,0}IMAQ_INIT_RGB_GREEN {0,255,0,0}IMAQ_INIT_RGB_YELLOW {0,255,255,0}

Elements

Name Type Description

B unsignedchar

Thebluevalueofthecolor.

G unsignedchar

Thegreenvalueofthecolor.

Page 2429: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

R unsignedchar

Theredvalueofthecolor.

alpha unsignedchar

Thealphavalueofthecolor,whichrepresentsextrainformationaboutacolorimage,suchasgammacorrection.

Page 2430: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ColorHistogramReportAreportdescribingtheclassificationofeachplaneofacolorimage.ThedataofeachplanedependsontheColorModethefunctionusedtogeneratethereport,asfollows:

IMAQ_RGB—plane1istheredplane,plane2isthegreenplane,plane3istheblueplane.IMAQ_HSL—plane1isthehueplane,plane2isthesaturationplane,plane3istheluminanceplane.IMAQ_HSV—plane1isthehueplane,plane2isthesaturationplane,plane3isthevalueplane.IMAQ_HSI—plane1isthehueplane,plane2isthesaturationplane,plane3istheintensityplane.IMAQ_CIE—plane1istheluminanceplane,plane2isthered/greenplane,plane3istheyellow/blueplane.IMAQ_CIEXYZ—plane1istheXcolorplane,plane2istheYcolorplane,plane3istheZcolorplane.

NoteColorHistogramReportcantakeintheCIEL*a*b*andCIEXYZcolorplaneswhenyouareusingimaqColorHistogram2.

Elements

Name Type Description

plane1 HistogramReport Thehistogramreportofthefirstcolorplane.plane2 HistogramReport Thehistogramreportofthesecondplane.plane3 HistogramReport Thehistogramreportofthethirdplane.

Page 2431: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

RangeDescribesarangeofdesiredvalues.Elements

Name Type Description

minValue int Theminimumvalueoftherange.maxValue int Themaximumvalueoftherange.

Page 2432: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ComparisonFunctionThemethodinwhichthefunctioncomparesimages.Elements

Name Value Description

IMAQ_CLEAR_LESS 0 Thecomparisonistrueifthesourcepixelvalueislessthanthecomparisonimagepixelvalue.

IMAQ_CLEAR_LESS_OR_EQUAL 1 Thecomparisonistrueifthesourcepixelvalueislessthanorequaltothecomparisonimagepixelvalue.

IMAQ_CLEAR_EQUAL 2 Thecomparisonistrueifthesourcepixelvalueisequaltothecomparisonimagepixelvalue.

IMAQ_CLEAR_GREATER_OR_EQUAL 3 Thecomparison

Page 2433: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

istrueifthesourcepixelvalueisgreaterthanorequaltothecomparisonimagepixelvalue.

IMAQ_CLEAR_GREATER 4 Thecomparisonistrueifthesourcepixelvalueisgreaterthanthecomparisonimagepixelvalue.

IMAQ_COMPARE_FUNCTION_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2434: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

InspectionAlignmentThelocationofthegoldentemplateinthetargetimage.Elements

Name Type Description

position PointFloat Thelocationofthecenterofthegoldentemplateintheimageunderinspection.

rotation float Therotationofthegoldentemplateintheimageunderinspection,indegrees.

scale float Thepercentageofthesizeoftheareaunderinspectioncomparedtothesizeofthegoldentemplate.

Page 2435: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

InspectionOptionsElements

Name Type Description

registrationMethod RegistrationMethod Specifieshowthefunctionregistersthegoldentemplateandthetargetimage.

normalizationMethod NormalizationMethod Specifieshowthefunctionnormalizesthegoldentemplatetothetargetimage.

edgeThicknessToIgnore int Specifiesdesiredthicknessofedgestobeignored.Avalueof0specifiesthatthealgorithmwillnotignoreedges.

brightThreshold float Specifiesthethresholdforareaswherethetargetimageisbrighterthanthegoldentemplate.

darkThreshold float Specifiesthethresholdforareaswherethetargetimageisdarkerthanthegoldentemplate.

binary int Specifieswhetherthefunctionshouldreturnabinaryimagegivingthelocationofdefects,oragrayscaleimagegivingtheintensityofdefects.

Page 2436: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ConcentricRakeReport2Informationdescribingtheconcentricrakeusedbythefunctionandtheedgesthefunctioncalculatedwiththeconcentricrake.Elements

Name Type Description

firstEdges EdgeInfo* ThefirstedgepointdetectedalongeachsearchlineintheROI.

numFirstEdges unsignedint ThenumberofpointsinthefirstEdgesarray.

lastEdges EdgeInfo* ThelastedgepointdetectedalongeachsearchlineintheROI.

numLastEdges unsignedint ThenumberofpointsinthelastEdgesarray.

searchArcs SearchArcInfo* Containsthearcsusedforedgedetectionandtheedgeinformationforeacharc.

numSearchArcs unsignedint ThenumberofarcsinthesearchArcsarray.

Page 2437: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ConcentricRakeDirectionThedirectioninwhichthefunctionsearchesforedgesalongthesearchlines.Elements

Name Value Description

IMAQ_COUNTER_CLOCKWISE 0 Thefunctionsearchesthesearchareainacounter-clockwisedirection.

IMAQ_CLOCKWISE 1 Thefunctionsearchesthesearchareainaclockwisedirection.

IMAQ_CONCENTRIC_RAKE_DIRECTION_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2438: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

EdgeProcessDefinestheedgesforwhichthefunctionlooks.Elements

Name Value Description

IMAQ_FIRST 0 Thefunctionlooksforthefirstedge.

IMAQ_FIRST_AND_LAST 1 Thefunctionlooksforthefirstandlastedge.

IMAQ_ALL 2 Thefunctionlooksforalledges.

IMAQ_BEST 3 Thefunctionlooksforthebestedge.

IMAQ_EDGE_PROCESS_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2439: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

EdgeOptions2Describeshowyouwantthefunctiontofindedges.Elements

Name Type Description

polarity EdgePolaritySearchMode Specifiesthepolarityoftheedgestobefound.

kernelSize int Specifiesthesizeoftheedgedetectionkernel.

width int SpecifiesthenumberofpixelsaveragedperpendiculartothesearchdirectiontocomputetheedgeprofilestrengthateachpointalongthesearchROI.

minThreshold float Specifiestheminimumedgestrength(gradientmagnitude)requiredforadetectededge.

interpolationType InterpolationMethod Specifiestheinterpolationmethodusedtolocatetheedgeposition.

columnProcessingMode ColumnProcessingMode Specifiesthemethodusedtofindthestraightedge.

Page 2440: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ToolTheavailabletoolsforcreatingaregionofinterest(ROI)inawindow.Elements

Name Value Description

IMAQ_NO_TOOL 0xFFFFFFFF ReservedIMAQ_SELECTION_TOOL 0 Theselectiontool

selectsanexistingROIinanimage.

IMAQ_POINT_TOOL 1 Thepointtooldrawsapointontheimage.

IMAQ_LINE_TOOL 2 Thelinetooldrawsalineontheimage.

IMAQ_RECTANGLE_TOOL 3 Therectangletooldrawsarectangleontheimage.

IMAQ_OVAL_TOOL 4 Theovaltooldrawsanovalontheimage.

IMAQ_POLYGON_TOOL 5 Thepolygontooldrawsapolygonontheimage.

IMAQ_CLOSED_FREEHAND_TOOL 6 Theclosedfreehandtooldrawsclosedfreehandshapesontheimage.

IMAQ_ANNULUS_TOOL 7 Theannulustooldrawsannulusesontheimage.

IMAQ_ZOOM_TOOL 8 Thezoomtoolcontrolsthezoomofanimage.

Page 2441: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_PAN_TOOL 9 Thepantoolshiftstheviewoftheimage.

IMAQ_POLYLINE_TOOL 10 Thepolylinetooldrawsaseriesofconnectedstraightlinesontheimage.

IMAQ_FREEHAND_TOOL 11 Thefreehandtooldrawsfreehandlinesontheimage.

IMAQ_ROTATED_RECT_TOOL 12 Therotatedrectangletooldrawsrotatedrectanglesontheimage.

IMAQ_TOOL_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2442: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ToolWindowOptionsDeterminestheavailabilityofthewindowtools.Elements

Name Type Description

showSelectionTool int IfTRUE,theselectiontoolbecomesvisible.TheselectiontoolselectsanexistingROIinanimage.

showZoomTool int IfTRUE,thezoomtoolbecomesvisible.Thezoomtoolcontrolsthemagnificationofanimage.

showPointTool int IfTRUE,thepointtoolbecomesvisible.Thepointtooldrawsapointontheimage.

showLineTool int IfTRUE,thelinetoolbecomesvisible.Thelinetooldrawsalineontheimage.

showRectangleTool int IfTRUE,therectangletoolbecomesvisible.Therectangletooldrawsarectangleontheimage.

showOvalTool int IfTRUE,theovaltoolbecomesvisible.Theovaltooldrawsanovalontheimage.

showPolygonTool int IfTRUE,thepolygontoolbecomesvisible.Thepolygontooldrawsapolygonontheimage.

showClosedFreehandTool int IfTRUE,theclosedfreehandtoolbecomesvisible.Theclosedfreehandtooldrawsclosedfreehandshapesontheimage.

showPolyLineTool int IfTRUE,thepolylinetoolbecomesvisible.Thepolylinetooldrawsaseriesofconnectedstraightlines

Page 2443: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ontheimage.showFreehandTool int IfTRUE,thefreehandtool

becomesvisible.Thefreehandtooldrawsfreehandlinesontheimage.

showAnnulusTool int IfTRUE,theannulusbecomesvisible.Theannulustooldrawsannulusesontheimage.

showRotatedRectangleTool int IfTRUE,therotatedrectangletoolbecomesvisible.Therotatedrectangletooldrawsrotatedrectanglesontheimage.

showPanTool int IfTRUE,thepantoolbecomesvisible.Thepantoolshiftstheviewoftheimage.

reserved1 int ThiselementisreservedandshouldbesettoFALSE.

reserved2 int ThiselementisreservedandshouldbesettoFALSE.

reserved3 int ThiselementisreservedandshouldbesettoFALSE.

reserved4 int ThiselementisreservedandshouldbesettoFALSE.

Page 2444: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ConstructROIOptions2DescribeshowafunctionpresentstheROIconstructorwindow.Elements

Name Type Description

windowNumber int Thewindownumberoftheimagewindow.Thefunctiondisplaystheimageinthespecifiedwindowandtemporarilysetsthewindowtomodalmode.WhentheuserclicksOKorCancel,theattributesofthewindowresettotheirinitialvalues.SetthisparametertoIMAQ_MODAL_DIALOGtodisplayamodaldialogwindowcenteredinthescreen.

windowTitle constchar* Specifiesthemessagestringthatthefunctiondisplaysinthetitlebarofthewindow.Usethiselementtoprovidetheuserwithinstructionsdescribingtheobjecttoselect.

type PaletteType Thepalettetypetouse.palette RGBValue* IftypeisIMAQ_PALETTE_USER,this

arrayisthepaletteofcolorstousewiththewindow.IftypeisnotIMAQ_PALETTE_USER,thefunctionignoresthiselement,andyoumaysetittoNULL.Themaximumnumberofcolorsinapaletteis256.palette[n]mapstopixelvaluen.Iftherearefewerthan256elementsinpalette,thefunctionmapsallpixelvaluespastthelastelementinpalettetotheassociatedgrayscalevalue.

numColors int IftypeisIMAQ_PALETTE_USER,thiselementisthenumberofcolorsinthepalettearray.IftypeisnotIMAQ_PALETTE_USER,thefunction

Page 2445: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ignoresthiselement.maxContours unsigned

intThemaximumnumberofcontourstheuserwillbeabletoselect.

Page 2446: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

RoundingModeSpecifiesthetypesofroundingmodesforimagepixeldivision.Elements

Name Value Description

IMAQ_ROUNDING_MODE_OPTIMIZE 0 Roundstheresultofadivisionusingthebestavailablemethod.

IMAQ_ROUNDING_MODE_TRUNCATE 1 Truncatestheresultofadivision.

IMAQ_ROUNDING_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2447: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

InterpolationMethodDefinestheinterpolationmethodusedbyafunction.Elements

Name Value Description

IMAQ_ZERO_ORDER 0 Thefunctionusesaninterpolationmethodthatinterpolatesnewpixelvaluesusingthenearestvalidneighboringpixel.

IMAQ_BILINEAR 1 Thefunctionusesaninterpolationmethodthatinterpolatesnewpixelvaluesusingabidirectionalaverageoftheneighboringpixels.

IMAQ_QUADRATIC 2 Thefunctionusesaninterpolationmethodthatinterpolatesnewpixelvaluesusingaquadratic

Page 2448: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

approximatingpolynomial.

IMAQ_CUBIC_SPLINE 3 Thefunctionusesaninterpolationmethodthatinterpolatesnewpixelvaluesbyfittingthemtoacubicsplinecurve,wherethecurveisbasedonknownpixelvaluesfromtheimage.

IMAQ_BILINEAR_FIXED 4 Thefunctionusesaninterpolationmethodthatinterpolatesnewpixelvaluesusingabidirectionalaverageoftheneighboringpixels.Thefunctionmakestheaveragingcalculationsusingfixed-pointmathematics,whichincreasesthe

Page 2449: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

performanceoftheinterpolationbutreducestheaccuracy.

IMAQ_INTERPOLATION_METHOD_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2450: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ObjectReportAreportdescribingthelocation,size,andfeaturesofabinaryobject.Elements

Name Type Description

center PointFloat Specifiesthelocationofthecenterofmassofthebinaryobject.

boundingRect Rect Specifiesthelocationoftheboundingrectangleofthebinaryobject.

area float Specifiestheareaofthebinaryobject.orientation float Specifiestheorientationofthelongest

segmentinthebinaryobject.aspectRatio float Specifiestheratiobetweenthewidthandthe

heightofthebinaryobject.numHoles int Specifiesthenumberofholesinthebinary

object.

Page 2451: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CountObjectsOptionsDefinestheparametersofthealgorithmthefunctionusestolocatetheobjectsandtheinformationthefunctionoverlaystotheimage.Elements

Name Type Description

type ObjectType Specifiesthetypesofobjectsthefunctiondetects.

threshold float Specifiesthegrayscaleintensitythatisusedasthresholdlevel.WhentypeisIMAQ_BRIGHT_OBJECTS,thresholdindicatesthelowestpixelvaluethatdefinesabrightobject.WhentypeisIMAQ_DARK_OBJECTS,thresholdindicatesthehighestpixelvaluethatdefinesadarkobject.

rejectBorder int IfTRUE,thefunctionignoresobjectstouchingtheboarderofthesearcharea.Ifyoudonotwantthefunctiontoignoreborderobjects,setthiselementtoFALSE.

fillHoles int IfTRUE,thefunctionfillstheholesintheobjects.Ifyoudonotwantthefunctiontofilltheholesinobjects,setthiselementtoFALSE.

useMinSize int IfTRUE,thefunctionignoresobjectsthesamesizeorsmallerthanminSize.Ifyoudonotwantthefunctiontoignoresmallobjects,setthiselementtoFALSE.

minSize int ThefunctionignoresobjectsthissizeandsmallerwhenuseMinSizeisTRUE.

useMaxSize int IfTRUE,thefunctionignoresobjects

Page 2452: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

thesamesizeorlargerthanmaxSize.Ifyoudonotwantthefunctiontoignorelargeobjects,setthiselementtoFALSE.

maxSize int ThefunctionignoresobjectsthissizeandlargerwhenuseMaxSizeisTRUE.

showSearchArea int IfTRUE,thefunctionoverlaysthesearchareaontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

showObjectCenter int IfTRUE,thefunctionoverlaysthelocationofthecenterofmassoftheobjectsontheresultimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

showBoundingBox int IfTRUE,thefunctionoverlaystheboundingboxesoftheobjectsontheresultimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

Page 2453: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ClassifierTypeThetypeofaclassifiersession.Elements

Name Value Description

IMAQ_CLASSIFIER_CUSTOM 0 Theclassifiersessionclassifiesvectorsofdoubles.

IMAQ_CLASSIFIER_PARTICLE 1 Theclassifiersessionclassifiesparticlesinbinaryimages.

IMAQ_CLASSIFIER_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2454: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CircleMatchInformationdescribingamatchedcircle.Elements

Name Type Description

position PointFloat Thelocationofthecenterofthematchedcircle.radius double Theradiusofthematchedcircle.score double Thescoreofthematchedcircle.

Page 2455: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CircleDescriptorDescribesthecirclesthefunctionsearchesfor.Elements

Name Type Description

minRadius double Specifiestheminimumradiusofacirclethefunctionwillreturn.

maxRadius double Specifiesthemaximumradiusofacirclethefunctionwillreturn.

Page 2456: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CurveOptionsDescribeshowafunctionidentifiescurvesinanimage.Elements

Name Type Description

extractionMode ExtractionMode Specifiesthemethodthefunctionusestoidentifycurvesintheimage.

threshold int Specifiestheminimumcontrastaseedpointmusthaveinordertobeginacurve.

filterSize EdgeFilterSize Specifiesthewidthoftheedgefilterthefunctionusestoidentifycurvesintheimage.

minLength int Specifiesthelength,inpixels,ofthesmallestcurvethefunctionwillextract.ThefunctionwillignoreanycurvesthathavealengthlessthanminLength.

rowStepSize int Specifiesthedistance,intheydirection,betweenlinesthefunctioninspectsforcurveseedpoints.

columnStepSize int Specifiesthedistance,inthexdirection,betweencolumnsthefunctioninspectsforcurveseedpoints.

maxEndPointGap int Specifiesthemaximumgap,inpixels,betweentheendpointsofacurvethatthefunctionidentifiesasaclosedcurve.IfthegapislargerthanmaxEndPointGap,thefunctionidentifiesthecurveasanopencurve.

onlyClosed int SetthiselementtoTRUEtospecifythatthefunctionshouldonlyidentify

Page 2457: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

closedcurvesintheimage.SetthiselementtoFALSEtospecifythatthefunctionshouldidentifybothopenandclosedcurvesintheimage.

subpixelAccuracy int SetthiselementtoTRUEtospecifythatthefunctionidentifiesthelocationofcurveswithsubpixelaccuracybyinterpolatingbetweenpointstofindthecrossingofthreshold.SetthiselementtoFALSEtospecifythatthefunctionidentifiesthelocationofcurvesasthepointnearestthecrossingofthreshold.

Page 2458: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ShapeDetectionOptionsSpecifiestherequirementsforshapesthatthefunctiondetects.Elements

Name Type Description

mode unsignedint Specifiesthemethodusedwhenlookingfortheshapeintheimage.CombinevaluesfromtheGeometricMatchingModeenumerationtospecifythevalueofthiselement.

angleRanges RangeFloat* Anarrayofangleranges,indegrees,whereeachrangespecifieshowmuchyouexpecttheshapetoberotatedintheimage.Todecreasethesearchtime,limitthedegreesofrotationinwhichyouexpecttofindtheshapeintheimage.SetthiselementtoNULLtoallowallangles.ThisfunctionignoresthisrangeifdoesnotincludeIMAQ_GEOMETRIC_MATCH_ROTATION_INVARIANT.

numAngleRanges int ThesizeoftheorientationRangesarray.scaleRange RangeFloat Arangethatspecifiesthesizesoftheshapesyou

expecttobeintheimage,expressedasaratiopercentagerepresentingthesizeofthepatternintheimagedividedbysizeoftheoriginalpatternmultipliedby100.ThisfunctionignoresthisrangeifnotincludeIMAQ_GEOMETRIC_MATCH_SCALE_INVARIANT

minMatchScore double Theminimumscoreamatchcanhaveforthefunctiontoconsiderthematchvalid.Acceptablevaluesrangefrom0to1,000.

Page 2459: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

EllipseMatchInformationdescribingamatchedellipse.Elements

Name Type Description

position PointFloat Thelocationofthecenterofthematchedellipse.

rotation double Theorientationofthematchedellipse.majorRadius double Thelengthofthesemi-majoraxisofthe

matchedellipse.minorRadius double Thelengthofthesemi-minoraxisofthe

matchedellipse.score double Thescoreofthematchedellipse.

Page 2460: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

EllipseDescriptorDescribestheellipsesthefunctionsearchesfor.Elements

Name Type Description

minMajorRadius double Specifiestheminimumlengthofthesemi-majoraxisofanellipsethefunctionwillreturn.

maxMajorRadius double Specifiesthemaximumlengthofthesemi-majoraxisofanellipsethefunctionwillreturn.

minMinorRadius double Specifiestheminimumlengthofthesemi-minoraxisofanellipsethefunctionwillreturn.

maxMinorRadius double Specifiesthemaximumlengthofthesemi-minoraxisofanellipsethefunctionwillreturn.

Page 2461: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ExtremeReportInformationdescribinganextreme,eitherapeakoravalley.Elements

Name Type Description

location double Thelocationsoftheextreme.Thelocationisanindexbasedontheinputpixelarray,butmayoccurbetweenactualindexvalues.

amplitude double Theamplitudeoftheextreme.secondDerivative double Thesecondderivativeoftheextreme.

Page 2462: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DetectionModeDeterminesifthefunctiondetectspeaksordetectsvalleys.Elements

Name Value Description

IMAQ_DETECT_PEAKS 0 Thefunctiondetectspeaks.

IMAQ_DETECT_VALLEYS 1 Thefunctiondetectsvalleys.

IMAQ_DETECTION_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2463: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DetectExtremesOptionsDescribeshowafunctioncalculatesextremes.Elements

Name Type Description

threshold double Defineswhichextremesaretoosmall.Thefunctionrejectsanypeakwithafittedamplitudethatislessthanthreshold.Thefunctionignoresvalleysifthefittedtroughisgreaterthanthreshold.

width int Specifiesthenumberofconsecutivedatapointsthefunctionusesinthequadraticleast-squaresfit.widthmustbegreaterthanorequalto3butshouldbenolargerthanone-fourthoftheapproximatewidthofthepeaksorvalleys.Settingwidthtoalargevaluecanreducetheapparentamplitudeofpeaksandshifttheapparentlocation.Thelessnoiseyourdatahas,thesmallerthevalueyoucanchoose.

Page 2464: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LineMatchInformationdescribingamatchedline.Elements

Name Type Description

startPoint PointFloat Thestartingpointofthematchedline.endPoint PointFloat Theendingpointofthematchedline.length double Thelengthofthelinemeasuredinpixelsfromthe

startpointtotheendpoint.rotation double Theorientationofthematchedline.score double Thescoreofthematchedline.Scoresrangefrom

0–1000,whereascoreof1000indicatesaperfectmatch.

Page 2465: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LineDescriptorDescribesthelinesthefunctionsearchesfor.Elements

Name Type Description

minLength double Specifiestheminimumlengthofalinethefunctionwillreturn.

maxLength double Specifiesthemaximumlengthofalinethefunctionwillreturn.

Page 2466: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

RectangleMatchInformationdescribingamatchedrectangle.

NoteWidthisdefinedasthelengthoftheshortersideofarectangleandheightisdefinedasthelongersideoftherectangle.

Elements

Name Type Description

corner[4] PointFloat Thecornersofthematchedrectangle.rotation double Theorientationofthematchedrectangle.width double Thewidthofthematchedrectangle.height double Theheightofthematchedrectangle.score double Thescoreofthematchedrectangle.Scoresrange

from0–1000,whereascoreof1000indicatesaperfectmatch.

Page 2467: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

RectangleDescriptorDescribestherectanglesthefunctionsearchesfor.

NoteWidthisdefinedasthelengthoftheshortersideofarectangleandheightisdefinedasthelongersideoftherectangleyouwanttosearchfor.

Elements

Name Type Description

minWidth double Specifiestheminimumwidthofarectanglethealgorithmwillreturn.

maxWidth double Specifiesthemaximumwidthofarectanglethealgorithmwillreturn.

minHeight double Specifiestheminimumheightofarectanglethealgorithmwillreturn.

maxHeight double Specifiesthemaximumheightofarectanglethealgorithmwillreturn.

Page 2468: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CircularEdgeReportInformationdescribingacalculatedcircularedge.Elements

Name Type Description

center PointFloat Thecenterofthecirclethatbestfitsthecircularedge.Ifthefunctiondoesnotdetectanyedgesortheedgesdonotfittoavalidcircle,itsetscenterto{0,0}.

radius double Theradiusofthecirclethatbestfitsthecircularedge.Ifthefunctiondoesnotdetectanyedgesortheedgesdonotfittoavalidcircle,itsetsradiusto0.

roundness double Theroundnessofthecalculatedcircularedge.Thiscalculationisbasedonthelocationoftheedgesdetectedbythefunction.Ifthefunctiondoesnotdetectanyedgesortheedgesdonotfittoavalidcircle,itsetsroundnessto0.

coordinates PointFloat* Anarrayofpointsindicatingthelocationofthedetectededge.

numCoordinates int Thenumberofdetectededgecoordinates.

Page 2469: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

StraightEdgeReportInformationdescribingacalculatedstraightedge.Elements

Name Type Description

start PointFloat Thecoordinateslocationofthestartofthecalculatededge.Thepointislocatedattheintersectionoftheedgewiththefirstsearchlinescannedbythefunction.Ifthefunctiondoesnotdetectanyedgesortheedgesdonotfittoavalidline,itsetsstartto{0,0}.

end PointFloat Thecoordinateslocationoftheendofthecalculatededge.Thepointislocatedattheintersectionoftheedgewiththelastsearchlinescannedbythefunction.Ifthefunctiondoesnotdetectanyedgesortheedgesdonotfittoavalidline,itsetsendto{0,0}.

straightness double Thestraightnessofthecalculatededge,whichisequaltotheleast-squareerrorofthefittedlinetothentiresetofcoordinates.Ifthefunctiondoesnotdetectanyedgesortheedgesdonotfitavalidline,thestraightnessissettozero.

coordinates PointFloat* Anarrayofdetectededgecoordinatesthefunctionusedtocalculatethelocationofthestraightedge.

numCoordinates int Thenumberofdetectededgecoordinates.

Page 2470: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DrawModeThemethodthatthefunctionusestodrawanobject.Elements

Name Value Description

IMAQ_DRAW_VALUE 0 Drawstheboundaryoftheobjectwiththespecifiedpixelvalue.

IMAQ_DRAW_INVERT 2 Invertsthepixelvaluesoftheboundaryoftheobject.

IMAQ_PAINT_VALUE 1 Fillstheobjectwiththegivenpixelvalue.

IMAQ_PAINT_INVERT 3 Invertsthepixelvaluesoftheobject.

IMAQ_HIGHLIGHT_VALUE 4 Thefunctionfillstheobjectbyhighlightingtheenclosedpixelswiththecoloroftheobject.Thehighlightingallowsfeaturesofanimagetopersistinsideafilledobject.

IMAQ_DRAW_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2471: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ShapeModeTheshapethefunctiondraws.Elements

Name Value Description

IMAQ_SHAPE_RECT 1 Thefunctiondrawsarectangle.

IMAQ_SHAPE_OVAL 2 Thefunctiondrawsanoval.

IMAQ_SHAPE_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2472: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DrawTextOptionsDescribeshowthefunctiondrawstext.Elements

Name Type Description

fontName[32] char Thefontnametouse.Thisparameterislimitedto32characters.

fontSize int Thesizeofthefont.bold int SetthisparametertoTRUEtoboldtext.italic int SetthisparametertoTRUEtoitalicize

text.underline int SetthisparametertoTRUEtounderline

text.strikeout int SetthisparametertoTRUEtostrikeout

text.textAlignment TextAlignment Setsthealignmentoftext.fontColor FontColor Setsthefontcolor.

Page 2473: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

OutlineMethodMethodthefunctionuseswhenoutliningtheedges.Formoreinformationaboutfiltering,refertoChapter5,ImageProcessing,oftheNIVisionConceptsManual.Elements

Name Value Description

IMAQ_EDGE_DIFFERENCE 0 Thefunctionusesamethodthatproducescontinuouscontoursbyhighlightingeachpixelwhereanintensityvariationoccursbetweenitselfanditsthreeupper-leftneighbors.

IMAQ_EDGE_GRADIENT 1 Thefunctionusesamethodthatoutlinescontourswhereanintensityvariationoccursalongtheverticalaxis.

IMAQ_EDGE_PREWITT 2 Thefunctionusesa

Page 2474: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

methodthatextractstheoutercontoursofobjects.

IMAQ_EDGE_ROBERTS 3 Thefunctionusesamethodthatoutlinesthecontoursthathighlightpixelswhereanintensityvariationoccursalongthediagonalaxes.

IMAQ_EDGE_SIGMA 4 Thefunctionusesamethodthatoutlinescontoursanddetailsbysettingpixelstothemeanvaluefoundintheirneighborhood,iftheirdeviationfromthisvalueisnotsignificant.

IMAQ_EDGE_SOBEL 5 Thefunctionusesamethodthatextractstheoutercontoursofobjects.Asopposedto

Page 2475: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

thePrewittfilter,theSobelfilterassignsahigherweighttothehorizontalandverticalneighborsofthecentralpixel.

IMAQ_OUTLINE_METHOD_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2476: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

EdgeReport2Informationabouttheedgesdetected.Elements

Name Type Description

edges EdgeInfo* Anarrayofedgesdetected.ThenumberofedgesdetectedisdeterminedbynumEdges.

numEdges unsignedint

Indicatesthenumberofedgesdetected

gradientInfo double* Anarraythatcontainsthecalculatededgestrengthsalongtheuser-definedsearcharea

numGradientInfo unsignedint

IndicatesthenumberofelementscontainedingradientInfo.

calibrationValid int Indicatesifthecalibrationdatacorrespondingtothelocationoftheedgesiscorrect.

Page 2477: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CurveInformationaboutacurve.Elements

Name Type Description

points PointFloat* Thepointsonthecurve.numPoints unsigned

intThenumberofpointsinthecurve.

closed int ThiselementisTRUEifthecurveisclosedandFALSEifthecurveisopen.

curveLength double Thelengthofthecurve.minEdgeStrength double Thelowestedgestrengthdetected

onthecurve.maxEdgeStrength double Thehighestedgestrengthdetected

onthecurve.averageEdgeStrength double Theaverageofalledgestrengths

detectedonthecurve.

Page 2478: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

BorderMethodThemethodbywhichafunctionmodifiestheborder.Elements

Name Value Description

IMAQ_BORDER_MIRROR 0 Symmetricallycopiespixelvaluesfromtheimageintotheborder.

IMAQ_BORDER_COPY 1 Copiesthevalueofthepixelclosesttotheedgeoftheimageintotheborder.

IMAQ_BORDER_CLEAR 2 Setsallpixelsintheborderto0.

IMAQ_BORDER_METHOD_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2479: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CircleReportInformationaboutacircle.Elements

Name Type Description

center Point Thecoordinatepointofthecenterofthecircle.radius int Theradiusofthecircle,inpixels.Iftheradiusofthecircle

isnotwithinthegivenrange,thisvalueisnegative.area int Theareaofthecircle,inpixels.

Page 2480: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

SpokeDirectionThedirectionthefunctionfollowstosearchforedgesalongthesearchlines.Elements

Name Value Description

IMAQ_OUTSIDE_TO_INSIDE 0 Thefunctionsearchesfromtheoutsideofthesearchareatotheinsideofthesearcharea.

IMAQ_INSIDE_TO_OUTSIDE 1 Thefunctionsearchesfromtheinsideofthesearchareatotheoutsideofthesearcharea.

IMAQ_SPOKE_DIRECTION_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2481: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FindEdgeReportInformationdescribingthestraightedgesfound.Elements

Name Type Description

straightEdges StraightEdge* Anarrayofstraightedgesdetected.ThenumberofstraightedgesdetectedisdeterminedbynumStraightEdges.

numStraightEdges unsignedint Indicatesthenumberofstraightedgesfound.

Page 2482: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FindEdgeOptions2Describeshowyouwantthefunctiontosearchforedgesandtheinformationthefunctionoverlaystotheimage.Elements

Name Type Description

direction RakeDirection ThedirectiontosearchintheROI.showSearchArea int IfTRUE,thefunctionoverlaysthe

searchareaontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

showSearchLines int IfTRUE,thefunctionoverlaysthesearchlinesusedtolocatetheedgesontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

showEdgesFound int IfTRUE,thefunctionoverlaysthelocationsoftheedgesfoundontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

showResult int IfTRUE,thefunctionoverlaysthehitlinestotheobjectandtheedgeusedtogeneratethehitlineontheresultimage.Whenapplicable,thefunctionalsooverlaysthelocationofanymeasurementsmadebythefunction.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

searchAreaColor RGBValue SpecifiestheRGBcolorvaluetousetooverlaythesearcharea.

Page 2483: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

searchLinesColor RGBValue SpecifiestheRGBcolorvaluetousetooverlaythesearchlines.

searchEdgesColor RGBValue SpecifiestheRGBcolorvaluetousetooverlaythesearchedges.

resultColor RGBValue SpecifiestheRGBcolorvaluetousetooverlaytheresults.

overlayGroupName char* Specifiestheoverlaygroupnametoassigntotheoverlays.SetthiselementtoNULLtoaddoverlaystothedefaultgroup.

edgeOptions EdgeOptions2 Specifiestheedgedetectionoptionsalongasinglesearchline

Page 2484: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

StraightEdgeOptionsSpecifiestheoptionsusedtodetectstraightedges.Elements

Name Type Description

numLines unsignedint Specifiesthenumberofstraightedgestofind.

searchMode StraightEdgeSearchMode Specifiesthemethodusedtofindthestraightedge.

minScore double Specifiestheminimumscoreofadetectedstraightedge.

maxScore double Specifiesthemaximumscoreofadetectededge.

orientation double Specifiestheangleatwhichthestraightedgeisexpectedtobefound.

angleRange double Specifiesthe+/-rangearoundtheorientationwithinwhichthestraightedgeisexpectedtobefound.

angleTolerance double Specifiestheexpectedangularaccuracyofthestraightedge.

stepSize unsignedint Specifiesthegapinpixelsbetweenthe

Page 2485: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

searchlinesusedwiththerake-basedmethods.

minSignalToNoiseRatio double Specifiestheminimumsignaltonoiseratio(SNR)oftheedgepointsusedtofitthestraightedge.

minCoverage double Specifiestheminimumnumberofpointsasapercentageofthenumberofsearchlinesthatneedtobeincludedinthedetectedstraightedge.

houghIterations unsignedint SpecifiesthenumberofiterationsusedintheHough-basedmethod.

Page 2486: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LCDOptionsDescribeshowafunctionexaminesanLCD.Elements

Name Type Description

litSegments int SetthisparametertoTRUEifthesegmentsarebrighterthanthebackground.SetthisparametertoFALSEifthesegmentsaredarkerthanthebackground.

threshold float DetermineswhetherasegmentisONorOFF.AsegmentisONifthestandarddeviationofthepixelsalongalineprofileacrossthesegmentisgreaterthanthreshold.Increasethevalueofthresholdwhenusingimageswithhighcontrast.Decreasethevalueofthresholdwhenusingimageswithlowcontrast.

sign int Indicateswhetherthefunctionmustreadthesignoftheindicator.SetthisparametertoTRUEtosearchforthesign.SetthisparametertoFALSEtonotsearchforthesign.

decimalPoint int Determineswhethertolookforadecimalseparatoraftereachdigit.SetthiselementtoTRUEtosearchfortheseparator.SetthisparametertoFALSEtonotsearchfortheseparator.

Page 2487: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PatternMatchInformationdescribingamatchedpattern.Elements

Name Type Description

position PointFloat Thelocationofthecenterofthematch.rotation float Therotationofthematchrelativetothetemplate

image,indegrees.scale float Thesizeofthematchrelativetothesizeofthe

templateimage,expressedasapercentage.score float Theaccuracyofthematch.Ascoreof1,000

indicatesaperfectmatch,andascoreof0indicatesnomatch.

corner[4] PointFloat Anarrayoffourpointsdescribingtherectanglesurroundingthetemplateimage.

Page 2488: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FindPatternOptionsAnarrayofangleranges,indegrees,whereeachrangespecifieshowmuchyouexpectthepatterntoberotatedintheimage.Todecreasethesearchtime,limitthedegreesofrotationinwhichyouexpecttofindthetemplateimage.SetthiselementtoNULLtoallowallangles.Elements

Name Type Description

mode MatchingMode Specifiesthemethodtousewhenlookingforthepatternintheimage.

numMatchesRequested int Numberofvalidmatchesexpected.

minMatchScore int Theminimumscoreamatchcanhaveinorderforthefunctiontoconsiderthematchvalid.

subpixelAccuracy int SetthisparametertoTRUEtoreturnareasintheimagethatmatchthepatternareawithsubpixelaccuracy.

angleRanges RotationAngleRange* Anarrayofangleranges,indegrees,whereeachrangespecifieshowmuchyouexpectthepatterntoberotatedintheimage.Todecreasethesearchtime,limitthedegreesofrotationinwhichyouexpecttofindthetemplateimage.SetthiselementtoNULLto

Page 2489: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

allowallangles.numRanges int Numberofangleranges

intheangleRangesarray.

showSearchArea int IfTRUE,thefunctionoverlaysthesearchareaontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

showResult int IfTRUE,thefunctionoverlaysthecentersandboundingboxesofthepatternsitlocatesontheresultimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

Page 2490: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FindTransformModeSpecifieshowafunctionupdatesacoordinatetransform.Elements

Name Value Description

IMAQ_FIND_REFERENCE 0 Updatebothpartsofthecoordinatesystem.

IMAQ_UPDATE_TRANSFORM 1 Updateonlythenewreferencesystem.

IMAQ_FIND_TRANSFORM_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2491: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FindTransformPatternOptionsAnarrayofangleranges,indegrees,whereeachrangespecifieshowmuchyouexpectthepatterntoberotatedintheimage.Todecreasethesearchtime,limitthedegreesofrotationinwhichyouexpecttofindthetemplateimage.SetthiselementtoNULLtoallowallangles.Elements

Name Type Description

matchMode MatchingMode Specifiesthetechniquetousewhenlookingforthetemplatepatternintheimage.

minMatchScore int Theminimumscoreamatchcanhaveforthefunctiontoconsiderthematchvalid.

subpixelAccuracy int SetthiselementtoTRUEtoreturnareasintheimagethatmatchthepatternwithsubpixelaccuracy.

angleRanges RotationAngleRange* Anarrayofangleranges,indegrees,whereeachrangespecifieshowmuchyouexpectthepatterntoberotatedintheimage.Todecreasethesearchtime,limitthedegreesofrotationinwhichyouexpecttofindthetemplateimage.SetthiselementtoNULLtoallowallangles.

numRanges int NumberofanglerangesintheangleRangesarray.

showSearchArea int IfTRUE,thefunctionoverlaysthesearchareaontheimage.Ifyoudonotwant

Page 2492: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

thisinformationoverlaidontotheimage,setthiselementtoFALSE.

showFeatureFound int IfTRUE,thefunctionoverlaysthelocationsofthecenterofthepatternandtheboundingboxofthepatternontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

showResult int IfTRUE,thefunctionoverlaysthepositionandorientationofthecoordinatesystemontheresultimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

Page 2493: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

AxisReportSpecifiesthecoordinatesofthemainaxisandthesecondaryaxisofacoordinatesystem.Elements

Name Type Description

origin PointFloat Theoriginofthecoordinatesystem,whichistheintersectionofthetwoaxesofthecoordinatesystem.

mainAxisEnd PointFloat Theendofthemainaxis,whichistheresultofthecomputationoftheintersectionofthemainaxiswiththerectangularsearcharea.

secondaryAxisEnd PointFloat Theendofthesecondaryaxis,whichistheresultofthecomputationoftheintersectionofthesecondaryaxiswiththerectangularsearcharea.

Page 2494: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FindTransformRectOptions2Describeshowyouwantthefunctiontosearchforedgesandtheinformationthefunctionoverlaystotheimage.Elements

Name Type Description

direction FindReferenceDirection Specifiesthedirectionandorientationinwhichthefunctionsearchesfortheprimaryaxis.

showSearchArea int IfTRUE,thefunctionoverlaysthesearchareaontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

showSearchLines int IfTRUE,thefunctionoverlaysthesearchlinesusedtolocatetheedgesontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

showEdgesFound int IfTRUE,thefunctionoverlaysthelocationsoftheedgesfoundontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

showResult int IfTRUE,thefunctionoverlaysthehitlinestotheobjectandtheedgeusedtogeneratethehitlineontheresultimage.When

Page 2495: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

applicable,thefunctionalsooverlaysthelocationofanymeasurementsmadebythefunction.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

searchAreaColor RGBValue SpecifiestheRGBcolorvaluetousetooverlaythesearcharea.

searchLinesColor RGBValue SpecifiestheRGBcolorvaluetousetooverlaythesearchlines.

searchEdgesColor RGBValue SpecifiestheRGBcolorvaluetousetooverlaythesearchedges.

resultColor RGBValue SpecifiestheRGBcolorvaluetousetooverlaytheresults.

overlayGroupName char* Specifiestheoverlaygroupnametoassigntotheoverlays.SetthiselementtoNULLtoaddoverlaystothedefaultgroup.

edgeOptions EdgeOptions2 Specifiestheedgedetectionoptionsalongasinglesearchline

Page 2496: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FindTransformRectsOptions2Describeshowyouwantthefunctiontosearchforedgesandtheinformationthefunctionoverlaystotheimage.Elements

Name Type Description

direction FindReferenceDirection Specifiesthedirectionandorientationinwhichthefunctionsearchesfortheprimaryaxis.

showSearchArea int IfTRUE,thefunctionoverlaysthesearchareaontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

showSearchLines int IfTRUE,thefunctionoverlaysthesearchlinesusedtolocatetheedgesontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

showEdgesFound int IfTRUE,thefunctionoverlaysthelocationsoftheedgesfoundontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

Page 2497: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

showResult int IfTRUE,thefunctionoverlaysthehitlinestotheobjectandtheedgeusedtogeneratethehitlineontheresultimage.Whenapplicable,thefunctionalsooverlaysthelocationofanymeasurementsmadebythefunction.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

searchAreaColor RGBValue SpecifiestheRGBcolorvaluetousetooverlaythesearcharea.

searchLinesColor RGBValue SpecifiestheRGBcolorvaluetousetooverlaythesearchlines.

searchEdgesColor RGBValue SpecifiestheRGBcolorvaluetousetooverlaythesearchedges.

resultColor RGBValue SpecifiestheRGBcolorvaluetousetooverlaytheresults.

overlayGroupName char* Specifiestheoverlaygroupnametoassigntotheoverlays.SetthiselementtoNULLtoaddoverlaystothedefaultgroup.

Page 2498: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

primaryEdgeOptions EdgeOptions2 SpecifiestheparametersusedtocomputetheedgegradientinformationanddetecttheedgesgottheprimaryROI.

secondaryEdgeOptions EdgeOptions2 SpecifiestheparametersusedtocomputetheedgegradientinformationanddetecttheedgesforthesecondaryROI.

Page 2499: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

BestCircle2Describesacirclethatbestfitsasetofpoints.Elements

Name Type Description

center PointFloat Thecoordinatelocationofthecenterofthecircle.

radius double Theradiusofthecircle.area double Theareaofthecircle.perimeter double Thelengthoftheperimeterofthecircle.error double Representstheleastsquareerrorofthe

fittedcircletotheentiresetofpoints.valid int ThiselementisTRUEifthefunction

achievedtheminimumscorewithinthenumberofallowedrefinementiterationsandFALSEifthefunctiondidnotachievetheminimumscore.

pointsUsed int* Anarrayoftheindexesforthepointsarrayindicatingwhichpointsthefunctionusedtofitthecircle.IfrejectOutliersisFALSE,thisarrayissettoNULL.

numPointsUsed int Thenumberofpointsthefunctionusedtofitthecircle.

Page 2500: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FitCircleOptionsDescribeshowtocalculatethebestfitcircle.Elements

Name Type Description

rejectOutliers int Whethertouseeverygivenpointoronlyasubsetofthepointstofitthecircle.IfthisvalueisTRUE,thealgorithmdeterminesthebestsubsetofpointstouseandignorestheoutliers(thepointsoutsidethesubset).IfthisvalueisFALSE,thealgorithmuseseverygivenpoint.

minScore double Specifiestherequiredqualityofthefittedcircle.Acceptablevaluesrangefrom0to1,000.Ascoreof1,000indicatesaperfectfit.

pixelRadius double Theacceptabledistance,inpixels,thatapointdeterminedtobelongtothecirclecanbefromthecircumferenceofthecircle.

maxIterations int Specifiesthenumberofrefinementiterationsyouallowthefunctiontoperformontheinitialsubsetofpoints.Youmustallowatleastoneiteration.

Page 2501: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

BestEllipse2Describesanellipsethatbestfitsasetofpoints.Elements

Name Type Description

center PointFloat Thecoordinatelocationofthecenteroftheellipse.

majorAxisStart PointFloat Thecoordinatelocationofthestartofthemajoraxisoftheellipse.

majorAxisEnd PointFloat Thecoordinatelocationoftheendofthemajoraxisoftheellipse.

minorAxisStart PointFloat Thecoordinatelocationofthestartoftheminoraxisoftheellipse.

minorAxisEnd PointFloat Thecoordinatelocationoftheendoftheminoraxisoftheellipse.

area double Theareaoftheellipse.perimeter double Thelengthoftheperimeteroftheellipse.error double Representstheleastsquareerrorofthe

fittedellipsetotheentiresetofpoints.valid int ThiselementisTRUEifthefunction

achievedtheminimumscorewithinthenumberofallowedrefinementiterationsandFALSEifthefunctiondidnotachievetheminimumscore.

pointsUsed int* Anarrayoftheindexesforthepointsarrayindicatingwhichpointsthefunctionusedtofittheellipse.IfrejectOutliersisFALSE,thisarrayissettoNULL.

numPointsUsed int Thenumberofpointsthefunctionusedtofittheellipse.

Page 2502: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FitEllipseOptionsDescribeshowtocalculatethebestfitellipse.Elements

Name Type Description

rejectOutliers int Whethertouseeverygivenpointoronlyasubsetofthepointstofittheellipse.IfthisvalueisTRUE,thealgorithmdeterminesthebestsubsetofpointstouseandignorestheoutliers(thepointsoutsidethesubset).IfthisvalueisFALSE,thealgorithmuseseverygivenpoint.

minScore double Specifiestherequiredqualityofthefittedellipse.Acceptablevaluesrangefrom0to1,000.Ascoreof1,000indicatesaperfectfit.

pixelRadius double Theacceptabledistance,inpixels,thatapointdeterminedtobelongtotheellipsecanbefromthecircumferenceoftheellipse.

maxIterations int Specifiesthenumberofrefinementiterationsyouallowthefunctiontoperformontheinitialsubsetofpoints.Youmustallowatleastoneiteration.

Page 2503: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

BestLineDescribesalinethatbestfitsasetofpoints.Elements

Name Type Description

start PointFloat Thecoordinatelocationofthestartoftheline.

end PointFloat Thecoordinatelocationoftheendoftheline.

equation LineEquation Definesthethreecoefficientsoftheequationofthebestfitline.

valid int ThiselementisTRUEifthefunctionachievedtheminimumscorewithinthenumberofallowedrefinementiterationsandFALSEifthefunctiondidnotachievetheminimumscore.

error double Representstheleastsquareerrorofthefittedlinetotheentiresetofpoints.

pointsUsed int* Anarrayoftheindexesforthepointsarrayindicatingwhichpointsthefunctionusedtofittheline.

numPointsUsed int Thenumberofpointsthefunctionusedtofittheline.

Page 2504: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FitLineOptionsDescribeshowtocalculatethebestfitline.Elements

Name Type Description

minScore float Specifiestherequiredqualityofthefittedline.Acceptablevaluesrangefrom0to1,000.Ascoreof1,000indicatesaperfectfit.

pixelRadius float Specifiestheneighborhoodpixelrelationshipfortheinitialsubsetofpointsbeingused.DuringrefinementiterationsthefunctionignorespointsthatarefartherfromthelinethanpixelRadius.

numRefinements int Specifiesthenumberofrefinementiterationsyouallowthefunctiontoperformontheinitialsubsetofpoints.Youmustallowatleastoneiteration.

Page 2505: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FlattenTypeIndicateswhatpartsoftheimagetoflatten.Elements

Name Value Description

IMAQ_FLATTEN_IMAGE 0 Flattensjusttheimagedata.

IMAQ_FLATTEN_IMAGE_AND_VISION_INFO 1 FlattenstheimagedataandanyVisioninformationassociatedwiththeimage.

IMAQ_FLATTEN_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2506: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CompressionTypeIndicateshowtocompresstheimageforflattening.Elements

Name Value Description

IMAQ_COMPRESSION_NONE 0 Specifiesthatthefunctionshouldnotcompresstheimage.

IMAQ_COMPRESSION_JPEG 1 SpecifiesthatthefunctionshoulduselossyJPEGcompressionontheimage.JPEGcompressionmaycausedatadegradationintheflatteneddata.

IMAQ_COMPRESSION_PACKED_BINARY 2 Specifiesthatthefunctionshoulduselosslessbinarypackingontheimage.Thissetting

Page 2507: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

isidealforpreservingdataintegritywhenflatteningbinaryimages.Donotusethissettingfornonbinaryimages.

IMAQ_COMPRESSION_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2508: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FlipAxisTheaxisoverwhichtoflipanimage.Elements

Name Value Description

IMAQ_HORIZONTAL_AXIS 0 Flipstheimageoverthecentralhorizontalaxis.

IMAQ_VERTICAL_AXIS 1 Flipstheimageoverthecentralverticalaxis.

IMAQ_CENTER_AXIS 2 Flipstheimageoverboththecentralverticalandhorizontalaxes.

IMAQ_DIAG_L_TO_R_AXIS 3 Flipstheimageoveranaxisfromtheupperleftcornertolowerrightcorner.

IMAQ_DIAG_R_TO_L_AXIS 4 Flipstheimageoveranaxisfromtheupperrightcornertolowerleftcorner.

IMAQ_FLIP_AXIS_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2509: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

AVIInfoInformationaboutanAVI.Elements

Name Type Description

width unsignedint

Thewidthofeachframe.

height unsignedint

Theheightofeachframe.

imageType ImageType ThetypeofimagesthisAVIcontains.numFrames unsigned

intThenumberofframesintheAVI.

framesPerSecond unsignedint

ThenumberofframespersecondthisAVIshouldbeshownat.TheAVImayplayataslowerrate,dependingontheperformanceofthesystemonwhichitplays.

filterName char* ThenameofthecompressionfilterusedtocreatethisAVI.

hasData int SpecifieswhetherthisAVIhasdataattachedtoeachframeornot.

maxDataSize unsignedint

IfthisAVIhasdata,themaximumsizeofthedataineachframe.

Page 2510: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CalibrationInfoInformationdescribingthecalibrationofanimage.Elements

Name Type Description

errorMap float* Theerrormapforthecalibration.Theerrormapwillbeemptyifthefunctiondidnotcalculateitwhenlearningthecalibration.

mapColumns int Thenumberofcolumnsintheerrormap.

mapRows int Thenumberofrowsintheerrormap.

userRoi ROI* SpecifiestheROItheuserprovidedwhenlearningthecalibration.

calibrationRoi ROI* SpecifiestheROIthatcorrespondstotheregionoftheimagewherethecalibrationinformationisaccurate.

options LearnCalibrationOptions Specifiesthecalibrationoptionstheuserprovidedwhenlearningthecalibration.

grid GridDescriptor Specifiesthescalingconstantsfortheimage.

system CoordinateSystem Specifiesthecoordinatesystemfortherealworldcoordinates.

range RangeFloat Therangeofthegrayscalethefunctionusedtorepresentthecirclesinthegridimage.

quality float Thequalityscoreofthelearningprocess,whichisavalue

Page 2511: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

between0-1000.Aqualityof1000meansthatthefunctionlearnedthefeaturepointsperfectlywiththechosenalgorithm.Itdoesnotnecessarilyreflecttheabsoluteaccuracyoftheestimatedcalibrationmapping,butinsteadreflectshowwellthecalibrationmappingadaptstothelearnedpoints.

Page 2512: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CharInfo2Containsinformationaboutatrainedcharacter.Elements

Name Type Description

charValue constchar* Retrievesthecharactervalueofthecorrespondingcharacterinthecharacterset.

charImage constImage* Theimageyouusedtotrainthischaracter.

internalImage constImage* TheinternalrepresentationthatNIVisionusestomatchobjectstothischaracter.ThisinformationishelpfulwhenyouarenotsurewhyNIVisiondoesnotrecognizeasegmentedcharacterintheROI.ThisinformationshowshowNIVisioninterpretsthecharacter,whichmaybedifferentfromhowthehumaneyeinterpretsit.

isReferenceChar int ThiselementisTRUEifthecharacteristhereferencecharacterforthecharacterclass.

Page 2513: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ClassifierAccuracyReportAreportontheaccuracyoftheclassifier.Elements

Name Type Description

size int Thesizeofthearraysinthisstructure.

accuracy float Theoverallaccuracyoftheclassifier,from0to1000.RefertotheDeterminingtheQualityofaTrainedClassifiersectionofChapter15,BinaryProcessing,intheNIVisionConceptsManual.

classNames char** Thenamesoftheclassesofthisclassifier.EachnameinthearrayisaNULL-terminatedstring.

classAccuracy double* Anarrayofsizeelementsthatcontainsaccuracyinformationforeachclass.Theclassaccuracyindicatestheprobabilitythattheclassifierclassifiesasampleintothecorrectclass.Eachrowshowshowtheclassifierclassifiedallofthesamplesknowntobeinacertainclass.RefertotheClassifierAccuracysectionofChapter15,BinaryParticleClassification,intheNIVisionConceptsManualformoreinformationaboutthisfield.

classPredictiveValue double* Anarraycontainingsizeelementsthatcontainsthepredictivevaluesofeachclass.Thepredictivevaluesindicatetheprobabilitythatasampleclassifiedintoagivenclassbelongstothatclass.Refertothe

Page 2514: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ClassifierPredictabilitysectionofChapter15,BinaryParticleClassification,intheNIVisionConceptsManualformoreinformationaboutthisfield.

classificationDistribution int** Atwo-dimensionalarraycontaininginformationabouthowtheclassifierclassifiesitssamples.Thisarrayisasquarearray,withbothdimensionscontainingsizeelements.RefertotheDeterminingtheQualityofaTrainedClassifiersectionofChapter15,BinaryParticleClassification,intheNIVisionConceptsManualformoreinformationaboutthisfield.

Page 2515: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ClassifierSampleInfoInformationaboutasampleinaclassifier.Elements

Name Type Description

className char* Thenameoftheclassthissampleisin.featureVector double* Thefeaturevectorofthissample,orNULL

ifthisisnotacustomclassifiersession.featureVectorSize int Thenumberofelementsinthefeature

vector.thumbnail Image* Athumbnailimageofthissample,orNULL

ifnoimagewasspecified.

Page 2516: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ContourInfo2Informationaboutacontour.Elements

Name Type Description

type ContourType Thecontourtype.color RGBValue Thecontourcolor.structure ContourUnion Theinformationnecessarytodescribethe

contourincoordinatespace.

Page 2517: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CalibrationUnitTheunitofmeasurefortheimage.Elements

Name Value Description

IMAQ_UNDEFINED 0 Theimagedoesnothaveadefinedunitofmeasurement.

IMAQ_ANGSTROM 1 Theunitofmeasurefortheimageisangstroms.

IMAQ_MICROMETER 2 Theunitofmeasurefortheimageismicrometers

IMAQ_MILLIMETER 3 Theunitofmeasurefortheimageismillimeters.

IMAQ_CENTIMETER 4 Theunitofmeasurefortheimageiscentimeters.

IMAQ_METER 5 Theunitofmeasurefortheimageismeters.

IMAQ_KILOMETER 6 Theunitofmeasurefortheimageiskilometers.

Page 2518: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_MICROINCH 7 Theunitofmeasurefortheimageismicroinches.

IMAQ_INCH 8 Theunitofmeasurefortheimageisinches.

IMAQ_FOOT 9 Theunitofmeasurefortheimageisfeet.

IMAQ_NAUTICMILE 10 Theunitofmeasurefortheimageisnauticalmiles.

IMAQ_GROUNDMILE 11 Theunitofmeasurefortheimageisgroundmiles.

IMAQ_STEP 12 Theunitofmeasurefortheimageissteps.

IMAQ_CALIBRATION_UNIT_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2519: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FeatureDataAstructuredescribingagenericgeometricmatchingfeature.Elements

Name Type Description

type FeatureType Anenumerationrepresentingthetypeofthefeature.

contourPoints PointFloat* Asetofpointsdescribingthecontourofthefeature.

numContourPoints int ThenumberofpointsinthecontourPointsarray.

feature GeometricFeature Thefeaturedataspecifictothistypeoffeature.

Page 2520: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FeatureTypeIndicatesthetypeoffeaturetofollow.Elements

Name Value Description

IMAQ_NOT_FOUND_FEATURE 0 Specifiesthefeatureisnotfound.

IMAQ_CIRCLE_FEATURE 1 Specifiesthefeatureisacircle.

IMAQ_ELLIPSE_FEATURE 2 Specifiesthefeatureisanellipse.

IMAQ_CONST_CURVE_FEATURE 3 Specifiesthefeaturesisaconstantcurve.

IMAQ_RECTANGLE_FEATURE 4 Specifiesthefeatureisarectangle.

IMAQ_LEG_FEATURE 5 Specifiesthefeatureisaleg.

IMAQ_CORNER_FEATURE 6 Specifiesthefeatureisacorner.

IMAQ_PARALLEL_LINE_PAIR_FEATURE 7 Specifiesthefeatureisaparallellinepair.

IMAQ_PAIR_OF_PARALLEL_LINE_PAIRS_FEATURE 8 Specifies

Page 2521: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

thefeatureisapairofparallellinepairs.

IMAQ_LINE_FEATURE 9 Specifiesthefeatureisaline.

IMAQ_CLOSED_CURVE_FEATURE 10 Specifiesthefeatureisaclosedcurve.

Page 2522: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageInfoInformationaboutanimage.Elements

Name Type Description

imageUnit CalibrationUnit IfyousetcalibrationinformationwithimaqSetSimpleCalibrationInfo(),imageUnitisthecalibrationunit.

stepX float IfyousetcalibrationinformationwithimaqSetCalibrationInfo(),stepXisthedistanceinthecalibrationunitbetweentwopixelsinthexdirection.

stepY float IfyousetcalibrationinformationwithimaqSetCalibrationInfo(),stepYisthedistanceinthecalibrationunitbetweentwopixelsintheydirection.

imageType ImageType Thetypeoftheimage.xRes int Thenumberofcolumnsintheimage.yRes int Thenumberofrowsintheimage.xOffset int Ifyousetmaskoffsetinformationwith

imaqSetMaskOffset(),xOffsetistheoffsetofthemaskorigininthexdirection.

yOffset int IfyousetmaskoffsetinformationwithimaqSetMaskOffset(),yOffsetistheoffsetofthemaskoriginintheydirection.

border int Thenumberofborderpixelsaroundtheimage.

pixelsPerLine int Thenumberofpixelsstoredforeachlineoftheimage.ThisvaluemaybelargerthanxRes.

reserved0 void* Thiselementisreserved.

Page 2523: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

reserved1 void* Thiselementisreserved.imageStart void* Apointertopixel(0,0).

Page 2524: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

KernelFamilyThefamilyofthekernelmatrix.Formoreinformationaboutkernels,refertoChapter5,ImageProcessing,oftheNIVisionConceptsManual.Elements

Name Value Description

IMAQ_GRADIENT_FAMILY 0 Thekernelisinthegradientfamily.Gradientkernelshighlightthevariationsoflightintensityalongaspecificdirection,whichhastheeffectofoutliningedgesandrevealingtexture.

IMAQ_LAPLACIAN_FAMILY 1 ThekernelisintheLaplacianfamily.Laplaciankernelshighlightthevariationofthelightintensitysurroundingapixel.

IMAQ_SMOOTHING_FAMILY 2 Thekernelisinthesmoothingfamily.Smoothingkernelsattenuatethevariationsoflightintensityin

Page 2525: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

theneighborhoodofapixel.

IMAQ_GAUSSIAN_FAMILY 3 ThekernelisintheGaussianfamily.Gaussiankernelsattenuatethevariationsoflightintensityintheneighborhoodofapixel.AGaussiankernelissimilartoasmoothingfilter,butitsblurringeffectismoresubdued.

IMAQ_KERNEL_FAMILY_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2526: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

WindowEventTypeDescribesthetypeofawindowevent.Elements

Name Value Description

IMAQ_NO_EVENT 0 NoeventoccurredsincethelastcalltoimaqGetLastEvent().

IMAQ_CLICK_EVENT 1 Theuserclickedonawindow.

IMAQ_DRAW_EVENT 2 TheuserdrewanROIinawindow.

IMAQ_MOVE_EVENT 3 Theusermovedawindow.

IMAQ_SIZE_EVENT 4 Theusersizedawindow.

IMAQ_SCROLL_EVENT 5 Theuserscrolledawindow.

IMAQ_ACTIVATE_EVENT 6 Theuseractivatedawindow.

IMAQ_CLOSE_EVENT 7 Theuserclosedawindow.

IMAQ_DOUBLE_CLICK_EVENT 8 Theuserdouble-clickedinawindow.

IMAQ_WINDOW_EVENT_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2527: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

MeterArcDescribesthearcacrosswhichametersweeps.Elements

Name Type Description

needleBase PointFloat Thecoordinatelocationofthebaseofthemeterneedle.

arcCoordPoints PointFloat* Anarrayofpointsdescribingthecoordinatelocationofthemeterarc.

numOfArcCoordPoints int ThenumberofpointsinthearcCoordPointsarray.

needleColor int ThiselementisTRUEwhenthemeterhasalight-coloredneedleonadarkbackground.ThiselementisFALSEwhenthemeterhasadark-coloredneedleonalightbackground.

Page 2528: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

MeterArcModeDescribeshowafunctiondeterminesanarc.Elements

Name Value Description

IMAQ_METER_ARC_ROI 0 Thefunctionusestheroiparameterandignoresthebase,start,andendparameters.

IMAQ_METER_ARC_POINTS 1 Thefunctionusesthebase,start,andendparametersandignorestheroiparameter.

IMAQ_METER_ARC_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2529: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

NearestNeighborOptionsOptionstothenearestneighboralgorithm.Elements

Name Type Description

method NearestNeighborMethod Themethodtouse.metric NearestNeighborMetric Themetrictouse.k int Thevalueofk,ifthe

IMAQ_K_NEAREST_NEIGHBORmethodisused.

Page 2530: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

TransformBehaviorsDeterminesthebehaviorofoverlayswhenanimageistransformed.Elements

Name Type Description

ShiftBehavior GroupBehavior Specifiesthebehaviorofanoverlaygroupwhenashiftoperationisappliedtoanimage.

ScaleBehavior GroupBehavior Specifiesthebehaviorofanoverlaygroupwhenascaleoperationisappliedtoanimage.

RotateBehavior GroupBehavior Specifiesthebehaviorofanoverlaygroupwhenarotateoperationisappliedtoanimage.

SymmetryBehavior GroupBehavior Specifiesthebehaviorofanoverlaygroupwhenasymmetryoperationisappliedtoanimage.

Page 2531: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParticleClassifierPreprocessingOptionsOptionsusedbyaparticleclassifiertoturnagrayscaleimageintoabinaryimage.Elements

Name Type Description

manualThreshold int SetthiselementtoTRUEtospecifythethresholdrangemanually.SetthiselementtoFALSEtohavethethresholdrangeautomaticallycalculated.

manualThresholdRange RangeFloat Ifamanualthresholdisbeingdone,therangeofpixelstokeep.ThisfieldisignoredifmanualThresholdissettoFALSE.

autoThresholdMethod ThresholdMethod Ifanautomaticthresholdisbeingdone,themethodusedtocalculatethethresholdrange.ThisfieldisignoredifmanualThresholdissettoTRUE.

limits RangeFloat Thelimitsontheautomaticthresholdrange.

particleType ParticleType Whatkindofparticlestolookfor.

rejectBorder int SetthiselementtoTRUEtorejectborderparticles.SetthiselementtoFALSEtokeepborderparticles.

numErosions int Thenumberoferosionsto

Page 2532: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

perform.

Page 2533: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParticleClassifierOptionsDefinesthedependenceoftheparticleclassifieronshape,scale,andmirrorsymmetry.Elements

Name Type Description

scaleDependence float Therelativeimportanceofscalewhenclassifyingparticles.Thisvaluerangesfrom0to1000.IfscaleDependenceis0,thesamplesareclassifiedindependentofscale.Forexample,alargeobjectandsmallobjectofthesametypewouldbeclassifiedasthesameclass.

mirrorDependence float Therelativeimportanceofmirrorsymmetrywhenclassifyingparticles.Thisvaluerangesfrom0to1000.Anexampleofobjectsexhibitingmirrorsymmetryarethelowercaseletterspandq.IfmirrorDependenceis0,thesamplesareclassifiedindependentofmirrorsymmetry.Forexample,pandqwouldbeclassifiedasthesameclass.

Page 2534: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

SegmentInfoInformationaboutasegment.Elements

Name Type Description

numberOfPoints int Thenumberofpointsinthesegment.isOpen int IfTRUE,thecontourisopen.IfFALSE,

thecontourisclosed.weight double Thesignificanceoftheedgeintermsof

thegrayvaluesthatconstitutetheedge.

points ContourPoint* Thepointsofthesegment.

Page 2535: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

WindowBackgroundFillStyleDescribesthefillstyleforadisplaywindow.Elements

Name Value Description

IMAQ_FILL_STYLE_SOLID 0 Fillthedisplaywindowwithasolidcolor.

IMAQ_FILL_STYLE_HATCH 2 FillthedisplaywindowwithapatterndefinedbyWindowBackgroundHatchStyle

IMAQ_FILL_STYLE_DEFAULT 3 FillthedisplaywindowwiththeNIVisiondefaultpattern.

IMAQ_FILL_STYLE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2536: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

WindowBackgroundHatchStyleDescribesthehatchstyleforadisplaywindow.Elements

Name Value Description

IMAQ_HATCH_STYLE_HORIZONTAL 0 Thebackgroundofthedisplaywindowwillbehorizontalbars.

IMAQ_HATCH_STYLE_VERTICAL 1 Thebackgroundofthedisplaywindowwillbeverticalbars.

IMAQ_HATCH_STYLE_FORWARD_DIAGONAL 2 Thebackgroundofthedisplaywindowwillbediagonalbars.Thebarsstartinthelower-leftcornerandendintheupper-rightcornerofthewindow.

Page 2537: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_HATCH_STYLE_BACKWARD_DIAGONAL 3 Thebackgroundofthedisplaywindowwillbediagonalbars.Thebarsstartintheupper-leftcornerandendinthelower-rightcornerofthewindow.

IMAQ_HATCH_STYLE_CROSS 4 Thebackgroundofthedisplaywindowwillbeintersectinghorizontalandverticalbars.

IMAQ_HATCH_STYLE_CROSS_HATCH 5 Thebackgroundofthedisplaywindowwillbeintersectingforwardandbackwarddiagonalbars.

IMAQ_HATCH_STYLE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2538: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DisplayMappingDescribesthedisplaymappingpolicyforaselectedwindow.Elements

Name Type Description

method MappingMethod Describesthemethodforconverting16-bitpixelsto8-bitpixels.

minimumValue int WhenmethodisIMAQ_RANGE,minimumValuerepresentsthevaluethatismappedto0.WhenmethodisIMAQ_PERCENT_RANGE,minimumValuerepresentsthepercentageoftherangeusedtocomputethepixelvaluemappedto0.Otherwise,minimumValuedoesnotaffectthemappingpolicy.

maximumValue int WhenmethodisIMAQ_RANGE,maximumValuerepresentsthevaluethatismappedto255.WhenmethodisIMAQ_PERCENT_RANGE,maximumValuerepresentsthepercentageoftherangeusedtocomputethepixelvaluemappedto255.Otherwise,maximumValuedoesnotaffectthemappingpolicy.

shiftCount int WhenmethodisIMAQ_DOWNSHIFT,shiftCountrepresentsthenumberofbitsthefunctionright-shiftsthe16-bitpixelvalues.Otherwise,shiftCountdoesnotaffectthemappingpolicy.Formoreinformation,refertotheDisplayfunctionstopic.

Page 2539: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

AIMGradeReportDetailstheAIMgradinginformationfortheDataMatrixbarcode.IfaDataMatrixbarcodecouldnotbelocatedbyimaqReadDataMatrixBarcode2(),thefunctionwillassigntheDataMatrixbarcodethevalueIMAQ_AIM_GRADE_Fforallgradesandthevalue0forallrawscores.Elements

Name Type Description

overallGrade AIMGrade Theoveralllettergrade,whichisequaltothelowestoftheotherfivelettergrades.

decodingGrade AIMGrade ThelettergradeassignedtoaDataMatrixbarcodebasedonthesuccessofthefunctionindecodingtheDataMatrixbarcode.ThefunctionsetsthisgradetoIMAQ_AIM_GRADE_Aifthefunctioncoulddecodethedatamatrix,otherwisethefunctionsetsthisgradetoIMAQ_AIM_GRADE_F.

symbolContrastGrade AIMGrade ThelettergradeassignedtoaDataMatrixbarcodebasedonthesymbolcontrastrawscore.

symbolContrast float Thesymbolcontrastrawscorerepresentingthepercentagedifferencebetweenthemeanofthereflectanceofthedarkest10percentandlightest10percentoftheDataMatrixbarcode.

Page 2540: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

printGrowthGrade AIMGrade TheprintgrowthlettergradefortheDataMatrixbarcode.

printGrowth float Theprintgrowthrawscoreforthebarcode,whichisbasedontheextenttowhichdarkorlightmarkingsappropriatelyfilltheirmoduleboundaries.

axialNonuniformityGrade AIMGrade TheaxialnonuniformitygradefortheDataMatrixbarcode.

axialNonuniformity float Theaxialnonuniformityrawscoreforthebarcode,whichisbasedonhowmuchthesamplingpointspacingdiffersfromoneaxistoanother.

unusedErrorCorrectionGrade AIMGrade TheunusederrorcorrectionlettergradefortheDataMatrixbarcode.

unusedErrorCorrection float TheunusederrorcorrectionrawscorefortheDataMatrixbarcode,whichisbasedontheextenttowhichregionalorspotdamageintheDataMatrixbarcodehaserodedthereadingsafetymarginprovidedbytheerrorcorrection.

Page 2541: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

MorphologyMethodThemorphologicaltransformationthefunctionapplies.Formoreinformationaboutmorphologicaltransformations,refertoChapter9,BinaryMorphology,intheNIVisionConceptsManual.Elements

Name Value Description

IMAQ_AUTOM 0 Thefunctionusesatransformationthatgeneratessimplerparticlesthatcontainfewerdetails.

IMAQ_CLOSE 1 Thefunctionusesatransformationthatfillstinyholesandsmoothsboundaries.

IMAQ_DILATE 2 Thefunctionusesatransformationthateliminatestinyholesisolatedinparticlesandexpandsthecontouroftheparticlesaccordingtothetemplatedefinedbythestructuring

Page 2542: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

element.IMAQ_ERODE 3 Thefunction

usesatransformationthateliminatespixelsisolatedinthebackgroundanderodesthecontourofparticlesaccordingtothetemplatedefinedbythestructuringelement.

IMAQ_GRADIENT 4 Thefunctionusesatransformationthatleavesonlythepixelsthatwouldbeaddedbythedilationprocessoreliminatedbytheerosionprocess.

IMAQ_GRADIENTOUT 5 Thefunctionusesatransformationthatleavesonlythepixelsthatwouldbeaddedbythedilationprocess.

Page 2543: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_GRADIENTIN 6 Thefunctionusesatransformationthatleavesonlythepixelsthatwouldbeeliminatedbytheerosionprocess.

IMAQ_HITMISS 7 Thefunctionusesatransformationthatextractseachpixellocatedinaneighborhoodexactlymatchingthetemplatedefinedbythestructuringelement.

IMAQ_OPEN 8 Thefunctionusesatransformationthatremovessmallparticlesandsmoothsboundaries.

IMAQ_PCLOSE 9 Thefunctionusesatransformationthatfillstinyholesandsmoothstheinnercontourofparticles

Page 2544: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

accordingtothetemplatedefinedbythestructuringelement.

IMAQ_POPEN 10 Thefunctionusesatransformationthatremovessmallparticlesandsmoothsthecontourofparticlesaccordingtothetemplatedefinedbythestructuringelement.

IMAQ_THICK 11 Thefunctionusesatransformationthataddstoanimagethosepixelslocatedinaneighborhoodthatmatchesatemplatespecifiedbythestructuringelement.

IMAQ_THIN 12 Thefunctionusesatransformationthateliminatespixelsthatarelocatedina

Page 2545: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

neighborhoodmatchingatemplatespecifiedbythestructuringelement.

IMAQ_MORPHOLOGY_METHOD_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2546: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

StructuringElementThesizeandcontentsofastructuringelementspecifywhichpixelsamorphologicaloperationtakesintoaccountwhendeterminingthenewvalueofthepixelbeingprocessed.Formoreinformationonstructuringelements,refertoChapter9,BinaryMorphology,intheNIVisionConceptsManual.Forexample,tosetupthe3x3kernel101101101calledmyStructuringElement,usethefollowingsyntax:myStructuringElement.matrixCols=3myStructuringElement.matrixRows=3myStructuringElement.hexa=FALSEmyStructuringElement.kernel=malloc(9*sizeof(int))myStructuringElement.kernel[0]=1myStructuringElement.kernel[1]=0myStructuringElement.kernel[2]=1myStructuringElement.kernel[3]=1myStructuringElement.kernel[4]=0myStructuringElement.kernel[5]=1myStructuringElement.kernel[6]=1myStructuringElement.kernel[7]=0myStructuringElement.kernel[8]=1Elements

Name Type Description

matrixCols int Numberofcolumnsinthematrix.matrixRows int Numberofrowsinthematrix.hexa int SetthiselementtoTRUEifyouspecifyahexagonal

structuringelementinkernel.SetthiselementtoFALSEifyouspecifyasquarestructuringelementinkernel.

kernel int* Thevaluesofthestructuringelement.Specifythesevaluesinorderfromthetop-leftofthekerneltothe

Page 2547: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

bottom-rightofthekernel.

Page 2548: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

HistogramReportAreportdescribingapixelvalueclassification.Elements

Name Type Description

histogram int* Anarraydescribingthenumberofpixelsthatfellintoeachclass.

histogramCount int Thenumberofelementsinthehistogramarray.ThenumberofelementsequalsthevalueyouprovidedinnumClasses.

min float Thesmallestpixelvaluethatthefunctionclassified.

max float Thelargestpixelvaluethatthefunctionclassified.

start float Thesmallestpixelvaluethatfellintothefirstclass.

width float Thesizeofeachclass.mean float Themeanvalueofthepixelsthatthefunction

classified.stdDev float Thestandarddeviationofthepixelsthatthe

functionclassified.numPixels int Thenumberofpixelsthatthefunction

classified.Themaskandthegivenminandmaxinfluencethiselement.

Page 2549: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LearnCalibrationOptionsDescribeshowafunctionlearnscalibrationinformationorthecalibrationoptionstheuserprovidedwhenlearningthecalibration.Elements

Name Type Description

mode CalibrationMode Specifiesthetypeofalgorithmyouwanttousetoreducedistortioninyourimage.WhenusingLearnCalibrationOptionsasaninput,setmodetoeitherIMAQ_PERSPECTIVEorIMAQ_NONLINEAR.

method ScalingMethod Definesthescalingmethodcorrectionfunctionsusetocorrecttheimage.

roi CalibrationROI SpecifiestheROIcorrectionfunctionsusewhencorrectinganimage.

learnMap int SetthiselementtoTRUEifyouwantthefunctiontocalculateandstoreanerrormapduringthelearningprocess.Theimageerrormapreflectserrorboundsonthecalibrationtransformation.Theerrormapisanestimateofthepositionalerrorthatyoucanexpectwhenyouconvertapixelcoordinateintoareal-worldcoordinate.

learnTable int SetthiselementtoTRUEifyouwantthefunctiontocalculateandstorethecorrectiontable.Thecorrectiontableacceleratestheprocessofcorrectinganimage.Itisusefulifyouplantocorrectseveralimagesusingthiscalibrationsetup.

Page 2550: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

GridDescriptorContainsscalingconstantsforanimage.Elements

Name Type Description

xStep float Thedistanceinthexdirectionbetweentwoadjacentpixelsinunitsspecifiedbyunit.

yStep float Thedistanceintheydirectionbetweentwoadjacentpixelsinunitsspecifiedbyunit.

unit CalibrationUnit Theunitofmeasurefortheimage.

Page 2551: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

RangeFloatDescribesarangeofdesiredvalues.Elements

Name Type Description

minValue float Theminimumvalueoftherange.maxValue float Themaximumvalueoftherange.

Page 2552: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CalibrationPointsAsetofreferencepointsafunctionusestolearncalibrationinformation.Elements

Name Type Description

pixelCoordinates PointFloat* Thearrayofpixelcoordinates.realWorldCoordinates PointFloat* Thearrayofcorrespondingreal-

worldcoordinates.numCoordinates int Thenumberofcoordinatesinboth

ofthearrays.

Page 2553: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ColorInformationInformationaboutthecolorfeaturescontainedinaregionofanimage.Elements

Name Type Description

infoCount int Thesizeoftheinfoarray.saturation int Thesaturationlevelthefunctionusestolearnthe

colorinformation.info double* Anarrayofcolorinformationthatrepresentsthe

colorspectrumanalysisofaregionofanimageinacompactform.

Page 2554: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ColorSensitivitySpecifiesthecomplexityofthecolorinformationintheimage.Inmostcases,setthisparametertoIMAQ_SENSITIVITY_LOW.However,setthisparametertoIMAQ_SENSITIVITY_HIGHtousemoreinformationandbetterdistinguishcolorsinhighlycompleximages.Ascomplexityincreases,sodoessensitivity.TwosimilarcolorsthatmaybeidentifiedasbeingthesamewithIMAQ_SENSITIVITY_LOWmaybeidentifiedasdifferentcolorswithIMAQ_SENSITIVITY_HIGH.RefertotheNIVisionConceptsManualformoreinformationaboutcolorsensitivity.Elements

Name Value Description

IMAQ_SENSITIVITY_LOW 0 Instructsthealgorithmtodividethehueplaneintoalownumberofsectors,allowingforsimplecoloranalysis.

IMAQ_SENSITIVITY_MED 1 Instructsthealgorithmtodividethehueplaneintoamediumnumberofsectors,allowingforcoloranalysisthatbalancessensitivity

Page 2555: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

andcomplexity.

IMAQ_SENSITIVITY_HIGH 2 Instructsthealgorithmtodividethehueplaneintoahighnumberofsectors,allowingforcomplex,sensitivecoloranalysis.

IMAQ_COLOR_SENSITIVITY_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2556: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LearnColorPatternOptionsDescribestheinformationthealgorithmlearnsaboutacolorpattern.Elements

Name Type Description

learnMode LearningMode Specifiestheinvariancemodethefunctionuseswhenlearningthepattern.

featureMode ImageFeatureMode Specifiesthefeaturesthefunctionuseswhenlearningthecolorpattern.IfyousetlearnModetoeitherIMAQ_LEARN_ALLorIMAQ_LEARN_ROTATION_INFORMATION,featureModemusteitherbeIMAQ_COLOR_AND_SHAPE_FEATURESorIMAQ_SHAPE_FEATURES.

threshold int Specifiesthesaturationthresholdthefunctionusestodistinguishbetweentwocolorsthathavethesamehuevalues.Acceptablevaluesrangefrom0to255.

ignoreMode ColorIgnoreMode Specifieswhetherthefunctionexcludescertaincolorsfromthecolorfeaturesofthetemplateimage.Anycolorthefunctionexcludesduringthelearningprocesswillalsobeexcludedinthematchphase.

colorsToIgnore ColorInformation* AnarrayofColorInformationstructuresprovidingasetofcolorstoexcludefromthecolorfeaturesofthetemplateimage.ThefunctionignoresthedominantcolorfromeachColorInformationstructure.Anycolorexcludedduringthelearningprocessisalsoignoredfromthepatterninthematchphase.GenerateeachColorInformationstructureusingimaqLearnColor()withthesensitivityparametersettoIMAQ_SENSITIVITY_HIGH.SetthiselementtoNULLifyoudonotneedto

Page 2557: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ignoreanycolors.numColorsToIgnore int ThenumberofColorInformationstructures

inthecolorsToIgnorearray.

Page 2558: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LearnGeometricPatternAdvancedOptionsAdvancedoptionsfordeterminingtheinformationthealgorithmlearnsaboutthegeometricpattern.Elements

Name Type Description

minRectLength int Specifiestheminimumlengthforeachsideofarectangularfeature.ThefunctionignoresrectangularfeatureswithasideshorterthanminRectLength.

minRectAspectRatio double Specifiestheminimumaspectratioofarectangularfeature.ThefunctionignoresrectangularfeatureswithaspectratioslessthanminRectAspectRatio.

minRadius int Specifiestheminimumradiusforacircularfeature.ThefunctionignorescircularfeatureswithradiilessthanminRadius.

minLineLength int Specifiestheminimumlengthforalinearfeature.ThefunctionignoreslinearfeatureswithlengthsshorterthanminLineLength.

minFeatureStrength double Specifiestheminimumstrengthforafeature.ThefunctionignoresfeatureswithastrengthlessthanminFeatureStrength.Validvaluesforthiselementrangefrom0to1.

maxFeaturesUsed int Specifiesthemaximumnumberoffeaturesthefunctionuseswhenlearning.Setthiselementto0tospecifythatthefunctionshoulduseallfeatures.

Page 2559: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

maxPixelDistanceFromLine int Specifiesthemaximumnumberofpixelsbetweenanedgepixelandalinearfeatureforthefunctiontoconsiderthatedgepixelaspartofthelinearfeature.

Page 2560: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LearningModeSpecifiestheinvariancemodethefunctionuseswhenlearningthepattern.Elements

Name Value Description

IMAQ_LEARN_ALL 0 Thefunctionextractsinformationforshift-androtation-invariantmatching.

IMAQ_LEARN_SHIFT_INFORMATION 1 Thefunctionextractsinformationforshift-invariantmatching.

IMAQ_LEARN_ROTATION_INFORMATION 2 Thefunctionextractsinformationforrotation-invariantmatching.

IMAQ_LEARNING_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2561: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LearnPatternAdvancedOptionsDescribeshowthealgorithmlearnsthepattern.Elements

Name Type Description

shiftOptions LearnPatternAdvancedShiftOptions* UsethiselementtocontrolthebehaviorofimaqLearnPattern2()duringtheshift-invariantlearningphase.

rotationOptions LearnPatternAdvancedRotationOptions* UsethiselementtocontrolthebehaviorofimaqLearnPattern2()therotation-invariantlearningphase.

Page 2562: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LineProfileAreportcontaininginformationaboutaline.Elements

Name Type Description

profileData float* Anarraycontainingthevalueofeachpixelintheline.

boundingBox Rect Theboundingrectangleoftheline.min float Thesmallestpixelvalueinthelineprofile.max float Thelargestpixelvalueinthelineprofile.mean float Themeanvalueofthepixelsinthelineprofile.stdDev float Thestandarddeviationofthelineprofile.dataCount int ThesizeoftheprofileDataarray.

Page 2563: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LinearAveragesThelinearaveragesofanimage.Elements

Name Type Description

columnAverages float* Anarraycontainingthemeanpixelvalueofeachcolumn.

columnCount int ThenumberofelementsinthecolumnAveragesarray.

rowAverages float* Anarraycontainingthemeanpixelvalueofeachrow.

rowCount int ThenumberofelementsintherowAveragesarray.

risingDiagAverages float* Anarraycontainingthemeanpixelvalueofeachdiagonalrunningfromthelowerlefttotheupperrightoftheinspectedareaoftheimage.

risingDiagCount int ThenumberofelementsintherisingDiagAveragesarray.

fallingDiagAverages float* Anarraycontainingthemeanpixelvalueofeachdiagonalrunningfromtheupperlefttothelowerrightoftheinspectedareaoftheimage.

fallingDiagCount int ThenumberofelementsinthefallingDiagAveragesarray.

Page 2564: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LinearAveragesModeSpecifieswhichmeanlineprofilesthefunctioncalculates.Usebitwise-ORtocombinetwoormorevaluesinordertocalculatemultiplemeanlineprofileswithonefunctioncall.Elements

Name Value Description

IMAQ_COLUMN_AVERAGES 1 Specifiesthatthefunctioncalculatesthemeanpixelvalueofeachcolumn.

IMAQ_ROW_AVERAGES 2 Specifiesthatthefunctioncalculatesthemeanpixelvalueofeachrow.

IMAQ_RISING_DIAGONAL_AVERAGES 4 Specifiesthatthefunctioncalculatesthemeanpixelvalueofeachdiagonalrunningfromthelowerlefttotheupperrightoftheinspected

Page 2565: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

areaoftheimage.

IMAQ_FALLING_DIAGONAL_AVERAGES 8 Specifiesthatthefunctioncalculatesthemeanpixelvalueofeachdiagonalrunningfromtheupperlefttothelowerrightoftheinspectedareaoftheimage.

IMAQ_ALL_LINEAR_AVERAGES 15 Specifiesthatthefunctioncalculatesallfourlinearmeanpixelvalues.

IMAQ_LINEAR_AVERAGES_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2566: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LineGaugeMethodThemeasurementmethodforthegaugetool.Elements

Name Value Description

IMAQ_EDGE_TO_EDGE 0 Measuresfromthefirstedgeonthelinetothelastedgeontheline.

IMAQ_EDGE_TO_POINT 1 Measuresfromthefirstedgeonthelinetotheendpointoftheline.

IMAQ_POINT_TO_EDGE 2 Measuresfromthestartpointofthelinetothefirstedgeontheline.

IMAQ_POINT_TO_POINT 3 Measuresfromthestartpointofthelinetotheendpointoftheline.

IMAQ_LINE_GAUGE_METHOD_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2567: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ButtonLabelSpecifiesthelabelontheOKbuttonofanimagedialog.Elements

Name Value Description

IMAQ_BUTTON_OK 0 Thelabel"OK".IMAQ_BUTTON_SAVE 1 Thelabel"Save".IMAQ_BUTTON_SELECT 2 Thelabel

"Select".IMAQ_BUTTON_LOAD 3 Thelabel"Load".IMAQ_BUTTON_LABEL_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2568: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LocalThresholdMethodThemethodthefunctionusestoperformthelocalthreshold.Elements

Name Value Description

IMAQ_NIBLACK 0 ThefunctioncomputesthresholdsforeachpixelbasedonitslocalstatisticsusingtheNiblacklocalthresholdingalgorithm.

IMAQ_BACKGROUND_CORRECTION 1 Thefunctionperformsbackgroundcorrectionfirsttoeliminatenon-uniformlightingeffects,thenperformsthresholdingusingtheOtsuthresholdingalgorithm.

IMAQ_LOCAL_THRESHOLD_METHOD_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2569: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ObjectTypeSpecifiesthetypeofobjectsthefunctiondetects.Elements

Name Value Description

IMAQ_BRIGHT_OBJECTS 0 Thefunctiondetectsbrightobjects.

IMAQ_DARK_OBJECTS 1 Thefunctiondetectsdarkobjects.

IMAQ_OBJECT_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2570: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

MatchColorPatternOptionsDescribeshowyouwantthefunctiontosearchforthecolortemplateimage.Elements

Name Type Description

matchMode MatchingMode Specifiesthemethodtousewhenlookingforthecolorpatternintheimage.

featureMode ImageFeatureMode Specifiesthefeaturestousewhenlookingforthecolorpatternintheimage.

minContrast int Specifiestheminimumcontrastexpectedintheimage.

subpixelAccuracy int SetthisparametertoTRUEtoreturnareasintheimagethatmatchthepatternareawithsubpixelaccuracy.

angleRanges RotationAngleRange* Anarrayofangleranges,indegrees,whereeachrangespecifieshowmuchyouexpectthepatterntoberotatedintheimage.Todecreasethesearchtime,limitthedegreesofrotationinwhichyouexpecttofindthetemplateimage.SetthiselementtoNULLtoallowallangles.

Page 2571: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

numRanges int NumberofanglerangesintheangleRangesarray.

colorWeight double Determinesthepercentcontributionofthecolorscoretothefinalcolorpatternmatchingscore.Acceptablevaluesrangefrom0to1,000.Thealgorithmusesthecolorweightforthefinalmatchranking.Forexample,ifyouuseaweightof1,000,thealgorithmfindseachmatchbyusingbothcolorandshapeinformationandthenranksthematchesbasedontheircolorscores.Iftheweightis0,thematchesarerankedbasedontheirshapescores.Thedefaultis500,indicatingthatthematchscoreusesanequalcombinationofthecolorandshapescores.

sensitivity ColorSensitivity Specifiesthesensitivityofthecolorinformationintheimage.

strategy SearchStrategy Specifieshowthecolorfeaturesoftheimageareusedduringthesearchphase.

numMatchesRequested int Numberofvalidmatchesexpected.

Page 2572: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

minMatchScore float Theminimumscoreamatchcanhaveforthefunctiontoconsiderthematchvalid.Acceptablevaluesrangefrom0to1,000.

Page 2573: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

GeometricPatternMatch2Informationdescribingamatchedgeometricpattern.Elements

Name Type Description

position PointFloat Thelocationoftheoriginofthetemplateinthematch.

rotation float Therotationofthematchrelativetothetemplateimage,indegrees.

scale float Thesizeofthematchrelativetothesizeofthetemplateimage,expressedasapercentage.

score float Theaccuracyofthematch.Ascoreof1,000indicatesaperfectmatch,andascoreof0indicatesnomatch.

corner[4] PointFloat Anarrayoffourpointsdescribingtherectanglesurroundingthetemplateimage.

inverse int ThiselementisTRUEifthematchisaninverseofthetemplateimage.Forexample,thematchisawhiteobjectonablackbackgroundbutthetemplateimageisablackobjectonawhitebackground.ThiselementisFALSEifthematchandthetemplateimagehavethesamecontrastwiththeimagebackground.

occlusion float Thepercentageofthematchthatisoccluded.

templateMatchCurveScore float Theaccuracyofthematchobtainedbycomparingthetemplatecurvestothecurvesinthematchregion.Ascoreof1,000indicatesaperfectmatch,andascoreof0indicatesnomatch.

Page 2574: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

matchTemplateCurveScore float Theaccuracyofthematchobtainedbycomparingthecurvesinthematchregiontothetemplatecurves.Ascoreof1,000indicatesaperfectmatch,andascoreof0indicatesnomatch.ThiselementiscalculatedonlyifthematchTemplateCurveScoreelementoftheadvancedMatchOptionsparametertoimaqMatchGeometricPattern2()TRUE.

correlationScore float Theaccuracyofthematchobtainedbycomparingthetemplateimagetothematchregionusingacorrelationmetricthatcomparesthetworegionsasafunctionoftheirpixelvalues.Ascoreof1,000indicatesaperfectmatch,andascoreof0indicatesnomatch.ThiselementiscalculatedonlyifthecorrelationScoreelementoftheadvancedMatchOptionsparametertoimaqMatchGeometricPattern2()TRUE.

label String255 ThelabelcorrespondingtothismatchwhenthematchisreturnedbyimaqMatchMultipleGeometricPatterns()labelisanemptystringwhenthematchisreturnedbyimaqMatchGeometricPattern2()

featureData FeatureData* Thefeaturesusedinthismatch.numFeatureData int ThesizeofthefeatureDataarray.calibratedPosition PointFloat Thelocationoftheoriginofthe

templateinthematch.Iftheimagewherethematchisfoundisacalibratedimage,thenthisvalueisinreal-worldunits.Otherwise,thisvalueisthesameasposition.

Page 2575: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

calibratedRotation float Therotationofthematchrelativetothetemplateimage,indegrees.Iftheimagewherethematchisfoundisacalibratedimage,thenthisvalueisinreal-worldunits.Otherwise,thisvalueisthesameasrotation.

calibratedCorner[4] PointFloat Anarrayoffourpointsdescribingtherectanglesurroundingthetemplateimage.Iftheimagewherethematchisfoundisacalibratedimage,thenthisvaluedescribesthecalibratedrectangle.Otherwise,thisvalueisthesameascorner[4].

Page 2576: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

MatchGeometricPatternOptionsDescribeshowtomatchapatterngeometrically.Elements

Name Type Description

mode unsignedint SpecifiesthemethodimaqMatchGeometricPattern()whenlookingforthepatternintheimage.CombinevaluesfromtheGeometricMatchingModespecifythevalueofthiselement.

subpixelAccuracy int SetthiselementtoTRUEtospecifythatthefunctionshouldcalculatematchlocationswithsubpixelaccuracy.SetthiselementtoFALSEtospecifythatthefunctionshouldcalculatematchlocationswithpixelaccuracy.

angleRanges RangeFloat* Anarrayofangleranges,indegrees,whereeachrangespecifieshowmuchyouexpectthetemplatetoberotatedintheimage.Todecreasethesearchtime,limitthedegreesofrotationinwhichyouexpecttofindthetemplateimage.SetthiselementtoNULLtoallowallangles.ThisfunctionignorestheserangesifnotincludeIMAQ_GEOMETRIC_MATCH_ROTATION_INVARIANT.

numAngleRanges int NumberofanglerangesintheangleRangesscaleRange RangeFloat Arangethatspecifiesthesizesofthepatternyouexpect

tobeintheimage,expressedasaratiopercentagerepresentingthesizeofthepatternintheimagedividedbysizeoftheoriginalpatternmultipliedby100.ThisfunctionignoresthisrangeifmodeIMAQ_GEOMETRIC_MATCH_SCALE_INVARIANT.

occlusionRange RangeFloat Arangethatspecifiesthepercentageofthepatternyouexpecttobeoccludedintheimage.ThisfunctionignoresthisrangeifmodedoesnotincludeIMAQ_GEOMETRIC_MATCH_OCCLUSION_INVARIANT.

numMatchesRequested int Numberofvalidmatchesexpected.minMatchScore float Theminimumscoreamatchcanhaveforthefunctionto

Page 2577: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

considerthematchvalid.Acceptablevaluesrangefrom0to1,000.

Page 2578: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

MatchGeometricPatternAdvancedOptions2SpecifiesadvancedbehaviorsofimaqMatchGeometricPattern2(),whichcanbeusedtooptimizetheperformanceofthefunctionortofine-tunethematcheslocatedbythefunction.Elements

Name Type Description

minFeaturesUsed int Specifiestheminimumnumberoffeaturesthefunctionuseswhenmatching.

maxFeaturesUsed int Specifiesthemaximumnumberoffeaturesthefunctionuseswhenmatching.Setthiselementto0tospecifythatthefunctionshoulduseallfeatures.

subpixelIterations int Specifiesthemaximumnumberofincrementalimprovementsusedtorefinematcheswithsubpixelinformation.

subpixelTolerance double Specifiesthemaximumamountofchange,inpixels,betweenconsecutiveincrementalimprovementsinthematchpositionbeforethefunctionstopsrefiningthematchposition.Setthiselementto0tospecifythatthefunctionshouldalwaysuseanumberofrefinementsequaltosubpixelIterations.IfyouprovidevaluesforbothsubpixelIterationsandsubpixelTolerance,thefunctionrefinesthematchfor,atmost,subpixelIterationsbutmay

Page 2579: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

stopearlyifsubpixelToleranceissatisfied.IfyousetsubpixelTolerance,thefunctionmayinvalidatematchesduringthesubpixelrefinementprocess.However,usingsubpixelIterationsalonecannotinvalidateamatch.

initialMatchListLength int Specifiesthemaximumsizeofthematchlist.Thematchlistcontainstheregionsintheinspectionimagethathavethehighestprobabilityofcontainingamatch.

matchTemplateCurveScore float Theaccuracyofthematchobtainedbycomparingthecurvesinthematchregiontothetemplatecurves.Ascoreof1,000indicatesaperfectmatch,andascoreof0indicatesnomatch.ThiselementiscalculatedonlyifthematchTemplateCurveScoreelementoftheadvancedMatchOptionsparametertoimaqMatchGeometricPattern()isTRUE.

correlationScore int SetthiselementtoTRUEtospecifythatthefunctionshouldcalculatethecorrelationscoreandreturnitforeachmatchresult.SetthisparametertoFALSEtospecifythatthefunctionshouldnotcalculatethecorrelationscore.

Page 2580: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

minMatchSeparationDistance double Specifiestheminimumseparationdistance,inpixels,betweentheoriginsoftwomatchesthathaveuniquepositions.Thefunctiondoesnotreturnmatchesthathavethesameposition,scale,andangle.Setthisvalueto–1ifyoudonotwantthefunctiontousethepositionofamatchtodeterminewhetherthematchisunique.

minMatchSeparationAngle double Specifiestheminimumangulardifference,indegrees,betweentwomatchesthathaveuniqueangles.Thefunctiondoesnotreturnmatchesthathavethesameposition,scale,andangle.Setthisvalueto–1ifyoudonotwantthefunctiontousetheangleofamatchtodeterminewhetherthematchisunique.

minMatchSeparationScale double Specifiestheminimumdifferenceinscale,expressedasapercentage,betweentwomatchesthathaveuniquescales.Thefunctiondoesnotreturnmatchesthathavethesameposition,scale,andangle.Setthisvalueto–1ifyoudonotwantthefunctiontousethescaleofamatchtodeterminewhetherthematchisunique.

maxMatchOverlap double Specifiesthemaximumamountofoverlap,expressedasapercentage,allowedbetweentheboundingrectanglesoftwouniquematches.Thefunctiondoesnotreturnmatchesthat

Page 2581: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

exceedthisoverlappercentage.Setthisvalueto–1ifyouwantthefunctiontoignoreboundingrectangleoverlap.

coarseResult int Specifieswhetheryouwantthefunctiontospendlesstimeaccuratelyestimatingthelocationofamatch.SetthisvaluetoTRUEifyouwanttoquicklydeterminewhetherapartispresentintheinspectionimagewithoutanaccurateestimateofitsposition,angle,andscale.SetthisvaluetoFALSEtospecifythatthefunctionreturnsmatcheswithpixelorsubpixelaccuracy.

smoothContours int SetthiselementtoTRUEtospecifysmoothingbedoneonthecontoursoftheinspectionimagebeforefeatureextraction.

enableCalibrationSupport int SetthiselementtoTRUEtospecifythealgorithmtreattheinspectionimageasacalibratedimage.UseimaqSetSimpleCalibration()orimaqSetCalibrationInfo()tocalibratetheinspectionimage.

Page 2582: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

MatchPatternOptionsDescribeshowyouwantthefunctiontosearchforthetemplateimage.

NoteimaqMatchPattern2()ignoresthematchFactorelementofMatchPatternOptions.UsetheinitialMatchListLengthandmatchListReductionFactorelementsofMatchPatternAdvancedOptionstocontrolthelistofpotentialmatchesthatimaqMatchPattern2examines.

Elements

Name Type Description

mode MatchingMode Specifiesthemethodtousewhenlookingforthepatternintheimage.

minContrast int Specifiestheminimumcontrastexpectedintheimage.

subpixelAccuracy int SetthiselementtoTRUEtoreturnareasintheimagethatmatchthepatternareawithsubpixelaccuracy.

angleRanges RotationAngleRange* Anarrayofangleranges,indegrees,whereeachrangespecifieshowmuchyouexpectthepatterntoberotatedintheimage.Todecreasethesearchtime,limitthedegreesofrotationinwhichyouexpecttofindthetemplateimage.SetthiselementtoNULLtoallowallangles.

numRanges int Numberofangleranges

Page 2583: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

intheangleRangesarray.

numMatchesRequested int Numberofvalidmatchesexpected.

matchFactor int Controlsthenumberofpotentialmatchesthatthefunctionexamines.Acceptablevaluesrangefrom0to1,000.Formostapplications,setmatchFactorto0,whichoptimizesthespeedofthealgorithm.IfyouarenotgettingallofthenumMatchesRequested,increasingthisfactormayincreasethenumberofmatchesyoureceivebutdecreasesthespeedofthealgorithm.Normally,increasingmatchFactorisnecessaryonlywhenlookingformorethan200matchesperimage.

minMatchScore float Theminimumscoreamatchcanhaveforthefunctiontoconsiderthematchvalid.

Page 2584: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ShapeReportDescribesamatchtoagiventemplateshape.Elements

Name Type Description

coordinates Rect Theboundingrectangleoftheobject.centroid Point Thecoordinatelocationofthecentroidofthe

object.size int Thesize,inpixels,oftheobject.score double Avaluerangingbetween1and1,000thatspecifies

howsimilartheobjectintheimageistothetemplate.Ascoreof1,000indicatesaperfectmatch.

Page 2585: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

MathTransformMethodThetransformfunctionafunctionuses.Elements

Name Value Description

IMAQ_TRANSFORM_LINEAR 0 Thefunctionuseslinearremapping.

IMAQ_TRANSFORM_LOG 1 Thefunctionuseslogarithmicremapping.Enhancescontrastforsmallpixelvaluesandreducescontrastforlargepixelvalues.

IMAQ_TRANSFORM_EXP 2 Thefunctionusesexponentialremapping.Enhancescontrastforlargepixelvaluesandreducescontrastforsmallpixelvalues.

IMAQ_TRANSFORM_SQR 3 Thefunctionusessquareremapping.

Page 2586: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Similartoexponentialremappingbutwithamoregradualeffect.

IMAQ_TRANSFORM_SQRT 4 Thefunctionusessquarerootremapping.Similartologarithmicremappingbutwithamoregradualeffect.

IMAQ_TRANSFORM_POWX 5 ThefunctionusespowerXremapping.Causesvariableeffectdependingonpower.

IMAQ_TRANSFORM_POW1X 6 Thefunctionusespower1/Xremapping.Causesvariableeffectdependingonpower.

IMAQ_MATH_TRANSFORM_METHOD_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2587: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

MeasurementTypeVariousmeasurementsthatcanbetakenonaparticle.RefertotheNIVisionConceptsManualforfurtherdiscussionofthesemeasurements.Elements

Name Value

IMAQ_MT_CENTER_OF_MASS_X 0

IMAQ_MT_CENTER_OF_MASS_Y 1

IMAQ_MT_FIRST_PIXEL_X 2

Page 2588: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_MT_FIRST_PIXEL_Y 3

IMAQ_MT_BOUNDING_RECT_LEFT 4

IMAQ_MT_BOUNDING_RECT_TOP 5

IMAQ_MT_BOUNDING_RECT_RIGHT 6

IMAQ_MT_BOUNDING_RECT_BOTTOM 7

IMAQ_MT_MAX_FERET_DIAMETER_START_X 8

IMAQ_MT_MAX_FERET_DIAMETER_START_Y 9

Page 2589: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_MT_MAX_FERET_DIAMETER_END_X 10

IMAQ_MT_MAX_FERET_DIAMETER_END_Y 11

IMAQ_MT_MAX_HORIZ_SEGMENT_LENGTH_LEFT 12

IMAQ_MT_MAX_HORIZ_SEGMENT_LENGTH_RIGHT 13

IMAQ_MT_MAX_HORIZ_SEGMENT_LENGTH_ROW 14

Page 2590: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_MT_BOUNDING_RECT_WIDTH 16

IMAQ_MT_BOUNDING_RECT_HEIGHT 17

IMAQ_MT_BOUNDING_RECT_DIAGONAL 18

IMAQ_MT_PERIMETER 19

IMAQ_MT_CONVEX_HULL_PERIMETER 20

Page 2591: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_MT_HOLES_PERIMETER 21

IMAQ_MT_MAX_FERET_DIAMETER 22

IMAQ_MT_EQUIVALENT_ELLIPSE_MAJOR_AXIS 23

IMAQ_MT_EQUIVALENT_ELLIPSE_MINOR_AXIS 24

IMAQ_MT_EQUIVALENT_ELLIPSE_MINOR_AXIS_FERET 25

Page 2592: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_MT_EQUIVALENT_RECT_LONG_SIDE 26

IMAQ_MT_EQUIVALENT_RECT_SHORT_SIDE 27

IMAQ_MT_EQUIVALENT_RECT_DIAGONAL 28

IMAQ_MT_EQUIVALENT_RECT_SHORT_SIDE_FERET 29

Page 2593: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_MT_AVERAGE_HORIZ_SEGMENT_LENGTH 30

IMAQ_MT_AVERAGE_VERT_SEGMENT_LENGTH 31

IMAQ_MT_HYDRAULIC_RADIUS 32

IMAQ_MT_WADDEL_DISK_DIAMETER 33

IMAQ_MT_AREA 35

IMAQ_MT_HOLES_AREA 36

IMAQ_MT_PARTICLE_AND_HOLES_AREA 37

IMAQ_MT_CONVEX_HULL_AREA 38

Page 2594: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_MT_IMAGE_AREA 39

IMAQ_MT_NUMBER_OF_HOLES 41

IMAQ_MT_NUMBER_OF_HORIZ_SEGMENTS 42

IMAQ_MT_NUMBER_OF_VERT_SEGMENTS 43

IMAQ_MT_ORIENTATION 45

IMAQ_MT_MAX_FERET_DIAMETER_ORIENTATION 46

Page 2595: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_MT_AREA_BY_IMAGE_AREA 48

IMAQ_MT_AREA_BY_PARTICLE_AND_HOLES_AREA 49

IMAQ_MT_RATIO_OF_EQUIVALENT_ELLIPSE_AXES 50

IMAQ_MT_RATIO_OF_EQUIVALENT_RECT_SIDES 51

IMAQ_MT_ELONGATION_FACTOR 53

IMAQ_MT_COMPACTNESS_FACTOR 54

Page 2596: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_MT_HEYWOOD_CIRCULARITY_FACTOR 55

IMAQ_MT_TYPE_FACTOR 56

IMAQ_MT_SUM_X 58

IMAQ_MT_SUM_Y 59

IMAQ_MT_SUM_XX 60

IMAQ_MT_SUM_XY 61

IMAQ_MT_SUM_YY 62

IMAQ_MT_SUM_XXX 63

IMAQ_MT_SUM_XXY 64

Page 2597: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_MT_SUM_XYY 65

IMAQ_MT_SUM_YYY 66

IMAQ_MT_MOMENT_OF_INERTIA_XX 68

IMAQ_MT_MOMENT_OF_INERTIA_XY 69

IMAQ_MT_MOMENT_OF_INERTIA_YY 70

IMAQ_MT_MOMENT_OF_INERTIA_XXX 71

IMAQ_MT_MOMENT_OF_INERTIA_XXY 72

IMAQ_MT_MOMENT_OF_INERTIA_XYY 73

Page 2598: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_MT_MOMENT_OF_INERTIA_YYY 74

IMAQ_MT_NORM_MOMENT_OF_INERTIA_XX 75

IMAQ_MT_NORM_MOMENT_OF_INERTIA_XY 76

IMAQ_MT_NORM_MOMENT_OF_INERTIA_YY 77

IMAQ_MT_NORM_MOMENT_OF_INERTIA_XXX 78

IMAQ_MT_NORM_MOMENT_OF_INERTIA_XXY 79

Page 2599: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_MT_NORM_MOMENT_OF_INERTIA_XYY 80

IMAQ_MT_NORM_MOMENT_OF_INERTIA_YYY 81

IMAQ_MT_HU_MOMENT_1 82

IMAQ_MT_HU_MOMENT_2 83

IMAQ_MT_HU_MOMENT_3 84

IMAQ_MT_HU_MOMENT_4 85

IMAQ_MT_HU_MOMENT_5 86

IMAQ_MT_HU_MOMENT_6 87

IMAQ_MT_HU_MOMENT_7 88

IMAQ_MEASUREMENT_TYPE_SIZE_GUARD 0xFFFFFFFF

Page 2600: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

MulticoreOperationEnumerationinstructingimaqMulticoreOptionswhattodowiththeusersdata,andhowmanyprocessorstheuserwouldliketotakeadvantageof.Thedefaultistotakeadvantageofasmanycoresaspossible.Elements

Name Value Description

IMAQ_GET_CORES 0 ThenumberofprocessorcoresNIVisioniscurrentlyusing.

IMAQ_SET_CORES 1 ThenumberofprocessorcoresforNIVisiontouse.

IMAQ_USE_MAX_AVAILABLE 2 Usethemaximumnumberofavailableprocessorcores.

Page 2601: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ArcInfoDefinesthelocationandsizeofanarc.Elements

Name Type Description

boundingBox Rect Thecoordinatelocationoftheboundingboxofthearc.

startAngle double Thecounterclockwiseanglefromthex-axisindegreestothestartofthearc.

endAngle double Thecounterclockwiseanglefromthex-axisindegreestotheendofthearc.

Page 2602: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PointSymbolThesymboltorepresentapointinanoverlay.Elements

Name Value Description

IMAQ_POINT_AS_PIXEL 0 Asinglepixelrepresentsapointintheoverlay.

IMAQ_POINT_AS_CROSS 1 Acrossrepresentsapointintheoverlay.

IMAQ_POINT_USER_DEFINED 2 Thepatternsuppliedbytheuserrepresentsapointintheoverlay.

IMAQ_POINT_SYMBOL_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2603: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

UserPointSymbolDefinesasymbolthatfunctionscanusetorepresentpointsinanoverlay.Forexample,tosetupthe3x3symbol:

1 0 11 0 11 0 1

calledmySymbol,usethefollowingsyntax:mySymbol.cols=3mySymbol.rows=3mySymbol.pixels=malloc(9*sizeof(int))mySymbol.pixels[0]=1mySymbol.pixels[1]=0mySymbol.pixels[2]=1mySymbol.pixels[3]=1mySymbol.pixels[4]=0mySymbol.pixels[5]=1mySymbol.pixels[6]=1mySymbol.pixels[7]=0mySymbol.pixels[8]=1Elements

Name Type Description

cols int Numberofcolumnsinthesymbol.rows int Numberofrowsinthesymbol.pixels int* Thepixelsofthesymbol.Specifythesepixelsinorder

fromthetop-leftofthesymboltothebottom-rightofthesymbol.Thefunctionevaluateseachpixelaseitheroff(zerovalue)oron(non-zerovalue).

Page 2604: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

OverlayTextOptionsDescribeshowafunctionoverlaystext.Elements

Name Type Description

fontName constchar* Thenameofthefonttouse.Thefunctionprocessesonlythefirst32characters.

fontSize int Thesizeofthefont.bold int Setthiselementto

TRUEtoboldthetext.italic int Setthiselementto

TRUEtoitalicizethetext.

underline int SetthiselementtoTRUEtounderlinethetext.

strikeout int SetthiselementtoTRUEtostrikeoutthetext.

horizontalTextAlignment TextAlignment Setsthealignmentofthetext.

verticalTextAlignment VerticalTextAlignment Setstheverticalalignmentforthetext.

backgroundColor RGBValue Setsthecolorforthetextbackgroundpixels.

angle double Thecounterclockwiseangle,indegrees,ofthetextrelativetothex-axis.

Page 2605: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParticleFilterCriteria2Describesthecriteriausedtofilterparticlesintheimage.Elements

Name Type Description

parameter MeasurementType Themorphologicalmeasurementthatthefunctionusesforfiltering.

lower float Thelowerboundofthecriteriarange.upper float Theupperboundofthecriteriarange.calibrated int SetthiselementtoTRUEtotake

calibratedmeasurements.SetthiselementtoFALSEtotakepixelmeasurements.

exclude int SetthiselementtoTRUEtoindicatethatamatchoccurswhenthemeasurementisoutsidethecriteriarange.SetthiselementtoFALSEtoindicatethatamatchoccurswhenthemeasurementisinsidethecriteriarange.

Page 2606: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParticleFilterOptions2OptionsusedbyimaqParticleFiltertofilterbinaryparticles.Elements

Name Type Description

rejectMatches int SetthisparametertoTRUEtotransferonlythoseparticlesthatdonotmeetallthecriteria.SetthisparametertoFALSEtotransferonlythoseparticlesthatmeetallthecriteriatothedestination.

rejectBorder int SetthiselementtoTRUEtorejectborderparticles.SetthiselementtoFALSEtokeepborderparticles.

fillHoles int SetthiselementtoTRUEtofillholesinparticles.SetthiselementtoFALSEtokeeptheholesinparticles.

connectivity8 int SetthisparametertoTRUEtouseconnectivity-8todeterminewhetherparticlesaretouching.SetthisparametertoFALSEtouseconnectivity-4todeterminewhetherparticlesaretouching.Formoreinformationaboutconnectivity,refertoChapter9,BinaryMorphology,intheNIVisionConceptsManual.

Page 2607: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

QuantifyReportStatisticaldataofanimage.Elements

Name Type Description

global QuantifyData Statisticaldataofthewholeimage.regions QuantifyData* AnarrayofQuantifyDatastructures

containingstatisticaldataofeachregionoftheimage.RefertothemaskparameterofimaqQuantify()formoreinformationabouttheregions.

regionCount int Thenumberofregions.

Page 2608: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

RakeReport2Informationdescribingtherakeusedbythefunctionandtheedgesthefunctioncalculatedwiththerake.Elements

Name Type Description

firstEdges EdgeInfo* ThefirstedgepointdetectedalongeachsearchlineintheROI.

numFirstEdges unsignedint ThenumberofpointsinthefirstEdgesarray.

lastEdges EdgeInfo* ThelastedgepointdetectedalongeachsearchlineintheROI.

numLastEdges unsignedint ThenumberofpointsinthelastEdgesarray.

searchLines SearchLineInfo* Thesearchlinesusedforedgedetection.

numSearchLines unsignedint Thenumberofsearchlinesusedintheedgedetection.

Page 2609: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

BarcodeInfoContainsinformationaboutabarcode.Elements

Name Type Description

outputString constchar* Astringcontainingthedecodedbarcodedata.

size int Thesizeoftheoutputstring.outputChar1 char Thecontentsofthischaracterdepend

onthebarcodetype.ForIMAQ_CODABARthefunctionsetsoutputChar1tothestartcharacter.ForIMAQ_CODE128,thefunctionsetsoutputChar1totheFNCvalue.ForIMAQ_EAN8andIMAQ_EAN13,thefunctionsetsoutputChar1tothefirstcountrycode.Forallotherbarcodetypes,thefunctionsetsoutputChar1to0.

outputChar2 char Thecontentsofthischaracterdependonthebarcodetype.ForIMAQ_CODABAR,thefunctionsetsoutputChar2tothestopcharacter.ForIMAQ_EAN8andIMAQ_EAN13,thefunctionsetsoutputChar2tothesecondcountrycode.ForIMAQ_UPCA,thefunctionsetsoutputChar2tothesystemnumber.Forallotherbarcodetypes,thefunctionsetsoutputChar2to0.

confidenceLevel double Aqualitymeasureofthedecodedbarcoderangingfrom0to100,with100beingthebest.Thisvalueweighstheerrorinthewidthsofthebarsandspaceswiththesizeofthecharacterin

Page 2610: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

thebarcode.Ingeneral,aconfidenceLevelvalueoflessthan80meansthedecodedstringissuspect.NotethatconfidenceLevelisparticularlyusefulindecodingIMAQ_EAN13barcodesbecausetwelveofthethirteendatavaluesareencodedascharactersinthebarcode,andthethirteenthvalueisencodedbytheparityofthefirst12encodedcharacters.

type BarcodeType Thetypeofbarcode.

Page 2611: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

BarcodeTypeThetypeofabarcode.Elements

Name Value Description

IMAQ_INVALID 0xFFFFFFFF ReservedIMAQ_CODABAR 1 Thebarcodeis

oftypeCodabar.IMAQ_CODE39 2 Thebarcodeis

oftypeCode39.IMAQ_CODE93 4 Thebarcodeis

oftypeCode93.IMAQ_CODE128 8 Thebarcodeis

oftypeCode128.

IMAQ_EAN8 16 ThebarcodeisoftypeEAN8.

IMAQ_EAN13 32 ThebarcodeisoftypeEAN13.

IMAQ_I2_OF_5 64 ThebarcodeisoftypeCode25.

IMAQ_MSI 128 ThebarcodeisoftypeMSIcode.

IMAQ_UPCA 256 ThebarcodeisoftypeUPCA.

IMAQ_PHARMACODE 512 ThebarcodeisoftypePharmacode.

IMAQ_RSS_LIMITED 1024 ThebarcodeisoftypeRSSLimited.

Page 2612: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_BARCODE_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2613: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReadClassifierFileModeTheinformationtoreadfromaclassifierfile.Elements

Name Value Description

IMAQ_CLASSIFIER_READ_ALL 0 Readallinformationfromtheclassifierfile.

IMAQ_CLASSIFIER_READ_SAMPLES 1 Readonlythesamplesfromtheclassifierfile.

IMAQ_CLASSIFIER_READ_PROPERTIES 2 Readonlythepropertiesfromtheclassifierfile.

IMAQ_READ_CLASSIFIER_FILE_MODES_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2614: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ClassifierEngineTypeThetypeofanengineonaclassifiersession.Elements

Name Value Description

IMAQ_ENGINE_NONE 0 Noenginehasbeensetonthisclassifiersession.

IMAQ_ENGINE_NEAREST_NEIGHBOR 1 Nearestneighborengine.

IMAQ_CLASSIFIER_ENGINE_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2615: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DataMatrixReportDescribestheDataMatrixbarcodethatthefunctionread.Elements

Name Type Description

found int ThiselementisTRUEifthefunctionlocatedanddecodedaDataMatrixbarcodeandFALSEifthefunctionfailedtolocateanddecodeaDataMatrixbarcode.

binary int ThiselementisTRUEiftheDataMatrixbarcodecontainsbinarydataandFALSEiftheDataMatrixbarcodecontainstextdata.

data unsignedchar* ThedataencodedintheDataMatrixbarcode.dataLength unsignedint Thelengthofthedataarray.boundingBox[4] PointFloat Anarrayoffourpointsdescribingtherectangle

surroundingtheDataMatrixbarcode.numErrorsCorrected unsignedint Thenumberoferrorsthefunctioncorrectedwhen

decodingtheDataMatrixbarcode.numErasuresCorrected unsignedint Thenumberoferasuresthefunctioncorrected

whendecodingtheDataMatrixbarcode.aspectRatio float SpecifiestheaspectratiooftheDataMatrix

barcodeintheimage,whichequalstheratioofthewidthofaDataMatrixbarcodecell(inpixels)totheheightofaDataMatrixbarcodecell(inpixels).

rows unsignedint ThenumberofrowsintheDataMatrixbarcode.columns unsignedint ThenumberofcolumnsintheDataMatrix

barcode.ecc DataMatrixECC TheErrorCorrectionCode(ECC)usedbythe

DataMatrixbarcode.polarity DataMatrixPolarity ThepolarityoftheDataMatrixbarcode.cellFill DataMatrixCellFillMode ThecellfillpercentageoftheDataMatrixbarcode.borderIntegrity float ThepercentageoftheDataMatrixbarcodeborder

Page 2616: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

thatappearscorrectlyintheimage.mirrored int ThiselementisTRUEiftheDataMatrixbarcode

appearsmirroredintheimageandFALSEiftheDataMatrixbarcodeappearsnormallyintheimage.

minimumEdgeStrength unsignedint ThestrengthoftheweakestedgethefunctionusedtofindthecoarselocationoftheDataMatrixbarcodeintheimage.UsethisvalueasaguideforsettingtheedgeThresholdsearchOptionsparameterofimaqReadDataMatrixBarcode2()

demodulationMode DataMatrixDemodulationMode ThedemodulationmodethefunctionusedtolocatetheDataMatrixbarcode.IfdemodulationModeIMAQ_AUTO_DETECT_DEMODULATION_MODEinthesearchOptionsimaqReadDataMatrixBarcode2()indicatestherecommendeddemodulationmodeforthisimage.

cellSampleSize DataMatrixCellSampleSize ThecellsamplesizethefunctionusedtolocatetheDataMatrixbarcode.IftoIMAQ_AUTO_DETECT_CELL_SAMPLE_SIZEinthesearchOptionsimaqReadDataMatrixBarcode2()indicatestherecommendedcellsamplesizeforthisimage.

cellFilterMode DataMatrixCellFilterMode ThecellfiltermodethefunctionusedtolocatetheDataMatrixbarcode.IfIMAQ_AUTO_DETECT_CELL_FILTER_MODEinthesearchOptionsimaqReadDataMatrixBarcode2()indicatestherecommendedcellfiltermodeforthisimage.

iterations unsignedint ThenumberofiterationsthefunctiontookinattemptingtolocatetheDataMatrixbarcode.IfthisnumberisequaltotheelementofthesearchOptions

Page 2617: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

imaqReadDataMatrixBarcode2()failedtolocatetheDataMatrixbarcode,youmaybeabletolocatetheDataMatrixbarcodebyincreasingmaximumIterations

Page 2618: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DataMatrixGradingModeSpecifiesifthefunctionshouldmakecalculationsneededtopreparetogradetheDataMatrixbarcode.Elements

Name Value Description

IMAQ_NO_GRADING 0 Thefunctiondoesnotmakeanypreparatorycalculations.AttemptstogradethisDataMatrixbarcodewillgenerateanerror.

IMAQ_PREPARE_FOR_AIM 1 ThefunctionpreparestheimageforgradingusingtheAIMPrintQualitymetrics.

IMAQ_DATA_MATRIX_GRADING_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2619: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DataMatrixDescriptionOptionsSpecifiesthedescriptionoptionsthefunctionuseswhensearchingfortheDataMatrixbarcodeintheimage.Elements

Name Type Description

aspectRatio float SpecifiestheratioofthewidthofeachDataMatrixbarcodecell(inpixels)totheheightoftheDataMatrixbarcode(inpixels).Settingthisvalueto0indicatesthefunctionshoulddeterminetheaspectratio.

rows unsignedint SpecifiesthenumberofrowsintheDataMatrixbarcode.Settingthisvalueto0indicatesthefunctionshoulddeterminethenumberofrows.

columns unsignedint SpecifiesthenumberofcolumnsintheDataMatrixbarcode.Settingthisvalueto0indicatesthefunctionshoulddeterminethenumberofcolumns.

rectangle int SetthiselementtoTRUEtospecifythattheDataMatrixbarcodeisrectangular.SetthiselementtoFALSEtospecifythattheDataMatrixbarcodeissquare.Ifbothrowsandcolumnsare

Page 2620: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

non-zero,thefunctionwillignorethiselement.

ecc DataMatrixECC SpecifiestheECCusedforthisDataMatrixbarcode.

polarity DataMatrixPolarity Specifiesthedata-to-backgroundcontrastfortheDataMatrixbarcode.

cellFill DataMatrixCellFillMode SpecifiesthefillpercentageforacelloftheDataMatrixbarcodethatisinthe"ON"state.

minBorderIntegrity float Specifiestheminimumpercentageoftheborder(locatorpatternandtimingpattern)thefunctionshouldexpectintheDataMatrixbarcode.Duringthelocationphase,thefunctionwillignorepossibleDataMatrixbarcodecandidatesthatdonothaveatleastthislevelofborderintegrity.

mirrorMode DataMatrixMirrorMode SpecifiesiftheDataMatrixbarcodeappearsnormallyintheimageorifthebarcodeappearsmirroredintheimage.

Page 2621: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DataMatrixSizeOptionsContainsthesizeoptionsthefunctionuseswhensearchingforaDataMatrixbarcodeintheimage.Elements

Name Type Description

minSize unsignedint

Specifiestheminimumsize(inpixels)oftheDataMatrixbarcodeintheimage.Settingthisvalueto0indicatesthefunctionshouldneverexcludeaDataMatrixbarcodecandidatebecauseitistoosmall.

maxSize unsignedint

Specifiesthemaximumsize(inpixels)oftheDataMatrixbarcodeintheimage.Settingthisvalueto0indicatesthefunctionshouldneverexcludeaDataMatrixbarcodecandidatebecauseitistoolarge.

quietZoneWidth unsignedint

Specifiestheexpectedminimumsizeofthequietzone,inpixels.ThefunctionwillignoreDataMatrixbarcodecandidateswhosequietzonesaresmallerthanthisvalue.

Page 2622: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DataMatrixSearchOptionsSpecifiesthesearchoptionsthefunctionuseswhensearchingfortheDataMatrixbarcodeintheimage.Elements

Name Type Description

rotationMode DataMatrixRotationMode SpecifiestheamountofDataMatrixbarcoderotationthefunctionshouldallowfor.

skipLocation int IfsettoTRUE,specifiesthatthefunctionshouldassumethattheDataMatrixbarcodeoccupiestheentireimage(ortheentiresearchregion).Thefunctionthenskipsthelocationphase,movingimmediatelytoextractionanddecoding.IfFALSE,thefunctiondoesnotmakeanyassumptionsaboutthepercentageoftheimage

Page 2623: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

occupiedbytheDataMatrixbarcode.

edgeThreshold unsignedint Specifiestheminimumcontrastapixelmusthaveinordertobeconsideredpartofamatrixcelledge.Thelowerthisvalue,themorepotentialedgecandidatesthefunctionwillexamineduringthelocationphase.Settingthisvaluetoolowwilldecreasetheperformanceofthefunctionbecausethefunctionwillexaminetoomanypotentialedgecandidates.Settingthisvaluetoohighmayalsodecreasetheperformanceofthefunctionbyremovingvalidedge

Page 2624: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

candidates,makinglocationrequiremoreiterations.SettingthisvaluetoohighmayalsocausethefunctiontofailtoidentifytheDataMatrixbarcodebecausetoomanycandidatesareeliminated.

demodulationMode DataMatrixDemodulationMode Specifiesthemodethefunctionshouldusetodemodulate(determinewhichcellsareonandwhichcellsareoff)theDataMatrixbarcode.

cellSampleSize DataMatrixCellSampleSize Specifiesthesamplesize,inpixels,thefunctionshouldtaketodetermineifeachcellisonoroff.

cellFilterMode DataMatrixCellFilterMode Specifiesthemodethefunctionusestodeterminethe

Page 2625: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

pixelvalueforeachcell.IfcellSampleSizeisIMAQ_1x1,thevalueofthesinglesampledpixelalwaysdeterminesthepixelvalueforthecellandthefunctionignoresthiselement.

skewDegreesAllowed unsignedint SpecifiestheamountofskewintheDataMatrixbarcodethefunctionshouldallowfor.

maxIterations unsignedint SpecifiesthemaximumnumberofiterationsbeforethefunctionstopslookingfortheDataMatrixbarcode.

initialSearchVectorWidth unsignedint Specifiesthenumberofpixelsthefunctionshouldaveragetogethertodeterminethelocationofanedge.Youmayneedtoincreasethisvaluewhenthe

Page 2626: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DataMatrixhascellswithalowfillpercentage.

Page 2627: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LCDReportDescribesthestateofanLCD.Elements

Name Type Description

text constchar* AstringofthecharactersoftheLCD.segmentInfo LCDSegments* AnarrayofLCDSegmentstructures

describingwhichsegmentsofeachdigitareon.

numCharacters int Thenumberofcharactersthatthefunctionreads.DescribesthenumberofelementsinthesegmentInfoarray.

reserved int Thiselementisreserved.

Page 2628: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReadTextOptionsNIVisionconfigurationsettingsyouwanttouseduringthereadingprocess.RefertotheNIOCRTrainingInterfaceHelpformoreinformation.Elements

Name Type Description

validChars[255] String255 Anarrayofstringsthatspecifiesthevalidcharacters.ThestringateachindexinthearrayspecifiesthevalidcharactersforthecorrespondingcharacterpositionintheROI.Youcanspecifyastringofvalidcharactersforeachelementofthearray,oryoucanuseoneofthepredefinedstringsofcharactersfromthefollowingtable.

IdentifierIMAQ_OCR_UPPERCASEIMAQ_OCR_LOWERCASEIMAQ_OCR_ALPHABETICIMAQ_OCR_DECIMAL_DIGITSIMAQ_OCR_ALPHANUMERICIMAQ_OCR_HEXADECIMAL_DIGITSIMAQ_OCR_PATTERNIMAQ_OCR_FORCE_SPACE

numValidChars int ThenumberofstringsinthevalidCharsarraythatyouhaveinitialized.Acceptablevaluesrangefrom0to255.Setthiselementto0tospecifythatallcharactersarevalidforallpositions.

substitutionChar char Thecharactertosubstituteforobjectsthatthefunctioncannotmatchwithanyofthetrainedcharacters.readStrategy ReadStrategy Thereadstrategy,whichdetermineshowcloselythefunctionanalyzesimagesinthereadingprocesstomatchobjects

withtrainedcharacters.acceptanceLevel int Theminimumacceptancelevelatwhichanobjectisconsideredatrainedcharacter.Acceptablevaluesrangefrom0to

1000.aspectRatio int Themaximumaspectratiovariancepercentageforvalidcharacters.Theminimumvalueforthiselementis100,which

specifiesthatidentifiedobjectsarevalidonlyiftheymatchthetrainedcharacterexactlyinsizeandheight/widthratio.SetthiselementtoIMAQ_ASPECT_RATIO_INDEPENDENT

Page 2629: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

readResolution ReadResolution Thereadresolution,whichdetermineshowmuchofthetrainedcharacterdatathefunctionusestomatchobjectstotrainedcharacters.

Page 2630: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

OCRProcessingOptionsConfigureshowNIVisionprocessestheimagebeforetrainingorreadingcharacters.RefertotheNIOCRTrainingInterfaceHelpformoreinformation.Elements

Name Type Description

mode ThresholdMode Thethresholdingmode.lowThreshold int Thelowthresholdvalue

whenyousetmodetoIMAQ_FIXED_RANGE.Forotherthresholdmodes,thisparameterspecifiesthelowerlimitofthecalculatedthreshold.

highThreshold int ThehighthresholdvaluewhenyousetmodetoIMAQ_FIXED_RANGE.Forotherthresholdmodes,thisparameterspecifiesthehigherlimitofthecalculatedthreshold.

blockCount int Thenumberofblocksforthresholdcalculationalgorithmsthatrequireblocks.Validvaluesrangefrom4to50.

fastThreshold int SetthiselementtoTRUEtouseafaster,lessaccuratethresholdcalculationalgorithm.

Page 2631: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

biModalCalculation int SetthiselementtoTRUEtocalculateboththelowandhighthresholdvalueswhenusingthefastthresholdingmethod.SetthiselementtoFALSEtocalculateonlythehighthresholdvaluewhenreadingortrainingdarkcharactersandtocalculateonlythelowthresholdvaluewhenreadingortraininglightcharacters.ThisoptionisavailableonlywhenfastThresholdisTRUE.

darkCharacters int SetthiselementtoTRUEtoreadortraindarkcharactersonalightbackground.SetthiselementtoFALSEtoreadortrainlightcharactersonadarkbackground.

removeParticlesTouchingROI int SetthiselementtoTRUEtoremovetheparticlestouchingtheROI.

erosionCount int Thenumberoferosionstoperform.Afterperformingtheerosions,thefunctionrestorestheremainingobjectstotheiroriginalunerodedsize.Setthisattributeto0ifyoudonotwantto

Page 2632: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

removesmallparticles.

Page 2633: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

OCRSpacingOptionsCharactersizeandspacingconstraintsyouwanttouseduringthetrainingorreadingprocess.RefertotheNIOCRTrainingInterfaceHelpformoreinformation.Elements

Name Type Description

minCharSpacing int TheminimumnumberofpixelsthatmustbebetweentwocharactersforNIVisiontotrainorreadthecharactersseparately.ThisvaluecannotbelessthanmaxHorizontalElementSpacing.

minCharSize int Theminimumnumberofpixelsrequiredforanobjecttobeapotentiallyidentifiablecharacter.Theminimumacceptablevalueforthiselementis1.

maxCharSize int Themaximumnumberofpixelsrequiredforanobjecttobeapotentiallyidentifiablecharacter.Setthiselementto65536toindicatethatallcharactersizesgreaterthanminCharSizeareacceptable.

maxHorizontalElementSpacing int Themaximumhorizontalspacing,inpixels,allowedbetweencharacterelementstotrainorreadthecharacterelementsasasinglecharacter.ThisvaluecannotexceedminCharSpacing.Theminimumacceptablevaluefor

Page 2634: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

thiselementis0.maxVerticalElementSpacing int Themaximumverticalelement

spacinginpixels.ElementswhosespacingfromthemaincharacterelementexceedsmaxVerticalElementSpacingarenotusedfortrainingorreading.Setthiselementto0tospecifythatanyelementintheROIshouldbeconsideredpartofacharacter.

minBoundingRectWidth int Theminimumpossiblewidth,inpixels,foracharacterboundingrectangle.Theminimumacceptablevalueforthiselementis1.

maxBoundingRectWidth int Themaximumpossiblewidth,inpixels,foracharacterboundingrectangle.Setthispropertyto65,536tospecifythatallwidthsgreaterthanminBoundingRectWidthareacceptable.

minBoundingRectHeight int Theminimumpossibleheight,inpixels,foracharacterboundingrectangle.Theminimumacceptablevalueforthiselementis1.

maxBoundingRectHeight int Themaximumpossibleheight,inpixels,foracharacterboundingrectangle.Setthispropertyto65,536tospecifythatallheightsgreaterthanminBoundingRectHeightareacceptable.

autoSplit int SetthiselementtoTRUEtoautomaticallyadjustthelocation

Page 2635: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ofthecharacterboundingrectanglewhencharactersoverlapvertically.Thiselementisusefulwhenyouareworkingwithanimagethatcontainsslantedcharacters.Ifthecharactersarenotslantedand/ordonotoverlapvertically,setthiselementtoFALSE.

Page 2636: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Barcode2DInfoContainsinformationabouta2Dbarcode.Elements

Name Type Description

type Barcode2DType Thetypeofthe2Dbarcode.binary int ThiselementisTRUEifthe

2DbarcodecontainsbinarydataandFALSEifthe2Dbarcodecontainstextdata.

data unsignedchar* Thedataencodedinthe2Dbarcode.

dataLength unsignedint Thelengthofthedataarray.boundingBox[4] PointFloat Anarrayoffourpoints

describingtherectanglesurroundingthe2Dbarcode.

numErrorsCorrected unsignedint Thenumberoferrorsthefunctioncorrectedwhendecodingthe2Dbarcode.

numErasuresCorrected unsignedint Thenumberoferasuresthefunctioncorrectedwhendecodingthe2Dbarcode.

rows unsignedint Thenumberofrowsinthe2Dbarcode.

columns unsignedint Thenumberofcolumnsinthe2Dbarcode.

Page 2637: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Barcode2DSearchModeSpecifiesthemethodthefunctionusestosearchfor2Dbarcodes.Elements

Name Value Description

IMAQ_SEARCH_MULTIPLE 0 Thefunctionsearchesformultiple2Dbarcodes.

IMAQ_SEARCH_SINGLE_CONSERVATIVE 1 Thefunctionsearchesfor2DbarcodesusingthesamesearchingalgorithmasIMAQ_SEARCH_MULTIPLEbutstopssearchingafterlocatingonevalidbarcode.

IMAQ_SEARCH_SINGLE_AGGRESSIVE 2 Thefunctionsearchesforasingle2Dbarcodeusingamethodthatassumesthebarcodeoccupiesamajorityofthesearchregion.ThismethodskipssomeofthepredictiveportionsofthesearchalgorithmusedbyIMAQ_SEARCH_SINGLE_CONSERVATIVE,whichcanleadtoimprovedperformance.Usingthissearchmodewhenthebarcodedoesnotoccupyamajorityofthesearchregion,whenthebarcodeisrotatedorwhentheimageisblurry,canleadtoreducedperformance.

IMAQ_BARCODE_2D_SEARCH_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2638: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

QRCodeReportDescribestheQRcodethatthefunctionread.Elements

Name Type Description

found unsignedint ThiselementisTRUEifthefunctionlocatedanddecodedaQRcodeandFALSEifthefunctionfailedtolocateanddecodeaQRcode.

data unsignedchar* ThedataencodedintheQRcode.dataLength unsignedint Thelengthofthedataarray.boundingBox[4] PointFloat Anarrayoffourpointsdescribingtherectangle

surroundingtheQRcode.tokenizedData QRCodeDataToken* Containsthedatatokenizedinexactlythewayit

wasencodedinthecode.Thisisusefulifthecodeisencodedusingmultiplelanguages.

sizeOfTokenizedData unsignedint Sizeofthetokenizeddata.numErrorsCorrected unsignedint Thenumberoferrorsthefunctioncorrectedwhen

decodingtheQRcode.dimensions unsignedint Thenumberofrowsandcolumnsthatare

populatedfortheQRcode,measuredincells.version unsignedint TheversionoftheQRcode.Theversionindicates

howmuchinformationcanbeencodedandhowmuchredundancyisincludedinsidethecode.

modelType QRModelType ThisoptionallowsyoutospecifywhattypeofQRcodethisis.MicroQRcodeshaveonlyonetargetinthetopleft.Model1codeshavealignment"dashes"alongthebottomandrightsideofthesymbol.

streamMode QRStreamMode Theformatofthedataencodedinthestream.matrixPolarity QRPolarities ThepolarityoftheQRcode.mirrored unsignedint ThiselementisTRUEiftheQRcodeappears

mirroredintheimageandFALSEiftheQRcode

Page 2639: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

appearsnormallyintheimage.positionInAppendStream unsignedint IndicateswhatpositiontheQRcodeisinwith

respecttothestreamofdatainallcodes.ItispossibleforaQRcodetobepartofalargerarrayofcodes.

sizeOfAppendStream unsignedint SpecifieshowmanyQRcodesarepartofalargerarrayofcodes.SometimesaQRcodeispartofalargerarrayofcodes.

firstEAN128ApplicationID int ThefirstEAN-128ApplicationIDencounteredinthestream.ThisisonlyusefulforEAN-128codesandformixed/appendedEAN-128codes,refertothetokenizedoutput.

firstECIDesignator int ThefirstRegionalLanguageDesignatorencounteredinthestream.ThisisonlyusefulforECIcodes.FormultiplelanguageECIcodes,refertothetokenizedoutput.

appendStreamIdentifier unsignedint SpecifieswhatstreamtheQRcodeisinrelationtowhenthecodeispartofalargerarrayofcodes.

minimumEdgeStrength unsignedint ThestrengthoftheweakestedgethefunctionusedtofindthecoarselocationoftheQRcodeintheimage.UsethisvalueasaguideforsettingtheedgeThresholdelementoftheparameterofimaqReadQRCode()

demodulationMode QRDemodulationMode ThedemodulationmodethefunctionusedtolocatetheQRcode.IftoIMAQ_AUTO_DETECT_DEMODULATION_MODEinthesearchOptionsparameterofimaqReadQRCode(),thiselementindicatestherecommendeddemodulationmodeforthisimage.

cellSampleSize QRCellSampleSize ThecellsamplesizethefunctionusedtolocatetheQRcode.IfcellSampleSizeIMAQ_AUTO_DETECT_CELL_SAMPLE_SIZEinthesearchOptionsparameterofimaqReadQRCode(),thiselementindicatestherecommendedcellsamplesizeforthisimage.

Page 2640: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

cellFilterMode QRCellFilterMode ThecellfiltermodethefunctionusedtolocatetheQRcode.IfcellFilterModeIMAQ_AUTO_DETECT_CELL_FILTER_MODEinthesearchOptionsparameterofimaqReadQRCode(),thiselementindicatestherecommendedcellfiltermodeforthisimage.

Page 2641: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

QRGradingModeSpecifiesifthefunctionshouldmakecalculationsneededtopreparetogradetheQRcode.Elements

Name Value Description

IMAQ_QR_NO_GRADING 0 Thefunctiondoesnotmakeanypreparatorycalculations.AttemptstogradethisQRcodewillgenerateanerror.

IMAQ_QR_GRADING_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2642: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

QRCodeDescriptionOptionsSpecifiesthedescriptionoptionsthefunctionuseswhensearchingfortheQRcodeintheimage.Elements

Name Type Description

dimensions QRDimensions ThenumberofrowsandcolumnsthatarepopulatedfortheQRcode,measuredincells.

polarity QRPolarities ThepolarityoftheQRcode.mirror QRMirrorMode ThiselementisTRUEiftheQRcode

appearsmirroredintheimageandFALSEiftheQRcodeappearsnormallyintheimage.

modelType QRModelType ThisoptionallowsyoutospecifythetypeofQRcode.MicroQRcodeshaveonlyonetargetinthetopleft.Model1QRcodeshavealignmentdashesalongthebottomandrightsideofthecode.MostQRcodesareModel2.

Page 2643: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

QRCodeSizeOptionsContainsthesizeoptionsthefunctionuseswhensearchingforaQRcodeintheimage.Elements

Name Type Description

minSize unsignedint

Specifiestheminimumsize(inpixels)oftheQRcodeintheimage.Settingthisvalueto0indicatesthefunctionshouldneverexcludeaQRcodecandidatebecauseitistoosmall.

maxSize unsignedint

Specifiesthemaximumsize(inpixels)oftheQRcodeintheimage.Settingthisvalueto0indicatesthefunctionshouldneverexcludeaQRcodecandidatebecauseitistoolarge.

Page 2644: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

QRCodeSearchOptionsSpecifiesthesearchoptionsthefunctionuseswhensearchingfortheQRcodeintheimage.Elements

Name Type Description

rotationMode QRRotationMode SpecifiestheamountofQRcoderotationthefunctionshouldallowfor.

skipLocation unsignedint IfsettoTRUE,specifiesthatthefunctionshouldassumethattheQRcodeoccupiestheentireimage(ortheentiresearchregion).Thefunctionthenskipsthelocationphase,movingimmediatelytoextractionanddecoding.IfFALSE,thefunctiondoesnotmakeanyassumptionsaboutthepercentageoftheimageoccupiedbytheQRcode.

edgeThreshold unsignedint ThestrengthoftheweakestedgethefunctionusestofindthecoarselocationoftheQRcodeintheimage.UsetheminimumEdgeStrengthelementoftheQRCodeReportreturnvalue.

demodulationMode QRDemodulationMode Thedemodulationmodethefunctionusesto

Page 2645: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

locatetheQRcode.cellSampleSize QRCellSampleSize Thecellsamplesizethe

functionusestolocatetheQRcode.

cellFilterMode QRCellFilterMode ThecellfiltermodethefunctionusestolocatetheQRcode.

skewDegreesAllowed unsignedint SpecifiestheamountofskewintheQRcodethefunctionshouldallowfor.

Page 2646: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReadTextReport3Containsinformationaboutthetextthatyouread.Elements

Name Type Description

readString constchar* Thereadstring.characterReport CharReport3* Anarrayofreportsdescribing

thepropertiesofeachidentifiedcharacter.

numCharacterReports int Thenumberofidentifiedcharacters.

roiBoundingCharacters ROI* AnarrayspecifyingthecoordinatesofthecharacterboundingROI.

Page 2647: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

MatchPatternAdvancedOptionsDescribeshowthealgorithmmatchesthepattern.Elements

Name Type Description

subpixelIterations int Definesthemaximumnumberofincrementalimprovementsusedtorefinematchingusingsubpixelinformation.Thedefaultis20.

subpixelTolerance double Definesthemaximumamountofchange,inpixels,betweenconsecutiveincrementalimprovementsinthematchpositionthatyouwanttotriggertheendoftherefinementprocess.Thedefaultis0,whichspecifiesusingthesubpixelIterationsvalue.IfyouprovidevaluesforbothsubpixelIterationsandsubpixelTolerance,thealgorithmrefinesthematchforatmostsubpixelIterationsbutmaystopearlyifsubpixelToleranceissatisfied.IfyousetsubpixelTolerance,matchesmaybeinvalidatedduringthesubpixelmatchingprocess.However,usingsubpixelIterationsalonecannotinvalidateamatch.ThisbehaviorisparticularlyimportantwhenusingimaqRefineMatches().

initialMatchListLength int Specifiesthemaximumsizeofthematchlist.Thematchlistcontainstheregionsintheinspectionimagethathavethehighestprobabilityofcontainingamatch.

matchListReductionFactor int Specifiesthereductionofthematchlist

Page 2648: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

asmatchesarerefined.Thedefaultis5.

initialStepSize int Specifiesthenumberofpixelstoshiftthesampleacrosstheinspectionimageduringtheinitialphaseofshift-invariantmatching.Thedefaultis0,whichusestheinitialStepSizestoredinthetemplate.Ifthestepsizeisnotanoddinteger,thealgorithmusesthedefaultvalue.

searchStrategy SearchStrategy Specifiestheaggressivenessoftherotationsearchstrategy.ThedefaultisIMAQ_BALANCED.Thisappliesonlytorotation-invariantmatches.NotethatIMAQ_VERY_AGGRESSIVEisnotcurrentlysupported.

intermediateAngularAccuracy int Specifiestheaccuracytouseduringtheintermediatephaseofrotation-invariantmatching.ThedefaultisthevalueoffinalAngularAccuracyinthetemplate.Thealgorithmcoercesthisvaluetoanintegerthatevenlydivides360andliesintherangedefinedbyinitialAngularAccuracyandfinalAngularAccuracyoptiononlyappliestorotation-invariantmatching.FormoreinformationaboutinitialAngularAccuracyandfinalAngularAccuracy,refertoLearnPatternAdvancedRotationOptions

Page 2649: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

VisionInfoType2UsethisenumerationtoindicatewhichVisioninformationtypesyouwanttocheckforinanimageorremovefromanimage.Usebitwise-ORtocombinetwoormorevaluesinordertocheckfororremovemultiplevalueswithonefunctioncall.Youcanalsousebitwise-ANDbetweenthesevaluesandthereturnvalueofimaqIsVisionInfoPresent2()toconfirmthepresenceorabsenceofparticularNIVisioninformationtypes.Elements

Name Value Description

IMAQ_VISIONINFO_CALIBRATION 0x01 UsedtoindicateinteractionwiththeCalibrationinformationinanimage.

IMAQ_VISIONINFO_OVERLAY 0x02 UsedtoindicateinteractionwiththeOverlayinformationinanimage.

IMAQ_VISIONINFO_GRAYTEMPLATE 0x04 Usedtoindicateinteractionwiththegrayscaletemplateinformationinanimage.

IMAQ_VISIONINFO_COLORTEMPLATE 0x08 Usedtoindicateinteraction

Page 2650: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

withthecolortemplateinformationinanimage.

IMAQ_VISIONINFO_GEOMETRICTEMPLATE 0x10 Usedtoindicateinteractionwiththegeometrictemplateinformationinanimage.

IMAQ_VISIONINFO_CUSTOMDATA 0x20 UsedtoindicateinteractionwiththebinaryortextCustomDatainanimage.

IMAQ_VISIONINFO_GOLDENTEMPLATE 0x40 Usedtoindicateinteractionwiththegoldentemplateinformationinanimage.

IMAQ_VISIONINFO_ALL 0xFFFFFFFF Removes,checksfor,orindicatesthepresenceofalltypesofextrainformation

Page 2651: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

inanimage.

Page 2652: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ROIProfileInformationaboutthepointsalongtheedgeofeachcontourintheregionofinterest(ROI).Elements

Name Type Description

report LineProfile QuantifyinginformationaboutthepointsalongtheedgeofeachcontourintheROI.

pixels Point* AnarrayofthepointsalongtheedgeofeachcontourintheROI.ThisarrayhasanumberofPointstructuresequaltothedataCountinreport.

Page 2653: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ScalingModeThescalingmodeforthefunction.SetthisparametertoIMAQ_SCALE_LARGERtoduplicatepixelsorIMAQ_SCALE_SMALLERtosubsamplepixels.Elements

Name Value Description

IMAQ_SCALE_LARGER 0 Thefunctionduplicatespixelstomaketheimagelarger.

IMAQ_SCALE_SMALLER 1 Thefunctionsubsamplespixelstomaketheimagesmaller.

IMAQ_SCALING_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2654: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ConstructROIOptionsDescribeshowafunctionpresentstheROIconstructorwindow.Elements

Name Type Description

windowNumber int Thewindownumberoftheimagewindow.Thefunctiondisplaystheimageinthespecifiedwindowandtemporarilysetsthewindowtomodalmode.WhentheuserclicksOKorCancel,theattributesofthewindowresettotheirinitialvalues.SetthisparametertoIMAQ_MODAL_DIALOGtodisplayamodaldialogwindowcenteredinthescreen.

windowTitle constchar* Specifiesthemessagestringthatthefunctiondisplaysinthetitlebarofthewindow.Usethiselementtoprovidetheuserwithinstructionsdescribingtheobjecttoselect.

type PaletteType Thepalettetypetouse.palette RGBValue* IftypeisIMAQ_PALETTE_USER,this

arrayisthepaletteofcolorstousewiththewindow.IftypeisnotIMAQ_PALETTE_USER,thefunctionignoresthiselement,andyoumaysetittoNULL.Themaximumnumberofcolorsinapaletteis256.palette[n]mapstopixelvaluen.Iftherearefewerthan256elementsinpalette,thefunctionmapsallpixelvaluespastthelastelementinpalettetotheassociatedgrayscalevalue.

numColors int IftypeisIMAQ_PALETTE_USER,thiselementisthenumberofcolorsinthepalettearray.IftypeisnotIMAQ_PALETTE_USER,thefunction

Page 2655: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ignoresthiselement.

Page 2656: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

HSLValueTheinformationneededtodescribeacolorintheHSL(Hue,Saturation,andLuminance)colorspace.Elements

Name Type Description

L unsignedchar

Thecolorluminance.

S unsignedchar

Thecolorsaturation.

H unsignedchar

Thecolorhue.

alpha unsignedchar

Thealphavalueofthecolor,whichrepresentsextrainformationaboutacolorimage,suchasgammacorrection.

Page 2657: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

RGBU64ValueTheinformationneededtodescribecolorintheRGB(Red,Green,Blue)colorspacewhereeachchannelhas16bits.Elements

Name Type Description

B unsignedshort

Thebluevalueofthecolor.

G unsignedshort

Thegreenvalueofthecolor.

R unsignedshort

Theredvalueofthecolor.

alpha unsignedshort

Thealphavalueofthecolor,whichrepresentsextrainformationaboutacolorimage,suchasgammacorrection.

Page 2658: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ScalingMethodDefinesthescalingmethodcorrectionfunctionsusetocorrectanimage.Elements

Name Value Description

IMAQ_SCALE_TO_PRESERVE_AREA 0 Correctionfunctionsscaletheimagesuchthatthefeaturesinthecorrectedimagehavethesameareaasthefeaturesintheinputimage.

IMAQ_SCALE_TO_FIT 1 Correctionfunctionsscaletheimagesuchthatthecorrectedimageisthesamesizeastheinputimage.

IMAQ_SCALING_METHOD_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2659: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PaletteTypeThepalettetypethefunctionuses.Formoreinformationaboutpalettes,refertoChapter2,Display,oftheNIVisionConceptsManual.Elements

Name Value Description

IMAQ_PALETTE_GRAY 0 Thefunctionusesapalettethathasagradualgray-levelvariationfromblacktowhite.

IMAQ_PALETTE_BINARY 1 Thefunctionusesapaletteof16cyclesof16differentcolorsthatisusefulwithbinaryimages.

IMAQ_PALETTE_GRADIENT 2 Thefunctionusesapalettethathasagradationfromredtowhitewithaprominentrangeoflightblueintheuppervaluerange.

IMAQ_PALETTE_RAINBOW 3 Thefunctionusesapalettethathasagradationfrombluetoredwithaprominentrangeofgreensinthemiddlevaluerange.

Page 2660: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_PALETTE_TEMPERATURE 4 Thefunctionusesapalettethathasagradationfromlightbrowntodarkbrown.

IMAQ_PALETTE_USER 5 Thefunctionusesapalettedefinedbytheuser.

IMAQ_PALETTE_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2661: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

WindowThreadPolicyDeterminesthethreadinwhichNIVisioncreateswindows.Elements

Name Value Description

IMAQ_CALLING_THREAD 0 Usingthispolicy,NIVisioncreateswindowsinthethreadthatmakesthefirstdisplayfunctioncallforagivenwindownumber.

IMAQ_SEPARATE_THREAD 1 Usingthispolicy,NIVisioncreateswindowsinaseparatethreadandprocessesmessagesforthewindowsautomatically.

IMAQ_WINDOW_THREAD_POLICY_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2662: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

SimpleEdgeOptionsDescribeshowyouwantthefunctiontofindedges.Elements

Name Type Description

type LevelType Determineshowthefunctionevaluatesthethresholdandhysteresisvalues.

threshold int Thepixelvalueatwhichanedgeoccurs.hysteresis int Avaluethathelpsdetermineedgesinnoisy

images.Ifapixelvaluecrossesthegiventhresholdvaluebutdoesnotexceedthevaluebythevalueofhysteresis,thefunctiondoesnotconsiderthepixeltobepartofanedge.

process EdgeProcess Determineswhichedgesthefunctionlooksfor.subpixel int SetthiselementtoTRUEtofindedgeswith

subpixelaccuracybyinterpolatingbetweenpointstofindthecrossingofthegiventhreshold.SetthisparametertoFALSEtoreportanedgeasthepointnearestthethresholdcrossing.

Page 2663: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

SizeTypeDeterminesthesizeoftheparticlesthefunctionkeepsaftertheerosion.Elements

Name Value Description

IMAQ_KEEP_LARGE 0 Thefunctionkeepslargeparticlesremainingaftertheerosion.

IMAQ_KEEP_SMALL 1 Thefunctionkeepssmallparticleseliminatedbytheerosion.

IMAQ_SIZE_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2664: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

SkeletonMethodThemethodthatthefunctionusestocalculatetheskeleton.Formoreinformationaboutskeletonfunctions,refertoChapter9,BinaryMorphology,intheNIVisionConceptsManual.Elements

Name Value Description

IMAQ_SKELETON_L 0 UsesanL-shapedstructuringelementintheskeletonfunction.

IMAQ_SKELETON_M 1 UsesanM-shapedstructuringelementintheskeletonfunction.

IMAQ_SKELETON_INVERSE 2 UsesanL-shapedstructuringelementonaninverseoftheimageintheskeletonfunction.

IMAQ_SKELETON_METHOD_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2665: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

SpokeReport2Informationdescribingthespokeusedbythefunctionandtheedgesthefunctioncalculatedwiththespoke.Elements

Name Type Description

firstEdges EdgeInfo* ThefirstedgepointdetectedalongeachsearchlineintheROI.

numFirstEdges unsignedint ThenumberofpointsinthefirstEdgesarray.

lastEdges EdgeInfo* ThelastedgepointdetectedalongeachsearchlineintheROI.

numLastEdges unsignedint ThenumberofpointsinthelastEdgesarray.

searchLines SearchLineInfo* Thesearchlinesusedforedgedetection.

numSearchLines unsignedint Thenumberofsearchlinesusedintheedgedetection.

Page 2666: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

StraightEdgeReport2Containsinformationaboutthefoundstraightedge(s).Elements

Name Type Description

straightEdges StraightEdge* Containsanarrayoffoundstraightedges.

numStraightEdges unsignedint Indicatesthenumberofstraightedgesfound.

searchLines SearchLineInfo* Containsanarrayofallsearchlinesusedinthedetection.

numSearchLines unsignedint Thenumberofsearchlinesusedintheedgedetection.

Page 2667: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

SearchDirectionDeterminesthesearchdirection.Elements

Name Value Description

IMAQ_SEARCH_DIRECTION_LEFT_TO_RIGHT 0 Searchesfromtheleftsideofthesearchareatotherightsideofthesearcharea.

IMAQ_SEARCH_DIRECTION_RIGHT_TO_LEFT 1 Searchesfromtherightsideofthesearchareatotheleftsideofthesearcharea.

IMAQ_SEARCH_DIRECTION_TOP_TO_BOTTOM 2 Searchesfromthetopsideofthesearchareatothebottomsideofthesearcharea.

IMAQ_SEARCH_DIRECTION_BOTTOM_TO_TOP 3 Searchesfromthebottomsideofthesearcharea

Page 2668: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

tothetopsideofthesearcharea.

IMAQ_SEARCH_DIRECTION_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2669: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

NearestNeighborTrainingReportAreportontheresultsoftrainingaclassifiersessionwiththenearestneighboralgorithm.Elements

Name Type Description

classDistancesTable float** Theconfidenceinthetraining.

allScores NearestNeighborClassResult* Allclassesandtheirscores.

allScoresSize int ThenumberofentriesinallScores.

Page 2670: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

TransformReportDescribesasetoftransformedcoordinates.Elements

Name Type Description

points PointFloat* Anarrayoftransformedcoordinates.validPoints int* Anarrayofvaluesthatdescribethevalidityof

eachofthecoordinatesaccordingtotheregionofinterestyoucalibratedusingeitherimaqLearnCalibrationGrid()orimaqLearnCalibrationPoints().IfaresultingpointisinsidethecalibratedROI,thefunctionsetsthecorrespondingintinthevalidPointsarraytoTRUE.Otherwise,thefunctionsetsthecorrespondingintinthevalidPointsarraytoFALSE.IfyoucreatedthecalibrationinformationwithimaqSetSimpleCalibration()orimaqSetCalibrationInfo(),eachelementinthevalidPointsarrayisalwaysTRUE.

numPoints int ThelengthofboththepointsarrayandthevalidPointsarray.

Page 2671: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

TruncateModeSpecifieswhichfrequenciesthefunctiontruncates.Elements

Name Value Description

IMAQ_TRUNCATE_LOW 0 Thefunctiontruncateslowfrequencies.

IMAQ_TRUNCATE_HIGH 1 Thefunctiontruncateshighfrequencies.

IMAQ_TRUNCATE_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2672: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

RectOrientationSpecifiestheorientationofaresultingrectangularimagerelativetoanannulus.Elements

Name Value Description

IMAQ_BASE_INSIDE 0 Specifiesthatthebaseoftherectangularimageliesalongtheinsideedgeoftheannulus.

IMAQ_BASE_OUTSIDE 1 Specifiesthatthebaseoftherectangularimageliesalongtheoutsideedgeoftheannulus.

IMAQ_TEXT_ORIENTATION_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2673: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

View3DOptionsSpecifieshowtoconvertanimagetoathree-dimensionalrepresentation.Elements

Name Type Description

sizeReduction int Adivisorthefunctionuseswhendeterminingthefinalheightandwidthofthe3Dimage.Thefunctioncoercesthevalueifitisnegativeorgreaterthenone-eighththeheightorwidthoftheoriginalimage.

maxHeight int Definesthemaximumheightofapixelfromtheimagesourcedrawnin3D.Validvaluesrangefrom2to256.

direction Direction3D Definesthe3Dorientation.alpha float Determinestheanglebetweenthe

horizontalandthebaseline.Validvaluesrangefrom15to45.

beta float Determinestheanglebetweenthehorizontalandthesecondbaseline.Validvaluesrangefrom15to45.

border int Definesthebordersize.background int Definesthebackgroundcolor.plane Plane3D Indicatestheviewafunctionusestoshow

compleximages.

Page 2674: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

WriteClassifierFileModeWhatinformationtowritetoaclassifierfile.Elements

Name Value

IMAQ_CLASSIFIER_WRITE_ALL 0

IMAQ_CLASSIFIER_WRITE_CLASSIFY_ONLY 1

IMAQ_WRITE_CLASSIFIER_FILE_MODES_SIZE_GUARD 0xFFFFFFFF

Page 2675: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

JPEG2000FileAdvancedOptionsSpecifiesadvancedbehaviorswhenwritingaJPEG2000file.Elements

Name Type Description

waveletMode WaveletTransformMode Determineswhichwavelettransformtousewhenwritingthefile.

useMultiComponentTransform int SetthisparametertoTRUEtouseanadditionaltransformonRGBimages.SetthisparametertoFALSEtonotuseanadditionaltransform.Thisparameterhasnoeffectwhenencodinggrayscaleimages.

maxWaveletTransformLevel unsignedint Specifiesthemaximumallowedlevelofwavelettransform.Increasingthisvaluewillresultinamoreaccurateimage,butwillincreasethetimetowritetheimage.Validvaluesforthiselementrangefrom0to255.

quantizationStepSize float Specifiestheabsolutebasequantizationstepsizeforderivedquantizationmode.ThiselementhasnoeffectwhenIMAQ_WAVELET_TRANSFORM_INTEGER.

Page 2676: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

TIFFFileOptionsDefineshowthefunctionwritestheTIFFfile.Elements

Name Type Description

rowsPerStrip int Indicatesthenumberofrowsthatthefunctionwritesperstrip.Setthiselementto0ifyouwantthefunctiontowriteallofthedatainonestrip.

photoInterp PhotometricMode Designateswhichphotometricinterpretationtouse.ThefunctiononlyusesphotoInterpwhenwritingunsigned8-bitimages.

compressionType TIFFCompressionType IndicatesthetypeofcompressiontouseontheTIFFfile.

Page 2677: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ArcInfo2Definesthelocationofanarc.Elements

Name Type Description

center PointFloat Thecenterpointofthearc.radius double Theradiusofthearc.startAngle double Thestartingangleofthearc,specifiedcounter-

clockwisefromthex-axis.endAngle double Theendingangleofthearc,specifiedcounter-

clockwisefromthex-axis.

Page 2678: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

BestCircleDescribesacirclethatbestfitsasetofpoints.Elements

Name Type Description

center PointFloat Thecoordinatelocationofthecenterofthecircle.radius double Theradiusofthecircle.area double Theareaofthecircle.perimeter double Thelengthoftheperimeterofthecircle.error double Representstheleastsquareerrorofthefitted

circletotheentiresetofpoints.

Page 2679: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

BestEllipseDescribesanellipsethatbestfitsasetofpoints.Elements

Name Type Description

center PointFloat Thecoordinatelocationofthecenteroftheellipse.

majorAxisStart PointFloat Thecoordinatelocationofthestartofthemajoraxisoftheellipse.

majorAxisEnd PointFloat Thecoordinatelocationoftheendofthemajoraxisoftheellipse.

minorAxisStart PointFloat Thecoordinatelocationofthestartoftheminoraxisoftheellipse.

minorAxisEnd PointFloat Thecoordinatelocationoftheendoftheminoraxisoftheellipse.

area double Theareaoftheellipse.perimeter double Thelengthoftheperimeteroftheellipse.

Page 2680: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

BrowserOptionsSpecifieshowtosetupthebrowser.Elements

Name Type Description

width int Thewidthtomakethebrowser.height int Theheighttomakethebrowser

image.imagesPerLine int Thenumberofimagestoplace

onasingleline.backgroundColor RGBValue Thebackgroundcolorofthe

browser.frameSize int Specifiesthenumberofpixels

withwhichtobordereachthumbnail.

style BrowserFrameStyle Thestylefortheframearoundeachthumbnail.

ratio float Specifiesthewidthtoheightratioofeachthumbnail.

focusColor RGBValue Thecolortousetodisplayfocusedcells.

Page 2681: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CharacterStatisticsDescribesthecharacterssegmentedintheROI.Elements

Name Type Description

left int TheleftoffsetofthecharacterboundingrectanglesinthecurrentROI.

top int ThetopoffsetofthecharacterboundingrectanglesinthecurrentROI.

width int ThewidthofeachofthecharactersyoutrainedinthecurrentROI.

height int TheheightofeachtrainedcharacterinthecurrentROI.

characterSize int Thesizeofthecharacterinpixels.

Page 2682: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CharInfoContainsinformationaboutatrainedcharacter.Elements

Name Type Description

charValue constchar* Retrievesthecharactervalueofthecorrespondingcharacterinthecharacterset.

charImage constImage* Theimageyouusedtotrainthischaracter.internalImage constImage* TheinternalrepresentationthatNIVision

usestomatchobjectstothischaracter.ThisinformationishelpfulwhenyouarenotsurewhyNIVisiondoesnotrecognizeasegmentedcharacterintheROI.ThisinformationshowshowNIVisioninterpretsthecharacter,whichmaybedifferentfromhowthehumaneyeinterpretsit.

Page 2683: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CharReportContainsinformationaboutacharacter.Elements

Name Type Description

character constchar* Thecharactervalue.corner[4] PointFloat Anarrayoffourpointsthatdescribesthe

rectanglethatsurroundsthecharacter.reserved int Thiselementisreserved.lowThreshold int Theminimumvalueofthethresholdrange

usedforthischaracter.highThreshold int Themaximumvalueofthethresholdrange

usedforthischaracter.

Page 2684: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CharReport2Containsinformationaboutacharacter.Elements

Name Type Description

character constchar* Thecharactervalue.corner[4] PointFloat Anarrayoffourpointsthatdescribes

therectanglethatsurroundsthecharacter.

lowThreshold int Theminimumvalueofthethresholdrangeusedforthischaracter.

highThreshold int Themaximumvalueofthethresholdrangeusedforthischaracter.

classificationScore int Thedegreetowhichtheassignedcharacterclassrepresentstheobjectbetterthantheothercharacterclassesinthecharacterset.

verificationScore int Thesimilarityofthecharacterandthereferencecharacterforthecharacterclass.Ifareferencecharacterdoesnotexistforthecharacterclass,thescorewillbe0.

verified int ThiselementisTRUEifareferencecharacterwasfoundforthecharacterclassandFALSEifareferencecharacterwasnotfound.

Page 2685: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CharReport3Containsinformationaboutacharacter.Elements

Name Type Description

character constchar* Thecharactervalue.classificationScore int Thedegreetowhichthe

assignedcharacterclassrepresentstheobjectbetterthantheothercharacterclassesinthecharacterset.

verificationScore int Thesimilarityofthecharacterandthereferencecharacterforthecharacterclass.Ifareferencecharacterdoesnotexistforthecharacterclass,thescorewillbe0.

verified int ThiselementisTRUEifareferencecharacterwasfoundforthecharacterclassandFALSEifareferencecharacterwasnotfound.

lowThreshold int Theminimumvalueofthethresholdrangeusedforthischaracter.

highThreshold int Themaximumvalueofthethresholdrangeusedforthischaracter.

characterStats CharacterStatistics DescribesthecharacterssegmentedintheROI.

Page 2686: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CIELabValueTheinformationneededtodescribeacolorintheCIEL*a*b*colorspace.Elements

Name Type Description

b double Theyellow/blueinformationofthecolor.a double Thered/greeninformationofthecolor.L double Thecolorlightness.alpha unsigned

charThealphavalueofthecolor,whichrepresentsextrainformationaboutacolorimage,suchasgammacorrection.

Page 2687: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CircleFeatureAcirclefeature.Elements

Name Type Description

position PointFloat Thelocationofthecenterofthecircle.radius double Theradiusofthecircle.

Page 2688: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ClassScoreThedistancefromaclasstotheitemthatwasclassified.Elements

Name Type Description

className char* Thenameoftheclass.distance float Thedistancefromtheitemtothisclass.

Page 2689: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ClosedContourDefinesthelocationandsizeofaclosedcontour,whichisaseriesofconnectedpointswherethelastpointconnectstothefirst.Elements

Name Type Description

points Point* Thepointsthatmakeuptheclosedcontour.numPoints int Thenumberofpointsinthearray.

Page 2690: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ClosedCurveFeatureAclosedcurvefeature.Elements

Name Type Description

position PointFloat Thecenteroftheclosedcurvefeature.arcLength double Thearclengthoftheclosedcurvefeature.

Page 2691: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ComplexAcomplexvalue.Elements

Name Type Description

r float Therealpartofthevalue.i float Theimaginarypartofthevalue.

Page 2692: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ConcentricRakeReportInformationdescribingtheconcentricrakeusedbythefunctionandtheedgesthefunctioncalculatedwiththeconcentricrake.Elements

Name Type Description

rakeArcs ArcInfo* Anarraycontainingthelocationofeachconcentricarclineusedforedgedetection.

numArcs int ThenumberofarclinesintherakeArcsarray.

firstEdges PointFloat* Thecoordinatelocationofalledgesdetectedasfirstedges.

numFirstEdges int Thenumberofpointsinthefirstedgesarray.

lastEdges PointFloat* Thecoordinatelocationofalledgesdetectedaslastedges.

numLastEdges int Thenumberofpointsinthelastedgesarray.

allEdges EdgeLocationReport* Anarrayofreportsdescribingthelocationoftheedgeslocatedbyeachconcentricrakearcline.

linesWithEdges int* AnarrayofindicesintotherakeArcsarrayindicatingtheconcentricrakearclinesonwhichthefunctiondetectedatleastoneedge.

numLinesWithEdges int Thenumberofconcentricrakearclinesalongwhichthefunctiondetected

Page 2693: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

edges.ThisnumberrepresentsthesizeofthelineWithEdgesarrayandthenumberofEdgeLocationReportsintheallEdgesarray.

Page 2694: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ConstCurveFeatureAconstantcurvefeature.Elements

Name Type Description

position PointFloat Thecenterofthecirclethatthisconstantcurveliesupon.

radius double Theradiusofthecirclethatthisconstantcurveliesupon.

startAngle double Whentravelingalongtheconstantcurvefromoneendpointtothenextinacounterclockwisemanner,thisistheangularcomponentofthevectororiginatingatthecenteroftheconstantcurveandpointingtowardsthefirstendpointoftheconstantcurve.

endAngle double Whentravelingalongtheconstantcurvefromoneendpointtothenextinacounterclockwisemanner,thisistheangularcomponentofthevectororiginatingatthecenteroftheconstantcurveandpointingtowardsthesecondendpointoftheconstantcurve.

Page 2695: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ContourInfoInformationaboutacontour.Elements

Name Type Description

type ContourType Thecontourtype.numPoints unsigned Thenumberofpointsthatmakeupthe

contour.points Point* Thepointsdescribingthecontour.contourColor RGBValue Thecontourcolor.

Page 2696: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ContourPointDescribesapointalonganedgesegment.Elements

Name Type Description

x double Thex-coordinatevalueintheimage.y double They-coordinatevalueintheimage.curvature double Thechangeinslopeatthisedgepointofthe

segment.xDisplacement double Thexdisplacementofthecurrentedgepixel

fromacubicsplinefitofthecurrentedgesegment.

yDisplacement double Theydisplacementofthecurrentedgepixelfromacubicsplinefitofthecurrentedgesegment.

Page 2697: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CoordinateTransformSpecifieshowtotransformpixelcoordinatesbasedonthedifferencebetweentheinitialcoordinatesystemandthefinalcoordinatesystem.Elements

Name Type Description

initialOrigin Point Theoriginoftheinitialcoordinatesystem.initialAngle float Theangle,indegrees,ofthex-axisoftheinitial

coordinatesystemrelativetotheimagex-axis.finalOrigin Point Theoriginofthefinalcoordinatesystem.finalAngle float Theangle,indegrees,ofthex-axisofthefinal

coordinatesystemrelativetotheimagex-axis.

Page 2698: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CornerFeatureAcornerfeature.Elements

Name Type Description

position PointFloat Thelocationofthecornerfeature.rotation double Theangularcomponentofthevector

bisectingthecornerfromposition.enclosedAngle double Themeasureoftheenclosedangleofthe

corner.isVirtual int ThiselementisTRUEifthecornerisvirtual

andFALSEifthecornerisnotvirtual.Avirtualcornerisacornerthatwouldbecreatediftwonon-intersectinglinesareextendeduntiltheyintersect.

Page 2699: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DataMatrixOptionsDefineshowthefunctionsearchesforanddecodesDataMatrixbarcodes.Elements

Name Type Description

searchMode Barcode2DSearchMode Specifiesthemodethefunctionusestosearchforbarcodes.

contrast Barcode2DContrast Specifiesthecontrastofthebarcodesthatthefunctionsearchesfor.

cellShape Barcode2DCellShape Specifiestheshapeofthebarcodedatacells,whichaffectshowthefunctiondecodesthebarcode.

barcodeShape Barcode2DShape Specifiestheshapeofthebarcodesthatthefunctionsearchesfor.

subtype DataMatrixSubtype SpecifiestheDataMatrixsubtypesofthebarcodesthatthefunctionsearchesfor.

Page 2700: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

EdgeInfoProvidesinformationaboutanedge.Elements

Name Type Description

position PointFloat Thelocationoftheedgeintheimage.calibratedPosition PointFloat Thepositionoftheedgeintheimagein

real-worldcoordinates.distance double Thelocationoftheedgefromthefirst

pointalongtheboundaryoftheinputROI.

calibratedDistance double ThelocationoftheedgefromthefirstpointalongtheboundaryoftheinputROIinreal-worldcoordinates.

magnitude double Theintensitycontrastattheedge.Thisstrengthcanbeusedasthenoiselevelforthedetectededge.

noisePeak double Thestrengthofthenoiseassociatedwiththecurrentedge.

rising int Indicatesthepolarityoftheedge.IfTRUE,theedgeisarising.

Page 2701: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

EdgeLocationReportDescribesthelocationoftheedgeslocatedbyasearchline.Elements

Name Type Description

edges PointFloat* Thecoordinatelocationofalledgesdetectedbythesearchline.

numEdges int Thenumberofpointsintheedgesarray.

Page 2702: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

EdgeReportInformationaboutanedge.Elements

Name Type Description

location float Thelocationoftheedgefromthefirstpointinthepointsarray.Thisisasubpixelinterpolateddistance.

contrast float Thecontrastattheedge.polarity PolarityType Thepolarityoftheedge.reserved float Thiselementisreserved.coordinate PointFloat Thecoordinatesoftheedge.

Page 2703: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

EllipseFeatureAnellipsefeature.Elements

Name Type Description

position PointFloat Thelocationofthecenteroftheellipse.rotation double Theorientationofthesemi-majoraxisofthe

ellipsewithrespecttothehorizontal.minorRadius double Thelengthofthesemi-minoraxisofthe

ellipse.majorRadius double Thelengthofthesemi-majoraxisofthe

ellipse.

Page 2704: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FindTransformRectOptionsDefinestheparametersofthealgorithmthefunctionusestolocatetheobjectandtheinformationthefunctionoverlaystotheimage.Elements

Name Type Description

threshold int Specifiesthethresholdforthecontrastoftheedge.Thefunctionidentifiesonlyedgeswithacontrastgreaterthanthisvalueinthedetectionprocess.Contrastisdefinedasthedifferencebetweentheaveragepixelintensitybeforetheedgeandtheaveragepixelintensityaftertheedge.

width int Specifiesthenumberofpixelsthatareaveragedtofindthecontrastateithersideoftheedge.

steepness int Specifiestheslopeoftheedge.Thisvaluerepresentsthenumberofpixelsthatcorrespondtothetransitionareaoftheedge.

subsamplingRatio int Specifiesthenumberofpixelsthatseparatestwoconsecutivesearchlinesoftherake.

mainAxisDirection RakeDirection Specifiestheorderanddirectioninwhichthefunctionsearchestheedgealongthemainaxis.ThisdirectionmustbeperpendiculartosecondaryAxisDirection.

secondaryAxisDirection RakeDirection Specifiestheorderand

Page 2705: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

directioninwhichthefunctionsearchestheedgealongthesecondaryaxis.ThisdirectionmustbeperpendiculartomainAxisDirection.

showSearchArea int IfTRUE,thefunctionoverlaysthesearchareaontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

showSearchLines int IfTRUE,thefunctionoverlaysthesearchlinesusedtolocatetheedgesontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

showEdgesFound int IfTRUE,thefunctionoverlaysthelocationsoftheedgesfoundontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

showResult int IfTRUE,thefunctionoverlaysthehitlinestotheobjectontheresultimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

Page 2706: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FindTransformRectsOptionsDefinestheparametersofthealgorithmthefunctionusestolocatetheobjectandtheinformationthefunctionoverlaystotheimage.Elements

Name Type Description

primaryThreshold int Specifiesthethresholdforthecontrastoftheedgeintheprimaryrectangle.Thefunctionidentifiesonlyedgeswithacontrastgreaterthanthisvalueinthedetectionprocess.Contrastisdefinedasthedifferencebetweentheaveragepixelintensitybeforetheedgeandtheaveragepixelintensityaftertheedge.

primaryWidth int Specifiesthenumberofpixelsthatareaveragedtofindthecontrastateithersideoftheedgeintheprimaryrectangle.

primarySteepness int Specifiestheslopeoftheedgeintheprimaryrectangle.Thisvaluerepresentsthenumberofpixelsthatcorrespondtothetransitionareaoftheedge.

primarySubsamplingRatio int Specifiesthenumberofpixelsthatseparatetwoconsecutivesearchlinesoftherakeintheprimary

Page 2707: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

rectangle.secondaryThreshold int Specifiesthethresholdfor

thecontrastoftheedgeinthesecondaryrectangle.Thefunctionidentifiesonlyedgeswithacontrastgreaterthanthisvalueinthedetectionprocess.Contrastisdefinedasthedifferencebetweentheaveragepixelintensitybeforetheedgeandtheaveragepixelintensityaftertheedge.

secondaryWidth int Specifiesthenumberofpixelsthatareaveragedtofindthecontrastateithersideoftheedgeinthesecondaryrectangle.

secondarySteepness int Specifiestheslopeoftheedgeinthesecondaryrectangle.Thisvaluerepresentsthenumberofpixelsthatcorrespondtothetransitionareaoftheedge.

secondarySubsamplingRatio int Specifiesthenumberofpixelsthatseparatetwoconsecutivesearchlinesoftherakeinthesecondaryrectangle.

mainAxisDirection RakeDirection Specifiestheorderanddirectioninwhichthefunctionsearchestheedgealongthemainaxis.Thisdirectionmustbeperpendicularto

Page 2708: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

secondaryAxisDirection.secondaryAxisDirection RakeDirection Specifiestheorderand

directioninwhichthefunctionsearchestheedgealongthesecondaryaxis.ThisdirectionmustbeperpendiculartomainAxisDirection.

showSearchArea int IfTRUE,thefunctionoverlaysthesearchareaontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

showSearchLines int IfTRUE,thefunctionoverlaysthesearchlinesusedtolocatetheedgesontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

showEdgesFound int IfTRUE,thefunctionoverlaysthelocationsoftheedgesfoundontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

showResult int IfTRUE,thefunctionoverlaysthehitlinestotheobjectontheresultimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.

Page 2709: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

GeometricPatternMatchInformationdescribingamatchedgeometricpattern.Elements

Name Type Description

position PointFloat Thelocationoftheoriginofthetemplateinthematch.

rotation float Therotationofthematchrelativetothetemplateimage,indegrees.

scale float Thesizeofthematchrelativetothesizeofthetemplateimage,expressedasapercentage.

score float Theaccuracyofthematch.Ascoreof1,000indicatesaperfectmatch,andascoreof0indicatesnomatch.

corner[4] PointFloat Anarrayoffourpointsdescribingtherectanglesurroundingthetemplateimage.

inverse int ThiselementisTRUEifthematchisaninverseofthetemplateimage.Forexample,thematchisawhiteobjectonablackbackgroundbutthetemplateimageisablackobjectonawhitebackground.ThiselementisFALSEifthematchandthetemplateimagehavethesamecontrastwiththeimagebackground.

occlusion float Thepercentageofthematch

Page 2710: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

thatisoccluded.templateMatchCurveScore float Theaccuracyofthematch

obtainedbycomparingthetemplatecurvestothecurvesinthematchregion.Ascoreof1,000indicatesaperfectmatch,andascoreof0indicatesnomatch.

matchTemplateCurveScore float Theaccuracyofthematchobtainedbycomparingthecurvesinthematchregiontothetemplatecurves.Ascoreof1,000indicatesaperfectmatch,andascoreof0indicatesnomatch.ThiselementiscalculatedonlyifthematchTemplateCurveScoreelementoftheadvancedMatchOptionsparametertoimaqMatchGeometricPattern()isTRUE.

correlationScore float Theaccuracyofthematchobtainedbycomparingthetemplateimagetothematchregionusingacorrelationmetricthatcomparesthetworegionsasafunctionoftheirpixelvalues.Ascoreof1,000indicatesaperfectmatch,andascoreof0indicatesnomatch.ThiselementiscalculatedonlyifthecorrelationScoreelementoftheadvancedMatchOptionsparametertoimaqMatchGeometricPattern()isTRUE.

Page 2711: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

HSIValueTheinformationneededtodescribeacolorintheHSI(Hue,Saturation,andIntensity)colorspace.Elements

Name Type Description

I unsignedchar

Thecolorintensity.

S unsignedchar

Thecolorsaturation.

H unsignedchar

Thecolorhue.

alpha unsignedchar

Thealphavalueofthecolor,whichrepresentsextrainformationaboutacolorimage,suchasgammacorrection.

Page 2712: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

HSVValueTheinformationneededtodescribeacolorintheHSV(Hue,Saturation,andValue)colorspace.Elements

Name Type Description

V unsignedchar

Thecolorvalue.

S unsignedchar

Thecolorsaturation.

H unsignedchar

Thecolorhue.

alpha unsignedchar

Thealphavalueofthecolor,whichrepresentsextrainformationaboutacolorimage,suchasgammacorrection.

Page 2713: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LCDSegmentsDescribeswhichsegmentsofanLCDdigitareon.Thefollowingfigure

showsthesegmentsofanLCD.Elements

Name Type Description

a:1 unsigned Trueiftheasegmentison.b:1 unsigned Trueifthebsegmentison.c:1 unsigned Trueifthecsegmentison.d:1 unsigned Trueifthedsegmentison.e:1 unsigned Trueiftheesegmentison.f:1 unsigned Trueifthefsegmentison.g:1 unsigned Trueifthegsegmentison.reserved:25 unsigned Thiselementisreserved.

Page 2714: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LearnPatternAdvancedRotationOptionsDescribeshowthealgorithmlearnsduringrotation-invariantmatching.Elements

Name Type Description

searchStrategySupport SearchStrategy Specifiestheaggressivenessoftherotationsearchstrategyavailableduringthematchingphase.IMAQ_VERY_AGGRESSIVEisnotcurrentlysupported.

initialStepSize int Thelargestnumberofimagepixelstoshiftthesampleacrosstheinspectionimageduringtheinitialphaseofmatching.Thedefaultvaluesare5fortheIMAQ_BALANCEDsearchstrategyand3fortheIMAQ_CONSERVATIVEsearchstrategy.Ifthestepsizeisnotanoddinteger,thealgorithmcoercesittothenextsmalleroddinteger.NotethattheIMAQ_AGGRESSIVEsearchstrategydoesnotsupporttheinitialStepSizefield.

initialSampleSize int Specifiesthenumberoftemplatepixelsthatyouwanttoincludeinasamplefortheinitialphaseofrotation-invariantmatching.Thedefaultis0,whichallowsthealgorithmtocomputeinitialSampleSize.For

Page 2715: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

optimalspeed,thefunctioncoercessizesthatarelessthan240toanintegermultipleof12andcoercessizesgreaterthan240toanintegermultipleof60.

initialSampleSizeFactor double Specifiesthesizeofthesamplefortheinitialphaseofrotation-invariantmatchingasapercentofthetemplatesize,inpixels.Thedefaultis0,whichcausesthealgorithmtouseinitialSampleSize.IfyouprovidevaluesforbothinitialSampleSizeFactorandinitialSampleSize,thealgorithmusesinitialSampleSize.Foroptimalspeed,thealgorithmcoercessizesthatarelessthan240toanintegermultipleof12andcoercessizesgreaterthan240toanintegermultipleof60.

initialAngularAccuracy int Setstheangleaccuracy,indegrees,touseduringtheinitialphaseofrotation-invariantmatching.Thedefaultis6degrees.ThealgorithmcoercestheangletothelargestintegersmallerthaninitialAngularAccuracythatevenlydivides360.ThisoptionisnotusedinconjunctionwiththeIMAQ_AGGRESSIVEsearch

Page 2716: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

strategy.finalSampleSize int Specifiesthenumberof

templatepixelsyouwanttoaddtoinitialSampleSizeforthefinalphaseofrotation-invariantmatching.Theseadditionalpointsincludeedgepoints.Thedefaultis0,whichallowsthealgorithmtocomputefinalSampleSize.Foroptimalspeed,thealgorithmcoercessizesthatarelessthan240toanintegermultipleof12andcoercessizesgreaterthan240toanintegermultipleof60.

finalSampleSizeFactor double Specifiesthesizeofthesampleforthefinalphaseofrotation-invariantmatchingasapercentoftheedgepointsinthetemplate,inpixels.Thedefaultis0,whichcausesthealgorithmtousefinalSampleSize.IfyouprovidevaluesforbothfinalSampleSizeFactorandfinalSampleSize,thealgorithmusesfinalSampleSize.Foroptimalspeed,thealgorithmcoercessizesthatarelessthan240toanintegermultipleof12andcoercessizesgreaterthan240toanintegermultipleof60.

finalAngularAccuracy int Setstheangleaccuracy,indegrees,touseduringthe

Page 2717: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

finalphaseoftherotation-invariantmatching.Thedefaultis1degree.Usesubpixelaccuracytoachieveangleaccuracylessthanthedefault.ThisvaluemustbenogreaterthanthevalueforinitialAngularAccuracy.Thealgorithmcoercestheangletothelargestintegersmallerthanitthatevenlydivides360.ThisoptionisnotusedinconjunctionwiththeIMAQ_AGGRESSIVEsearchstrategy.

subpixelSampleSize int Specifiesthenumberoftemplatepixelsthatyouwanttoincludeinasampleforthesubpixelphaseofrotation-invariantmatching.Thedefaultis0,whichallowsthealgorithmtocomputesubpixelSampleSize.Foroptimalspeed,thealgorithmcoercessizesthatarelessthan240toanintegermultipleof12andcoercessizesgreaterthan240toanintegermultipleof60.

subpixelSampleSizeFactor double Specifiesthesizeofthesampleforthesubpixelphaseofrotation-invariantmatchingasapercentofthetemplatesize,inpixels.Thedefaultis0,whichcausesthealgorithmtousesubpixelSampleSize.Foroptimalspeed,thealgorithm

Page 2718: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

coercessizesthatarelessthan240toanintegermultipleof12andcoercessizesgreaterthan240toanintegermultipleof60.

Page 2719: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LearnPatternAdvancedShiftOptionsDescribeshowthealgorithmlearnsduringshift-invariantmatching.Elements

Name Type Description

initialStepSize int Thelargestnumberofimagepixelstoshiftthesampleacrosstheinspectionimageduringtheinitialphaseofshift-invariantmatching.Thedefaultis7.ThealgorithmmayreducethevalueofinitialStepSizebasedoninitialSampleSizeandthetemplateimage.Ifthestepsizeisnotanoddinteger,theVIcoercesittothenextsmallerinteger.

initialSampleSize int Specifiesthenumberoftemplatepixelsthatyouwanttoincludeinasamplefortheinitialphaseofshift-invariantmatching.Thedefaultis0,whichallowsthealgorithmtocomputeinitialSampleSize.Foroptimalspeed,thealgorithmcoercessizesthatarelessthan240toanintegermultipleof12andcoercessizesgreaterthan240toanintegermultipleof60.

initialSampleSizeFactor double Specifiesthesizeofthesamplefortheinitialphaseofshift-invariantmatchingasapercentofthetemplatesize,inpixels.Thedefaultis0,whichcausesthealgorithmtouseinitialSampleSize.IfyouprovidevaluesforbothinitialSampleSizeFactorandinitialSampleSize,thealgorithm

Page 2720: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

usesinitialSampleSize.Foroptimalspeed,thealgorithmcoercessizesthatarelessthat240toanintegermultipleof12andcoercessizesgreaterthan240toanintegermultipleof60.

finalSampleSize int SpecifiesthenumberoftemplatepixelsyouwanttoaddtoinitialSampleSizeforthefinalphaseofshift-invariantmatching.Theseadditionalpointsincludeedgepoints.Thedefaultis0,whichallowsthealgorithmtocomputefinalSampleSize.Foroptimalspeed,thealgorithmcoercessizesthatarelessthan240toanintegermultipleof12andcoercessizesgreaterthan240toanintegermultipleof60.

finalSampleSizeFactor double Specifiesthesizeofthesampleforthefinalphaseofshift-invariantmatchingasapercentoftheedgepointsinthetemplate,inpixels.Thedefaultis0,whichcausesthealgorithmtousefinalSampleSize.IfyouprovidevaluesforbothfinalSampleSizeFactorandfinalSampleSize,thealgorithmusesfinalSampleSize.Foroptimalspeed,thealgorithmcoercessizesthatarelessthan240toanintegermultipleof12andcoercessizesgreaterthan240toanintegermultipleof60.

subpixelSampleSize int Specifiesthenumberoftemplatepixelsthatyouwanttoincludeinasampleforthesubpixelphaseofshift-invariantmatching.The

Page 2721: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

defaultis0,whichallowsthealgorithmtocomputesubpixelSampleSize.Foroptimalspeed,thealgorithmcoercessizesthatarelessthan240toanintegermultipleof12andcoercessizesgreaterthan240toanintegermultipleof60.

subpixelSampleSizeFactor double Specifiesthesizeofthesampleforthesubpixelphaseofshift-invariantmatchingasapercentofthetemplatesize,inpixels.Thedefaultis0,whichcausesthealgorithmtousesubpixelSampleSize.Foroptimalspeed,theVIcoercessizesthatarelessthan240toanintegermultipleof12andcoercessizesgreaterthan240toanintegermultipleof60.

Page 2722: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LegFeatureAlegfeature.Elements

Name Type Description

position PointFloat Thelocationofthelegfeature.Thelocationisthecenterofthesegmentadjoiningthetwoparallelsides.

corner[4] PointFloat Thefourcornersofthelegfeature.rotation double Theorientationofthelegwithrespecttothe

horizontal.width double Thewidthoftheleg.height double Theheightoftheleg.

Page 2723: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LineDefinesthelocationofaline.Elements

Name Type Description

start Point Thecoordinatelocationofthestartoftheline.end Point Thecoordinatelocationoftheendoftheline.

Page 2724: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LineEquationDefinesthethreecoefficientsoftheequationinthenormalform(ax+by+c=0)ofaline.Elements

Name Type Description

a double Theacoefficientofthelineequation.b double Thebcoefficientofthelineequation.c double Theccoefficientofthelineequation.

Page 2725: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LineFeatureAlinefeature.Elements

Name Type Description

startPoint PointFloat Thestartingpointoftheline.endPoint PointFloat Theendingpointoftheline.length double Thelengthofthelinemeasuredinpixelsfromthe

startpointtotheendpoint.rotation double Theorientationofthelinewithrespecttothe

horizontal.

Page 2726: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LineFloatDefinesthelocationofaline.Elements

Name Type Description

start PointFloat Thecoordinatelocationofthestartoftheline.end PointFloat Thecoordinatelocationoftheendoftheline.

Page 2727: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

MatchGeometricPatternAdvancedOptionsSpecifiesadvancedbehaviorsofimaqMatchGeometricPattern(),whichcanbeusedtooptimizetheperformanceofthefunctionortofine-tunethematcheslocatedbythefunction.Elements

Name Type Description

minFeaturesUsed int Specifiestheminimumnumberoffeaturesthefunctionuseswhenmatching.

maxFeaturesUsed int Specifiesthemaximumnumberoffeaturesthefunctionuseswhenmatching.Setthiselementto0tospecifythatthefunctionshoulduseallfeatures.

subpixelIterations int Specifiesthemaximumnumberofincrementalimprovementsusedtorefinematcheswithsubpixelinformation.

subpixelTolerance double Specifiesthemaximumamountofchange,inpixels,betweenconsecutiveincrementalimprovementsinthematchpositionbeforethefunctionstopsrefiningthematchposition.Setthiselementto0tospecifythatthefunctionshouldalwaysuseanumberofrefinementsequaltosubpixelIterations.IfyouprovidevaluesforbothsubpixelIterationsandsubpixelTolerance,thefunctionrefinesthematchfor,atmost,subpixelIterationsbutmay

Page 2728: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

stopearlyifsubpixelToleranceissatisfied.IfyousetsubpixelTolerance,thefunctionmayinvalidatematchesduringthesubpixelrefinementprocess.However,usingsubpixelIterationsalonecannotinvalidateamatch.

initialMatchListLength int Specifiesthemaximumsizeofthematchlist.Thematchlistcontainstheregionsintheinspectionimagethathavethehighestprobabilityofcontainingamatch.

matchTemplateCurveScore int SetthiselementtoTRUEtospecifythatthefunctionshouldcalculatethematchcurvetotemplatecurvescoreandreturnitforeachmatchresult.SetthiselementtoFALSEtospecifythatthefunctionshouldnotcalculatethematchcurvetotemplatecurvescore.

correlationScore int SetthiselementtoTRUEtospecifythatthefunctionshouldcalculatethecorrelationscoreandreturnitforeachmatchresult.SetthisparametertoFALSEtospecifythatthefunctionshouldnotcalculatethecorrelationscore.

minMatchSeparationDistance double Specifiestheminimumseparationdistance,inpixels,betweentheoriginsoftwomatchesthathaveuniquepositions.Thefunctiondoesnotreturnmatchesthathavethe

Page 2729: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

sameposition,scale,andangle.Setthisvalueto–1ifyoudonotwantthefunctiontousethepositionofamatchtodeterminewhetherthematchisunique.

minMatchSeparationAngle double Specifiestheminimumangulardifference,indegrees,betweentwomatchesthathaveuniqueangles.Thefunctiondoesnotreturnmatchesthathavethesameposition,scale,andangle.Setthisvalueto–1ifyoudonotwantthefunctiontousetheangleofamatchtodeterminewhetherthematchisunique.

minMatchSeparationScale double Specifiestheminimumdifferenceinscale,expressedasapercentage,betweentwomatchesthathaveuniquescales.Thefunctiondoesnotreturnmatchesthathavethesameposition,scale,andangle.Setthisvalueto–1ifyoudonotwantthefunctiontousethescaleofamatchtodeterminewhetherthematchisunique.

maxMatchOverlap double Specifiesthemaximumamountofoverlap,expressedasapercentage,allowedbetweentheboundingrectanglesoftwouniquematches.Thefunctiondoesnotreturnmatchesthatexceedthisoverlappercentage.Setthisvalueto–1ifyouwantthefunctiontoignoreboundingrectangleoverlap.

coarseResult int Specifieswhetheryouwantthe

Page 2730: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

functiontospendlesstimeaccuratelyestimatingthelocationofamatch.SetthisvaluetoTRUEifyouwanttoquicklydeterminewhetherapartispresentintheinspectionimagewithoutanaccurateestimateofitsposition,angle,andscale.SetthisvaluetoFALSEtospecifythatthefunctionreturnsmatcheswithpixelorsubpixelaccuracy.

Page 2731: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

NearestNeighborClassResultResultsoftrainingwiththeNearestNeighborengine.Elements

Name Type Description

className char* Thenameoftheclass.standardDeviation float Thestandarddeviationofthemembersof

thisclass.count int Thenumberofsamplesinthisclass.

Page 2732: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

OpenContourDefinesthelocationandsizeofanopencontour,whichisaseriesofconnectedpointswherethelastpointdoesnotconnecttothefirst.Elements

Name Type Description

points Point* Thepointsthatmakeuptheopencontour.numPoints int Thenumberofpointsinthearray.

Page 2733: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PairOfParallelLinePairsFeatureApairofparallellinepairsfeature.Elements

Name Type Description

firstParallelLinePair ParallelLinePairFeature Thefirstparallellinepair.

secondParallelLinePair ParallelLinePairFeature Thesecondparallellinepair.

rotation double Theorientationofthefeaturewithrespecttothehorizontal.

distance double Thedistancefromthemidlineofthefirstparallellinepairtothemidlineofthesecondparallellinepair.

Page 2734: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParallelLinePairFeatureAparallellinepairfeature.Elements

Name Type Description

firstStartPoint PointFloat Thestartingpointofthefirstlineofthepair.

firstEndPoint PointFloat Theendingpointofthefirstlineofthepair.

secondStartPoint PointFloat Thestartingpointofthesecondlineofthepair.

secondEndPoint PointFloat Theendingpointofthesecondlineofthepair.

rotation double Theorientationofthefeaturewithrespecttothehorizontal.

distance double Thedistancefromthefirstlinetothesecondline.

Page 2735: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParticleFilterCriteriaDescribesthecriteriausedtofilterparticlesinanimage.Elements

Name Type Description

parameter MeasurementValue Themorphologicalmeasurementthatthefunctionusesforfiltering.

lower float Thelowerboundofthecriteriarange.upper float Theupperboundofthecriteriarange.exclude int SetthiselementtoTRUEtoindicatethat

amatchoccurswhenthevalueisoutsidethecriteriarange.SetthiselementtoFALSEtoindicatethatamatchoccurswhenthevalueisinsidethecriteriarange.

Page 2736: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParticleFilterOptionsOptionsusedbyimaqParticleFiltertofilterbinaryparticles.Elements

Name Type Description

rejectMatches int SetthisparametertoTRUEtotransferonlythoseparticlesthatdonotmeetallthecriteria.SetthisparametertoFALSEtotransferonlythoseparticlesthatmeetallthecriteriatothedestination.

rejectBorder int SetthiselementtoTRUEtorejectborderparticles.SetthiselementtoFALSEtokeepborderparticles.

connectivity8 int SetthisparametertoTRUEtouseconnectivity-8todeterminewhetherparticlesaretouching.SetthisparametertoFALSEtouseconnectivity-4todeterminewhetherparticlesaretouching.Formoreinformationaboutconnectivity,refertoChapter9,BinaryMorphology,intheNIVisionConceptsManual.

Page 2737: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

QRCodeDataTokenContainsthedataforaspecificQRtoken.Elements

Name Type Description

mode QRStreamMode SpecifiesthestreammodeortheformatofthedatathatisencodedintheQRcode.

modeData unsignedint Indicatesspecifiersusedbytheusertopostprocessthedataifitrequiresit.Typicallyrepresentssize,sometimesrepresentslanguageforECIStreamModeandApplicationIDforEAN-128codes.

data unsignedchar* ShowstheencodeddataintheQRcode.dataLength unsignedint Specifiesthelengthofthedatafoundin

theQRcode.

Page 2738: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

QuantifyDataStatisticaldataforasetofpixels.Elements

Name Type Description

mean float Themeanvalueofthepixelvalues.stdDev float Thestandarddeviationofthepixelvalues.min float Thesmallestpixelvalue.max float Thelargestpixelvalue.calibratedArea float Thearea,calibratedtothecalibrationinformation

oftheimage.pixelArea int Thearea,innumberofpixels.relativeSize float Theproportion,expressedasapercentage,of

theassociatedregionrelativetothewholeimage.

Page 2739: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

RakeOptionsDescribeshowtosearchfortheedges.Elements

Name Type Description

threshold int Specifiesthethresholdvalueforthecontrastoftheedge.Thefunctionidentifiesonlyedgeswithacontrastgreaterthanthisvalueinthedetectionprocess.

width int Thenumberofpixelsthatthefunctionaveragestofindthecontrastateithersideoftheedge.

steepness int Thespan,inpixels,oftheslopeoftheedgeprojectedalongthepathspecifiedbytheinputpoints.

subsamplingRatio int Specifiesthenumberofpixelsthatseparatetwoconsecutivesearchlines.

subpixelType InterpolationMethod Themethodforinterpolating.ValidoptionsincludeIMAQ_QUADRATICandIMAQ_CUBIC_SPLINE.

subpixelDivisions int Thenumberofsamplesthefunctionobtainsfromapixel.Forexample,setsubpixelDivisionsto4tospliteachpixelintofoursubpixels.Themaximumnumberofsubpixeldivisionsis12.

Page 2740: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

RakeReportInformationdescribingtherakeusedbythefunctionandtheedgesthefunctioncalculatedwiththerake.Elements

Name Type Description

rakeLines LineFloat* Thecoordinatelocationofeachoftherakelinesusedbythefunction.

numRakeLines int ThenumberoflinesintherakeLinesarray.

firstEdges PointFloat* Thecoordinatelocationofalledgesdetectedasfirstedges.

numFirstEdges unsignedint ThenumberofpointsinthefirstEdgesarray.

lastEdges PointFloat* Thecoordinatelocationofalledgesdetectedaslastedges.

numLastEdges unsignedint ThenumberofpointsinthelastEdgesarray.

allEdges EdgeLocationReport* Anarrayofreportsdescribingthelocationoftheedgeslocatedbyeachrakeline.

linesWithEdges int* AnarrayofindicesintotherakeLinesarrayindicatingtherakelinesonwhichthefunctiondetectedatleastoneedge.

numLinesWithEdges int Thenumberofrakelinesalongwhichthefunctiondetectededges.Thisnumberrepresentsthesize

Page 2741: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ofthelinesWithEdgesarrayandthenumberofEdgeLocationReportsintheallEdgesarray.

Page 2742: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReadTextReportContainsinformationaboutthetextthatyouread.Elements

Name Type Description

readString constchar* Thereadstring.characterReport constCharReport* Anarrayofreports

describingthepropertiesofeachidentifiedcharacter.

numCharacterReports int Thenumberofidentifiedcharacters.

Page 2743: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReadTextReport2Containsinformationaboutthetextthatyouread.Elements

Name Type Description

readString constchar* Thereadstring.characterReport CharReport2* Anarrayofreportsdescribingthe

propertiesofeachidentifiedcharacter.

numCharacterReports int Thenumberofidentifiedcharacters.

Page 2744: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

RectangleFeatureArectanglefeature.

NoteWidthisdefinedasthelengthoftheshortersideofarectangleandheightisdefinedasthelongersideoftherectangle.

Elements

Name Type Description

position PointFloat Thecenteroftherectangle.corner[4] PointFloat Thefourcornersoftherectangle.rotation double Theorientationoftherectanglewithrespecttothe

horizontal.width double Thewidthoftherectangle.height double Theheightoftherectangle.

Page 2745: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

RotationAngleRangeSpecifiesanallowedrangeofrotationforapattern.Elements

Name Type Description

lower float Thelowestamountofrotation,indegrees,avalidpatterncanhave.

upper float Thehighestamountofrotation,indegrees,avalidpatterncanhave.

Page 2746: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

SearchArcInfoDescribesasearcharcusedforedgefinding.Elements

Name Type Description

arcCoordinates ArcInfo2 Describesthearcusedforedgedetection.

edgeReport EdgeReport2 Describestheedgesfoundinthissearchline.

Page 2747: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

SearchLineInfoDescribesasearchlineusedforfindingastraightedge.Elements

Name Type Description

lineCoordinates LineFloat Theendpointsofthesearchline.edgeReport EdgeReport2 Describestheedgesfoundinthissearch

line.

Page 2748: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

SelectParticleCriteriaThecriteriaforaparticlefilter.Elements

Name Type Description

parameter MeasurementValue Themorphologicalmeasurementthatthefunctionusesforfiltering.IfyousetthemodeofimaqGetParticleInfo()toIMAQ_BASIC_INFO,parametercanonlybethefollowingvalues:IMAQ_AREA,IMAQ_AREA_CALIBRATED,IMAQ_LEFT_COLUMN,IMAQ_TOP_ROW,IMAQ_RIGHT_COLUMN,orIMAQ_BOTTOM_ROW.IfyousetthemodeofimaqGetParticleInfo()toIMAQ_ALL_INFO,parametercanbeanyoneofthevalueslistedaboveoronethefollowingvalues:IMAQ_NUM_HOLES,IMAQ_AREA_OF_HOLES,IMAQ_MAX_SEGMENT_LENGTH,IMAQ_MAX_SEGMENT_LEFT_COLUMN,IMAQ_MAX_SEGMENT_TOP_ROW,IMAQ_PERIMETER,IMAQ_PERIMETER_OF_HOLES,IMAQ_SIGMA_X,IMAQ_SIGMA_Y,IMAQ_SIGMA_XX,IMAQ_SIGMA_YY,IMAQ_SIGMA_XY,IMAQ_PROJ_X,orIMAQ_PROJ_Y.

lower float Thelowerboundaryofthecriteriarange.upper float Theupperboundaryofthecriteriarange.

Page 2749: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

SpokeOptionsDescribeshowtosearchfortheedges.Elements

Name Type Description

threshold int Specifiesthethresholdvalueforthecontrastoftheedge.Thefunctionidentifiesonlyedgeswithacontrastgreaterthanthisvalueinthedetectionprocess.

width int Thenumberofpixelsthatthefunctionaveragestofindthecontrastateithersideoftheedge.

steepness int Thespan,inpixels,oftheslopeoftheedgeprojectedalongthepathspecifiedbytheinputpoints.

subsamplingRatio double Theangle,indegrees,betweeneachradialsearchlineinthespoke.

subpixelType InterpolationMethod Themethodforinterpolating.ValidoptionsincludeIMAQ_QUADRATICandIMAQ_CUBIC_SPLINE.

subpixelDivisions int Thenumberofsamplesthefunctionobtainsfromapixel.Forexample,setsubpixelDivisionsto4tospliteachpixelintofoursubpixels.Themaximumnumberofsubpixeldivisionsis12.

Page 2750: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

SpokeReportInformationdescribingthespokeusedbythefunctionandtheedgesthefunctioncalculatedwiththespoke.Elements

Name Type Description

spokeLines LineFloat* Thecoordinatelocationofeachofthespokelinesusedbythefunction.

numSpokeLines int ThenumberoflinesinthespokeLinesarray.

firstEdges PointFloat* Thecoordinatelocationofalledgesdetectedasfirstedges.

numFirstEdges int ThenumberofpointsinthefirstEdgesarray.

lastEdges PointFloat* Thecoordinatelocationofalledgesdetectedaslastedges.

numLastEdges int ThenumberofpointsinthelastEdgesarray.

allEdges EdgeLocationReport* Anarrayofreportsdescribingthelocationoftheedgeslocatedbyeachspokeline.

linesWithEdges int* AnarrayofindicesintothespokeLinesarrayindicatingtherakelinesonwhichthefunctiondetectedatleastoneedge.

numLinesWithEdges int Thenumberofspokelinesalongwhichthefunctiondetectsedges.Thisnumberrepresentsthesizeofthe

Page 2751: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

linesWithEdgesarrayandthenumberofEdgeLocationReportsintheallEdgesarray.

Page 2752: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

StraightEdgeContainsinformationaboutthedetectedstraightedge.Elements

Name Type Description

straightEdgeCoordinates LineFloat Endpointsofthedetectedstraightedgeinpixelcoordinates.

calibratedStraightEdgeCoordinates LineFloat Endpointsofthedetectedstraightedgeinreal-worldcoordinates.

angle double Angleofthefoundedgeusingthepixelcoordinates.

calibratedAngle double Angleofthefoundedgeusingthereal-worldcoordinates.

score double Describesthescoreofthedetectededge.

straightness double Thestraightnessvalueofthedetectedstraightedge.Straightnessisdefinedastherootmeansquarederrorofthefittedlinethatrepresentsthedetectedstraightedge.Avalueof0indicatesaperfectlystraightline.

averageSignalToNoiseRatio double Describestheaveragesignaltonoiseratio

Page 2753: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

(SNR)ofthedetectededge.

calibrationValid int Indicatesifthecalibrationdataforthestraightedgeisvalid.

usedEdges EdgeInfo* Anarrayofedgesthatwereusedtodeterminethisstraightline.

numUsedEdges unsignedint

IndicatesthenumberofedgesintheusedEdgesarray.

Page 2754: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ColorTheinformationnecessarytodescribeacolorinaparticularcolorspace.Elements

Name Type Description

rgb RGBValue TheinformationneededtodescribeacolorintheRGB(Red,Green,andBlue)colorspace.

hsl HSLValue TheinformationneededtodescribeacolorintheHSL(Hue,Saturation,andLuminance)colorspace.

hsv HSVValue TheinformationneededtodescribeacolorintheHSI(Hue,Saturation,andValue)colorspace.

hsi HSIValue TheinformationneededtodescribeacolorintheHSI(Hue,Saturation,andIntensity)colorspace.

rawValue int Theintegervalueforthedatainthecolorunion.ThisvalueisnotvalidfortheCIEL*a*b*andCIEXYZcolorspaces.

Page 2755: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ContourUnionTheinformationnecessarytodescribeacontourincoordinatespace.ThevalidfieldoftheContourUniondependsonthecontourtype.Elements

Name Type Description

point Point* UsethismemberwhenthecontourisoftypeIMAQ_POINT.

line Line* UsethismemberwhenthecontourisoftypeIMAQ_LINE.

rect Rect* UsethismemberwhenthecontourisoftypeIMAQ_RECT.

ovalBoundingBox Rect* UsethismemberwhenthecontourisoftypeIMAQ_OVAL.

closedContour ClosedContour* UsethismemberwhenthecontourisoftypeIMAQ_CLOSED_CONTOUR.

openContour OpenContour* UsethismemberwhenthecontourisoftypeIMAQ_OPEN_CONTOUR.

annulus Annulus* UsethismemberwhenthecontourisoftypeIMAQ_ANNULUS.

rotatedRect RotatedRect* UsethismemberwhenthecontourisoftypeIMAQ_ROTATED_RECT.

Page 2756: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

GeometricFeatureAunionofpointerstogeometricfeaturetypes.Elements

Name Type Description

circle CircleFeature* ApointertoaCircleFeature.ellipse EllipseFeature* ApointertoanEllipseFeature.constCurve ConstCurveFeature* Apointertoa

ConstCurveFeature.rectangle RectangleFeature* Apointertoa

RectangleFeature.leg LegFeature* ApointertoaLegFeature.corner CornerFeature* ApointertoaCornerFeature.parallelLinePair ParallelLinePairFeature* Apointertoa

ParallelLinePairFeature.pairOfParallelLinePairs PairOfParallelLinePairsFeature* Apointertoa

PairOfParallelLinePairsFeature.line LineFeature* ApointertoaLineFeature.closedCurve ClosedCurveFeature* Apointertoa

ClosedCurveFeature.

Page 2757: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

AIMGradeThelettergradeassignedtoaDataMatrixbarcodebasedontheAIMPrintQualitystandard,whereIMAQ_AIM_GRADE_ArepresentsthebestgradeandIMAQ_AIM_GRADE_Frepresentstheworstgrade.Elements

Name Value Description

IMAQ_AIM_GRADE_F 0 TheDataMatrixbarcodereceivedagradeofF.

IMAQ_AIM_GRADE_D 1 TheDataMatrixbarcodereceivedagradeofD.

IMAQ_AIM_GRADE_C 2 TheDataMatrixbarcodereceivedagradeofC.

IMAQ_AIM_GRADE_B 3 TheDataMatrixbarcodereceivedagradeofB.

IMAQ_AIM_GRADE_A 4 TheDataMatrixbarcodereceivedagradeofA.

IMAQ_DATA_MATRIX_AIM_GRADE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2758: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Barcode2DCellShapeSpecifiestheshapeofthecellsinsidethe2Dbarcode.Elements

Name Value Description

IMAQ_SQUARE_CELLS 0 Thefunctionusesanalgorithmfordecodingthe2Dbarcodethatworkswithsquaredatacells.

IMAQ_ROUND_CELLS 1 Thefunctionusesanalgorithmfordecodingthe2Dbarcodethatworkswithrounddatacells.Usethisalgorithmonlywhenthedatacellshaveclear,distinctroundedgeswithaminimumofblurring.

IMAQ_BARCODE_2D_CELL_SHAPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2759: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Barcode2DContrastSpecifiesthecontrastofthe2Dbarcode.Elements

Name Value Description

IMAQ_ALL_BARCODE_2D_CONTRASTS 0 Thefunctionsearchesforbarcodesofeachcontrasttype.Usingthisoptionreducestheperformanceofthefunction.

IMAQ_BLACK_ON_WHITE_BARCODE_2D 1 Thefunctionsearchesfor2Dbarcodescontainingblackdataonawhitebackground.

IMAQ_WHITE_ON_BLACK_BARCODE_2D 2 Thefunctionsearchesfor2Dbarcodescontainingwhitedataonablackbackground.

IMAQ_BARCODE_2D_CONTRAST_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2760: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Barcode2DShapeSpecifiestheshapeofthe2Dbarcode.Elements

Name Value Description

IMAQ_SQUARE_BARCODE_2D 0 Thefunctionsearchesforsquare2Dbarcodes.

IMAQ_RECTANGULAR_BARCODE_2D 1 Thefunctionsearchesforrectangular2Dbarcodes.

IMAQ_BARCODE_2D_SHAPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2761: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Barcode2DTypeThetypeof2Dbarcode.Elements

Name Value Description

IMAQ_PDF417 0 The2DbarcodeisoftypePDF417.

IMAQ_DATA_MATRIX_ECC_000 1 The2DbarcodeisoftypeDataMatrixECC000.

IMAQ_DATA_MATRIX_ECC_050 2 The2DbarcodeisoftypeDataMatrixECC050.

IMAQ_DATA_MATRIX_ECC_080 3 The2DbarcodeisoftypeDataMatrixECC080.

IMAQ_DATA_MATRIX_ECC_100 4 The2DbarcodeisoftypeDataMatrixECC100.

IMAQ_DATA_MATRIX_ECC_140 5 The2DbarcodeisoftypeDataMatrixECC140.

Page 2762: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_DATA_MATRIX_ECC_200 6 The2DbarcodeisoftypeDataMatrixECC200.

IMAQ_BARCODE_2D_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2763: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

BrowserFrameStyleThestylefortheframearoundeachthumbnail.Elements

Name Value Description

IMAQ_RAISED_FRAME 0 Eachthumbnailhasaraisedframe.

IMAQ_BEVELLED_FRAME 1 Eachthumbnailhasabeveledframe.

IMAQ_OUTLINE_FRAME 2 Eachthumbnailhasanoutlinedframe.

IMAQ_HIDDEN_FRAME 3 Eachthumbnailhasahiddenframe.

IMAQ_STEP_FRAME 4 Eachthumbnailhasasteppedframe.

IMAQ_RAISED_OUTLINE_FRAME 5 Eachthumbnailhasaraised,outlinedframe.

Page 2764: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_BROWSER_FRAME_STYLE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2765: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

BrowserLocationSpecifieswhichcelltouseinthebrowser.Elements

Name Value Description

IMAQ_INSERT_FIRST_FREE 0 Insertsthethumbnailinthefirstavailablecell.

IMAQ_INSERT_END 1 Insertsthethumbnailafterthelastoccupiedcell.

IMAQ_BROWSER_LOCATION_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2766: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CalibrationModeSpecifiesthetypeofcalibrationafunctionusestoreducedistortioninanimageorthecalibrationstateofanimage.Elements

Name Value Description

IMAQ_PERSPECTIVE 0 Functionscorrectfordistortioncausedbythecamera'sperspective.

IMAQ_NONLINEAR 1 Functionscorrectfordistortioncausedbythecamera'slens.

IMAQ_SIMPLE_CALIBRATION 2 Functionsdonotcorrectfordistortion.

IMAQ_CORRECTED_IMAGE 3 Theimageisalreadycorrected.

IMAQ_DISTORTION_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2767: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

CalibrationROISpecifiestheROIcorrectionfunctionsyoucanusewhencorrectinganimage.Elements

Name Value Description

IMAQ_FULL_IMAGE 0 Thecorrectionfunctioncorrectsthewholeimage,regardlessoftheuser-definedorcalibration-definedROIs.

IMAQ_CALIBRATION_ROI 1 ThecorrectionfunctioncorrectstheareadefinedbythecalibrationROI.ThecalibrationROIcorrespondstotheareaofthecalibrationtemplatecontainingdots.

IMAQ_USER_ROI 2 Thecorrectionfunctioncorrectstheareadefinedbytheuser-definedROI.

Page 2768: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_CALIBRATION_AND_USER_ROI 3 Thecorrectionfunctioncorrectstheareadefinedbytheintersectionoftheuser-definedROIandthecalibrationROI.

IMAQ_CALIBRATION_OR_USER_ROI 4 Thecorrectionfunctioncorrectstheareadefinedbytheunionoftheuser-definedROIandthecalibrationROI.

IMAQ_CALIBRATION_ROI_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2769: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ColorIgnoreModeSpecifieswhetherthefunctionexcludescertaincolorsfromthecolorfeaturesofthetemplateimage.Anycolorthefunctionexcludesduringthelearningprocessisalsoexcludedinthematchphase.Elements

Name Value Description

IMAQ_IGNORE_NONE 0 Specifiesthatthefunctiondoesnotignoreanypixels.

IMAQ_IGNORE_BLACK 1 Specifiesthatthefunctionignoresblackpixels.

IMAQ_IGNORE_WHITE 2 Specifiesthatthefunctionignoreswhitepixels.

IMAQ_IGNORE_BLACK_AND_WHITE 3 Specifiesthatthefunctionignoresblackpixelsandwhitepixels.

IMAQ_BLACK_WHITE_IGNORE_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2770: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ColumnProcessingModeSpecifiesthemethodthatthefunctionusestoprocessthedataextractedforedgedetection.Elements

Name Value Description

IMAQ_AVERAGE_COLUMNS 0 Averagesthedataextractedforedgedetection.

IMAQ_MEDIAN_COLUMNS 1 Takesthemedianofthedataextractedforedgedetection.

IMAQ_COLUMN_PROCESSING_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2771: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ContourTypeThetypeofacontour.Elements

Name Value Description

IMAQ_EMPTY_CONTOUR 0 Thecontourisempty.

IMAQ_POINT 1 Thecontourrepresentsapoint.

IMAQ_LINE 2 Thecontourrepresentsaline.

IMAQ_RECT 3 Thecontourrepresentsarectangle.

IMAQ_OVAL 4 Thecontourrepresentsanoval.

IMAQ_CLOSED_CONTOUR 5 Thecontourrepresentsaseriesofconnectedpointswherethelastpointconnectstothefirst.

IMAQ_OPEN_CONTOUR 6 Thecontourrepresentsaseriesofconnectedpointswherethelastpointdoesnotconnecttothefirst.

Page 2772: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_ANNULUS 7 Thecontourrepresentsanannulus.

IMAQ_ROTATED_RECT 8 Thecontourrepresentsarotatedrectangle.

IMAQ_CONTOUR_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2773: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DataMatrixCellFillModeSpecifiesthefillpercentageforacellthatisinthe"ON"state.Elements

Name Value

IMAQ_AUTO_DETECT_CELL_FILL_MODE -2

IMAQ_LOW_FILL 0

IMAQ_NORMAL_FILL 1

IMAQ_DATA_MATRIX_CELL_FILL_MODE_SIZE_GUARD 0xFFFFFFFF

Page 2774: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DataMatrixCellFilterModeSpecifiesthemodethefunctionusestodeterminethepixelvalueforeachcell.Elements

Name Value

IMAQ_AUTO_DETECT_CELL_FILTER_MODE -2

IMAQ_AVERAGE_FILTER 0

IMAQ_MEDIAN_FILTER 1

IMAQ_CENTRAL_AVERAGE_FILTER 2

IMAQ_HIGH_AVERAGE_FILTER 3

IMAQ_LOW_AVERAGE_FILTER 4

IMAQ_VERY_HIGH_AVERAGE_FILTER 5

IMAQ_VERY_LOW_AVERAGE_FILTER 6

Page 2775: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_ALL_CELL_FILTERS 8

IMAQ_DATA_MATRIX_CELL_FILTER_MODE_SIZE_GUARD 0xFFFFFFFF

Page 2776: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DataMatrixCellSampleSizeSpecifiesthesamplesize,inpixels,thefunctionshouldtaketodetermineifeachcellisonoroff.Elements

Name Value

IMAQ_AUTO_DETECT_CELL_SAMPLE_SIZE -2

IMAQ_1x1 1

IMAQ_2x2 2

IMAQ_3x3 3

Page 2777: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_4x4 4

IMAQ_5x5 5

IMAQ_6x6 6

IMAQ_7x7 7

IMAQ_DATA_MATRIX_CELL_SAMPLE_SIZE_SIZE_GUARD 0xFFFFFFFF

Page 2778: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DataMatrixDemodulationModeSpecifiesthemodethefunctionshouldusetodemodulate(determinewhichcellsareonandwhichcellsareoff)theDataMatrixbarcode.Elements

Name Value

IMAQ_AUTO_DETECT_DEMODULATION_MODE -2

IMAQ_HISTOGRAM 0

IMAQ_LOCAL_CONTRAST 1

IMAQ_COMBINED 2

Page 2779: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_ALL_DEMODULATION_MODES 3

IMAQ_DATA_MATRIX_DEMODULATION_MODE_SIZE_GUARD 0xFFFFFFFF

Page 2780: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DataMatrixECCSpecifiestheECCusedfortheDataMatrixbarcodeintheimage.Elements

Name Value Description

IMAQ_AUTO_DETECT_ECC -2 SetsthefunctiontodeterminetheDataMatrixbarcodeECCautomatically.

IMAQ_ECC_000 0 SetsthefunctiontoreadDataMatrixbarcodesofECC000only.

IMAQ_ECC_050 50 SetsthefunctiontoreadDataMatrixbarcodesofECC050only.

IMAQ_ECC_080 80 SetsthefunctiontoreadDataMatrixbarcodesofECC080only.

IMAQ_ECC_100 100 Setsthefunctionto

Page 2781: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

readDataMatrixbarcodesofECC100only.

IMAQ_ECC_140 140 SetsthefunctiontoreadDataMatrixbarcodesofECC140only.

IMAQ_ECC_000_140 190 SetsthefunctiontoreadDataMatrixbarcodesofECC000,ECC050,ECC080,ECC100,andECC140only.

IMAQ_ECC_200 200 SetsthefunctiontoreadDataMatrixbarcodesofECC200only.

IMAQ_DATA_MATRIX_ECC_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2782: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DataMatrixMirrorModeSpecifiesiftheDataMatrixbarcodeappearsnormallyintheimageoriftheDataMatrixbarcodeappearsmirroredintheimage.Elements

Name Value Description

IMAQ_AUTO_DETECT_MIRROR -2 SpecifiesthatthefunctionshoulddetermineiftheDataMatrixbarcodeismirrored.

IMAQ_APPEARS_NORMAL 0 SpecifiesthatthefunctionshouldexpecttheDataMatrixbarcodetoappearnormal.

IMAQ_APPEARS_MIRRORED 1 SpecifiesthatthefunctionshouldexpecttheDataMatrixbarcodetoappearmirrored.

IMAQ_DATA_MATRIX_MIRROR_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2783: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DataMatrixPolaritySpecifiesthedata-to-backgroundcontrastfortheDataMatrixbarcode.Elements

Name Value Description

IMAQ_AUTO_DETECT_POLARITY -2 SetsthefunctiontodeterminetheDataMatrixbarcodepolarityautomatically.

IMAQ_BLACK_DATA_ON_WHITE_BACKGROUND 0 SetsthefunctiontoreadDataMatrixbarcodeswithdarkdataonabrightbackground.

IMAQ_WHITE_DATA_ON_BLACK_BACKGROUND 1 SetsthefunctiontoreadDataMatrixbarcodeswithbrightdataonadarkbackground.

IMAQ_DATA_MATRIX_POLARITY_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2784: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DataMatrixRotationModeSpecifiestheamountofDataMatrixbarcoderotationthefunctionshouldallowfor.Elements

Name Value

IMAQ_UNLIMITED_ROTATION 0

IMAQ_0_DEGREES 1

IMAQ_90_DEGREES 2

IMAQ_180_DEGREES 3

IMAQ_270_DEGREES 4

Page 2785: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_DATA_MATRIX_ROTATION_MODE_SIZE_GUARD 0xFFFFFFFF

Page 2786: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

DataMatrixSubtypeSpecifiesthesubtypesofDataMatrixbarcodesthatthefunctionsearchesfor.Elements

Name Value Description

IMAQ_ALL_DATA_MATRIX_SUBTYPES 0 ThefunctionsearchesforDataMatrixbarcodesofallsubtypes.

IMAQ_DATA_MATRIX_SUBTYPES_ECC_000_ECC_140 1 ThefunctionsearchesforDataMatrixbarcodesofsubtypesECC000,ECC050,ECC080,ECC100andECC140.

IMAQ_DATA_MATRIX_SUBTYPE_ECC_200 2 ThefunctionsearchesforDataMatrixECC200barcodes.

IMAQ_DATA_MATRIX_SUBTYPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2787: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Direction3DDefinesthe3Dorientation.Elements

Name Value Description

IMAQ_3D_NW 0 Theviewingangleforthe3Dimageisfromthenorthwest.

IMAQ_3D_SW 1 Theviewingangleforthe3Dimageisfromthesouthwest.

IMAQ_3D_SE 2 Theviewingangleforthe3Dimageisfromthesoutheast.

IMAQ_3D_NE 3 Theviewingangleforthe3Dimageisfromthenortheast.

IMAQ_DIRECTION_3D_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2788: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

EdgeFilterSizeSpecifiesthewidthoftheedgefilterthefunctionusestoidentifycurvesintheimage.Elements

Name Value Description

IMAQ_FINE 0 Specifiesthatthefunctionusesafine(narrow)edgefilter.

IMAQ_NORMAL 1 Specifiesthatthefunctionusesanormaledgefilter.

IMAQ_EDGE_FILTER_SIZE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2789: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

EdgePolaritySearchModeDeterminesthepolarityofedgestosearchfor.Elements

Name Value Description

IMAQ_SEARCH_FOR_ALL_EDGES 0 Searchesforalledges.

IMAQ_SEARCH_FOR_RISING_EDGES 1 Searchesforrisingedgesonly.

IMAQ_SEARCH_FOR_FALLING_EDGES 2 Searchesforfallingedgesonly.

IMAQ_EDGE_POLARITY_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2790: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ExtractionModeSpecifiesthemethodthefunctionusestoidentifythelocationsofthecurvesintheimage.Elements

Name Value Description

IMAQ_NORMAL_IMAGE 0 Specifiesthatthefunctionmakesnoassumptionsabouttheuniformityofobjectsintheimageortheimagebackground.

IMAQ_UNIFORM_REGIONS 1 Specifiesthatthefunctionassumesthateithertheobjectsintheimageortheimagebackgroundconsistsofuniformpixelvalues.Thisallowsthefunctiontomoreaccuratelycalculatetheexternalcurvesof

Page 2791: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

theobjects.IMAQ_EXTRACTION_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2792: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FindReferenceDirectionThedirectiontosearchfortheprimaryaxisandtheexpectedorientationoftheprimaryaxis.Elements

Name Value Description

IMAQ_LEFT_TO_RIGHT_DIRECT 0 Searchesfromtheleftsideofthesearchareatotherightsideofthesearchareaforadirectaxis.

IMAQ_LEFT_TO_RIGHT_INDIRECT 1 Searchesfromtheleftsideofthesearchareatotherightsideofthesearchareaforanindirectaxis.

IMAQ_TOP_TO_BOTTOM_DIRECT 2 Searchesfromthetopofthesearchareatothebottomofthesearchareaforadirectaxis.

IMAQ_TOP_TO_BOTTOM_INDIRECT 3 Searches

Page 2793: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

fromthetopofthesearchareatothebottomofthesearchareaforanindirectaxis.

IMAQ_RIGHT_TO_LEFT_DIRECT 4 Searchesfromtherightsideofthesearchareatotheleftsideofthesearchareaforadirectaxis.

IMAQ_RIGHT_TO_LEFT_INDIRECT 5 Searchesfromtherightsideofthesearchareatotheleftsideofthesearchareaforanindirectaxis.

IMAQ_BOTTOM_TO_TOP_DIRECT 6 Searchesfromthebottomofthesearchareatothetopofthesearchareaforadirectaxis.

Page 2794: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_BOTTOM_TO_TOP_INDIRECT 7 Searchesfromthebottomofthesearchareatothetopofthesearchareaforanindirectaxis.

IMAQ_FIND_COORD_SYS_DIR_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2795: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

FontColorSetsthecolorofthefont.Elements

Name Value Description

IMAQ_WHITE 0 Drawstextinwhite.IMAQ_BLACK 1 Drawstextinblack.IMAQ_INVERT 2 Invertsthetext

pixels.IMAQ_BLACK_ON_WHITE 3 Drawstextinblack

withawhitebackground.

IMAQ_WHITE_ON_BLACK 4 Drawstextinwhitewithablackbackground.

IMAQ_FONT_COLOR_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2796: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

GeometricMatchingModeSpecifiesthemethodimaqMatchGeometricPattern2()useswhenlookingforthepatternintheimage.Elements

Name Value Description

IMAQ_GEOMETRIC_MATCH_SHIFT_INVARIANT 0 Searchesforoccurrencesofthepatternintheimage,assumingthatthepatternisnotrotatedmorethanplusorminus5degrees.

IMAQ_GEOMETRIC_MATCH_ROTATION_INVARIANT 1 Searchesforoccurrencesofthepatternintheimagewithreducedrestrictionontherotationofthepattern.

IMAQ_GEOMETRIC_MATCH_SCALE_INVARIANT 2 Searchesforoccurrencesofthe

Page 2797: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

patternintheimagewithreducedrestrictiononthesizeofthepattern.

IMAQ_GEOMETRIC_MATCH_OCCLUSION_INVARIANT 4 Searchesforoccurrencesofthepatternintheimage,allowingforaspecifiedpercentageofthepatterntobeoccluded.

IMAQ_GEOMETRIC_MATCHING_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2798: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

GroupBehaviorDefinesthebehaviorforanoverlaygroup.Elements

Name Value Description

IMAQ_GROUP_CLEAR 0 Setsthebehavioroftheoverlaygrouptoclearthecurrentsettingswhenanimageistransformed.

IMAQ_GROUP_KEEP 1 Setsthebehavioroftheoverlaygrouptokeepthecurrentsettingswhenanimageistransformed.

IMAQ_GROUP_TRANSFORM 2 Setsthebehavioroftheoverlaygrouptotransformwiththeimage.

Page 2799: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ImageFeatureModeSpecifieswhichfeaturesfromthecolorpatternthefunctionuses.Elements

Name Value Description

IMAQ_COLOR_AND_SHAPE_FEATURES 0 Instructsthefunctiontousethecolorandtheshapefeaturesofthecolorpattern.

IMAQ_COLOR_FEATURES 1 Instructsthefunctiontousethecolorfeaturesofthecolorpattern.

IMAQ_SHAPE_FEATURES 2 Instructsthefunctiontousetheshapefeaturesofthecolorpattern.

IMAQ_FEATURE_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2800: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

LevelTypeDetermineshowthefunctionevaluatesthethresholdandhysteresisvalues.Elements

Name Value Description

IMAQ_ABSOLUTE 0 Thefunctionevaluatesthethresholdandhysteresisvaluesasabsolutevalues.

IMAQ_RELATIVE 1 Thefunctionevaluatesthethresholdandhysteresisvaluesrelativetothedynamicrangeofthegivenpath.

IMAQ_LEVEL_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2801: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

MappingMethodDescribesthemethodforconverting16-bitpixels(65,536grayscalevalues)to8-bitpixels(256grayscalevalues).Elements

Name Value Description

IMAQ_FULL_DYNAMIC 0 Thefunctionmapsthefulldynamicrangeofthe16-bitimagetoan8-bitscale.Itdisplays16-bitimagesbyscalingthedatato8bits,calculatedasafunctionofthedynamicrangefromtheimagesource.Thefunctioncalculatestheminimumvalue(min)andthemaximumvalue(max)automatically.Thenthefunctionappliesthefollowingformulatoeachpixel:Display(x,y)=(Src(x,y)-min)×255/(max-min)

Page 2802: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_DOWNSHIFT 1 Thefunctionshiftsthe16-bitimagepixelstotherightthenumberoftimesspecifiedbytheshiftCountelementoftheDisplayMappingstructure.

IMAQ_RANGE 2 ThefunctionmapsthepixelvaluesintherangespecifiedbytheminimumValueandmaximumValueelementsoftheDisplayMappingstructuretoan8-bitscale.

IMAQ_90_PCT_DYNAMIC 3 Thefunctionmapsthedynamicrangecontainingthemiddle90percentofthecumulatedhistogramoftheimagetoan8-bit(256grayscalevalues)scale.

IMAQ_PERCENT_RANGE 4 Thefunctionmapsthepixelvaluesinthe

Page 2803: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

relativepercentagerange(0to100)ofthecumulatedhistogramspecifiedbyminimumValueandmaximumValuetoan8-bitscale.

IMAQ_MAPPING_METHOD_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2804: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

MatchingModeSpecifiesthemethodtousewhenlookingforthepatternintheimage.Elements

Name Value Description

IMAQ_MATCH_SHIFT_INVARIANT 1 SearchesforoccurrencesofthetemplateimageanywhereinthesearchRect,assumingthatthepatternisnotrotatedmorethanplusorminus4degrees.

IMAQ_MATCH_ROTATION_INVARIANT 2 Searchesforoccurrencesofthepatternintheimagewithnorestrictionontherotationofthepattern.

IMAQ_MATCHING_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2805: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

NearestNeighborMethodThemethodstousewiththenearestneighboralgorithm.Elements

Name Value Description

IMAQ_MINIMUM_MEAN_DISTANCE 0 Theminimummeandistancemethod.

IMAQ_K_NEAREST_NEIGHBOR 1 Thek-nearestneighbormethod.

IMAQ_NEAREST_PROTOTYPE 2 Thenearestprototypemethod.

IMAQ_NEAREST_NEIGHBOR_METHOD_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2806: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

NearestNeighborMetricThemetricstousewiththeNearestNeighboralgorithm.Elements

Name Value Description

IMAQ_METRIC_MAXIMUM 0 Themaximummetric.

IMAQ_METRIC_SUM 1 Thesummetric.

IMAQ_METRIC_EUCLIDEAN 2 TheEuclideanmetric.

IMAQ_NEAREST_NEIGHBOR_METRIC_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2807: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

NormalizationMethodSpecifiesthemethodthatthefunctionusestonormalizethetemplateimagerelativetotheinspectionimage.Elements

Name Value Description

IMAQ_NORMALIZATION_NONE 0 Nonormalization.

IMAQ_NORMALIZATION_HISTOGRAM_MATCHING 1 Adjustimagesoitshistogramissimilartothegoldentemplate'shistogram.

IMAQ_NORMALIZATION_AVERAGE_MATCHING 2 Adjustimagesoitsmeanpixelvalueequalsthegoldentemplate'smeanpixelvalue.

IMAQ_NORMALIZATION_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2808: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParticleClassifierTypeElements

Name Value Description

IMAQ_PARTICLE_LARGEST 0 Useonlythelargestparticleintheimage.

IMAQ_PARTICLE_ALL 1 Useallparticlesintheimage.

IMAQ_PARTICLE_CLASSIFIER_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2809: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParticleInfoModeControlstheextentofparticleinformationthatthefunctionreturns.Elements

Name Value Description

IMAQ_BASIC_INFO 0 Thefunctionreturnsonlythefollowingelementsofeachreport:area,calibratedArea,boundingRect.Showingonlybasicinformationallowsthefunctiontogeneratefasterresults.

IMAQ_ALL_INFO 1 Thefunctionreturnsalltheinformationabouteachparticle.

IMAQ_PARTICLE_INFO_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2810: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ParticleTypeWhatkindofparticlestolookfor.Elements

Name Value Description

IMAQ_PARTICLE_BRIGHT 0 BrightparticlesIMAQ_PARTICLE_DARK 1 DarkparticlesIMAQ_PARTICLE_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2811: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PhotometricModeDesignateswhichphotometricinterpretationtouse.Elements

Name Value Description

IMAQ_WHITE_IS_ZERO 0 Thefunctioninterpretszero-valuepixelsaswhite.

IMAQ_BLACK_IS_ZERO 1 Thefunctioninterpretszero-valuepixelsasblack.

IMAQ_PHOTOMETRIC_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2812: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Plane3DIndicatestheviewafunctionusestoshowcompleximages.Elements

Name Value Description

IMAQ_3D_REAL 0 Thefunctionshowstherealpartofcompleximages.

IMAQ_3D_IMAGINARY 1 Thefunctionshowstheimaginarypartofcompleximages.

IMAQ_3D_MAGNITUDE 2 Thefunctionshowsthemagnitudepartofcompleximages.

IMAQ_3D_PHASE 3 Thefunctionshowsthephasepartofcompleximages.

IMAQ_PLANE_3D_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2813: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

PolarityTypeThepolarityofanedge.Elements

Name Value Description

IMAQ_EDGE_RISING 1 Theedgeisarisingedge.

IMAQ_EDGE_FALLING 0xFFFFFFFF ReservedIMAQ_POLARITY_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2814: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

QRCellFilterModeSpecifiesthemodeusedtodeterminethepixelvalueforeachcell.Elements

Name Value

IMAQ_QR_CELL_FILTER_MODE_AUTO_DETECT -2

IMAQ_QR_CELL_FILTER_MODE_AVERAGE 0

IMAQ_QR_CELL_FILTER_MODE_MEDIAN 1

IMAQ_QR_CELL_FILTER_MODE_CENTRAL_AVERAGE 2

IMAQ_QR_CELL_FILTER_MODE_HIGH_AVERAGE 3

IMAQ_QR_CELL_FILTER_MODE_LOW_AVERAGE 4

IMAQ_QR_CELL_FILTER_MODE_VERY_HIGH_AVERAGE 5

IMAQ_QR_CELL_FILTER_MODE_VERY_LOW_AVERAGE 6

IMAQ_QR_CELL_FILTER_MODE_ALL 8

IMAQ_QR_CELL_FILTER_MODE_SIZE_GUARD 0xFFFFFFFF

Page 2815: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

QRCellSampleSizeSpecifiesthesamplesize,inpixels,thefunctionshouldtaketodetermineifeachcellisonoroff.Elements

Name Value Description

IMAQ_QR_CELL_SAMPLE_SIZE_AUTO_DETECT -2 ThefunctionwilltryeachsamplesizeandusetheonewhichdecodestheQRcodewithinthefewestiterationsandutilizingtheleastamountoferrorcorrection.

IMAQ_QR_CELL_SAMPLE_SIZE1X1 1 Thefunctionwillusea1×1sizedsamplefromeachcell.

IMAQ_QR_CELL_SAMPLE_SIZE2X2 2 Thefunctionwillusea2×2sizedsamplefromeachcell.

IMAQ_QR_CELL_SAMPLE_SIZE3X3 3 Thefunctionwillusea3×3sizedsamplefrom

Page 2816: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

eachcell.IMAQ_QR_CELL_SAMPLE_SIZE4X4 4 Thefunction

willusea4×4sizedsamplefromeachcell.

IMAQ_QR_CELL_SAMPLE_SIZE5X5 5 Thefunctionwillusea5×5sizedsamplefromeachcell.

IMAQ_QR_CELL_SAMPLE_SIZE6X6 6 Thefunctionwillusea6×6sizedsamplefromeachcell.

IMAQ_QR_CELL_SAMPLE_SIZE7X7 7 Thefunctionwillusea7×7sizedsamplefromeachcell.

IMAQ_QR_CELL_SAMPLE_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2817: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

QRDemodulationModeSpecifiesthemodethefunctionshouldusetodemodulatetheQRcode.Elements

Name Value

IMAQ_QR_DEMODULATION_MODE_AUTO_DETECT -2

IMAQ_QR_DEMODULATION_MODE_HISTOGRAM 0

IMAQ_QR_DEMODULATION_MODE_LOCAL_CONTRAST 1

IMAQ_QR_DEMODULATION_MODE_COMBINED 2

IMAQ_QR_DEMODULATION_MODE_ALL 3

IMAQ_QR_DEMODULATION_MODE_SIZE_GUARD 0xFFFFFFFF

Page 2818: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

QRDimensionsSpecifiesthedimensionsoftheQRcode.Elements

Name Value Description

IMAQ_QR_DIMENSIONS_AUTO_DETECT 0 ThefunctionwillautomaticallydeterminethedimensionsoftheQRcode.

IMAQ_QR_DIMENSIONS_11x11 11 SpecifiesthedimensionsoftheQRcodeas11×11.

IMAQ_QR_DIMENSIONS_13x13 13 SpecifiesthedimensionsoftheQRcodeas13×13.

IMAQ_QR_DIMENSIONS_15x15 15 SpecifiesthedimensionsoftheQRcodeas15×15.

IMAQ_QR_DIMENSIONS_17x17 17 SpecifiesthedimensionsoftheQRcodeas17×17.

IMAQ_QR_DIMENSIONS_21x21 21 SpecifiesthedimensionsoftheQRcodeas21×21.

IMAQ_QR_DIMENSIONS_25x25 25 SpecifiesthedimensionsoftheQRcode

Page 2819: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

as25×25.IMAQ_QR_DIMENSIONS_29x29 29 Specifiesthe

dimensionsoftheQRcodeas29×29.

IMAQ_QR_DIMENSIONS_33x33 33 SpecifiesthedimensionsoftheQRcodeas33×33.

IMAQ_QR_DIMENSIONS_37x37 37 SpecifiesthedimensionsoftheQRcodeas37×37.

IMAQ_QR_DIMENSIONS_41x41 41 SpecifiesthedimensionsoftheQRcodeas41×41.

IMAQ_QR_DIMENSIONS_45x45 45 SpecifiesthedimensionsoftheQRcodeas45×45.

IMAQ_QR_DIMENSIONS_49x49 49 SpecifiesthedimensionsoftheQRcodeas49×49.

IMAQ_QR_DIMENSIONS_53x53 53 SpecifiesthedimensionsoftheQRcodeas53×53.

IMAQ_QR_DIMENSIONS_57x57 57 SpecifiesthedimensionsoftheQRcodeas57×57.

IMAQ_QR_DIMENSIONS_61x61 61 Specifiesthedimensionsof

Page 2820: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

theQRcodeas61×61.

IMAQ_QR_DIMENSIONS_65x65 65 SpecifiesthedimensionsoftheQRcodeas65×65.

IMAQ_QR_DIMENSIONS_69x69 69 SpecifiesthedimensionsoftheQRcodeas69×69.

IMAQ_QR_DIMENSIONS_73x73 73 SpecifiesthedimensionsoftheQRcodeas73×73.

IMAQ_QR_DIMENSIONS_77x77 77 SpecifiesthedimensionsoftheQRcodeas77×77.

IMAQ_QR_DIMENSIONS_81x81 81 SpecifiesthedimensionsoftheQRcodeas81×81.

IMAQ_QR_DIMENSIONS_85x85 85 SpecifiesthedimensionsoftheQRcodeas85×85.

IMAQ_QR_DIMENSIONS_89x89 89 SpecifiesthedimensionsoftheQRcodeas89×89.

IMAQ_QR_DIMENSIONS_93x93 93 SpecifiesthedimensionsoftheQRcodeas93×93.

IMAQ_QR_DIMENSIONS_97x97 97 Specifiesthe

Page 2821: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

dimensionsoftheQRcodeas97×97.

IMAQ_QR_DIMENSIONS_101x101 101 SpecifiesthedimensionsoftheQRcodeas101×101.

IMAQ_QR_DIMENSIONS_105x105 105 SpecifiesthedimensionsoftheQRcodeas105×105.

IMAQ_QR_DIMENSIONS_109x109 109 SpecifiesthedimensionsoftheQRcodeas109×109.

IMAQ_QR_DIMENSIONS_113x113 113 SpecifiesthedimensionsoftheQRcodeas113×113.

IMAQ_QR_DIMENSIONS_117x117 117 SpecifiesthedimensionsoftheQRcodeas117×117.

IMAQ_QR_DIMENSIONS_121x121 121 SpecifiesthedimensionsoftheQRcodeas121×121.

IMAQ_QR_DIMENSIONS_125x125 125 SpecifiesthedimensionsoftheQRcodeas125×125.

IMAQ_QR_DIMENSIONS_128x128 128 SpecifiesthedimensionsoftheQRcodeas128×128.

Page 2822: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_QR_DIMENSIONS_133x133 133 SpecifiesthedimensionsoftheQRcodeas133×133.

IMAQ_QR_DIMENSIONS_137x137 137 SpecifiesthedimensionsoftheQRcodeas137×137.

IMAQ_QR_DIMENSIONS_141x141 141 SpecifiesthedimensionsoftheQRcodeas141×141.

IMAQ_QR_DIMENSIONS_145x145 145 SpecifiesthedimensionsoftheQRcodeas145×145.

IMAQ_QR_DIMENSIONS_149x149 149 SpecifiesthedimensionsoftheQRcodeas149×149.

IMAQ_QR_DIMENSIONS_153x153 153 SpecifiesthedimensionsoftheQRcodeas153×153.

IMAQ_QR_DIMENSIONS_157x157 157 SpecifiesthedimensionsoftheQRcodeas157×1537

IMAQ_QR_DIMENSIONS_161x161 161 SpecifiesthedimensionsoftheQRcodeas161×161.

IMAQ_QR_DIMENSIONS_165x165 165 SpecifiesthedimensionsoftheQRcode

Page 2823: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

as165×165.IMAQ_QR_DIMENSIONS_169x169 169 Specifiesthe

dimensionsoftheQRcodeas169×169.

IMAQ_QR_DIMENSIONS_173x173 173 SpecifiesthedimensionsoftheQRcodeas173×173.

IMAQ_QR_DIMENSIONS_177x177 177 SpecifiesthedimensionsoftheQRcodeas177×177.

IMAQ_QR_DIMENSIONS_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2824: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

QRMirrorModeSpecifiesiftheQRcodeappearsnormallyintheimageofifthecodeappearsmirroredintheimage.Elements

Name Value Description

IMAQ_QR_MIRROR_MODE_AUTO_DETECT -2 ThefunctionshoulddetermineiftheQRcodeismirrored.

IMAQ_QR_MIRROR_MODE_MIRRORED 1 ThefunctionshouldexpecttheQRcodetoappearmirrored.

IMAQ_QR_MIRROR_MODE_NORMAL 0 ThefunctionshouldexpecttheQRcodetoappearnormal.

IMAQ_QR_MIRROR_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2825: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

QRModelTypeSpecifieswhattypeofQRcodethedetectorwillsearchfor.Elements

Name Value Description

IMAQ_QR_MODELTYPE_AUTO_DETECT 0 Specifiesthatthefunctionwillauto-detectthetypeofQRcode.

IMAQ_QR_MODELTYPE_MICRO 1 SpecifiestheQRcodeisofamicrotype.MicroQRcodeshaveasingletargetinthetopleftofthecode.

IMAQ_QR_MODELTYPE_MODEL1 2 SpecifiestheQRcodeisofamodel1type.

IMAQ_QR_MODELTYPE_MODEL2 3 SpecifiestheQRcodeisofamodel2type.Thisismostcommonmodel.

IMAQ_QR_MODEL_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2826: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

QRPolaritiesSpecifiesthepolarityoftheQRcodetosearchfor.Elements

Name Value Description

IMAQ_QR_POLARITY_AUTO_DETECT -2 ThefunctionshoulddeterminethepolarityoftheQRcode.

IMAQ_QR_POLARITY_BLACK_ON_WHITE 0 ThefunctionshouldsearchforaQRcodewithdarkdataonabrightbackground.

IMAQ_QR_POLARITY_WHITE_ON_BLACK 1 ThefunctionshouldsearchforaQRcodewithbrightdataonadarkbackground.

IMAQ_QR_POLARITY_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2827: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

QRRotationModeSpecifiestheamountofQRcoderotationthefunctionshouldallowfor.Elements

Name Value Description

IMAQ_QR_ROTATION_MODE_UNLIMITED 0 Thefunctionallowsforunlimitedrotation.

IMAQ_QR_ROTATION_MODE_0_DEGREES 1 Thefunctionallowsfor±5degreesofrotation.

IMAQ_QR_ROTATION_MODE_90_DEGREES 2 Thefunctionallowsforbetween85and95degreesofrotation.

IMAQ_QR_ROTATION_MODE_180_DEGREES 3 Thefunctionallowsforbetween175and185degreesofrotation.

IMAQ_QR_ROTATION_MODE_270_DEGREES 4 Thefunctionallowsforbetween265and275degreesofrotation.

IMAQ_QR_ROTATION_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2828: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

QRStreamModeSpecifieshowthestreamdatawasencoded.Elements

Name Value Description

IMAQ_QR_MODE_NUMERIC 0 Specifiesthatthedatawasencodedusingnumericmode.

IMAQ_QR_MODE_ALPHANUMERIC 1 Specifiesthatthedatawasencodedusingalpha-numericmode.

IMAQ_QR_MODE_RAW_BYTE 2 Specifiesthatthedatawasnotencodedbutisonlyrawbinarybytes,orencodedinJIS-8.

IMAQ_QR_MODE_EAN128_TOKEN 3 SpecifiesthatthedatahasaspecialmeaningrepresentedbytheapplicationID.TheapplicationIDislocatedintokenizeddatastream.

IMAQ_QR_MODE_EAN128_DATA 4 SpecifiesthatthedatahasaspecialmeaningrepresentedbytheapplicationID.

IMAQ_QR_MODE_ECI 5 Specifiesthatthedatawasmeanttobereadusingthe

Page 2829: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

languagerepresentedinthelanguageID.

IMAQ_QR_MODE_KANJI 6 SpecifiesthatthedatawasencodedinShift-JIS16Japanese.

IMAQ_QR_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2830: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReadResolutionSpecifiestheresolutionimaqReadText()usestoreadcharacters.RefertotheNIOCRTrainingInterfaceHelpformoreinformation.Elements

Name Value Description

IMAQ_LOW_RESOLUTION 0 ConfiguresNIVisiontouselowresolutionduringthereadprocess.

IMAQ_MEDIUM_RESOLUTION 1 ConfiguresNIVisiontousemediumresolutionduringthereadprocess.

IMAQ_HIGH_RESOLUTION 2 ConfiguresNIVisiontousehighresolutionduringthereadprocess.

Page 2831: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ReadStrategyThelevelatwhichNIVisionanalyzesimagestodetermineifobjectsmatchtrainedcharacters.RefertotheNIOCRTrainingInterfaceHelpformoreinformation.Elements

Name Value Description

IMAQ_READ_AGGRESSIVE 0 ConfiguresNIVisiontoperformfewercheckswhenanalyzingobjectstodetermineiftheymatchtrainedcharacters.Thisoptionboostsperformancebyupto20percent,butmightresultininaccuratereads.Youcansuccessfullyusetheaggressivestrategyformostcases.Usetheaggressivestrategyunlessthecharactersetorimagequalityrequiresmorestringentanalysis.

IMAQ_READ_CONSERVATIVE 1 ConfiguresNIVisiontoperformmorecheckstodetermineifanobjectmatchesatrainedcharacter.Thisstrategyisslowerthantheaggressivestrategy,butismoreaccurateandresultsinfewermismatches.

Page 2832: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

RegistrationMethodSpecifiesthemethodthatthefunctionusestoregisterthetemplateandtheimage.Elements

Name Value Description

IMAQ_REGISTRATION_NONE 0 Noregistration.IMAQ_REGISTRATION_PERSPECTIVE 1 Adjustimageto

correctforminorvariationsinalignmentorperspective.

IMAQ_REGISTRATION_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2833: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

SearchStrategySpecifieshowthefeaturesoftheimageareusedduringthesearchphase.Usethesearchstrategyparametertooptimizethespeedofthepatternmatchingalgorithmbyallowingthealgorithmtoinspectlessdatafromtheimage.RefertotheNIVisionforLabWindows/CVIUserManualformoreinformationaboutthesestrategies.Elements

Name Value Description

IMAQ_CONSERVATIVE 1 Instructsthepatternmatchingalgorithmtousethelargestpossibleamountofinformationfromtheimageattheexpenseofslowingdownthespeedofthealgorithm.

IMAQ_BALANCED 2 Instructsthepatternmatchingalgorithmtobalancetheamountofinformationfromtheimageituseswiththespeedofthe

Page 2834: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

algorithm.IMAQ_AGGRESSIVE 3 Instructsthe

patternmatchingalgorithmtousealoweramountofinformationfromtheimage,whichallowsthealgorithmtorunquicklybutattheexpenseofaccuracy.

IMAQ_VERY_AGGRESSIVE 4 Instructsthepatternmatchingalgorithmtousethesmallestpossibleamountofinformationfromtheimage,whichallowsthealgorithmtorunatthehighestspeedpossiblebutattheexpenseofaccuracy.

IMAQ_SEARCH_STRATEGY_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2835: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

StraightEdgeSearchModeSpecifiestheoptionsthatareusedtodetectstraightedges.Elements

Name Value Description

IMAQ_USE_FIRST_RAKE_EDGES 0 Fitsastraightedgeonthefirstpointsdetectedusingarake.

IMAQ_USE_BEST_RAKE_EDGES 1 Fitsastraightedgeonthebestpointsdetectedusingarake.

IMAQ_USE_BEST_HOUGH_LINE 2 Findsthestrongeststraightedgeusingallpointsdetectedonarake.

IMAQ_USE_FIRST_PROJECTION_EDGE 3 Usesthelocationofthefirstprojectededgeasthestraightedge.

IMAQ_USE_BEST_PROJECTION_EDGE 4 Findsthestrongest

Page 2836: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

projectededgelocationtodeterminethestraightedge.

IMAQ_STRAIGHT_EDGE_SEARCH_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2837: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

TextAlignmentSetsthealignmentofthetext.Elements

Name Value Description

IMAQ_LEFT 0 Leftalignsthetextatthereferencepoint.

IMAQ_CENTER 1 Centersthetextaroundthereferencepoint.

IMAQ_RIGHT 2 Rightalignsthetextatthereferencepoint.

IMAQ_TEXT_ALIGNMENT_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2838: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

ThresholdModeThemethodbywhichtocalculatethethresholdthatimaqTrainCharsandimaqReadTextusetoanalyzeanimage.RefertotheNIOCRTrainingInterfaceHelpformoreinformation.Elements

Name Value Description

IMAQ_FIXED_RANGE 0 PerformsthresholdingusingthevaluesyouprovideinthelowThresholdandhighThresholdelementsofOCRProcessingOptions.Thismodeprovidesthefastestthresholding.

IMAQ_COMPUTED_UNIFORM 1 CalculatesasinglethresholdvaluefortheentireROI.

IMAQ_COMPUTED_LINEAR 2 CalculatesavalueontheleftsideoftheROI,calculatesavalueontherightsideoftheROI,andlinearlyfillsthemiddlevaluesfromlefttoright.UsetheblockCountelementofOCRProcessingOptionstocontrolthestepsize.UsethismodewhenthelightintensityvariesuniformlyacrosstheROI.

IMAQ_COMPUTED_NONLINEAR 3 DividestheROIintothenumberofblocksspecifiedbytheblockCountelementofOCRProcessingOptionsandcalculatesathresholdvalue

Page 2839: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

foreachblock.

Page 2840: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

TIFFCompressionTypeIndicatesthetypeofcompressionthefunctionusesonaTIFFimage.Elements

Name Value Description

IMAQ_NO_COMPRESSION 0 ThefunctiondoesnotcompresstheTIFFfile.

IMAQ_JPEG 1 ThefunctionusestheJPEGcompressionalgorithmtocompresstheTIFFfile.JPEGcompressionisnotvalidforsigned16-bitorunsigned64-bitRGBimages.

IMAQ_RUN_LENGTH 2 ThefunctionusesarunlengthcompressionalgorithmtocompresstheTIFFfile.

IMAQ_ZIP 3 ThefunctionusestheZIPcompressionalgorithmto

Page 2841: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

compresstheTIFFfile.

IMAQ_TIFF_COMPRESSION_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2842: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

TwoEdgePolarityTypeSpecifiestheedgepolarityoftheedgepairs.Elements

Name Value Description

IMAQ_NONE 0 Thefunctionignoresthepolarityoftheedges.

IMAQ_RISING_FALLING 1 Thepolarityofthefirstedgeisrising(darktolight)andthepolarityofthesecondedgeisfalling(lighttodark).

IMAQ_FALLING_RISING 2 Thepolarityofthefirstedgeisfalling(lighttodark)andthepolarityofthesecondedgeisrising(darktolight).

IMAQ_RISING_RISING 3 Thepolarityofthefirstedgeisrising(dark

Page 2843: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

tolight)andthepolarityofthesecondedgeisrising(darktolight).

IMAQ_FALLING_FALLING 4 Thepolarityofthefirstedgeisfalling(lighttodark)andthepolarityofthesecondedgeisfalling(lighttodark).

IMAQ_TWO_EDGE_POLARITY_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2844: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

VerticalTextAlignmentSetstheverticalalignmentforthetext.Elements

Name Value Description

IMAQ_BOTTOM 0 Alignsthebottomofthetextatthereferencepoint.

IMAQ_TOP 1 Alignsthetopofthetextatthereferencepoint.

IMAQ_BASELINE 2 Alignsthebaselineofthetextatthereferencepoint.Thebaselineofthetextactsasthebottomforalluppercasecharacters.Certainlowercasecharacters,suchasgandj,haveaportionthatdips

Page 2845: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

belowthebaseline.

IMAQ_VERTICAL_TEXT_ALIGNMENT_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2846: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

VisionInfoTypeTheVisioninformationthatcanbeattachedtoanimage.Elements

Name Value Description

IMAQ_ANY_VISION_INFO 0 Thefunctionchecksifanyextravisioninformationisassociatedwiththeimage.

IMAQ_PATTERN_MATCHING_INFO 1 Thefunctionchecksifanypatternmatchingtemplateinformationisassociatedwiththeimage.

IMAQ_CALIBRATION_INFO 2 Thefunctionchecksifanycalibrationinformationisassociatedwiththeimage.

IMAQ_OVERLAY_INFO 3 Thefunctionchecksifanyoverlayinformationisassociatedwiththeimage.

Page 2847: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

IMAQ_VISION_INFO_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2848: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

WaveletTransformModeSetsthetypeofwavelettransformtobedonewhenwritingaJPEG2000file.Elements

Name Value Description

IMAQ_WAVELET_TRANSFORM_INTEGER 0 Usesa5-3reversibleintegertransform.Thistransformisgenerallyfasterthanthefloating-pointtransform,butproduceslessaccurateresults.

IMAQ_WAVELET_TRANSFORM_FLOATING_POINT 1 Performsa9-7irreversiblefloating-pointtransform.Thistransformisgenerallymoreaccuratethantheintegertransform,

Page 2849: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

butisslower.

IMAQ_WAVELET_TRANSFORM_MODE_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2850: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

WindowOptionsDefinesthebehaviorofawindow.Elements

Name Value Description

IMAQ_WIND_RESIZABLE 1 Whenpresent,theusermayresizethewindowinteractively.Whenabsent,youcanonlyresizethewindowprogrammatically.

IMAQ_WIND_TITLEBAR 2 Whenpresent,thetitlebaronthewindowisvisible.Whenabsent,thetitlebaronthewindowisnotvisible.

IMAQ_WIND_CLOSEABLE 4 Whenpresent,thecloseboxisavailable.Whenabsent,thecloseboxisremoved.Thetitlebarmustbepresentforthisflagtohaveeffect.

IMAQ_WIND_TOPMOST 8 Whenpresent,thewindowisalwaysontop.

Page 2851: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

Whenabsent,thewindowisontoponlywhenactive.

IMAQ_WINDOW_OPTIONS_SIZE_GUARD 0xFFFFFFFF Reserved

Page 2852: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

BranchOfficesOffice TelephoneNumberAustralia 1800300800Austria 43662457990-0Belgium 32(0)27570020Brazil 551132623599Canada 8004333488China 862150509800CzechRepublic 420224235774Denmark 4545762600Finland 358(0)972572511France 33(0)157662424Germany 49897413130India 918041190000Israel 972036393737Italy 3902413091Japan 81354722970Korea 820234513400Lebanon 961(0)1332828Malaysia 1800887710Mexico 018000100793Netherlands 31(0)348433466NewZealand 0800553322Norway 47(0)66907660Poland 48223390150Portugal 351210311210Russia 74957836851Singapore 18002265886Slovenia 38634254200

Page 2853: NI Vision for LabWindows™/CVI™ Function · The following documents contain information that you may find helpful as you use this help file. You can access NI Vision documents

SouthAfrica 270118058197Spain 34916400085Sweden 46(0)858789500Switzerland 41562005151Taiwan 8860223772222Thailand 6622786777Turkey 902122793031UnitedKingdom 44(0)1635523545UnitedStates(Corporate) 5126830100