Files
fil/docs/snippets/ruby/ocr/image_preprocessing.md

18 lines
395 B
Markdown
Raw Normal View History

2026-06-01 23:40:55 +02:00
```ruby title="Ruby"
require 'kreuzberg'
config = Kreuzberg::ExtractionConfig.new(
ocr: Kreuzberg::OcrConfig.new(
tesseract_config: Kreuzberg::TesseractConfig.new(
preprocessing: Kreuzberg::ImagePreprocessingConfig.new(
target_dpi: 300,
denoise: true,
deskew: true,
contrast_enhance: true,
binarization_method: 'otsu'
)
)
)
)
```