image.binarization

This repository contains an R package for Binarizing Images focusing on local adaptive thresholding with the purpose of improving

Installation

Look to the documentation of the functions

help(package = "image.binarization")

Example

Get an image, put it into gray scale and binarise it using the method by Su

library(magick)
library(image.binarization)
img <- image_read("scan.jpg")
img <- image_convert(img, format = "PGM", colorspace = "Gray")
img
img <- image_binarization(img, type = "su")
img

Algorithms

Based on https://github.com/brandonmpetty/Doxa

DIGI

By DIGI: Brussels Platform for Digital Humanities: https://digi.research.vub.be