image_wordsegmentation {image.textlinedetector}R Documentation

Find Words by Connected Components Labelling

Description

Filter the image using the gaussian kernel and extract components which are connected which are to be considered as words.

Usage

image_wordsegmentation(x, kernelSize = 11L, sigma = 11L, theta = 7L)

Arguments

x

an object of class opencv-image containing black/white binary data (type CV_8U1)

kernelSize

size of the kernel

sigma

sigma of the kernel

theta

theta of the kernel

Value

a list with elements

Examples


library(opencv)
library(magick)
library(image.textlinedetector)
path  <- system.file(package = "image.textlinedetector", "extdata", "example.png")
img   <- image_read(path)
img   <- image_resize(img, "x1000")
areas <- image_textlines_flor(img, light = TRUE, type = "sauvola")
areas$overview
areas$textlines[[6]]
textwords <- image_wordsegmentation(areas$textlines[[6]])
textwords$n
textwords$overview
textwords$words[[2]]
textwords$words[[3]]


[Package image.textlinedetector version 0.2.3 Index]