Search
Preparing search index...
The search index is not available
@vladmandic/face-api - v1.6.0
Options
All
Public
Public/Protected
All
Inherited
Menu
@vladmandic/face-api - v1.6.0
Box
Class Box<BoxType>
Type parameters
BoxType =
any
Hierarchy
Box
BoundingBox
LabeledBox
Rect
Implements
IBoundingBox
IRect
Index
Constructors
constructor
Accessors
area
bottom
bottom
Left
bottom
Right
height
left
right
top
top
Left
top
Right
width
x
y
Methods
calibrate
clip
At
Image
Borders
floor
pad
pad
At
Borders
rescale
round
shift
to
Square
assert
Is
Valid
Box
is
Rect
Constructors
constructor
new
Box
<
BoxType
>
(
_box
:
IRect
|
IBoundingBox
, allowNegativeDimensions
?:
boolean
)
:
Box
<
BoxType
>
Type parameters
BoxType =
any
Parameters
_box:
IRect
|
IBoundingBox
allowNegativeDimensions:
boolean
= true
Returns
Box
<
BoxType
>
Accessors
area
get
area
(
)
:
number
Returns
number
bottom
get
bottom
(
)
:
number
Returns
number
bottom
Left
get
bottomLeft
(
)
:
Point
Returns
Point
bottom
Right
get
bottomRight
(
)
:
Point
Returns
Point
height
get
height
(
)
:
number
Returns
number
left
get
left
(
)
:
number
Returns
number
right
get
right
(
)
:
number
Returns
number
top
get
top
(
)
:
number
Returns
number
top
Left
get
topLeft
(
)
:
Point
Returns
Point
top
Right
get
topRight
(
)
:
Point
Returns
Point
width
get
width
(
)
:
number
Returns
number
x
get
x
(
)
:
number
Returns
number
y
get
y
(
)
:
number
Returns
number
Methods
calibrate
calibrate
(
region
:
Box
<
any
>
)
:
Box
<
any
>
Parameters
region:
Box
<
any
>
Returns
Box
<
any
>
clip
At
Image
Borders
clip
At
Image
Borders
(
imgWidth
:
number
, imgHeight
:
number
)
:
Box
<
BoxType
>
Parameters
imgWidth:
number
imgHeight:
number
Returns
Box
<
BoxType
>
floor
floor
(
)
:
Box
<
BoxType
>
Returns
Box
<
BoxType
>
pad
pad
(
padX
:
number
, padY
:
number
)
:
Box
<
BoxType
>
Parameters
padX:
number
padY:
number
Returns
Box
<
BoxType
>
pad
At
Borders
pad
At
Borders
(
imageHeight
:
number
, imageWidth
:
number
)
:
{
dx
:
number
;
dy
:
number
;
edx
:
number
;
edy
:
number
;
ex
:
number
;
ey
:
number
;
h
:
number
;
w
:
number
;
x
:
number
;
y
:
number
}
Parameters
imageHeight:
number
imageWidth:
number
Returns
{
dx
:
number
;
dy
:
number
;
edx
:
number
;
edy
:
number
;
ex
:
number
;
ey
:
number
;
h
:
number
;
w
:
number
;
x
:
number
;
y
:
number
}
dx
:
number
dy
:
number
edx
:
number
edy
:
number
ex
:
number
ey
:
number
h
:
number
w
:
number
x
:
number
y
:
number
rescale
rescale
(
s
:
number
|
IDimensions
)
:
Box
<
BoxType
>
Parameters
s:
number
|
IDimensions
Returns
Box
<
BoxType
>
round
round
(
)
:
Box
<
BoxType
>
Returns
Box
<
BoxType
>
shift
shift
(
sx
:
number
, sy
:
number
)
:
Box
<
BoxType
>
Parameters
sx:
number
sy:
number
Returns
Box
<
BoxType
>
to
Square
to
Square
(
)
:
Box
<
BoxType
>
Returns
Box
<
BoxType
>
Static
assert
Is
Valid
Box
assert
Is
Valid
Box
(
box
:
any
, callee
:
string
, allowNegativeDimensions
?:
boolean
)
:
void
Parameters
box:
any
callee:
string
allowNegativeDimensions:
boolean
= false
Returns
void
Static
is
Rect
is
Rect
(
rect
:
any
)
:
boolean
Parameters
rect:
any
Returns
boolean
Exports
draw
utils
Box
constructor
area
bottom
bottom
Left
bottom
Right
height
left
right
top
top
Left
top
Right
width
x
y
calibrate
clip
At
Image
Borders
floor
pad
pad
At
Borders
rescale
round
shift
to
Square
assert
Is
Valid
Box
is
Rect