feat: add step-wise visualization images in CropPage processor#274
feat: add step-wise visualization images in CropPage processor#274Meenakshi-1802 wants to merge 5 commits into
Conversation
Review Summary by QodoAdd step-wise visualization images to CropPage processor
WalkthroughsDescription• Add step-wise visualization images in CropPage processor • Display intermediate processing stages at show_image_level >= 4 • Show 7 debug images: grayscale, blur, threshold, morph, edges, contours • Lower threshold from 5 to 4 for more detailed debugging Diagramflowchart LR
A["Input Image"] --> B["1. Grayscale Input"]
B --> C["2. Gaussian Blur"]
C --> D["3. Threshold"]
D --> E["4. Morph Close"]
E --> F["5. Canny Edges"]
F --> G["6a. Contour on Image"]
F --> H["6b. Contour on Edge"]
G --> I["Output"]
H --> I
File Changes1. src/processors/CropPage.py
|
Code Review by Qodo
1.
|
|
Hi @Udayraj123, I have addressed the bot's feedback:
Please review when you get a chance. Thanks! |
|
@Meenakshi-1802 thanks for adding this, can you please divide the show image thresholds into different start values, keep a few images visible only on higher values like 5 and 6 |
|
Hi @Udayraj123, done! Images are now tiered:
All intermediate calls use pause=0 to avoid blocking batch runs. Please take a look! |
Fixes #44
Added step-wise visualization images in CropPage processor for intuitive understanding of the processing pipeline.
Steps added (visible when show_image_level >= 4):
1_grayscale_input- Original grayscale image before processing2_gaussian_blur- After Gaussian blur + normalize3_threshold- After THRESH_TRUNC + normalize4_morph_close- After morphological close (gap filling)5_canny_edges- Canny edge detection result6a_contour_on_image- Detected page contour drawn on image6b_contour_on_edge- Detected page contour drawn on edge mapTested on samples/sample1 with show_image_level: 5