bubblepop 0.1.0

A speech bubble extractor for comics and manga in Rust
docs.rs failed to build bubblepop-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

BubblePop Rust Library

Fast, lightweight speech bubble extraction for comics and manga in Rust.

Usage

Add Dependency

[dependencies]
bubblepop = "0.1.0"

Quick Detection

use bubblepop::detect;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Detect directly from file path
    let result = detect("image1.jpg")?;
    println!("Found {} bubbles in {:.2}ms", result.bubbles.len(), result.total_ms);

    Ok(())
}

Custom Options & Instance API

use bubblepop::{BubbleDetector, Options, Backend};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let options = Options::default()
        .with_backend(Backend::Cpu)
        .with_threads(4)
        .with_confidence(0.75);

    let detector = BubbleDetector::with_options(options)?;
    let _ = detector.detect("image1.jpg")?;
    let _ = detector.detect("image2.jpg")?;
    Ok(())
}

Running Examples

An example demonstrating speech bubble detection with visualization overlays:

# Detect and generate overlay from the default sample image
cargo run --release --example overlay

# Or pass a custom image file
cargo run --release --example overlay -- path/to/page.jpg

This writes <filename>_overlay.jpg in the current working directory with semi-transparent bubble masks and thick boundary contours.