This commit is contained in:
17
docs/snippets/ruby/ocr/image_preprocessing.md
Normal file
17
docs/snippets/ruby/ocr/image_preprocessing.md
Normal file
@@ -0,0 +1,17 @@
|
||||
```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'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
```
|
||||
Reference in New Issue
Block a user