PHP Класс JansenFelipe\OMR\Contracts\Scanner

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$debug boolean Debug flag
$debugPath string Path image to wirte debug image file
$imagePath string Path image to be scanned

Открытые методы

Метод Описание
scan ( Map $map ) : Result Scan specific image
setDebug ( boolean $debug ) Set debug flag
setDebugPath ( mixed $debugPath ) Set debug image path
setImagePath ( mixed $imagePath ) Set image path

Защищенные методы

Метод Описание
ajustRotate ( float $degrees ) Rotate image
ajustSize ( float $percent ) Increases or decreases image size
anglePoints ( Point $a, Point $b ) : float Calculates angle between two points
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
createResult ( string $imagePath ) : Result Create Result object from imagePath
debug ( ) Genereate file debug.jpg with targets, topRight and buttonLeft
distancePoints ( Point $a, Point $b ) : float Calculates distance between two points
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

Описание методов

ajustRotate() абстрактный защищенный Метод

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

ajustSize() абстрактный защищенный Метод

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

anglePoints() защищенный Метод

Calculates angle between two points
protected anglePoints ( Point $a, Point $b ) : float
$a JansenFelipe\OMR\Point
$b JansenFelipe\OMR\Point
Результат float

bottomLeft() абстрактный защищенный Метод

Most point to the bottom/left
abstract protected bottomLeft ( Point $near ) : Point
$near JansenFelipe\OMR\Point
Результат JansenFelipe\OMR\Point

circleArea() абстрактный защищенный Метод

Returns pixel analysis in a circular area
abstract protected circleArea ( Point $a, float $radius, float $tolerance ) : Area
$a JansenFelipe\OMR\Point
$radius float
$tolerance float
Результат JansenFelipe\OMR\Area

createResult() защищенный Метод

Create Result object from imagePath
protected createResult ( string $imagePath ) : Result
$imagePath string
Результат JansenFelipe\OMR\Result

debug() абстрактный защищенный Метод

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

distancePoints() защищенный Метод

Calculates distance between two points
protected distancePoints ( Point $a, Point $b ) : float
$a JansenFelipe\OMR\Point
$b JansenFelipe\OMR\Point
Результат float

finish() абстрактный защищенный Метод

Finish processes
abstract protected finish ( )

rectangleArea() абстрактный защищенный Метод

Returns pixel analysis in a rectangular area
abstract protected rectangleArea ( Point $a, Point $b, float $tolerance ) : Area
$a JansenFelipe\OMR\Point
$b JansenFelipe\OMR\Point
$tolerance float
Результат JansenFelipe\OMR\Area

scan() публичный Метод

Scan specific image
public scan ( Map $map ) : Result
$map Map
Результат JansenFelipe\OMR\Result

setDebug() публичный Метод

Set debug flag
public setDebug ( boolean $debug )
$debug boolean

setDebugPath() публичный Метод

Set debug image path
public setDebugPath ( mixed $debugPath )
$debugPath mixed

setImagePath() публичный Метод

Set image path
public setImagePath ( mixed $imagePath )
$imagePath mixed

textArea() абстрактный защищенный Метод

Returns image blob in a rectangular area
abstract protected textArea ( Point $a, Point $b ) : string
$a JansenFelipe\OMR\Point
$b JansenFelipe\OMR\Point
Результат string

topRight() абстрактный защищенный Метод

Most point to the top/right
abstract protected topRight ( Point $near ) : Point
$near JansenFelipe\OMR\Point
Результат JansenFelipe\OMR\Point

Описание свойств

$debug защищенное свойство

Debug flag
protected bool $debug
Результат boolean

$debugPath защищенное свойство

Path image to wirte debug image file
protected string $debugPath
Результат string

$imagePath защищенное свойство

Path image to be scanned
protected string $imagePath
Результат string