PHP Class JansenFelipe\OMR\Scanners\ImagickScanner

Inheritance: extends JansenFelipe\OMR\Contracts\Scanner
Show file Open project: jansenfelipe/omr Class Usage Examples

Public Methods

Method Description
__construct ( )
debug ( ) Genereate file debug.jpg with targets, topRight and buttonLeft

Protected Methods

Method Description
ajustRotate ( float $degrees ) Rotate image
ajustSize ( float $percent ) Increases or decreases image size
bottomLeft ( Point $near ) : Point Most point to the bottom/left
circleArea ( Point $a, float $radius, float $tolerance ) : Area Returns pixel analysis in a circular area
finish ( ) Finish processes
rectangleArea ( Point $a, Point $b, float $tolerance ) : Area Returns pixel analysis in a rectangular area
textArea ( Point $a, Point $b ) : string Returns image blob in a rectangular area
topRight ( Point $near ) : Point Most point to the top/right

Private Methods

Method Description
getImagick ( ) : Imagick Create or return instance Imagick

Method Details

__construct() public method

public __construct ( )

ajustRotate() protected method

Rotate image
protected ajustRotate ( float $degrees )
$degrees float

ajustSize() protected method

Increases or decreases image size
protected ajustSize ( float $percent )
$percent float

bottomLeft() protected method

Most point to the bottom/left
protected bottomLeft ( Point $near ) : Point
$near JansenFelipe\OMR\Point
return JansenFelipe\OMR\Point

circleArea() protected method

Returns pixel analysis in a circular area
protected circleArea ( Point $a, float $radius, float $tolerance ) : Area
$a JansenFelipe\OMR\Point
$radius float
$tolerance float
return JansenFelipe\OMR\Area

debug() public method

Genereate file debug.jpg with targets, topRight and buttonLeft
public debug ( )

finish() protected method

Finish processes
protected finish ( )

rectangleArea() protected method

Returns pixel analysis in a rectangular area
protected rectangleArea ( Point $a, Point $b, float $tolerance ) : Area
$a JansenFelipe\OMR\Point
$b JansenFelipe\OMR\Point
$tolerance float
return JansenFelipe\OMR\Area

textArea() protected method

Returns image blob in a rectangular area
protected textArea ( Point $a, Point $b ) : string
$a JansenFelipe\OMR\Point
$b JansenFelipe\OMR\Point
return string

topRight() protected method

Most point to the top/right
protected topRight ( Point $near ) : Point
$near JansenFelipe\OMR\Point
return JansenFelipe\OMR\Point