Skip to content

Latest commit

 

History

History

contrast

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Contrast Example

Source of image: GBN Dataset

PAGE-XML file generated through: ocrd-gbn + ocrd-export-larex

Pure CLI

$ page-xml-draw \
  -i ../input.xml \
  -o output.png \
  --base-dir ../../assets/images
  --page
    --text-region \
      --fill-color cyan \
      --fill-opacity 0.3 \
      --stroke-color darkblue \
      --stroke-opacity 0.3 \
      --stroke-width 5 \
      --text-line \
        --fill-color crimson \
        --fill-opacity 0.3
        --stroke-color darkred \
        --stroke-opacity 0.3 \
        --stroke-width 3

CLI + JSON

$ page-xml-draw \
  -i ../input.xml \
  -o output.png \
  --base-dir ../../assets/images
  --profile profile.json

where the content of profile.json is

{
    "Page": {
        "TextRegion": {
            "FillColor": "cyan",
            "FillOpacity": 0.3,
            "StrokeColor": "darkblue",
            "StrokeOpacity": 0.3,
            "StrokeWidth": 5,
            "TextLine": {
                "FillColor": "crimson",
                "FillOpacity": 0.3,
                "StrokeColor": "darkred",
                "StrokeOpacity": 0.3,
                "StrokeWidth": 3
            }
        }
    }
}

Output

Original Contrast