Vision Tools

Be aware of the following vision tool changes when upgrading from VisionPro 9.7: 

General API Changes
  • This release supports the ITool class for working with vision tools, and supports the Enabled property to improve enabling/disabling vision tools.
  • The StringCollection class is replaced with the StringDictionary class

    Customers must change order of parameters in the Add method: 

    • Add(value, key) → Add(key, value)
    • Add(value) no longer exists, as items must have unique keys in Dictionaries)

Blob

Previous VisionPro releases used the CogBlobNoSubtractionImagePixelsException class when the Blob tool uses the segmentation mode SubtractoinImage but the subtraction image has no pixels.

This release uses ImageNoPixelsException.

Fit Tools
  • All of the following Fit classes are moved out of the Cognex::Vision namespace and moved to Cognex::Vision::Geometry - FitLine, FitLineResult, FitLineTool, FitCircle, FitCircleResult, FitCircleTool, FitEllipse, FitEllipseResult,FitEllipseTool
  • Changed state flags for Fit Line:

    Method VisionPro 9.7 This Release
    AddPoint sfNumPoints|sfNumToIgnore|sfGetX|sfGetY sfNumPoints
    DeletePoint sfNumPoints|sfNumToIgnore|sfGetX|sfGetY sfNumPoints|sfGetX|sfGetY
    SetPoint sfNumPoints|sfNumToIgnore|sfGetX|sfGetY sfGetX|sfGetY
    SetNumPoints sfNumPoints|sfNumToIgnore|sfGetX|sfGetY

    sfNumPoints

  • Changed state flags for Fit Circle:

    Method VisionPro 9.7 This Release
    AddPoint

    sfNumPoints|sfNumToIgnore|sfGetX|sfGetY|

    SfRadiusConstraint|SfRadiusConstraintEnabled

    sfNumPoints
    DeletePoint

    sfNumPoints|sfNumToIgnore|sfGetX|sfGetY|

    SfRadiusConstraint|SfRadiusConstraintEnabled

    sfNumPoints|sfGetX|sfGetY
    SetPoint

    sfNumPoints|sfNumToIgnore|sfGetX|sfGetY|

    SfRadiusConstraint|SfRadiusConstraintEnabled

    sfGetX|sfGetY
    SetNumPoints

    sfNumPoints|sfNumToIgnore|sfGetX|sfGetY|

    SfRadiusConstraint|SfRadiusConstraintEnabled

    sfNumPoints
Find Tools

The InputImage type was Image8Grey but is now IImage for the following find tools:

  • Find Line
  • Find Circle
  • Find Ellipse
  • Find Corner
Histogram

The CreateResultGraphics method of the HistogramResult class has the axes of the first item.

PMAlign
  • The PMAlign tool in this release does not support the following: 
    • The PatFlex algorithm
    • The Multi-Model PMAlign tool
    • PatMax Customization Packs for modifying internal PatMax algorithm parameters
    • Shape training
  • This release does not support creating new instances of PMAlignZoneAngle and PMAlignZoneScale objects as the default constructor for these classes are now private and available only through a PMAlignRunParams object.
Checkerboard Calibration

All properties and methods supported by the interface ICalibCheckboardWarpParams are supported by the CalibCheckerboard class in this release.

IPOneImage

The IIPOneImageOperatorParams interface is removed in this release. The IIPOneImageOperator class supports the methods Enabled and OperatorName in this release.

CNLSearch

The exceptions CogCNLSearchTooSmallToSearchException and CogCNLSearchTooSmallToTrainException are replaced with InvalidOperationException in this release.

ID

Note the following changes: 

  • This release makes the default constructor for the following classes private and are accessible through the ID object:
    • IDCodabar
    • IDCode128
    • IDCode39
    • IDCode93
    • IDDatabar
    • IDDataMatrix
    • IDDataEANUCCComposite
    • IDFourState
    • IDIO2Of5
    • IDPDF417
    • IDPlanet
    • IDPostnet
    • IDQRCode
    • IDUPCEAN
    • IDPharmacode
    • In addition:

      • You cannot be able to create multiple instance of IDCode139 and then set it on the ID object.
      • You can create multiple ID classes and modify what the IDCode139 property on that.

  • This release removes the property DecodedStringCodePage. The raw data will be available.
Image Processing
  • The following methods have moved to the ImageProcessing namespace: 
    • ImageConvert
    • ScaleImage
  • OCRMax

    Be aware of the following property name changes for the OCRMax tool:

    Old New
    CogOCRMaxSegmenterElementInfo.OverlapFrac OCRMaxSegmenterElementInfo.OverlapFrac
    CogOCRMaxSegmenter.ForegroundThresholdFrac OCRMaxSegmenter.ForegroundThresholdFraction
    CogOCRMaxSegmenter.
    CharacterFragmentMainLineMinYOverlapFrac
    OCRMaxSegmenter.
    CharacterFragmentMainLineMinYOverlapFraction
    CogOCRMaxSegmenter.CharacterFragmentMinNumPels OCRMaxSegmenter.CharacterFragmentMinNumPixels
    CogOCRMaxSegmenter.CharacterMinNumPels OCRMaxSegmenter.CharacterMinNumPixels
    Tool Result Classes

    In previous VisionPro releases your vision application could construct a tool result class, as shown:

    Copy
    new CogCaliperResult();

    In this VisionPro release default tool result classes are made private: 

    Copy
    PMAlignToolPtr tool = Object::Create<PMAlignTool>();
    tool->Pattern->setTrainImage(image);
    tool->setInputImage(image);
    tool->Pattern()->Train();
    tool->Run();
    PMAlignResultsPtr results = tool->Results();
    PMAlignResultPtr result = results->Item(0);
    Transform2DLinearPtr pose = result->GetPose();

    This applies to the following result classes: 

    • PMAlignResult
    • PMAlignResults
    • BlobResult
    • BlobResults
    • CaliperEdge
    • CaliperEdges
    • CaliperResult
    • CaliperResults
    • FindLineResult
    • FindLineResults
    • FindCircleResult
    • FindCircleResults
    • FindEllipseResult
    • FindEllipseResults
    • LineMaxResult
    • LineMaxResults
    • LineMaxEdgePoint
    • LineMaxEdgePointCollection