supervision-js
Preparing search index...
Editing
EditableAnnotationFrameSession
Interface EditableAnnotationFrameSession
interface
EditableAnnotationFrameSession
{
add
(
detection
:
Detection
,
index
?:
number
)
:
DetectionFrame
;
destroy
()
:
void
;
getSnapshot
()
:
DetectionFrame
;
remove
(
id
:
DetectionId
)
:
DetectionFrame
;
replace
(
frame
:
DetectionFrame
)
:
DetectionFrame
;
subscribe
(
listener
:
AnnotationFrameMutationListener
)
:
()
=>
void
;
transact
(
mutate
:
(
detections
:
{
attributes
?:
string
[]
;
className
?:
string
;
confidence
?:
number
;
id
?:
string
|
number
;
keypoints
?:
{
edges
:
[
fromIndex
:
number
,
toIndex
:
number
]
[]
;
points
:
{
x
:
number
;
y
:
number
}
[]
;
visibility
?:
KeypointVisibility
[]
;
}
;
locked
?:
boolean
;
mask
?:
{
counts
:
string
;
encoding
:
CompressedRle
;
height
:
number
;
width
:
number
;
}
;
metadata
?:
{
[
key
:
string
]:
unknown
}
;
polygon
?:
{
points
:
{
x
:
number
;
y
:
number
}
[]
}
;
polyline
?:
{
points
:
{
x
:
number
;
y
:
number
}
[]
}
;
rect
?:
{
height
:
number
;
width
:
number
;
x
:
number
;
y
:
number
}
;
sourceDetectionIndex
?:
number
;
sourceId
?:
string
;
zIndex
?:
number
;
}
[]
,
)
=>
void
,
detectionIds
?:
readonly
DetectionId
[]
,
)
:
DetectionFrame
;
update
(
id
:
DetectionId
,
update
:
Partial
<
Detection
>
|
(
(
current
:
Detection
)
=>
Detection
)
,
)
:
DetectionFrame
;
}
Index
Methods
add
destroy
get
Snapshot
remove
replace
subscribe
transact
update
Methods
add
add
(
detection
:
Detection
,
index
?:
number
)
:
DetectionFrame
Parameters
detection
:
Detection
Optional
index
:
number
Returns
DetectionFrame
destroy
destroy
()
:
void
Returns
void
get
Snapshot
getSnapshot
()
:
DetectionFrame
Returns
DetectionFrame
remove
remove
(
id
:
DetectionId
)
:
DetectionFrame
Parameters
id
:
DetectionId
Returns
DetectionFrame
replace
replace
(
frame
:
DetectionFrame
)
:
DetectionFrame
Parameters
frame
:
DetectionFrame
Returns
DetectionFrame
subscribe
subscribe
(
listener
:
AnnotationFrameMutationListener
)
:
()
=>
void
Parameters
listener
:
AnnotationFrameMutationListener
Returns
()
=>
void
transact
transact
(
mutate
:
(
detections
:
{
attributes
?:
string
[]
;
className
?:
string
;
confidence
?:
number
;
id
?:
string
|
number
;
keypoints
?:
{
edges
:
[
fromIndex
:
number
,
toIndex
:
number
]
[]
;
points
:
{
x
:
number
;
y
:
number
}
[]
;
visibility
?:
KeypointVisibility
[]
;
}
;
locked
?:
boolean
;
mask
?:
{
counts
:
string
;
encoding
:
CompressedRle
;
height
:
number
;
width
:
number
;
}
;
metadata
?:
{
[
key
:
string
]:
unknown
}
;
polygon
?:
{
points
:
{
x
:
number
;
y
:
number
}
[]
}
;
polyline
?:
{
points
:
{
x
:
number
;
y
:
number
}
[]
}
;
rect
?:
{
height
:
number
;
width
:
number
;
x
:
number
;
y
:
number
}
;
sourceDetectionIndex
?:
number
;
sourceId
?:
string
;
zIndex
?:
number
;
}
[]
,
)
=>
void
,
detectionIds
?:
readonly
DetectionId
[]
,
)
:
DetectionFrame
Parameters
mutate
:
(
detections
:
{
attributes
?:
string
[]
;
className
?:
string
;
confidence
?:
number
;
id
?:
string
|
number
;
keypoints
?:
{
edges
:
[
fromIndex
:
number
,
toIndex
:
number
]
[]
;
points
:
{
x
:
number
;
y
:
number
}
[]
;
visibility
?:
KeypointVisibility
[]
;
}
;
locked
?:
boolean
;
mask
?:
{
counts
:
string
;
encoding
:
CompressedRle
;
height
:
number
;
width
:
number
;
}
;
metadata
?:
{
[
key
:
string
]:
unknown
}
;
polygon
?:
{
points
:
{
x
:
number
;
y
:
number
}
[]
}
;
polyline
?:
{
points
:
{
x
:
number
;
y
:
number
}
[]
}
;
rect
?:
{
height
:
number
;
width
:
number
;
x
:
number
;
y
:
number
}
;
sourceDetectionIndex
?:
number
;
sourceId
?:
string
;
zIndex
?:
number
;
}
[]
,
)
=>
void
Optional
detectionIds
:
readonly
DetectionId
[]
Returns
DetectionFrame
update
update
(
id
:
DetectionId
,
update
:
Partial
<
Detection
>
|
(
(
current
:
Detection
)
=>
Detection
)
,
)
:
DetectionFrame
Parameters
id
:
DetectionId
update
:
Partial
<
Detection
>
|
(
(
current
:
Detection
)
=>
Detection
)
Returns
DetectionFrame
Settings
Member Visibility
Inherited
External
Theme
OS
Light
Dark
On This Page
Methods
add
destroy
get
Snapshot
remove
replace
subscribe
transact
update
supervision-js
Loading...