Defines the handle of the pose estimation.
It is created through create(), and the created handle is invalid after destroy() is called.
The Pose estimation API identifies the Estimation created through the PoseEstimationHandle parameter.
typedef DOMString PoseEstimationHandle;
2. Interfaces
2.1 PoseEstimationKeypoints
Specifies the key point information of pose estimation.
readonlydoublex
Indicates x-coordinate of keypoint
readonlydoubley
Indicates y-coordinate of keypoint
readonlydoubleconfidence
Indicates confidence score of keypoint
readonlyKeyPonitIdkeypoint
Indicates id of keypoint
2.2 PoseEstimationManagerObject
Defines a WebApi object instance of the Tizen Samsung Product API.
The webapis.poseestimation object enables access to Pose Estimation API functionality.
url : Content URL,It should be an absolute local path of a PNG image
roi : the body roi information of input image
roi[0] = x coordinate of roi, value should be 0~1
roi[1] = y coordinate of roi, value should be 0~1
roi[2] = width of roi, value should be 0~1
roi[3] = height of roi, value should be 0~1
Return Value :
PoseEstimationKeypoints[] : a array which include all keypoints info, see the description of PoseEstimationKeypoints
Exceptions :
WebAPIException
with error type NotSupportedError, if this API is called for products which don't support pose estimation.
with error type TypeMismatchError, if the type of the parameters passed into the function is incorrect.
with error type InvalidValuesError, if any input parameter contains an invalid value.
with error type UnknownError, for any other error.
Code Example :
try {
let handle = webapis.poseestimation.create();
webapis.poseestimation.init(handle);
let roi = [0.406667, 0.144097, 0.136667, 0.697571];
let outputs = webapis.poseestimation.run(handle, "/opt/media/USBDriveA1/images/high_knees.png", roi); //you should call run() after calling init()
console.log("key points number : " + outputs.length);
for (let i = 0; i < outputs.length; i++) {
console.log("KeyPonit[" + i + "]: keypoint = " + outputs[i].keypoint + ", confidence = " + outputs[i].confidence + ", coordinate =(" + outputs[i].x + "," + outputs[i].y + ")");
}
} catch (error) {
console.error("error code = " + error.code + ", error name = " + error.name + ", error message = " + error.message);
}
runWithBuffer
Run pose estimation with a base64 encoded buffer to get the keypoint information from it.
buffer : It should be base64 encoded buffer data of a PNG image file
roi : the body roi information of input image
roi[0] = x coordinate of roi, value should be 0~1
roi[1] = y coordinate of roi, value should be 0~1
roi[2] = width of roi, value should be 0~1
roi[3] = height of roi, value should be 0~1
Return Value :
PoseEstimationKeypoints[] : a array which include all keypoints info, see the description of PoseEstimationKeypoints
Exceptions :
WebAPIException
with error type NotSupportedError, if this API is called for products which don't support pose estimation.
with error type TypeMismatchError, if the type of the parameters passed into the function is incorrect.
with error type InvalidValuesError, if any input parameter contains an invalid value.
with error type UnknownError, for any other error.
Code Example :
try {
let handle = webapis.poseestimation.create();
webapis.poseestimation.init(handle);
let roi = [0.406667, 0.144097, 0.136667, 0.697571];
let outputs = webapis.poseestimation.runWithBuffer(handle, "/9j/4AAQSkZJRgABAQAAAQABAAD//gA7Q1JFQVRPU...", roi); //you should call runWithBuffer() after calling init()
console.log("key points number : " + outputs.length);
for (let i = 0; i < outputs.length; i++) {
console.log("KeyPonit[" + i + "]: keypoint = " + outputs[i].keypoint + ", confidence = " + outputs[i].confidence + ", coordinate =(" + outputs[i].x + "," + outputs[i].y + ")");
}
} catch (error) {
console.error("error code = " + error.code + ", error name = " + error.name + ", error message = " + error.message);
}
deinit
Deinitialize pose estimation. If you have called init function, you should call deinit before terminating your application.
void deinit(PoseEstimationHandle handle);
Parameters :
handle : handle of pose estimation
Exceptions :
WebAPIException
with error type NotSupportedError, if this API is called for products which don't support pose estimation.
with error type TypeMismatchError, if the type of the parameters passed into the function is incorrect.
with error type UnknownError, for any other error.
Code Example :
try {
let handle = webapis.poseestimation.create();
webapis.poseestimation.init(handle);
let roi = [0.406667, 0.144097, 0.136667, 0.697571];
webapis.poseestimation.run(handle, "/opt/media/USBDriveA1/images/high_knees.png", roi);
webapis.poseestimation.deinit(handle); //you should call deinit() after using pose estimation.
} catch (error) {
console.error("error code = " + error.code + ", error name = " + error.name + ", error message = " + error.message);
}
destroy
Destroy an instance of pose estimation. If you have called create function, you should call destroy before terminating your application.
void destroy(PoseEstimationHandle handle);
Parameters :
handle : handle of pose estimation
Exceptions :
WebAPIException
with error type NotSupportedError, if this API is called for products which don't support pose estimation.
with error type TypeMismatchError, if the type of the parameters passed into the function is incorrect.
with error type UnknownError, for any other error.
We use cookies to improve your experience on our website and to show you relevant
advertising. Manage you settings for our cookies below.
Essential Cookies
These cookies are essential as they enable you to move around the website. This
category cannot be disabled.
Company
Domain
Samsung Electronics
.samsungdeveloperconference.com
Analytical/Performance Cookies
These cookies collect information about how you use our website. for example which
pages you visit most often. All information these cookies collect is used to improve
how the website works.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Functionality Cookies
These cookies allow our website to remember choices you make (such as your user name, language or the region your are in) and
tailor the website to provide enhanced features and content for you.
Company
Domain
LinkedIn
.ads.linkedin.com, .linkedin.com
Advertising Cookies
These cookies gather information about your browser habits. They remember that
you've visited our website and share this information with other organizations such
as advertisers.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Preferences Submitted
You have successfully updated your cookie preferences.