ni vision for labwindows™/cvi™ function · the following documents contain information that you...
TRANSCRIPT
NIVisionforLabWindows™/CVI™FunctionReferenceHelpJune2008,370379G-01NIVisionforLabWindows/CVIisalibraryofCfunctionsthatyoucanusetodevelopmachinevisionandscientificimagingapplications.Formoreinformationaboutthishelpfile,refertothefollowingtopics:UsingHelpRelatedDocumentationGlossaryImportantInformationTechnicalSupportandProfessionalServicesTocommentonNationalInstrumentsdocumentation,refertotheNationalInstrumentsWebsite.©2001–2008NationalInstrumentsCorporation.Allrightsreserved.
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
followingexample.
IfyoursoftwarekitdoesnotincludeaCertificateofOwnership,youcanfindyourserialnumberontheproductpackingsliporontheshippinglabel.WhatisaComputerID?ThecomputerIDcontainsuniqueinformationaboutyourcomputer.NationalInstrumentsrequiresthisinformationtoenableyoursoftware.YoucanfindyourcomputerIDthroughtheNIActivationWizardorbyusingNILicenseManager,asfollows:
1. LaunchNILicenseManagerbyselectingStart»AllPrograms»NationalInstruments»NILicenseManager.
2. ClicktheDisplayComputerInformationbuttoninthetoolbar.Formoreinformationaboutproductactivationandlicensingrefertoni.com/activate.
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.
UsingHelpConventionsNavigatingHelpSearchingHelpPrintingHelpFileTopics
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.
NavigatingHelp(WindowsOnly)Tonavigatethishelpfile,usetheContents,Index,andSearchtabstotheleftofthiswindoworusethefollowingtoolbarbuttonslocatedabovethetabs:
Hide—Hidesthenavigationpanefromview.Locate—LocatesthecurrentlydisplayedtopicintheContentstab,allowingyoutoviewrelatedtopics.Back—Displaysthepreviouslyviewedtopic.Forward—DisplaysthetopicyouviewedbeforeclickingtheBackbutton.Options—Displaysalistofcommandsandviewingoptionsforthehelpfile.
SearchingHelp(WindowsOnly)UsetheSearchtabtotheleftofthiswindowtolocatecontentinthishelpfile.Ifyouwanttosearchforwordsinacertainorder,suchas"relateddocumentation,"addquotationmarksaroundthesearchwordsasshownintheexample.SearchingfortermsontheSearchtaballowsyoutoquicklylocatespecificinformationandinformationintopicsthatarenotincludedontheContentstab.
WildcardsYoualsocansearchusingasterisk(*)orquestionmark(?)wildcards.Usetheasteriskwildcardtoreturntopicsthatcontainacertainstring.Forexample,asearchfor"prog*"liststopicsthatcontainthewords"program,""programmatically,""progress,"andsoon.Usethequestionmarkwildcardasasubstituteforasinglecharacterinasearchterm.Forexample,"?ext"liststopicsthatcontainthewords"next,""text,"andsoon.
NoteWildcardsearchingwillnotworkonSimplifiedChinese,TraditionalChinese,Japanese,andKoreansystems.
NestedExpressionsUsenestedexpressionstocombinesearchestofurtherrefineasearch.YoucanuseBooleanexpressionsandwildcardsinanestedexpression.Forexample,"exampleAND(programORVI)"liststopicsthatcontain"exampleprogram"or"exampleVI."Youcannotnestexpressionsmorethanfivelevels.
BooleanExpressionsClickthe buttontoaddBooleanexpressionstoasearch.ThefollowingBooleanoperatorsareavailable:
AND(default)—Returnstopicsthatcontainbothsearchterms.Youdonotneedtospecifythisoperatorunlessyouareusingnestedexpressions.OR—Returnstopicsthatcontaineitherthefirstorsecondterm.NOT—Returnstopicsthatcontainthefirsttermwithoutthesecondterm.NEAR—Returnstopicsthatcontainbothtermswithineightwordsofeachother.
SearchOptions
UsethefollowingcheckboxesontheSearchtabtocustomizeasearch:Searchpreviousresults—Narrowstheresultsfromasearchthatreturnedtoomanytopics.Youmustremovethecheckmarkfromthischeckboxtosearchalltopics.Matchsimilarwords—Broadensasearchtoreturntopicsthatcontainwordssimilartothesearchterms.Forexample,asearchfor"program"liststopicsthatincludethewords"programs,""programming,"andsoon.Searchtitlesonly—Searchesonlyinthetitlesoftopics.
PrintingHelpFileTopics(WindowsOnly)CompletethefollowingstepstoprintanentirebookfromtheContentstab:
1. Right-clickthebook.2. SelectPrintfromtheshortcutmenutodisplaythePrintTopics
dialogbox.3. SelectthePrinttheselectedheadingandallsubtopicsoption.
NoteSelectPrinttheselectedtopicifyouwanttoprintthesingletopicyouhaveselectedintheContentstab.
4. ClicktheOKbutton.
PrintingPDFDocumentsThishelpfilemaycontainlinkstoPDFdocuments.ToprintPDFdocuments,clicktheprintbuttonlocatedontheAdobeAcrobatViewertoolbar.
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
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
AnalyticGeometry
GetPointsOnContour imaqGetPointsOnContour
AnalyticGeometry
GetPointsOnLine imaqGetPointsOnLine
AnalyticGeometry
GetPolygonArea imaqGetPolygonArea
AnalyticGeometry
InterpolatePoints imaqInterpolatePoints
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
BinaryProcessingFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.UseBinaryProcessingfunctionsonbinaryandlabeledimagesforapplicationsinwhichthesize,number,orshapeoftheobjectsintheimageareimportant.Binaryimageshaveonlytwopixelvalues,unlessyoulabeltheimage.
NoteApplyathresholdtoagrayscaleimagetomakeanimagebinary.Formoreinformationaboutthresholdinganimage,refertoimaqThreshold()intheGrayscaleProcessingsection.
ThefollowingtableliststheBinaryProcessingfunctions.ThefunctionsintheBinaryProcessingclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesoffunctionsubclasses.Thethirdcolumncontainsnamesofindividualfunctionpanels.EachBinaryProcessingfunctionpanelrepresentsonefunction.
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
ParticleAnalysisFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.ParticleAnalysisfunctionsallowyoutocalculateinformationaboutparticlesinanimageandselectparticlesusingtheinformation.
Class Subclass LabWindows/CVIEquivalent FunctionName
BinaryProcessing
ParticleAnalysis
CountParticles imaqCountParticles
BinaryProcessing
ParticleAnalysis
MeasureParticle imaqMeasureParticle
BinaryProcessing
ParticleAnalysis
ParticleFilter4 imaqParticleFilter4
ShapeMatchingFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.ShapeMatchingfunctionsallowyoutofindshapesinanimage.
Class Subclass LabWindows/CVIEquivalent FunctionName
BinaryProcessing
ShapeMatching
MatchShape imaqMatchShape
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
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
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
Classification TrainNearestNeighborClassifier
imaqTrainNearestNeighborClassifier
Classification WriteClassifierFile imaqWriteClassifierFile
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
ColorMatchingFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.ColorMatchingfunctionsallowyoutolearninformationaboutthecolorsinatemplateimageandcomparethatinformationwiththecolorsinotherimages.
Class Subclass LabWindows/CVIEquivalent FunctionName
ColorProcessing
ColorMatching
LearnColor imaqLearnColor
ColorProcessing
ColorMatching
MatchColor imaqMatchColor
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
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
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
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
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.
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.
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
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
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
GrayscaleProcessingFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.GrayscaleProcessingfunctionsenhancegrayscaleimagesforviewingorfurtherprocessing.ThefollowingtableliststheGrayscaleProcessingfunctions.ThefunctionsintheGrayscaleProcessingclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesoffunctionsubclasses.Thethirdcolumncontainsnamesofindividualfunctionpanels.EachGrayscaleProcessingfunctionpanelrepresentsonefunction.
MorphologyFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.Morphologyfunctionsallowyoutoapplystandardmorphologicaltransformations,suchasdilationsanderosions.
Class Subclass LabWindows/CVIEquivalent FunctionName
GrayscaleProcessing
Morphology GrayMorphology imaqGrayMorphology
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
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
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
ImageAnalysisFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.ImageAnalysisfunctionsallowyoutocalculatevariousstatisticsaboutthepixelsofanimage.ThefollowingtableliststheImageAnalysisfunctions.ThefunctionsintheImageAnalysisclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachImageAnalysisfunctionpanelrepresentsonefunction.
Class LabWindows/CVIEquivalent FunctionNameImageAnalysis Centroid imaqCentroidImageAnalysis ExtractCurves imaqExtractCurvesImageAnalysis Histogram imaqHistogramImageAnalysis LinearAverages imaqLinearAverages2ImageAnalysis LineProfile imaqLineProfileImageAnalysis Quantify imaqQuantify
ImageManagementFunctionsImageManagementfunctionsallowyoutogatherinformationaboutanimageormanipulatethecontentsofanimage.ThefollowingtableliststheImageManagementfunctions.ThefunctionsintheImageManagementclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesoffunctionsubclasses.Thethirdcolumncontainsnamesofindividualfunctionpanels.EachImageManagementfunctionpanelrepresentsonefunction.
Class Subclass LabWindows/CVIEquivalent FunctionName
ImageManagement
— ArrayToImage imaqArrayToImage
ImageManagement
— CreateImage imaqCreateImage
ImageManagement
— ImageToArray imaqImageToArray
BorderFunctionsBorderfunctionsallowyoutofillanimageborderwithasetofvalues,getthesizeofanimageborder,andsetthesizeofimageborder.
Class Subclass LabWindows/CVIEquivalent FunctionName
ImageManagement
Border FillBorder imaqFillBorder
ImageManagement
Border GetBorderSize imaqGetBorderSize
ImageManagement
Border SetBorderSize imaqSetBorderSize
ClipboardFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.Clipboardfunctionsallowyoutocopyimagestoandfromtheclipboard.
Class Subclass LabWindows/CVIEquivalent FunctionName
ImageManagement
Clipboard ClipboardToImage imaqClipboardToImage
ImageManagement
Clipboard ImageToClipboard imaqImageToClipboard
DrawingFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.Drawingfunctionsallowyoutodrawlines,shapes,andtextonimages.
Class Subclass LabWindows/CVIEquivalent FunctionName
ImageManagement
Drawing DrawLineOnImage
imaqDrawLineOnImage
ImageManagement
Drawing DrawShapeOnImage
imaqDrawShapeOnImage
ImageManagement
Drawing DrawTextOnImage
imaqDrawTextOnImage
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
Management Information Info2ImageManagement
ImageInformation
SetBitDepth imaqSetBitDepth
ImageManagement
ImageInformation
SetImageSize imaqSetImageSize
ImageManagement
ImageInformation
SetMaskOffset imaqSetMaskOffset
ImageManagement
ImageInformation
WriteCustomData
imaqWriteCustomData
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
ImageManagement
ImageManipulation
View3D imaqView3D
InterlacingFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.Interlacingfunctionsallowyoutocombinetwofieldsintooneimageframeorseparateaframeintotwofields.
Class Subclass LabWindows/CVIEquivalent FunctionName
ImageManagement
Interlacing InterlaceCombine imaqInterlaceCombine
ImageManagement
Interlacing InterlaceSeparate imaqInterlaceSeparate
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
InspectionFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.Inspectionfunctionsallowyoutocompareimagestoagoldentemplateimage.ThefollowingtableliststheInspectionfunctions.ThefunctionsintheInspectionclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachInspectionfunctionpanelrepresentsonefunction.
Class LabWindows/CVIEquivalent FunctionName
Inspection CompareGoldenTemplate imaqCompareGoldenTemplateInspection LearnGoldenTemplate imaqLearnGoldenTemplate
LCDFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.LCDfunctionsallowyoutoisolateandreadthevalueofaseven-segmentLCD.ThefollowingtableliststheLCDfunctions.ThefunctionsintheLCDclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachLCDfunctionpanelrepresentsonefunction.
Class LabWindows/CVIEquivalent FunctionNameLCD FindLCDSegments imaqFindLCDSegmentsLCD ReadLCD imaqReadLCD
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.
CoordinateTransformFunctionsCoordinateTransformfunctionsallowyoutofindvarioustypesofcoordinatetransformsinanimage.Usethesefunctionstofindacoordinatetransformusingeitheredgedetectionorpatternmatching.
Class Subclass LabWindows/CVIEquivalent FunctionName
MachineVision
CoordinateTransform
FindTransformPattern
imaqFindTransformPattern
CountandMeasureObjectsFunctionsCountandMeasureObjectsfunctionsallowyoutocountandmeasureobjectsinanimage.
Class Subclass LabWindows/CVIEquivalent FunctionName
MachineVision
CountandMeasureObjects
CountObjects imaqCountObjects
MachineVision
CountandMeasureObjects
DisposeObjectReport
imaqDisposeObjectReport
FindPatternsFunctionsFindPatternsfunctionsallowyoutofindapatterninanimage.
Class Subclass LabWindows/CVIEquivalent FunctionName
MachineVision
FindPatterns
FindPattern imaqFindPattern
LocateEdgesFunctionsLocateEdgesfunctionsallowyoutofindstraightorcircularedgesinanimage.
Class Subclass LabWindows/CVIEquivalent FunctionName
MachineVision
LocateEdges
DisposeCircularEdgeReport
imaqDisposeCircularEdgeReport
MachineVision
LocateEdges
DisposeStraightEdgeReport
imaqDisposeStraightEdgeReport
MachineVision
LocateEdges
FindCircularEdge
imaqFindCircularEdge
MachineVision
LocateEdges
FindConcentricEdge
imaqFindConcentricEdge
MeasureDistancesFunctionsMeasureDistancesfunctionsallowyoutomeasuredistancesinanimage,suchastheminimumormaximumhorizontalseparationbetweentwoverticallyorientededges.
Class Subclass LabWindows/CVIEquivalent
FunctionName
MachineVision
MeasureDistances
ClampMax imaqClampMax
MachineVision
MeasureDistances
ClampMin imaqClampMin
MeasureIntensitiesFunctionsMeasureIntensitiesfunctionsallowyoutomeasuretheintensityofaspecificregionofanimage.
Class Subclass LabWindows/CVIEquivalent FunctionName
MachineVision
MeasureIntensities
LightMeterLine imaqLightMeterLine
MachineVision
MeasureIntensities
LightMeterPoint imaqLightMeterPoint
MachineVision
MeasureIntensities
LightMeterRect imaqLightMeterRect
SelectRegionofInterestFunctionsSelectRegionofInterestfunctionsallowyoutoselectaspecificregionofanimage.
Class Subclass LabWindows/CVIEquivalent FunctionName
MachineVision
SelectRegionofInterest
SelectAnnulus imaqSelectAnnulus
MachineVision
SelectRegionofInterest
SelectLine imaqSelectLine
MachineVision
SelectRegionofInterest
SelectPoint imaqSelectPoint
MachineVision
SelectRegionofInterest
SelectRect imaqSelectRect
MemoryManagementFunctionsTheMemoryManagementfunction,imaqDispose(),deletesimages,ROIs,arrays,andreportsandthenfreesthespacetheyoccupiedinmemory.ThefollowingtableliststheMemoryManagementfunctions.ThefunctionsintheMemoryManagementclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachMemoryManagementfunctionpanelrepresentsonefunction.
Class LabWindows/CVIEquivalent FunctionNameMemoryManagement Dispose imaqDispose
MeterFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.Meterfunctionsallowyoutoidentifythearcinformationofameterandthenreadthatmeter.ThefollowingtableliststheMeterfunctions.ThefunctionsintheMeterclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachMeterfunctionpanelrepresentsonefunction.
Class LabWindows/CVIEquivalent FunctionNameMeter GetMeterArc imaqGetMeterArcMeter ReadMeter imaqReadMeter
ObsoleteMachineVisionFunctionsObsoletefunctionsarefunctionsfromapreviousversionofNIVisionthathavebeenreplacedbynewerfunctions.ThoughthecurrentversionofNIVisionstillsupportsthesefunctions,youshouldusethenewerfunctionswheneverpossible.ThefollowingtableliststheObsoleteMachineVisionfunctions.ThefunctionsintheObsoleteMachineVisionclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesofindividualfunctionpanels.EachObsoleteMachineVisionfunctionpanelrepresentsonefunction.
Class LabWindows/CVIEquivalent FunctionName
ObsoleteMachineVision
FindEdge imaqFindEdge
ObsoleteMachineVision
FindTransformRect imaqFindTransformRect
ObsoleteMachineVision
FindTransformRects imaqFindTransformRects
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
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
Obsolete SetWindowOverlay imaqSetWindowOverlayObsolete Spoke imaqSpokeObsolete TransformROI imaqTransformROIObsolete WritePNGFile imaqWritePNGFileObsolete ZoomWindow imaqZoomWindow
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
OCR GetCharacterInfo2 imaqGetCharInfo2OCR ReadOCRFile imaqReadOCRFileOCR ReadText3 imaqReadText3OCR RenameCharacter imaqRenameCharOCR SetReferenceCharacter imaqSetReferenceCharOCR TrainCharacters imaqTrainCharsOCR VerifyPatterns imaqVerifyPatternsOCR VerifyText imaqVerifyTextOCR WriteOCRFile imaqWriteOCRFile
OperatorsFunctionsOperatorfunctionsallowyoutoperformarithmeticorlogicaloperationsbetweentwoimagesorbetweenanimageandaconstant.ThefollowingtableliststheOperatorsfunctions.ThefunctionsintheOperatorsclassaregroupedaccordingtothetypesofoperationstheyperform.Thefirstcolumncontainsthenameoftheclass.Thesecondcolumncontainsnamesoffunctionsubclasses.Thethirdcolumncontainsnamesofindividualfunctionpanels.EachOperatorsfunctionpanelrepresentsonefunction.
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
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
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
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
MatchingPatternMatching
MatchColorPattern
imaqMatchColorPattern
PatternMatching
MatchGeometricPattern2
imaqMatchGeometricPattern2
PatternMatching
MatchMultipleGeometricPattern
imaqMatchMultipleGeometricPatterns
PatternMatching
MatchPattern2 imaqMatchPattern2
PatternMatching
ReadMultipleGeometricPatternFile
imaqReadMultipleGeometricPatternFile
PatternMatching
RefineMatches imaqRefineMatches
PatternMatching
SetMatchMultipleGeometricPatternsOptions
imaqSetMultipleGeometricPatternsOptions
PatternMatching
WriteMultipleGeometricPatternFile
imaqWriteMultipleGeometricPatternFile
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
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
InterestRegionsofInterest
Contours GetContourColor imaqGetContourColor
RegionsofInterest
Contours GetContourCount imaqGetContourCount
RegionsofInterest
Contours GetContourInfo imaqGetContourInfo2
RegionsofInterest
Contours MoveROI imaqMoveContour
RegionsofInterest
Contours RemoveContour imaqRemoveContour
RegionsofInterest
Contours SetContourColor imaqSetContourColor
RegionsofInterestManipulationFunctionsThefollowingfunctionsareavailableonlywithalicensedversionofNIVision.RegionsofInterestManipulationfunctionsallowyoutotransformregionsofinterestbasedonacoordinatesystem,convertmaskimagestoandfromregionsofinterestandextractregionofinterestprofilesfromimages.
Class Subclass LabWindows/CVIEquivalent FunctionName
RegionsofInterest
RegionsofInterestManipulation
MaskToROI imaqMaskToROI
RegionsofInterest
RegionsofInterestManipulation
ROIProfile imaqROIProfile
RegionsofInterest
RegionsofInterestManipulation
ROIToMask imaqROIToMask
RegionsofInterest
RegionsofInterestManipulation
TransformROI imaqTransformROI2
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
imaqAbsoluteDifferenceUsageintimaqAbsoluteDifference(Image*dest,constImage*sourceA,constImage*sourceB);
PurposeSubtractsoneimagefromanotherandreturnstheabsolutevalueofthedifference.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB
ParametersName Type Description
dest Image* Thedestinationimage.sourceA constImage* Thefirstimagetosubtract.sourceB constImage* Thesecondimagetosubtract.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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.
imaqAbsoluteDifferenceConstantUsageintimaqAbsoluteDifferenceConstant(Image*dest,constImage*source,PixelValuevalue);
PurposeSubtractsaconstantfromanimageandreturnstheabsolutevalueofthedifference.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Theimagefromwhichthefunctionsubtractsa
scalarconstant.value PixelValue Thevaluetosubtractfromthesourceimage.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionvaluemustcorrespondtotheimagetype,asfollows:
IftheimageisIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,orIMAQ_IMAGE_SGL,usethegrayscalevalueofthePixelValueunion.IftheimageisIMAQ_IMAGE_RGB,usethergbvalueofthePixelValueunion.
imaqAddUsageintimaqAdd(Image*dest,constImage*sourceA,constImage*sourceB);
PurposeAddstwoimages.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB
ParametersName Type Description
dest Image* Thedestinationimage.sourceA constImage* Thefirstimagetoadd.sourceB constImage* Thesecondimagetoadd.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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.
imaqAddAnnulusContourUsageContourIDimaqAddAnnulusContour(ROI*roi,Annulusannulus);
PurposeThisfunctioncreatesanewregionofinterest(ROI)contourthatrepresentsanannulusandthenaddsittotheprovidedROI.
ParametersName Type Description
roi ROI* TheROIthatwillcontainthenewcontour.annulus Annulus Definesthelocationandsizeoftheannulus.
ReturnValueType Description
ContourID Onsuccess,thisfunctionreturnsaContourIDforthecontour.YoucanusetheContourIDtoreferencethecontourwithinthecontainingROI.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqAddClassifierSampleUsageintimaqAddClassifierSample(Image*image,ClassifierSession*session,constROI*roi,constchar*sampleClass,double*featureVector,unsignedintvectorSize);
PurposeAddsasampletoaclassifier.Toaddasampletoacustomclassificationsession,usethefeatureVectorandvectorSizeparameters.Toaddasampletoanyothertypeofclassificationsession,usetheimageparameter.
ImageTypesSupportedIMAQ_IMAGE_U8
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqAddClosedContourUsageContourIDimaqAddClosedContour(ROI*roi,constPoint*points,intnumPoints);
PurposeCreatesanewROIcontourbasedontheprovidedarrayofpoints.Tomakethecontour,thefunctionconnectseachpointinthearraytothenextpointinthearrayandconnectsthelastpointinthearraytothefirstpointinthearray.ThefunctionaddsthecontourtotheprovidedROI.
ParametersName Type Description
roi ROI* TheROItocontainthenewcontour.points constPoint* Anarrayofpointsdescribingthelocationand
shapeofthecontour.ThisparameterisrequiredandcannotbeNULL.
numPoints int Thenumberofpointsinthearray.
ReturnValueType Description
ContourID Onsuccess,thisfunctionreturnsaContourIDfortheaddedcontour.YoucanusetheContourIDtoreferencethecontourwithinthecontainingROI.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqAddConstantUsageintimaqAddConstant(Image*dest,constImage*source,PixelValuevalue);
PurposeAddsaconstantvaluetoeachpixelinanimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Theimagetowhichthefunctionaddsascalar
constant.value PixelValue Thevaluetoaddtothesourceimage.Setthe
memberofvaluethatcorrespondstotheimagetype.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqAddLineContourUsageContourIDimaqAddLineContour(ROI*roi,Pointstart,Pointend);
PurposeCreatesanewlineROIcontourandaddsthelinetotheprovidedROI.
ParametersName Type Description
roi ROI* TheROItocontainthenewcontour.start Point Thepixellocationofthestartoftheline.end Point Thepixellocationoftheendoftheline.
ReturnValueType Description
ContourID Onsuccess,thisfunctionreturnsaContourIDforthecontour.YoucanusetheContourIDtoreferencethecontourwithinthecontainingROI.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqAddOpenContourUsageContourIDimaqAddOpenContour(ROI*roi,constPoint*points,intnumPoints);
PurposeCreatesanewregionofinterest(ROI)contourbasedontheprovidedarrayofpoints.Tomakethecontour,thefunctionconnectseachpointinthearraytothenextpointinthearray.Thefunctiondoesnotconnectthelastpointinthearraytothefirstpointinthearray.ThefunctionaddsthecontourtotheprovidedROI.
ParametersName Type Description
roi ROI* TheROItocontainthenewcontour.points constPoint* Anarrayofpointsdescribingthelocationand
shapeofthecontour.ThisparameterisrequiredandcannotbeNULL.
numPoints int Thenumberofpointsinthearray.
ReturnValueType Description
ContourID Onsuccess,thisfunctionreturnsaContourIDforthecontour.YoucanusetheContourIDtoreferencethecontourwithinthecontainingROI.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqAddOvalContourUsageContourIDimaqAddOvalContour(ROI*roi,RectboundingBox);
PurposeCreatesanewovalregionofinterest(ROI)contourandaddstheovaltotheprovidedROI.
ParametersName Type Description
roi ROI* TheROItocontainthenewcontour.boundingBox Rect Thepixellocationinformationofthebounding
rectangleoftheoval.
ReturnValueType Description
ContourID Onsuccess,thisfunctionreturnsaContourIDforthecontour.YoucanusetheContourIDtoreferencethecontourwithinthecontainingROI.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqAddPointContourUsageContourIDimaqAddPointContour(ROI*roi,Pointpoint);
PurposeCreatesanewsingle-pointregionofinterest(ROI)contourandaddsthepointtotheprovidedROI.
ParametersName Type Description
roi ROI* TheROItocontainthenewcontour.point Point Thepixellocationofthepoint.
ReturnValueType Description
ContourID Onsuccess,thisfunctionreturnsaContourIDforthecontour.YoucanusetheContourIDtoreferencethecontourwithinthecontainingROI.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqAddRectContourUsageContourIDimaqAddRectContour(ROI*roi,Rectrect);
PurposeCreatesanewrectangleregionofinterest(ROI)contourandaddstherectangletotheprovidedROI.
ParametersName Type Description
roi ROI* TheROItocontainthenewcontour.rect Rect Thepixellocationoftherectangle.
ReturnValueType Description
ContourID Onsuccess,thisfunctionreturnsaContourIDforthecontour.YoucanusetheContourIDtoreferencethecontourwithinthecontainingROI.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqAddRotatedRectContour2UsageContourIDimaqAddRotatedRectContour2(ROI*roi,RotatedRectrect);
PurposeThisfunctioncreatesanewregionofinterest(ROI)contourthatrepresentsarotatedrectangleandaddsittotheprovidedROI.
ParametersName Type Description
roi ROI* TheROItocontainthenewcontour.rect RotatedRect Thecoordinatelocationinformationfortherotated
rectangle.
ReturnValueType Description
ContourID Onsuccess,thisfunctionreturnsaContourIDforthecontour.YoucanusetheContourIDtoreferencethecontourwithinthecontainingROI.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqAndUsageintimaqAnd(Image*dest,constImage*sourceA,constImage*sourceB);
PurposeComputesabitwiseANDbetweentwoimages.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
dest Image* Thedestinationimage.sourceA constImage* Thefirstsourceimage.sourceB constImage* Thesecondsourceimage,whichmustbethe
sametypeofimageassourceA.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqAndConstantUsageintimaqAndConstant(Image*dest,constImage*source,PixelValuevalue);
PurposePerformsabitwiseANDbetweenanimageandaconstant.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Thesourceimage.value PixelValue ThevaluetoANDtothesourceimage.Setthe
memberofvaluethatcorrespondstotheimagetype.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqAreScrollbarsVisibleUsageintimaqAreScrollbarsVisible(intwindowNumber,int*visible);
PurposeRetrieveswhetherthescrollbarsofthegivenimagewindowarevisible.
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.visible int* Onreturn,thisparameterisTRUEifthe
scrollbarsarevisibleandFALSEifthescrollbarsarehidden.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqAreToolsContextSensitiveUsageintimaqAreToolsContextSensitive(int*sensitive);
PurposeReturnsthecurrentstatusofcontextsensitivetoolselection.
ParametersName Type Description
sensitive int* Onreturn,TRUEiftoolcontextsensitivityisenabled.FALSEiftoolscontextsensitivityisdisabled.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqArrayToComplexPlaneUsageintimaqArrayToComplexPlane(Image*dest,constImage*source,constfloat*newPixels,ComplexPlaneplane);
PurposeReplacesaplaneofacompleximagewiththegivenarrayofpixelvalues.Thearraymustbethesamesizeasthesourceimage.
ImageTypesSupportedIMAQ_IMAGE_COMPLEX
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Thesourceimage.newPixels constfloat* Thetwo-dimensionalarrayofpixelvalues.
Thisarraymustbethesamesizeasthesourceimage.ThisparameterisrequiredandcannotbeNULL.
plane ComplexPlane Theplanetoreplace.SpecifyIMAQ_REALtoreplacetherealplaneorIMAQ_IMAGINARYtoreplacetheimaginaryplane.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqArrayToImageUsageintimaqArrayToImage(Image*image,constvoid*array,intnumCols,intnumRows);
PurposeSetsthepixelsofanimagetothevaluesinagivenarray.Thisfunctionresizestheimagetothesizeofthesourcearray.
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
ParametersName Type Description
image Image* Theimagewhosepixelsthefunctionsetstomatchtheinputarray.
array constvoid* Thetwo-dimensionalarrayofpixelvalues.ThisparameterisrequiredandcannotbeNULL.
numCols int Thenumberofcolumnsinthedataarray.numRows int Thenumberofrowsinthedataarray.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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
imaqAttenuateUsageintimaqAttenuate(Image*dest,constImage*source,AttenuateModehighlow);
PurposeAttenuatesthefrequenciesofacompleximage.
ImageTypesSupportedIMAQ_IMAGE_COMPLEX
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Theimagetoattenuate.highlow AttenuateMode Thefrequenciestoattenuate.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqAutoThreshold2UsageThresholdData*imaqAutoThreshold2(Image*dest,constImage*source,intnumClasses,ThresholdMethodmethod,constImage*mask);
PurposeAutomaticallythresholdsanimageintomultipleclasses.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
ThresholdData* Onsuccess,thisfunctionreturnsanarrayofstructuresprovidinginformationaboutthethresholdrangesthatthefunctionapplied.ThearraycontainsanumberofThresholdDatastructuresequaltonumClasses.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththearray,disposeofitbycallingimaqDispose().
imaqAverageUsageintimaqAverage(Image*dest,constImage*sourceA,constImage*sourceB);
PurposeComputestheaverageoftwosourceimagesandplacestheresultinthedestinationimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
dest Image* Thedestinationimage.sourceA constImage* Thefirstsourceimage.sourceB constImage* Thesecondsourceimage,whichmustbethe
sametypeofimageassourceA.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqAverageConstantUsageintimaqAverageConstant(Image*dest,constImage*source,PixelValuevalue);
PurposeComputestheaveragebetweenasourceimageandaconstantandplacestheresultintoadestinationimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Thesourceimage.value PixelValue Thevaluetoaveragewiththesourceimage.Use
thegrayscalememberofthePixelValueunion.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqBCGTransformUsageintimaqBCGTransform(Image*dest,constImage*source,constBCGOptions*options,constImage*mask);
PurposeAppliesbrightness,contrast,andgammacorrectiontoanimagebycomputingandapplyingalookuptable.ThefunctioncomputesthelookuptablebasedonthevaluesinBCGOptions.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Theimagetotransform.options constBCGOptions* Theparameterstouseinthetransform.
ThisparameterisrequiredandcannotbeNULL.
mask constImage* Anoptionalmaskimage.ThisimagemustbeanIMAQ_IMAGE_U8image.Thefunctionappliesthetransformonlytothosesourcepixelswhosecorrespondingmaskpixelsarenon-zero.Allotherpixelremainunchanged.SetthisparametertoNULLtoapplythetransformtothewholesourceimage.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionoptions—IfNULLispassed,thefunctionusesthefollowingdefaultparameters:
brightness 128contrast 45gamma 1.0
imaqBestCircleUsageintimaqBestCircle(constPointFloat*points,intnumPoints,PointFloat*center,double*radius);
PurposeReturnsthecirclethatbestfitsthegivenpoints.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqFitCircle(),whichincorporatesthefunctionalityofimaqBestCircle()butreturnsadditionalinformationsuchastheareaofthecircle.
ParametersName Type Description
points constPointFloat* Thearrayofpointstofittotheedgeofthecircle.
numPoints int Thenumberofpointsinthesuppliedarray.Youmustsupplyatleastthreepoints.
center PointFloat* Onreturn,filledwiththecoordinatesofthecenterofthecircle.SetthisparametertoNULLifyoudonotneedthisinformation.
radius double* Onreturn,filledwiththeradiusofthecenterofthecircle.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqBringWindowToTopUsageintimaqBringWindowToTop(intwindowNumber);
PurposeMakesthegivenimagewindowactive.
NoteIfyouareusingWindows2000,thisfunctionhasnoeffectwhenyourapplicationisnottheactiveapplicationinthesystem.
ParametersName Type Description
windowNumber int Thewindownumberofthewindowyouwanttobeactive.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqBuildCoordinateSystemUsageintimaqBuildCoordinateSystem(constPoint*points,ReferenceModemode,AxisOrientationorientation,CoordinateSystem*system);
PurposeBuildsareferenceforanyarbitrarycoordinatesystemwithrespecttotheimageplane.Thereferenceofthecoordinatesystemisspecifiedasthepositionoftheoriginofthecoordinatesystem,theorientationofitsx-axiswithrespecttothatoftheimageplane,andthedirectionofthey-axis,asshowninthefollowingillustration.
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqCalcCoeffUsageintimaqCalcCoeff(constImage*image,constParticleReport*report,MeasurementValueparameter,float*coefficient);
PurposeReturnsacoefficientassociatedwithaparticle.CallimaqGetParticleInfo()beforecallingimaqCalcCoeff()togettheparticlereportsyouneedtopasstothisfunction.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqMeasureParticle(),whichallowsyoutotakebothpixelandreal-worldmeasurements.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
image constImage* Theimagecontainingtheparticle.report constParticleReport* Theparticlereportyouwanttouseto
calculatethecoefficient.YoumustgeneratethisreportusingimaqGetParticleInfo()withthemodeparametersettoIMAQ_ALL_INFO.ThisparameterisrequiredandcannotbeNULL.
parameter MeasurementValue Thecoefficienttocalculate.coefficient float* Onreturn,thecoefficientyourequest.
ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqCaliperToolUsageCaliperReport*imaqCaliperTool(constImage*image,constPoint*points,intnumPoints,constEdgeOptions*edgeOptions,constCaliperOptions*caliperOptions,int*numEdgePairs);
PurposeFindsedgesalongapathinanimage,choosespairsoftheedges,andmeasuresthedistancebetweenthosepairs.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
CaliperReport* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachedgepair.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthisfunctionbycallingimaqDispose().
imaqCannyEdgeFilterUsageintimaqCannyEdgeFilter(Image*dest,constImage*source,constCannyOptions*options);
PurposeOutlinesedgesinanimageusingtheCannyalgorithm,whichisusefulforimageswithpoorsignal-to-noiseratios.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Theimagewhoseedgesthefunction
outlines.options constCannyOptions* Adescriptionoffilterparameterstousein
thealgorithm.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:
sigma 1.00upperThreshold 0.70lowerThreshold 0.20windowSize 9
imaqCastUsageintimaqCast(Image*dest,constImage*source,ImageTypetype,constfloat*lookup,intshift);
PurposeChangesthetypeofanimage.
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
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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
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
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
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
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.
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.
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
valuetothesourcevalue.Ifthesourcevalueisoutoftherangeofthedestination,thefunctioncoercesthesourcetotherange.
IMAQ_IMAGE_I16 IMAQ_IMAGE_U16 Thefunctionsetsthedestinationvaluetothesourcevalue.Ifthesourcevalueisoutoftherangeofthedestination,thefunctioncoercesthesourcetotherange.
imaqCentroidUsageintimaqCentroid(constImage*image,PointFloat*centroid,constImage*mask);
PurposeComputesthecentroidofanimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image constImage* Theimagewhosecentroidthefunctioncalculates.
centroid PointFloat* Onreturn,thex-andy-coordinatesofthecentroid.ThisparameterisrequiredandcannotbeNULL.
mask constImage* Anoptionalmaskimage.IfNULL,thewholesourceimageisusedinthecalculation.Otherwise,thefunctionusesinthecalculationonlythosepixelsinthesourcewhosecorrespondingpixelsinthemaskimagearenon-zero.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqChangeColorSpace2UsageColor2imaqChangeColorSpace2(constColor2*sourceColor,ColorModesourceSpace,ColorModedestSpace,doubleoffset,constCIEXYZValue*whiteReference);
PurposeMapsthevalueofacolorinonecolorspaceintothevalueofthesamecolorinanothercolorspace.
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.
ReturnValueType Description
Color2 Onsuccess,thisfunctionreturnsthevalueofthecolorinthedestinationcolorspace.Onfailure,thisfunctionreturnsblack.Togetextendederrorinformation,callimaqGetLastError().
imaqClampMaxUsageintimaqClampMax(Image*image,RotatedRectsearchRect,RakeDirectiondirection,float*distance,constFindEdgeOptions*options,constCoordinateTransform2*transform,PointFloat*firstEdge,PointFloat*lastEdge);
PurposeMeasuresadistancefromthesidesofthesearchareatowardsthecenterofthesearcharea.Thisfunctionlocatesedgesalongasetofparallelsearchlinescalledarake.Thefunctiondetectstheedgesbasedontheircontrastandslope.Thefunctioncalculatesahit-linetotheobjectthroughthefirstedgeitdetects.Thefunctioncalculatesasecondhit-linetotheobjectthroughthelastedgeitdetects.Thefunctionmeasuresthedistancebetweenthosetwolines.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
firstEdge PointFloat* Onreturn,thecoordinatelocationofthefirstedgeusedtomeasurethedistance.Ifyoudonotneedthisinformation,setthisparametertoNULL.
lastEdge PointFloat* Onreturn,thecoordinatelocationofthelastedgeusedtomeasurethedistance.Ifyoudonotneedthisinformation,setthisparametertoNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqDispose().
ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:
threshold 40width 4steepness 2subsamplingRatio 5showSearchArea FALSEshowSearchLines FALSEshowEdgesFound FALSEshowResult TRUE
imaqClampMinUsageintimaqClampMin(Image*image,RotatedRectsearchRect,RakeDirectiondirection,float*distance,constFindEdgeOptions*options,constCoordinateTransform2*transform,PointFloat*firstEdge,PointFloat*lastEdge);
PurposeMeasuresadistancefromthecenterofthesearchareatowardsthesidesofthesearcharea.Thisfunctionlocatesedgesalongasetofparallelsearchlinescalledarake.Thefunctiondetectstheedgesbasedontheircontrastandslope.Thefunctioncalculatesahit-linetotheobjectthroughthelastedgeinthefirsthalfofthesearcharea.Thefunctioncalculatesasecondhit-linetotheobjectthroughthefirstedgedetectedinthelasthalfofthesearcharea.Thefunctionmeasuresthedistancebetweenthosetwolines.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
firstEdge PointFloat* Onreturn,thecoordinatelocationofthefirstedgeusedtomeasurethedistance.Ifyoudonotneedthisinformation,setthisparametertoNULL.
lastEdge PointFloat* Onreturn,thecoordinatelocationofthelastedgeusedtomeasurethedistance.Ifyoudonotneedthisinformation,setthisparametertoNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:
threshold 40width 4steepness 2subsamplingRatio 5showSearchArea FALSEshowSearchLines FALSEshowEdgesFound FALSEshowResult TRUE
imaqClassifyUsageClassifierReport*imaqClassify(Image*image,constClassifierSession*session,constROI*roi,double*featureVector,unsignedintvectorSize);
PurposeClassifiesanimageorfeaturevector.
ImageTypesSupportedIMAQ_IMAGE_U8
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
ReturnValueType Description
ClassifierReport* Onsuccess,thisfunctionreturnsareportcontainingtheresultsoftheclassification.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeoftheinformationbycallingimaqDispose().
imaqClearErrorUsageintimaqClearError();
PurposeSetstheNIVisionerrorstatusforthecurrentthreadtoERR_SUCCESS.
ReturnValueType Description
int Thisfunctionreturnsanon-zerovalue.
imaqClearOverlayUsageintimaqClearOverlay(Image*image,constchar*group);
PurposeRemovesalloverlayinformationassociatedwiththeimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
image Image* Theimagefromwhichthefunctionremovesalloverlayinformation.
group constchar* Overlaygroupnametoclear.SetthisparametertoNULLtoclearalloverlays.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqClipboardToImageUsageintimaqClipboardToImage(Image*dest,RGBValue*palette);
PurposeCopiesanimagefromtheclipboard.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB
ParametersName Type Description
dest Image* Theimageintowhichthefunctioncopiestheclipboardimage.
palette RGBValue* Anarrayof256entriesthatreceivesthepaletteassociatedwiththe8-bitclipboardimage.Ifthereisnopaletteassociatedwiththeimage,thefunctionfillsinagraypalette.SetthisparametertoNULLifyoudonotneedthepalette.
ReturnValueType Description
int Onsuccess,thisfunctionreturns1iftherewasanimageontheclipboardor–1iftherewasnoimageontheclipboard.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqCloseAVIUsageintimaqCloseAVI(AVISessionsession);
PurposeThisfunctionclosesanAVIfileandmakesitavailabletobereadbyotherapplications.
ParametersName Type Description
session AVISession Thesessiontouse.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqCloseToolWindowUsageintimaqCloseToolWindow();
PurposeClosesthetoolwindowandfreesallassociatedresources.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqCloseWindowUsageintimaqCloseWindow(intwindowNumber);
PurposeClosesanimagewindowandfreesallassociatedresources.
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindowtoclose.SetthisparametertoIMAQ_ALL_WINDOWStoclosealloftheimagewindows.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqColorBCGTransformUsageintimaqColorBCGTransform(Image*dest,constImage*source,constBCGOptions*redOptions,constBCGOptions*greenOptions,constBCGOptions*blueOptions,constImage*mask);
PurposeAppliesbrightness,contrast,andgammacorrectiontoeachplaneofacolorimage.
ImageTypesSupportedIMAQ_IMAGE_RGB
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqColorEqualizeUsageintimaqColorEqualize(Image*dest,constImage*source,intcolorEqualization);
PurposeCalculatesthehistogramofeachplaneofacolorimageandredistributespixelvaluesacrossthedesiredrangewhilemaintainingpixelvaluegroupings.
ImageTypesSupportedIMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Theimagetoequalize.colorEqualization int SetthisparametertoTRUEtoequalize
allthreeplanesoftheimage.SetthisparametertoFALSEtoequalizeonlytheluminanceplane.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqColorHistogram2UsageColorHistogramReport*imaqColorHistogram2(Image*image,intnumClasses,ColorModemode,constCIEXYZValue*whiteReference,Image*mask);
PurposeCalculatesthehistogram,orpixeldistribution,ofacolorimage.
ImageTypesSupportedIMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
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.
ReturnValueType Description
ColorHistogramReport* Onsuccess,thisfunctionreturnsareportdescribingtheclassificationofeachplaneinaHistogramReport.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereport,disposeofitbycallingimaqDispose().
imaqColorLookupUsageintimaqColorLookup(Image*dest,constImage*source,ColorModemode,constImage*mask,constshort*plane1,constshort*plane2,constshort*plane3);
PurposePerformsatransformationonanimagebyreplacingeachpixelvalueinagivencolorplanewiththelookuptableentrycorrespondingtothatvalue.
NoteThisfunctiondoesnotsupporttheCIEL*a*b*andCIEXYZcolormodes.
ImageTypesSupportedIMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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
imaqColorThresholdUsageintimaqColorThreshold(Image*dest,constImage*source,intreplaceValue,ColorModemode,constRange*plane1Range,constRange*plane2Range,constRange*plane3Range);
PurposeThresholdsacolorimage.Thefunctionselectsapixelifallthreecolorcomponentsfallwithinthespecifiedrange.Thefunctionreplacesthevalueofselectedpixelswiththegivenreplacementvalueandsetsthevalueofunselectedpixelsto0.
NoteThisfunctiondoesnotsupporttheCIEL*a*b*andCIEXYZcolormodes.
ImageTypesSupportedIMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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
imaqCompareUsageintimaqCompare(Image*dest,constImage*source,constImage*compareImage,ComparisonFunctioncompare);
PurposeCopiesthesourceimagetothedestinationimageinthefollowingmanner:Ifthegivencomparisonbetweenthesourcepixelvalueanditscorrespondingcomparisonimagepixelvalueistrue,thefunctionsetsthedestinationpixelvalueto0.Ifthecomparisonisfalse,thefunctioncopiesthesourcepixelvaluetothedestinationpixel.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Thesourceimage.compareImage constImage* Theimagetowhichthefunction
comparesthesourceimage.Thisimagemustbethesametypeofimageassource.
compare ComparisonFunction Themethodinwhichthefunctioncomparesimages.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqCompareConstantUsageintimaqCompareConstant(Image*dest,constImage*source,PixelValuevalue,ComparisonFunctioncompare);
PurposeCopiesthesourceimagetothedestinationimageinthefollowingmanner:Ifthegivencomparisonbetweenthesourcepixelvalueandthegivenconstantistrue,thefunctionsetsthedestinationpixelvalueto0.Ifthecomparisonisfalse,thefunctioncopiesthesourcepixelvaluetothedestination.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Thesourceimage.value PixelValue Thevaluetocomparetothesource
image.UsethegrayscalememberofthePixelValueunion.
compare ComparisonFunction Themethodinwhichthefunctioncomparesimages.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqCompareGoldenTemplateUsageintimaqCompareGoldenTemplate(constImage*image,Image*goldenTemplate,Image*brightDefects,Image*darkDefects,constInspectionAlignment*alignment,constInspectionOptions*options);
PurposeComparesthegoldentemplatetoanimageatagivenalignment.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
image constImage* Theimagetoinspectfordefects.
goldenTemplate Image* Thegoldentemplatetocompareagainstimage.
brightDefects Image* Thedestinationimageforbrightdefects,orbothkindsofdefectsifthesameimageisalsopassedtodarkDefects.
darkDefects Image* Thedestinationimagefordarkdefects.
alignment constInspectionAlignment* ThealignmentwithinimagewherethegoldenTemplateislocated.ThisparameterisrequiredandcannotbeNULL.
options constInspectionOptions* isaclusterspecifyingthegoldentemplatecomparison.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultmatchoptions,asfollows:
registrationMethod IMAQ_REGISTRATION_NONEnormalizationMethod IMAQ_NORMALIZATION_NONEedgeThicknessToIgnore 0brightThreshold 30darkThreshold 30binary TRUE
imaqComplexPlaneToArrayUsagefloat*imaqComplexPlaneToArray(constImage*image,ComplexPlaneplane,Rectrect,int*columns,int*rows);
PurposeExtractsaplanefromacompleximageintoatwo-dimensionalarray.
ImageTypesSupportedIMAQ_IMAGE_COMPLEX
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.
ReturnValueType Description
float* Onsuccess,thisfunctionreturnsatwo-dimensionalarrayofvaluescorrespondingtothepixelvaluesoftheextractedplane.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththearray,disposeofitbycallingimaqDispose().
imaqConcentricRake2UsageConcentricRakeReport2*imaqConcentricRake2(Image*image,ROI*roi,ConcentricRakeDirectiondirection,EdgeProcessprocess,intstepSize,EdgeOptions2*edgeOptions);
PurposeFindsedgesalongarcsinsideanannularsearchregion.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image Image* Theimageinwhichtofindedges.
roi ROI* Theannularregionthefunctionlooksinfortheedges.Thefirstcontourofroimustbeanannulus.
direction ConcentricRakeDirection Thedirectionthefunctionsearchesforedgesalongthesearchlines.
process EdgeProcess Definestheedgesforwhichthefunctionlooks.
stepSize int Specifiesthenumberofpixelsbetweeneachsearchline.
edgeOptions EdgeOptions2* Specifiestheparametersthatareusedtocomputetheedgeprofileanddetectedges.
ReturnValueType Description
ConcentricRakeReport2* Onsuccess,thisfunctionreturnsinformationdescribingthecalculatededgesandtheconcentricrakeusedbythefunction.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDispose().
ParameterDiscussionedgeOptions—SetedgeOptionstoNULLtousethedefaultoptions,asfollows:
polarity IMAQ_SEARCH_FOR_ALL_EDGESkernelSize 3numSearchLines 3minThreshold 10.0interpolationType IMAQ_BILINEAR_FIXEDcolumnProcessingMode IMAQ_MEDIAN_COLUMNS
imaqConjugateUsageintimaqConjugate(Image*dest,constImage*source);
PurposeComputestheconjugateofacompleximage.
ImageTypesSupportedIMAQ_IMAGE_COMPLEX
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Thesourceimagewhoseconjugatethefunction
calculates.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqConstructROI2UsageintimaqConstructROI2(constImage*image,ROI*roi,ToolinitialTool,constToolWindowOptions*tools,constConstructROIOptions2*options,int*okay);
PurposeDisplaystheimageinamodalwindowandallowstheusertodrawaregionofinterest(ROI)onit.AftertheuserdrawstheROI,thefunctionclosesthewindow.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:
windowNumber IMAQ_MODAL_DIALOGwindowTitle "ROIConstructor"type IMAQ_PALETTE_GRAYpalette NULLnumColors 0maxContours 1
imaqConvexHullUsageintimaqConvexHull(Image*dest,Image*source,intconnectivity8);
PurposeComputestheconvexenvelopeforeachlabeledparticleinthesourceimage.Ifthesourceimagecontainsmorethanoneparticle,youmustlabeleachparticlewithimaqLabel2()beforecallingthisfunction.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
dest Image* Thedestinationimage.source Image* Theimagecontainingthelabeledparticlesthat
thefunctioncalculatesconvexenvelopesfor.connectivity8 int SetthisparametertoTRUEtouseconnectivity-8
todeterminewhetherparticlesaretouching.SetthisparametertoFALSEtouseconnectivity-4todeterminewhetherparticlesaretouching.Formoreinformationaboutconnectivity,seeChapter9,BinaryMorphology,intheNIVisionConceptsManual
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqConvolve2UsageintimaqConvolve2(Image*dest,Image*source,float*kernel,intmatrixRows,intmatrixCols,floatnormalize,Image*mask,RoundingModeroundingMode);
PurposeAppliesalinearfiltertoanimagebyconvolvingtheimagewithafilteringkernel.Theconvolutionkernelmusthaveanoddwidthandheight.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqCopyCalibrationInfo2UsageintimaqCopyCalibrationInfo2(Image*dest,Image*source,Pointoffset);
PurposeCopiescalibrationinformationfromacalibratedimagetoanuncalibratedimage.Bothimagesmustbethesamesize.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
dest Image* Theimagewhosecalibrationinformationthefunctionsets.
source Image* Thecalibratedimagethatcontainsthecalibrationinformationthefunctioncopiestothedestinationimage.
offset Point Theoffsetofdestwithinsource.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqCopyContourUsageContourIDimaqCopyContour(ROI*destRoi,constROI*sourceRoi,ContourIDid);
PurposeCopiesacontourexistinginoneregionofinterest(ROI)toanotherROI.CopyingthecontourdoesnotaffecttheoriginalcontourorthesourceROI.
ParametersName Type Description
destRoi ROI* TheROItowhichthefunctionaddsthecontour.sourceRoi constROI* TheROIthatcontainsthecontourtocopy.id ContourID ThecontourtoaddtotheROI.
ReturnValueType Description
ContourID Onsuccess,thisfunctionreturnstheContourIDofthecontourinthedestinationROI.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqCopyFromRingUsageImage*imaqCopyFromRing(SESSION_IDsessionID,Image*image,intimageToCopy,int*imageNumber,Rectrect);
PurposeCopiesanareaofabuffertoauser-specifiedimage.Thisfunctionisusefulforringacquisitionsifyoudonotwanttoextractthebuffer.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
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.
ReturnValueType Description
Image* Onsuccess,thisfunctionreturnsthecopiedimage.Onfailure,thefunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeimage,disposeofitbycallingimaqDispose().
imaqCopyOverlayUsageintimaqCopyOverlay(Image*dest,constImage*source,constchar*group);
PurposeCopiesoverlayinformationexistinginoneimagetoanotherimage.Thisoverlayisaddedtotheexistingoverlayinformationonthedestinationimage.
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
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Thesourceimage.group constchar* Overlaygroupnametocopy.Setthisparameterto
NULLtocopyalloverlays.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqCopyRectUsageintimaqCopyRect(Image*dest,constImage*source,Rectrect,PointdestLoc);
PurposeCopiesanareaofoneimageintoanotherimage.Youcancopythesourceareatoanewdestinationimageortoanotherareainthesourceimage.Thesourceanddestinationimagesmustbeofthesametype.Ifthesourceareaislargerthanthedestinationarea,thesourceareaisclipped.Thesizeofthedestinationimageandpixelsoutsidethedestinationarearemainunchanged.Tomakeaduplicateofanimage,includingborderandcalibrationinformation,useimaqDuplicate().
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
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Thesourceimage.rect Rect Theareaofthesourcetocopyintothe
destination.SetthisparametertoIMAQ_NO_RECTtocopythewholesourceimagetothedestination.
destLoc Point Thecoordinatesofthetop-leftpixelinthedestinationimagewherethefunctioncopiesthesourcearea.Thislocationcanbeanywhereontheimageorontheborderoftheimage.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqCorrectCalibratedImageUsageintimaqCorrectCalibratedImage(Image*dest,constImage*source,PixelValuefill,InterpolationMethodmethod,constROI*roi);
PurposeSpatiallycorrectsanimagebyapplyingthecalibrationinformationassociatedwiththeimage.
NoteYoumustfirstattachcalibrationinformationtothisimagebyusingoneofthefollowingfunctions:imaqCopyCalibrationInfo2()imaqLearnCalibrationGrid()imaqLearnCalibrationPoints()imaqSetSimpleCalibration()
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqCorrelateUsageintimaqCorrelate(Image*dest,Image*source,constImage*templateImage,Rectrect);
PurposeComputesthenormalizedcross-correlationbetweenasourceimageandatemplateimage.Thisoperationistime-intensive.Toreducethecorrelationtime,useasmalltemplate,reducethesearchareabyusingthearearectangle,andmakethetemplateimagewidthamultipleof4.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
dest Image* Thedestinationimage.source Image* Thesourceimage.Thecorrelation
modifiestheborderofthesourceimage.Thebordermustbeatleasthalfaslargeasthelargerdimensionofthetemplateimage.
templateImage constImage* Thetemplateimagetocorrelateagainstthesource.
rect Rect Theareaofthesourceimageonwhichtoperformthecorrelation.SetthisparametertoIMAQ_NO_RECTtoperformthecorrelationonthewholesourceimage.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqCountObjectsUsageObjectReport*imaqCountObjects(Image*image,RotatedRectsearchRect,constCountObjectsOptions*options,constCoordinateTransform2*transform,int*numObjects);
PurposeLocates,counts,andmeasuresobjectsinarectangularsearcharea.Thisfunctionusesathresholdonthepixelintensitiestosegmenttheobjectsfromtheirbackground.Thefunctionthenlocatesandmeasuresthesegmentedobjects.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
ObjectReport* Onsuccess,thisfunctionreturnsanarrayofreportsdescribingeachoftheobjectsfoundbythefunction.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDispose().
ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:
type IMAQ_BRIGHT_OBJECTSthreshold 128rejectBorder FALSEfillHoles FALSEuseMinSize FALSEminSize 0useMaxSize FALSEmaxSize 0showSearchArea FALSEshowObjectCenter TRUEshowBoundingBox TRUE
imaqCountParticlesUsageintimaqCountParticles(Image*image,intconnectivity8,int*numParticles);
PurposeCountsthenumberofparticlesinabinaryimage,andmakesbasiccalculationsabouttheparticlestoincreasetheefficiencyoftheimaqMeasureParticle()function.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image Image* Theimageonwhichtocountparticles.connectivity8 int SetthisparametertoTRUEtouseconnectivity-8
todeterminewhetherpixelsarepartofthesameparticle.SetthisparametertoFALSEtouseconnectivity-4todeterminewhetherpixelsarepartofthesameparticle.Formoreinformationaboutconnectivity,refertoChapter9,BinaryMorphology,intheNIVisionConceptsManual.
numParticles int* Onreturn,thenumberofparticlesintheimage.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqCreateAVIUsageAVISessionimaqCreateAVI(constchar*fileName,constchar*compressionFilter,intquality,unsignedintframesPerSecond,unsignedintmaxDataSize);
PurposeThisfunctioncreatesanAVIfilesothatimagesanddatacanbewrittentoit.
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.
ReturnValueType Description
AVISession Onsuccess,thisfunctionreturnsasessionIDassociatedwiththegivenAVIfile.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqCreateCharSetUsageCharSet*imaqCreateCharSet();
PurposeCreatesanew,emptycharacterset.
ReturnValueType Description
CharSet* Onsuccess,thisfunctionreturnsapointertoanew,emptyCharSet.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetError().Whenyoufinishwiththecharacterset,disposeofitbycallingimaqDispose().
imaqCreateClassifierUsageClassifierSession*imaqCreateClassifier(ClassifierTypetype);
PurposeCreatesanewclassifiersession.
ParametersName Type Description
type ClassifierType Thetypeoftheclassifiersessiontocreate.
ReturnValueType Description
ClassifierSession* Onsuccess,thisfunctionreturnsanewclassifiersession.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeoftheinformationbycallingimaqDispose().
imaqCreateImageUsageImage*imaqCreateImage(ImageTypetype,intborderSize);
PurposeCreatesanimage.Thecreatedimagewillbe0x0pixelsinsize.Tochangetheimagesize,useimaqSetImageSize().
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
ParametersName Type Description
type ImageType Thetypeofimagetocreate.borderSize int Thesizeoftheimageborder.Formore
informationaboutborders,refertoChapter1,DigitalImages,oftheNIVisionConceptsManual.
ReturnValueType Description
Image* Onsuccess,thisfunctionreturnsthecreatedimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththecreatedimage,disposeofitbycallingimaqDispose().
imaqCreateROIUsageROI*imaqCreateROI();
PurposeCreatesanew,emptyregionofinterest(ROI).
ReturnValueType Description
ROI* Onsuccess,thisfunctionreturnsapointertoanew,emptyROI.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().WhenyouarefinishedwiththeROI,disposeofthepointerbycallingimaqDispose().
imaqDanielssonDistanceUsageintimaqDanielssonDistance(Image*dest,Image*source);
PurposeCreatesaveryaccuratedistancemapbasedontheDanielssondistancealgorithm.Thefunctionencodesthepixelvalueofaparticleasafunctionofthedistanceofthepixelfromtheparticleperimeter.Forafasterbutlessprecisealgorithm,useimaqSimpleDistance().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16
ParametersName Type Description
dest Image* Thedestinationimage.source Image* Theimagethatthefunctionusestocomputethe
distancemap.Thefunctionmodifiestheborderofthesourceimage.Thebordermustbeatleastonepixelwide.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqDeleteCharUsageintimaqDeleteChar(CharSet*set,intindex);
PurposeDeletesacharacterfromthetrainedcharacterset.
ParametersName Type Description
set CharSet* Thecharactersetthisfunctionoperateson.Tocreateacharacterset,useimaqCreateCharSet().ThisparameterisrequiredandcannotbeNULL.
index int Theindexofacharacterinthetrainedcharactersettodelete.SetthisparametertoIMAQ_ALL_CHARACTERStocleartheentiretrainedcharacterset.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqDeleteClassifierSampleUsageintimaqDeleteClassifierSample(ClassifierSession*session,intindex);
PurposeDeletesasamplefromaclassifiersession.
ParametersName Type Description
session ClassifierSession* Thesessioncontainingthesampletodelete.index int Theindexofthesampletodelete.Use
IMAQ_ALL_SAMPLEStodeleteallsamplesfromthissession.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqDetectCirclesUsageCircleMatch*imaqDetectCircles(constImage*image,constCircleDescriptor*circleDescriptor,constCurveOptions*curveOptions,constShapeDetectionOptions*shapeDetectionOptions,constROI*roi,int*numMatchesReturned);
PurposeSearchesforcirclesinanimage.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
image constImage* Theimageonwhichtodetectcircles.
circleDescriptor constCircleDescriptor* Astructurethatdescribesthecirclestosearchforintheimage.ThisparameterisrequiredandcannotbeNULL.
curveOptions constCurveOptions* Describeshowthefunctionidentifiesthecurvesintheimage.ThisfunctiondoesnotsupportidentifyingcurveswithsubpixelaccuracyandthereforeignoresthesubpixelAccuracyelementofthisparameter.
shapeDetectionOptions constShapeDetectionOptions* Theoptionstousewhendetectingcircles.
roi constROI* Theregionofinterestappliedtotheimagethatspecifieswherecirclescanbedetected.SetthisparametertoNULL
tosearchtheentireimage.
numMatchesReturned int* Onreturn,thenumberofcirclesthatthefunctionmatched.SetthisparametertoNULLifyoudonotwishtoreturninformationaboutthenumberofmatchedcircles.
ReturnValueType Description
CircleMatch* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thevalueisNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().
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
imaqDetectEllipsesUsageEllipseMatch*imaqDetectEllipses(constImage*image,constEllipseDescriptor*ellipseDescriptor,constCurveOptions*curveOptions,constShapeDetectionOptions*shapeDetectionOptions,constROI*roi,int*numMatchesReturned);
PurposeSearchesforellipsesinanimage.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
image constImage* Theimageonwhichtodetectellipses.
ellipseDescriptor constEllipseDescriptor* Astructurethatdescribestheellipsestosearchforintheimage.ThisparameterisrequiredandcannotbeNULL.
curveOptions constCurveOptions* Describeshowthefunctionidentifiesthecurvesintheimage.ThisfunctiondoesnotsupportidentifyingcurveswithsubpixelaccuracyandthereforeignoresthesubpixelAccuracyelementofthisparameter.
shapeDetectionOptions constShapeDetectionOptions* Theoptionstousewhendetectingellipses.
roi constROI* Theregionofinterestappliedtotheimagethatspecifieswhereellipsescanbedetected.SetthisparametertoNULL
tosearchtheentireimage.
numMatchesReturned int* Onreturn,thenumberofellipsesthatthefunctionmatched.SetthisparametertoNULLifyoudonotwishtoreturninformationaboutthenumberofmatchedellipses.
ReturnValueType Description
EllipseMatch* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().
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
imaqDetectExtremesUsageExtremeReport*imaqDetectExtremes(constdouble*pixels,intnumPixels,DetectionModemode,constDetectExtremesOptions*options,int*numExtremes);
PurposeFindsthelocation,amplitude,andsecondderivativeoftheextremes(eitherpeaksorvalleys)intheinputarray.Thisfunctionusesanalgorithmthatfitsaquadraticpolynomialtosequentialgroupsofdatapoints.
ParametersName Type Description
pixels constdouble* Thearrayofpixeldatathefunctionprocesses.
numPixels int Thenumberofpixelsinthesuppliedarray.Youmustsupplyatleastasmanypixelsasthevalueyousupplyforthewidthelementintheoptionsparameter.
mode DetectionMode Determinesifthefunctiondetectspeaksordetectsvalleys.
options constDetectExtremesOptions* Describeshowthefunctioncalculatestheextremes.
numExtremes int* Onreturn,thenumberofextremesfoundbythefunction.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
ExtremeReport* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachextremefound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().
ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:
threshold 0width 3
imaqDetectLinesUsageLineMatch*imaqDetectLines(constImage*image,constLineDescriptor*lineDescriptor,constCurveOptions*curveOptions,constShapeDetectionOptions*shapeDetectionOptions,constROI*roi,int*numMatchesReturned);
PurposeSearchesforlinesinanimage.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
image constImage* Theimageonwhichtodetectlines.
lineDescriptor constLineDescriptor* Astructurethatdescribesthelinestosearchforintheimage.ThisparameterisrequiredandcannotbeNULL.
curveOptions constCurveOptions* Describeshowthefunctionidentifiesthecurvesintheimage.ThisfunctiondoesnotsupportidentifyingcurveswithsubpixelaccuracyandthereforeignoresthesubpixelAccuracyelementofthisparameter.
shapeDetectionOptions constShapeDetectionOptions* Theoptionstousewhendetectinglines.
roi constROI* Theregionofinterestappliedtotheimagethatspecifieswherelinescanbedetected.SetthisparametertoNULL
tosearchtheentireimage.
numMatchesReturned int* Onreturn,thenumberoflinesthatthefunctionmatched.SetthisparametertoNULLifyoudonotwishtoreturninformationaboutthenumberofmatchedlines.
ReturnValueType Description
LineMatch* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().
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
imaqDetectRectanglesUsageRectangleMatch*imaqDetectRectangles(constImage*image,constRectangleDescriptor*rectangleDescriptor,constCurveOptions*curveOptions,constShapeDetectionOptions*shapeDetectionOptions,constROI*roi,int*numMatchesReturned);
PurposeSearchesforrectanglesinanimage.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
image constImage* Theimageonwhichtodetectrectangles.
rectangleDescriptor constRectangleDescriptor* Astructurethatdescribestherectanglestosearchforintheimage.ThisparameterisrequiredandcannotbeNULL.
curveOptions constCurveOptions* Describeshowthefunctionidentifiesthecurvesintheimage.ThisfunctiondoesnotsupportidentifyingcurveswithsubpixelaccuracyandthereforeignoresthesubpixelAccuracyelementofthisparameter.
shapeDetectionOptions constShapeDetectionOptions* Theoptionstousewhendetectingrectangles.
roi constROI* Theregionofinterestappliedtotheimagethatspecifieswhererectanglescanbedetected.Setthis
parametertoNULLtosearchtheentireimage.
numMatchesReturned int* Onreturn,thenumberofrectanglesthatthefunctionmatched.SetthisparametertoNULLifyoudonotwishtoreturninformationaboutthenumberofmatchedrectangles.
ReturnValueType Description
RectangleMatch* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().
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
imaqDetectRotationUsageintimaqDetectRotation(constImage*referenceImage,constImage*testImage,PointFloatreferenceCenter,PointFloattestCenter,intradius,floatprecision,double*angle);
PurposeDetectstherotationalshiftbetweentwoimages,usuallyareferenceimagecontainingapartataknownorientationandanotherimagecontainingthepartinanunknownposition.Thisfunctionextractspixelvaluesaroundacircularregioninthereferenceimageandcomparesthesevaluestothesameregioninthetestimage.Thealgorithmlooksfortherotationalshiftbetweenthosetwosamples.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionprecision—Thesamplingperioddirectlyaffectsthespeedofthefunction.Ifthesamplingperiodishigh(meaningthatthenumberofsamplesalongthecircularregionissmall),theprocessingspeedofthefunctionincreasesatthecostofreducedaccuracyinthecomputedrotationalshift.Inmanycases,youdonotneedaprecisionhigherthan5degreestopositiontheregionsofinspectionofapart.Ifthesamplingperiodislessthanorequalto0,thefunctionreturnsanerror.
imaqDisplayImageUsageintimaqDisplayImage(constImage*image,intwindowNumber,intresize);
PurposeDisplaysanimageinanimagewindow.Thewindowbecomesvisiblewhenyoucallthefunction.Thewindowisassociatedwiththeimageuntilyouclosethewindow,disposeoftheimage,orcallthisfunctionagainwiththesamewindownumber.Callthisfunctiontorefreshthedisplayofthewindow,includingoverlays.UseimaqSetBitDepth()tosetthebitdepthof16-bitmonochromeand64-bitRGBimages.imaqDisplayImageusesthisspecifiedbitdepthtodisplaytheimage.UseimaqSetWindowDisplayMapping()tosetthepixelmappingpolicyfordisplaying16-bitmonochromeimagesofanunspecifiedbitdepth.
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
ParametersName Type Description
image constImage* Theimagetodisplayinthewindow.windowNumber int Thewindownumberofthewindowin
whichtodisplaytheimage.Thereare16imagewindows,whichhavewindownumbers0-15.Toobtainawindownumbernotinuse,callimaqGetWindowHandle().
resize int IfyousetthisparametertoTRUE,thefunctionresizesthewindowtothesizeoftheimage.IfyousetthisparametertoFALSE,thewindowsizedoesnotchange.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqDisposeUsageintimaqDispose(void*object);
PurposeCleansupresourcesassociatedwithimages,regionsofinterest(ROIs),arrays,andreportsthatyounolongerneed.Afteryoudisposeofsomething,youcannolongeruseit.
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
ParametersName Type Description
object void* Theimage,ROI,array,orreportwhosememoryyouwanttofree.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqDisposeCircularEdgeReportUsageintimaqDisposeCircularEdgeReport(CircularEdgeReport*report);
PurposeCleansupresourcesassociatedwithaCircularEdgeReportstructure.
ParametersName Type Description
report CircularEdgeReport* Thereportwhosememoryyouwanttofree.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqDisposeObjectReportUsageintimaqDisposeObjectReport(ObjectReport*report);
PurposeCleansupresourcesassociatedwithanarrayofObjectReportstructures.
ParametersName Type Description
report ObjectReport* Thearrayofreportswhosememoryyouwanttofree.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqDisposeStraightEdgeReportUsageintimaqDisposeStraightEdgeReport(StraightEdgeReport*report);
PurposeCleansupresourcesassociatedwithaStraightEdgeReportstructure.
ParametersName Type Description
report StraightEdgeReport* Thereportwhosememoryyouwanttofree.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqDivide2UsageintimaqDivide2(Image*dest,constImage*sourceA,constImage*sourceB,RoundingModeroundingMode);
PurposeDividestwoimages.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB
ParametersName Type Description
dest Image* Thedestinationimage.sourceA constImage* Thefirstimagetodivide.sourceB constImage* Thesecondimagetodivide.roundingMode RoundingMode Specifiesthetypeofroundingtouse
whendividingimagepixels.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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.
imaqDivideConstant2UsageintimaqDivideConstant2(Image*dest,constImage*source,PixelValuevalue,RoundingModeroundingMode);
PurposeDivideseachpixelinanimagebyaconstant.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Theimagebywhichthefunctiondivides
ascalarconstant.value PixelValue Thevaluebywhichthefunctiondivides
thesourceimage.Setthememberofvaluethatcorrespondstotheimagetype.
roundingMode RoundingMode Specifiesthetypeofroundingtousewhendividingimagepixels.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqDrawLineOnImageUsageintimaqDrawLineOnImage(Image*dest,constImage*source,DrawModemode,Pointstart,Pointend,floatnewPixelValue);
PurposeDrawsalineonanimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqDrawShapeOnImageUsageintimaqDrawShapeOnImage(Image*dest,constImage*source,Rectrect,DrawModemode,ShapeModeshape,floatnewPixelValue);
PurposeDrawsashapeonanimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqDrawTextOnImageUsageintimaqDrawTextOnImage(Image*dest,constImage*source,Pointcoord,constchar*text,constDrawTextOptions*options,int*fontNameUsed);
PurposeDrawstextonanimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:
fontName ArialfontSize 12bold FALSEitalic FALSEunderline FALSEstrikeout FALSEtextAlignment IMAQ_LEFTfontColor IMAQ_WHITE
imaqDuplicateUsageintimaqDuplicate(Image*dest,constImage*source);
PurposeCopiesthesourceimagetothedestinationimage,includingthebordersizeandvisioninformation.Tocopyanareaofoneimagetoanareaofanotherimage,useimaqCopyRect().
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
ParametersName Type Description
dest Image* Theduplicatedimage.source constImage* Theimagetocopy.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqEasyAcquireUsageImage*imaqEasyAcquire(constchar*interfaceName);
PurposeConfigurestheimageacquisitiondevicespecifiedbyinterfaceName,acquiresoneimage,andreturnstheacquiredimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
interfaceName constchar* Anull-terminatedstringthatspecifiesthenameoftheinterfacetoopen.Examplesofinterfacesareimg0andimg1.Formoreinformationaboutinterfaces,refertotheNIVisionHardwareHelportheMeasurement&AutomationExplorerhelp.
ReturnValueType Description
Image* Onsuccess,thisfunctionreturnstheacquiredimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeimage,disposeofitbycallingimaqDispose().
imaqEdgeFilterUsageintimaqEdgeFilter(Image*dest,Image*source,OutlineMethodmethod,constImage*mask);
PurposeAppliesanonlinearfiltertohighlightedges.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqEdgeTool4UsageEdgeReport2*imaqEdgeTool4(Image*image,ROI*roi,EdgeProcessprocessType,EdgeOptions2*edgeOptions,constunsignedintreverseDirection);
PurposeFindsedgesalonganROIinanimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image Image* Theimageinwhichtofindtheedges.roi ROI* TheROItofindedgesalong.processType EdgeProcess Theedgeprocesstype.edgeOptions EdgeOptions2* Specifiestheparametersthatare
usedtocomputetheedgeprofileanddetectedges.
reverseDirection constunsignedint
SetthisparametertoTRUEtoreversethedirectionthatroiistraversedtofindedges.
ReturnValueType Description
EdgeReport2* Onsuccess,thisfunctionreturnsastructureofinformationabouttheedgesfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisstructure,disposeofitbycallingimaqDispose().
ParameterDiscussionedgeOptions—SetedgeOptionstoNULLtousethefollowingdefaultvalues:
polarity IMAQ_SEARCH_FOR_ALL_EDGESkernelSize 3width 3minThreshold 10.0interpolationType IMAQ_BILINEAR_FIXEDcolumnProcessingMode IMAQ_MEDIAN_COLUMNS
imaqEnumerateCustomKeysUsagechar**imaqEnumerateCustomKeys(constImage*image,unsignedint*size);
PurposeFindsallthecustomdatakeysassociatedwithanimage.
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
ParametersName Type Description
image constImage* Theimagefromwhichtoenumeratedatakeys.size unsignedint* Thenumberofkeysfoundintheimage.
ReturnValueType Description
char** Thisfunctionreturnsanarraycontaininganumberofstringsequaltothevaluereturnedinthesizeparameter.Eachstringisthekeytoonecustomdataitemavailableintheimage.
imaqEqualizeUsageintimaqEqualize(Image*dest,constImage*source,floatmin,floatmax,constImage*mask);
PurposeCalculatesthehistogramofanimageandredistributespixelvaluesacrossthedesiredrangetomaintainthesamepixelvaluedistribution.Pixelswhosevaluesarethesamebeforetheredistributionalsohavecommonpixelvaluesaftertheredistribution.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqExtractColorPlanesUsageintimaqExtractColorPlanes(constImage*image,ColorModemode,Image*plane1,Image*plane2,Image*plane3);
PurposeExtractstheindividualcolorplanesfromacolorimage.Theplaneyouextractmaybeindependentfromthetypeoftheimage.Forexample,youcanextractthehueplanefroma32-bitRGBimageorthegreenplanefromanHSLimage.
NoteThisfunctiondoesnotsupporttheCIEL*a*b*andCIEXYZcolormodes.ThisfunctiononlysupportstheRGBcolormodefor64-bitRGBimages.
ImageTypesSupportedIMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64
ParametersName Type Description
image constImage* Thesourceimagethatthefunctionextractstheplanesfrom.
mode ColorMode Thecolorspacethatthefunctionextractstheplanesfrom.
plane1 Image* Onreturn,thefirstextractedplane.SetthisparametertoNULLifyoudonotneedthisinformation.
plane2 Image* Onreturn,thesecondextractedplane.SetthisparametertoNULLifyoudonotneedthisinformation.
plane3 Image* Onreturn,thethirdplane.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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
imaqExtractComplexPlaneUsageintimaqExtractComplexPlane(Image*dest,constImage*source,ComplexPlaneplane);
PurposeExtractsaplanefromacompleximageandplacestheplaneintoanotherimage.
ImageTypesSupportedIMAQ_IMAGE_COMPLEX
ParametersName Type Description
dest Image* Thedestinationimage.ValidimagetypesfordestareIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAGE_IMAGE_SLG,andIMAQ_IMAGE_COMPLEX.
source constImage* Theimagewhoseplanethefunctionextracts.plane ComplexPlane Theplanetoextract.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqExtractCurvesUsageCurve*imaqExtractCurves(constImage*image,constROI*roi,constCurveOptions*curveOptions,unsignedint*numCurves);
PurposeFindscurvesinanimage.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
image constImage* Theimageinwhichtofindcurves.roi constROI* TheROIthatthefunctionperforms
thisoperationon.PassNULLtousetheentireimageforthisoperation.
curveOptions constCurveOptions* Describeshowthefunctionidentifiesthecurvesintheimage.ThisfunctiondoesnotsupportidentifyingcurveswithsubpixelaccuracyandthereforeignoresthesubpixelAccuracyelementofthisparameter.
numCurves unsignedint* Onreturn,thenumberofcurveslocatedintheimage.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
Curve* Onsuccess,thisfunctionreturnsapointertoanarrayofreportsthatdescribethecurvesintheimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().
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
imaqExtractFromRingUsageImage*imaqExtractFromRing(SESSION_IDsessionID,intimageToExtract,int*imageNumber);
PurposeExtractsanimagefromaliveacquisition.Thisfunctionletsyoulockanimageoutofacontinuousloopforprocessingduringaringacquisition.Tounlocktheimage,callimaqReleaseImage().Theacquisitionpauseswhenthecontinuousloopreachestheimageyoulockedout.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
sessionID SESSION_ID AvalidsessionID.imageToExtract int Thecumulativebufferindexoftheimage
toextract.IfanotherimagehasoverwrittenimageToExtract,thefunctionreturnsthenextavailableimage.
imageNumber int* Thecumulativebufferindexoftheextractedimage.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
Image* Onsuccess,thisfunctionreturnsapointertotheextractedimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().BecausethereturnvalueisapointertoanimagethatyouprovidedtoimaqSetupRing(),youshouldnotdisposeoftheimageuntiltheacquisitionisfinished.
imaqFFTUsageintimaqFFT(Image*dest,constImage*source);
PurposeComputestheFouriertransformofanimage.Theimagecanbeanysize,butthefunctionworksfasteriftheimagedimensionsarepowersof2.Thedestinationimagemustbedifferentthanthesourceimagetoperformthisoperation.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX
ParametersName Type Description
dest Image* Thedestinationimage.Thedestinationimagemustbeacompleximageandmustbedifferentthansourceimage.
source constImage* TheimagewhoseFouriertransformthefunctioncomputes.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqFillBorderUsageintimaqFillBorder(Image*image,BorderMethodmethod);
PurposeModifiestheborderofanimage.
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
ParametersName Type Description
image Image* Theimagewhoseborderthefunctionmodifies.method BorderMethod Themethodbywhichthefunctionmodifiesthe
border.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqFillHolesUsageintimaqFillHoles(Image*dest,constImage*source,intconnectivity8);
PurposeFillsholesinparticles.Thefunctionfillstheholeswithapixelvalueof1.Thefunctiondoesnotfillareastouchingtheedgeoftheimagethatappeartobeholesbecausetheseareascouldbeeitherholesorareasofconcavity.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Theimagecontainingparticleswithholes.connectivity8 int SetthisparametertoTRUEtouse
connectivity-8todeterminewhetherparticlesaretouching.SetthisparametertoFALSEtouseconnectivity-4todeterminewhetherparticlesaretouching.Formoreinformationaboutconnectivity,seeChapter9,BinaryMorphology,intheNIVisionConceptsManual.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqFillImageUsageintimaqFillImage(Image*image,PixelValuevalue,constImage*mask);
PurposeSetseachpixelinanimagetoaspecifiedvalue.
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
ParametersName Type Description
image Image* Theimagewhosepixelvaluesthefunctionoverwriteswiththegivenvalue.
value PixelValue Thevaluewithwhichthefunctionfillstheimagepixels.
mask constImage* Amaskimage.ThisimagemustbeanIMAQ_IMAGE_U8image.Thefunctionsetsonlythosesourcepixelswhosecorrespondingmaskpixelsarenon-zerotothespecifiedvalue.SetthisparametertoNULLifyouwantthefunctiontoseteverypixelinthesourceimagetothespecifiedvalue.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqFindCirclesUsageCircleReport*imaqFindCircles(Image*dest,Image*source,floatminRadius,floatmaxRadius,int*numCircles);
PurposeSeparatesoverlappingcircularobjectsandclassifiesthemdependingontheirradii.Thisfunctionalsodrawsthedetectedcirclesintothedestinationimage.
ImageTypesSupportedIMAQ_IMAGE_U8
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.
ReturnValueType Description
CircleReport* Onsuccess,thisfunctionreturnsanarrayofstructurescontaininginformationabouteachofthefoundcircles.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththearray,disposeofitbycallingimaqDispose().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqFindCircularEdgeUsageCircularEdgeReport*imaqFindCircularEdge(Image*image,AnnulussearchArea,SpokeDirectiondirection,constFindEdgeOptions*options,constCoordinateTransform2*transform);
PurposeLocatesacircularedgeinanannularsearcharea.Thisfunctionlocatestheintersectionpointsbetweenasetofsearchlinesdefinedbyaspokeandtheedgeofanobject.Thefunctiondeterminestheintersectionpointsbasedontheircontrastandslopeandcalculatesabest-fitcirclebasedonthesepoints.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
image Image* Theimagewhichthefunctionusestocomputethelocationoftheedge.
searchArea Annulus Thecoordinatelocationoftheannularsearchareathefunctionlooksinfortheedge.
direction SpokeDirection Thedirectionthefunctionsearchforedgesalongthesearchlines.
options constFindEdgeOptions* Describeshowtosearchfortheedgeandtheinformationthefunctionoverlaystotheimage.
transform constCoordinateTransform2* AnoptionalspecificationofthecoordinatetransformforsearchArea.Thisparameterspecifieshowtotransformthelocationoftheedgedetectionbasedonthedifferencebetweenthereferencecoordinatesystemandthemeasurementcoordinatesystem.SetthisparametertoNULLifyoudonotneedtotransformsearchArea.
ReturnValueType Description
CircularEdgeReport* Onsuccess,thisfunctionreturnsinformationdescribingthecalculatededge.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDisposeCircularEdgeReport().
ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:
threshold 40width 4steepness 2subsamplingRatio 5showSearchArea FALSEshowSearchLines FALSEshowEdgesFound FALSEshowResult TRUE
imaqFindConcentricEdgeUsageStraightEdgeReport*imaqFindConcentricEdge(Image*image,AnnulussearchArea,ConcentricRakeDirectiondirection,constFindEdgeOptions*options,constCoordinateTransform2*transform);
PurposeLocatesastraightedgeinaannularsearcharea.Thisfunctionlocatestheintersectionpointsbetweenasetofconcentricsearchlinesandtheedgeofanobject.Thefunctiondeterminestheintersectionpointsbasedontheircontrastandslopeandcalculatesabest-fitlinebasedonthesepoints.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
image Image* Theimagewhichthefunctionusestocomputethelocationoftheedge.
searchArea Annulus Thecoordinatelocationoftheannularsearchareathefunctionlooksinfortheedge.
direction ConcentricRakeDirection Thedirectionthefunctionsearchforedgesalongthesearchlines.
options constFindEdgeOptions* Describeshowtosearchfortheedgeandtheinformationthefunctionoverlaystotheimage.
transform constCoordinateTransform2* AnoptionalspecificationofthecoordinatetransformforsearchArea.Thisparameterspecifieshowtotransformthelocationoftheedgedetectionbasedonthedifferencebetweenthereferencecoordinatesystemandthemeasurementcoordinatesystem.SetthisparametertoNULLifyoudonotneedtotransformsearchArea.
ReturnValueType Description
StraightEdgeReport* Onsuccess,thisfunctionreturnsinformationdescribingthecalculatededge.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDisposeStraightEdgeReport().
ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:
threshold 40width 4steepness 2subsamplingRatio 5showSearchArea FALSEshowSearchLines FALSEshowEdgesFound FALSEshowResult TRUE
imaqFindEdge2UsageFindEdgeReport*imaqFindEdge2(Image*image,constROI*roi,constCoordinateSystem*baseSystem,constCoordinateSystem*newSystem,constFindEdgeOptions2*findEdgeOptions,constStraightEdgeOptions*straightEdgeOptions);
PurposeDetectsstraightedgesinsideanROI,andoptionallyoverlaystheinformationusedtosearchfortheedges.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image Image* Theimageinwhichtofindedges.
roi constROI* Therectangularregionthefunctionlooksinfortheedges.Thefirstcontourofroimustbearectangleorarotatedrectangle.
baseSystem constCoordinateSystem* Describesthebasecoordinatesystem.
newSystem constCoordinateSystem* Describesthenewcoordinatesystem.
findEdgeOptions constFindEdgeOptions2* Describeshowyouwantthefunctiontosearchforedgesandtheinformationthefunctionoverlaystotheimage.
straightEdgeOptions constStraightEdgeOptions* Specifiestheoptionsusedtofitalineintheroi.
ReturnValueType Description
FindEdgeReport* Onsuccess,thisfunctionreturnsinformationdescribingthecalculatededges.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDispose().
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
stepSize 3minSignalToNoiseRatio 0.0minCoverage 25.0houghIterations 5
imaqFindLCDSegmentsUsageintimaqFindLCDSegments(ROI*roi,constImage*image,constLCDOptions*options);
PurposeTakesaregionofinterest(ROI)withasinglerectangularcontouraroundanentireseven-segmentLCDandupdatestheROItocontainseveralrectangularcontours,eacharoundasingleLCDdigit.YoucanthenprocessthismodifiedROIwiththeimaqReadLCD()function.
NoteAllsegmentsoftheLCDmustbeonforthisfunctiontoproperlyfindthedigits.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
roi ROI* Theregionofinteresttotransform.Whennecessary,thefunctionconvertsarectangularcontourcontainedinroitoarotatedrectanglecontour.
image constImage* TheimagecontainingtheLCD.AllsegmentsoftheLCDmustbelit.
options constLCDOptions* Controlshowthefunctionperformsthesearch.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:
litSegments FALSEthreshold 8sign FALSEdecimalPoint FALSE
imaqFindPatternUsagePatternMatch*imaqFindPattern(Image*image,Image*pattern,RotatedRectsearchRect,constFindPatternOptions*options,constCoordinateTransform2*transform,int*numMatches);
PurposeSearchesforatemplateimageinarectangularsearchareaoftheimage.
ImageTypesSupportedIMAQ_IMAGE_U8
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
templateimageandtheinformationthefunctionoverlaystotheimage.Tousedefaultoptions,setthisparametertoNULL.
transform constCoordinateTransform2* AnoptionalspecificationofthecoordinatetransformforsearchRect.Thisparameterspecifieshowtotransformthelocationofthepatternsearchbasedonthedifferencebetweenthereferencecoordinatesystemandthemeasurementcoordinatesystem.SetthisparametertoNULLifyoudonotneedtotransformsearchRect.
numMatches int* Onreturn,thenumberofmatchestothetemplateimagethatthefunctionfound.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
PatternMatch* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDispose().
ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:
mode IMAQ_MATCH_SHIFT_INVARIANTnumMatchesRequested 1minMatchScore 800subpixelAccuracy FALSEangleRanges NULLnumRanges 0showSearchArea FALSEshowResult TRUE
imaqFindTransformPatternUsageintimaqFindTransformPattern(Image*image,Image*pattern,CoordinateTransform2*transform,RotatedRectsearchRect,FindTransformModemode,constFindTransformPatternOptions*options,AxisReport*report);
PurposeComputesacoordinatetransformbasedonthepositionofatemplateimageinasearchareaofanimage.Thefunctionusesthelocationandorientationofthecoordinatesystemitfindstocreatethereferencesystemofacoordinatetransformortoupdatethemeasurementsystemofanexistingcoordinatetransform.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
image Image* Theimagewhichthefunctionusestocomputethecoordinatetransform.
pattern Image* Thetemplateimagewhichthefunctionattemptstolocate.AttachpatternmatchinginformationtothisimageusingimaqLearnPattern().Ifyouhavenotattachedpatternmatchinginformationtotheimage,thefunctionlearnsthepatternandappendsthepatternmatchinginformationtotheimage.IfyouattachpatternmatchinginformationtotheimagethatdoesnotcontaintheinformationspecifiedbythematchModeelementoftheoptionsparameter,thefunctiongeneratesanerror.
transform CoordinateTransform2* Thecoordinatetransformthefunctionupdatesbasedonthelocationandpositionofthepattern.ThisparameterisrequiredandcannotbeNULL.
searchRect RotatedRect Thecoordinatelocationoftherectangularsearchareathefunctionlooksinforthepattern.Thefunctionsearchesthebounding
rectangleofsearchRect.Tosearchtheentireimage,setthisparametertoIMAQ_NO_ROTATED_RECT.
mode FindTransformMode Specifieshowthefunctionupdatesthecoordinatetransform.
options constFindTransformPatternOptions* Definestheparametersofthealgorithmthefunctionusestolocatethepatternandtheinformationthefunctionoverlaystotheimage.
report AxisReport* Onreturn,areportdescribingthelocationofthepatterncorrespondingtothemainaxisandthesecondaryaxis.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:
matchMode IMAQ_MATCH_SHIFT_INVARIANTminMatchScore 500subpixelAccuracy FALSEangleRanges NULL(allanglesallowed)numRanges 0showSearchArea FALSEshowFeatureFound FALSEshowResult TRUE
imaqFindTransformRect2UsageintimaqFindTransformRect2(Image*image,constROI*roi,FindTransformModemode,CoordinateSystem*baseSystem,CoordinateSystem*newSystem,constFindTransformRectOptions2*findTransformOptions,constStraightEdgeOptions*straightEdgeOptions,AxisReport*axisReport);
PurposeComputesacoordinatetransformbasedonthepositionofanobjectinasearchareaofanimage.Thefunctionusesthelocationandorientationofthecoordinatesystemitfindstocreatethereferencesystemofacoordinatetransformortoupdatethemeasurementsystemofanexistingcoordinatetransform.imaqFindTransformRect2()usesthefollowingalgorithm.Firstthefunctiondeterminesthepositionofthemainaxisofthecoordinatesystem.Itlocatestheintersectionpointsbetweenasetofparallelsearchlines,orrake,andtheedgeofanobject.Thefunctiondeterminestheintersectionpointsbasedontheircontrast,width,andsteepness.Thefunctioncalculatesabest-fitlineusingthepointsfound.Thislinedefinesthemainaxisofthecoordinatesystem.Thefunctionthenlocatestheintersectionpointsbetweenasetofparallelsearchlinesthatareperpendiculartothemainaxisandtheedgeoftheobject.Itcalculatesahit-linetotheobjectfromtheedgeclosesttothesearchareadetectedandperpendiculartothemainaxis.Thislinedefinesthesecondaryaxisofthecoordinatesystem.Theintersectionbetweenthemainaxisandsecondaryaxisistheoriginofthecoordinatesystem.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image Image* Theimagewhichthefunctionusestocomputethecoordinatetransform.
roi constROI* Definestheareawithinwhichtheedgedetectionisperformed.
mode FindTransformMode Specifieshowthefunctionupdatesthecoordinatetransform.
baseSystem CoordinateSystem* Describesthebasecoordinatesystem.ThisparameterisrequiredandcannotbeNULL.
newSystem CoordinateSystem* Describesthenewcoordinatesystem.Thisparameterisrequiredandcannotbe
NULL.findTransformOptions constFindTransformRectOptions2* Specifies
optionsfordetectingedgesalongsearchlinesineachROIandforoverlayingsearchinformation
straightEdgeOptions constStraightEdgeOptions* Specifiestheoptionsusedtofitalineintheroi.
axisReport AxisReport* Onreturn,containstheaxesthatwerelocated.SetthisparametertoNULLifyoudonotwanttoreturntheaxisinformation.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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
imaqFindTransformRects2UsageintimaqFindTransformRects2(Image*image,constROI*primaryROI,constROI*secondaryROI,FindTransformModemode,CoordinateSystem*baseSystem,CoordinateSystem*newSystem,constFindTransformRectsOptions2*findTransformOptions,constStraightEdgeOptions*primaryStraightEdgeOptions,constStraightEdgeOptions*secondaryStraightEdgeOptions,AxisReport*axisReport);
PurposeComputesacoordinatetransformbasedonthepositionofanobjectinasearchareaofanimage.Thefunctionusesthelocationandorientationofthecoordinatesystemitfindstocreatethereferencesystemofacoordinatetransformortoupdatethemeasurementsystemofanexistingcoordinatetransform.imaqFindTransformRects2()usesthefollowingalgorithm.Firstthefunctiondeterminesthepositionofthemainaxisofthecoordinatesystem.Itlocatestheintersectionpointsbetweenasetofparallelsearchlinesintheprimaryrectangleandtheedgeofanobject.Thefunctiondeterminestheintersectionpointsbasedontheircontrast,width,andsteepness.Thefunctioncalculatesabest-fitlinethroughthepointsfound.Thislinedefinesthemainaxisofthecoordinatesystem.Theprocessisrepeatedperpendicularlyinthesecondaryrectangleinordertolocatethesecondaryaxis.Theintersectionbetweenthemainaxisandthesecondaryaxisistheoriginofthecoordinatesystem.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image Image* Theimagewhichthefunctionusestocomputethecoordinatetransform.
primaryROI constROI* Definestheareawithinwhichtheedgedetectionisperformedfortheprimaryaxis.
secondaryROI constROI* Definestheareawithinwhichtheedgedetectionisperformedforthesecondaryaxis.
mode FindTransformMode Specifieshowthefunctionupdatesthecoordinatetransform.
baseSystem CoordinateSystem* Describesthebasecoordinatesystem.ThisparameterisrequiredandcannotbeNULL.
newSystem CoordinateSystem* Describesthenewcoordinatesystem.ThisparameterisrequiredandcannotbeNULL.
findTransformOptions constFindTransformRectsOptions2* Definestheparametersofthealgorithmthefunctionusestolocatetheobjectandtheinformationthefunctionoverlaystotheimage.
primaryStraightEdgeOptions constStraightEdgeOptions* SpecifiestheoptionsusedtofitalineintheprimaryROI
secondaryStraightEdgeOptions constStraightEdgeOptions* SpecifiestheoptionsusedtofitalineinthesecondaryROI
axisReport AxisReport* Onreturn,containstheaxesthatwerelocated.SetthisparametertoNULLifyoudonotwanttoreturntheaxisinformation.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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
imaqFitCircle2UsageBestCircle2*imaqFitCircle2(constPointFloat*points,intnumPoints,constFitCircleOptions*options);
PurposeFindsthecirclethatbestrepresentsthesetofpoints.
ParametersName Type Description
points constPointFloat* Thearrayofpointstofittotheedgeofthecircle.
numPoints int Thenumberofpointsinthesuppliedarray.Youmustsupplyatleastthreepoints.
options constFitCircleOptions* Describeshowthefunctioncalculatesthebestfitcircle.
ReturnValueType Description
BestCircle2* Onsuccess,thisfunctionreturnsastructuredescribingthecirclethatbestfitthepoints.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththestructure,disposeofitbycallingimaqDispose().
imaqFitEllipse2UsageBestEllipse2*imaqFitEllipse2(constPointFloat*points,intnumPoints,constFitEllipseOptions*options);
PurposeFindstheellipsethatbestrepresentsthesetofpoints.
ParametersName Type Description
points constPointFloat* Thearrayofpointstofittotheedgeoftheellipse.
numPoints int Thenumberofpointsinthesuppliedarray.IftherejectOutlierselementoftheoptionsinputisTRUE,youmustsupplyatleastfivepoints.Otherwise,youmustsupplyatleastsixpoints.
options constFitEllipseOptions* Describeshowthefunctioncalculatesthebestfitellipse.
ReturnValueType Description
BestEllipse2* Onsuccess,thisfunctionreturnsastructuredescribingtheellipsethatbestfitthepoints.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththestructure,disposeofitbycallingimaqDispose().
imaqFitLineUsageBestLine*imaqFitLine(constPointFloat*points,intnumPoints,constFitLineOptions*options);
PurposeFindsthelinethatbestrepresentsasetofpoints.
ParametersName Type Description
points constPointFloat* Thearrayofpointstofittotheline.Theresultinglinemaytakeintoaccountonlyasubsetoftheinputpoints.
numPoints int Thenumberofpointsinthesuppliedarray.Youmustsupplyatleasttwopoints.
options constFitLineOptions* Describeshowthefunctioncalculatesthebestfitline.
ReturnValueType Description
BestLine* Onsuccess,thisfunctionreturnsastructuredescribingthelinethatbestfitsthepoints.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththestructure,disposeofitbycallingimaqDispose().
ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:
minScore 900pixelRadius 3numRefinements 0
imaqFlattenUsagevoid*imaqFlatten(constImage*image,FlattenTypetype,CompressionTypecompression,intquality,unsignedint*size);
PurposeReturnsadatarepresentationofanimage.ThisrepresentationcanbeconvertedbacktoanimagewithimaqUnflatten().
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
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.
ReturnValueType Description
void* Onsuccess,thisfunctionreturnsadatarepresentationoftheimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().
imaqFlipUsageintimaqFlip(Image*dest,constImage*source,FlipAxisaxis);
PurposeFlipsanimageoveranaxis.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Theimagethatthefunctionflipsoveranaxis.axis FlipAxis Theaxistofliptheimageover.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqFlipFrequenciesUsageintimaqFlipFrequencies(Image*dest,constImage*source);
PurposeTransposesthehighandlowfrequenciesofacompleximage.
ImageTypesSupportedIMAQ_IMAGE_COMPLEX
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Thecompleximagewhosefrequenciesthe
functionflips.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetAngleUsageintimaqGetAngle(PointFloatstart1,PointFloatend1,PointFloatstart2,PointFloatend2,float*angle);
PurposeReturnstheangle,indegrees,betweentwolines.Thereturnedanglerepresentstherotationaroundstart1requiredsothatthelinefromstart1toend1isparallelwiththelinefromstart2toend2.Thefollowingfigureillustrateshowthefunctioncalculatestheanglebetweentwolines.
ParametersName Type Description
start1 PointFloat Thestartpointofthefirstline.end1 PointFloat Theendpointofthefirstline.start2 PointFloat Thestartpointofthesecondline.end2 PointFloat Theendpointofthesecondline.angle float* Onreturn,theangle,indegrees,betweenthelines.
ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetAVIInfoUsageintimaqGetAVIInfo(AVISessionsession,AVIInfo*info);
PurposeThisfunctiongetsinformationaboutanAVIfilethathasbeenopened.
ParametersName Type Description
session AVISession Thesessiontouse.info AVIInfo* Onreturn,theinformationabouttheAVIfile.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetBisectingLineUsageintimaqGetBisectingLine(PointFloatstart1,PointFloatend1,PointFloatstart2,PointFloatend2,PointFloat*bisectStart,PointFloat*bisectEnd);
PurposeComputesalinethatbisectstwolines.
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetBitDepthUsageintimaqGetBitDepth(constImage*image,unsignedint*bitDepth);
PurposeReturnsthebitdepthoftheimage.ThebitdepthofanimagedetermineshowNIVisiondisplays,saves,andconvertsimageswithmorethan8bitsperchannel.
ImageTypesSupportedIMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB_U64
ParametersName Type Description
image constImage* Theimagethefunctionqueriesthebitdepthfor.bitDepth unsigned
int*Onreturn,thebitdepthoftheimage.Abitdepthof0indicatesthatNIVisionisusingtheentirerangeoftheimagedatatype.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetBorderSizeUsageintimaqGetBorderSize(constImage*image,int*borderSize);
PurposeReturnsthebordersizeofthegivenimage.
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
ParametersName Type Description
image constImage* Theimagewhosebordersizethefunctionqueries.
borderSize int* Onreturn,thebordersizeoftheimage.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetBytesPerPixelUsageintimaqGetBytesPerPixel(constImage*image,int*byteCount);
PurposeReturnsthenumberofbytesthatasinglepixeloccupiesinthegivenimage.
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
ParametersName Type Description
image constImage* Theimagewhosebytesperpixelthefunctionqueries.
byteCount int* Onreturn,thenumberofbytesperpixel.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetCalibrationInfo2UsageCalibrationInfo*imaqGetCalibrationInfo2(constImage*image);
PurposeReturnscalibrationinformationassociatedwithanimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
image constImage* Theimagethefunctionreturnscalibrationinformationfor.
ReturnValueType Description
CalibrationInfo* Onsuccess,thisfunctionreturnsinformationdescribingthecalibrationoftheimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDispose().
imaqGetCharCountUsageintimaqGetCharCount(constCharSet*set);
PurposeReturnsthenumberoftrainedcharactersinacharacterset.
ParametersName Type Description
set constCharSet* Thecharactersetthisfunctionoperateson.Tocreateacharacterset,useimaqCreateCharSet().ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsthenumberoftrainedcharactersinthecharacterset.Onfailure,thisfunctionreturns—1.Togetextendederrorinformation,callimaqGetLastError().
imaqGetCharInfo2UsageCharInfo2*imaqGetCharInfo2(constCharSet*set,intindex);
PurposeReturnsinformationaboutaparticulartrainedcharacter.Thestructurethatthefunctionreturnscontainsacopyofthedatafromthecharacterset.Modificationstotheinformationinthestructuredonotaffectthecharacterset.
ParametersName Type Description
set constCharSet* Thecharactersetthisfunctionoperateson.Tocreateacharacterset,useimaqCreateCharSet().ThisparameterisrequiredandcannotbeNULL.
index int Theindexofatrainedcharacterinthecharactersetfromwhichthefunctiongetsinformation.
ReturnValueType Description
CharInfo2* Onsuccess,thisfunctionreturnsareportthatcontainsinformationaboutthecharacter.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyoufinishwiththecharacterinformation,callimaqDispose()todisposeofit.
imaqGetClassifierAccuracyUsageClassifierAccuracyReport*imaqGetClassifierAccuracy(constClassifierSession*session);
PurposeReturnsareportontheaccuracyofatrainedclassifier.
ParametersName Type Description
session constClassifierSession* Theclassifiersessionofwhichtogettheaccuracy.
ReturnValueType Description
ClassifierAccuracyReport* Onsuccess,thisfunctionreturnsareportontheaccuracyoftheclassifier.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeoftheinformationbycallingimaqDispose().
imaqGetClassifierSampleInfoUsageClassifierSampleInfo*imaqGetClassifierSampleInfo(constClassifierSession*session,intindex,int*numSamples);
PurposeGetsampleinformationfromaclassifiersession.
ParametersName Type Description
session constClassifierSession* Theclassifiersessiontouse.index int Theindexofthesampletoget
informationabout.Useavalueof–1togetonlythenumberofsamplesintheclassifiersession.
numSamples int* Onreturn,thetotalnumberofsamplesintheclassifiersession.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
ClassifierSampleInfo* Onsuccess,thisfunctionreturnsinformationaboutthespecifiedsample.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeoftheinformationbycallingimaqDispose().
imaqGetContourUsageContourIDimaqGetContour(constROI*roi,unsignedintindex);
PurposeReturnstheContourIDofthecontouratthespecifiedindexlocationwithinaregionofinterest(ROI).
ParametersName Type Description
roi constROI* TheROIcontainingthedesiredcontour.index unsignedint Thezero-offsetindexofthecontourtoget.
ReturnValueType Description
ContourID Onsuccess,thisfunctionreturnstheContourIDoftherequestedcontour.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetContourColorUsageintimaqGetContourColor(constROI*roi,ContourIDid,RGBValue*contourColor);
PurposeReturnsthecolorofacontour.
ParametersName Type Description
roi constROI* Theregionofinterest(ROI)containingthecontourfromwhichthefunctiongetscolorinformation.
id ContourID TheContourIDofthecontourfromwhichthefunctiongetscolorinformation.
contourColor RGBValue* Onreturn,thecolorofthecontour.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetContourCountUsageintimaqGetContourCount(constROI*roi);
PurposeReturnsthenumberofcontoursinaregionofinterest(ROI).
ParametersName Type Description
roi constROI* TheROIfromwhichthefunctiongetsthecontourcount.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsthenumberofcontoursintheROI.Onfailure,thisfunctionreturns–1.Togetextendederrorinformation,callimaqGetLastError().
imaqGetContourInfo2UsageContourInfo2*imaqGetContourInfo2(constROI*roi,ContourIDid);
PurposeReturnsinformationaboutaparticularcontour.Thestructurethatthefunctionreturnscontainsacopyofthedatafromthecontour.Modificationstotheinformationinthestructuredonotaffectthecontour.
ParametersName Type Description
roi constROI* Theregionofinterest(ROI)containingthecontourfromwhichthefunctiongetstheinformation.
id ContourID TheContourIDofthecontouraboutwhichthefunctiongetsinformation.
ReturnValueType Description
ContourInfo2* Onsuccess,thisfunctionreturnsapointertothestructurecontaininginformationabouttherequestedcontour.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisstructure,disposeofthepointerbycallingimaqDispose().
imaqGetCurrentToolUsageintimaqGetCurrentTool(Tool*currentTool);
PurposeReturnsthecurrentlyselectedtoolfromthetoolwindow.
ParametersName Type Description
currentTool Tool* Onreturn,containsthecurrentlyselectedtool.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetDistanceUsageintimaqGetDistance(PointFloatpoint1,PointFloatpoint2,float*distance);
PurposeComputesthedistancebetweentwopoints.
ParametersName Type Description
point1 PointFloat Thecoordinatelocationofthefirstpoint.point2 PointFloat Thecoordinatelocationofthesecondpoint.distance float* Onreturn,thedistancebetweenthetwopoints.
ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetErrorTextUsagechar*imaqGetErrorText(interrorCode);
PurposeReturnstheerrortextcorrespondingtoanerrorcode.Theerrortextisadescriptionofwhattheerrorcodesignifies.
ParametersName Type Description
errorCode int Theerrorcodewhoseerrortextthefunctionreturns.YoucanobtainthiserrorcodebycallingimaqGetLastError().
ReturnValueType Description
char* Thisfunctionreturnstheerrortextcorrespondingtotheerrorcodeinput.ThisfunctionreturnsUNKNOWN_ERRORifnoerrortextcorrespondstotheerrorcodeyouspecified.Whenyouarefinishedwiththisstring,disposeofitbycallingimaqDispose().
imaqGetFileInfoUsageintimaqGetFileInfo(constchar*fileName,CalibrationUnit*calibrationUnit,float*calibrationX,float*calibrationY,int*width,int*height,ImageType*imageType);
PurposeReturnsinformationregardingthecontentsofanimagefile.Youcanretrieveinformationfromthefollowingimagefileformats:PNG,JPEG,JPEG2000,TIFF,AIPD,andBMP.
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetFilterNamesUsageFilterName*imaqGetFilterNames(int*numFilters);
PurposeReturnsanarrayofthecompressionfiltersonthissystemavailabletobeusedtocreateAVIfiles.
ParametersName Type Description
numFilters int* Onreturn,thenumberoffiltersinthereturnedarray.
ReturnValueType Description
FilterName* Onsuccess,thisfunctionreturnsanarrayofnamesofcompressionfiltersthatareavailabletocompressAVIfilesonthissystem.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofitbycallingimaqDispose().
imaqGetGeometricFeaturesFromCurvesUsageFeatureData*imaqGetGeometricFeaturesFromCurves(constCurve*curves,unsignedintnumCurves,constFeatureType*featureTypes,unsignedintnumFeatureTypes,unsignedint*numFeatures);
PurposeReturnsthegeometricfeaturesdescribedbyasetofcurves.
ImageTypesSupportedIMAGE_U8
ParametersName Type Description
curves constCurve* Thearrayofcurvereports.UseimaqExtractCurves()togeneratethisarray.TheparameterisrequiredandcannotbeNULL.
numCurves unsignedint Thenumberofcurvesinthesuppliedcurvesarray.
featureTypes constFeatureType* Anarrayofthetypesofgeometricfeaturestoextractfromthepassedcurves.SetthisparametertoNULLtoextractallofthefeatures.
numFeatureTypes unsignedint ThesizeofthepassedfeatureTypesarray.
numFeatures unsignedint* Onreturn,thenumberoffeaturesdescribedbythecurves.SetthisparametertoNULLifyoudonotwishtoreturninformationaboutthenumberoffeaturesdescribedbythecurves.
ReturnValueType Description
FeatureData* Onsuccess,thisfunctionreturnsanarrayoffeaturesdescribedbythecurves.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().
imaqGetGeometricTemplateFeatureInfoUsageFeatureData*imaqGetGeometricTemplateFeatureInfo(constImage*pattern,unsignedint*numFeatures);
PurposeReturnsthegeometricfeaturesdescribedbythetemplate.
ImageTypesSupportedIMAGE_U8
ParametersName Type Description
pattern constImage* Thetemplatetoextractfeaturesfrom.numFeatures unsigned
int*Onreturn,thenumberoffeaturesdescribedbythetemplate.SetthisparametertoNULLifyoudonotwishtoreturninformationaboutthenumberoffeaturesdescribedbythetemplate.
ReturnValueType Description
FeatureData* Onsuccess,thisfunctionreturnsanarrayoffeaturesdescribedbythetemplate.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().
imaqGetImageInfoUsageintimaqGetImageInfo(constImage*image,ImageInfo*info);
PurposeReturnsthesize,border,type,calibration,andmemorylayoutofanimage.
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
ParametersName Type Description
image constImage* Theimagewhoseinformationthefunctionreturns.info ImageInfo* Onreturn,theinformationabouttheimage.This
parameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetImageSizeUsageintimaqGetImageSize(constImage*image,int*width,int*height);
PurposeReturnsthesizeofagivenimage.
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
ParametersName Type Description
image constImage* Theimagewhosesizethefunctionqueries.width int* Onreturn,thewidthoftheimage.Setthis
parametertoNULLifyoudonotneedthisinformation.
height int* Onreturn,theheightoftheimage.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetImageTypeUsageintimaqGetImageType(constImage*image,ImageType*type);
PurposeReturnsthetypeofthegivenimage.
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
ParametersName Type Description
image constImage* Theimagewhosetypethefunctionqueries.type ImageType* Onreturn,thetypeoftheimage.Thisparameteris
requiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetIntersectionUsageintimaqGetIntersection(PointFloatstart1,PointFloatend1,PointFloatstart2,PointFloatend2,PointFloat*intersection);
PurposeComputestheintersectionpointbetweentwolines.
ParametersName Type Description
start1 PointFloat Thestartpointofthefirstline.end1 PointFloat Theendpointofthefirstline.start2 PointFloat Thestartpointofthesecondline.end2 PointFloat Theendpointofthesecondline.intersection PointFloat* Onreturn,thecoordinatelocationofthe
intersectionofthetwolines.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetKernelUsageconstfloat*imaqGetKernel(KernelFamilyfamily,intsize,intnumber);
PurposeReturnsapointertoapredefinedconvolutionmatrix.YoucanusethereturnedpointerinconjunctionwithimaqConvolve().Youcannotdisposeoforalterthereturnedpointerbecauseitisareferencetostaticmemory.Ifyouneedtoalterthekernel,copythedatafromthesuppliedkerneltothememoryspaceyouhaveallocatedyourself.
ParametersName Type Description
family KernelFamily Thefamilyofthekernelmatrix.size int Thehorizontalandverticalmatrixsize.Valid
valuesare3,5,and7,correspondingtotheconvolutionmatrixsizesof3x3,5x5,and7x7.
number int Referencestheparticulardesiredmatrixamongthepredefinedmatricesthatareavailableforeachfamilyandsize.
ReturnValueType Description
constfloat* Onsuccess,thisfunctionreturnsapointertotherequestedmatrix.Thispointerpointstoconstantdatainmemorythatyoushouldnotalter.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().YoudonotneedtocallimaqDispose()onthepointer.
imaqGetLastErrorUsageintimaqGetLastError();
PurposeReturnstheerrorcodeofthelastNIVisionfunctionexecutedinthecallingthread.
ReturnValueType Description
int Thisfunctionreturnsthelasterrorcode.ThisfunctionreturnsERR_SUCCESSifthereisnopendingerror.
imaqGetLastErrorFuncUsageconstchar*imaqGetLastErrorFunc();
PurposeReturnsthenameofthefunctioninwhichthelasterroroccurred.
ReturnValueType Description
constchar* Thisfunctionreturnsthenameofthelastfunctionthatfailed.Thefunctionreturnsanemptystringifthereisnopendingerror.Whenyouarefinishedwiththereturnvalue,disposeofthestringbycallingimaqDispose().
imaqGetLastEventUsageintimaqGetLastEvent(WindowEventType*type,int*windowNumber,Tool*tool,Rect*rect);
PurposeReturnsthelasteventthattheuserperformedonanimagewindow.
NoteDonotusethisfunctionifyouhaveregisteredaneventcallbackwithimaqSetEventCallback().
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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.
imaqGetLastKeyUsageintimaqGetLastKey(char*keyPressed,int*windowNumber,int*modifiers);
PurposeReturnsthelastkeypressedinanactiveimagewindow.
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetLineUsagevoid*imaqGetLine(constImage*image,Pointstart,Pointend,int*numPoints);
PurposeReturnsthepixelvaluesalongagivenlineinanimage.Ifthestartingorendingpointofthelineisoutsidetheimage,thelineclipsatthelastvisiblepixel.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64
ParametersName Type Description
image constImage* Theimagecontainingalinewhosepixelsthefunctionreturns.
start Point Thecoordinatelocationofthestartingpointoftheline.
end Point Thecoordinatelocationoftheendingpointoftheline.
numPoints int* Thenumberofelementsinthereturnedarray.SetthisparametertoNULLifyoudonotneedthisinformation.
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().
imaqGetMaskOffsetUsageintimaqGetMaskOffset(constImage*image,Point*offset);
PurposeRetrievesthepointinthesourceimageatwhichthefunctionplacesthe(0,0)pixelofthemaskimage,assetbyimaqSetMaskOffset().
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
ParametersName Type Description
image constImage* Themaskimagethatthefunctionretrievestheoffsetfor.
offset Point* Onreturn,thecoordinateswherethefunctionappliesthemask.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetMeterArcUsageMeterArc*imaqGetMeterArc(intlightNeedle,MeterArcModemode,constROI*roi,PointFloatbase,PointFloatstart,PointFloatend);
PurposeReturnsthearcinformationofameter.imaqReadMeter()usesthisinformationtoreadameter.
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
required.IfmodeisIMAQ_METER_ARC_ROI,thefunctionignoresend.
ReturnValueType Description
MeterArc* Onsuccess,thisfunctionreturnsastructuredescribingthearcacrosswhichametersweeps.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofitbycallingimaqDispose().
imaqGetMidLineUsageintimaqGetMidLine(PointFloatrefLineStart,PointFloatrefLineEnd,PointFloatpoint,PointFloat*midLineStart,PointFloat*midLineEnd);
PurposeComputesthemidlinebetweenapointandareferenceline.Themidlineisthelinethatisparalleltothereferencelineandliesmidwaybetweenthepointandthereferenceline.
ParametersName Type Description
refLineStart PointFloat Thecoordinatelocationofthestartofthereferenceline.
refLineEnd PointFloat Thecoordinatelocationoftheendofthereferenceline.
point PointFloat Thecoordinatelocationofthepoint.midLineStart PointFloat* Onreturn,thecoordinatelocationofthestart
ofthemidline.ThisparameterisrequiredandcannotbeNULL.
midLineEnd PointFloat* Onreturn,thecoordinatelocationoftheendofthemidline.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetMousePosUsageintimaqGetMousePos(Point*position,int*windowNumber);
PurposeReturnsthemousecursorcoordinatesandwindownumberofthemostrecentinstancethatthemousecursorwaslocatedoveranactivewindow.
ParametersName Type Description
position Point* Onreturn,thecoordinatesofthemouseintheactiveimagewindow.SetthisparametertoNULLifyoudonotneedthisinformation.
windowNumber int* Onreturn,containsthewindownumberoftheactivewindow.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetNearestNeighborOptionsUsageintimaqGetNearestNeighborOptions(constClassifierSession*session,NearestNeighborOptions*options);
PurposeGetoptionsfromthenearestneighborenginethattheclassifiersessionwastrainedwith.
ParametersName Type Description
session constClassifierSession* Theclassifiersessionfromwhichtogettheoptions.
options NearestNeighborOptions* Onreturn,thenearestneighboroptions.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetOverlayPropertiesUsageintimaqGetOverlayProperties(Image*image,constchar*group,TransformBehaviors*transformBehaviors);
PurposeReturnstransformationbehaviorinformationforaspecifiedoverlaygroup.
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
ParametersName Type Description
image Image* Theimageforwhichyouwanttoreturnoverlayproperties.
group constchar* Specifiesanoverlaygroupnamewithintheimage.SetthisparametertoNULLtospecifyallgroups.
transformBehaviors TransformBehaviors* Describesthecurrentoverlaybehaviorwhenanimageistransformed.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetParticleClassifierOptionsUsageintimaqGetParticleClassifierOptions(constClassifierSession*session,ParticleClassifierPreprocessingOptions*preprocessingOptions,ParticleClassifierOptions*options);
PurposeGetoptionsfromaparticleclassifiersession.
ParametersName Type Description
session constClassifierSession* Theclassifiersessionfromwhichtogettheoptions.
preprocessingOptions ParticleClassifierPreprocessingOptions* Onreturn,theoptionsusedtoprocessparticlesbeforeclassification.SetthisparametertoNULLifyoudonotneedthisinformation.
options ParticleClassifierOptions* Onreturn,theoptionsusedtoclassifyparticles.SetthisparametertoNULLifyoudonotrequirethisinformation.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetPerpendicularLineUsageintimaqGetPerpendicularLine(PointFloatrefLineStart,PointFloatrefLineEnd,PointFloatpoint,PointFloat*perpLineStart,PointFloat*perpLineEnd,double*distance);
PurposeComputesalinethatpassesthroughapointandisperpendiculartoareferenceline.
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionperpLineStart,perpLineEnd—Ifpointliesonthereferenceline,perpLineStartisnotthesameaspoint.perpLineEndispoint,andperpLineStartliesonthelineperpendiculartothereferenceline.
imaqGetPixelUsageintimaqGetPixel(constImage*image,Pointpixel,PixelValue*value);
PurposeReturnsthevalueofapixelwithinanimage.
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
ParametersName Type Description
image constImage* Theimagewhosepixelvaluethefunctionqueries.pixel Point Thecoordinatesofthepixelthatthefunction
queries.value PixelValue* Onreturn,thevalueoftheimagepixel.This
parameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetPixelAddressUsagevoid*imaqGetPixelAddress(constImage*image,Pointpixel);
PurposeReturnstheaddressofagivenpixelinanimage.Iftherequestedpixellocationisoutsideoftheimage,thefunctionfailsandreturnsNULL.
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
ParametersName Type Description
image constImage* Theimagecontainingtherequestedpixel.pixel Point Thecoordinatesofthepixelwhosepointerthe
functionretrieves.
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().
imaqGetPointsOnContourUsageSegmentInfo*imaqGetPointsOnContour(constImage*image,int*numSegments);
PurposeFindsthenumberofedgesegmentsinanimageandreturnsthecoordinatesofthepixelsineachsegment.Anypixelthatisgreaterthanzeroisconsideredanedgelocation.Thisfunctiongroupsadjoiningedgepixelsintoedgesegments.Anedgesegmentisconsideredclosedifitformsaloop.Eachedgesegmentisgivenaweightbasedonthepixelgrayvaluesalongthatedge.Anedgesegmentwithhighgrayvalueshasahigherweight.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
image constImage* Theimageinwhichtofindthesegments.numSegments int* Onreturn,thenumberofsegmentsfound.
SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
SegmentInfo* Onsuccess,thisfunctionreturnsanarrayofinformationaboutthesegments.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDispose().
imaqGetPointsOnLineUsagePoint*imaqGetPointsOnLine(Pointstart,Pointend,int*numPoints);
PurposeGiventheendpointsofaline,thisfunctionreturnsallthepointscomprisingtheline.
ParametersName Type Description
start Point Thefirstpointoftheline.end Point Thelastpointoftheline.numPoints int* Onreturn,thenumberofpointsputintothereturned
array.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
Point* Onsuccess,thisfunctionreturnsanarrayofthepointsontheline.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisarray,disposeofitbycallingimaqDispose().
imaqGetPolygonAreaUsageintimaqGetPolygonArea(constPointFloat*points,intnumPoints,float*area);
PurposeComputestheareaofapolygondescribedbythecoordinatesofitsvertices.
ParametersName Type Description
points constPointFloat* Thearrayofpointsthatdescribethecoordinatelocationsoftheverticesofthepolygon.
numPoints int Thenumberofpointsinthesuppliedarray.Youmustsupplyatleastthreepoints.
area float* Onreturn,theareaofthepolygon.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetROIBoundingBoxUsageintimaqGetROIBoundingBox(constROI*roi,Rect*boundingBox);
PurposeReturnstheboundingrectanglefortheregionofinterest(ROI).TheboundingrectangleisthesmallestrectanglethatcontainsallofthecontoursthatcomprisetheROI.
ParametersName Type Description
roi constROI* TheROIfromwhichthefunctiongetstheboundingrectangleinformation.
boundingBox Rect* Onreturn,theboundingrectangle.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetROIColorUsageintimaqGetROIColor(constROI*roi,RGBValue*roiColor);
PurposeReturnsthecolorofaregionofinterest(ROI).
ParametersName Type Description
roi constROI* TheROIfromwhichthefunctiongetscolorinformation.
roiColor RGBValue* Onreturn,thecoloroftheROI.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetSystemWindowHandleUsagevoid*imaqGetSystemWindowHandle(intwindowNumber);
PurposeReturnstheWindowsHWNDforagivenNIVisionimagewindow.
ParametersName Type Description
windowNumber int ThewindownumberofthewindowwhoseHWNDtoretrieve.
ReturnValueType Description
void* Onsuccess,thisfunctionreturnstheWindowsHWNDforthewindow.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().
imaqGetToolWindowHandleUsagevoid*imaqGetToolWindowHandle();
PurposeReturnstheWindowsHWNDofthetoolwindow.
ReturnValueType Description
void* Onsuccess,thisfunctionreturnstheWindowsHWNDforthetoolwindow.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().
imaqGetToolWindowPosUsageintimaqGetToolWindowPos(Point*position);
PurposeRetrievesthecurrentlocationofthetoolwindow.ThefunctionbehavesinthesamemannerasimaqGetWindowPos().
ParametersName Type Description
position Point* Onreturn,thepositionoftheupperleftcornerofthetoolwindow.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetVisionInfoTypesUsageintimaqGetVisionInfoTypes(constImage*image,unsignedint*present);
PurposeRetrievesallthetypesofVisioninformationassociatedwithanimage.
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
ParametersName Type Description
image constImage* TheimagethatthefunctionchecksforthepresenceofVisioninformation.
present unsignedint*
Onreturn,thisparameterhasabitflagsetforeachVisioninformationtypepresentintheimage.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetWindowBackgroundUsageintimaqGetWindowBackground(intwindowNumber,WindowBackgroundFillStyle*fillStyle,WindowBackgroundHatchStyle*hatchStyle,RGBValue*fillColor,RGBValue*backgroundColor);
PurposeRetrievesthebackgroundstyleandcolorinformationforthedisplaywindow.
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetWindowCenterPosUsageintimaqGetWindowCenterPos(intwindowNumber,Point*centerPosition);
PurposeThisfunctiongetsthecurrentpositionoftheimageinthecenterofthegivenwindow.Thisfunctionisusefulfordeterminingwhatpixellocationtheuserclickedwhenyoudetectazoomevent.
ParametersName Type Description
windowNumber int Thenumberofthewindow.centerPosition Point* Onreturn,containsthecurrentpositionofthe
imageinthecenterofthegivenimagewindow.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetWindowDisplayMappingUsageintimaqGetWindowDisplayMapping(intwindowNum,DisplayMapping*mapping);
PurposeGetsthepixelmappingpolicyfordisplaying16-bitimagesofanunspecifiedbitdepth.16-bitgrayscaleimagescannotbedisplayedwiththeirfullresolutionon32-bitcolordisplaysusingcommonvideoadapterslimitedto8-bitresolution/perpixel/color.Youmustmap16-bitimagestothe8-bitrange(0to255).
ParametersName Type Description
windowNum int Thenumberofthewindowwhosepixelmappingpolicythefunctiongets.
mapping DisplayMapping* Onreturn,describesthemappingpolicyfortheselectedwindow.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetWindowGridUsageintimaqGetWindowGrid(intwindowNumber,int*xResolution,int*yResolution);
PurposeRetrievesthegridresolutionoftheimagewindow.Gridresolutionisthenumberofpixelsbetweengridlines.NIVisionusesthegridresolutionwhendrawingregionsofinterestonthewindowusingtoolsinthetoolwindow.Youcanusethegridtotracearegionofinterestaccurately.
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.xResolution int* Onreturn,thenumberofpixelsbetweengrid
linesinthexdirection.SetthisparametertoNULLifyoudonotneedthisinformation.
yResolution int* Onreturn,thenumberofpixelsbetweengridlinesintheydirection.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetWindowHandleUsageintimaqGetWindowHandle(int*handle);
PurposeReturnsanunusedwindownumber.YoucanusethewindownumberinconjunctionwithfunctionssuchasimaqDisplayImage().Thisfunctiondoesnotreservethewindownumberuntilyoucallafunctionthatusesthewindownumber.
ParametersName Type Description
handle int* Onreturn,anunusedwindownumber.Ifnounusedwindownumbersareavailable,thefunctionsetsthisparameterto–1.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetWindowPosUsageintimaqGetWindowPos(intwindowNumber,Point*position);
PurposeRetrievesthecurrentlocationofthegivenimagewindow.
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.position Point* Onreturn,thepositionoftheupperleftcorner
ofthegivenimagewindow.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetWindowROIUsageROI*imaqGetWindowROI(intwindowNumber);
PurposeRetrievesacopyoftheregionofinterest(ROI)associatedwithagivenimagewindow.
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.
ReturnValueType Description
ROI* Onsuccess,thisfunctionreturnsacopyoftheROIassociatedwiththegivenwindow.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().WhenyouarefinishedwiththeROI,disposeofitbycallingimaqDispose().
imaqGetWindowSizeUsageintimaqGetWindowSize(intwindowNumber,int*width,int*height);
PurposeRetrievesthesizeofagivenimagewindow.
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.width int* Onreturn,thewidthofthewindow.Setthis
parametertoNULLifyoudonotneedthisinformation.
height int* Onreturn,theheightofthewindow.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetWindowTitleUsagechar*imaqGetWindowTitle(intwindowNumber);
PurposeRetrievesthecurrenttitleofanimagewindow.
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.
ReturnValueType Description
char* Onsuccess,thisfunctionreturnsthetitleofthegivenwindow.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththetitle,disposeofitbycallingimaqDispose().
imaqGetWindowZoom2UsageintimaqGetWindowZoom2(intwindowNumber,float*xZoom,float*yZoom);
PurposeRetrievesthecurrentzoomfactorsforagivenimagewindow.Thezoomfactorindicatesanincreaseordecreaseinthemagnificationofanimageandthisvalueisexpressedasaratiooftheimagesize.Anumbergreaterthan1indicatesamagnificationbytheamountspecified.Forexample,azoomfactorof3indicatesthattheimageisdisplayedatthreetimesitsactualsize(3:1).Anumberlessthan1indicatesthattheimageisdecreasedinmagnificationbythespecifiedamount.Forexample,azoomfactorof0.2indicatesthattheimageisdisplayedatone-fifthitsactualsize(1:5).
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.xZoom float* Onreturn,thecurrentzoomfactorinthex
directionforthewindow.yZoom float* Onreturn,thecurrentzoomfactorinthey
directionforthewindow
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGrabUsageImage*imaqGrab(SESSION_IDsessionID,Image*image,intimmediate);
PurposeReturnsacopyofthecurrentimageinthegrabbuffer.Agrabperformsanacquisitionthatloopscontinuallyononebuffer.CallthisfunctiononlyaftercallingimaqSetupGrab().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
sessionID SESSION_ID AvalidsessionID.image Image* Apointertotheacquiredimage.Ifimageis
NULL,imaqGrab()createstheimageintowhichthefunctioncopiesthegrabbuffer.
immediate int Determinestheacquisitiontimingmethod.SetthisparametertoFALSEifyouwantthegraboperationtosynchronizeontheverticalblank.SettheparametertoTRUEifyouwantanimmediatetransfer.RefertotheNIVisionHardwareHelpformoreinformationaboutacquisitiontimingmethods.
ReturnValueType Description
Image* Onsuccess,thisfunctionreturnstheacquiredimage.IfyousetimagetoNULL,thefunctionreturnsanewimage.Otherwise,thefunctionreturnsapointertoimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().
imaqGradeDataMatrixBarcodeAIMUsageintimaqGradeDataMatrixBarcodeAIM(constImage*image,AIMGradeReport*report);
PurposeGradesaDataMatrixbarcodeusingtheAIMPrintQualitymetrics(includedintheISO16022specification).
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
image constImage* TheimagecontainingtheDataMatrixbarcodetograde.YoumustfirstpreparethisimageforgradingusingimaqReadDataMatrixBarcode2().
report AIMGradeReport* Uponreturn,theAIMstandardgradesfortheDataMatrixbarcodeandtherawscoresusedtoderivethegrades.IfaDataMatrixbarcodecannotbelocatedbyimaqReadDataMatrixBarcode2(),thefunctionassignsthebarcodeIMAQ_AIM_GRADE_Fforallgradesand0forallrawscores.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGrayMorphologyUsageintimaqGrayMorphology(Image*dest,Image*source,MorphologyMethodmethod,constStructuringElement*structuringElement);
PurposeAppliesmorphologicaltransformationstograylevelimages.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
dest Image* Thedestinationimage.source Image* Theimageonwhichthe
functionperformsthemorphologicaloperation.Thecalculationmodifiestheborderofthesourceimage.Thebordermustbeatleasthalfaslargeasthelargerofthedimensionsofthestructuringelement.
method MorphologyMethod Themorphologicaltransformationtoapply.
structuringElement constStructuringElement* Thestructuringelementusedintheoperation.SetthisparametertoNULLifyoudonotwantacustomstructuringelement.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqHistogramUsageHistogramReport*imaqHistogram(constImage*image,intnumClasses,floatmin,floatmax,constImage*mask);
PurposeCalculatesthehistogram,orpixeldistribution,ofanimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
HistogramReport* Onsuccess,thisfunctionreturnsareportdescribingthepixelvalueclassification.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereport,disposeofitbycallingimaqDispose().
ParameterDiscussionmin—Settingbothminandmaxto0causesthefunctiontosetminto0for8-bitimagesandtotheactualminimumvalueoftheimageforallotherimagetypes.max—Settingbothminandmaxto0causesthefunctiontosetmaxto255for8-bitimagesandtotheactualmaximumvalueoftheimageforallotherimagetypes.
imaqImageToArrayUsagevoid*imaqImageToArray(constImage*image,Rectrect,int*columns,int*rows);
PurposeCreatesatwo-dimensionalarrayfromanimage.
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
ParametersName Type Description
image constImage* Theimagefromwhichthefunctionmakesthearray.
rect Rect Specifiesarectangularregionoftheimagetoreturn.SetthisparametertoIMAQ_NO_RECTifyouwantthefunctiontoreturnthewholeimage.
columns int* Thenumberofcolumnsinthereturnedarray.SetthisparametertoNULLifyoudonotneedthisinformation.
rows int* Thenumberofrowsinthereturnedarray.SetthisparametertoNULLifyoudonotneedthisinformation.
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().
imaqImageToClipboardUsageintimaqImageToClipboard(constImage*image,constRGBValue*palette);
PurposeCopiesanimageontotheclipboard.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB
ParametersName Type Description
image constImage* Theimagetocopyontotheclipboard.palette constRGBValue* Anoptionalpalettetoassociatewith8-bit
images.IfthisparameterisnotNULL,itmustpointtoanarrayof256colors,whichrepresentthecolorpalettethatthefunctionassociateswiththeimage.IfthisparameterisNULL,thefunctionassociatesagrayscalepalettewiththeimage.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqInterlaceCombineUsageintimaqInterlaceCombine(Image*frame,constImage*odd,constImage*even);
PurposeCombinestwofieldimagestocreateasingleframeimage.
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
ParametersName Type Description
frame Image* Onreturn,thecombinedimage.odd constImage* Theoddfield.even constImage* Theevenfield.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqInterlaceSeparateUsageintimaqInterlaceSeparate(constImage*frame,Image*odd,Image*even);
PurposeSeparatesaframeimageintotwofieldimages.
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
ParametersName Type Description
frame constImage* Theframeimagethatthefunctionseparatesintooddandevenfields.
odd Image* Theimageintowhichthefunctionplacestheoddfieldoftheframearea.SetthisparametertoNULLifyoudonotneedtheoddfield.
even Image* Theimageintowhichthefunctionplacestheevenfieldoftheframearea.SetthisparametertoNULLifyoudonotneedtheevenfield.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqInterpolatePointsUsagefloat*imaqInterpolatePoints(constImage*image,constPoint*points,intnumPoints,InterpolationMethodmethod,intsubpixel,int*interpCount);
PurposeInterpolatesthepixelvaluesofanimageoverspecifiedpoints.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
float* Onsuccess,thisfunctionreturnsanarrayoftheinterpolatedvalues.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisarray,disposeofitbycallingimaqDispose().
imaqInverseUsageintimaqInverse(Image*dest,constImage*source,constImage*mask);
PurposeInvertsthepixelintensitiesofanimageusingthefollowingequation:f(p)=dynamicMax-p+dynamicMinwhereprepresentsthevalueofapixel.dynamicMinrepresents0(8-bitimages)orthesmallestpixelvalueinthesourceimage(16-bitandfloatingpointimages).dynamicMaxrepresents255(8-bitimages)orthelargestpixelvalueinthesourceimage(16-bitandfloatingpointimages).
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Theimagetoinvert.mask constImage* Anoptionalmaskimage.Thisimagemustbean
IMAQ_IMAGE_U8image.Thefunctioninvertsonlythosepixelsinthesourceimagewhosecorrespondingpixelsinthemaskarenon-zero.SetthisparametertoNULLtoinvertthepixelintensitiesoftheentiresourceimage.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqInverseFFTUsageintimaqInverseFFT(Image*dest,constImage*source);
PurposeTakestheinverseFouriertransformofanimage.Thedestinationimagemustbedifferentthanthesourceimagetoperformthisoperation.
ImageTypesSupportedIMAQ_IMAGE_COMPLEX
ParametersName Type Description
dest Image* Thedestinationimage.ValidimagetypesareIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,orIMAQ_IMAGE_COMPLEX.Thedestinationimagemustbedifferentfromthesourceimage.
source constImage* TheimagewhoseinverseFouriertransformthefunctiontakes.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqIsImageEmptyUsageintimaqIsImageEmpty(constImage*image,int*empty);
PurposeTeststoseeifthesuppliedimageisempty.Anemptyimageisanimagethatcontainsonlypixelswithavalueequaltozero.UsethisfunctioninconjunctionwithimaqCompare()andimaqCompareConstant()toseeifthecompareoperationclearedallofthepixelsinanimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image constImage* Theimagethatthefunctionchecksforemptiness.empty int* Onreturn,thisparameterequalsTRUEiftheimage
isemptyandFALSEiftheimagecontainspixelswithvaluesotherthan0.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqIsToolWindowVisibleUsageintimaqIsToolWindowVisible(int*visible);
PurposeRetrieveswhetherthetoolwindowisvisible.ThisfunctionbehavesinthesamemannerasimaqIsWindowVisible().
ParametersName Type Description
visible int* Onreturn,thisparameterisTRUEifthetoolwindowisvisibleandFALSEifthetoolwindowishidden.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqIsWindowNonTearingUsageintimaqIsWindowNonTearing(intwindowNumber,int*nonTearing);
PurposeGetsthecurrentnon-tearingstatusofthedisplaywindow.Formoreinformationonnon-tearing,refertoimaqSetWindowNonTearing().
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.nonTearing int* Onreturn,thisparameterisTRUEifthegiven
windowisnon-tearingandFALSEifthewindowisoperatingnormally.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqIsWindowVisibleUsageintimaqIsWindowVisible(intwindowNumber,int*visible);
PurposeRetrieveswhetherthegivenwindowisvisible.
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.visible int* Onreturn,thisparameterisTRUEifthegiven
windowisvisibleandFALSEifthewindowishidden.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqLabel2UsageintimaqLabel2(Image*dest,Image*source,intconnectivity8,int*particleCount);
PurposeLabelstheparticlesinabinaryimagebyapplyingauniquevaluetoallpixelswithinaparticle.Thisvalueisencodedin8or16bits,dependingontheimagetype.Thefunctioncanlabel255particlesinan8-bitimageand65,535particlesina16-bitimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqLearnCalibrationGridUsageintimaqLearnCalibrationGrid(Image*image,constROI*roi,constLearnCalibrationOptions*options,constGridDescriptor*grid,constCoordinateSystem*system,constRangeFloat*range,float*quality);
PurposeLearnsacalibrationfromanimageofagridofcircles.Thefunctionattachescalibrationinformationtothegridimage,whichyoucanthenusewithimaqCopyCalibrationInfo2()tocalibrateanuncalibratedimage.RefertoChapter6,CalibratingImages,oftheNIVisionforLabWindows/CVIUserManual.formoreinformationaboutcreatingagridimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16
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
mapping,butinsteadreflectshowwellthecalibrationmappingadaptstothelearnedgrid.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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
imaqLearnCalibrationPointsUsageintimaqLearnCalibrationPoints(Image*image,constCalibrationPoints*points,constROI*roi,constLearnCalibrationOptions*options,constGridDescriptor*grid,constCoordinateSystem*system,float*quality);
PurposeLearnsacalibrationfromasetofpixelcoordinatesandcorrespondingreal-worldcoordinates.Afterremovingcoordinatesoutsidetheoptionalregionofinterest(ROI),thefunctionrequiresatleastfourpixelcoordinatesandfourreal-worldcoordinatestosuccessfullylearnthecalibrationinformation.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
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
reflecttheabsoluteaccuracyoftheestimatedcalibrationmapping,butinsteadreflectshowwellthecalibrationmappingadaptstothelearnedpoints.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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
imaqLearnColorUsageColorInformation*imaqLearnColor(constImage*image,constROI*roi,ColorSensitivitysensitivity,intsaturation);
PurposeExtractsthecolorfeaturesofanimage.UsethesefeaturesforcolormatchingwithimaqMatchColor().
ImageTypesSupportedIMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
image constImage* Theimagecontainingthecolorinformationtolearn.
roi constROI* Theregionaboutwhichthefunctionlearnsthecolorinformation.SetthisparametertoNULLtolearncolorinformationaboutthewholeimage.
sensitivity ColorSensitivity Specifiesthesensitivityofthecolorinformationintheimage.
saturation int Setsathresholdvaluewhichthefunctionusestoseparatecolorswithsimilarhues.Thefunctionclassifiescolorsbelowthegivensaturationvalueseparatelyfromcolorsabovethegivensaturationvalue.
ReturnValueType Description
ColorInformation* Onsuccess,thisfunctionreturnsacolorinformationstructurewhichyoucanpassintoimaqMatchColor().Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisstructure,disposeofitbycallingimaqDispose().
imaqLearnColorPatternUsageintimaqLearnColorPattern(Image*image,constLearnColorPatternOptions*options);
PurposePreparesanimageforuseasacolortemplateforimaqMatchColorPattern().Ifyouchangethecolortemplateimageaftercallingthisfunction,youmustcallthefunctionagaintolearnthemodifiedimage.
ImageTypesSupportedIMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
image Image* Theimageaboutwhichthefunctionlearnspatternmatchinginformation.Thefunctionappendsthepatternmatchinginformationtotheimage.
options constLearnColorPatternOptions* Describestheinformationthealgorithmlearnsaboutthecolorpattern.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:
learnMode IMAQ_LEARN_SHIFT_INFORMATIONfeatureMode IMAQ_COLOR_AND_SHAPE_FEATURESthreshold 80ignoreMode IMAQ_IGNORE_NONEcolorsToIgnore NULL(Useallcolors)numColorsToIgnore 0
imaqLearnGoldenTemplateUsageintimaqLearnGoldenTemplate(Image*goldenTemplate,PointFloatoriginOffset,constImage*mask);
PurposePreparesanimageforuseinimaqCompareGoldenTemplate().
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
goldenTemplate Image* Thegoldentemplatetolearnforinspection.
originOffset PointFloat Specifiesthenumberofpixelsthefunctionshiftstheoriginofthetemplatefromthecenterofthetemplateimage.SetthisparametertoIMAQ_NO_OFFSETtousethecenterofthetemplateimageastheoriginofthetemplate.
mask constImage* Anoptional,8-bitimageofthesamesizeasthetemplatethatspecifieswhatregionsandedgestoignoreinthetemplate.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionmask—Useoneormoreofthefollowingpixelvalueswhenconstructingthemask:0–Maintainsthedefaultbehavior.1–Thecorrespondingpixelinthetemplateimageshouldalwaysbeignored.2–ThecorrespondingpixelinthetemplateimageisanedgeandshouldbedilatedaccordingtotheedgeThicknessToIgnoreelementoftheoptionsparameterofimaqCompareGoldenTemplate().
imaqLearnGeometricPatternUsageintimaqLearnGeometricPattern(Image*image,PointFloatoriginOffset,constCurveOptions*curveOptions,constLearnGeometricPatternAdvancedOptions*advancedLearnOptions,constImage*mask);
PurposeCreatesadescriptionofthetemplateimageyouwanttosearchforduringthematchingphase.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
image Image* Theimageaboutwhichthefunctionlearnspatternmatchinginformation.Thefunctionappendsthepatternmatchinginformationtothisimage.
originOffset PointFloat Specifiesthenumberofpixelsthefunctionshiftstheoriginofthetemplatefromthecenterofthetemplateimage.TheoriginofthetemplateisusedbyimaqMatchGeometricPattern()tosetthetheresultingGeometricPatternMatchstructforeachtemplatematchwithinatargetimage.SetthisparametertoIMAQ_NO_OFFSETtousethecenterofthetemplateimageastheoriginofthetemplate.
curveOptions constCurveOptions* Describeshowthefunctionidentifiesthecurvesintheimagethefunctionwillusetocreatethetemplateimage.ThisfunctiondoesnotsupportidentifyingcurveswithsubpixelaccuracyandthereforeignoresthesubpixelAccuracyofthisparameter.
advancedLearnOptions constLearnGeometricPatternAdvancedOptions* Advancedoptionsfordeterminingtheinformationthealgorithmlearnsaboutthegeometricpattern.
mask constImage* Anoptionalimage,whichisthesamesizeasthetemplate,thatspecifieswheretosearchforcurvesinthetemplate.IMAQ_IMAGE_U8image.Toallowthefunctiontoprocessallofthepixelstodetermineifthepixelscontaincurves,setthisparametertoNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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
partofacurve.4–ThecorrespondingpixelinthetemplateimageisnotusedbyimaqMatchGeometricPattern()whencomputingthecorrelationScorereturnedforeachmatch.Youcancombinethispixelvaluewithvalues1or2tocontrolboththecurvedetectionandscoringforthecorrespondingpixel.
imaqLearnMultipleGeometricPatternsUsageMultipleGeometricPattern*imaqLearnMultipleGeometricPatterns(constImage**patterns,unsignedintnumberOfPatterns,constString255*labels);
PurposeCombinesthedescriptionsofthepatternsyouwanttosearchforduringthematchingphaseintoamultiplegeometrictemplate.Usethemultiplegeometrictemplatetosearchforthesetemplatesimagesinthetargetimage.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
patterns constImage** Thearrayofpatternsyouwanttosearchforinthetargetimage.NIVisionmustlearneachofthetemplateimagesinthearrayusingimaqLearnGeometricPattern()beforeusingitinthisfunction.
numberOfPatterns unsignedint Thenumberofpatternsinpatterns.
labels constString255* Thearrayoflabelsthatidentifythepatterns.ThesizeofthisarraymustbeequaltonumberOfPatterns.
ReturnValueType Description
MultipleGeometricPattern* Onsuccess,thisfunctionreturnsamultiplegeometrictemplate.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().
imaqLearnPattern3UsageintimaqLearnPattern3(Image*image,LearningModelearningMode,LearnPatternAdvancedOptions*advancedOptions,constImage*mask);
PurposeCreatesadescriptionofthetemplateimageyouwanttosearchforduringthematchingphase.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
image Image* Theimageaboutwhichthefunctionlearnspatternmatchinginformation.Thefunctionappendsthepatternmatchinginformationtotheimage.
learningMode LearningMode Themodeinwhichthefunctionlearnsthetemplateimage.
advancedOptions LearnPatternAdvancedOptions* Advancedoptionstothealgorithm.
mask constImage* Anoptionalmaskimage.ThisimagemustbeanIMAQ_IMAGE_U8image.Thefunctionlearnsonlythosepixelsinthesourceimagewhosecorrespondingpixelsinthemaskarenon-zero.SetthisparametertoNULLtolearnthewholeimage.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqLightMeterLineUsageLineProfile*imaqLightMeterLine(Image*image,Pointstart,Pointend,intshowMeasurement,constCoordinateTransform2*transform);
PurposeMeasuresthepixelintensitiesonalineofanimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image Image* Theimagethatthefunctionusesforintensitymeasurement.
start Point Thecoordinatelocationofthestartoftheline.
end Point Thecoordinatelocationoftheendoftheline.
showMeasurement int SetthisparametertoTRUEtooverlaythelocationoftheintensitymeasurementontheimage.SetthisparametertoFALSEtoleavetheimageunmodified.
transform constCoordinateTransform2* Anoptionalspecificationofthecoordinatetransformfortheline.Thisparameterspecifieshowtotransformthelocationoftheintensitymeasurementbasedonthedifferencebetweenthereferencecoordinatesystemandthemeasurementcoordinatesystem.SetthisparametertoNULLifyoudonot
needtotransformtheline.
ReturnValueType Description
LineProfile* Onsuccess,thisfunctionreturnsareportcontaininginformationabouttheline.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththelineprofile,disposeofitbycallingimaqDispose().
imaqLightMeterPointUsageintimaqLightMeterPoint(Image*image,Pointpoint,intshowMeasurement,float*intensity,constCoordinateTransform2*transform);
PurposeMeasuresthepixelintensitiesina3x3pixelneighborhoodcenteredonapointofanimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image Image* Theimagethatthefunctionusesforintensitymeasurement.
point Point Thecoordinatelocationoftheintensitymeasurement.Theintensitymeasurementismadeina3x3blockcenteredonthepoint.
showMeasurement int SetthisparametertoTRUEtooverlaythelocationoftheintensitymeasurementontheimage.SetthisparametertoFALSEtoleavetheimageunmodified.
intensity float* Onreturn,theaverageintensityofthepixelsina3x3neighborhoodcenteredonthepoint.ThisparameterisrequiredandcannotbeNULL.
transform constCoordinateTransform2* Anoptionalspecificationofthecoordinatetransformforpoint.Thisparameterspecifieshowtotransformthe
locationoftheintensitymeasurementbasedonthedifferencebetweenthereferencecoordinatesystemandthemeasurementcoordinatesystem.SetthisparametertoNULLifyoudonotneedtotransformpoint.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqLightMeterRectUsageHistogramReport*imaqLightMeterRect(Image*image,RotatedRectrect,intshowMeasurement,constCoordinateTransform2*transform);
PurposeMeasuresthepixelintensitiesinarectangleofanimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image Image* Theimagethatthefunctionusesforintensitymeasurement.
rect RotatedRect Thecoordinatelocationoftherectangularareaoftheintensitymeasurement.
showMeasurement int SetthisparametertoTRUEtooverlaythelocationoftheintensitymeasurementontheimage.SetthisparametertoFALSEtoleavetheimageunmodified.
transform constCoordinateTransform2* Anoptionalspecificationofthecoordinatetransformforrect.Thisparameterspecifieshowtotransformthelocationoftheintensitymeasurementbasedonthedifferencebetweenthereferencecoordinatesystemandthemeasurementcoordinatesystem.SetthisparametertoNULLifyoudonotneedtotransform
rect.
ReturnValueType Description
HistogramReport* Onsuccess,thisfunctionreturnsareportdescribingthepixelvalueclassification.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereport,disposeofitbycallingimaqDispose().
imaqLinearAverages2UsageLinearAverages*imaqLinearAverages2(Image*image,LinearAveragesModemode,Rectrect);
PurposeComputesthemeanlineprofileofanimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image Image* Theimageonwhichthefunctioncalculatespixelvalueaverages.
mode LinearAveragesMode Thetypesoflinearaveragesthefunctionshouldcompute.
rect Rect Setstherectangularareainwhichthefunctioncalculatestheaverages.SetthisparametertoIMAQ_NO_RECTtocalculatetheaveragesonthewholeimage.
ReturnValueType Description
LinearAverages* Onsuccess,thisfunctionreturnsastructurecontainingthelinearaveragesoftheimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().
imaqLineGaugeTool2UsageintimaqLineGaugeTool2(constImage*image,Pointstart,Pointend,LineGaugeMethodmethod,constEdgeOptions*edgeOptions,constCoordinateTransform2*transform,float*distance);
PurposeMeasuresthedistancebetweenselectededgesofalinewithhigh-precisionsubpixelaccuracy.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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
points.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqLineProfileUsageLineProfile*imaqLineProfile(constImage*image,Pointstart,Pointend);
PurposeComputestheprofileofalineofpixels.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image constImage* Theimagecontainingalinewhoseprofilethefunctioncomputes.
start Point Thefirstpointoftheline.end Point Thelastpointoftheline.
ReturnValueType Description
LineProfile* Onsuccess,thisfunctionreturnsareportcontaininginformationabouttheline.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththelineprofile,disposeofitbycallingimaqDispose().
imaqLoadImagePopupUsagechar**imaqLoadImagePopup(constchar*defaultDirectory,constchar*defaultFileSpec,constchar*fileTypeList,constchar*title,intallowMultiplePaths,ButtonLabelbuttonLabel,intrestrictDirectory,intrestrictExtension,intallowCancel,intallowMakeDirectory,int*cancelled,int*numPaths);
PurposeDisplaysafileselectiondialogboxthatpreviewsimagesandwaitsfortheusertoselectanimagefile(s)orclickCancel.
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
forcetheusertomakeaselectionbeforeclosingthedialogbox.
allowMakeDirectory int SetthisparametertoTRUEtoallowtheusertomakeanewdirectoryfromwithinthedialogbox.SetthisparametertoFALSEtopreventtheuserfrommakinganewdirectory.
cancelled int* Onreturn,specifieswhethertheusercancelledthedialogbox.SetthisparametertoNULLifyoudonotneedthisinformation.
numPaths int* Onreturn,thenumberoffilestheuserselected.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
char** Onsuccess,thisfunctionreturnsanarrayoffilepathsthattheuserselected.ThearraycontainsanumberofstringsequaltothevalueofnumPaths.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththearray,disposeofitbycallingimaqDispose().
imaqLocalThresholdUsageintimaqLocalThreshold(Image*dest,constImage*source,unsignedintwindowWidth,unsignedintwindowHeight,LocalThresholdMethodmethod,doubledeviationWeight,ObjectTypetype,floatreplaceValue);
PurposeAutomaticallythresholdsanimageintoabinaryimagebasedontherequestedlocaladaptivethresholdingmethod.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16
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.
type ObjectType Specifiesthetypeofobjectsforwhichyouwanttolook.
replaceValue float Specifiesthereplacementvaluethefunctionusesforthepixelsofthekeptobjectsinthedestinationimage.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionwindowWidth,windowHeight—Thewindowshouldbesizedaslargeaspossiblebutsmallenoughthateachwindowcontainspixelsundersimilarlightingconditions.Thefunctionwillproduceinconsistentresultsforwindowsthatcontainuniformpixelvalues.
imaqLogicalDifferenceUsageintimaqLogicalDifference(Image*dest,constImage*sourceA,constImage*sourceB);
PurposeComputesabitwiselogicaldifference(AANDNOTB)betweentwoimages.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
dest Image* Thedestinationimage.sourceA constImage* Thefirstsourceimage.sourceB constImage* Thesecondsourceimage,whichmustbethe
sametypeofimageassourceA.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqLogicalDifferenceConstantUsageintimaqLogicalDifferenceConstant(Image*dest,constImage*source,PixelValuevalue);
PurposePerformsabitwiselogicaldifference(AANDNOTB)betweenanimageandaconstant.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Thesourceimage.value PixelValue ThevaluetoANDNOTtothesourceimage.Set
thememberofvaluethatcorrespondstotheimagetype.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqLookupUsageintimaqLookup(Image*dest,constImage*source,constshort*table,constImage*mask);
PurposePerformsatransformationonanimagebyreplacingeachpixelvaluewiththelookuptableentrycorrespondingtothatvalue.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqLowPassUsageintimaqLowPass(Image*dest,Image*source,intwidth,intheight,floattolerance,constImage*mask);
PurposeFiltersanimageusinganon-linearfilter.Foreachpixel,thealgorithmconsiderstheneighborhoodspecifiedbythegivenfiltersizes.Ifthecurrentpixelvaluevariesfromthevalueofitsneighborsmorethanthespecifiedtolerance,thefunctionsetsthepixelvaluetotheaveragevalueofitsneighborhood.Ifthecurrentpixelvaluevariesfromthevalueofitsneighborslessthanthespecifiedtolerance,thefunctiondoesnotchangethevalueofthepixel.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqMagicWandUsageintimaqMagicWand(Image*dest,constImage*source,Pointcoord,floattolerance,intconnectivity8,floatreplaceValue);
PurposeCreatesamaskofaparticleinanimagebyselectingaparticleatthegivenlocationandsettingallthepixelsofthatparticletoaspecifiedvalue.Thefunctionsetsallotherpixelvaluesto0.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqMakeAnnulusUsageAnnulusimaqMakeAnnulus(Pointcenter,intinnerRadius,intouterRadius,doublestartAngle,doubleendAngle);
PurposeReturnsanAnnulusstructurewiththevaluesyouspecify.TheAnnulusstructuredefinesthelocationandsizerotationofanannulus.YoucanembedacalltoimaqMakeAnnulus()incallstootherNIVisionfunctionsthatrequireAnnulusstructuresasinputparameters,therebyeliminatingtheneedtodeclareanAnnulusvariable.
ParametersName Type Description
center Point Thelocationofthecenteroftheannulus.innerRadius int Theinternalradiusoftheannulus.outerRadius int Theexternalradiusoftheannulus.startAngle double Thestartangle,indegrees,oftheannulus.endAngle double Theendangle,indegrees,oftheannulus.
ReturnValueType Description
Annulus ThisfunctionreturnsanAnnulusstructurecontainingthecoordinatevaluesyouspecify.
imaqMakePointUsagePointimaqMakePoint(intxCoordinate,intyCoordinate);
PurposeReturnsaPointstructurewiththevaluesyouspecify.ThePointstructuredefinesthelocationofapoint.YoucanembedacalltoimaqMakePoint()incallstootherNIVisionfunctionsthatrequirePointstructuresasinputparameters,therebyeliminatingtheneedtodeclareaPointvariable.
ParametersName Type Description
xCoordinate int Horizontallocationofthepoint.yCoordinate int Verticallocationofthepoint.
ReturnValueType Description
Point ThisfunctionreturnsaPointstructurecontainingthecoordinatevaluesyouspecify.
imaqMakePointFloatUsagePointFloatimaqMakePointFloat(floatxCoordinate,floatyCoordinate);
PurposeReturnsaPointFloatstructurewiththevaluesyouspecify.ThePointFloatstructuredefinesthelocationofapoint.YoucanembedacalltoimaqMakePointFloat()incallstootherNIVisionfunctionsthatrequirePointFloatstructuresasinputparameters,therebyeliminatingtheneedtodeclareaPointFloatvariable.
ParametersName Type Description
xCoordinate float Horizontallocationofthepoint.yCoordinate float Verticallocationofthepoint.
ReturnValueType Description
PointFloat ThisfunctionreturnsaPointFloatstructurecontainingthecoordinatevaluesyouspecify.
imaqMakeRectUsageRectimaqMakeRect(inttop,intleft,intheight,intwidth);
PurposeReturnsaRectstructurewiththevaluesyouspecify.TheRectstructuredefinesthelocationandsizeofarectangle.YoucanembedacalltoimaqMakeRect()incallstootherNIVisionfunctionsthatrequireRectstructuresasinputparameters,therebyeliminatingtheneedtodeclareaRectvariable.IfyouareusingLabWindows/CVI,notethatthisfunctionduplicatesthefunctionalityoftheLabWindows/CVIfunctionMakeRect().
ParametersName Type Description
top int Locationofthetopedgeoftherectangle.left int Locationoftheleftedgeoftherectangle.height int Heightoftherectangle.width int Widthoftherectangle.
ReturnValueType Description
Rect ThisfunctionreturnsaRectstructurecontainingthecoordinatevaluesyouspecify.
imaqMakeRectFromRotatedRectUsageRectimaqMakeRectFromRotatedRect(RotatedRectrotatedRect);
PurposeReturnsaRectstructurethatrepresentstheboundingrectangleoftherotatedrectanglewiththevaluesyouspecify.Notethatifyousupplyarotatedrectanglewithanangleotherthan0,90,180,or270degrees,thefunctionreturnsaboundingrectanglelargerthentherotatedrectangle.YoucanembedacalltoimaqMakeRectFromRotatedRect()incallstootherNIVisionfunctionsthatrequireRectstructuresasinputparameters,therebyeliminatingtheneedtodeclareaRectvariable.
ParametersName Type Description
rotatedRect RotatedRect Therotatedrectangleforwhichthefunctionreturnstheboundingrectangle.
ReturnValueType Description
Rect ThisfunctionreturnsaRectstructurerepresentingtheboundingboxoftherotatedrectangleyouspecify.
imaqMakeRotatedRectUsageRotatedRectimaqMakeRotatedRect(inttop,intleft,intheight,intwidth,doubleangle);
PurposeReturnsaRotatedRectstructurewiththevaluesyouspecify.TheRotatedRectstructuredefinesthelocation,size,androtationofarectangle.YoucanembedacalltoimaqMakeRotatedRect()incallstootherNIVisionfunctionsthatrequireRotatedRectstructuresasinputparameters,therebyeliminatingtheneedtodeclareaRotatedRectvariable.
ParametersName Type Description
top int Locationofthetopedgeoftherectanglebeforerotation.left int Locationoftheleftedgeoftherectanglebeforerotation.height int Heightoftherectangle.width int Widthoftherectangle.angle double Therotation,indegrees,oftherectangle.
ReturnValueType Description
RotatedRect ThisfunctionreturnsaRotatedRectstructurecontainingthecoordinatevaluesyouspecify.
imaqMakeRotatedRectFromRectUsageRotatedRectimaqMakeRotatedRectFromRect(Rectrect);
PurposeReturnsaRotatedRectstructureequivalentinsizeandlocationtotherectangleyouspecify.Theangleoftheresultingrotatedrectangleisalwayszero.TheRotatedRectstructuredefinesthelocation,size,androtationofarectangle.YoucanembedacalltoimaqMakeRotatedRect()incallstootherNIVisionfunctionsthatrequireRotatedRectstructuresasinputparameters,therebyeliminatingtheneedtodeclareaRotatedRectvariable.
ParametersName Type Description
rect Rect Therectanglethefunctionconvertsintoarotatedrectangle.
ReturnValueType Description
RotatedRect ThisfunctionreturnsaRotatedRectequivalentinsizeandlocationtotherectangleyouspecify.
imaqMaskUsageintimaqMask(Image*dest,constImage*source,constImage*mask);
PurposeCopiesthesourceimagetothedestinationimageinthefollowingmanner:Ifapixelinthemaskhasavalueof0,thefunctionsetsthecorrespondingsourcepixelto0.Otherwise,thefunctioncopiesthecorrespondingsourcepixeltothedestinationimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Thesourceimage.mask constImage* Themaskimage.Thisimagemustbean
IMAQ_IMAGE_U8image.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqMaskToROIUsageROI*imaqMaskToROI(constImage*mask,int*withinLimit);
PurposeTransformsamaskimageintoaregionofinterest(ROI)descriptor.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
mask constImage* ThemaskimagethatthefunctiontransformsintoaROI.ThisimagemustbeanIMAQ_IMAGE_U8image.
withinLimit int* Onreturn,thisparameterindicateswhethertheROIisatruerepresentationofthemask.IfTRUE,thenumberofpointsiswithintheINT_MAXpointlimit.IfFALSE,thenumberofpointsexceedstheINT_MAXpointlimit,andtheROImaynotrepresentthemaskcompletely.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
ROI* Onsuccess,thisfunctionreturnsapointertotheROIdescriptor.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisdescriptor,disposeofthepointerbycallingimaqDispose().
imaqMatchColorUsageint*imaqMatchColor(constImage*image,constColorInformation*info,constROI*roi,int*numScores);
PurposeDetermineshowcloselycolorsinanimagematchcolorsinthegivencolorinformation.
ImageTypesSupportedIMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
image constImage* Theimagecontainingcolorsyouwanttocomparewiththegivencolorinformation.
info constColorInformation* Thecolorinformation.CallimaqLearnColor()togetthecolorinformation.ThisparameterisrequiredandcannotbeNULL.
roi constROI* Theregionoftheimageinwhichtocomparethecolors.Allregioncontoursareconsideredtobeexternal.Ifroicontainsmultipleregions,thecolorinformationineachregioniscomparedindividuallytothecolorinformationspecifiedbytheinfoparameterandthematchresultsarereportedforeachregionSettheparametertoNULLtocomparecolorsintheentireimage.
numScores int* Onreturn,containsthenumberofvaluesinthescorearray.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
int* Onsuccess,thisfunctionreturnsanarrayfilledwithscoresdescribingtheclosenessofamatchbetweeneachcontourintheregionofinterest(ROI)andthecolorinformation.Ascoreof1,000indicatesaperfectmatch.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisarray,disposeofitbycallingimaqDispose().
imaqMatchColorPatternUsagePatternMatch*imaqMatchColorPattern(constImage*image,Image*pattern,constMatchColorPatternOptions*options,RectsearchRect,int*numMatches);
PurposeSearchesforareasinanimagethatmatchagivencolortemplateimage.
ImageTypesSupportedIMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
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.
ReturnValueType Description
PatternMatch* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().
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
imaqMatchGeometricPattern2UsageGeometricPatternMatch2*imaqMatchGeometricPattern2(constImage*image,constImage*pattern,constCurveOptions*curveOptions,constMatchGeometricPatternOptions*matchOptions,constMatchGeometricPatternAdvancedOptions2*advancedMatchOptions,constROI*roi,int*numMatches);
PurposeSearchesforareasinanimagethatmatchagivengeometrictemplateimage.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type
image constImage*
pattern constImage*
curveOptions constCurveOptions*
matchOptions constMatchGeometricPatternOptions*
advancedMatchOptions constMatchGeometricPatternAdvancedOptions2*
roi constROI*
numMatches int*
ReturnValueType Description
GeometricPatternMatch2* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().
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
imaqMatchMultipleGeometricPatternsUsageGeometricPatternMatch2*imaqMatchMultipleGeometricPatterns(constImage*image,constMultipleGeometricPattern*multiplePattern,constROI*roi,int*numMatches);
PurposeSearchesfortheareasintheimagethatmatchthetemplateimagesinthegivenmultiplegeometrictemplate.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
image constImage* Theimageinwhichthefunctionfindsmatchestothetemplateimages.
multiplePattern constMultipleGeometricPattern* Thepatternstofindintheimage.YoumustlearnthismultiplegeometrictemplateusingimaqLearnMultipleGeometricPatterns()beforeusingitinthisfunction.ThisparameterisrequiredandcannotbeNULL.
roi constROI* Specifieswhere,inimagefunctionsearchesforthetemplateimages.Thefirstandonlycontourofroimustbearectangleorarotatedrectangle.SetthisparametertoNULLtospecifythatthefunctionsearchesintheentireimage.
numMatches int* Onreturn,thenumberofmatchesthatthefunctionfound.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
GeometricPatternMatch2* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().
imaqMatchPattern2UsagePatternMatch*imaqMatchPattern2(constImage*image,constImage*pattern,constMatchPatternOptions*options,constMatchPatternOptions*advancedOptions,RectsearchRect,int*numMatches);
PurposeSearchesforareasinanimagethatmatchagiventemplateimage.
ImageTypesSupportedIMAQ_IMAGE_U8
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.
ReturnValueType Description
PatternMatch* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().
ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:
mode IMAQ_MATCH_SHIFT_INVARIANTminContrast 10subpixelAccuracy FALSEangleRanges NULL(allanglesallowed)numRanges 0numMatchesRequested 1matchFactor 0minMatchScore 800
imaqMatchShapeUsageShapeReport*imaqMatchShape(Image*dest,Image*source,constImage*templateImage,intscaleInvariant,intconnectivity8,doubletolerance,int*numMatches);
PurposeFindsashapeinanimage.Inmostcases,useimaqMatchPattern()insteadofthisfunction.Forinformationaboutwhentouseshapematching,seeChapter12,PatternMatching,oftheNIVisionConceptsManual.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16
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.
ReturnValueType Description
ShapeReport* Onsuccess,thisfunctionreturnsanarrayofreportsdescribingthematchestothegiventemplateshape.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththearray,disposeofitbycallingimaqDispose().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqMathTransformUsageintimaqMathTransform(Image*dest,constImage*source,MathTransformMethodmethod,floatrangeMin,floatrangeMax,floatpower,constImage*mask);
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.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqMaxUsageintimaqMax(Image*dest,constImage*sourceA,constImage*sourceB);
PurposeCopiesthelargerpixelvalueofthetwosourcesintothedestinationforeachpixel.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
dest Image* Thedestinationimage.sourceA constImage* Thefirstsourceimage.sourceB constImage* Thesecondsourceimage,whichmustbethe
sametypeofimageassourceA.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqMaxConstantUsageintimaqMaxConstant(Image*dest,constImage*source,PixelValuevalue);
PurposeCopiesthesourceimagetothedestinationinthefollowingmanner:Ifthesourceimagepixelvalueisgreaterthanthegivenconstant,thefunctioncopiesthesourcepixeltothedestination.Otherwise,thefunctioncopiestheconstanttothedestination.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Thefirstsourceimage.value PixelValue Thevaluetouseinthecomputation.Usethe
grayscalememberofthePixelValueunion.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqMeasureParticleUsageintimaqMeasureParticle(Image*image,intparticleNumber,intcalibrated,MeasurementTypemeasurement,double*value);
PurposeReturnsameasurementassociatedwithaparticle.CallimaqCountParticles()beforecallingimaqMeasureParticle().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image Image* Theimagecontainingtheparticletogetinformationabout.
particleNumber int Thenumberoftheparticletogetinformationabout.
calibrated int Specifieswhethertoreturnthemeasurementasareal-worldvalue.
measurement MeasurementType Themeasurementtomakeontheparticle.
value double* Onreturn,thevalueoftherequestedmeasurement.ThisparametercannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqMedianFilterUsageintimaqMedianFilter(Image*dest,Image*source,intwidth,intheight,constImage*mask);
PurposeFiltersanimageusinganonlinearfilter.Foreachpixel,thealgorithmtakestheneighborhoodspecifiedbythegivenfiltersizesandreplacesthepixelwiththemedianvalueoftheneighborhood.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqMergeOverlayUsageintimaqMergeOverlay(Image*dest,constImage*source,constRGBValue*palette,unsignedintnumColors,constchar*group);
PurposeMakesanondestructiveoverlaypartoftheimagecontent.Thisprocesscreatesadestructiveoverlay.TheVIthenremovesthenondestructiveoverlay.TheresultingimageisanRGBimage.
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
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqMinUsageintimaqMin(Image*dest,constImage*sourceA,constImage*sourceB);
PurposeCopiesthesmallerpixelvalueofthetwosourcesintothedestinationforeachpixel.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
dest Image* Thedestinationimage.sourceA constImage* Thefirstsourceimage.sourceB constImage* Thesecondsourceimage,whichmustbethe
sametypeofimageassourceA.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqMinConstantUsageintimaqMinConstant(Image*dest,constImage*source,PixelValuevalue);
PurposeCopiesthesourceimagetothedestinationinthefollowingmanner:Ifthesourceimagepixelvalueislessthanthegivenconstant,thefunctioncopiesthesourcepixeltothedestination.Otherwisethefunctioncopiestheconstanttothedestination.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Thefirstsourceimage.value PixelValue Thevaluetouseinthecomputation.Usethe
grayscalememberofthePixelValueunion.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqModuloUsageintimaqModulo(Image*dest,constImage*sourceA,constImage*sourceB);
PurposeModulodividestwoimages.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB
ParametersName Type Description
dest Image* Thedestinationimage.sourceA constImage* Thefirstimagetomodulodivide.sourceB constImage* Thesecondimagetomodulodivide.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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.
imaqModuloConstantUsageintimaqModuloConstant(Image*dest,constImage*source,PixelValuevalue);
PurposePerformsamodulodivisionoperationwitheachpixelinanimagebyaconstant.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Theimagetobemodulodividedbythescalar
constant.value PixelValue Thevaluetouseasthedivisorintheoperation.
Setthememberofvaluethatcorrespondstotheimagetype.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqMorphologyUsageintimaqMorphology(Image*dest,Image*source,MorphologyMethodmethod,constStructuringElement*structuringElement);
PurposeAppliesmorphologicaltransformationstobinaryimages.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
dest Image* Thedestinationimage.source Image* Theimageonwhichthe
functionperformsthemorphologicaloperations.Thecalculationmodifiestheborderofthesourceimage.Thebordermustbeatleasthalfaslargeasthelargerdimensionofthestructuringelement.
method MorphologyMethod Themorphologicaltransformtoapply.
structuringElement constStructuringElement* Thestructuringelementusedintheoperation.SetthisparametertoNULLifyoudonotwantacustomstructuringelement.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqMoveContourUsageintimaqMoveContour(ROI*roi,ContourIDid,intdeltaX,intdeltaY);
PurposeMovesacontour.
ParametersName Type Description
roi ROI* Theregionofinterest(ROI)containingthecontourtomove.
id ContourID TheContourIDofthecontourtomove.deltaX int Theamounttomovethecontourinthexdirection.deltaY int Theamounttomovethecontourintheydirection.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqMoveToolWindowUsageintimaqMoveToolWindow(Pointposition);
PurposeMovesthetoolwindow.
ParametersName Type Description
position Point Thenewposition,inscreencoordinates,oftheupperleftcornerofthetoolwindow.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqMoveWindowUsageintimaqMoveWindow(intwindowNumber,Pointposition);
PurposeMovesanimagewindow.
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.position Point Thenewposition,inscreencoordinates,ofthe
upperleftcornerofthewindow.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqMulDivUsageintimaqMulDiv(Image*dest,constImage*sourceA,constImage*sourceB,floatvalue);
PurposeComputesaratiobetweenthetwosourceimages.Youfindtheratiobymultiplyingeachpixelvalueinthefirstsourceimagebytheconstantvalueyousupply.Thisresultisdividedbythecorrespondingpixelinthesecondsource,andthefinalresultisstoredinthedestinationimage.Youcanusethisfunctiontocorrectabackgroundifthebackgroundislighterthantheimage.Inabackgroundcorrection,thefirstsourceimageistheacquiredimageandthesecondsourceimageisthebackgroundimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB
ParametersName Type Description
dest Image* Thedestinationimage.sourceA constImage* Thefirstsourceimage.sourceB constImage* Thesecondsourceimage,whichmustbethe
sametypeofimageassourceA.value float Thevaluebywhichthefunctionmultipliesthe
firstimage.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqMulticoreOptionsUsageintimaqMulticoreOptions(MulticoreOperationoperation,unsignedint*customNumCores);
PurposeSetsthenumberofavailablecorestouseforNIVisionapplications.
ParametersName Type Description
operation MulticoreOperation SpecifieswhethertheVIgetsorsetsthenumberofcoresavailabletoNIVision.
customNumCores unsignedint* ThenumberofprocessorcoresavailabletoNIVision.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqMultiplyUsageintimaqMultiply(Image*dest,constImage*sourceA,constImage*sourceB);
PurposeMultipliestwoimages.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB
ParametersName Type Description
dest Image* Thedestinationimage.sourceA constImage* Thefirstimagetomultiply.sourceB constImage* Thesecondimagetomultiply.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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.
imaqMultiplyConstantUsageintimaqMultiplyConstant(Image*dest,constImage*source,PixelValuevalue);
PurposeMultiplieseachpixelinanimagebyaconstant.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Thefirstsourceimage.value PixelValue Thevaluebywhichtomultiply.Setthememberof
valuethatcorrespondstotheimagetype.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqMultithresholdUsageintimaqMultithreshold(Image*dest,constImage*source,constThresholdData*ranges,intnumRanges);
PurposeThresholdsanimageintomultipleclasses.Thefunctionclassifieseachpixelintothefirstthresholdrangeofwhichitisamember.Ifapixelisnotamemberofanyofthegivenranges,thefunctionsetsitto0.Forexample,giventwothresholdranges:
rangeMin rangeMax useNewValue newValue80 150 TRUE 10120 200 FALSE ignored
Thefunctionoperatesasfollows:Thefunctionreplacespixelvaluesbelow80with0.Thefunctionreplacespixelvaluesfrom80to150with10.Thefunctiondoesnotchangepixelvaluesfrom151to200.Thefunctionreplacespixelvaluesabove200with0.
Formoreinformationaboutthresholding,refertoimaqThreshold().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Thesourceimage.ranges constThresholdData* Anarrayofthresholdranges.This
arrayisrequiredandcannotbeNULL.
numRanges int Thenumberofelementsintherangesarray.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqNandUsageintimaqNand(Image*dest,constImage*sourceA,constImage*sourceB);
PurposeComputesabitwiseNANDbetweentwoimages.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
dest Image* Thedestinationimage.sourceA constImage* Thefirstsourceimage.sourceB constImage* Thesecondsourceimage,whichmustbethe
sametypeofimageassourceA.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqNandConstantUsageintimaqNandConstant(Image*dest,constImage*source,PixelValuevalue);
PurposePerformsabitwiseNANDbetweenanimageandaconstant.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Thesourceimage.value PixelValue ThevaluetoNANDwiththesourceimage.Setthe
memberofvaluethatcorrespondstotheimagetype.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqNorUsageintimaqNor(Image*dest,constImage*sourceA,constImage*sourceB);
PurposeComputesabitwiseNORbetweentwoimages.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
dest Image* Thedestinationimage.sourceA constImage* Thefirstsourceimage.sourceB constImage* Thesecondsourceimage,whichmustbethe
sametypeofimageassourceA.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqNorConstantUsageintimaqNorConstant(Image*dest,constImage*source,PixelValuevalue);
PurposePerformsabitwiseNORbetweenanimageandaconstant.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Thesourceimage.value PixelValue ThevaluetoNORwiththesourceimage.Setthe
memberofvaluethatcorrespondstotheimagetype.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqNthOrderFilterUsageintimaqNthOrderFilter(Image*dest,Image*source,intwidth,intheight,intn,constImage*mask);
PurposeFiltersanimageusinganon-linearfilter.Foreachpixel,thealgorithmtakestheneighborhoodspecifiedbythegivenfiltersizesandreplacesthepixelwiththenthsmallestvalueintheneighborhood.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqOpenAVIUsageAVISessionimaqOpenAVI(constchar*fileName);
PurposeThisfunctionopensanexistingAVIfilesothatimagesanddatacanbereadfromit.
ParametersName Type Description
fileName constchar* ThenameoftheAVIfiletoopen.
ReturnValueType Description
AVISession Onsuccess,thisfunctionreturnsasessionIDassociatedwiththegivenAVIfile.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqOrUsageintimaqOr(Image*dest,constImage*sourceA,constImage*sourceB);
PurposeComputesabitwiseORbetweentwoimages.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
dest Image* Thedestinationimage.sourceA constImage* Thefirstsourceimage.sourceB constImage* Thesecondsourceimage,whichmustbethe
sametypeofimageassourceA.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqOrConstantUsageintimaqOrConstant(Image*dest,constImage*source,PixelValuevalue);
PurposePerformsabitwiseORbetweenanimageandaconstant.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Thesourceimage.value PixelValue ThevaluetoORtothesourceimage.Setthe
memberofvaluethatcorrespondstotheimagetype.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqOverlayArcUsageintimaqOverlayArc(Image*image,constArcInfo*arc,constRGBValue*color,DrawModedrawMode,constchar*group);
PurposeOverlaysanarcontoanimage.
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
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqOverlayBitmapUsageintimaqOverlayBitmap(Image*image,PointdestLoc,constRGBValue*bitmap,unsignedintnumCols,unsignedintnumRows,constchar*group);
PurposeOverlaysabitmapontoanimage.
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
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqOverlayClosedContourUsageintimaqOverlayClosedContour(Image*image,constPoint*points,intnumPoints,constRGBValue*color,DrawModedrawMode,constchar*group);
PurposeOverlaysanclosedcontourontoanimage.Tomakethecontour,thefunctionconnectseachpointinthearraytothenextpointinthearray,anditconnectsthelastpointinthearraytothefirstpointinthearray.
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
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqOverlayLineUsageintimaqOverlayLine(Image*image,Pointstart,Pointend,constRGBValue*color,constchar*group);
PurposeOverlaysalineontoanimage.
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
ParametersName Type Description
image Image* Theimageonwhichtooverlaytheline.start Point Thecoordinatelocationofthestartoftheline.end Point Thecoordinatelocationoftheendoftheline.color constRGBValue* Thecoloroftheline.Thealphacolorchannelis
notsupported.Settingthecolortotransparenthasthesameeffectasselectingblack.ThisparameterisrequiredandcannotbeNULL.
group constchar* Thegrouptowhichyouwanttoaddtheoverlay.SetthisparametertoNULLtoaddtheoverlaytothedefaultgroup.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqOverlayMetafileUsageintimaqOverlayMetafile(Image*image,constvoid*metafile,Rectrect,constchar*group);
PurposeOverlaysametafileontoanimage.
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
ParametersName Type Description
image Image* Theimageonwhichtooverlaythemetafile.metafile constvoid* TheWindowshandletothemetafilethatyouwant
toconvertintoanoverlay.ThehandlemaybeeitheranHMETAFILEorHENHMETAFILE.ThisparameterisrequiredandcannotbeNULL.
rect Rect Thelocationofrectangularregionwithintheimagethatthefunctionoverlaysthemetafile.Tousetheboundingrectangleinformationstoredinthemetafile,setthisparametertoIMAQ_NO_RECT.
group constchar* Thegrouptowhichyouwanttoaddtheoverlay.SetthisparametertoNULLtoaddtheoverlaytothedefaultgroup.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqOverlayOpenContourUsageintimaqOverlayOpenContour(Image*image,constPoint*points,intnumPoints,constRGBValue*color,constchar*group);
PurposeOverlaysanopencontourontoanimage.Tomakethecontour,thefunctionconnectseachpointinthearraytothenextpointinthearray.Thefunctiondoesnotconnectthelastpointinthearraytothefirstpointinthearray.
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
ParametersName Type Description
image Image* Theimageonwhichtooverlaytheopencontour.
points constPoint* Anarrayofpointsdescribingthelocationandshapeofthecontour.ThisparameterisrequiredandcannotbeNULL.
numPoints int Thenumberofpointsinthearray.color constRGBValue* Thecolorofthecontour.Thealphacolor
channelisnotsupported.Settingthecolortotransparenthasthesameeffectasselectingblack.ThisparameterisrequiredandcannotbeNULL.
group constchar* Thegrouptowhichyouwanttoaddtheoverlay.SetthisparametertoNULLtoaddtheoverlaytothedefaultgroup.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqOverlayOvalUsageintimaqOverlayOval(Image*image,RectboundingBox,constRGBValue*color,DrawModedrawMode,char*group);
PurposeOverlaysanovalontoanimage.
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
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqOverlayPointsUsageintimaqOverlayPoints(Image*image,constPoint*points,intnumPoints,constRGBValue*colors,intnumColors,PointSymbolsymbol,constUserPointSymbol*userSymbol,constchar*group);
PurposeOverlaysaseriesofpointsontoanimage.
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
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
defaultgroup.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqOverlayRectUsageintimaqOverlayRect(Image*image,Rectrect,constRGBValue*color,DrawModedrawMode,constchar*group);
PurposeOverlaysarectangleontoanimage.
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
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqOverlayROIUsageintimaqOverlayROI(Image*image,constROI*roi,PointSymbolsymbol,constUserPointSymbol*userSymbol,constchar*group);
PurposeOverlaysaregionofinterestontoanimage.
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
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqOverlayTextUsageintimaqOverlayText(Image*image,Pointorigin,constchar*text,constRGBValue*color,constOverlayTextOptions*options,constchar*group);
PurposeOverlaysastringoftextontoanimage.
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
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:
fontName ArialfontSize 12bold FALSEitalic FALSEunderline FALSEstrikeout FALSEhorizontalTextAlignment IMAQ_LEFTverticalTextAlignment IMAQ_BOTTOMbackgroundColor IMAQ_RGB_TRANSPARENTangle 0
imaqParticleFilter4UsageintimaqParticleFilter4(Image*dest,Image*source,constParticleFilterCriteria2*criteria,intcriteriaCount,constParticleFilterOptions2*options,constROI*roi,int*numParticles);
PurposeFiltersparticlesbasedontheirmorphologicalmeasurements.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.options—SetoptionstoNULLtousethefollowingdefaultvalues:
rejectMatches FALSErejectBorder FALSEfillHoles FALSEconnectivity8 TRUE
imaqQuantifyUsageQuantifyReport*imaqQuantify(constImage*image,constImage*mask);
PurposeCalculatesstatisticalparametersonanimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
QuantifyReport* Onsuccess,thisfunctionreturnsapointertoareportdescribingthestatisticalparametersoftheimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().
imaqRake2UsageRakeReport2*imaqRake2(Image*image,ROI*roi,RakeDirectiondirection,EdgeProcessprocess,intstepSize,EdgeOptions2*edgeOptions);
PurposeFindsedgesalongasetofparallellinesdefinedinsidearectangularregion.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image Image* Theimageinwhichtofindedges.roi ROI* Therectangularregionthefunctionlooks
infortheedges.Thefirstcontourofroimustbearectangleorarotatedrectangle.
direction RakeDirection Thedirectionthefunctionsearchesforedgesalongthesearchlines.
process EdgeProcess Definestheedgesforwhichthefunctionlooks.
stepSize int Specifiesthenumberofpixelsbetweeneachsearchline.
edgeOptions EdgeOptions2* Specifiestheparametersthatareusedtocomputetheedgeprofileanddetectedges.
ReturnValueType Description
RakeReport2* Onsuccess,thisfunctionreturnsinformationdescribingthecalculatededgesandtherakeusedbythefunction.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDispose().
ParameterDiscussionedgeOptions—SetedgeOptionstoNULLtousethedefaultoptions,asfollows:
polarity IMAQ_SEARCH_FOR_ALL_EDGESkernelSize 3numSearchLines 3minThreshold 10.0interpolationType IMAQ_BILINEAR_FIXEDcolumnProcessingMode IMAQ_MEDIAN_COLUMNS
imaqReadAVIFrameUsageintimaqReadAVIFrame(Image*image,AVISessionsession,unsignedintframeNum,void*data,unsignedint*dataSize);
PurposeThisfunctionreadstheimageandanyattacheddatafromanAVIfile.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB
ParametersName Type Description
image Image* Theimageinwhichtheframeisstored.session AVISession Thesessiontouse.frameNum unsigned
intTheframenumbertoread.
data void* IftheAVIcontainsdataattachedtothisframe,thedatawillbestoredhere.
dataSize unsignedint*
Thesizeofthedatabufferpassedin.Onreturn,thesizeofthedata.IfNULLispassedin,nodatawillbereturned.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqReadBarcodeUsageBarcodeInfo*imaqReadBarcode(constImage*image,BarcodeTypetype,constROI*roi,intvalidate);
PurposeReadsabarcodefromanimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
BarcodeInfo* Onsuccess,thisfunctionreturnsastructurecontaininginformationaboutthebarcode.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisstructure,disposeofitbycallingimaqDispose().
imaqReadClassifierFileUsageClassifierSession*imaqReadClassifierFile(ClassifierSession*session,constchar*fileName,ReadClassifierFileModemode,ClassifierType*type,ClassifierEngineType*engine,String255description);
PurposeReadsaclassifiersessionfromfile.
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.
ReturnValueType Description
ClassifierSession* Onsuccess,thisfunctionreturnsanewclassifiersession.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeoftheinformationbycallingimaqDispose().
imaqReadCustomDataUsagevoid*imaqReadCustomData(constImage*image,constchar*key,unsignedint*size);
PurposeReadsthecustomdataassociatedwithakeyinanimage.
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
ParametersName Type Description
image constImage* Theimagethathasthedatatoread.key constchar* Thekeyusedtofindthedataintheimage.size unsigned
int*Onreturn,thesizeofthedata,inbytes.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
void* Ifthekeyisfoundintheimage,thisfunctionreturnsacopyofthedataassociatedwiththatkey.Whenyouarefinishedwiththisdata,disposeofitbycallingimaqDispose().
imaqReadDataMatrixBarcode2UsageDataMatrixReport*imaqReadDataMatrixBarcode2(Image*image,constROI*roi,DataMatrixGradingModeprepareForGrading,constDataMatrixDescriptionOptions*descriptionOptions,constDataMatrixSizeOptions*sizeOptions,constDataMatrixSearchOptions*searchOptions);
PurposeLocatesandthenreadsthevalueencodedinaDataMatrixbarcode.Youcancomparethedecodeddatatoareferencestringorcheckwhetherthedatacontainsaspecificpattern.ManyoftheoptionsprovidedbythisfunctionallowforautomaticdetectionofpropertiesoftheDataMatrixbarcodeorwhatmethodsthefunctionshouldusetolocateanddecodethebarcode.Specifyingspecificpropertiesandmethodsfortheseoptionswillgreatlyincreasetheperformanceofthefunction.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
image Image* TheimagecontainingtheDataMatrixbarcodetoread.
roi constROI* Aregionofinterestspecifyingthelocationofthebarcodeintheimage.Thefirstcontourofroimustbearectangle,rotatedrectangle,orclosedcontour.IfskipLocationofthesearchOptionsparameterissettoTRUE,aclosedcontourhasanadditionalconstraintofbeingfour-sided.SetthisparametertoNULLtousetheentireimage.
prepareForGrading DataMatrixGradingMode Specifiesifthefunctionshould
makecalculationsneededtopreparetogradetheDataMatrixbarcode.
descriptionOptions constDataMatrixDescriptionOptions* DescribestheDataMatrixbarcodethefunctionshouldlookfor.
sizeOptions constDataMatrixSizeOptions* DescribessizinginformationfortheDataMatrixbarcodethefunctionshouldlookfor.
searchOptions constDataMatrixSearchOptions* DescribesthemethodsandlimitationsthefunctionshouldusewhensearchingfortheDataMatrixbarcode.
ReturnValueType Description
DataMatrixReport* Onsuccess,thisfunctionreturnsastructurecontaininginformationabouttheDataMatrixbarcode.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisstructure,disposeofitbycallingimaqDispose().
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
imaqReadFileUsageintimaqReadFile(Image*image,constchar*fileName,RGBValue*colorTable,int*numColors);
PurposeCreatesanNIVisionimagefromtheinformationinafile.Thefilecanbeinoneofthefollowingformats:PNG,JPEG,JPEG2000,TIFF,AIPD,orBMP.
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
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqReadLCDUsageLCDReport*imaqReadLCD(constImage*image,constROI*roi,constLCDOptions*options);
PurposeReadsthenumericvalueofaseven-segmentLCD.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image constImage* TheimagecontainingtheLCDtoread.roi constROI* Aregionofinterest(ROI)consistingof
rectanglesaroundeachofthedigitsoftheLCD.GeneratethisROIbycallingimaqFindLCDSegments().
options constLCDOptions* ControlshowtheLCDisread.
ReturnValueType Description
LCDReport* Onsuccess,thisfunctionreturnsastructuredescribingthestateoftheLCD.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:
litSegments FALSEthreshold 8sign FALSEdecimalPoint FALSE
imaqReadMeterUsageintimaqReadMeter(constImage*image,constMeterArc*arcInfo,double*percentage,PointFloat*endOfNeedle);
PurposeReadsameter.YoumusthavealreadydeterminedthearcinformationwithimaqGetMeterArc().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image constImage* Theimageofthemetertoread.arcInfo constMeterArc* Informationaboutthemeter'sarc.This
informationisreturnedbyimaqGetMeterArc()
percentage double* Returnsthecurrentsweeppositionoftheneedleincomparisontothemaximumsweepposition,expressedasapercentage.Forexample,avalueof100indicatestheneedleisatthemaximumsweepposition.SetthisparametertoNULLifyoudonotneedthisinformation.
endOfNeedle PointFloat* Returnsthelocationoftheendpointoftheneedle.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqReadMultipleGeometricPatternFileUsageMultipleGeometricPattern*imaqReadMultipleGeometricPatternFile(constchar*fileName,String255description);
PurposeReadsamultiplegeometricpatternfile.
ParametersName Type Description
fileName constchar* Thenameofthefiletoread.ThisparameterisrequiredandcannotbeNULL.
description String255 Thedescriptionofthemultiplegeometricpatternfile.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
MultipleGeometricPattern* Onsuccess,thisfunctionreturnsamultiplegeometrictemplate.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().
imaqReadOCRFileUsageintimaqReadOCRFile(constchar*fileName,CharSet*set,String255setDescription,ReadTextOptions*readOptions,OCRProcessingOptions*processingOptions,OCRSpacingOptions*spacingOptions);
PurposeReadsacharactersetandtheappropriateNIVisionstructuresfromthefilespecifiedbyfileName.
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
thisparametertoNULLifyoudonotneedthisinformation.
spacingOptions OCRSpacingOptions* Onreturn,thecharactersizespacingoptionscontainedinthefile.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqReadPDF417BarcodeUsageBarcode2DInfo*imaqReadPDF417Barcode(constImage*image,constROI*roi,Barcode2DSearchModesearchMode,unsignedint*numBarcodes);
PurposeReadsPDF417barcodesfromanimage.
ImageTypesSupportedIMAQ_IMAGE_U8
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.
ReturnValueType Description
Barcode2DInfo* Onsuccess,thisfunctionreturnsanarrayofstructurescontaininginformationaboutthebarcodes.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisarray,disposeofitbycallingimaqDispose().
imaqReadQRCodeUsageQRCodeReport*imaqReadQRCode(Image*image,constROI*roi,QRGradingModereserved,constQRCodeDescriptionOptions*descriptionOptions,constQRCodeSizeOptions*sizeOptions,constQRCodeSearchOptions*searchOptions);
PurposeLocatesandreadsthevalueencodedinaQRcode.Youcancomparethedecodeddatatoareferencestringorcheckwhetherthedatacontainsaspecificpattern.ManyoftheoptionsprovidedbythisfunctionallowforautomaticdetectionofpropertiesoftheQRcodeorwhatmethodsthefunctionshouldusetolocateanddecodethecode.Selectingspecificpropertiesandmethodsfortheseoptionswillgreatlyincreasetheperformanceofthefunction.
ImageTypesSupportedIMAQ_IMAGE_U8
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.
ReturnValueType Description
QRCodeReport* Onsuccess,thisfunctionreturnsastructurecontaininginformationabouttheQRcode.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisstructure,disposeofitbycallingimaqDispose().
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
imaqReadText3UsageReadTextReport3*imaqReadText3(constImage*image,constCharSet*set,constROI*roi,constReadTextOptions*readOptions,constOCRProcessingOptions*processingOptions,constOCRSpacingOptions*spacingOptions);
PurposeReadsthetextfromtheimage.Thefunctionidentifiesallobjectsintheimagebasedontheattributesthatyouset,andthencompareseachobjectwitheverytrainedcharacter.Foreachobject,thefunctionselectsthecharacterthatmostcloselymatchestheobject.Thefunctionusesthesubstitutioncharacterforanyobjectthatdoesnotmatchanyofthetrainedcharacters.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
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.
ReturnValueType Description
ReadTextReport3* Onsuccess,thisfunctionreturnsareportthatcontainsinformationaboutthetextcontainedintheimage.Onfailure,thefunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyoufinishwiththereport,callimaqDispose()todisposeofit.
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
minBoundingRectWidth 1maxBoundingRectWidth 65536minBoundingRectHeight 1maxBoundingRectHeight 65536autoSplit FALSE
imaqReadVisionFileUsageintimaqReadVisionFile(Image*image,constchar*fileName,RGBValue*colorTable,int*numColors);
PurposeCreatesanimagefromtheinformationinafileandthenattachesadditionalVisioninformationcontainedinthefiletotheimage.ThefilemustbeaPNGformatfile.
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
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqRefineMatchesUsagePatternMatch*imaqRefineMatches(constImage*image,constImage*pattern,constPatternMatch*candidatesIn,intnumCandidatesIn,MatchPatternOptions*options,MatchPatternAdvancedOptions*advancedOptions,int*numCandidatesOut);
PurposeRefinesmatchesreturnedfromimaqMatchPattern2()usingsubpixelinformationlearnedwithimaqLearnPattern().
ImageTypesSupportedIMAQ_IMAGE_U8
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.
ReturnValueType Description
PatternMatch* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().
imaqRejectBorderUsageintimaqRejectBorder(Image*dest,Image*source,intconnectivity8);
PurposeEliminatesparticlesthattouchtheborderoftheimage.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
dest Image* Thedestinationimage.source Image* Thesourceimage.Iftheimagehasaborder,the
functionsetsallborderpixelvaluesto0.connectivity8 int SetthisparametertoTRUEtouseconnectivity-8
todeterminewhetherparticlesaretouching.SetthisparametertoFALSEtouseconnectivity-4todeterminewhetherparticlesaretouching.Formoreinformationaboutconnectivity,seeChapter9,BinaryMorphology,intheNIVisionConceptsManual.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqRelabelClassifierSampleUsageintimaqRelabelClassifierSample(ClassifierSession*session,intindex,constchar*newClass);
PurposeRelabelsasampleinaclassifiersessionandsetsittobeinadifferentclass.
ParametersName Type Description
session ClassifierSession* Thesessioncontainingthesampletorelabel.
index int Theindexofthesampletorelabel.newClass constchar* Thenewclassofthesample.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqReleaseImageUsageintimaqReleaseImage(SESSION_IDsessionID);
PurposeReleasesanimagethatimaqExtractFromRing()previouslyextracted.Afterthefunctionreleasestheimage,theliveacquisitioncontinuesiftheacquisitionhadpaused.
ParametersName Type Description
sessionID SESSION_ID AvalidsessionID.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqRemoveContourUsageintimaqRemoveContour(ROI*roi,ContourIDid);
PurposeDeletesthespecifiedcontourfromthespecifiedregionofinterest(ROI),freeingallallocatedmemoryassociatedwiththecontour.
ParametersName Type Description
roi ROI* TheROIcontainingthecontourtoremove.id ContourID TheContourIDofthecontourtoremove.Afterthis
operation,theContourIDnolongercorrelatestoavalidcontour.SetthisparametertoIMAQ_ALL_CONTOURStoremoveallcontours.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqRemoveCustomDataUsageintimaqRemoveCustomData(Image*image,constchar*key);
PurposeRemovesacustomdatakeyanditsassociateddatafromanimage.
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
ParametersName Type Description
image Image* Theimagetoremovethecustomdatafrom.key constchar* Thekeytoremovefromtheimage.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqRemoveVisionInfo2UsageintimaqRemoveVisionInfo2(constImage*image,unsignedintinfo);
PurposeRemovesthespecifiedVisioninformationtypesfromthegivenimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64
ParametersName Type Description
image constImage* TheimagethatthefunctionremovesVisioninformationfrom.
info unsignedint Flagsrepresentingwhichinfotypestoremove.CombinevaluesfromtheVisionInfoType2enumerationtocreatethis
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqRenameCharUsageintimaqRenameChar(CharSet*set,intindex,constchar*newCharValue);
PurposeRenamesatrainedcharacter.
ParametersName Type Description
set CharSet* Thecharactersetthisfunctionoperateson.Tocreateacharacterset,useimaqCreateCharSet().ThisparameterisrequiredandcannotbeNULL.
index int Theindexofacharactertorename.newCharValue constchar* Thenewcharactervaluethatyouwantto
assigntothecharacter.Thelengthofthisstringmustnotexceed255characters.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqReplaceColorPlanesUsageintimaqReplaceColorPlanes(Image*dest,constImage*source,ColorModemode,constImage*plane1,constImage*plane2,constImage*plane3);
PurposeReplacesoneormoreofthecolorplanesofacolorimage.Theplaneyoureplacemaybeindependentoftheimagetype.Forexample,youcanreplacethegreenplaneofanRGBimageorthehueplaneofanHSLimage.
NoteThisfunctiondoesnotsupporttheCIEL*a*b*andCIEXYZcolormodes.ThisfunctiononlysupportstheRGBcolormodefor64-bitimages.
ImageTypesSupportedIMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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
imaqReplaceComplexPlaneUsageintimaqReplaceComplexPlane(Image*dest,constImage*source,constImage*newValues,ComplexPlaneplane);
PurposeReplacesaplaneofacompleximagewiththepixelvaluesfromagivenimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqResampleUsageintimaqResample(Image*dest,constImage*source,intnewWidth,intnewHeight,InterpolationMethodmethod,Rectrect);
PurposeResizesanimagetoagivenresolution.Thesourceimageanddestinationimagemustbethesameimagetype.Afterexecution,thesizeofthedestinationimageisnewWidthxnewHeight.Forfastzero-orderscaling,useimaqScale().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqROIProfileUsageROIProfile*imaqROIProfile(constImage*image,constROI*roi);
PurposeCalculatestheprofileofthepixelsalongtheedgeofeachcontourinaregionofinterest(ROI).
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image constImage* Theimagefromwhichthefunctiongetstheprofile.roi constROI* TheROIdescribingthepixelsaboutwhichthe
functiongetsinformation.
ReturnValueType Description
ROIProfile* Onsuccess,thisfunctionreturnsapointertoinformationaboutthepointsalongtheedgeofeachcontourintheROI.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofitbycallingimaqDispose().
imaqROIToMaskUsageintimaqROIToMask(Image*mask,constROI*roi,intfillValue,constImage*imageModel,int*inSpace);
PurposeTransformsaregionofinterest(ROI)intoamaskimage.
ImageTypesSupportedIMAQ_IMAGE_U8
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqRotate2UsageintimaqRotate2(Image*dest,constImage*source,floatangle,PixelValuefill,InterpolationMethodmethod,intmaintainSize);
PurposeRotatesanimagecounterclockwise.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqScaleUsageintimaqScale(Image*dest,constImage*source,intxScale,intyScale,ScalingModescaleMode,Rectrect);
PurposeScalesanimageorareaofanimage.Thesourceimageanddestinationimagemustbethesameimagetype.Thisfunctionmakesanimagelargerbyduplicatingpixels,anditmakesanimagesmallerbysubsamplingpixels.Formoresophisticatedscalingtechniques,useimaqResample().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSegmentationUsageintimaqSegmentation(Image*dest,Image*source);
PurposeCalculateszonesofinfluencearoundparticlesinalabeledimage.Thefunctionfindsthenearestparticleofeachpixelinthesourceimageandsetsthepixelvaluetothelabeledvalueofthatparticle.BeforecallingimaqSegmentation(),youmustlabeltheparticleswithimaqLabel().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16
ParametersName Type Description
dest Image* Thedestinationimage.source Image* Theimagetosegment.Thesegmentationmodifiesthe
borderofthesourceimage.Thebordermustbeatleastonepixelwide.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqSelectAnnulusUsageintimaqSelectAnnulus(constImage*image,Annulus*annulus,constConstructROIOptions*options,int*okay);
PurposeDisplaystheimageinamodalwindowandallowstheusertodrawanannulusonit.Aftertheuserdrawstheannulus,thefunctionhidesthewindow.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64
ParametersName Type Description
image constImage* Theimagefromwhichtheuserselectsanannulus.
annulus Annulus* Onreturn,thisparameterspecifiesthecoordinatesoftheannuluschosenbytheuser.Iftheuserdoesnotselectanannulus,thefunctionsetsalloftheelementsofannulusto–1.ThisparameterisrequiredandcannotbeNULL.
options constConstructROIOptions* Describeshowafunctionpresentstheannulusconstructorwindow.
okay int* Onreturn,thisparameterisTRUEiftheuserpressedtheOKbuttontoendtheselectionofanannulus.Otherwise,thisparameterisFALSE.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:
windowNumber IMAQ_MODAL_DIALOGwindowTitle "SelectanAnnulus"type IMAQ_PALETTE_GRAYpalette NULLnumColors 0
imaqSelectLineUsageintimaqSelectLine(constImage*image,Point*start,Point*end,constConstructROIOptions*options,int*okay);
PurposeDisplaystheimageinamodalwindowandallowstheusertodrawalineonit.Aftertheuserdrawstheline,thefunctionhidesthewindow.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:
windowNumber IMAQ_MODAL_DIALOGwindowTitle "SelectaLine"type IMAQ_PALETTE_GRAYpalette NULLnumColors 0
imaqSelectPointUsageintimaqSelectPoint(constImage*image,Point*point,constConstructROIOptions*options,int*okay);
PurposeDisplaystheimageinamodalwindowandallowstheusertodrawapointonit.Aftertheuserdrawsthepoint,thefunctionhidesthewindow.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64
ParametersName Type Description
image constImage* Theimagefromwhichtheuserselectsapoint.
point Point* Onreturn,thisparameterspecifiesthecoordinatesofthepointchosenbytheuser.Iftheuserdoesnotselectapoint,thefunctionsetsalloftheelementsofpointto–1.ThisparameterisrequiredandcannotbeNULL.
options constConstructROIOptions* Describeshowafunctionpresentsthepointconstructorwindow.
okay int* Onreturn,thisparameterisTRUEiftheuserpressedtheOKbuttontoendtheselectionofapoint.Otherwise,thisparameterisFALSE.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:
windowNumber IMAQ_MODAL_DIALOGwindowTitle "SelectaPoint"type IMAQ_PALETTE_GRAYpalette NULLnumColors 0
imaqSelectRectUsageintimaqSelectRect(constImage*image,RotatedRect*rect,constConstructROIOptions*options,int*okay);
PurposeDisplaystheimageinamodalwindowandallowstheusertodrawarectangleonit.Aftertheuserdrawstherectangle,thefunctionhidesthewindow.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64
ParametersName Type Description
image constImage* Theimagefromwhichtheuserselectsarectangle.
rect RotatedRect* Onreturn,thisparameterspecifiesthecoordinatesoftherectanglechosenbytheuser.Iftheuserdoesnotselectarectangle,thefunctionsetsalloftheelementsofrectto–1.ThisparameterisrequiredandcannotbeNULL.
options constConstructROIOptions* Describeshowafunctionpresentstherectangleconstructorwindow.
okay int* Onreturn,thisparameterisTRUEiftheuserpressedtheOKbuttontoendtheselectionofarectangle.Otherwise,thisparameterisFALSE.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:
windowNumber IMAQ_MODAL_DIALOGwindowTitle "SelectaRectangle"type IMAQ_PALETTE_GRAYpalette NULLnumColors 0
imaqSeparationUsageintimaqSeparation(Image*dest,Image*source,interosions,constStructuringElement*structuringElement);
PurposeSeparatestouchingparticlesbyerodingtheimagetoremovesmallisthmusesbetweentheparticles.Afterperformingtheerosion,thealgorithmreconstructstheimage.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
dest Image* Thedestinationimage.source Image* Theimagecontaining
particlestoseparate.Theseparationmodifiestheborderofthesourceimage.Thebordermustbeatleasthalfaslargeasthelargerdimensionofthestructuringelement.
erosions int Thenumberoferosionstoperform.
structuringElement constStructuringElement* Thestructuringelementusedintheoperation.SetthisparametertoNULLifyoudonotwantacustomstructuringelement.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqSetBitDepthUsageintimaqSetBitDepth(Image*image,unsignedintbitDepth);
PurposeSetsthebitdepthoftheimage.ThebitdepthofanimagedetermineshowNIVisiondisplays,savesandconvertsimageswithmorethan8bitsperchannel.
ImageTypesSupportedIMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB_U64
ParametersName Type Description
image Image* Theimagewhosebitdepththefunctionsets.bitDepth unsigned
intThenewbitdepthoftheimage.Thevaluemustbefrom8to15forIMAQ_IMAGE_I16images,from8to16forIMAQ_IMAGE_U16andIMAQ_IMAGE_RGB_U64images,or0.Avalueof0indicatesthatNIVisionshouldusetheentirerangeoftheimagedatatype.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetBorderSizeUsageintimaqSetBorderSize(Image*image,intsize);
PurposeSetsthebordersizeofanimage.Thisoperationpreservesimagepixels.
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
ParametersName Type Description
image Image* Theimagewhosebordersizethefunctionsets.size int Thenewbordersize.Validbordersizesrangefrom0-50.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetContourColorUsageintimaqSetContourColor(ROI*roi,ContourIDid,constRGBValue*color);
PurposeSetsthecolorofacontour.
ParametersName Type Description
roi ROI* Theregionofinterest(ROI)containingthecontourwhosecolorthefunctionsets.
id ContourID TheContourIDofthecontourwhosecolorthefunctionsets.
color constRGBValue* Thecolortowhichthefunctionsetsthecontour.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetCoordinateSystemUsageintimaqSetCoordinateSystem(Image*image,constCoordinateSystem*system);
PurposeSetsthecoordinatesystemandscalingconstantsforthecalibratedreal-worldcoordinatesoftheimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
image Image* Theimagewhosecoordinatesystemthefunctionsets.Thisimagemustalreadycontaincalibrationinformation.
system constCoordinateSystem* Definesthecoordinatesystemforthecalibratedreal-worldcoordinates.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsystem—SetsystemtoNULLtousethefollowingdefaultcoordinatesystem:
origin {0,0}angle 0axisOrientation IMAQ_INDIRECT
imaqSetCurrentToolUsageintimaqSetCurrentTool(ToolcurrentTool);
PurposeSetsthecurrentlyselectedtoolinthetoolwindow.
ParametersName Type Description
currentTool Tool Thetooltomaketheselectedregiontool.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetErrorUsageintimaqSetError(interrorCode,constchar*function);
PurposeSetsthecurrenterror.
ParametersName Type Description
errorCode int Thecodeoftheerrortoset.function constchar* Thenameofthefunctioninwhichtheerror
occurred.SetthisparametertoNULLtorecordnofunction.
ReturnValueType Description
int Setsthecurrenterror.
imaqSetEventCallbackUsageintimaqSetEventCallback(EventCallbackcallback,intsynchronous);
PurposeSetsacallbackfunctionthatNIVisioncallswhenaneventoccursinawindow.Whenausergeneratesanevent,NIVisioncallsthecallbackfunctionusingthefollowingparameters:event,windownumber,tool,andlocationoftheevent.Forafulldescriptionoftheseparameters,refertoimaqGetLastEvent().
ParametersName Type Description
callback EventCallback Thefunctiontocall.SetthisparametertoNULLifyouwanttodisableeventprocessingusingacallback.Ifyoudisablecallbacks,youcanprocesseventsusingimaqGetLastEvent().
synchronous int SetthisparametertoTRUEtocallthecallbackfunctioninthethreadthatcallsimaqSetEventCallback().SetthisparametertoFALSEtocallthecallbackfunctionasynchronouslyinaseparatethread.Toprocesscallbackssynchronously,yourapplicationmusthaveamessagepump.InLabWindows/CVI,callingRunUserInterface()startsamessagepump.ThefunctionignoresthisparameterifcallbackisNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussioncallback—callbackshouldhavethefollowingprototype:voidIMAQ_CALLBACKMyCallback(WindowEventType,intwindowNumber,Tooltool,Rectrect);
imaqSetImageSizeUsageintimaqSetImageSize(Image*image,intwidth,intheight);
PurposeSetsthesizeofanimage.Theoriginalpixelsarenottransferredtothenewimage.Thenewimagewillcontainuninitializedpixels.Toresizetheimageandretaintheoriginalinformation,useimaqScale()orimaqResample().
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
ParametersName Type Description
image Image* Theimagetoresize.width int Thenewwidthoftheimage.height int Thenewheightoftheimage.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetLineUsageintimaqSetLine(Image*image,constvoid*array,intarraySize,Pointstart,Pointend);
PurposeSetsthepixelvaluesalongalineinanimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetMaskOffsetUsageintimaqSetMaskOffset(Image*image,Pointoffset);
PurposeWhenthegivenimageisusedasamask,setsthelocationinthesourceimageatwhichthefunctionplacesthe(0,0)pixelofthemaskimage.
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
ParametersName Type Description
image Image* Themaskimagewhoseoffsetthefunctionsets.offset Point Thecoordinateswherethefunctionappliesthemask.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetMultipleGeometricPatternsOptionsUsageintimaqSetMultipleGeometricPatternsOptions(MultipleGeometricPattern*multiplePattern,constchar*label,constCurveOptions*curveOptions,constMatchGeometricPatternOptions*matchOptions,constMatchGeometricPatternAdvancedOptions2*advancedMatchOptions);
PurposeSetstheoptionsusedbyimaqMatchMultipleGeometricPatterns()tomatchthetemplateimagecorrespondingtothespecifiedlabelinmultiplePattern.
ParametersName Type
multiplePattern MultipleGeometricPattern*
label constchar*
curveOptions constCurveOptions*
matchOptions constMatchGeometricPatternOptions*
advancedMatchOptions constMatchGeometricPatternAdvancedOptions2*
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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
imaqSetOverlayPropertiesUsageintimaqSetOverlayProperties(Image*image,constchar*group,TransformBehaviors*transformBehaviors);
PurposeSetsthetransformationbehaviorinformationforaspecifiedoverlaygroup.
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
ParametersName Type Description
image Image* Theimageforwhichyouwanttosettheoverlayproperties.
group constchar* Specifiesanoverlaygroupnamewithintheimage.SetthisparametertoNULLtospecifyallgroups.
transformBehaviors TransformBehaviors* Specifiesthecurrentoverlaybehaviorwhenanimageistransformed.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetParticleClassifierOptionsUsageintimaqSetParticleClassifierOptions(ClassifierSession*session,constParticleClassifierPreprocessingOptions*preprocessingOptions,constParticleClassifierOptions*options);
PurposeSetoptionsonaparticleclassifiersession.
ParametersName Type Description
session ClassifierSession* Theclassifiersessionfromwhichtosettheoptions.
preprocessingOptions constParticleClassifierPreprocessingOptions* Thepreprocessingoptionstoset.SetthisparametertoNULLifyoudonotwanttosetthepreprocessingoptions.
options constParticleClassifierOptions* Theclassificationoptionstoset.SetthisparametertoNULLifyoudonotwanttosettheclassificationoptions.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetPixelUsageintimaqSetPixel(Image*image,Pointcoord,PixelValuevalue);
PurposeSetsthevalueofapixelwithinanimage.
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
ParametersName Type Description
image Image* Theimagewhosepixelvaluethefunctionsets.coord Point Thecoordinatesofthepixelthefunctionsets.value PixelValue Thevaluetowhichthefunctionsetstheimagepixel.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetReferenceCharUsageintimaqSetReferenceChar(constCharSet*set,intindex,intisReferenceChar);
PurposeSetsacharacterasthereferencecharacterforthecharacterclass.Ifthecharacterclassalreadyhasareferencecharacter,thenewcharacterwillreplacetheoldcharacterasthereferencecharacter.
ParametersName Type Description
set constCharSet* Thecharactersetthisfunctionoperateson.Tocreateacharacterset,useimaqCreateCharSet().ThisparameterisrequiredandcannotbeNULL.
index int Theindexofacharactertosetasthereferencecharacterforitscharacterclass.
isReferenceChar int SetthisparametertoTRUEtosetthecharacterasthereferencecharacter.SetthisparametertoFALSEtounsetthecharacterasthereferencecharacter.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetROIColorUsageintimaqSetROIColor(ROI*roi,constRGBValue*color);
PurposeSetsthecolorofallthecontourscurrentlyinaregionofinterest(ROI).AllcontoursyouaddtotheROIbecomethiscolorafteryoucallthisfunction.UseimaqSetContourColor()tochangethecolorofindividualcontourswithintheROI.
ParametersName Type Description
roi ROI* TheROIwhosecolorthefunctionsets.color constRGBValue* ThecolortowhichthefunctionsetstheROI.
ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetSimpleCalibrationUsageintimaqSetSimpleCalibration(Image*image,ScalingMethodmethod,intlearnTable,constGridDescriptor*grid,constCoordinateSystem*system);
PurposeSetsasimplecalibrationforanimage.Inasimplecalibration,apixelcoordinateistransformedtoareal-worldcoordinatethroughscalinginthehorizontalandverticaldirections.
NoteSimplecalibrationcannotcorrectforperspectivedistortionornonlinearlensdistortion.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL,IMAQ_IMAGE_RGB_U64
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussiongrid—SetgridtoNULLtousethefollowingdefaultscalingconstants:
xStep 1yStep 1unit IMAQ_UNDEFINED
system—SetsystemtoNULLtousethefollowingdefaultcoordinatesystem:
origin {0,0}angle 0axisOrientation IMAQ_INDIRECT
imaqSetToolColorUsageintimaqSetToolColor(constRGBValue*color);
PurposeSetsthecolorinwhichthetoolsfromthetoolwindowdraw.
ParametersName Type Description
color constRGBValue* Thetooldrawingcolor.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetToolContextSensitivityUsageintimaqSetToolContextSensitivity(intsensitive);
PurposeEnableordisablethecontextsensitivityforallthetools.
ParametersName Type Description
sensitive int SetvaluetoTRUEtoenablecontext-sensitivetoolselection.SetvaluetoFALSEtodisablecontext-sensitivetoolselection.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetupGrabUsageintimaqSetupGrab(SESSION_IDsessionID,Rectrect);
PurposeConfiguresandstartsagrabacquisition.Agrabperformsanacquisitionthatloopscontinuallyononebuffer.UseimaqGrab()tocopyanimageoutofthebuffer.UseimaqStopAcquisition()toendtheacquisition.
ParametersName Type Description
sessionID SESSION_ID AvalidsessionID.rect Rect Theareatoacquire.Ifyousetthisparameter
toIMAQ_NO_RECT,thefunctionusestheentireacquisitionwindow.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetupRingUsageintimaqSetupRing(SESSION_IDsessionID,Image**images,intnumImages,intskipCount,Rectrect);
PurposeConfiguresaringacquisition.Aringacquisitionacquiresimagescontinuouslyandloopsthemintoabufferlist.Tostarttheacquisition,callimaqStartAcquisition().Tostoptheacquisition,callimaqStopAcquisition().Togetanimagefromthering,callimaqExtractFromRing()orimaqCopyFromRing().DonotmodifyordisposeoftheimagesintheringuntilyouendtheacquisitionwithimaqStopAcquisition().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetupSequenceUsageintimaqSetupSequence(SESSION_IDsessionID,Image**images,intnumImages,intskipCount,Rectrect);
PurposeConfiguresasequenceacquisition.Asequenceacquisitionacquiresafullsequenceofimagesintotheimagearray.Tostarttheacquisition,callimaqStartAcquisition().TheacquisitionfinishesuponreachingtheendofthesequenceorwhenyoucallimaqStopAcquisition().Donotmodifyordisposeoftheimagesinthesequenceuntiltheacquisitionhasfinished.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetupToolWindowUsageintimaqSetupToolWindow(intshowCoordinates,intmaxIconsPerLine,constToolWindowOptions*options);
PurposeConfigurestheappearanceandavailabilityofthetoolsinthetoolwindow.
ParametersName Type Description
showCoordinates int Determineswhetheractivepixelcoordinatesarevisible.SetthisparametertoTRUEtodisplaytheactivepixelcoordinates.SetthisparametertoFALSEifyoudonotwantthecoordinatestoshow.
maxIconsPerLine int Themaximumnumberoftooliconstoshowoneachline.Thetoolwindowusestheminimumnumberoflinesneededtodisplayallofthetoolsbasedonthisparameteranddistributesthetoolsasevenlyaspossible.
options constToolWindowOptions* Determinestheavailabilityoftoolsinthetoolwindow.SetoptionstoNULLtodisplayallthetools.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetupWindowUsageintimaqSetupWindow(intwindowNumber,intconfiguration);
PurposeSetsthepropertiesofanimagewindow.
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.configuration int AnyoftheWindowOptionsflagscombined
together.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetWindowBackgroundUsageintimaqSetWindowBackground(intwindowNumber,WindowBackgroundFillStylefillStyle,WindowBackgroundHatchStylehatchStyle,constRGBValue*fillColor,constRGBValue*backgroundColor);
PurposeSetsthebackgroundstyleandcolorinformationforthedisplaywindow.
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.
fillStyle WindowBackgroundFillStyle Thefillstyleofthedisplaywindow.
hatchStyle WindowBackgroundHatchStyle Thehatchstyleofthedisplaywindow.
fillColor constRGBValue* Thefillcolorofthedisplaywindow.SetthisparametertoNULLtousethecurrentfillcolor.
backgroundColor constRGBValue* Thebackgroundcolorofthedisplaywindow.SetthisparametertoNULLtousethecurrentbackgroundcolor.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetWindowDisplayMappingUsageintimaqSetWindowDisplayMapping(intwindowNumber,constDisplayMapping*mapping);
PurposeSetsthepixelmappingpolicyfordisplaying16-bitimagesofanunspecifiedbitdepth.Because16-bitgrayscaleimagescannotbedisplayedwiththeirfullresolutionon32-bitcolordisplaysusingcommonvideoadapterslimitedto8-bitresolution/perpixel/color,16-bitimagesneedtobemappedtothe8-bitrange(0to255).
ParametersName Type Description
windowNumber int Thenumberofthewindowthefunctionsetsthepixelmappingpolicyfor.
mapping constDisplayMapping* Describesthemappingpolicythefunctionsetsforthewindows.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionmapping—SetmappingtoNULLtousethedefaultoptions,asfollows:
conversionMethod IMAQ_FULL_DYNAMICminimumValue 0maximumValue 0shiftCount 0
imaqSetWindowGridUsageintimaqSetWindowGrid(intwindowNumber,intxResolution,intyResolution);
PurposeSetsthegridresolutionoftheimagewindow.Gridresolutionisthenumberofpixelsbetweengridlines.NIVisionusesthegridresolutionwhendrawingregionsofinterestonthewindowusingtoolsinthetoolwindow.Youcanusethegridtotracearegionofinterestaccurately.
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.xResolution int Thexresolutionofthegrid.yResolution int Theyresolutionofthegrid.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetWindowMaxContourCountUsageintimaqSetWindowMaxContourCount(intwindowNumber,unsignedintmaxContourCount);
PurposeSetsthemaximumnumberofregionofinterest(ROI)contoursthatcanbedrawnonanimagewindow.
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.maxContourCount unsigned
intThemaximumnumberofcontourstheROIthisimagewindowcontainscanhave.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetWindowNonTearingUsageintimaqSetWindowNonTearing(intwindowNumber,intnonTearing);
PurposeEnablesordisablesthenon-tearingstateofthedisplaywindow.Tearingimagescanoccurwhentheimagedisplayrateisnotinsyncwiththerefreshrateofthemonitor.Thedifferencebetweenthedisplayrateandthemonitorrefreshratecancausepartsoftwodifferentimagestobedisplayedatthesametime,whichcausesasplitintheimage.Byenablingnon-tearing,theimagedisplayissyncedtotherefreshofthemonitorandtearingiseliminated.
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.nonTearing int SetthisparametertoTRUEifthegivenwindow
shouldbenon-tearingandFALSEifthewindowshouldoperatenormally.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetWindowPaletteUsageintimaqSetWindowPalette(intwindowNumber,PaletteTypetype,constRGBValue*palette,intnumColors);
PurposeSetsthecolorpalettetousewhendisplayingamonochromeimageinanimagewindow.
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetWindowROIUsageintimaqSetWindowROI(intwindowNumber,constROI*roi);
PurposeSetstheregionofinterest(ROI)associatedwithagivenwindow.
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.roi constROI* TheROItoassociatewiththewindow.Set
thisparametertoNULLtoremoveanyROIsfromthewindow.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetWindowSizeUsageintimaqSetWindowSize(intwindowNumber,intwidth,intheight);
PurposeSetsthesizeofanimagewindow.
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.width int Thenewwidthofthewindow.height int Thenewheightofthewindow.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetWindowThreadPolicyUsageintimaqSetWindowThreadPolicy(WindowThreadPolicypolicy);
PurposeDeterminesthethreadinwhichNIVisioncreateswindows.Bydefault,NIVisionusesIMAQ_CALLING_THREAD.Thispolicycreateswindowsinthethreadthatmakesthefirstdisplayfunctioncallforagivenwindownumber.Ifthatthreaddoesnotprocessmessages,setthewindowthreadpolicytoIMAQ_SEPARATE_THREAD.Usingthispolicy,NIVisioncreateswindowsinaseparatethreadandprocessesmessagesforthewindowsautomatically.
ParametersName Type Description
policy WindowThreadPolicy Thethreadpolicy.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetWindowTitleUsageintimaqSetWindowTitle(intwindowNumber,constchar*title);
PurposeSetsthetitleofanimagewindow.
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.title constchar* Thenewtitleofthewindow.This
parameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetWindowZoomToFitUsageintimaqSetWindowZoomToFit(intwindowNumber,intzoomToFit);
PurposeSetswhetherthewindowisinzoomtofitmode.
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.zoomToFit int SetthisparametertoTRUEifthegivenwindow
shouldautomaticallyzoomtofittheimageandFALSEifthewindowshouldoperatenormally.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqShiftUsageintimaqShift(Image*dest,constImage*source,intshiftX,intshiftY,PixelValuefill);
PurposeShiftsanimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Theimagetoshift.shiftX int Specifieshowmanypixelstotherighttoshiftthe
image.shiftY int Specifieshowmanypixelsdowntoshiftthe
image.fill PixelValue Thevaluewithwhichthefunctionfillsthe
uncoveredimagepixels.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqShowScrollbarsUsageintimaqShowScrollbars(intwindowNumber,intvisible);
PurposeShowsorhidesthescrollbarsonanimagewindow.
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.visible int IfTRUE,thescrollbarsofthewindoware
visible.IfFALSE,thescrollbarsofthewindowarehidden.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqShowToolWindowUsageintimaqShowToolWindow(intvisible);
PurposeShowsorhidesthetoolwindow.
ParametersName Type Description
visible int IfTRUE,thetoolwindowisvisible.IfFALSE,thetoolwindowishidden.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqShowWindowUsageintimaqShowWindow(intwindowNumber,intvisible);
PurposeShowsorhidesanimagewindow.
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.visible int IfTRUE,thegivenwindowisvisible.IfFALSE,
thegivenwindowishidden.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSimpleDistanceUsageintimaqSimpleDistance(Image*dest,Image*source,constStructuringElement*structuringElement);
PurposeCreatesadistancemap.Thefunctionencodesaparticlepixelvalueasafunctionofthedistanceofthepixelfromtheparticleborder.Foramoreprecisebutsloweralgorithm,useimaqDanielssonDistance().
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
dest Image* Thedestinationimage.source Image* Theimagethatthe
functionusestocomputethedistancemap.Thefunctionmodifiestheborderofthesourceimage.Thebordermustbeatleasthalfaslargeasthelargerofthestructuringelementdimensions.
structuringElement constStructuringElement* Thestructuringelementusedintheoperation.SetthisparametertoNULLifyoudonotwantacustomstructuringelement.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqSimpleEdgeUsagePointFloat*imaqSimpleEdge(constImage*image,constPoint*points,intnumPoints,constSimpleEdgeOptions*options,int*numEdges);
PurposeFindsprominentedgesalonganarrayofpixelcoordinates.Thisfunctioncanreturnthefirstedge,thefirstandthelastedges,oralltheedges.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image constImage* Theimageinwhichyouwanttofindedges.
points constPoint* Thepathalongwhichthefunctiondetectsedges.ThisparameterisrequiredandcannotbeNULL.
numPoints int Thenumberofpointsinthepointsarray.
options constSimpleEdgeOptions* Describeshowyouwantthefunctiontofindedges.ThisparameterisrequiredandcannotbeNULL.
numEdges int* Onreturn,thenumberofedgesthatthefunctionfound.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
PointFloat* Onsuccess,thisfunctionreturnsanarrayofpointsindicatingthelocationoftheedges.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthearraybycallingimaqDispose().
imaqSizeFilterUsageintimaqSizeFilter(Image*dest,Image*source,intconnectivity8,interosions,SizeTypekeepSize,constStructuringElement*structuringElement);
PurposeFiltersparticlesbasedontheirsize.Thealgorithmerodestheimageaspecifiednumberoftimesandeitherkeepsordiscardstheparticlesfromtheoriginalimagethatremainintheerodedimage.
ImageTypesSupportedIMAQ_IMAGE_U8
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.
SetthisparametertoNULLifyoudonotwantacustomstructuringelement.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqSkeletonUsageintimaqSkeleton(Image*dest,Image*source,SkeletonMethodmethod);
PurposeCalculatestheskeletonoftheparticlesinsidetheimage.Theskeletonismadeupoflinesseparatingthezonesofinfluenceintheimage.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
dest Image* Thedestinationimage.source Image* Theimagewhoseskeletonthefunction
derives.Thecalculationmodifiestheborderofthesourceimage.Thebordermustbeatleastonepixelwide.
method SkeletonMethod Themethodthatthefunctionusestocalculatetheskeleton.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqSnapUsageImage*imaqSnap(SESSION_IDsessionID,Image*image,Rectrect);
PurposeAcquiresasingleimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
sessionID SESSION_ID AvalidsessionID.image Image* Theimageintowhichtoacquire.Ifimageis
NULL,imaqSnap()createsanewimage.rect Rect Theareatoacquire.Setthisparameterto
IMAQ_NO_RECTtoacquiretheentireacquisitionwindow.
ReturnValueType Description
Image* Onsuccess,thisfunctionreturnstheacquiredimage.IfyousetimagetoNULL,thefunctionreturnsanewimage.Otherwise,thefunctionreturnsapointertoimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().
imaqSpoke2UsageSpokeReport2*imaqSpoke2(Image*image,ROI*roi,SpokeDirectiondirection,EdgeProcessprocess,intstepSize,EdgeOptions2*edgeOptions);
PurposeFindsedgesalongradiallinesspecifiedinsideanannularregion.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image Image* Theimageinwhichtofindedges.roi ROI* Therectangularregionthefunctionlooks
infortheedges.Thefirstcontourofroimustbearectangleorarotatedrectangle.
direction SpokeDirection Thedirectionthefunctionsearchforedgesalongthesearchlines.
process EdgeProcess Definestheedgesforwhichthefunctionlooks.
stepSize int Specifiesthenumberofpixelsbetweeneachsearchline.
edgeOptions EdgeOptions2* Specifiestheparametersthatareusedtocomputetheedgeprofileanddetectedges.
ReturnValueType Description
SpokeReport2* Onsuccess,thisfunctionreturnsinformationdescribingthecalculatededgesandthespokeusedbythefunction.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDispose().
ParameterDiscussionedgeOptions—SetedgeOptionstoNULLtousethedefaultoptions,asfollows:
polarity IMAQ_SEARCH_FOR_ALL_EDGESkernelSize 3numSearchLines 3minThreshold 10.0interpolationType IMAQ_BILINEAR_FIXEDcolumnProcessingMode IMAQ_MEDIAN_COLUMNS
imaqStartAcquisitionUsageintimaqStartAcquisition(SESSION_IDsessionID);
PurposeStartsanacquisitionidentifiedbysessionID.Usethisfunctionwithsequenceandringfunctions.
ParametersName Type Description
sessionID SESSION_ID AvalidsessionID.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqStopAcquisitionUsageintimaqStopAcquisition(SESSION_IDsessionID);
PurposeStopsasessionacquisitionidentifiedbysessionID.Usethisfunctionwithgrab,ring,andsequencefunctions.
ParametersName Type Description
sessionID SESSION_ID AvalidsessionID.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqStraightEdgeUsageStraightEdgeReport2*imaqStraightEdge(constImage*image,constROI*roi,SearchDirectionsearchDirection,constEdgeOptions2*edgeOptions,constStraightEdgeOptions*straightEdgeOptions);
PurposeFindsstraightedgesinsideanROIinanimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image constImage* Theimageinwhichtofindedges.
roi constROI* TheROItofindstraightedgesinside.
searchDirection SearchDirection Thedirectiontosearchforstraightlines.Thefirstcontourofroimustbearectangle,rotatedrectangle,ora4-sidedclosedcontour.
edgeOptions constEdgeOptions2* Specifiestheparametersthatareusedtocomputetheedgeprofileanddetectedges.
straightEdgeOptions constStraightEdgeOptions* Specifiestheoptionsusedtofitalineintheroi.
ReturnValueType Description
StraightEdgeReport2* Onsuccess,thisfunctionreturnsastructureofinformationabouttheedgesfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisstructure,disposeofitbycallingimaqDispose().
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
imaqSubtractUsageintimaqSubtract(Image*dest,constImage*sourceA,constImage*sourceB);
PurposeSubtractstwoimages.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_COMPLEX
ParametersName Type Description
dest Image* Thedestinationimage.sourceA constImage* Thefirstimagetosubtract.sourceB constImage* Thesecondimagetosubtract.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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.
imaqSubtractConstantUsageintimaqSubtractConstant(Image*dest,constImage*source,PixelValuevalue);
PurposeSubtractseachpixelinanimagebyaconstant.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_COMPLEX
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Theimagefromwhichthefunctionsubtractsa
scalarconstant.value PixelValue Thevaluetosubtractfromthesourceimage
pixels.Setthememberofvaluethatcorrespondstotheimagetype.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqThresholdUsageintimaqThreshold(Image*dest,constImage*source,floatrangeMin,floatrangeMax,intuseNewValue,floatnewValue);
PurposeThresholdsanimage.Thefunctionsetspixelsvaluesoutsideofthegivenrangeto0.Thefunctionsetspixelvalueswithintherangetoagivenvalueorleavesthevaluesunchanged.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqTrainCharsUsageintimaqTrainChars(constImage*image,CharSet*set,intindex,constchar*charValue,constROI*roi,constOCRProcessingOptions*processingOptions,constOCRSpacingOptions*spacingOptions);
PurposeAssignscharactervaluestotheidentifiableobjectsintheimageandappendsthenewlytrainedcharacterstothecharacterset.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
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
identifiedwithintheROI.Forexample,thecharacterinthefirstpositionofcharValueisthevaluefortheobjectatindex0.IfyousetindextoIMAQ_ALL_OBJECTS,thelengthofcharValuemustmatchthenumberofobjectsidentifiedwithintheROI.
roi constROI* TheROIthatthefunctionperformsthisoperationon.PassNULLtousetheentireimageforthisoperation.
processingOptions constOCRProcessingOptions* Theoptionsyouusetoconfigurehowthefunctionprocessesthecontentsoftheimagebeforeattemptingtoreadtext.
spacingOptions constOCRSpacingOptions* Thesizeandspacingconstraintsyoucanapplytocharactersintheimage.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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
imaqTrainNearestNeighborClassifierUsageNearestNeighborTrainingReport*imaqTrainNearestNeighborClassifier(ClassifierSession*session,constNearestNeighborOptions*options);
PurposeTrainsaclassifierwiththenearestneighborengine.
ParametersName Type Description
session ClassifierSession* Theclassifiersessiontotrain.options constNearestNeighborOptions* Theoptionstousewhen
training.
ReturnValueType Description
NearestNeighborTrainingReport* Onsuccess,thisfunctionreturnsareportcontainingtheresultsofthetraining.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthereportbycallingimaqDispose().
imaqTransformPixelToRealWorldUsageTransformReport*imaqTransformPixelToRealWorld(constImage*image,constPointFloat*pixelCoordinates,intnumCoordinates);
PurposeTransformspixelcoordinatestoreal-worldcoordinates,accordingtothecalibrationinformationcontainedinanimage.
NoteYoumustfirstattachcalibrationinformationtothisimagebyusingoneofthefollowingfunctions:imaqCopyCalibrationInfo2()imaqLearnCalibrationGrid()imaqLearnCalibrationPoints()imaqSetSimpleCalibration()
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
image constImage* Theimagewhosecalibrationinformationthefunctionusestotransformthepixelcoordinates.
pixelCoordinates constPointFloat* Thearrayofpixelcoordinatesthefunctiontransformstoreal-worldcoordinates.ThisparameterisrequiredandcannotbeNULL.
numCoordinates int Thenumberofcoordinatesinthearray.
ReturnValueType Description
TransformReport* Onsuccess,thisfunctionreturnsareportdescribingtherealworldcoordinates.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereport,disposeofitbycallingimaqDispose().
imaqTransformRealWorldToPixelUsageTransformReport*imaqTransformRealWorldToPixel(constImage*image,constPointFloat*realWorldCoordinates,intnumCoordinates);
PurposeTransformsreal-worldcoordinatestopixelcoordinates,accordingtothecalibrationinformationcontainedinanimage.
NoteYoumustfirstattachcalibrationinformationtothisimagebyusingoneofthefollowingfunctions:imaqCopyCalibrationInfo2()imaqLearnCalibrationGrid()imaqLearnCalibrationPoints()imaqSetSimpleCalibration()
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
image constImage* Theimagewhosecalibrationinformationthefunctionusestotransformthereal-worldcoordinates.
realWorldCoordinates constPointFloat* Thearrayofreal-worldcoordinatesthefunctiontransformstopixelcoordinate.ThisparameterisrequiredandcannotbeNULL.
numCoordinates int Thenumberofcoordinatesinthearray.
ReturnValueType Description
TransformReport* Onsuccess,thisfunctionreturnsareportdescribingthepixelcoordinates.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereport,disposeofitbycallingimaqDispose().
imaqTransformROI2UsageintimaqTransformROI2(ROI*roi,constCoordinateSystem*baseSystem,constCoordinateSystem*newSystem);
PurposeRotatesandtranslatesaregionofinterest(ROI)fromonecoordinatesystemtoanothercoordinatesystemwithinanimage.
ParametersName Type Description
roi ROI* TheROItotransform.ThisparameterisrequiredandcannotbeNULL.
baseSystem constCoordinateSystem* Describesthebasecoordinatesystem.ThisparameterisrequiredandcannotbeNULL.
newSystem constCoordinateSystem* Describesthenewcoordinatesystem.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionroi—Ifnecessary,thefunctionconvertsrectanglecontoursinsideroitorotatedrectanglecontours.Ifnecessary,thefunctionconvertsovalcontoursinsideroitoclosedcontours.
imaqTransposeUsageintimaqTranspose(Image*dest,constImage*source);
PurposeTransposesanimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Theimagetotranspose.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqTruncateUsageintimaqTruncate(Image*dest,constImage*source,TruncateModehighlow,floatratioToKeep);
PurposeTruncatesthefrequenciesofacompleximage.
ImageTypesSupportedIMAQ_IMAGE_COMPLEX
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Theimagewhosefrequenciesthefunction
truncates.highlow TruncateMode Specifieswhichfrequenciesthefunction
truncates.ratioToKeep float Specifiesthepercentageoffrequenciesthat
thefunctionretains.Forexample,setthisparameterto10.0toretain10percentofthefrequenciesandattenuate90percentofthefrequencies.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqUnflattenUsageintimaqUnflatten(Image*image,constvoid*data,unsignedintsize);
PurposeConvertsdatareturnedfromimaqFlatten()toanimage.
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
ParametersName Type Description
image Image* Theimageinwhichthefunctionstoresthedata.data constvoid* Thedatatounflatten.Thisparameterisrequiredand
cannotbeNULL.size unsigned
intSizeofthedata,inbytes.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqUnwrapImageUsageintimaqUnwrapImage(Image*dest,constImage*source,Annulusannulus,RectOrientationorientation,InterpolationMethodmethod);
PurposeThisfunctionunwrapsanannulusfromanimageintoarectangularimage.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB
ParametersName Type Description
dest Image* Thedestinationimagefortheunwrappedpixels.
source constImage* Theimagecontainingtheannulusofpixelstobeunwrapped.
annulus Annulus Thecoordinatelocationoftheannulusthefunctionunwraps.
orientation RectOrientation Specifiestheorientationoftheresultingrectangularimagerelativetotheannulus.
method InterpolationMethod Specifiestheinterpolationalgorithmusedintheunwrappingprocess.ValidmethodsareIMAQ_ZERO_ORDERandIMAQ_BILINEAR.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqVerifyPatternsUsageint*imaqVerifyPatterns(constImage*image,constCharSet*set,constString255*expectedPatterns,intpatternCount,constROI*roi,int*numScores);
PurposeVerifiestheaccuracyofthetextintheimage.Foreachpattern,thefunctionchecksfortheexistenceofareferencecharacterfortheexpectedcharacterclassandcomparesthecharacterfromtheimagetothereferencecharacter.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
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.
ReturnValueType Description
int* Onsuccess,thisfunctionreturnsanarrayofverificationscoresforthefirstnumScoreselementsoftheexpectedPatternsarray.Ifareferencecharacterdoesnotexistforthecharacterclassofacharacter,thefunctionsetsthescorecorrespondingtothatcharacterto0.Onfailure,thisfunctionreturnsNULL.TogetextendederrorinformationcallimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().
imaqVerifyTextUsageint*imaqVerifyText(constImage*image,constCharSet*set,constchar*expectedString,constROI*roi,int*numScores);
PurposeVerifiestheaccuracyofthetextintheimage.Foreachcharacter,thefunctionchecksfortheexistenceofareferencecharacterfortheexpectedcharacterclassandcomparesthecharacterfromtheimagetothereferencecharacter.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
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.
ReturnValueType Description
int* Onsuccess,thisfunctionreturnsanarrayofverificationscoresforthefirstnumScorescharactersintheexpectedStringarray.Ifareferencecharacterdoesnotexistforthecharacterclassofacharacter,thefunctionsetsthescorecorrespondingtothatcharacterto0.Onfailure,thisfunctionreturnsNULL.TogetextendederrorinformationcallimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().
imaqView3DUsageintimaqView3D(Image*dest,Image*source,constView3DOptions*options);
PurposeThisfunctioncreatesathree-dimensionalrepresentationofanimagefordisplaypurposes.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_HSL
ParametersName Type Description
dest Image* Thedestinationimage.source Image* Theimageofwhichtocreatea3D
representation.options constView3DOptions* Specifieshowtoconverttheimagetoa
three-dimensionalrepresentation.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.options—SetoptionstoNULLtousethedefaultoptions,asfollows:
sizeReduction 2maxHeight 64direction IMAQ_3D_NWalpha 30beta 30border 20background 85plane IMAQ_3D_MAGNITUDE
imaqWatershedTransformUsageintimaqWatershedTransform(Image*dest,constImage*source,intconnectivity8,int*zoneCount);
PurposeComputesthewatershedtransformonanimage.RefertotheNIVisionConceptsManualformoreinformationaboutwatershedtransform.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Thesourceimage.connectivity8 int Specifieshowthewatershedtransform
algorithmdetermineswhetheranadjacentpixelbelongstothesameordifferentcatchmentorwatershedline.
zoneCount int* Onreturn,specifiesthenumberofzonesdetectedintheimage.Azoneisaregionoftheimageinwhichallofthepixelsbelongtothesamecatchmentbasin.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussiondest—IfdestisoftypeIMAQ_IMAGE_U8,thefunctioncanstoreupto255uniquelabelsnotincludingthewatershedlinevalueof0.IfdestisoftypeIMAQ_IMAGE_I16,thefunctioncanstoreupto32,767uniquelabelsnotincludingthewatershedlinevalueof0.
imaqWriteAVIFrameUsageintimaqWriteAVIFrame(Image*image,AVISessionsession,constvoid*data,unsignedintdataLength);
PurposeThisfunctionwritesanimagetoanAVIfile,aswellasdatatoattachtothisimage(iftheAVIfilewascreatedtoallowthis).
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB
ParametersName Type Description
image Image* TheimagetowritetotheAVI.session AVISession Thesessiontouse.data constvoid* IfthisAVIhasdataattachedtoit,thedatato
attachtothisframe.dataLength unsigned
intIfdataisnon-NULL,thelengthofthedatatoattachtothisframe.ThislengthmustnotexceedthemaxDataLengthparameterofimaqCreateAVI.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqWriteBMPFileUsageintimaqWriteBMPFile(constImage*image,constchar*fileName,intcompress,constRGBValue*colorTable);
PurposeWritesanimagetoaBMPfile.ThefunctionalsostoresaCalibrationUnitofIMAQ_METERonly.IfyoupassanimagetothisfunctionthathasaCalibrationUnitotherthanIMAQ_METER,thefunctionconvertsxStepandyStepfromthesuppliedunitintometers.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB
ParametersName Type Description
image constImage* Theimagetowritetoafile.fileName constchar* Thenameofthefiletowrite.This
parameterisrequiredandcannotbeNULL.
compress int SetthisparametertoTRUEtocompresstheBMP.SetthisparametertoFALSEtowriteanuncompressedBMP.
colorTable constRGBValue* Anoptionalcolortabletoassociatewith8-bitimages.Ifyouwanttoprovideacolortable,thetablemusthave256elements.SetthisparametertoNULLtowriteagrayscalepalettetothefile.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqWriteClassifierFileUsageintimaqWriteClassifierFile(constClassifierSession*session,constchar*fileName,WriteClassifierFileModemode,constString255description);
PurposeWritesaclassifiersessiontofile.
ParametersName Type Description
session constClassifierSession* Theclassifiersessiontowritetofile.
fileName constchar* Thenameofthefiletowrite.ThisparameterisrequiredandcannotbeNULL.
mode WriteClassifierFileMode Themodetousewhenwritingtheclassificationsessiontofile.
description constString255 Adescriptionoftheclassificationsession.SetthisparametertoNULLifyoudonotneedadescriptionforthisfile.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqWriteCustomDataUsageintimaqWriteCustomData(Image*image,constchar*key,constvoid*data,unsignedintsize);
PurposeAssociatessomedatawithatextkeyinanimage.
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
ParametersName Type Description
image Image* Theimageinwhichtowritethecustomdata.key constchar* Thekeyusedtofindthedataintheimage.This
parameterisrequiredandcannotbeNULL.data constvoid* Thedataassociatedwiththekey.Thisparameteris
requiredandcannotbeNULL.size unsigned
intSizeofthedata,inbytes.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqWriteFileUsageintimaqWriteFile(constImage*image,constchar*fileName,constRGBValue*colorTable);
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:
FileTypes ImageTypesAIPD allimagetypesBMP,JPEG 8-bit,RGBPNG,TIFF,JPEG2000 8-bit,16-bit,RGB,RGBU64
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
ParametersName Type Description
image constImage* Theimagetowritetoafile.Thefunctioncannotwriteallimagetypestoallfiletypes.
fileName constchar* Thenameofthefile.ThisparameterisrequiredandcannotbeNULL.
colorTable constRGBValue* Anoptionalcolortabletoassociatewith8-bitimages.Ifyouprovideacolortable,thetablemusthave256elements.SetthisparametertoNULLtowriteagrayscalepalettetotheimage.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqWriteJPEG2000FileUsageintimaqWriteJPEG2000File(constImage*image,constchar*fileName,intlossless,floatcompressionRatio,constJPEG2000FileAdvancedOptions*advancedOptions,constRGBValue*colorTable);
PurposeWritesanimagetoaJPEG2000file.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_RGB_U64
ParametersName Type Description
image constImage* Theimagetowritetoafile.
fileName constchar* Thenameofthefiletowrite.ThisparameterisrequiredandcannotbeNULL.
lossless int SetthisparametertoTRUEtowritetheJPEG2000filewithoutlossofinformation.SetthisparametertoFALSEtowritetheJPEG2000fileasanapproximationtotheimage.
compressionRatio float SpecifiesthedegreetowhichtocompresstheJPEG2000file.Forexample,acompressionRatioof50meansthattheresultingJPEG2000filewillbe50timessmallerthanthesizeoftheimageinmemory.Thisparameteris
ignorediflosslessisTRUE.
advancedOptions constJPEG2000FileAdvancedOptions* SpecifiesadvancedbehaviorswhenwritingaJPEG2000file.
colorTable constRGBValue* Anoptionalcolortabletoassociatewith8-bitimages.Ifyouprovideacolortable,thetablemusthave256elements.SetthisparametertoNULLtowriteagrayscalepalettetotheimage.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionadvancedOptions—SetadvancedOptionstoNULLtousethefollowingdefaultvalues:
waveletMode IMAQ_WAVELET_TRANSFORM_INTEGERuseMultiComponentTransform TRUEmaxWaveletTransformLevel 5quantizationStepSize 0
imaqWriteJPEGFileUsageintimaqWriteJPEGFile(constImage*image,constchar*fileName,unsignedintquality,void*colorTable);
PurposeWritesanimagetoaJPEGfile.ThefunctionalsostoresaCalibrationUnitofIMAQ_CENTIMETERorIMAQ_INCHonly.IfyoupassanimagetothisfunctionthathasametricCalibrationUnitotherthanIMAQ_CENTIMETER,thefunctionconvertsxStepandyStepfromthesuppliedunitintocentimeters.IfyoupassanimagetothisfunctionthathasanEnglishCalibrationUnitotherthanIMAQ_INCH,thefunctionconvertsxStepandyStepfromthesuppliedunitintoinches.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqWriteMultipleGeometricPatternFileUsageintimaqWriteMultipleGeometricPatternFile(constMultipleGeometricPattern*multiplePattern,constchar*fileName,constchar*description);
PurposeWritesamultiplegeometrictemplatetofile.
ParametersName Type Description
multiplePattern constMultipleGeometricPattern* Themultiplegeometrictemplatetowritetofile.ThisparameterisrequiredandcannotbeNULL.
fileName constchar* Thenameofthefiletowrite.ThisparameterisrequiredandcannotbeNULL.
description constchar* Adescriptionoftheclassificationsession.SetthisparametertoNULLifyoudonotneedadescriptionforthisfile.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqWriteOCRFileUsageintimaqWriteOCRFile(constchar*fileName,constCharSet*set,constchar*setDescription,constReadTextOptions*readOptions,constOCRProcessingOptions*processingOptions,constOCRSpacingOptions*spacingOptions);
PurposeStoresacharactersetandthevaluesoftheappropriateNIVisionstructuresinthefilespecifiedbyfileName.
ParametersName Type Description
fileName constchar* Filethatthefunctionusesforthisoperation.ThisparameterisrequiredandcannotbeNULL.
set constCharSet* Thetrainedcharacterstostoreinthefile.SetthisparametertoNULLtowriteanemptycharactersettothefile.
setDescription constchar* Thetrainedcharactersetdescriptiontostoreinthefile.Thedescriptionmustnotexceed255characters.SetthisparametertoNULLifyoudonotneedtostorethisinformation.
readOptions constReadTextOptions* Theoptionsforreadingtexttostoreinthefile.SetthisparametertoNULLtowritethedefaultreadingoptions.
processingOptions constOCRProcessingOptions* Theoptionsforimageprocessingtostoreinthefile.SetthisparametertoNULLtowritethedefaultprocessing
options.spacingOptions constOCRSpacingOptions* Thecharactersize
andspacingoptionstostoreinthefile.SetthisparametertoNULLtowritethedefaultcharactersizeandspacingoptions.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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
minBoundingRectWidth 1maxBoundingRectWidth 65536minBoundingRectHeight 1maxBoundingRectHeight 65536autoSplit FALSE
imaqWritePNGFile2UsageintimaqWritePNGFile2(constImage*image,constchar*fileName,unsignedintcompressionSpeed,constRGBValue*colorTable,intuseBitDepth);
PurposeWritesanimagetoaPNGfile.ThisfunctionstoresanytypeofCalibrationUnitinaformatthatNIVisioncanread.Thisfunctionalsoconvertscalibrationinformationintometers,whichanyPNGfilereadercaninterpret.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_RGB_U64
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
imagesuchthatthelowestnegativepixelvalueintheimagemapstozero,andthenshiftingtheimagedatabasedonthehighestpixelvalueintheimage.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqWriteTIFFFileUsageintimaqWriteTIFFFile(constImage*image,constchar*fileName,constTIFFFileOptions*options,constRGBValue*colorTable);
PurposeWritesanimagetoaTIFFfile.ThisfunctionstoresaCalibrationUnitofIMAQ_CENTIMETERorIMAQ_INCHonly.IfyoupassanimagetothisfunctionthathasametricCalibrationUnitotherthanIMAQ_CENTIMETER,thefunctionconvertsxStepandyStepfromthesuppliedunitintocentimeters.IfyoupassanimagetothisfunctionthathasanEnglishCalibrationUnitotherthanIMAQ_INCH,thefunctionconvertsxStepandyStepfromthesuppliedunitintoinches.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_RGB_U64
ParametersName Type Description
image constImage* Theimagetowritetoafile.fileName constchar* Thenameofthefiletowrite.This
parameterisrequiredandcannotbeNULL.
options constTIFFFileOptions* AstructuredefiningthespecificoptionstousewhilewritingtheTIFFfile.
colorTable constRGBValue* Anoptionalcolortabletoassociatewith8-bitimages.Ifyouprovideacolortable,thetablemusthave256elements.SetthisparametertoNULLtowriteagrayscalepalettetotheimage.IfthecompressionTypeelementofoptionsisIMAQ_JPEG,thefunctionignoresthisparameter.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:
rowsPerStrip 0,whichwritesalldatainonestripphotoInterp IMAQ_BLACK_IS_ZEROcompressionType IMAQ_NO_COMPRESSION
imaqWriteVisionFileUsageintimaqWriteVisionFile(constImage*image,constchar*fileName,constRGBValue*colorTable);
PurposeThisfunctionwritesanimagetoaPNGfile.Inadditiontowritingpixelinformation,thefunctionwritesanyVisioninformationcontainedintheimagetothefile.
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
ParametersName Type Description
image constImage* Theimagetowritetoafile.fileName constchar* Thenameofthefiletowrite.This
parameterisrequiredandcannotbeNULL.
colorTable constRGBValue* Anoptionalcolortabletoassociatewith8-bitimages.Ifyouprovideacolortable,thetablemusthave256elements.SetthisparametertoNULLtowriteagrayscalepalettetotheimage.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqXnorUsageintimaqXnor(Image*dest,constImage*sourceA,constImage*sourceB);
PurposeComputesabitwiseXNORbetweentwoimages.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
dest Image* Thedestinationimage.sourceA constImage* Thefirstsourceimage.sourceB constImage* Thesecondsourceimage,whichmustbethe
sametypeofimageassourceA.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqXnorConstantUsageintimaqXnorConstant(Image*dest,constImage*source,PixelValuevalue);
PurposePerformsabitwiseXNORbetweenanimageandaconstant.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Thesourceimage.value PixelValue ThevaluetoXNORwiththesourceimage.Setthe
memberofvaluethatcorrespondstotheimagetype.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqXorUsageintimaqXor(Image*dest,constImage*sourceA,constImage*sourceB);
PurposeComputesabitwiseXORbetweentwoimages.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
dest Image* Thedestinationimage.sourceA constImage* Thefirstsourceimage.sourceB constImage* Thesecondsourceimage,whichmustbethe
sametypeofimageassourceA.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqXorConstantUsageintimaqXorConstant(Image*dest,constImage*source,PixelValuevalue);
PurposePerformsabitwiseXORbetweenanimageandaconstant.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Thesourceimage.value PixelValue ThevaluetoXORwiththesourceimage.Setthe
memberofvaluethatcorrespondstotheimagetype.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqZoomWindow2UsageintimaqZoomWindow2(intwindowNumber,floatxZoom,floatyZoom,Pointcenter);
PurposeSetsthecurrentzoomfactorsforagivenimagewindow.Thezoomfactorindicatesanincreaseordecreaseinthemagnificationofanimageandthisvalueisexpressedasaratiooftheimagesize.Anumbergreaterthan1indicatesamagnificationbytheamountspecified.Forexample,azoomfactorof3indicatesthattheimageisdisplayedatthreetimesitsactualsize(3:1).Anumberlessthan1indicatesthattheimageisdecreasedinmagnificationbythespecifiedamount.Forexample,azoomfactorof0.2indicatesthattheimageisdisplayedatone-fifthitsactualsize(1:5).
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.xZoom float Thezoomfactorforthexdirection.SetxZoom
tozerotomaintainthecurrentzoomfactorforthexdirection.
yZoom float Thezoomfactorfortheydirection.SetyZoomtozerotomaintainthecurrentzoomfactorfortheydirection.
center Point Thecenterpointaroundwhichtozoom.SetthisparametertoIMAQ_NO_POINTtomaintainthecurrentcenterpoint.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
-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
KernelsAkernelisastructurethatrepresentsapixelanditsrelationshiptoitsneighbors.
PredefinedGradientKernelsPrewittFiltersPrewittfiltershavethefollowingkernels.ThenotationsWest(W),South(S),East(E),andNorth(N)indicatewhichedgesofbrightregionstheyoutline.
SobelFiltersTheSobelfiltersaresimilartothePrewittfilters,excepttheyhighlightlightintensityvariationsalongaparticularaxisthatisassignedastrongerweight.TheSobelfiltershavethefollowingkernels.
Thefollowingtableliststhepredefinedgradient5x5kernels.
Thefollowingtableliststhepredefinedgradient7x7kernels.
PredefinedLaplacianKernelsThefollowingtableslistthepredefinedLaplaciankernels.Laplacian3x3
Laplacian5x5
Laplacian7x7
PredefinedSmoothingKernelsThefollowingtableslistthepredefinedsmoothingkernels.Smoothing3x3
Smoothing5x5
Smoothing7x7
PredefinedGaussianKernelsThefollowingtableslistthepredefinedGaussiankernels.Gaussian3x3
Gaussian5x5
Gaussian7x7
StructuresAstructurestoresacollectionofmultipledatatypesandvaluesasasingleunit.AIMGradeReportAnnulusArcInfoArcInfo2AVIInfoAxisReportBarcode2DInfoBarcodeInfoBCGOptionsBestCircleBestCircle2BestEllipseBestEllipse2BestLineBrowserOptionsCalibrationInfoCalibrationPointsCaliperOptionsCaliperReportCannyOptionsCharacterStatisticsCharInfoCharInfo2CharReportCharReport2CharReport3
CIELabValueCIEXYZValueCircleDescriptorCircleFeatureCircleMatchCircleReportCircularEdgeReportClassifierAccuracyReportClassifierReportClassifierSampleInfoClassScoreClosedContourClosedCurveFeatureColorHistogramReportColorInformationComplexConcentricRakeReportConcentricRakeReport2ConstCurveFeatureConstructROIOptionsConstructROIOptions2ContourInfoContourInfo2ContourPointCoordinateSystemCoordinateTransformCoordinateTransform2CornerFeatureCountObjectsOptions
CurveCurveOptionsDataMatrixDescriptionOptionsDataMatrixOptionsDataMatrixReportDataMatrixSearchOptionsDataMatrixSizeOptionsDetectExtremesOptionsDisplayMappingDrawTextOptionsEdgeInfoEdgeLocationReportEdgeOptionsEdgeOptions2EdgeReportEdgeReport2EllipseDescriptorEllipseFeatureEllipseMatchExtremeReportFeatureDataFindEdgeOptionsFindEdgeOptions2FindEdgeReportFindPatternOptionsFindTransformPatternOptionsFindTransformRectOptionsFindTransformRectOptions2FindTransformRectsOptions
FindTransformRectsOptions2FitCircleOptionsFitEllipseOptionsFitLineOptionsGeometricPatternMatchGeometricPatternMatch2GridDescriptorHistogramReportHSIValueHSLValueHSVValueImageInfoInspectionAlignmentInspectionOptionsJPEG2000FileAdvancedOptionsLCDOptionsLCDReportLCDSegmentsLearnCalibrationOptionsLearnColorPatternOptionsLearnGeometricPatternAdvancedOptionsLearnPatternAdvancedOptionsLearnPatternAdvancedRotationOptionsLearnPatternAdvancedShiftOptionsLegFeatureLineLinearAveragesLineDescriptorLineEquation
LineFeatureLineFloatLineMatchLineProfileMatchColorPatternOptionsMatchGeometricPatternAdvancedOptionsMatchGeometricPatternAdvancedOptions2MatchGeometricPatternOptionsMatchPatternAdvancedOptionsMatchPatternOptionsMeterArcNearestNeighborClassResultNearestNeighborOptionsNearestNeighborTrainingReportObjectReportOCRProcessingOptionsOCRSpacingOptionsOpenContourOverlayTextOptionsPairOfParallelLinePairsFeatureParallelLinePairFeatureParticleClassifierOptionsParticleClassifierPreprocessingOptionsParticleFilterCriteriaParticleFilterCriteria2ParticleFilterOptionsParticleFilterOptions2ParticleReportPatternMatch
PointPointFloatQRCodeDataTokenQRCodeDescriptionOptionsQRCodeReportQRCodeSearchOptionsQRCodeSizeOptionsQuantifyDataQuantifyReportRakeOptionsRakeReportRakeReport2RangeRangeFloatReadTextOptionsReadTextReportReadTextReport2ReadTextReport3RectRectangleDescriptorRectangleFeatureRectangleMatchRGBU64ValueRGBValueROIProfileRotatedRectRotationAngleRangeSearchArcInfoSearchLineInfo
SegmentInfoSelectParticleCriteriaShapeDetectionOptionsShapeReportSimpleEdgeOptionsSpokeOptionsSpokeReportSpokeReport2StraightEdgeStraightEdgeOptionsStraightEdgeReportStraightEdgeReport2StructuringElementThresholdDataTIFFFileOptionsToolWindowOptionsTransformBehaviorsTransformReportUserPointSymbolView3DOptions
UnionsUnionsaredatatypesthatallowdifferentmembervariablestobestoredinthesamememorylocation.Onlyonemembercanbeactiveatanygiventime.ColorColor2ContourUnionGeometricFeaturePixelValue
EnumerationsEnumerationsaredatatypesconsistingofanamedsetofvalues.AIMGradeAttenuateModeAxisOrientationBarcode2DCellShapeBarcode2DContrastBarcode2DSearchModeBarcode2DShapeBarcode2DTypeBarcodeTypeBorderMethodBrowserFrameStyleBrowserLocationButtonLabelCalibrationModeCalibrationROICalibrationUnitClassifierEngineTypeClassifierTypeColorIgnoreModeColorModeColorSensitivityColumnProcessingModeComparisonFunctionComplexPlaneCompressionTypeConcentricRakeDirection
ContourTypeDataMatrixCellFillModeDataMatrixCellFilterModeDataMatrixCellSampleSizeDataMatrixDemodulationModeDataMatrixECCDataMatrixGradingModeDataMatrixMirrorModeDataMatrixPolarityDataMatrixRotationModeDataMatrixSubtypeDetectionModeDirection3DDrawModeEdgeFilterSizeEdgePolaritySearchModeEdgeProcessExtractionModeFeatureTypeFindReferenceDirectionFindTransformModeFlattenTypeFlipAxisFontColorGeometricMatchingModeGroupBehaviorImageFeatureModeImageTypeInterpolationMethod
KernelFamilyLearningModeLevelTypeLinearAveragesModeLineGaugeMethodLocalThresholdMethodMappingMethodMatchingModeMathTransformMethodMeasurementTypeMeasurementValueMeterArcModeMorphologyMethodMulticoreOperationNearestNeighborMethodNearestNeighborMetricNormalizationMethodObjectTypeOutlineMethodPaletteTypeParticleClassifierTypeParticleInfoModeParticleTypePhotometricModePlane3DPointSymbolPolarityTypeQRCellFilterModeQRCellSampleSize
QRDemodulationModeQRDimensionsQRGradingModeQRMirrorModeQRModelTypeQRPolaritiesQRRotationModeQRStreamModeRakeDirectionReadClassifierFileModeReadResolutionReadStrategyRectOrientationReferenceModeRegistrationMethodRoundingModeScalingMethodScalingModeSearchDirectionSearchStrategyShapeModeSizeTypeSkeletonMethodSpokeDirectionStraightEdgeSearchModeTextAlignmentThresholdMethodThresholdModeTIFFCompressionType
ToolTruncateModeTwoEdgePolarityTypeVerticalTextAlignmentVisionInfoTypeVisionInfoType2WaveletTransformModeWindowBackgroundFillStyleWindowBackgroundHatchStyleWindowEventTypeWindowOptionsWindowThreadPolicyWriteClassifierFileMode
GlossaryA B C D E F G H I J L M N O P Q R S
T V W
AAIPD NationalInstrumentsinternalimagefileformatusedfor
savingcomplexandHSLimagesandcalibrationinformationassociatedwithanimage.AIPDimageshavethefileextensionAPD.
alignment Theprocessbywhichamachinevisionapplicationdeterminesthelocation,orientation,andscaleofapartbeinginspected.
areathreshold
Detectsobjectsbasedontheirsize,whichcanfallwithinauser-specifiedrange.
arithmeticoperators
Theimageoperationsmultiply,divide,add,subtract,andremainder.
asynchronous Propertyofafunctionoroperationthatbeginsanoperationandreturnscontroltotheprogrambeforethecompletionorterminationoftheoperation.
auto-medianfunction
Afunctionthatusesdualcombinationsofopeningandclosingoperationstosmooththeboundariesofobjects.
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.
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
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.
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.
Ffeature Ameasurementfromorattributeofasample.featureextraction
Anoperationthatcomputesfeaturesofasample.
featurevector
A1Darrayinwhicheachelementrepresentsadifferentfeatureofasample.
FFT FastFourierTransform.AmethodusedtocomputetheFourierTransformofanimage.
fiducial Areferencepatternonapartthathelpsamachinevisionapplicationfindthepart'slocationandorientationinanimage.
Fourierspectrum
ThemagnitudeinformationoftheFourierTransformofanimage.
FourierTransform
Transformsanimagefromthespatialdomaintothefrequencydomain.
frequencyfilters
Counterpartsofspatialfiltersinthefrequencydomain.Forimages,frequencyinformationisintheformofspatialfrequency.
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.
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.
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.
JJPEG JointPhotographicExpertsGroup.Imagefileformatfor
storing8-bitandcolorimageswithlossycompression.JPEGimageshavethefileextensionJPG.
JPEG2000 Animagefileformatforstoring8-bit,16-bit,orcolorimageswitheitherlossyorlosslesscompression.JPEG2000imageshavethefileextensionJP2.
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.
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.
Nneighbor Apixelwhosevalueaffectsthevaluesofnearbypixels
whenanimageisprocessed.Theneighborsofapixelareusuallydefinedbyakernel.
neighborhoodoperations
Operationsonapointinanimagethattakeintoconsiderationthevaluesofthepixelsneighboringthatpoint.
nonlinearfilter
Replaceseachpixelvaluewithanonlinearfunctionofitssurroundingpixels.
nonlineargradientfilter
Ahighpassedge-extractionfilterthatfavorsverticaledges.
nonlinearPrewittfilter
Ahighpassedge-extractionfilterthatfavorshorizontalandverticaledgesinanimage.
nonlinearSobelfilter
Ahighpassedge-extractionfilterthatfavorshorizontalandverticaledgesinanimage.
Nthorderfilter
Filtersanimageusinganonlinearfilter.Thisfilterorders(orclassifies)thepixelvaluessurroundingthepixelbeingprocessed.ThepixelbeingprocessedissettotheNthpixelvalue,whereNistheorderofthefilter.
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.
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.
Qquantitativeanalysis
Obtainingvariousmeasurementsofobjectsinanimage.
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.
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.
Tthickening Alterstheshapeofobjectsbyaddingpartstotheobjectthat
matchthepatternspecifiedinthestructuringelement.thinning Alterstheshapeofobjectsbyeliminatingpartsoftheobject
thatmatchthepatternspecifiedinthestructuringelement.threshold Separatesobjectsfromthebackgroundbyassigningall
pixelswithintensitieswithinaspecifiedrangetotheobjectandtherestofthepixelstothebackground.Intheresultingbinaryimage,objectsarerepresentedwithapixelintensityof255andthebackgroundissetto0.
thresholdinterval
Twoparameters,thelowerthresholdgray-levelvalueandtheupperthresholdgray-levelvalue.
TIFF TaggedImageFileFormat.Imageformatcommonlyusedforencoding8-bitandcolorimages.TIFFimageshavethefileextensionTIF.
truthtable Atableassociatedwithalogicoperatorthatdescribestherulesusedforthatoperation.
Vvirtualcorner
Acornerthatwouldbecreatediftwonon-intersectinglinesareextendeduntiltheyintersect.
Wwatershedtransform
Amethodofimagesegmentationthatpartitionsanimagebasedonthetopographicsurfaceoftheimage.Theimageisseparatedintonon-overlappingsegmentswitheachsegmentcontainingauniqueparticle.
ImportantInformationWarrantyCopyrightTrademarksPatentsWarningRegardingUseofNIProducts
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
accrues.NationalInstrumentsshallnotbeliableforanydelayinperformanceduetocausesbeyonditsreasonablecontrol.Thewarrantyprovidedhereindoesnotcoverdamages,defects,malfunctions,orservicefailurescausedbyowner'sfailuretofollowtheNationalInstrumentsinstallation,operation,ormaintenanceinstructions;owner'smodificationoftheproduct;owner'sabuse,misuse,ornegligentacts;andpowerfailureorsurges,fire,flood,accident,actionsofthirdparties,orothereventsoutsidereasonablecontrol.
CopyrightUnderthecopyrightlaws,thispublicationmaynotbereproducedortransmittedinanyform,electronicormechanical,includingphotocopying,recording,storinginaninformationretrievalsystem,ortranslating,inwholeorinpart,withoutthepriorwrittenconsentofNationalInstrumentsCorporation.NationalInstrumentsrespectstheintellectualpropertyofothers,andweaskouruserstodothesame.NIsoftwareisprotectedbycopyrightandotherintellectualpropertylaws.WhereNIsoftwaremaybeusedtoreproducesoftwareorothermaterialsbelongingtoothers,youmayuseNIsoftwareonlytoreproducematerialsthatyoumayreproduceinaccordancewiththetermsofanyapplicablelicenseorotherlegalrestriction.
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.
PatentsForpatentscoveringNationalInstrumentsproducts,refertotheappropriatelocation:Help»Patentsinyoursoftware,thepatents.txtfileonyourCD,orni.com/patents.
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
APPLICATIONDESIGNERISULTIMATELYRESPONSIBLEFORVERIFYINGANDVALIDATINGTHESUITABILITYOFNATIONALINSTRUMENTSPRODUCTSWHENEVERNATIONALINSTRUMENTSPRODUCTSAREINCORPORATEDINASYSTEMORAPPLICATION,INCLUDING,WITHOUTLIMITATION,THEAPPROPRIATEDESIGN,PROCESSANDSAFETYLEVELOFSUCHSYSTEMORAPPLICATION.
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.
imaqFindEdgeUsageStraightEdgeReport*imaqFindEdge(Image*image,RotatedRectsearchRect,RakeDirectiondirection,constFindEdgeOptions*options,constCoordinateTransform2*transform);
PurposeLocatesastraightedgeinarectangularsearcharea.Thisfunctionlocatestheintersectionpointsbetweenasetofparallelsearchlinesandtheedgeofanobject.Thefunctiondeterminestheintersectionpointsbasedontheircontrastandslopeandcalculatesabest-fitlinebasedonthesepoints.Usethisfunctionifyouexpecttheanglebetweenthecalculatedlineandthesearchareatobelessthan45degrees.
NoteThisfunctionisobsolete.UseimaqFindEdge2()instead.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
image Image* Theimagewhichthefunctionusestocomputethelocationoftheedge.
searchRect RotatedRect Thecoordinatelocationoftherectangularsearchareathefunctionlooksinfortheedge.
direction RakeDirection Thedirectionthefunctionsearchforedgesalongthesearchlines.
options constFindEdgeOptions* Describeshowtosearchfortheedgeandtheinformationthefunctionoverlaystotheimage.
transform constCoordinateTransform2* AnoptionalspecificationofthecoordinatetransformforsearchRect.Thisparameterspecifieshowtotransformthelocationoftheedgedetectionbasedonthedifferencebetweenthereferencecoordinatesystemandthemeasurementcoordinatesystem.SetthisparametertoNULLifyoudonotneedtotransformsearchRect.
ReturnValueType Description
StraightEdgeReport* Onsuccess,thisfunctionreturnsinformationdescribingthecalculatededge.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDisposeStraightEdgeReport().
ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:
threshold 40width 4steepness 2subsamplingRatio 5showSearchArea FALSEshowSearchLines FALSEshowEdgesFound FALSEshowResult TRUE
NoteimaqFindEdge()onlyoverlaystheedgesusedinthebest-fitlinecalculation.
imaqFindTransformRectUsageintimaqFindTransformRect(Image*image,RotatedRectsearchRect,CoordinateTransform2*transform,FindTransformModemode,constFindTransformRectOptions*options,AxisReport*report);
PurposeComputesacoordinatetransformbasedonthepositionofanobjectinasearchareaofanimage.Thefunctionusesthelocationandorientationofthecoordinatesystemitfindstocreatethereferencesystemofacoordinatetransformortoupdatethemeasurementsystemofanexistingcoordinatetransform.imaqFindTransformRect()usesthefollowingalgorithm.Firstthefunctiondeterminesthepositionofthemainaxisofthecoordinatesystem.Itlocatestheintersectionpointsbetweenasetofparallelsearchlines,orrake,andtheedgeofanobject.Thefunctiondeterminestheintersectionpointsbasedontheircontrast,width,andsteepness.Thefunctioncalculatesabest-fitlineusingthepointsfound.Thislinedefinesthemainaxisofthecoordinatesystem.Thefunctionthenlocatestheintersectionpointsbetweenasetofparallelsearchlinesthatareperpendiculartothemainaxisandtheedgeoftheobject.Itcalculatesahit-linetotheobjectfromtheedgeclosesttothesearchareadetectedandperpendiculartothemainaxis.Thislinedefinesthesecondaryaxisofthecoordinatesystem.Theintersectionbetweenthemainaxisandsecondaryaxisistheoriginofthecoordinatesystem.
NoteThisfunctionisobsolete.UseimaqFindTransformRect2()instead.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
image Image* Theimagewhichthefunctionusestocomputethecoordinatetransform.
searchRect RotatedRect Thecoordinatelocationoftherectangularsearchareathefunctionlooksinfortheobject.
transform CoordinateTransform2* Thecoordinatetransformthefunctionupdatesbasedonthelocationandpositionoftheobject.ThisparameterisrequiredandcannotbeNULL.
mode FindTransformMode Specifieshowthefunctionupdatesthecoordinatetransform.
options constFindTransformRectOptions* Definestheparametersofthealgorithmthefunctionusestolocatetheobjectandtheinformationthefunctionoverlaystotheimage.
report AxisReport* Onreturn,areportdescribingthelocationoftheedgescorrespondingtothemainaxisandthesecondaryaxis.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:
threshold 40width 4steepness 2subsamplingRatio 5mainAxisDirection IMAQ_BOTTOM_TO_TOPsecondaryAxisDirection IMAQ_LEFT_TO_RIGHTshowSearchArea FALSEshowSearchLines FALSEshowEdgesFound FALSEshowResult TRUE
imaqFindTransformRectsUsageintimaqFindTransformRects(Image*image,RotatedRectprimaryRect,RotatedRectsecondaryRect,CoordinateTransform2*transform,FindTransformModemode,constFindTransformRectsOptions*options,AxisReport*report);
PurposeComputesacoordinatetransformbasedonthepositionofanobjectinasearchareaofanimage.Thefunctionusesthelocationandorientationofthecoordinatesystemitfindstocreatethereferencesystemofacoordinatetransformortoupdatethemeasurementsystemofanexistingcoordinatetransform.imaqFindTransformRects()usesthefollowingalgorithm.Firstthefunctiondeterminesthepositionofthemainaxisofthecoordinatesystem.Itlocatestheintersectionpointsbetweenasetofparallelsearchlinesintheprimaryrectangleandtheedgeofanobject.Thefunctiondeterminestheintersectionpointsbasedontheircontrast,width,andsteepness.Thefunctioncalculatesabest-fitlinethroughthepointsfound.Thislinedefinesthemainaxisofthecoordinatesystem.Theprocessisrepeatedperpendicularlyinthesecondaryrectangleinordertolocatethesecondaryaxis.Theintersectionbetweenthemainaxisandthesecondaryaxisistheoriginofthecoordinatesystem.
NoteThisfunctionisobsolete.UseimaqFindTransformRects2()instead.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
image Image* Theimagewhichthefunctionusestocomputethecoordinatetransform.
primaryRect RotatedRect Specifiestherectangularsearchareathefunctionlooksinfortheobjectedgecorrespondingtothemainaxis.
secondaryRect RotatedRect Specifiestherectangularsearchareathefunctionlooksinfortheobjectedgecorrespondingtothesecondaryaxis.
transform CoordinateTransform2* Thecoordinatetransformthefunctionupdatesbasedonthelocationandpositionoftheobject.ThisparameterisrequiredandcannotbeNULL.
mode FindTransformMode Specifieshowthefunctionupdatesthecoordinatetransform.
options constFindTransformRectsOptions* Definestheparametersofthealgorithmthefunctionusestolocatetheobjectandthe
informationthefunctionoverlaystotheimage.
report AxisReport* Onreturn,areportdescribingthelocationoftheedgescorrespondingtothemainaxisandthesecondaryaxis.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:
primaryThreshold 40primaryWidth 4primarySteepness 2primarySubsamplingRatio 5secondaryThreshold 40secondaryWidth 4secondarySteepness 2secondarySubsamplingRatio 5mainAxisDirection IMAQ_BOTTOM_TO_TOPsecondaryAxisDirection IMAQ_LEFT_TO_RIGHTshowSearchArea FALSEshowSearchLines FALSEshowEdgesFound FALSEshowResult TRUE
imaqAddRotatedRectContourUsageContourIDimaqAddRotatedRectContour(ROI*roi,RotatedRectrect);
PurposeThisfunctioncreatesanewregionofinterest(ROI)contourthatrepresentsarotatedrectangleandaddsittotheprovidedROI.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqAddRotatedRectContour2(),whichcorrectsanumericalerrorthatexistsinthisversionofthefunction.
ParametersName Type Description
roi ROI* TheROItocontainthenewcontour.rect RotatedRect Thecoordinatelocationinformationfortherotated
rectangle.
ReturnValueType Description
ContourID Onsuccess,thisfunctionreturnsaContourIDforthecontour.YoucanusetheContourIDtoreferencethecontourwithinthecontainingROI.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqAutoThresholdUsageThresholdData*imaqAutoThreshold(Image*dest,Image*source,intnumClasses,ThresholdMethodmethod);
PurposeAutomaticallythresholdsanimageintomultipleclasses.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqAutoThreshold2(),whichincorporatesthefunctionalityofimaqAutoThreshold()buthasamaskparameterthatenablesyoutocontrolwhichpixelsthefunctionthresholds.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
dest Image* Thedestinationimage.source Image* Theimagetothreshold.numClasses int Thenumberofclassesintowhichto
thresholdtheimage.Validvaluesrangefrom2to256.
method ThresholdMethod Themethodforbinarythresholding.IfnumClassesis2(abinarythreshold),methodspecifieshowtocalculatetheclasses.IfnumClassesisnot2,thefunctionignoresthisparameter.
ReturnValueType Description
ThresholdData* Onsuccess,thisfunctionreturnsanarrayofstructuresprovidinginformationaboutthethresholdrangesthatthefunctionapplied.ThearraycontainsanumberofThresholdDatastructuresequaltonumClasses.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththearray,disposeofitbycallingimaqDispose().
imaqChangeColorSpaceUsageColorimaqChangeColorSpace(constColor*sourceColor,ColorModesourceSpace,ColorModedestSpace);
PurposeMapsthevalueofacolorinonecolorspaceintothevalueofthesamecolorinanothercolorspace.
NoteThisfunctiondoesnotsupporttheCIEL*a*b*orCIEXYZcolormodes.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqChangeColorSpace2().
ParametersName Type Description
sourceColor constColor* Thecolorinthesourcespace.ThisparameterisrequiredandcannotbeNULL.
sourceSpace ColorMode Thesourcecolorspace.destSpace ColorMode Thedestinationcolorspace.
ReturnValueType Description
Color Onsuccess,thisfunctionreturnsthevalueofthecolorinthedestinationcolorspace.Onfailure,thisfunctionreturnsblack.Togetextendederrorinformation,callimaqGetLastError().
imaqCirclesUsageCircleReport*imaqCircles(Image*dest,constImage*source,floatminRadius,floatmaxRadius,int*numCircles);
PurposeSeparatesoverlappingcircularobjectsandclassifiesthemdependingontheirradii.Thisfunctionalsodrawsthedetectedcirclesintothedestinationimage.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqFindCircles(),whichreturnsonlycirclesthatmeettheminimumandmaximumradiusrequirements.
ImageTypesSupportedIMAQ_IMAGE_U8
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.
ReturnValueType Description
CircleReport* Onsuccess,thisfunctionreturnsanarrayofstructurescontaininginformationabouteachofthefoundcircles.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththearray,disposeofitbycallingimaqDispose().
imaqColorHistogramUsageColorHistogramReport*imaqColorHistogram(Image*image,intnumClasses,ColorModemode,constImage*mask);
PurposeCalculatesthehistogram,orpixeldistribution,ofacolorimage.
NoteThisfunctiondoesnotsupporttheCIEL*a*b*orCIEXYZcolormodes.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqColorHistogram2().
ImageTypesSupportedIMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
image Image* Theimagewhosehistogramthefunctioncalculates.
numClasses int Thenumberofclassesintowhichthefunctionseparatesthepixels.
mode ColorMode Thecolorspaceinwhichtoperformthehistogram.
mask constImage* Anoptionalmaskimage.ThisimagemustbeanIMAQ_IMAGE_U8image.Thefunctioncalculatesthehistogramusingonlythosepixelsintheimagewhosecorrespondingpixelsinthemaskarenon-zero.SetthisparametertoNULLtocalculatethehistogramoftheentireimage.
ReturnValueType Description
ColorHistogramReport* Onsuccess,thisfunctionreturnsareportdescribingtheclassificationofeachplaneinaHistogramReport.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereport,disposeofitbycallingimaqDispose().
imaqConcentricRakeUsageConcentricRakeReport*imaqConcentricRake(constImage*image,constROI*roi,ConcentricRakeDirectiondirection,EdgeProcessprocess,constRakeOptions*options);
PurposeFindsedgesalongconcentriccircularorannularpathsintheimage.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqConcentricRake2().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image constImage* Theimageinwhichtofindedges.roi constROI* Theannularregionthefunctionlooks
infortheedges.Thefirstcontourofroimustbeanannulus.
direction ConcentricRakeDirection Thedirectionthefunctionsearchesforedgesalongthesearchlines.
process EdgeProcess Definestheedgesforwhichthefunctionlooks.
options constRakeOptions* Describeshowtosearchfortheedges.
ReturnValueType Description
ConcentricRakeReport* Onsuccess,thisfunctionreturnsinformationdescribingthecalculatededgesandtheconcentricrakeusedbythefunction.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDispose().
ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:
threshold 40width 4steepness 2subsamplingRatio 5subpixelType IMAQ_QUADRATICsubpixelDivisions 1
imaqConstructROIUsageintimaqConstructROI(constImage*image,ROI*roi,ToolinitialTool,constToolWindowOptions*tools,constConstructROIOptions*options,int*okay);
PurposeDisplaystheimageinamodalwindowandallowstheusertodrawaregionofinterest(ROI)onit.AftertheuserdrawstheROI,thefunctionclosesthewindow.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqConstructROI2().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionoptions—SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:
windowNumber IMAQ_MODAL_DIALOGwindowTitle "ROIConstructor"type IMAQ_PALETTE_GRAYpalette NULLnumColors 0
imaqConvexUsageintimaqConvex(Image*dest,constImage*source);
PurposeComputestheconvexenvelopeforeachlabeledparticleinthesourceimage.Ifthesourceimagecontainsmorethanoneparticle,youmustlabeleachparticlewithimaqLabel()beforecallingthisfunction.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqConvexHull(),whichallowsyoutospecifytheconnectivityofyourparticles.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Theimagecontainingthelabeledparticleswhose
convexenvelopesthefunctioncalculates.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqConvolveUsageintimaqConvolve(Image*dest,Image*source,constfloat*kernel,intmatrixRows,intmatrixCols,floatnormalize,constImage*mask);
PurposeAppliesalinearfiltertoanimagebyconvolvingtheimagewithafilteringkernel.Theconvolutionkernelmusthaveanoddwidthandheight.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqConvolve2().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqCoordinateReferenceUsageintimaqCoordinateReference(constPoint*points,ReferenceModemode,Point*origin,float*angle);
PurposeBuildsareferenceforanyarbitrarycoordinatesystemwithrespecttotheimageplane.Thereferenceofthecoordinatesystemisspecifiedasthepositionoftheoriginofthecoordinatesystemandtheorientationofitsx-axiswithrespecttothatoftheimageplane.ACoordinateSystemaccountsforthedirectionofthey-axis,whichimaqCoordinateReference()doesnotaccountfor.Inaddition,aCoordinateSystemusesaPointFloattorepresenttheorigin,whichallowsforincreasedaccuracy.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqBuildCoordinateSystem(),whichusesanewstructurecalledaCoordinateSystem.
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqCopyCalibrationInfoUsageintimaqCopyCalibrationInfo(Image*dest,constImage*source);
PurposeCopiescalibrationinformationfromacalibratedimagetoanuncalibratedimage.Bothimagesmustbethesamesize.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqCopyCalibrationInfo2().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_U16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
dest Image* Theimagewhosecalibrationinformationthefunctionsets.
source constImage* Thecalibratedimagethatcontainsthecalibrationinformationthefunctioncopiestothedestinationimage.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqCreateOverlayFromMetafileUsageOverlay*imaqCreateOverlayFromMetafile(constvoid*metafile);
PurposeCreatesawindowoverlayfromaWindowsmetafileorenhancedmetafile.Thisfunctionisobsolete.YoushoulduseimaqOverlayMetafile()instead.Thenewfunctionoverlaysthemetafiledirectlyontotheimageinsteadofreturninganoverlay.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqOverlayMetafile(),whichoverlaysthemetafiledirectlyontotheimageinsteadofreturninganoverlay.
ParametersName Type Description
metafile constvoid* TheWindowshandletothemetafilethatyouwanttoconvertintoanoverlay.ThehandlemaybeeitheranHMETAFILEorHENHMETAFILE.
ReturnValueType Description
Overlay* Onsuccess,thisfunctionreturnsanoverlay.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeoverlay,disposeofitbycallingimaqDispose().
imaqCreateOverlayFromROIUsageOverlay*imaqCreateOverlayFromROI(constROI*roi);
PurposeCreatesawindowoverlayfromaregionofinterest(ROI).Thisfunctionisobsolete.YoushoulduseimaqOverlayROI()instead.ThenewfunctionoverlaystheROIdirectlyontotheimageinsteadofreturninganoverlay.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqOverlayROI(),whichoverlaystheROIdirectlyontotheimageinsteadofreturninganoverlay.
ParametersName Type Description
roi constROI* Theregionofinteresttoconvertintoanoverlay.
ReturnValueType Description
Overlay* Onsuccess,thisfunctionreturnsanoverlay.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeoverlay,disposeofitbycallingimaqDispose().
imaqDivideUsageintimaqDivide(Image*dest,constImage*sourceA,constImage*sourceB);
PurposeDividestwoimages.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqDivide2().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB
ParametersName Type Description
dest Image* Thedestinationimage.sourceA constImage* Thefirstimagetodivide.sourceB constImage* Thesecondimagetodivide.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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.
imaqDivideConstantUsageintimaqDivideConstant(Image*dest,constImage*source,PixelValuevalue);
PurposeDivideseachpixelinanimagebyaconstant.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqDivideConstant2().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB
ParametersName Type Description
dest Image* Thedestinationimage.source constImage* Theimagebywhichthefunctiondividesascalar
constant.value PixelValue Thevaluebywhichthefunctiondividesthesource
image.Setthememberofvaluethatcorrespondstotheimagetype.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqEdgeToolUsageEdgeReport*imaqEdgeTool(constImage*image,constPoint*points,intnumPoints,constEdgeOptions*options,int*numEdges);
PurposeFindsedgesalongapathinanimage.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqEdgeTool2().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image constImage* Theimageinwhichtofindtheedges.points constPoint* Thepathalongwhichthefunction
detectsedges.ThisparameterisrequiredandcannotbeNULL.
numPoints int Thenumberofpointsinthepointsarray.options constEdgeOptions* Describeshowyouwantthefunctionto
findedges.ThisparameterisrequiredandcannotbeNULL.
numEdges int* Onreturn,thenumberofedgesthatthefunctionfound.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
EdgeReport* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachedge.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthisfunctionbycallingimaqDispose().
imaqEdgeTool2UsageEdgeReport*imaqEdgeTool2(constImage*image,constPoint*points,intnumPoints,EdgeProcessprocess,constEdgeOptions*options,int*numEdges);
PurposeFindsedgesalongapathinanimage.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqEdgeTool3()instead.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
EdgeReport* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachedge.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthisfunctionbycallingimaqDispose().
imaqEdgeTool3UsageEdgeReport2*imaqEdgeTool3(constImage*image,constROI*roi,EdgeProcessprocessType,constEdgeOptions2*edgeOptions);
PurposeFindsedgesalonganROIinanimage.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqEdgeTool4().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image constImage* Theimageinwhichtofindtheedges.
roi constROI* TheROItofindedgesalong.processType EdgeProcess Theedgeprocesstype.edgeOptions constEdgeOptions2* Specifiestheparametersthatare
usedtocomputetheedgeprofileanddetectedges.
ReturnValueType Description
EdgeReport2* Onsuccess,thisfunctionreturnsastructureofinformationabouttheedgesfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisstructure,disposeofitbycallingimaqDispose().
ParameterDiscussionedgeOptions—SetedgeOptionstoNULLtousethefollowingdefaultvalues:
polarity IMAQ_SEARCH_FOR_ALL_EDGESkernelSize 3width 3minThreshold 10.0interpolationType IMAQ_BILINEAR_FIXEDcolumnProcessingMode IMAQ_MEDIAN_COLUMNS
imaqFitCircleUsageintimaqFitCircle(constPointFloat*points,intnumPoints,BestCircle*circle);
PurposeFindsthecirclethatbestrepresentsthesetofpoints.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqFitCircle2().
ParametersName Type Description
points constPointFloat* Thearrayofpointstofittotheedgeofthecircle.
numPoints int Thenumberofpointsinthesuppliedarray.Youmustsupplyatleastthreepoints.
circle BestCircle* Onreturn,astructuredescribingthecirclethatbestfitthepoints.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqFitEllipseUsageintimaqFitEllipse(constPointFloat*points,intnumPoints,BestEllipse*ellipse);
PurposeFindstheellipsethatbestrepresentsthesetofpoints.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqFitEllipse2().
ParametersName Type Description
points constPointFloat* Thearrayofpointstofittotheedgeoftheellipse.
numPoints int Thenumberofpointsinthesuppliedarray.Youmustsupplyatleastsixpoints.
ellipse BestEllipse* Onreturn,astructuredescribingtheellipsethatbestfitthepoints.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetCalibrationInfoUsageintimaqGetCalibrationInfo(constImage*image,CalibrationUnit*unit,float*xDistance,float*yDistance);
PurposeReturnsthecalibrationinformationofanimage.Thisfunctionisobsolete.ThereplacementfunctionisimaqGetCalibrationInfo2(),whichincorporatesthefunctionalityofimaqGetCalibrationInfo()withthegridelementoftheCalibrationInfostructure.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqGetCalibrationInfo2(),whichincorporatesthefunctionalityofimaqGetCalibrationInfo()withthegridelementoftheCalibrationInfostructure.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqGetCharInfoUsageCharInfo*imaqGetCharInfo(constCharSet*set,intindex);
PurposeReturnsinformationaboutaparticulartrainedcharacter.Thestructurethatthefunctionreturnscontainsacopyofthedatafromthecharacterset.Modificationstotheinformationinthestructuredonotaffectthecharacterset.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqGetCharInfo2().
ParametersName Type Description
set constCharSet* Thecharactersetthisfunctionoperateson.Tocreateacharacterset,useimaqCreateCharSet().ThisparameterisrequiredandcannotbeNULL.
index int Theindexofatrainedcharacterinthecharactersetfromwhichthefunctiongetsinformation.
ReturnValueType Description
CharInfo* Onsuccess,thisfunctionreturnsareportthatcontainsinformationaboutthecharacter.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyoufinishwiththecharacterinformation,callimaqDispose()todisposeofit.
imaqGetContourInfoUsageContourInfo*imaqGetContourInfo(constROI*roi,ContourIDid);
PurposeReturnsinformationaboutaparticularcontour.Thestructurethatthefunctionreturnscontainsacopyofthedatafromthecontour.Modificationstotheinformationinthestructuredonotaffectthecontour.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqGetContourInfo2(),whichreturnsanewstructurecalledContourInfo2.Thisnewstructureaccountsforthetwonewcontourtypes—theannulusandtherotatedrectangle.UsingimaqGetContourInfotogetinformationaboutoneofthenewcontourtypesreturnsmisleadinginformation.
ParametersName Type Description
roi constROI* Theregionofinterest(ROI)containingthecontourfromwhichthefunctiongetstheinformation.
id ContourID TheContourIDofthecontouraboutwhichthefunctiongetsinformation.
ReturnValueType Description
ContourInfo* Onsuccess,thisfunctionreturnsapointertothestructurecontaininginformationabouttherequestedcontour.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisstructure,disposeofthepointerbycallingimaqDispose().
imaqGetParticleInfoUsageParticleReport*imaqGetParticleInfo(Image*image,intconnectivity8,ParticleInfoModemode,int*reportCount);
PurposeCalculatesvariousmeasurementsofparticlesinabinaryimage.
NoteThisfunctionisobsolete.UseimaqCountParticles()andimaqMeasureParticle()togetinformationaboutparticlesinyourimage.
ImageTypesSupportedIMAQ_IMAGE_U8
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.
ReturnValueType Description
ParticleReport* Onsuccess,thisfunctionreturnsapointertoanarrayofreportsabouttheparticlesintheimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisdata,disposeofthearraybycallingimaqDispose().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqGetWindowZoomUsageintimaqGetWindowZoom(intwindowNumber,int*xZoom,int*yZoom);
PurposeRetrievesthecurrentzoomfactorsforagivenimagewindow.Thezoomfactorindicatesanincreaseordecreaseinthemagnificationofanimage.Apositivenumberindicatesamagnificationbytheamountspecified.Forexample,azoomfactorof3indicatesthattheimageisdisplayedatthreetimesitsactualsize(3:1).Anegativenumberindicatesthattheimageisdecreasedinmagnificationbythespecifiedamount.Forexample,azoomfactorof—5indicatesthattheimageisdisplayedatone-fifthitsactualsize(1:5).
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqGetWindowZoom2().
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.xZoom int* Onreturn,thecurrentzoomfactorinthex
directionforthewindow.yZoom int* Onreturn,thecurrentzoomfactorinthey
directionforthewindow.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqIsVisionInfoPresentUsageintimaqIsVisionInfoPresent(constImage*image,VisionInfoTypetype,int*present);
PurposeRetrieveswhetherthegivenimagecontainstherequestedVisioninformation.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqGetVisionInfoTypes(),whichretrievesallavailabletypesinonecall.Thenewfunctionalsorevealsmoredetailedinformation.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
image constImage* TheimagethatthefunctionchecksforthepresenceofVisioninformation.
type VisionInfoType TheVisioninformationforwhichthefunctionchecks.
present int* Onreturn,thisparameterisTRUEiftheVisioninformationspecifiedbytypeispresentintheimageandFALSEiftheinformationisnotcontainedintheimage.ThisparameterisrequiredandcannotbeNULL.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqLabelUsageintimaqLabel(Image*dest,Image*source,intconnectivity8,int*particleCount);
PurposeLabelstheparticlesinabinaryimagebyapplyingauniquevaluetoallpixelswithinaparticle.Thisvalueisencodedin8or16bits,dependingontheimagetype.Thefunctioncanlabel255particlesinan8-bitimageand65,535particlesina16-bitimage.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqLabel2().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqLearnPatternUsageintimaqLearnPattern(Image*image,LearningModelearningMode);
PurposeThemodeinwhichthefunctionlearnsthetemplateimage.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqLearnPattern2().
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
image Image* Theimageaboutwhichthefunctionlearnspatternmatchinginformation.Thefunctionappendsthepatternmatchinginformationtotheimage.
learningMode LearningMode Themodeinwhichthefunctionlearnsthetemplateimage.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqLearnPattern2UsageintimaqLearnPattern2(Image*image,LearningModelearningMode,LearnPatternAdvancedOptions*advancedOptions);
PurposeCreatesadescriptionofthetemplateimageyouwanttosearchforduringthematchingphase.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqLearnPattern3().
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
image Image* Theimageaboutwhichthefunctionlearnspatternmatchinginformation.Thefunctionappendsthepatternmatchinginformationtotheimage.
learningMode LearningMode Themodeinwhichthefunctionlearnsthetemplateimage.
advancedOptions LearnPatternAdvancedOptions* Advancedoptionstothealgorithm.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqLinearAveragesUsageLinearAverages*imaqLinearAverages(constImage*image,Rectrect);
PurposeComputesthemeanlineprofileofanimage.Thisfunctionisobsolete.ThereplacementfunctionisimaqLinearAverages2,whichallowsyoutoselectwhichmeanlineprofilesthefunctioncomputes.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqLinearAverages2().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image constImage* Theimageonwhichthefunctioncalculatespixelvalueaverages.
rect Rect Setstherectangularareainwhichthefunctioncalculatestheaverages.SetthisparametertoIMAQ_NO_RECTtocalculatetheaveragesonthewholeimage.
ReturnValueType Description
LinearAverages* Onsuccess,thisfunctionreturnsastructurecontainingthelinearaveragesoftheimage.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().
imaqLineGaugeToolUsageintimaqLineGaugeTool(constImage*image,Pointstart,Pointend,LineGaugeMethodmethod,constEdgeOptions*edgeOptions,constCoordinateTransform*reference,float*distance);
PurposeMeasuresthedistancebetweenselectededgesofalinewithhigh-precisionsubpixelaccuracy.Thisfunctionhastheabilitytoworkonarotatedortranslatedparticle.Ifyousupplycoordinatetransforminformation,thefunctiontransformsthelineinformationyoupassfromthecoordinatesystemoftheparticletothecoordinatesystemoftheimage.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqLineGaugeTool2(),whichusestheCoordinateTransform2structuretoaccountforthedirectionofthey-axisinacoordinatesystem.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqLoadPatternUsageintimaqLoadPattern(Image*pattern,constchar*fileName);
PurposeLoadsatemplateimagepreviouslysavedwiththeimaqSavePattern()function.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqReadVisionFile(),whichcanloadfilesthatcontainadditionalvisioninformationsuchasanoverlay.FilessavedwithimaqWriteVisionFile()cannotbeloadedusingimaqLoadPattern().
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
pattern Image* Thetemplateimage.fileName constchar* Thenameoftheimagefiletoload.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqMatchGeometricPatternUsageGeometricPatternMatch*imaqMatchGeometricPattern(constImage*image,constImage*pattern,constCurveOptions*curveOptions,constMatchGeometricPatternOptions*matchOptions,constMatchGeometricPatternAdvancedOptions*advancedMatchOptions,constROI*roi,int*numMatches);
PurposeSearchesforareasinanimagethatmatchagivengeometrictemplateimage.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqMatchGeometricPattern2().
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
image constImage* Theimageinwhichthefunctionfindsmatchestothetemplateimage.
pattern constImage* Thepatterntofindintheimage.
curveOptions constCurveOptions* Describeshowthefunctionidentifiesthecurvesintheimagethefunctionwillusetomatchthetemplateimage.ThisfunctiondoesnotsupportidentifyingcurveswithsubpixelaccuracyandthereforeignoresthesubpixelAccuracyelementofthisparameter.SetthisparametertoNULLtousethesamecurveoptionstomatchthetemplateimageasyouusedtolearnthetemplateimage.
matchOptions constMatchGeometricPatternOptions* Describeshowtosearchforthetemplateimage.
advancedMatchOptions constMatchGeometricPatternAdvancedOptions* Specifiesadvancedbehaviorsofthefunction,whichcanbeusedtooptimizetheperformanceofthefunctionortofine-tunethematcheslocatedbythefunction.
roi constROI* Specifieswhere,inimagefunctionsearchesforthetemplateimage.Thefirstcontourofbearectangleorarotatedrectangle.SetthisparametertoNULLtospecifythatthefunctionsearchesintheentireimage.
numMatches int* Onreturn,thenumberofmatchestothetemplateimagethatthefunctionfound.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
GeometricPatternMatch* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().
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
imaqMatchPatternUsagePatternMatch*imaqMatchPattern(constImage*image,Image*pattern,constMatchPatternOptions*options,RectsearchRect,int*numMatches);
PurposeSearchesforareasinanimagethatmatchagiventemplateimage.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqMatchPattern2().
ImageTypesSupportedIMAQ_IMAGE_U8
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.
ReturnValueType Description
PatternMatch* Onsuccess,thisfunctionreturnsanarrayofinformationabouteachmatchfound.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofthepointerbycallingimaqDispose().
ParameterDiscussionoptions—,SettheoptionsparametertoNULLtousethedefaultoptions,asfollows:
mode IMAQ_MATCH_SHIFT_INVARIANTminContrast 10subpixelAccuracy FALSEangleRanges NULL(allanglesallowed)numRanges 0numMatchesRequested 1matchFactor 0minMatchScore 800
imaqParticleFilterUsageintimaqParticleFilter(Image*dest,Image*source,constParticleFilterCriteria*criteria,intcriteriaCount,intrejectMatches,intconnectivity8);
PurposeFiltersparticlesbasedontheirmorphologicalmeasurements.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqParticleFilter2().
ImageTypesSupportedIMAQ_IMAGE_U8
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,
BinaryMorphology,intheNIVisionConceptsManual.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqParticleFilter2UsageintimaqParticleFilter2(Image*dest,Image*source,constParticleFilterCriteria2*criteria,intcriteriaCount,intrejectMatches,intconnectivity8,int*numParticles);
PurposeFiltersparticlesbasedontheirmorphologicalmeasurements.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqParticleFilter3().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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
particlesleftintheimage.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.
imaqParticleFilter3UsageintimaqParticleFilter3(Image*dest,Image*source,constParticleFilterCriteria2*criteria,intcriteriaCount,constParticleFilterOptions*options,constROI*roi,int*numParticles);
PurposeFiltersparticlesbasedontheirmorphologicalmeasurements.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqParticleFilter4().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
ParameterDiscussionsource—Thisfunctionmodifiesthesourceimage.Ifyouneedtheoriginalimage,createacopyoftheimageusingimaqDuplicate()beforeusingthisfunction.options—SetoptionstoNULLtousethefollowingdefaultvalues:
rejectMatches FALSErejectBorder FALSEconnectivity8 TRUE
imaqRakeUsageRakeReport*imaqRake(constImage*image,constROI*roi,RakeDirectiondirection,EdgeProcessprocess,constRakeOptions*options);
PurposeFindsedgesalongasetofparallellinesdefinedinsidearectangularregion.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqRake2().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image constImage* Theimageinwhichtofindedges.roi constROI* Therectangularregionthefunctionlooks
infortheedges.Thefirstcontourofroimustbearectangleorarotatedrectangle.
direction RakeDirection Thedirectionthefunctionsearchesforedgesalongthesearchlines.
process EdgeProcess Definestheedgesforwhichthefunctionlooks.
options constRakeOptions* Describeshowtosearchfortheedges.
ReturnValueType Description
RakeReport* Onsuccess,thisfunctionreturnsinformationdescribingthecalculatededgesandtherakeusedbythefunction.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDispose().
ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:
threshold 40width 4steepness 2subsamplingRatio 5subpixelType IMAQ_QUADRATICsubpixelDivisions 1
imaqReadDataMatrixBarcodeUsageBarcode2DInfo*imaqReadDataMatrixBarcode(constImage*image,constROI*roi,constDataMatrixOptions*options,unsignedint*numBarcodes);
PurposeReadsDataMatrixbarcodesfromanimage.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqReadDataMatrixBarcode2(),whichusesanincreaseininputparameterstoofferbetterreliabilityandperformance,aswellastheabilitytoprepareimagesfordatamatrixgrading.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
image constImage* Theimagecontainingthebarcodestoread.
roi constROI* Aregionofinterestspecifyingthelocationofthebarcodesintheimage.Thefirstcontourofroimustbearectangle,rotatedrectangle,oval,annulusorclosedcontour.SetthisparametertoNULLtousetheentireimage.
options constDataMatrixOptions* DescribeshowtosearchfortheDataMatrixbarcode.
numBarcodes unsignedint* Onreturn,thenumberofbarcodesthatthefunctionfound.SetthisparametertoNULLifyoudonotneedthisinformation.
ReturnValueType Description
Barcode2DInfo* Onsuccess,thisfunctionreturnsanarrayofstructurescontaininginformationaboutthebarcodes.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththisarray,disposeofitbycallingimaqDispose().
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
imaqReadTextUsageReadTextReport*imaqReadText(constImage*image,constCharSet*set,constROI*roi,constReadTextOptions*readOptions,constOCRProcessingOptions*processingOptions,constOCRSpacingOptions*spacingOptions);
PurposeReadsthetextfromtheimage.Thefunctionidentifiesallobjectsintheimagebasedontheattributesthatyouset,andthencompareseachobjectwitheverytrainedcharacter.Foreachobject,thefunctionselectsthecharacterthatmostcloselymatchestheobject.Thefunctionusesthesubstitutioncharacterforanyobjectthatdoesnotmatchanyofthetrainedcharacters.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqReadText2().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
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.
ReturnValueType Description
ReadTextReport* Onsuccess,thisfunctionreturnsareportthatcontainsinformationaboutthetextcontainedintheimage.Onfailure,thefunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyoufinishwiththecharacterinformation,callimaqDispose()todisposeofit.
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
minBoundingRectWidth 1maxBoundingRectWidth 65536minBoundingRectHeight 1maxBoundingRectHeight 65536autoSplit FALSE
imaqReadText2UsageReadTextReport2*imaqReadText2(constImage*image,constCharSet*set,constROI*roi,constReadTextOptions*readOptions,constOCRProcessingOptions*processingOptions,constOCRSpacingOptions*spacingOptions);
PurposeReadsthetextfromtheimage.Thefunctionidentifiesallobjectsintheimagebasedontheattributesthatyouset,andthencompareseachobjectwitheverytrainedcharacter.Foreachobject,thefunctionselectsthecharacterthatmostcloselymatchestheobject.Thefunctionusesthesubstitutioncharacterforanyobjectthatdoesnotmatchanyofthetrainedcharacters.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqReadText3().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
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.
ReturnValueType Description
ReadTextReport2* Onsuccess,thisfunctionreturnsareportthatcontainsinformationaboutthetextcontainedintheimage.Onfailure,thefunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyoufinishwiththereport,callimaqDispose()todisposeofit.
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
minBoundingRectWidth 1maxBoundingRectWidth 65536minBoundingRectHeight 1maxBoundingRectHeight 65536autoSplit FALSE
imaqRotateUsageintimaqRotate(Image*dest,constImage*source,floatangle,PixelValuefill,InterpolationMethodmethod);
PurposeRotatesanimagecounterclockwise.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqRotate2().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_RGB
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSavePatternUsageintimaqSavePattern(constImage*pattern,constchar*fileName);
PurposeSavesapatternimagetodiskinPNGformat.Ifyoualterthecontentsofthisfile,NIVisionmaynotbeabletousethefileasapatternimage.
NoteIfyoualterthecontentsofthisfile,NIVisionmaynotbeabletousethefileasapatternimage.
NoteImagessavedwiththisfunctionloseanyadditionalvisioninformationotherthangrayscalepatternmatchinginformation.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqWriteVisionFile(),whichcansaveimagesthatcontainadditionalvisioninformationsuchasanoverlay.
ImageTypesSupportedIMAQ_IMAGE_U8
ParametersName Type Description
pattern constImage* Thepatternimagetosave.fileName constchar* Thenameinwhichthefunctionsavesthe
templateimage.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSelectParticlesUsageParticleReport*imaqSelectParticles(constImage*image,constParticleReport*reports,intreportCount,intrejectBorder,constSelectParticleCriteria*criteria,intcriteriaCount,int*selectedCount);
PurposeFiltersanarrayofparticlereportsbasedoncriteriaranges.CallimaqGetParticleInfo()beforecallingimaqSelectParticle().
NoteThisfunctionisobsolete.UseimaqCountParticles(),imaqParticleFilter2(),andimaqMeasureParticle()tomeasureparticlesthatfitacertaincriteria.
ImageTypesSupportedIMAQ_IMAGE_U8
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.
ReturnValueType Description
ParticleReport* Onsuccess,thisfunctionreturnsanarrayoftheinputreportsthatmatchthefiltrationcriteria.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththereturnvalue,disposeofitbycallingimaqDispose().
imaqSetCalibrationInfoUsageintimaqSetCalibrationInfo(Image*image,CalibrationUnitunit,floatxDistance,floatyDistance);
PurposeSetsthephysicalcalibrationattributesofanimage.Thisfunctionisobsolete.ThereplacementfunctionisimaqSetSimpleCalibration(),whichincorporatesthefunctionalityofimaqSetCalibrationInfo()withthegridparameter.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqSetSimpleCalibration(),whichincorporatesthefunctionalityofimaqSetCalibrationInfo()withthegridparameter.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_U16,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL,IMAQ_IMAGE_COMPLEX,IMAQ_IMAGE_RGB,IMAQ_IMAGE_HSL
ParametersName Type Description
image Image* Theimagewhosecalibrationinformationthefunctionsets.
unit CalibrationUnit Theunitofmeasurethatthefunctionusestocalibratetheimage.
xDistance float Thedistanceinthexdirectionbetweentwoadjacentpixelsinunitsspecifiedbyunit.
yDistance float Thedistanceintheydirectionbetweentoadjacentpixelsinunitsspecifiedbyunit.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSetWindowOverlayUsageintimaqSetWindowOverlay(intwindowNumber,constOverlay*overlay);
PurposeSetsorremovestheoverlayfromawindow.Thisfunctionisobsolete.Overlaysarenowappliedtoimages,notwindows.SeetheOverlayfunctionsformoreinformation.
NoteThisfunctionisobsolete.Overlaysarenowappliedtoimages,ratherthanwindows.RefertotheOverlayfunctionstopicformoreinformation.
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.
overlay constOverlay* Theoverlay.SetthisparametertoNULLtoremoveanyexistingoverlayfromthegivenwindow.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqSpokeUsageSpokeReport*imaqSpoke(constImage*image,constROI*roi,SpokeDirectiondirection,EdgeProcessprocess,constSpokeOptions*options);
PurposeFindsedgesalongradiallinesspecifiedinsideanannularregion.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqSpoke2().
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_SGL
ParametersName Type Description
image constImage* Theimageinwhichtofindedges.roi constROI* Theannularregionthefunctionlooksin
fortheedges.ThefirstcontourofroiImustbeanannulus.
direction SpokeDirection Thedirectionthefunctionsearchforedgesalongthesearchlines.
process EdgeProcess Defineswhichedgesthefunctionlooksfor.
options constSpokeOptions* Describeshowtosearchfortheedges.
ReturnValueType Description
SpokeReport* Onsuccess,thisfunctionreturnsinformationdescribingthecalculatededgesandthespokeusedbythefunction.Onfailure,thisfunctionreturnsNULL.Togetextendederrorinformation,callimaqGetLastError().Whenyouarefinishedwiththeinformation,disposeofitbycallingimaqDispose().
ParameterDiscussionoptions—SetoptionstoNULLtousethedefaultoptions,asfollows:
threshold 40width 4steepness 2subsamplingRatio 5subpixelType IMAQ_QUADRATICsubpixelDivisions 1
imaqTransformROIUsageintimaqTransformROI(ROI*roi,PointoriginStart,floatangleStart,PointoriginFinal,floatangleFinal);
PurposeRotatesandtranslatesaregionofinterest(ROI)fromonecoordinatesystemtoanothercoordinatesystemwithinanimage.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqTransformROI2().ThenewfunctionusesanewstructurecalledaCoordinateSystem.ACoordinateSystemaccountsforthedirectionofthey-axis,forwhichimaqTransformROI()doesnottakeintoaccount.Inaddition,aCoordinateSystemusesaPointFloattorepresenttheorigin,whichallowsforincreasedaccuracy.
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqWritePNGFileUsageintimaqWritePNGFile(constImage*image,constchar*fileName,unsignedintcompressionSpeed,constRGBValue*colorTable);
PurposeWritesanimagetoaPNGfile.ThisfunctionstoresanytypeofCalibrationUnitinaformatthatNIVisioncanread.Thisfunctionalsoconvertscalibrationinformationintometers,whichanyPNGfilereadercaninterpret.
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqWritePNGFile2().ThenewfunctionusesanewparametercalleduseBitDepth,whichprovidescontroloverthemethodNIVisionusestoconvert16-bitimagesandunsigned64-bitRGBimagestoPNGfiles.
ImageTypesSupportedIMAQ_IMAGE_U8,IMAQ_IMAGE_I16,IMAQ_IMAGE_RGB
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.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
imaqZoomWindowUsageintimaqZoomWindow(intwindowNumber,intxZoom,intyZoom,Pointcenter);
PurposeSetsthecurrentzoomfactorsforagivenimagewindow.Thezoomfactorindicatesanincreaseordecreaseinthemagnificationofanimage.Apositivenumberindicatesamagnificationbytheamountspecified.Forexample,azoomfactorof3indicatesthattheimageisdisplayedatthreetimesitsactualsize(3:1).Anegativenumberindicatesthattheimageisdecreasedinmagnificationbythespecifiedamount.Forexample,azoomfactorof–5indicatesthattheimageisdisplayedatone-fifthitsactualsize(1:5).
NoteThisfunctionisobsolete.ThereplacementfunctionisimaqZoomWindow2().
ParametersName Type Description
windowNumber int Thewindownumberoftheimagewindow.xZoom int Thezoomfactorforthexdirection.SetxZoom
tozerotomaintainthecurrentzoomfactorforthexdirection.
yZoom int Thezoomfactorfortheydirection.SetyZoomtozerotomaintainthecurrentzoomfactorfortheydirection.
center Point Thecenterpointaroundwhichtozoom.SetthisparametertoIMAQ_NO_POINTtomaintainthecurrentcenterpoint.
ReturnValueType Description
int Onsuccess,thisfunctionreturnsanon-zerovalue.Onfailure,thisfunctionreturns0.Togetextendederrorinformation,callimaqGetLastError().
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.
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.
PointDefinesthelocationofapoint.Elements
Name Type Description
x int Thex-coordinateofthepoint.y int They-coordinateofthepoint.
RectDefinesthelocationandsizeofarectangle.Elements
Name Type Description
top int Locationofthetopedgeoftherectangle.left int Locationoftheleftedgeoftherectangle.height int Heightoftherectangle.width int Widthoftherectangle.
RotatedRectDefinesthelocation,size,androtationofarotatedrectangle.Elements
Name Type Description
top int Locationofthetopedgeoftherectanglebeforerotation.left int Locationoftheleftedgeoftherectanglebeforerotation.height int Heightoftherectangle.width int Widthoftherectangle.angle double Therotation,indegrees,oftherectangle.
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
AttenuateModeControlswhichfrequenciesafunctionattenuates.Elements
Name Value Description
IMAQ_ATTENUATE_LOW 0 Thefunctionattenuateslowfrequencies.
IMAQ_ATTENUATE_HIGH 1 Thefunctionattenuateshighfrequencies.
IMAQ_ATTENUATE_MODE_SIZE_GUARD 0xFFFFFFFF Reserved
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.
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.
IMAQ_THRESH_MOMENTS 3 Thefunctionusesamethodthatissuitedforimagesthathavepoorcontrast.
IMAQ_THRESH_INTERCLASS 4 Thefunctionusesamethodthatiswell-suitedforimagesinwhichclasseshavewellseparatedpixelvaluedistributions.
IMAQ_THRESHOLD_METHOD_SIZE_GUARD 0xFFFFFFFF Reserved
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.
PointFloatDefinesthelocationofapoint.Elements
Name Type Description
x float Thex-coordinateofthepoint.y float They-coordinateofthepoint.
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
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
CoordinateSystemDefinesasetofcoordinateaxes.Elements
Name Type Description
origin PointFloat Theoriginofthecoordinatesystem.angle float Theangle,indegrees,ofthex-axisof
thecoordinatesystemrelativetotheimagex-axis.
axisOrientation AxisOrientation Thedirectionofthey-axisofthecoordinatereferencesystem.
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
thex-axis.projectionY int Thelengthoftheparticlewhenprojectedonto
they-axis.connect8 int ThiselementisTRUEifthefunctionused
connectivity-8todetermineifparticlesaretouching.ThiselementisFALSEifthefunctionusedconnectivity-4todetermineifparticlesaretouching.
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
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
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
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.
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
diskhavingthesameareaastheparticleinuserunits.
IMAQ_DIAGONAL 49 Diagonalofanequivalentrectangleinuserunits.
IMAQ_MEASUREMENT_VALUE_SIZE_GUARD 0xFFFFFFFF Reserved
CaliperReportInformationaboutapairofedges.Elements
Name Type Description
edge1Contrast float Thecontrastofthefirstedge.edge1Coord PointFloat Thecoordinatesofthefirstedge.edge2Contrast float Thecontrastofthesecondedge.edge2Coord PointFloat Thecoordinatesofthesecondedge.separation float Thedistancebetweenthetwoedges.reserved float Thiselementisreserved.
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.
CaliperOptionsDescribeshowyouwantthefunctiontochooseedgepairs.Elements
Name Type Description
polarity TwoEdgePolarityType Specifiestheedgepolarityoftheedgepairs.
separation float Thedistancebetweenedgepairs.IftheedgepairhasaseparationgreaterthanthisvalueplusorminustheseparationDeviation,thefunctionignorestheedgepair.Setthisparameterto0tofindalledgepairs.
separationDeviation float Setstherangearoundtheseparationvalue.Ifyousetseparationto0,thefunctionignoresseparationDeviation.
CannyOptionsAdescriptionoffilterparameterstouseinthealgorithm.Elements
Name Type Description
sigma float ThesigmaoftheGaussiansmoothingfilterthatthefunctionappliestotheimagebeforeedgedetection.
upperThreshold float Theupperfractionofpixelvaluesintheimagefromwhichthefunctionchoosesaseedorstartingpointofanedgesegment.Thisvaluemustbebetween0and1.
lowerThreshold float ThefunctionmultipliesthisvaluebyupperThresholdtodeterminethelowerthresholdforallthepixelsinanedgesegment.
windowSize int ThewindowsizeoftheGaussianfilterthatthefunctionappliestotheimage.Thisvaluemustbeodd.
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
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.
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
space.IMAQ_COLOR_MODE_SIZE_GUARD 0xFFFFFFFF Reserved
CIEXYZValueTheinformationneededtodescribeacolorintheCIEXYZcolorspace.Elements
Name Type Description
Z double TheZcolorinformation.Y double Thecolorluminance.X double TheXcolorinformation.alpha unsigned
charThealphavalueofthecolor,whichrepresentsextrainformationaboutacolorimage,suchasgammacorrection.
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
thesearcharea.
IMAQ_RAKE_DIRECTION_SIZE_GUARD 0xFFFFFFFF Reserved
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
theobjectandtheedgeusedtogeneratethehitlineontheresultimage.Whenapplicable,thefunctionalsooverlaysthelocationofanymeasurementsmadebythefunction.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.
CoordinateTransform2SpecifieshowtotransformpixelcoordinatesbasedonthedifferencebetweenthereferencecoordinatesystemandthemeasurementcoordinatesystemElements
Name Type Description
referenceSystem CoordinateSystem Definesthecoordinatesystemforinputcoordinates.
measurementSystem CoordinateSystem Definesthecoordinatesysteminwhichthefunctionshouldperformmeasurements.
ClassifierReportAreportoftheresultsofclassification.Elements
Name Type Description
bestClassName char* Thenameofthebestclassforthesample.
classificationScore float Thesimilarityofthesampleandthetwoclosestclassesintheclassifier.
identificationScore float Thesimilarityofthesampleandtheassignedclass.
allScores ClassScore* Allclassesandtheirscores.allScoresSize int ThenumberofentriesinallScores.
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.
R unsignedchar
Theredvalueofthecolor.
alpha unsignedchar
Thealphavalueofthecolor,whichrepresentsextrainformationaboutacolorimage,suchasgammacorrection.
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.
RangeDescribesarangeofdesiredvalues.Elements
Name Type Description
minValue int Theminimumvalueoftherange.maxValue int Themaximumvalueoftherange.
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
istrueifthesourcepixelvalueisgreaterthanorequaltothecomparisonimagepixelvalue.
IMAQ_CLEAR_GREATER 4 Thecomparisonistrueifthesourcepixelvalueisgreaterthanthecomparisonimagepixelvalue.
IMAQ_COMPARE_FUNCTION_SIZE_GUARD 0xFFFFFFFF Reserved
InspectionAlignmentThelocationofthegoldentemplateinthetargetimage.Elements
Name Type Description
position PointFloat Thelocationofthecenterofthegoldentemplateintheimageunderinspection.
rotation float Therotationofthegoldentemplateintheimageunderinspection,indegrees.
scale float Thepercentageofthesizeoftheareaunderinspectioncomparedtothesizeofthegoldentemplate.
InspectionOptionsElements
Name Type Description
registrationMethod RegistrationMethod Specifieshowthefunctionregistersthegoldentemplateandthetargetimage.
normalizationMethod NormalizationMethod Specifieshowthefunctionnormalizesthegoldentemplatetothetargetimage.
edgeThicknessToIgnore int Specifiesdesiredthicknessofedgestobeignored.Avalueof0specifiesthatthealgorithmwillnotignoreedges.
brightThreshold float Specifiesthethresholdforareaswherethetargetimageisbrighterthanthegoldentemplate.
darkThreshold float Specifiesthethresholdforareaswherethetargetimageisdarkerthanthegoldentemplate.
binary int Specifieswhetherthefunctionshouldreturnabinaryimagegivingthelocationofdefects,oragrayscaleimagegivingtheintensityofdefects.
ConcentricRakeReport2Informationdescribingtheconcentricrakeusedbythefunctionandtheedgesthefunctioncalculatedwiththeconcentricrake.Elements
Name Type Description
firstEdges EdgeInfo* ThefirstedgepointdetectedalongeachsearchlineintheROI.
numFirstEdges unsignedint ThenumberofpointsinthefirstEdgesarray.
lastEdges EdgeInfo* ThelastedgepointdetectedalongeachsearchlineintheROI.
numLastEdges unsignedint ThenumberofpointsinthelastEdgesarray.
searchArcs SearchArcInfo* Containsthearcsusedforedgedetectionandtheedgeinformationforeacharc.
numSearchArcs unsignedint ThenumberofarcsinthesearchArcsarray.
ConcentricRakeDirectionThedirectioninwhichthefunctionsearchesforedgesalongthesearchlines.Elements
Name Value Description
IMAQ_COUNTER_CLOCKWISE 0 Thefunctionsearchesthesearchareainacounter-clockwisedirection.
IMAQ_CLOCKWISE 1 Thefunctionsearchesthesearchareainaclockwisedirection.
IMAQ_CONCENTRIC_RAKE_DIRECTION_SIZE_GUARD 0xFFFFFFFF Reserved
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
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.
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.
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
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
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.
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
ignoresthiselement.maxContours unsigned
intThemaximumnumberofcontourstheuserwillbeabletoselect.
RoundingModeSpecifiesthetypesofroundingmodesforimagepixeldivision.Elements
Name Value Description
IMAQ_ROUNDING_MODE_OPTIMIZE 0 Roundstheresultofadivisionusingthebestavailablemethod.
IMAQ_ROUNDING_MODE_TRUNCATE 1 Truncatestheresultofadivision.
IMAQ_ROUNDING_MODE_SIZE_GUARD 0xFFFFFFFF Reserved
InterpolationMethodDefinestheinterpolationmethodusedbyafunction.Elements
Name Value Description
IMAQ_ZERO_ORDER 0 Thefunctionusesaninterpolationmethodthatinterpolatesnewpixelvaluesusingthenearestvalidneighboringpixel.
IMAQ_BILINEAR 1 Thefunctionusesaninterpolationmethodthatinterpolatesnewpixelvaluesusingabidirectionalaverageoftheneighboringpixels.
IMAQ_QUADRATIC 2 Thefunctionusesaninterpolationmethodthatinterpolatesnewpixelvaluesusingaquadratic
approximatingpolynomial.
IMAQ_CUBIC_SPLINE 3 Thefunctionusesaninterpolationmethodthatinterpolatesnewpixelvaluesbyfittingthemtoacubicsplinecurve,wherethecurveisbasedonknownpixelvaluesfromtheimage.
IMAQ_BILINEAR_FIXED 4 Thefunctionusesaninterpolationmethodthatinterpolatesnewpixelvaluesusingabidirectionalaverageoftheneighboringpixels.Thefunctionmakestheaveragingcalculationsusingfixed-pointmathematics,whichincreasesthe
performanceoftheinterpolationbutreducestheaccuracy.
IMAQ_INTERPOLATION_METHOD_SIZE_GUARD 0xFFFFFFFF Reserved
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.
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
thesamesizeorlargerthanmaxSize.Ifyoudonotwantthefunctiontoignorelargeobjects,setthiselementtoFALSE.
maxSize int ThefunctionignoresobjectsthissizeandlargerwhenuseMaxSizeisTRUE.
showSearchArea int IfTRUE,thefunctionoverlaysthesearchareaontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.
showObjectCenter int IfTRUE,thefunctionoverlaysthelocationofthecenterofmassoftheobjectsontheresultimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.
showBoundingBox int IfTRUE,thefunctionoverlaystheboundingboxesoftheobjectsontheresultimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.
ClassifierTypeThetypeofaclassifiersession.Elements
Name Value Description
IMAQ_CLASSIFIER_CUSTOM 0 Theclassifiersessionclassifiesvectorsofdoubles.
IMAQ_CLASSIFIER_PARTICLE 1 Theclassifiersessionclassifiesparticlesinbinaryimages.
IMAQ_CLASSIFIER_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved
CircleMatchInformationdescribingamatchedcircle.Elements
Name Type Description
position PointFloat Thelocationofthecenterofthematchedcircle.radius double Theradiusofthematchedcircle.score double Thescoreofthematchedcircle.
CircleDescriptorDescribesthecirclesthefunctionsearchesfor.Elements
Name Type Description
minRadius double Specifiestheminimumradiusofacirclethefunctionwillreturn.
maxRadius double Specifiesthemaximumradiusofacirclethefunctionwillreturn.
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
closedcurvesintheimage.SetthiselementtoFALSEtospecifythatthefunctionshouldidentifybothopenandclosedcurvesintheimage.
subpixelAccuracy int SetthiselementtoTRUEtospecifythatthefunctionidentifiesthelocationofcurveswithsubpixelaccuracybyinterpolatingbetweenpointstofindthecrossingofthreshold.SetthiselementtoFALSEtospecifythatthefunctionidentifiesthelocationofcurvesasthepointnearestthecrossingofthreshold.
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.
EllipseMatchInformationdescribingamatchedellipse.Elements
Name Type Description
position PointFloat Thelocationofthecenterofthematchedellipse.
rotation double Theorientationofthematchedellipse.majorRadius double Thelengthofthesemi-majoraxisofthe
matchedellipse.minorRadius double Thelengthofthesemi-minoraxisofthe
matchedellipse.score double Thescoreofthematchedellipse.
EllipseDescriptorDescribestheellipsesthefunctionsearchesfor.Elements
Name Type Description
minMajorRadius double Specifiestheminimumlengthofthesemi-majoraxisofanellipsethefunctionwillreturn.
maxMajorRadius double Specifiesthemaximumlengthofthesemi-majoraxisofanellipsethefunctionwillreturn.
minMinorRadius double Specifiestheminimumlengthofthesemi-minoraxisofanellipsethefunctionwillreturn.
maxMinorRadius double Specifiesthemaximumlengthofthesemi-minoraxisofanellipsethefunctionwillreturn.
ExtremeReportInformationdescribinganextreme,eitherapeakoravalley.Elements
Name Type Description
location double Thelocationsoftheextreme.Thelocationisanindexbasedontheinputpixelarray,butmayoccurbetweenactualindexvalues.
amplitude double Theamplitudeoftheextreme.secondDerivative double Thesecondderivativeoftheextreme.
DetectionModeDeterminesifthefunctiondetectspeaksordetectsvalleys.Elements
Name Value Description
IMAQ_DETECT_PEAKS 0 Thefunctiondetectspeaks.
IMAQ_DETECT_VALLEYS 1 Thefunctiondetectsvalleys.
IMAQ_DETECTION_MODE_SIZE_GUARD 0xFFFFFFFF Reserved
DetectExtremesOptionsDescribeshowafunctioncalculatesextremes.Elements
Name Type Description
threshold double Defineswhichextremesaretoosmall.Thefunctionrejectsanypeakwithafittedamplitudethatislessthanthreshold.Thefunctionignoresvalleysifthefittedtroughisgreaterthanthreshold.
width int Specifiesthenumberofconsecutivedatapointsthefunctionusesinthequadraticleast-squaresfit.widthmustbegreaterthanorequalto3butshouldbenolargerthanone-fourthoftheapproximatewidthofthepeaksorvalleys.Settingwidthtoalargevaluecanreducetheapparentamplitudeofpeaksandshifttheapparentlocation.Thelessnoiseyourdatahas,thesmallerthevalueyoucanchoose.
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.
LineDescriptorDescribesthelinesthefunctionsearchesfor.Elements
Name Type Description
minLength double Specifiestheminimumlengthofalinethefunctionwillreturn.
maxLength double Specifiesthemaximumlengthofalinethefunctionwillreturn.
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.
RectangleDescriptorDescribestherectanglesthefunctionsearchesfor.
NoteWidthisdefinedasthelengthoftheshortersideofarectangleandheightisdefinedasthelongersideoftherectangleyouwanttosearchfor.
Elements
Name Type Description
minWidth double Specifiestheminimumwidthofarectanglethealgorithmwillreturn.
maxWidth double Specifiesthemaximumwidthofarectanglethealgorithmwillreturn.
minHeight double Specifiestheminimumheightofarectanglethealgorithmwillreturn.
maxHeight double Specifiesthemaximumheightofarectanglethealgorithmwillreturn.
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.
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.
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
ShapeModeTheshapethefunctiondraws.Elements
Name Value Description
IMAQ_SHAPE_RECT 1 Thefunctiondrawsarectangle.
IMAQ_SHAPE_OVAL 2 Thefunctiondrawsanoval.
IMAQ_SHAPE_MODE_SIZE_GUARD 0xFFFFFFFF Reserved
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.
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
methodthatextractstheoutercontoursofobjects.
IMAQ_EDGE_ROBERTS 3 Thefunctionusesamethodthatoutlinesthecontoursthathighlightpixelswhereanintensityvariationoccursalongthediagonalaxes.
IMAQ_EDGE_SIGMA 4 Thefunctionusesamethodthatoutlinescontoursanddetailsbysettingpixelstothemeanvaluefoundintheirneighborhood,iftheirdeviationfromthisvalueisnotsignificant.
IMAQ_EDGE_SOBEL 5 Thefunctionusesamethodthatextractstheoutercontoursofobjects.Asopposedto
thePrewittfilter,theSobelfilterassignsahigherweighttothehorizontalandverticalneighborsofthecentralpixel.
IMAQ_OUTLINE_METHOD_SIZE_GUARD 0xFFFFFFFF Reserved
EdgeReport2Informationabouttheedgesdetected.Elements
Name Type Description
edges EdgeInfo* Anarrayofedgesdetected.ThenumberofedgesdetectedisdeterminedbynumEdges.
numEdges unsignedint
Indicatesthenumberofedgesdetected
gradientInfo double* Anarraythatcontainsthecalculatededgestrengthsalongtheuser-definedsearcharea
numGradientInfo unsignedint
IndicatesthenumberofelementscontainedingradientInfo.
calibrationValid int Indicatesifthecalibrationdatacorrespondingtothelocationoftheedgesiscorrect.
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.
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
CircleReportInformationaboutacircle.Elements
Name Type Description
center Point Thecoordinatepointofthecenterofthecircle.radius int Theradiusofthecircle,inpixels.Iftheradiusofthecircle
isnotwithinthegivenrange,thisvalueisnegative.area int Theareaofthecircle,inpixels.
SpokeDirectionThedirectionthefunctionfollowstosearchforedgesalongthesearchlines.Elements
Name Value Description
IMAQ_OUTSIDE_TO_INSIDE 0 Thefunctionsearchesfromtheoutsideofthesearchareatotheinsideofthesearcharea.
IMAQ_INSIDE_TO_OUTSIDE 1 Thefunctionsearchesfromtheinsideofthesearchareatotheoutsideofthesearcharea.
IMAQ_SPOKE_DIRECTION_SIZE_GUARD 0xFFFFFFFF Reserved
FindEdgeReportInformationdescribingthestraightedgesfound.Elements
Name Type Description
straightEdges StraightEdge* Anarrayofstraightedgesdetected.ThenumberofstraightedgesdetectedisdeterminedbynumStraightEdges.
numStraightEdges unsignedint Indicatesthenumberofstraightedgesfound.
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.
searchLinesColor RGBValue SpecifiestheRGBcolorvaluetousetooverlaythesearchlines.
searchEdgesColor RGBValue SpecifiestheRGBcolorvaluetousetooverlaythesearchedges.
resultColor RGBValue SpecifiestheRGBcolorvaluetousetooverlaytheresults.
overlayGroupName char* Specifiestheoverlaygroupnametoassigntotheoverlays.SetthiselementtoNULLtoaddoverlaystothedefaultgroup.
edgeOptions EdgeOptions2 Specifiestheedgedetectionoptionsalongasinglesearchline
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
searchlinesusedwiththerake-basedmethods.
minSignalToNoiseRatio double Specifiestheminimumsignaltonoiseratio(SNR)oftheedgepointsusedtofitthestraightedge.
minCoverage double Specifiestheminimumnumberofpointsasapercentageofthenumberofsearchlinesthatneedtobeincludedinthedetectedstraightedge.
houghIterations unsignedint SpecifiesthenumberofiterationsusedintheHough-basedmethod.
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.
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.
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
allowallangles.numRanges int Numberofangleranges
intheangleRangesarray.
showSearchArea int IfTRUE,thefunctionoverlaysthesearchareaontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.
showResult int IfTRUE,thefunctionoverlaysthecentersandboundingboxesofthepatternsitlocatesontheresultimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.
FindTransformModeSpecifieshowafunctionupdatesacoordinatetransform.Elements
Name Value Description
IMAQ_FIND_REFERENCE 0 Updatebothpartsofthecoordinatesystem.
IMAQ_UPDATE_TRANSFORM 1 Updateonlythenewreferencesystem.
IMAQ_FIND_TRANSFORM_MODE_SIZE_GUARD 0xFFFFFFFF Reserved
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
thisinformationoverlaidontotheimage,setthiselementtoFALSE.
showFeatureFound int IfTRUE,thefunctionoverlaysthelocationsofthecenterofthepatternandtheboundingboxofthepatternontheimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.
showResult int IfTRUE,thefunctionoverlaysthepositionandorientationofthecoordinatesystemontheresultimage.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.
AxisReportSpecifiesthecoordinatesofthemainaxisandthesecondaryaxisofacoordinatesystem.Elements
Name Type Description
origin PointFloat Theoriginofthecoordinatesystem,whichistheintersectionofthetwoaxesofthecoordinatesystem.
mainAxisEnd PointFloat Theendofthemainaxis,whichistheresultofthecomputationoftheintersectionofthemainaxiswiththerectangularsearcharea.
secondaryAxisEnd PointFloat Theendofthesecondaryaxis,whichistheresultofthecomputationoftheintersectionofthesecondaryaxiswiththerectangularsearcharea.
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
applicable,thefunctionalsooverlaysthelocationofanymeasurementsmadebythefunction.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.
searchAreaColor RGBValue SpecifiestheRGBcolorvaluetousetooverlaythesearcharea.
searchLinesColor RGBValue SpecifiestheRGBcolorvaluetousetooverlaythesearchlines.
searchEdgesColor RGBValue SpecifiestheRGBcolorvaluetousetooverlaythesearchedges.
resultColor RGBValue SpecifiestheRGBcolorvaluetousetooverlaytheresults.
overlayGroupName char* Specifiestheoverlaygroupnametoassigntotheoverlays.SetthiselementtoNULLtoaddoverlaystothedefaultgroup.
edgeOptions EdgeOptions2 Specifiestheedgedetectionoptionsalongasinglesearchline
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.
showResult int IfTRUE,thefunctionoverlaysthehitlinestotheobjectandtheedgeusedtogeneratethehitlineontheresultimage.Whenapplicable,thefunctionalsooverlaysthelocationofanymeasurementsmadebythefunction.Ifyoudonotwantthisinformationoverlaidontotheimage,setthiselementtoFALSE.
searchAreaColor RGBValue SpecifiestheRGBcolorvaluetousetooverlaythesearcharea.
searchLinesColor RGBValue SpecifiestheRGBcolorvaluetousetooverlaythesearchlines.
searchEdgesColor RGBValue SpecifiestheRGBcolorvaluetousetooverlaythesearchedges.
resultColor RGBValue SpecifiestheRGBcolorvaluetousetooverlaytheresults.
overlayGroupName char* Specifiestheoverlaygroupnametoassigntotheoverlays.SetthiselementtoNULLtoaddoverlaystothedefaultgroup.
primaryEdgeOptions EdgeOptions2 SpecifiestheparametersusedtocomputetheedgegradientinformationanddetecttheedgesgottheprimaryROI.
secondaryEdgeOptions EdgeOptions2 SpecifiestheparametersusedtocomputetheedgegradientinformationanddetecttheedgesforthesecondaryROI.
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.
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.
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.
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.
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.
FitLineOptionsDescribeshowtocalculatethebestfitline.Elements
Name Type Description
minScore float Specifiestherequiredqualityofthefittedline.Acceptablevaluesrangefrom0to1,000.Ascoreof1,000indicatesaperfectfit.
pixelRadius float Specifiestheneighborhoodpixelrelationshipfortheinitialsubsetofpointsbeingused.DuringrefinementiterationsthefunctionignorespointsthatarefartherfromthelinethanpixelRadius.
numRefinements int Specifiesthenumberofrefinementiterationsyouallowthefunctiontoperformontheinitialsubsetofpoints.Youmustallowatleastoneiteration.
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
CompressionTypeIndicateshowtocompresstheimageforflattening.Elements
Name Value Description
IMAQ_COMPRESSION_NONE 0 Specifiesthatthefunctionshouldnotcompresstheimage.
IMAQ_COMPRESSION_JPEG 1 SpecifiesthatthefunctionshoulduselossyJPEGcompressionontheimage.JPEGcompressionmaycausedatadegradationintheflatteneddata.
IMAQ_COMPRESSION_PACKED_BINARY 2 Specifiesthatthefunctionshoulduselosslessbinarypackingontheimage.Thissetting
isidealforpreservingdataintegritywhenflatteningbinaryimages.Donotusethissettingfornonbinaryimages.
IMAQ_COMPRESSION_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved
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
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.
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
between0-1000.Aqualityof1000meansthatthefunctionlearnedthefeaturepointsperfectlywiththechosenalgorithm.Itdoesnotnecessarilyreflecttheabsoluteaccuracyoftheestimatedcalibrationmapping,butinsteadreflectshowwellthecalibrationmappingadaptstothelearnedpoints.
CharInfo2Containsinformationaboutatrainedcharacter.Elements
Name Type Description
charValue constchar* Retrievesthecharactervalueofthecorrespondingcharacterinthecharacterset.
charImage constImage* Theimageyouusedtotrainthischaracter.
internalImage constImage* TheinternalrepresentationthatNIVisionusestomatchobjectstothischaracter.ThisinformationishelpfulwhenyouarenotsurewhyNIVisiondoesnotrecognizeasegmentedcharacterintheROI.ThisinformationshowshowNIVisioninterpretsthecharacter,whichmaybedifferentfromhowthehumaneyeinterpretsit.
isReferenceChar int ThiselementisTRUEifthecharacteristhereferencecharacterforthecharacterclass.
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
ClassifierPredictabilitysectionofChapter15,BinaryParticleClassification,intheNIVisionConceptsManualformoreinformationaboutthisfield.
classificationDistribution int** Atwo-dimensionalarraycontaininginformationabouthowtheclassifierclassifiesitssamples.Thisarrayisasquarearray,withbothdimensionscontainingsizeelements.RefertotheDeterminingtheQualityofaTrainedClassifiersectionofChapter15,BinaryParticleClassification,intheNIVisionConceptsManualformoreinformationaboutthisfield.
ClassifierSampleInfoInformationaboutasampleinaclassifier.Elements
Name Type Description
className char* Thenameoftheclassthissampleisin.featureVector double* Thefeaturevectorofthissample,orNULL
ifthisisnotacustomclassifiersession.featureVectorSize int Thenumberofelementsinthefeature
vector.thumbnail Image* Athumbnailimageofthissample,orNULL
ifnoimagewasspecified.
ContourInfo2Informationaboutacontour.Elements
Name Type Description
type ContourType Thecontourtype.color RGBValue Thecontourcolor.structure ContourUnion Theinformationnecessarytodescribethe
contourincoordinatespace.
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.
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
FeatureDataAstructuredescribingagenericgeometricmatchingfeature.Elements
Name Type Description
type FeatureType Anenumerationrepresentingthetypeofthefeature.
contourPoints PointFloat* Asetofpointsdescribingthecontourofthefeature.
numContourPoints int ThenumberofpointsinthecontourPointsarray.
feature GeometricFeature Thefeaturedataspecifictothistypeoffeature.
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
thefeatureisapairofparallellinepairs.
IMAQ_LINE_FEATURE 9 Specifiesthefeatureisaline.
IMAQ_CLOSED_CURVE_FEATURE 10 Specifiesthefeatureisaclosedcurve.
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.
reserved1 void* Thiselementisreserved.imageStart void* Apointertopixel(0,0).
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
theneighborhoodofapixel.
IMAQ_GAUSSIAN_FAMILY 3 ThekernelisintheGaussianfamily.Gaussiankernelsattenuatethevariationsoflightintensityintheneighborhoodofapixel.AGaussiankernelissimilartoasmoothingfilter,butitsblurringeffectismoresubdued.
IMAQ_KERNEL_FAMILY_SIZE_GUARD 0xFFFFFFFF Reserved
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
MeterArcDescribesthearcacrosswhichametersweeps.Elements
Name Type Description
needleBase PointFloat Thecoordinatelocationofthebaseofthemeterneedle.
arcCoordPoints PointFloat* Anarrayofpointsdescribingthecoordinatelocationofthemeterarc.
numOfArcCoordPoints int ThenumberofpointsinthearcCoordPointsarray.
needleColor int ThiselementisTRUEwhenthemeterhasalight-coloredneedleonadarkbackground.ThiselementisFALSEwhenthemeterhasadark-coloredneedleonalightbackground.
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
NearestNeighborOptionsOptionstothenearestneighboralgorithm.Elements
Name Type Description
method NearestNeighborMethod Themethodtouse.metric NearestNeighborMetric Themetrictouse.k int Thevalueofk,ifthe
IMAQ_K_NEAREST_NEIGHBORmethodisused.
TransformBehaviorsDeterminesthebehaviorofoverlayswhenanimageistransformed.Elements
Name Type Description
ShiftBehavior GroupBehavior Specifiesthebehaviorofanoverlaygroupwhenashiftoperationisappliedtoanimage.
ScaleBehavior GroupBehavior Specifiesthebehaviorofanoverlaygroupwhenascaleoperationisappliedtoanimage.
RotateBehavior GroupBehavior Specifiesthebehaviorofanoverlaygroupwhenarotateoperationisappliedtoanimage.
SymmetryBehavior GroupBehavior Specifiesthebehaviorofanoverlaygroupwhenasymmetryoperationisappliedtoanimage.
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
perform.
ParticleClassifierOptionsDefinesthedependenceoftheparticleclassifieronshape,scale,andmirrorsymmetry.Elements
Name Type Description
scaleDependence float Therelativeimportanceofscalewhenclassifyingparticles.Thisvaluerangesfrom0to1000.IfscaleDependenceis0,thesamplesareclassifiedindependentofscale.Forexample,alargeobjectandsmallobjectofthesametypewouldbeclassifiedasthesameclass.
mirrorDependence float Therelativeimportanceofmirrorsymmetrywhenclassifyingparticles.Thisvaluerangesfrom0to1000.Anexampleofobjectsexhibitingmirrorsymmetryarethelowercaseletterspandq.IfmirrorDependenceis0,thesamplesareclassifiedindependentofmirrorsymmetry.Forexample,pandqwouldbeclassifiedasthesameclass.
SegmentInfoInformationaboutasegment.Elements
Name Type Description
numberOfPoints int Thenumberofpointsinthesegment.isOpen int IfTRUE,thecontourisopen.IfFALSE,
thecontourisclosed.weight double Thesignificanceoftheedgeintermsof
thegrayvaluesthatconstitutetheedge.
points ContourPoint* Thepointsofthesegment.
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
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.
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
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.
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.
printGrowthGrade AIMGrade TheprintgrowthlettergradefortheDataMatrixbarcode.
printGrowth float Theprintgrowthrawscoreforthebarcode,whichisbasedontheextenttowhichdarkorlightmarkingsappropriatelyfilltheirmoduleboundaries.
axialNonuniformityGrade AIMGrade TheaxialnonuniformitygradefortheDataMatrixbarcode.
axialNonuniformity float Theaxialnonuniformityrawscoreforthebarcode,whichisbasedonhowmuchthesamplingpointspacingdiffersfromoneaxistoanother.
unusedErrorCorrectionGrade AIMGrade TheunusederrorcorrectionlettergradefortheDataMatrixbarcode.
unusedErrorCorrection float TheunusederrorcorrectionrawscorefortheDataMatrixbarcode,whichisbasedontheextenttowhichregionalorspotdamageintheDataMatrixbarcodehaserodedthereadingsafetymarginprovidedbytheerrorcorrection.
MorphologyMethodThemorphologicaltransformationthefunctionapplies.Formoreinformationaboutmorphologicaltransformations,refertoChapter9,BinaryMorphology,intheNIVisionConceptsManual.Elements
Name Value Description
IMAQ_AUTOM 0 Thefunctionusesatransformationthatgeneratessimplerparticlesthatcontainfewerdetails.
IMAQ_CLOSE 1 Thefunctionusesatransformationthatfillstinyholesandsmoothsboundaries.
IMAQ_DILATE 2 Thefunctionusesatransformationthateliminatestinyholesisolatedinparticlesandexpandsthecontouroftheparticlesaccordingtothetemplatedefinedbythestructuring
element.IMAQ_ERODE 3 Thefunction
usesatransformationthateliminatespixelsisolatedinthebackgroundanderodesthecontourofparticlesaccordingtothetemplatedefinedbythestructuringelement.
IMAQ_GRADIENT 4 Thefunctionusesatransformationthatleavesonlythepixelsthatwouldbeaddedbythedilationprocessoreliminatedbytheerosionprocess.
IMAQ_GRADIENTOUT 5 Thefunctionusesatransformationthatleavesonlythepixelsthatwouldbeaddedbythedilationprocess.
IMAQ_GRADIENTIN 6 Thefunctionusesatransformationthatleavesonlythepixelsthatwouldbeeliminatedbytheerosionprocess.
IMAQ_HITMISS 7 Thefunctionusesatransformationthatextractseachpixellocatedinaneighborhoodexactlymatchingthetemplatedefinedbythestructuringelement.
IMAQ_OPEN 8 Thefunctionusesatransformationthatremovessmallparticlesandsmoothsboundaries.
IMAQ_PCLOSE 9 Thefunctionusesatransformationthatfillstinyholesandsmoothstheinnercontourofparticles
accordingtothetemplatedefinedbythestructuringelement.
IMAQ_POPEN 10 Thefunctionusesatransformationthatremovessmallparticlesandsmoothsthecontourofparticlesaccordingtothetemplatedefinedbythestructuringelement.
IMAQ_THICK 11 Thefunctionusesatransformationthataddstoanimagethosepixelslocatedinaneighborhoodthatmatchesatemplatespecifiedbythestructuringelement.
IMAQ_THIN 12 Thefunctionusesatransformationthateliminatespixelsthatarelocatedina
neighborhoodmatchingatemplatespecifiedbythestructuringelement.
IMAQ_MORPHOLOGY_METHOD_SIZE_GUARD 0xFFFFFFFF Reserved
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
bottom-rightofthekernel.
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.
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.
GridDescriptorContainsscalingconstantsforanimage.Elements
Name Type Description
xStep float Thedistanceinthexdirectionbetweentwoadjacentpixelsinunitsspecifiedbyunit.
yStep float Thedistanceintheydirectionbetweentwoadjacentpixelsinunitsspecifiedbyunit.
unit CalibrationUnit Theunitofmeasurefortheimage.
RangeFloatDescribesarangeofdesiredvalues.Elements
Name Type Description
minValue float Theminimumvalueoftherange.maxValue float Themaximumvalueoftherange.
CalibrationPointsAsetofreferencepointsafunctionusestolearncalibrationinformation.Elements
Name Type Description
pixelCoordinates PointFloat* Thearrayofpixelcoordinates.realWorldCoordinates PointFloat* Thearrayofcorrespondingreal-
worldcoordinates.numCoordinates int Thenumberofcoordinatesinboth
ofthearrays.
ColorInformationInformationaboutthecolorfeaturescontainedinaregionofanimage.Elements
Name Type Description
infoCount int Thesizeoftheinfoarray.saturation int Thesaturationlevelthefunctionusestolearnthe
colorinformation.info double* Anarrayofcolorinformationthatrepresentsthe
colorspectrumanalysisofaregionofanimageinacompactform.
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
andcomplexity.
IMAQ_SENSITIVITY_HIGH 2 Instructsthealgorithmtodividethehueplaneintoahighnumberofsectors,allowingforcomplex,sensitivecoloranalysis.
IMAQ_COLOR_SENSITIVITY_SIZE_GUARD 0xFFFFFFFF Reserved
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
ignoreanycolors.numColorsToIgnore int ThenumberofColorInformationstructures
inthecolorsToIgnorearray.
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.
maxPixelDistanceFromLine int Specifiesthemaximumnumberofpixelsbetweenanedgepixelandalinearfeatureforthefunctiontoconsiderthatedgepixelaspartofthelinearfeature.
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
LearnPatternAdvancedOptionsDescribeshowthealgorithmlearnsthepattern.Elements
Name Type Description
shiftOptions LearnPatternAdvancedShiftOptions* UsethiselementtocontrolthebehaviorofimaqLearnPattern2()duringtheshift-invariantlearningphase.
rotationOptions LearnPatternAdvancedRotationOptions* UsethiselementtocontrolthebehaviorofimaqLearnPattern2()therotation-invariantlearningphase.
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.
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.
LinearAveragesModeSpecifieswhichmeanlineprofilesthefunctioncalculates.Usebitwise-ORtocombinetwoormorevaluesinordertocalculatemultiplemeanlineprofileswithonefunctioncall.Elements
Name Value Description
IMAQ_COLUMN_AVERAGES 1 Specifiesthatthefunctioncalculatesthemeanpixelvalueofeachcolumn.
IMAQ_ROW_AVERAGES 2 Specifiesthatthefunctioncalculatesthemeanpixelvalueofeachrow.
IMAQ_RISING_DIAGONAL_AVERAGES 4 Specifiesthatthefunctioncalculatesthemeanpixelvalueofeachdiagonalrunningfromthelowerlefttotheupperrightoftheinspected
areaoftheimage.
IMAQ_FALLING_DIAGONAL_AVERAGES 8 Specifiesthatthefunctioncalculatesthemeanpixelvalueofeachdiagonalrunningfromtheupperlefttothelowerrightoftheinspectedareaoftheimage.
IMAQ_ALL_LINEAR_AVERAGES 15 Specifiesthatthefunctioncalculatesallfourlinearmeanpixelvalues.
IMAQ_LINEAR_AVERAGES_MODE_SIZE_GUARD 0xFFFFFFFF Reserved
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
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
LocalThresholdMethodThemethodthefunctionusestoperformthelocalthreshold.Elements
Name Value Description
IMAQ_NIBLACK 0 ThefunctioncomputesthresholdsforeachpixelbasedonitslocalstatisticsusingtheNiblacklocalthresholdingalgorithm.
IMAQ_BACKGROUND_CORRECTION 1 Thefunctionperformsbackgroundcorrectionfirsttoeliminatenon-uniformlightingeffects,thenperformsthresholdingusingtheOtsuthresholdingalgorithm.
IMAQ_LOCAL_THRESHOLD_METHOD_SIZE_GUARD 0xFFFFFFFF Reserved
ObjectTypeSpecifiesthetypeofobjectsthefunctiondetects.Elements
Name Value Description
IMAQ_BRIGHT_OBJECTS 0 Thefunctiondetectsbrightobjects.
IMAQ_DARK_OBJECTS 1 Thefunctiondetectsdarkobjects.
IMAQ_OBJECT_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved
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.
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.
minMatchScore float Theminimumscoreamatchcanhaveforthefunctiontoconsiderthematchvalid.Acceptablevaluesrangefrom0to1,000.
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.
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.
calibratedRotation float Therotationofthematchrelativetothetemplateimage,indegrees.Iftheimagewherethematchisfoundisacalibratedimage,thenthisvalueisinreal-worldunits.Otherwise,thisvalueisthesameasrotation.
calibratedCorner[4] PointFloat Anarrayoffourpointsdescribingtherectanglesurroundingthetemplateimage.Iftheimagewherethematchisfoundisacalibratedimage,thenthisvaluedescribesthecalibratedrectangle.Otherwise,thisvalueisthesameascorner[4].
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
considerthematchvalid.Acceptablevaluesrangefrom0to1,000.
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
stopearlyifsubpixelToleranceissatisfied.IfyousetsubpixelTolerance,thefunctionmayinvalidatematchesduringthesubpixelrefinementprocess.However,usingsubpixelIterationsalonecannotinvalidateamatch.
initialMatchListLength int Specifiesthemaximumsizeofthematchlist.Thematchlistcontainstheregionsintheinspectionimagethathavethehighestprobabilityofcontainingamatch.
matchTemplateCurveScore float Theaccuracyofthematchobtainedbycomparingthecurvesinthematchregiontothetemplatecurves.Ascoreof1,000indicatesaperfectmatch,andascoreof0indicatesnomatch.ThiselementiscalculatedonlyifthematchTemplateCurveScoreelementoftheadvancedMatchOptionsparametertoimaqMatchGeometricPattern()isTRUE.
correlationScore int SetthiselementtoTRUEtospecifythatthefunctionshouldcalculatethecorrelationscoreandreturnitforeachmatchresult.SetthisparametertoFALSEtospecifythatthefunctionshouldnotcalculatethecorrelationscore.
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
exceedthisoverlappercentage.Setthisvalueto–1ifyouwantthefunctiontoignoreboundingrectangleoverlap.
coarseResult int Specifieswhetheryouwantthefunctiontospendlesstimeaccuratelyestimatingthelocationofamatch.SetthisvaluetoTRUEifyouwanttoquicklydeterminewhetherapartispresentintheinspectionimagewithoutanaccurateestimateofitsposition,angle,andscale.SetthisvaluetoFALSEtospecifythatthefunctionreturnsmatcheswithpixelorsubpixelaccuracy.
smoothContours int SetthiselementtoTRUEtospecifysmoothingbedoneonthecontoursoftheinspectionimagebeforefeatureextraction.
enableCalibrationSupport int SetthiselementtoTRUEtospecifythealgorithmtreattheinspectionimageasacalibratedimage.UseimaqSetSimpleCalibration()orimaqSetCalibrationInfo()tocalibratetheinspectionimage.
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
intheangleRangesarray.
numMatchesRequested int Numberofvalidmatchesexpected.
matchFactor int Controlsthenumberofpotentialmatchesthatthefunctionexamines.Acceptablevaluesrangefrom0to1,000.Formostapplications,setmatchFactorto0,whichoptimizesthespeedofthealgorithm.IfyouarenotgettingallofthenumMatchesRequested,increasingthisfactormayincreasethenumberofmatchesyoureceivebutdecreasesthespeedofthealgorithm.Normally,increasingmatchFactorisnecessaryonlywhenlookingformorethan200matchesperimage.
minMatchScore float Theminimumscoreamatchcanhaveforthefunctiontoconsiderthematchvalid.
ShapeReportDescribesamatchtoagiventemplateshape.Elements
Name Type Description
coordinates Rect Theboundingrectangleoftheobject.centroid Point Thecoordinatelocationofthecentroidofthe
object.size int Thesize,inpixels,oftheobject.score double Avaluerangingbetween1and1,000thatspecifies
howsimilartheobjectintheimageistothetemplate.Ascoreof1,000indicatesaperfectmatch.
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
MulticoreOperationEnumerationinstructingimaqMulticoreOptionswhattodowiththeusersdata,andhowmanyprocessorstheuserwouldliketotakeadvantageof.Thedefaultistotakeadvantageofasmanycoresaspossible.Elements
Name Value Description
IMAQ_GET_CORES 0 ThenumberofprocessorcoresNIVisioniscurrentlyusing.
IMAQ_SET_CORES 1 ThenumberofprocessorcoresforNIVisiontouse.
IMAQ_USE_MAX_AVAILABLE 2 Usethemaximumnumberofavailableprocessorcores.
ArcInfoDefinesthelocationandsizeofanarc.Elements
Name Type Description
boundingBox Rect Thecoordinatelocationoftheboundingboxofthearc.
startAngle double Thecounterclockwiseanglefromthex-axisindegreestothestartofthearc.
endAngle double Thecounterclockwiseanglefromthex-axisindegreestotheendofthearc.
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
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).
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.
ParticleFilterCriteria2Describesthecriteriausedtofilterparticlesintheimage.Elements
Name Type Description
parameter MeasurementType Themorphologicalmeasurementthatthefunctionusesforfiltering.
lower float Thelowerboundofthecriteriarange.upper float Theupperboundofthecriteriarange.calibrated int SetthiselementtoTRUEtotake
calibratedmeasurements.SetthiselementtoFALSEtotakepixelmeasurements.
exclude int SetthiselementtoTRUEtoindicatethatamatchoccurswhenthemeasurementisoutsidethecriteriarange.SetthiselementtoFALSEtoindicatethatamatchoccurswhenthemeasurementisinsidethecriteriarange.
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.
QuantifyReportStatisticaldataofanimage.Elements
Name Type Description
global QuantifyData Statisticaldataofthewholeimage.regions QuantifyData* AnarrayofQuantifyDatastructures
containingstatisticaldataofeachregionoftheimage.RefertothemaskparameterofimaqQuantify()formoreinformationabouttheregions.
regionCount int Thenumberofregions.
RakeReport2Informationdescribingtherakeusedbythefunctionandtheedgesthefunctioncalculatedwiththerake.Elements
Name Type Description
firstEdges EdgeInfo* ThefirstedgepointdetectedalongeachsearchlineintheROI.
numFirstEdges unsignedint ThenumberofpointsinthefirstEdgesarray.
lastEdges EdgeInfo* ThelastedgepointdetectedalongeachsearchlineintheROI.
numLastEdges unsignedint ThenumberofpointsinthelastEdgesarray.
searchLines SearchLineInfo* Thesearchlinesusedforedgedetection.
numSearchLines unsignedint Thenumberofsearchlinesusedintheedgedetection.
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
thebarcode.Ingeneral,aconfidenceLevelvalueoflessthan80meansthedecodedstringissuspect.NotethatconfidenceLevelisparticularlyusefulindecodingIMAQ_EAN13barcodesbecausetwelveofthethirteendatavaluesareencodedascharactersinthebarcode,andthethirteenthvalueisencodedbytheparityofthefirst12encodedcharacters.
type BarcodeType Thetypeofbarcode.
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.
IMAQ_BARCODE_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved
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
ClassifierEngineTypeThetypeofanengineonaclassifiersession.Elements
Name Value Description
IMAQ_ENGINE_NONE 0 Noenginehasbeensetonthisclassifiersession.
IMAQ_ENGINE_NEAREST_NEIGHBOR 1 Nearestneighborengine.
IMAQ_CLASSIFIER_ENGINE_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved
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
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
imaqReadDataMatrixBarcode2()failedtolocatetheDataMatrixbarcode,youmaybeabletolocatetheDataMatrixbarcodebyincreasingmaximumIterations
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
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
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.
DataMatrixSizeOptionsContainsthesizeoptionsthefunctionuseswhensearchingforaDataMatrixbarcodeintheimage.Elements
Name Type Description
minSize unsignedint
Specifiestheminimumsize(inpixels)oftheDataMatrixbarcodeintheimage.Settingthisvalueto0indicatesthefunctionshouldneverexcludeaDataMatrixbarcodecandidatebecauseitistoosmall.
maxSize unsignedint
Specifiesthemaximumsize(inpixels)oftheDataMatrixbarcodeintheimage.Settingthisvalueto0indicatesthefunctionshouldneverexcludeaDataMatrixbarcodecandidatebecauseitistoolarge.
quietZoneWidth unsignedint
Specifiestheexpectedminimumsizeofthequietzone,inpixels.ThefunctionwillignoreDataMatrixbarcodecandidateswhosequietzonesaresmallerthanthisvalue.
DataMatrixSearchOptionsSpecifiesthesearchoptionsthefunctionuseswhensearchingfortheDataMatrixbarcodeintheimage.Elements
Name Type Description
rotationMode DataMatrixRotationMode SpecifiestheamountofDataMatrixbarcoderotationthefunctionshouldallowfor.
skipLocation int IfsettoTRUE,specifiesthatthefunctionshouldassumethattheDataMatrixbarcodeoccupiestheentireimage(ortheentiresearchregion).Thefunctionthenskipsthelocationphase,movingimmediatelytoextractionanddecoding.IfFALSE,thefunctiondoesnotmakeanyassumptionsaboutthepercentageoftheimage
occupiedbytheDataMatrixbarcode.
edgeThreshold unsignedint Specifiestheminimumcontrastapixelmusthaveinordertobeconsideredpartofamatrixcelledge.Thelowerthisvalue,themorepotentialedgecandidatesthefunctionwillexamineduringthelocationphase.Settingthisvaluetoolowwilldecreasetheperformanceofthefunctionbecausethefunctionwillexaminetoomanypotentialedgecandidates.Settingthisvaluetoohighmayalsodecreasetheperformanceofthefunctionbyremovingvalidedge
candidates,makinglocationrequiremoreiterations.SettingthisvaluetoohighmayalsocausethefunctiontofailtoidentifytheDataMatrixbarcodebecausetoomanycandidatesareeliminated.
demodulationMode DataMatrixDemodulationMode Specifiesthemodethefunctionshouldusetodemodulate(determinewhichcellsareonandwhichcellsareoff)theDataMatrixbarcode.
cellSampleSize DataMatrixCellSampleSize Specifiesthesamplesize,inpixels,thefunctionshouldtaketodetermineifeachcellisonoroff.
cellFilterMode DataMatrixCellFilterMode Specifiesthemodethefunctionusestodeterminethe
pixelvalueforeachcell.IfcellSampleSizeisIMAQ_1x1,thevalueofthesinglesampledpixelalwaysdeterminesthepixelvalueforthecellandthefunctionignoresthiselement.
skewDegreesAllowed unsignedint SpecifiestheamountofskewintheDataMatrixbarcodethefunctionshouldallowfor.
maxIterations unsignedint SpecifiesthemaximumnumberofiterationsbeforethefunctionstopslookingfortheDataMatrixbarcode.
initialSearchVectorWidth unsignedint Specifiesthenumberofpixelsthefunctionshouldaveragetogethertodeterminethelocationofanedge.Youmayneedtoincreasethisvaluewhenthe
DataMatrixhascellswithalowfillpercentage.
LCDReportDescribesthestateofanLCD.Elements
Name Type Description
text constchar* AstringofthecharactersoftheLCD.segmentInfo LCDSegments* AnarrayofLCDSegmentstructures
describingwhichsegmentsofeachdigitareon.
numCharacters int Thenumberofcharactersthatthefunctionreads.DescribesthenumberofelementsinthesegmentInfoarray.
reserved int Thiselementisreserved.
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
readResolution ReadResolution Thereadresolution,whichdetermineshowmuchofthetrainedcharacterdatathefunctionusestomatchobjectstotrainedcharacters.
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.
biModalCalculation int SetthiselementtoTRUEtocalculateboththelowandhighthresholdvalueswhenusingthefastthresholdingmethod.SetthiselementtoFALSEtocalculateonlythehighthresholdvaluewhenreadingortrainingdarkcharactersandtocalculateonlythelowthresholdvaluewhenreadingortraininglightcharacters.ThisoptionisavailableonlywhenfastThresholdisTRUE.
darkCharacters int SetthiselementtoTRUEtoreadortraindarkcharactersonalightbackground.SetthiselementtoFALSEtoreadortrainlightcharactersonadarkbackground.
removeParticlesTouchingROI int SetthiselementtoTRUEtoremovetheparticlestouchingtheROI.
erosionCount int Thenumberoferosionstoperform.Afterperformingtheerosions,thefunctionrestorestheremainingobjectstotheiroriginalunerodedsize.Setthisattributeto0ifyoudonotwantto
removesmallparticles.
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
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
ofthecharacterboundingrectanglewhencharactersoverlapvertically.Thiselementisusefulwhenyouareworkingwithanimagethatcontainsslantedcharacters.Ifthecharactersarenotslantedand/ordonotoverlapvertically,setthiselementtoFALSE.
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.
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
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
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.
cellFilterMode QRCellFilterMode ThecellfiltermodethefunctionusedtolocatetheQRcode.IfcellFilterModeIMAQ_AUTO_DETECT_CELL_FILTER_MODEinthesearchOptionsparameterofimaqReadQRCode(),thiselementindicatestherecommendedcellfiltermodeforthisimage.
QRGradingModeSpecifiesifthefunctionshouldmakecalculationsneededtopreparetogradetheQRcode.Elements
Name Value Description
IMAQ_QR_NO_GRADING 0 Thefunctiondoesnotmakeanypreparatorycalculations.AttemptstogradethisQRcodewillgenerateanerror.
IMAQ_QR_GRADING_MODE_SIZE_GUARD 0xFFFFFFFF Reserved
QRCodeDescriptionOptionsSpecifiesthedescriptionoptionsthefunctionuseswhensearchingfortheQRcodeintheimage.Elements
Name Type Description
dimensions QRDimensions ThenumberofrowsandcolumnsthatarepopulatedfortheQRcode,measuredincells.
polarity QRPolarities ThepolarityoftheQRcode.mirror QRMirrorMode ThiselementisTRUEiftheQRcode
appearsmirroredintheimageandFALSEiftheQRcodeappearsnormallyintheimage.
modelType QRModelType ThisoptionallowsyoutospecifythetypeofQRcode.MicroQRcodeshaveonlyonetargetinthetopleft.Model1QRcodeshavealignmentdashesalongthebottomandrightsideofthecode.MostQRcodesareModel2.
QRCodeSizeOptionsContainsthesizeoptionsthefunctionuseswhensearchingforaQRcodeintheimage.Elements
Name Type Description
minSize unsignedint
Specifiestheminimumsize(inpixels)oftheQRcodeintheimage.Settingthisvalueto0indicatesthefunctionshouldneverexcludeaQRcodecandidatebecauseitistoosmall.
maxSize unsignedint
Specifiesthemaximumsize(inpixels)oftheQRcodeintheimage.Settingthisvalueto0indicatesthefunctionshouldneverexcludeaQRcodecandidatebecauseitistoolarge.
QRCodeSearchOptionsSpecifiesthesearchoptionsthefunctionuseswhensearchingfortheQRcodeintheimage.Elements
Name Type Description
rotationMode QRRotationMode SpecifiestheamountofQRcoderotationthefunctionshouldallowfor.
skipLocation unsignedint IfsettoTRUE,specifiesthatthefunctionshouldassumethattheQRcodeoccupiestheentireimage(ortheentiresearchregion).Thefunctionthenskipsthelocationphase,movingimmediatelytoextractionanddecoding.IfFALSE,thefunctiondoesnotmakeanyassumptionsaboutthepercentageoftheimageoccupiedbytheQRcode.
edgeThreshold unsignedint ThestrengthoftheweakestedgethefunctionusestofindthecoarselocationoftheQRcodeintheimage.UsetheminimumEdgeStrengthelementoftheQRCodeReportreturnvalue.
demodulationMode QRDemodulationMode Thedemodulationmodethefunctionusesto
locatetheQRcode.cellSampleSize QRCellSampleSize Thecellsamplesizethe
functionusestolocatetheQRcode.
cellFilterMode QRCellFilterMode ThecellfiltermodethefunctionusestolocatetheQRcode.
skewDegreesAllowed unsignedint SpecifiestheamountofskewintheQRcodethefunctionshouldallowfor.
ReadTextReport3Containsinformationaboutthetextthatyouread.Elements
Name Type Description
readString constchar* Thereadstring.characterReport CharReport3* Anarrayofreportsdescribing
thepropertiesofeachidentifiedcharacter.
numCharacterReports int Thenumberofidentifiedcharacters.
roiBoundingCharacters ROI* AnarrayspecifyingthecoordinatesofthecharacterboundingROI.
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
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
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
withthecolortemplateinformationinanimage.
IMAQ_VISIONINFO_GEOMETRICTEMPLATE 0x10 Usedtoindicateinteractionwiththegeometrictemplateinformationinanimage.
IMAQ_VISIONINFO_CUSTOMDATA 0x20 UsedtoindicateinteractionwiththebinaryortextCustomDatainanimage.
IMAQ_VISIONINFO_GOLDENTEMPLATE 0x40 Usedtoindicateinteractionwiththegoldentemplateinformationinanimage.
IMAQ_VISIONINFO_ALL 0xFFFFFFFF Removes,checksfor,orindicatesthepresenceofalltypesofextrainformation
inanimage.
ROIProfileInformationaboutthepointsalongtheedgeofeachcontourintheregionofinterest(ROI).Elements
Name Type Description
report LineProfile QuantifyinginformationaboutthepointsalongtheedgeofeachcontourintheROI.
pixels Point* AnarrayofthepointsalongtheedgeofeachcontourintheROI.ThisarrayhasanumberofPointstructuresequaltothedataCountinreport.
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
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
ignoresthiselement.
HSLValueTheinformationneededtodescribeacolorintheHSL(Hue,Saturation,andLuminance)colorspace.Elements
Name Type Description
L unsignedchar
Thecolorluminance.
S unsignedchar
Thecolorsaturation.
H unsignedchar
Thecolorhue.
alpha unsignedchar
Thealphavalueofthecolor,whichrepresentsextrainformationaboutacolorimage,suchasgammacorrection.
RGBU64ValueTheinformationneededtodescribecolorintheRGB(Red,Green,Blue)colorspacewhereeachchannelhas16bits.Elements
Name Type Description
B unsignedshort
Thebluevalueofthecolor.
G unsignedshort
Thegreenvalueofthecolor.
R unsignedshort
Theredvalueofthecolor.
alpha unsignedshort
Thealphavalueofthecolor,whichrepresentsextrainformationaboutacolorimage,suchasgammacorrection.
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
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.
IMAQ_PALETTE_TEMPERATURE 4 Thefunctionusesapalettethathasagradationfromlightbrowntodarkbrown.
IMAQ_PALETTE_USER 5 Thefunctionusesapalettedefinedbytheuser.
IMAQ_PALETTE_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved
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
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.
SizeTypeDeterminesthesizeoftheparticlesthefunctionkeepsaftertheerosion.Elements
Name Value Description
IMAQ_KEEP_LARGE 0 Thefunctionkeepslargeparticlesremainingaftertheerosion.
IMAQ_KEEP_SMALL 1 Thefunctionkeepssmallparticleseliminatedbytheerosion.
IMAQ_SIZE_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved
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
SpokeReport2Informationdescribingthespokeusedbythefunctionandtheedgesthefunctioncalculatedwiththespoke.Elements
Name Type Description
firstEdges EdgeInfo* ThefirstedgepointdetectedalongeachsearchlineintheROI.
numFirstEdges unsignedint ThenumberofpointsinthefirstEdgesarray.
lastEdges EdgeInfo* ThelastedgepointdetectedalongeachsearchlineintheROI.
numLastEdges unsignedint ThenumberofpointsinthelastEdgesarray.
searchLines SearchLineInfo* Thesearchlinesusedforedgedetection.
numSearchLines unsignedint Thenumberofsearchlinesusedintheedgedetection.
StraightEdgeReport2Containsinformationaboutthefoundstraightedge(s).Elements
Name Type Description
straightEdges StraightEdge* Containsanarrayoffoundstraightedges.
numStraightEdges unsignedint Indicatesthenumberofstraightedgesfound.
searchLines SearchLineInfo* Containsanarrayofallsearchlinesusedinthedetection.
numSearchLines unsignedint Thenumberofsearchlinesusedintheedgedetection.
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
tothetopsideofthesearcharea.
IMAQ_SEARCH_DIRECTION_SIZE_GUARD 0xFFFFFFFF Reserved
NearestNeighborTrainingReportAreportontheresultsoftrainingaclassifiersessionwiththenearestneighboralgorithm.Elements
Name Type Description
classDistancesTable float** Theconfidenceinthetraining.
allScores NearestNeighborClassResult* Allclassesandtheirscores.
allScoresSize int ThenumberofentriesinallScores.
TransformReportDescribesasetoftransformedcoordinates.Elements
Name Type Description
points PointFloat* Anarrayoftransformedcoordinates.validPoints int* Anarrayofvaluesthatdescribethevalidityof
eachofthecoordinatesaccordingtotheregionofinterestyoucalibratedusingeitherimaqLearnCalibrationGrid()orimaqLearnCalibrationPoints().IfaresultingpointisinsidethecalibratedROI,thefunctionsetsthecorrespondingintinthevalidPointsarraytoTRUE.Otherwise,thefunctionsetsthecorrespondingintinthevalidPointsarraytoFALSE.IfyoucreatedthecalibrationinformationwithimaqSetSimpleCalibration()orimaqSetCalibrationInfo(),eachelementinthevalidPointsarrayisalwaysTRUE.
numPoints int ThelengthofboththepointsarrayandthevalidPointsarray.
TruncateModeSpecifieswhichfrequenciesthefunctiontruncates.Elements
Name Value Description
IMAQ_TRUNCATE_LOW 0 Thefunctiontruncateslowfrequencies.
IMAQ_TRUNCATE_HIGH 1 Thefunctiontruncateshighfrequencies.
IMAQ_TRUNCATE_MODE_SIZE_GUARD 0xFFFFFFFF Reserved
RectOrientationSpecifiestheorientationofaresultingrectangularimagerelativetoanannulus.Elements
Name Value Description
IMAQ_BASE_INSIDE 0 Specifiesthatthebaseoftherectangularimageliesalongtheinsideedgeoftheannulus.
IMAQ_BASE_OUTSIDE 1 Specifiesthatthebaseoftherectangularimageliesalongtheoutsideedgeoftheannulus.
IMAQ_TEXT_ORIENTATION_SIZE_GUARD 0xFFFFFFFF Reserved
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.
WriteClassifierFileModeWhatinformationtowritetoaclassifierfile.Elements
Name Value
IMAQ_CLASSIFIER_WRITE_ALL 0
IMAQ_CLASSIFIER_WRITE_CLASSIFY_ONLY 1
IMAQ_WRITE_CLASSIFIER_FILE_MODES_SIZE_GUARD 0xFFFFFFFF
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.
TIFFFileOptionsDefineshowthefunctionwritestheTIFFfile.Elements
Name Type Description
rowsPerStrip int Indicatesthenumberofrowsthatthefunctionwritesperstrip.Setthiselementto0ifyouwantthefunctiontowriteallofthedatainonestrip.
photoInterp PhotometricMode Designateswhichphotometricinterpretationtouse.ThefunctiononlyusesphotoInterpwhenwritingunsigned8-bitimages.
compressionType TIFFCompressionType IndicatesthetypeofcompressiontouseontheTIFFfile.
ArcInfo2Definesthelocationofanarc.Elements
Name Type Description
center PointFloat Thecenterpointofthearc.radius double Theradiusofthearc.startAngle double Thestartingangleofthearc,specifiedcounter-
clockwisefromthex-axis.endAngle double Theendingangleofthearc,specifiedcounter-
clockwisefromthex-axis.
BestCircleDescribesacirclethatbestfitsasetofpoints.Elements
Name Type Description
center PointFloat Thecoordinatelocationofthecenterofthecircle.radius double Theradiusofthecircle.area double Theareaofthecircle.perimeter double Thelengthoftheperimeterofthecircle.error double Representstheleastsquareerrorofthefitted
circletotheentiresetofpoints.
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.
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.
CharacterStatisticsDescribesthecharacterssegmentedintheROI.Elements
Name Type Description
left int TheleftoffsetofthecharacterboundingrectanglesinthecurrentROI.
top int ThetopoffsetofthecharacterboundingrectanglesinthecurrentROI.
width int ThewidthofeachofthecharactersyoutrainedinthecurrentROI.
height int TheheightofeachtrainedcharacterinthecurrentROI.
characterSize int Thesizeofthecharacterinpixels.
CharInfoContainsinformationaboutatrainedcharacter.Elements
Name Type Description
charValue constchar* Retrievesthecharactervalueofthecorrespondingcharacterinthecharacterset.
charImage constImage* Theimageyouusedtotrainthischaracter.internalImage constImage* TheinternalrepresentationthatNIVision
usestomatchobjectstothischaracter.ThisinformationishelpfulwhenyouarenotsurewhyNIVisiondoesnotrecognizeasegmentedcharacterintheROI.ThisinformationshowshowNIVisioninterpretsthecharacter,whichmaybedifferentfromhowthehumaneyeinterpretsit.
CharReportContainsinformationaboutacharacter.Elements
Name Type Description
character constchar* Thecharactervalue.corner[4] PointFloat Anarrayoffourpointsthatdescribesthe
rectanglethatsurroundsthecharacter.reserved int Thiselementisreserved.lowThreshold int Theminimumvalueofthethresholdrange
usedforthischaracter.highThreshold int Themaximumvalueofthethresholdrange
usedforthischaracter.
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.
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.
CIELabValueTheinformationneededtodescribeacolorintheCIEL*a*b*colorspace.Elements
Name Type Description
b double Theyellow/blueinformationofthecolor.a double Thered/greeninformationofthecolor.L double Thecolorlightness.alpha unsigned
charThealphavalueofthecolor,whichrepresentsextrainformationaboutacolorimage,suchasgammacorrection.
CircleFeatureAcirclefeature.Elements
Name Type Description
position PointFloat Thelocationofthecenterofthecircle.radius double Theradiusofthecircle.
ClassScoreThedistancefromaclasstotheitemthatwasclassified.Elements
Name Type Description
className char* Thenameoftheclass.distance float Thedistancefromtheitemtothisclass.
ClosedContourDefinesthelocationandsizeofaclosedcontour,whichisaseriesofconnectedpointswherethelastpointconnectstothefirst.Elements
Name Type Description
points Point* Thepointsthatmakeuptheclosedcontour.numPoints int Thenumberofpointsinthearray.
ClosedCurveFeatureAclosedcurvefeature.Elements
Name Type Description
position PointFloat Thecenteroftheclosedcurvefeature.arcLength double Thearclengthoftheclosedcurvefeature.
ComplexAcomplexvalue.Elements
Name Type Description
r float Therealpartofthevalue.i float Theimaginarypartofthevalue.
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
edges.ThisnumberrepresentsthesizeofthelineWithEdgesarrayandthenumberofEdgeLocationReportsintheallEdgesarray.
ConstCurveFeatureAconstantcurvefeature.Elements
Name Type Description
position PointFloat Thecenterofthecirclethatthisconstantcurveliesupon.
radius double Theradiusofthecirclethatthisconstantcurveliesupon.
startAngle double Whentravelingalongtheconstantcurvefromoneendpointtothenextinacounterclockwisemanner,thisistheangularcomponentofthevectororiginatingatthecenteroftheconstantcurveandpointingtowardsthefirstendpointoftheconstantcurve.
endAngle double Whentravelingalongtheconstantcurvefromoneendpointtothenextinacounterclockwisemanner,thisistheangularcomponentofthevectororiginatingatthecenteroftheconstantcurveandpointingtowardsthesecondendpointoftheconstantcurve.
ContourInfoInformationaboutacontour.Elements
Name Type Description
type ContourType Thecontourtype.numPoints unsigned Thenumberofpointsthatmakeupthe
contour.points Point* Thepointsdescribingthecontour.contourColor RGBValue Thecontourcolor.
ContourPointDescribesapointalonganedgesegment.Elements
Name Type Description
x double Thex-coordinatevalueintheimage.y double They-coordinatevalueintheimage.curvature double Thechangeinslopeatthisedgepointofthe
segment.xDisplacement double Thexdisplacementofthecurrentedgepixel
fromacubicsplinefitofthecurrentedgesegment.
yDisplacement double Theydisplacementofthecurrentedgepixelfromacubicsplinefitofthecurrentedgesegment.
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.
CornerFeatureAcornerfeature.Elements
Name Type Description
position PointFloat Thelocationofthecornerfeature.rotation double Theangularcomponentofthevector
bisectingthecornerfromposition.enclosedAngle double Themeasureoftheenclosedangleofthe
corner.isVirtual int ThiselementisTRUEifthecornerisvirtual
andFALSEifthecornerisnotvirtual.Avirtualcornerisacornerthatwouldbecreatediftwonon-intersectinglinesareextendeduntiltheyintersect.
DataMatrixOptionsDefineshowthefunctionsearchesforanddecodesDataMatrixbarcodes.Elements
Name Type Description
searchMode Barcode2DSearchMode Specifiesthemodethefunctionusestosearchforbarcodes.
contrast Barcode2DContrast Specifiesthecontrastofthebarcodesthatthefunctionsearchesfor.
cellShape Barcode2DCellShape Specifiestheshapeofthebarcodedatacells,whichaffectshowthefunctiondecodesthebarcode.
barcodeShape Barcode2DShape Specifiestheshapeofthebarcodesthatthefunctionsearchesfor.
subtype DataMatrixSubtype SpecifiestheDataMatrixsubtypesofthebarcodesthatthefunctionsearchesfor.
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.
EdgeLocationReportDescribesthelocationoftheedgeslocatedbyasearchline.Elements
Name Type Description
edges PointFloat* Thecoordinatelocationofalledgesdetectedbythesearchline.
numEdges int Thenumberofpointsintheedgesarray.
EdgeReportInformationaboutanedge.Elements
Name Type Description
location float Thelocationoftheedgefromthefirstpointinthepointsarray.Thisisasubpixelinterpolateddistance.
contrast float Thecontrastattheedge.polarity PolarityType Thepolarityoftheedge.reserved float Thiselementisreserved.coordinate PointFloat Thecoordinatesoftheedge.
EllipseFeatureAnellipsefeature.Elements
Name Type Description
position PointFloat Thelocationofthecenteroftheellipse.rotation double Theorientationofthesemi-majoraxisofthe
ellipsewithrespecttothehorizontal.minorRadius double Thelengthofthesemi-minoraxisofthe
ellipse.majorRadius double Thelengthofthesemi-majoraxisofthe
ellipse.
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
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.
FindTransformRectsOptionsDefinestheparametersofthealgorithmthefunctionusestolocatetheobjectandtheinformationthefunctionoverlaystotheimage.Elements
Name Type Description
primaryThreshold int Specifiesthethresholdforthecontrastoftheedgeintheprimaryrectangle.Thefunctionidentifiesonlyedgeswithacontrastgreaterthanthisvalueinthedetectionprocess.Contrastisdefinedasthedifferencebetweentheaveragepixelintensitybeforetheedgeandtheaveragepixelintensityaftertheedge.
primaryWidth int Specifiesthenumberofpixelsthatareaveragedtofindthecontrastateithersideoftheedgeintheprimaryrectangle.
primarySteepness int Specifiestheslopeoftheedgeintheprimaryrectangle.Thisvaluerepresentsthenumberofpixelsthatcorrespondtothetransitionareaoftheedge.
primarySubsamplingRatio int Specifiesthenumberofpixelsthatseparatetwoconsecutivesearchlinesoftherakeintheprimary
rectangle.secondaryThreshold int Specifiesthethresholdfor
thecontrastoftheedgeinthesecondaryrectangle.Thefunctionidentifiesonlyedgeswithacontrastgreaterthanthisvalueinthedetectionprocess.Contrastisdefinedasthedifferencebetweentheaveragepixelintensitybeforetheedgeandtheaveragepixelintensityaftertheedge.
secondaryWidth int Specifiesthenumberofpixelsthatareaveragedtofindthecontrastateithersideoftheedgeinthesecondaryrectangle.
secondarySteepness int Specifiestheslopeoftheedgeinthesecondaryrectangle.Thisvaluerepresentsthenumberofpixelsthatcorrespondtothetransitionareaoftheedge.
secondarySubsamplingRatio int Specifiesthenumberofpixelsthatseparatetwoconsecutivesearchlinesoftherakeinthesecondaryrectangle.
mainAxisDirection RakeDirection Specifiestheorderanddirectioninwhichthefunctionsearchestheedgealongthemainaxis.Thisdirectionmustbeperpendicularto
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.
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
thatisoccluded.templateMatchCurveScore float Theaccuracyofthematch
obtainedbycomparingthetemplatecurvestothecurvesinthematchregion.Ascoreof1,000indicatesaperfectmatch,andascoreof0indicatesnomatch.
matchTemplateCurveScore float Theaccuracyofthematchobtainedbycomparingthecurvesinthematchregiontothetemplatecurves.Ascoreof1,000indicatesaperfectmatch,andascoreof0indicatesnomatch.ThiselementiscalculatedonlyifthematchTemplateCurveScoreelementoftheadvancedMatchOptionsparametertoimaqMatchGeometricPattern()isTRUE.
correlationScore float Theaccuracyofthematchobtainedbycomparingthetemplateimagetothematchregionusingacorrelationmetricthatcomparesthetworegionsasafunctionoftheirpixelvalues.Ascoreof1,000indicatesaperfectmatch,andascoreof0indicatesnomatch.ThiselementiscalculatedonlyifthecorrelationScoreelementoftheadvancedMatchOptionsparametertoimaqMatchGeometricPattern()isTRUE.
HSIValueTheinformationneededtodescribeacolorintheHSI(Hue,Saturation,andIntensity)colorspace.Elements
Name Type Description
I unsignedchar
Thecolorintensity.
S unsignedchar
Thecolorsaturation.
H unsignedchar
Thecolorhue.
alpha unsignedchar
Thealphavalueofthecolor,whichrepresentsextrainformationaboutacolorimage,suchasgammacorrection.
HSVValueTheinformationneededtodescribeacolorintheHSV(Hue,Saturation,andValue)colorspace.Elements
Name Type Description
V unsignedchar
Thecolorvalue.
S unsignedchar
Thecolorsaturation.
H unsignedchar
Thecolorhue.
alpha unsignedchar
Thealphavalueofthecolor,whichrepresentsextrainformationaboutacolorimage,suchasgammacorrection.
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.
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
optimalspeed,thefunctioncoercessizesthatarelessthan240toanintegermultipleof12andcoercessizesgreaterthan240toanintegermultipleof60.
initialSampleSizeFactor double Specifiesthesizeofthesamplefortheinitialphaseofrotation-invariantmatchingasapercentofthetemplatesize,inpixels.Thedefaultis0,whichcausesthealgorithmtouseinitialSampleSize.IfyouprovidevaluesforbothinitialSampleSizeFactorandinitialSampleSize,thealgorithmusesinitialSampleSize.Foroptimalspeed,thealgorithmcoercessizesthatarelessthan240toanintegermultipleof12andcoercessizesgreaterthan240toanintegermultipleof60.
initialAngularAccuracy int Setstheangleaccuracy,indegrees,touseduringtheinitialphaseofrotation-invariantmatching.Thedefaultis6degrees.ThealgorithmcoercestheangletothelargestintegersmallerthaninitialAngularAccuracythatevenlydivides360.ThisoptionisnotusedinconjunctionwiththeIMAQ_AGGRESSIVEsearch
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
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
coercessizesthatarelessthan240toanintegermultipleof12andcoercessizesgreaterthan240toanintegermultipleof60.
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
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
defaultis0,whichallowsthealgorithmtocomputesubpixelSampleSize.Foroptimalspeed,thealgorithmcoercessizesthatarelessthan240toanintegermultipleof12andcoercessizesgreaterthan240toanintegermultipleof60.
subpixelSampleSizeFactor double Specifiesthesizeofthesampleforthesubpixelphaseofshift-invariantmatchingasapercentofthetemplatesize,inpixels.Thedefaultis0,whichcausesthealgorithmtousesubpixelSampleSize.Foroptimalspeed,theVIcoercessizesthatarelessthan240toanintegermultipleof12andcoercessizesgreaterthan240toanintegermultipleof60.
LegFeatureAlegfeature.Elements
Name Type Description
position PointFloat Thelocationofthelegfeature.Thelocationisthecenterofthesegmentadjoiningthetwoparallelsides.
corner[4] PointFloat Thefourcornersofthelegfeature.rotation double Theorientationofthelegwithrespecttothe
horizontal.width double Thewidthoftheleg.height double Theheightoftheleg.
LineDefinesthelocationofaline.Elements
Name Type Description
start Point Thecoordinatelocationofthestartoftheline.end Point Thecoordinatelocationoftheendoftheline.
LineEquationDefinesthethreecoefficientsoftheequationinthenormalform(ax+by+c=0)ofaline.Elements
Name Type Description
a double Theacoefficientofthelineequation.b double Thebcoefficientofthelineequation.c double Theccoefficientofthelineequation.
LineFeatureAlinefeature.Elements
Name Type Description
startPoint PointFloat Thestartingpointoftheline.endPoint PointFloat Theendingpointoftheline.length double Thelengthofthelinemeasuredinpixelsfromthe
startpointtotheendpoint.rotation double Theorientationofthelinewithrespecttothe
horizontal.
LineFloatDefinesthelocationofaline.Elements
Name Type Description
start PointFloat Thecoordinatelocationofthestartoftheline.end PointFloat Thecoordinatelocationoftheendoftheline.
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
stopearlyifsubpixelToleranceissatisfied.IfyousetsubpixelTolerance,thefunctionmayinvalidatematchesduringthesubpixelrefinementprocess.However,usingsubpixelIterationsalonecannotinvalidateamatch.
initialMatchListLength int Specifiesthemaximumsizeofthematchlist.Thematchlistcontainstheregionsintheinspectionimagethathavethehighestprobabilityofcontainingamatch.
matchTemplateCurveScore int SetthiselementtoTRUEtospecifythatthefunctionshouldcalculatethematchcurvetotemplatecurvescoreandreturnitforeachmatchresult.SetthiselementtoFALSEtospecifythatthefunctionshouldnotcalculatethematchcurvetotemplatecurvescore.
correlationScore int SetthiselementtoTRUEtospecifythatthefunctionshouldcalculatethecorrelationscoreandreturnitforeachmatchresult.SetthisparametertoFALSEtospecifythatthefunctionshouldnotcalculatethecorrelationscore.
minMatchSeparationDistance double Specifiestheminimumseparationdistance,inpixels,betweentheoriginsoftwomatchesthathaveuniquepositions.Thefunctiondoesnotreturnmatchesthathavethe
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
functiontospendlesstimeaccuratelyestimatingthelocationofamatch.SetthisvaluetoTRUEifyouwanttoquicklydeterminewhetherapartispresentintheinspectionimagewithoutanaccurateestimateofitsposition,angle,andscale.SetthisvaluetoFALSEtospecifythatthefunctionreturnsmatcheswithpixelorsubpixelaccuracy.
NearestNeighborClassResultResultsoftrainingwiththeNearestNeighborengine.Elements
Name Type Description
className char* Thenameoftheclass.standardDeviation float Thestandarddeviationofthemembersof
thisclass.count int Thenumberofsamplesinthisclass.
OpenContourDefinesthelocationandsizeofanopencontour,whichisaseriesofconnectedpointswherethelastpointdoesnotconnecttothefirst.Elements
Name Type Description
points Point* Thepointsthatmakeuptheopencontour.numPoints int Thenumberofpointsinthearray.
PairOfParallelLinePairsFeatureApairofparallellinepairsfeature.Elements
Name Type Description
firstParallelLinePair ParallelLinePairFeature Thefirstparallellinepair.
secondParallelLinePair ParallelLinePairFeature Thesecondparallellinepair.
rotation double Theorientationofthefeaturewithrespecttothehorizontal.
distance double Thedistancefromthemidlineofthefirstparallellinepairtothemidlineofthesecondparallellinepair.
ParallelLinePairFeatureAparallellinepairfeature.Elements
Name Type Description
firstStartPoint PointFloat Thestartingpointofthefirstlineofthepair.
firstEndPoint PointFloat Theendingpointofthefirstlineofthepair.
secondStartPoint PointFloat Thestartingpointofthesecondlineofthepair.
secondEndPoint PointFloat Theendingpointofthesecondlineofthepair.
rotation double Theorientationofthefeaturewithrespecttothehorizontal.
distance double Thedistancefromthefirstlinetothesecondline.
ParticleFilterCriteriaDescribesthecriteriausedtofilterparticlesinanimage.Elements
Name Type Description
parameter MeasurementValue Themorphologicalmeasurementthatthefunctionusesforfiltering.
lower float Thelowerboundofthecriteriarange.upper float Theupperboundofthecriteriarange.exclude int SetthiselementtoTRUEtoindicatethat
amatchoccurswhenthevalueisoutsidethecriteriarange.SetthiselementtoFALSEtoindicatethatamatchoccurswhenthevalueisinsidethecriteriarange.
ParticleFilterOptionsOptionsusedbyimaqParticleFiltertofilterbinaryparticles.Elements
Name Type Description
rejectMatches int SetthisparametertoTRUEtotransferonlythoseparticlesthatdonotmeetallthecriteria.SetthisparametertoFALSEtotransferonlythoseparticlesthatmeetallthecriteriatothedestination.
rejectBorder int SetthiselementtoTRUEtorejectborderparticles.SetthiselementtoFALSEtokeepborderparticles.
connectivity8 int SetthisparametertoTRUEtouseconnectivity-8todeterminewhetherparticlesaretouching.SetthisparametertoFALSEtouseconnectivity-4todeterminewhetherparticlesaretouching.Formoreinformationaboutconnectivity,refertoChapter9,BinaryMorphology,intheNIVisionConceptsManual.
QRCodeDataTokenContainsthedataforaspecificQRtoken.Elements
Name Type Description
mode QRStreamMode SpecifiesthestreammodeortheformatofthedatathatisencodedintheQRcode.
modeData unsignedint Indicatesspecifiersusedbytheusertopostprocessthedataifitrequiresit.Typicallyrepresentssize,sometimesrepresentslanguageforECIStreamModeandApplicationIDforEAN-128codes.
data unsignedchar* ShowstheencodeddataintheQRcode.dataLength unsignedint Specifiesthelengthofthedatafoundin
theQRcode.
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.
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.
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
ofthelinesWithEdgesarrayandthenumberofEdgeLocationReportsintheallEdgesarray.
ReadTextReportContainsinformationaboutthetextthatyouread.Elements
Name Type Description
readString constchar* Thereadstring.characterReport constCharReport* Anarrayofreports
describingthepropertiesofeachidentifiedcharacter.
numCharacterReports int Thenumberofidentifiedcharacters.
ReadTextReport2Containsinformationaboutthetextthatyouread.Elements
Name Type Description
readString constchar* Thereadstring.characterReport CharReport2* Anarrayofreportsdescribingthe
propertiesofeachidentifiedcharacter.
numCharacterReports int Thenumberofidentifiedcharacters.
RectangleFeatureArectanglefeature.
NoteWidthisdefinedasthelengthoftheshortersideofarectangleandheightisdefinedasthelongersideoftherectangle.
Elements
Name Type Description
position PointFloat Thecenteroftherectangle.corner[4] PointFloat Thefourcornersoftherectangle.rotation double Theorientationoftherectanglewithrespecttothe
horizontal.width double Thewidthoftherectangle.height double Theheightoftherectangle.
RotationAngleRangeSpecifiesanallowedrangeofrotationforapattern.Elements
Name Type Description
lower float Thelowestamountofrotation,indegrees,avalidpatterncanhave.
upper float Thehighestamountofrotation,indegrees,avalidpatterncanhave.
SearchArcInfoDescribesasearcharcusedforedgefinding.Elements
Name Type Description
arcCoordinates ArcInfo2 Describesthearcusedforedgedetection.
edgeReport EdgeReport2 Describestheedgesfoundinthissearchline.
SearchLineInfoDescribesasearchlineusedforfindingastraightedge.Elements
Name Type Description
lineCoordinates LineFloat Theendpointsofthesearchline.edgeReport EdgeReport2 Describestheedgesfoundinthissearch
line.
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.
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.
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
linesWithEdgesarrayandthenumberofEdgeLocationReportsintheallEdgesarray.
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
(SNR)ofthedetectededge.
calibrationValid int Indicatesifthecalibrationdataforthestraightedgeisvalid.
usedEdges EdgeInfo* Anarrayofedgesthatwereusedtodeterminethisstraightline.
numUsedEdges unsignedint
IndicatesthenumberofedgesintheusedEdgesarray.
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.
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.
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.
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
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
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
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
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.
IMAQ_DATA_MATRIX_ECC_200 6 The2DbarcodeisoftypeDataMatrixECC200.
IMAQ_BARCODE_2D_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved
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.
IMAQ_BROWSER_FRAME_STYLE_SIZE_GUARD 0xFFFFFFFF Reserved
BrowserLocationSpecifieswhichcelltouseinthebrowser.Elements
Name Value Description
IMAQ_INSERT_FIRST_FREE 0 Insertsthethumbnailinthefirstavailablecell.
IMAQ_INSERT_END 1 Insertsthethumbnailafterthelastoccupiedcell.
IMAQ_BROWSER_LOCATION_SIZE_GUARD 0xFFFFFFFF Reserved
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
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.
IMAQ_CALIBRATION_AND_USER_ROI 3 Thecorrectionfunctioncorrectstheareadefinedbytheintersectionoftheuser-definedROIandthecalibrationROI.
IMAQ_CALIBRATION_OR_USER_ROI 4 Thecorrectionfunctioncorrectstheareadefinedbytheunionoftheuser-definedROIandthecalibrationROI.
IMAQ_CALIBRATION_ROI_SIZE_GUARD 0xFFFFFFFF Reserved
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
ColumnProcessingModeSpecifiesthemethodthatthefunctionusestoprocessthedataextractedforedgedetection.Elements
Name Value Description
IMAQ_AVERAGE_COLUMNS 0 Averagesthedataextractedforedgedetection.
IMAQ_MEDIAN_COLUMNS 1 Takesthemedianofthedataextractedforedgedetection.
IMAQ_COLUMN_PROCESSING_MODE_SIZE_GUARD 0xFFFFFFFF Reserved
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.
IMAQ_ANNULUS 7 Thecontourrepresentsanannulus.
IMAQ_ROTATED_RECT 8 Thecontourrepresentsarotatedrectangle.
IMAQ_CONTOUR_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved
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
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
IMAQ_ALL_CELL_FILTERS 8
IMAQ_DATA_MATRIX_CELL_FILTER_MODE_SIZE_GUARD 0xFFFFFFFF
DataMatrixCellSampleSizeSpecifiesthesamplesize,inpixels,thefunctionshouldtaketodetermineifeachcellisonoroff.Elements
Name Value
IMAQ_AUTO_DETECT_CELL_SAMPLE_SIZE -2
IMAQ_1x1 1
IMAQ_2x2 2
IMAQ_3x3 3
IMAQ_4x4 4
IMAQ_5x5 5
IMAQ_6x6 6
IMAQ_7x7 7
IMAQ_DATA_MATRIX_CELL_SAMPLE_SIZE_SIZE_GUARD 0xFFFFFFFF
DataMatrixDemodulationModeSpecifiesthemodethefunctionshouldusetodemodulate(determinewhichcellsareonandwhichcellsareoff)theDataMatrixbarcode.Elements
Name Value
IMAQ_AUTO_DETECT_DEMODULATION_MODE -2
IMAQ_HISTOGRAM 0
IMAQ_LOCAL_CONTRAST 1
IMAQ_COMBINED 2
IMAQ_ALL_DEMODULATION_MODES 3
IMAQ_DATA_MATRIX_DEMODULATION_MODE_SIZE_GUARD 0xFFFFFFFF
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
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
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
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
DataMatrixRotationModeSpecifiestheamountofDataMatrixbarcoderotationthefunctionshouldallowfor.Elements
Name Value
IMAQ_UNLIMITED_ROTATION 0
IMAQ_0_DEGREES 1
IMAQ_90_DEGREES 2
IMAQ_180_DEGREES 3
IMAQ_270_DEGREES 4
IMAQ_DATA_MATRIX_ROTATION_MODE_SIZE_GUARD 0xFFFFFFFF
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
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
EdgeFilterSizeSpecifiesthewidthoftheedgefilterthefunctionusestoidentifycurvesintheimage.Elements
Name Value Description
IMAQ_FINE 0 Specifiesthatthefunctionusesafine(narrow)edgefilter.
IMAQ_NORMAL 1 Specifiesthatthefunctionusesanormaledgefilter.
IMAQ_EDGE_FILTER_SIZE_SIZE_GUARD 0xFFFFFFFF Reserved
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
ExtractionModeSpecifiesthemethodthefunctionusestoidentifythelocationsofthecurvesintheimage.Elements
Name Value Description
IMAQ_NORMAL_IMAGE 0 Specifiesthatthefunctionmakesnoassumptionsabouttheuniformityofobjectsintheimageortheimagebackground.
IMAQ_UNIFORM_REGIONS 1 Specifiesthatthefunctionassumesthateithertheobjectsintheimageortheimagebackgroundconsistsofuniformpixelvalues.Thisallowsthefunctiontomoreaccuratelycalculatetheexternalcurvesof
theobjects.IMAQ_EXTRACTION_MODE_SIZE_GUARD 0xFFFFFFFF Reserved
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
fromthetopofthesearchareatothebottomofthesearchareaforanindirectaxis.
IMAQ_RIGHT_TO_LEFT_DIRECT 4 Searchesfromtherightsideofthesearchareatotheleftsideofthesearchareaforadirectaxis.
IMAQ_RIGHT_TO_LEFT_INDIRECT 5 Searchesfromtherightsideofthesearchareatotheleftsideofthesearchareaforanindirectaxis.
IMAQ_BOTTOM_TO_TOP_DIRECT 6 Searchesfromthebottomofthesearchareatothetopofthesearchareaforadirectaxis.
IMAQ_BOTTOM_TO_TOP_INDIRECT 7 Searchesfromthebottomofthesearchareatothetopofthesearchareaforanindirectaxis.
IMAQ_FIND_COORD_SYS_DIR_SIZE_GUARD 0xFFFFFFFF Reserved
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
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
patternintheimagewithreducedrestrictiononthesizeofthepattern.
IMAQ_GEOMETRIC_MATCH_OCCLUSION_INVARIANT 4 Searchesforoccurrencesofthepatternintheimage,allowingforaspecifiedpercentageofthepatterntobeoccluded.
IMAQ_GEOMETRIC_MATCHING_MODE_SIZE_GUARD 0xFFFFFFFF Reserved
GroupBehaviorDefinesthebehaviorforanoverlaygroup.Elements
Name Value Description
IMAQ_GROUP_CLEAR 0 Setsthebehavioroftheoverlaygrouptoclearthecurrentsettingswhenanimageistransformed.
IMAQ_GROUP_KEEP 1 Setsthebehavioroftheoverlaygrouptokeepthecurrentsettingswhenanimageistransformed.
IMAQ_GROUP_TRANSFORM 2 Setsthebehavioroftheoverlaygrouptotransformwiththeimage.
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
LevelTypeDetermineshowthefunctionevaluatesthethresholdandhysteresisvalues.Elements
Name Value Description
IMAQ_ABSOLUTE 0 Thefunctionevaluatesthethresholdandhysteresisvaluesasabsolutevalues.
IMAQ_RELATIVE 1 Thefunctionevaluatesthethresholdandhysteresisvaluesrelativetothedynamicrangeofthegivenpath.
IMAQ_LEVEL_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved
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)
IMAQ_DOWNSHIFT 1 Thefunctionshiftsthe16-bitimagepixelstotherightthenumberoftimesspecifiedbytheshiftCountelementoftheDisplayMappingstructure.
IMAQ_RANGE 2 ThefunctionmapsthepixelvaluesintherangespecifiedbytheminimumValueandmaximumValueelementsoftheDisplayMappingstructuretoan8-bitscale.
IMAQ_90_PCT_DYNAMIC 3 Thefunctionmapsthedynamicrangecontainingthemiddle90percentofthecumulatedhistogramoftheimagetoan8-bit(256grayscalevalues)scale.
IMAQ_PERCENT_RANGE 4 Thefunctionmapsthepixelvaluesinthe
relativepercentagerange(0to100)ofthecumulatedhistogramspecifiedbyminimumValueandmaximumValuetoan8-bitscale.
IMAQ_MAPPING_METHOD_SIZE_GUARD 0xFFFFFFFF Reserved
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
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
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
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
ParticleClassifierTypeElements
Name Value Description
IMAQ_PARTICLE_LARGEST 0 Useonlythelargestparticleintheimage.
IMAQ_PARTICLE_ALL 1 Useallparticlesintheimage.
IMAQ_PARTICLE_CLASSIFIER_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved
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
ParticleTypeWhatkindofparticlestolookfor.Elements
Name Value Description
IMAQ_PARTICLE_BRIGHT 0 BrightparticlesIMAQ_PARTICLE_DARK 1 DarkparticlesIMAQ_PARTICLE_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved
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
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
PolarityTypeThepolarityofanedge.Elements
Name Value Description
IMAQ_EDGE_RISING 1 Theedgeisarisingedge.
IMAQ_EDGE_FALLING 0xFFFFFFFF ReservedIMAQ_POLARITY_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved
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
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
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
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
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
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
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
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.
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
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
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
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
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
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
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
languagerepresentedinthelanguageID.
IMAQ_QR_MODE_KANJI 6 SpecifiesthatthedatawasencodedinShift-JIS16Japanese.
IMAQ_QR_MODE_SIZE_GUARD 0xFFFFFFFF Reserved
ReadResolutionSpecifiestheresolutionimaqReadText()usestoreadcharacters.RefertotheNIOCRTrainingInterfaceHelpformoreinformation.Elements
Name Value Description
IMAQ_LOW_RESOLUTION 0 ConfiguresNIVisiontouselowresolutionduringthereadprocess.
IMAQ_MEDIUM_RESOLUTION 1 ConfiguresNIVisiontousemediumresolutionduringthereadprocess.
IMAQ_HIGH_RESOLUTION 2 ConfiguresNIVisiontousehighresolutionduringthereadprocess.
ReadStrategyThelevelatwhichNIVisionanalyzesimagestodetermineifobjectsmatchtrainedcharacters.RefertotheNIOCRTrainingInterfaceHelpformoreinformation.Elements
Name Value Description
IMAQ_READ_AGGRESSIVE 0 ConfiguresNIVisiontoperformfewercheckswhenanalyzingobjectstodetermineiftheymatchtrainedcharacters.Thisoptionboostsperformancebyupto20percent,butmightresultininaccuratereads.Youcansuccessfullyusetheaggressivestrategyformostcases.Usetheaggressivestrategyunlessthecharactersetorimagequalityrequiresmorestringentanalysis.
IMAQ_READ_CONSERVATIVE 1 ConfiguresNIVisiontoperformmorecheckstodetermineifanobjectmatchesatrainedcharacter.Thisstrategyisslowerthantheaggressivestrategy,butismoreaccurateandresultsinfewermismatches.
RegistrationMethodSpecifiesthemethodthatthefunctionusestoregisterthetemplateandtheimage.Elements
Name Value Description
IMAQ_REGISTRATION_NONE 0 Noregistration.IMAQ_REGISTRATION_PERSPECTIVE 1 Adjustimageto
correctforminorvariationsinalignmentorperspective.
IMAQ_REGISTRATION_SIZE_GUARD 0xFFFFFFFF Reserved
SearchStrategySpecifieshowthefeaturesoftheimageareusedduringthesearchphase.Usethesearchstrategyparametertooptimizethespeedofthepatternmatchingalgorithmbyallowingthealgorithmtoinspectlessdatafromtheimage.RefertotheNIVisionforLabWindows/CVIUserManualformoreinformationaboutthesestrategies.Elements
Name Value Description
IMAQ_CONSERVATIVE 1 Instructsthepatternmatchingalgorithmtousethelargestpossibleamountofinformationfromtheimageattheexpenseofslowingdownthespeedofthealgorithm.
IMAQ_BALANCED 2 Instructsthepatternmatchingalgorithmtobalancetheamountofinformationfromtheimageituseswiththespeedofthe
algorithm.IMAQ_AGGRESSIVE 3 Instructsthe
patternmatchingalgorithmtousealoweramountofinformationfromtheimage,whichallowsthealgorithmtorunquicklybutattheexpenseofaccuracy.
IMAQ_VERY_AGGRESSIVE 4 Instructsthepatternmatchingalgorithmtousethesmallestpossibleamountofinformationfromtheimage,whichallowsthealgorithmtorunatthehighestspeedpossiblebutattheexpenseofaccuracy.
IMAQ_SEARCH_STRATEGY_SIZE_GUARD 0xFFFFFFFF Reserved
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
projectededgelocationtodeterminethestraightedge.
IMAQ_STRAIGHT_EDGE_SEARCH_SIZE_GUARD 0xFFFFFFFF Reserved
TextAlignmentSetsthealignmentofthetext.Elements
Name Value Description
IMAQ_LEFT 0 Leftalignsthetextatthereferencepoint.
IMAQ_CENTER 1 Centersthetextaroundthereferencepoint.
IMAQ_RIGHT 2 Rightalignsthetextatthereferencepoint.
IMAQ_TEXT_ALIGNMENT_SIZE_GUARD 0xFFFFFFFF Reserved
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
foreachblock.
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
compresstheTIFFfile.
IMAQ_TIFF_COMPRESSION_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved
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
tolight)andthepolarityofthesecondedgeisrising(darktolight).
IMAQ_FALLING_FALLING 4 Thepolarityofthefirstedgeisfalling(lighttodark)andthepolarityofthesecondedgeisfalling(lighttodark).
IMAQ_TWO_EDGE_POLARITY_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved
VerticalTextAlignmentSetstheverticalalignmentforthetext.Elements
Name Value Description
IMAQ_BOTTOM 0 Alignsthebottomofthetextatthereferencepoint.
IMAQ_TOP 1 Alignsthetopofthetextatthereferencepoint.
IMAQ_BASELINE 2 Alignsthebaselineofthetextatthereferencepoint.Thebaselineofthetextactsasthebottomforalluppercasecharacters.Certainlowercasecharacters,suchasgandj,haveaportionthatdips
belowthebaseline.
IMAQ_VERTICAL_TEXT_ALIGNMENT_SIZE_GUARD 0xFFFFFFFF Reserved
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.
IMAQ_VISION_INFO_TYPE_SIZE_GUARD 0xFFFFFFFF Reserved
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,
butisslower.
IMAQ_WAVELET_TRANSFORM_MODE_SIZE_GUARD 0xFFFFFFFF Reserved
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.
Whenabsent,thewindowisontoponlywhenactive.
IMAQ_WINDOW_OPTIONS_SIZE_GUARD 0xFFFFFFFF Reserved
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
SouthAfrica 270118058197Spain 34916400085Sweden 46(0)858789500Switzerland 41562005151Taiwan 8860223772222Thailand 6622786777Turkey 902122793031UnitedKingdom 44(0)1635523545UnitedStates(Corporate) 5126830100