opticalcheckbox

package module
v0.0.0-...-877b4d4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2020 License: AGPL-3.0 Imports: 5 Imported by: 0

README

gradex-opticalcheckbox

optical check box for use in hand annotated electronic documents

Why?

Check boxes in acroforms might sometimes not be activated correctly by pen display users, so being able to detect freehand electronic annotations is a useful alternative. The intended procedure is place an acroform in the region of the checkbox so that a keyboard user can type an X there, or a pen user can annotate a cross. There is no need to handle non-ideal backgrounds. Nearly all-white squares are true if Vanilla, or nearly all-black are true if !Vanilla. This approach can also be used to identify rectangles with hand annotations for selectively exporting annotations to a compact summary page

Demo

The test image is eight squares, of which the second (all white) is false if Vanilla, and the third to last (all black) is false if !Vanilla. The second to last box, mostly white with a small dot, is also false if Vanilla. This small threshold allows a small touch with a pen to pass un-noticed, to avoid false positives when the mark is so small the person making it may not notice it.

alt text

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckBox

func CheckBox(im image.Image, box Box) bool

func CheckBoxFile

func CheckBoxFile(inputPath string, boxes []Box) ([]bool, error)

func DataBox

func DataBox(im image.Image, box Box) (bool, image.Image)

func DataBoxFile

func DataBoxFile(inputPath string, boxes []Box) ([]bool, []image.Image, error)

Types

type Box

type Box struct {
	Vanilla bool
	Bounds  image.Rectangle
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL