Constructor
new Frames()
- Source:
Methods
(async) getEmbedding(documentDb, input) → {Promise.<?Array.<number>>}
- Description:
- returns embedding of an objectId.
- Source:
Example
const mdx = require("@nvidia-mdx/web-api-core");
const elastic = new mdx.Utils.Elasticsearch({node: "elasticsearch-url"},databaseConfigMap);
let input = {sensorId: "abc", objectId: "120", timestamp: "2023-01-12T11:20:10.000Z"};
let framesMetadata = new mdx.Services.Frames();
let embedding = await framesMetadata.getEmbedding(elastic, input);
Parameters:
Name |
Type |
Description |
documentDb |
Database
|
Database Object |
input |
Object
|
Input object.
Properties
Name |
Type |
Description |
sensorId |
string
|
|
objectId |
string
|
|
timestamp |
string
|
|
|
Returns:
Embedding of an objectId is returned
-
Type
-
Promise.<?Array.<number>>
(async) getEnhancedFrames(documentDb, input) → {Promise.<Object>}
- Description:
- returns an object containing an array of enhanced frames.
- Source:
Example
const mdx = require("@nvidia-mdx/web-api-core");
const elastic = new mdx.Utils.Elasticsearch({node: "elasticsearch-url"},databaseConfigMap);
let input = {sensorId: "abc", timestamp: "2023-01-12T11:20:10.000Z"};
let framesMetadata = new mdx.Services.Frames();
let enhancedFrames = await framesMetadata.getEnhancedFrames(elastic,input);
Parameters:
Name |
Type |
Description |
documentDb |
Database
|
Database Object |
input |
Object
|
Input object.
Properties
Name |
Type |
Attributes |
Default |
Description |
sensorId |
string
|
|
|
|
frameId |
string
|
<optional>
|
|
Either frameId or timestamp or (fromTimestamp and toTimestamp) should be present. frameId can't occur together with maxResultSize. |
timestamp |
string
|
<optional>
|
|
Either frameId or timestamp or (fromTimestamp and toTimestamp) should be present. timestamp can't occur together with maxResultSize. |
fromTimestamp |
string
|
<optional>
|
|
Either frameId or timestamp or (fromTimestamp and toTimestamp) should be present. |
toTimestamp |
string
|
<optional>
|
|
Either frameId or timestamp or (fromTimestamp and toTimestamp) should be present. |
maxResultSize |
number
|
<optional>
|
25
|
maxResultSize must be an integer. maxResultSize can't occur together with either frameId or timestamp. |
|
Returns:
An object containing an array of enhanced frames is returned
-
Type
-
Promise.<Object>
(async) getFrames(documentDb, input) → {Promise.<Object>}
- Description:
- returns an object containing an array of frames.
- Source:
Example
const mdx = require("@nvidia-mdx/web-api-core");
const elastic = new mdx.Utils.Elasticsearch({node: "elasticsearch-url"},databaseConfigMap);
let input = {sensorId: "abc", timestamp: "2023-01-12T11:20:10.000Z"};
let framesMetadata = new mdx.Services.Frames();
let frames = await framesMetadata.getFrames(elastic,input);
Parameters:
Name |
Type |
Description |
documentDb |
Database
|
Database Object |
input |
Object
|
Input object.
Properties
Name |
Type |
Attributes |
Default |
Description |
sensorId |
string
|
|
|
|
frameId |
string
|
<optional>
|
|
Either frameId or timestamp or (fromTimestamp and toTimestamp) should be present. frameId can't occur together with maxResultSize. |
timestamp |
string
|
<optional>
|
|
Either frameId or timestamp or (fromTimestamp and toTimestamp) should be present. timestamp can't occur together with maxResultSize. |
fromTimestamp |
string
|
<optional>
|
|
Either frameId or timestamp or (fromTimestamp and toTimestamp) should be present. |
toTimestamp |
string
|
<optional>
|
|
Either frameId or timestamp or (fromTimestamp and toTimestamp) should be present. |
maxResultSize |
number
|
<optional>
|
25
|
maxResultSize must be an integer. maxResultSize can't occur together with either frameId or timestamp. |
|
Returns:
An object containing an array of frames is returned
-
Type
-
Promise.<Object>
(async) getLatestTimestampOfFrameWithObject(documentDb, input) → {Promise.<?string>}
- Description:
- returns the timestamp of the latest occurance of objectId in a frameId of a sensor.
- Source:
Example
const mdx = require("@nvidia-mdx/web-api-core");
const elastic = new mdx.Utils.Elasticsearch({node: "elasticsearch-url"},databaseConfigMap);
let input = {sensorId: "abc", objectId: "120", frameId: "2200"};
let framesMetadata = new mdx.Services.Frames();
let timestampOfFrame = await framesMetadata.getLatestTimestampOfFrameWithObject(elastic, input);
Parameters:
Name |
Type |
Description |
documentDb |
Database
|
Database Object |
input |
Object
|
Input object.
Properties
Name |
Type |
Description |
sensorId |
string
|
|
objectId |
string
|
|
frameId |
string
|
|
|
Returns:
Timestamp of the frame is returned
-
Type
-
Promise.<?string>
(async) getMaxConfidenceDetectionOfObjects(documentDb, input) → {Promise.<Object>}
- Description:
- returns an object containing an array of detected objects. Only the data point corresponding to the max confidence of each object id will be present in the array.
- Source:
Example
const mdx = require("@nvidia-mdx/web-api-core");
const elastic = new mdx.Utils.Elasticsearch({node: "elasticsearch-url"},databaseConfigMap);
let input = {sensorId: "abc", fromTimestamp: "2023-01-12T11:20:10.000Z", toTimestamp: "2023-01-12T14:20:10.000Z"};
let framesMetadata = new mdx.Services.Frames();
let objects = await framesMetadata.getMaxConfidenceDetectionOfObjects(elastic, input);
Parameters:
Name |
Type |
Description |
documentDb |
Database
|
Database Object |
input |
Object
|
Input object.
Properties
Name |
Type |
Attributes |
Default |
Description |
sensorId |
string
|
|
|
|
objectId |
string
|
<optional>
<nullable>
|
null
|
objectId and maxResultSize can't occur together. |
fromTimestamp |
string
|
|
|
|
toTimestamp |
string
|
|
|
|
maxResultSize |
number
|
<optional>
|
100
|
maxResultSize must be an integer. objectId and maxResultSize can't occur together. |
minConfidence |
number
|
<optional>
|
0.80
|
|
|
Returns:
An object containing an array of detected objects is returned
-
Type
-
Promise.<Object>
(async) getProximityClusters(documentDb, input) → {Promise.<Object>}
- Description:
- returns details of proximity clusters.
- Source:
Example
const mdx = require("@nvidia-mdx/web-api-core");
const elastic = new mdx.Utils.Elasticsearch({node: "elasticsearch-url"},databaseConfigMap);
let input = {sensorId: "abc", fromTimestamp: "2023-01-12T11:20:10.000Z", toTimestamp: "2023-01-12T14:20:10.000Z"};
let framesMetadata = new mdx.Services.Frames();
let proximityClusterResult = await framesMetadata.getProximityClusters(elastic, input);
Parameters:
Name |
Type |
Description |
documentDb |
Database
|
Database Object |
input |
Object
|
Input object.
Properties
Name |
Type |
Description |
sensorId |
string
|
|
fromTimestamp |
string
|
|
toTimestamp |
string
|
|
|
Returns:
An object containing details of proximity clusters is returned
-
Type
-
Promise.<Object>
(async) getPts(documentDb, input) → {Promise.<Object>}
- Description:
- returns an object containing pts.
- Source:
Example
const mdx = require("@nvidia-mdx/web-api-core");
const elastic = new mdx.Utils.Elasticsearch({node: "elasticsearch-url"},databaseConfigMap);
let input = {sensorId: "abc", frameId: 2200};
let framesMetadata = new mdx.Services.Frames();
let pts = await framesMetadata.getPts(elastic, input);
Parameters:
Name |
Type |
Description |
documentDb |
Database
|
Database Object |
input |
Object
|
Input object.
Properties
Name |
Type |
Attributes |
Description |
sensorId |
string
|
|
|
timestamp |
string
|
<optional>
|
Either timestamp or frameId should be present. |
frameId |
number
|
<optional>
|
frameId must be an integer. Either timestamp or frameId should be present. |
|
Returns:
An object containing pts is returned
-
Type
-
Promise.<Object>