ImgQualityControlSetParameter

Top  Previous  Next

Prototype

 

boolOk:=ImgQualityControlSetParameter(intHandle, intParameter, intIndex)

 

Description

 

Set a parameter into the Check21 compliant quality control session.

 

Parameters

 

intHandle: integer valure representing the handle of initialized quality control session.

intParameter: integer value representing the index of parameter to set. Allowed values are:

 

      0: Left Margin to skip performing QC in 1/100 of inch (default is 25)

      1: Top Margin to skip performing QC in 1/100 of inch (default is 25)

      2: Right Margin to skip performing QC in 1/100 of inch (default is 25)

      3: Bottom Margin to skip performing QC in 1/100 of inch (default is 25)

      4: Minimum Image Size Threshold Horizontal to pass QC in 1/100 of inch (default is 0)

      5: Minimum Image Size Threshold Vertical to pass the QC in 1/100 of inch (default is 0)

      6: Maximum Image Size Threshold Horizontal to pass the QC in 1/100 of inch (default is maxint)

      7: Maximum Image Size Threshold Vertical to pass the QC in 1/100 of inch (default is maxint)

      8: Maximum Left Edge Overscan Threshold to pass the QC in 1/100 of inch (default is 0)

      9: Maximum Right Edge Overscan Threshold to pass the QC in 1/100 of inch (default is 0)

      10: Maximum Top Edge Overscan Threshold to pass the QC in 1/100 of inch (default is 0)

      11: Maximum Bottom Edge Overscan Threshold to pass the QC in 1/100 of inch (default is 0)

      12: Maximum Top Left Corner Fold Threshold to pass QC in 1/100 of inch (default is 3)

      13: Maximum Top Right Corner Fold Threshold  to pass QC in 1/100 of inch (default is 3)

      14: Maximum Bottom Left Corner Fold Threshold  to pass QC in 1/100 of inch (default is 3)

      15: Maximum Bottom Right Corner Fold Threshold  to pass QC in 1/100 of inch (default is 3)

      16: Maximum Top Border Fold Threshod to pass QC in 1/100 of inch (default is 3)

      17: Maximum Bottom Border Fold Threshod to pass QC in 1/100 of inch (default is 3)

      18: Maximum Right Border Fold Threshod to pass QC in 1/100 of inch (default is 3)

      19: Maximum Left Border Fold Threshod to pass QC in 1/100 of inch (default is 3)

      20: Max Negative Skew Angle Threshold to pass QC in 1/10 of degree (default is -5 = -0.5°)

      21: Max Positive Skew Angle Threshold to pass QC in 1/10 of degree (default is 5 = 0.5°)

      22: Minimum Percentage Black Pixel Threshold to pass QC in 1/10 of percentage (default is 30 = 3%)

      23: Maximum Percentage Black Pixel Threshold to pass QC in 1/10 of percentage (default is 200 = 20%)

      24: Minimum Percent Brigthness Threshold to pass QC in 1/10 of percentage (default is 700 = 70%)

      25: Maximum Percent Brigthness Threshold to pass QC in 1/10 of percentage (default is 900 = 90%)

      26: Minimum Percent Contrast Threshold  to pass QC in 1/10 of percentage (default is 500 = 50%)

      27: Maximum Spot Noise Count Threshold to pass QC in pixels per square inch (default is 50)

      28: Minimum Focus Threshold to pass QC in 1/10 of percentage (default is 500 = 50%)

      29: Minimum Bitonal Compressed Image Size Threshold to pass QC in bytes (default is 10000)

      30: Maximum Bitonal Compressed Image Size Threshold  to pass QC in bytes (default is 100000)

      31: Minimum Graylevel Compressed ImageSize Threshold  to pass QC in bytes (default is 50000)

      32: Maximum Graylevel Compressed Image Size Threshold  to pass QC in bytes (default is 500000)

      33: Maximum Image Width Difference with back side to pass QC in 1/100 of inch (default is 8)

      34: Maximum Image Height Difference with back side to pass QC in 1/100 of inch (default is 8)

 

intValue: integer value representing the value of parameter to set. See parameter index to see allowed values.

 

Returned value

 

Boolean value: true if the parameter was set correctly, false otherwise.

 

Notes

 

None.

 

Example

 

// This example perform QC on checks built as 2 pages TIFF file each

 

// Perform this operation only if current image is its the first one of file

if _CurrentPage=0 then

begin

 

 // Initialize the Check21 quality control session with default values

 qcSession:=ImgQualityControlInitialize;

 

 // Set a max negative and positive angle of skew allowd to pass the QC different from default

 ImgQualityControlSetParameter(qcSession,20, -3); // -0.3°

 ImgQualityControlSetParameter(qcSession,21, 3); // +0.3°

 

 // Load back side of check, the second image of the file

 BackSide:=ImgOpen(_CurrentInputFile,1);

 

 // Performs the quality control checking

 ImgQualityControlExecute(qcSession,_CurrentImage, BackSide, _CurrentInputFile);

 

 // Remove from memory back side

 ImgDelete(BackSide);

 

 // Display measured QC flags (the first 17 measures)

 ApplicationLog('QC Result for file: ' + _CurrentInputFile);

 

 for i:=0 to 16 do

  begin

 

   // Get the measure

   measure:=ImgQualityControlGetMeasure(qcSession,i,0);

 

   // Get the measure name

   measureName:=ImgQualityControlGetMeasureName(qcSession,i,0);

 

   // Display the measure and the name

   ApplicationLog(MeasureName+' '+IntToStr(Measure));

 

  end;

 

 // Finalize the quality control session

 ImgQualityControlFinalize(qcSession);

end;