Skip to content

Commit 4a01e61

Browse files
committed
technical notes
1 parent 8b4271e commit 4a01e61

36 files changed

Lines changed: 10960 additions & 6086 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ runtime/
22
.Rhistory
33

44
/.quarto/
5+
.Rproj.user

Comic-Panel-Extractor.Rproj

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Version: 1.0
2+
3+
RestoreWorkspace: Default
4+
SaveWorkspace: Default
5+
AlwaysSaveHistory: Default
6+
7+
EnableCodeIndexing: Yes
8+
UseSpacesForTab: Yes
9+
NumSpacesForTab: 2
10+
Encoding: UTF-8
11+
12+
RnwWeave: Sweave
13+
LaTeX: pdfLaTeX

Comic-Panel-Extractor_Win64.spec

Lines changed: 0 additions & 39 deletions
This file was deleted.

README.html

Lines changed: 618 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ The OpenCV detection algorithm is specifically tuned to handle the hard stuff: n
99
## 🔬 Technical Details & Known Limitations
1010

1111
**How it works:**
12-
The engine uses OpenCV to convert each page to grayscale, applies a binary threshold to isolate the ink from the paper, dilates the image to close gaps in the panel borders, and uses contour detection (`cv2.findContours`) to draw bounding boxes around the panels. It then filters out noise based on page-area ratios and nested containment.
13-
12+
The engine uses OpenCV to convert each page to grayscale and applies an Otsu/Adaptive binary threshold to isolate the ink from the paper. It then uses morphological closing to bridge gaps in faded panel borders, and contour detection (`cv2.findContours` using `RETR_EXTERNAL`) to draw bounding boxes while intentionally ignoring internal dialogue balloons. Finally, it filters out noise based on area and aspect ratios, discards overlapping regions via Intersection-over-Union Non-Maximum Suppression (IoU-NMS), and calculates the final reading order using DPI-independent row clustering.
1413
**Where it might fail (Please read):**
15-
Because this relies on visual heuristics rather than publisher-provided metadata, it is not 100% perfect. You may experience incorrect crops or missed panels under the following conditions:
14+
Because this relies on visual heuristics rather than publisher-provided metadata, it may not work in some cases. You may experience incorrect crops or missed panels under the following conditions:
15+
1616
* **Overlapping Panels / Broken Gutters:** If a character's arm reaches outside a panel and breaks the gutter line, the algorithm may merge two panels together.
1717
* **Non-Rectangular / Splash Pages:** Circular panels, extreme diagonals, or chaotic splash pages without clear borders will likely confuse the bounding box logic.
1818
* **Zero-Gutter / Full Bleed:** If the page has no gutters at all (the art goes entirely to the edge of the page), the algorithm cannot slice it.

README_files/libs/bootstrap/bootstrap-bb462d781dde1847d9e3ccf7736099dd.min.css

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)