NIOCRThresholdModes Enumeration

NI Vision for Visual Basic

NIOCRThresholdModes Enumeration

Specifies how NI Vision calculates the threshold method you want to use to analyze an image.

  • niocrFixedThresholdRange—Performs no automatic calculations. You manually set the threshold value. This mode provides the fastest thresholding method.
  • niocrUniformThreshold—Calculates a single threshold value for the entire ROI.
  • niocrLinearThreshold—Calculates a value on the left side of the ROI, calculates a value on the right size of the ROI, and then linearly fills the middle values from left to right. The size of the steps from which to calculate the left and right values is based on the value of NIOCRProcessingOptions.NumberOfBlocks. Use this mode when the light intensity varies uniformly across the ROI.
  • niocrNonLinearThreshold—Divides the ROI into the number of blocks specified by NIOCRThresholdData.NumberOfBlocks, calculates a threshold value for each block, and then uses the value to extract pixel data.