debug_utils.viewer¶
Displays or saves debug images for page-dewarp.
If cfg.DEBUG_OUTPUT is "file", the debug image is saved to disk with a filename
indicating name, step, and text. Otherwise (if cfg.DEBUG_OUTPUT is "screen"
or "both"), the image is displayed in an OpenCV window with an overlaid label,
and the script waits for a keypress to close the window.
debug_show ¶
Show or save a debug image, possibly with an overlay of text.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
|
A string identifier for this debug image (e.g. "dewarp" or "contours"). |
required |
step
|
|
A numeric or string code indicating the processing step. |
required |
text
|
|
A description to overlay on the image or use in the filename. |
required |
display
|
|
A NumPy array (image) to show or save. |
required |