Description
Compare a supplied OCR baseline slope with a two-point slope.
OCR and manuscript image measurements depend on coordinate scales, region definitions and confidence conventions. A transformed polygon or threshold comparison does not establish recognition accuracy, calibration or correct reading order.
Compare a supplied OCR baseline slope with a two-point slope.
When to use this tool
Use OCR Baseline Slope Residual when checking a supplied image-coordinate or OCR-confidence term.
How to use the tool and how it works
- Enter firstX, firstY, secondX, secondY, suppliedSlope. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read slope, residual. Use the output convention below.
Compare a supplied OCR baseline slope with a two-point slope. Require distinct x coordinates; slope = (secondY-firstY)/(secondX-firstX); residual = suppliedSlope-slope.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| firstX | First X | Required. Finite number. |
| firstY | First Y | Required. Finite number. |
| secondX | Second X | Required. Finite number. |
| secondY | Second Y | Required. Finite number. |
| suppliedSlope | Supplied Slope | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| slope | Slope | Required. Finite number. |
| residual | Signed difference in the direction defined above, using the same units as its compared quantities. | Required. Finite number. |
{
"input": {
"firstX": 0,
"firstY": 2,
"secondX": 4,
"secondY": 4,
"suppliedSlope": 0.6
},
"output": {
"slope": 0.5,
"residual": 0.09999999999999998
}
} Limitations and assumptions
- No tolerance, line fitting or OCR quality conclusion is inferred from two points.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use verified image geometry, actual OCR data and suitable quality evaluation when recognition or editorial accuracy matters.
References
Similar or alternative tools
- OCR Word Confidence Threshold Margin
Compare an OCR confidence with a threshold.
- OCR Word Origin Affinity
Return an OCR word-box anchor relative to an origin.