New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@pangiam/capacitor-face-detection

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pangiam/capacitor-face-detection

Live face detection for Capacitor

  • 0.0.10
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
3
Weekly downloads
 
Created
Source

@pangiam/face-detection

Live face detection for Capacitor

Install

npm install @pangiam/face-detection
npx cap sync

API

startActiveScan(...)

startActiveScan(options: StartActiveScanOptions) => Promise<void>
ParamType
optionsStartActiveScanOptions

readFaceFromImage(...)

readFaceFromImage(options: readFaceFromImageOptions) => Promise<FaceDetectionResults>
ParamType
optionsreadFaceFromImageOptions

Returns: Promise<FaceDetectionResults>


stopScan()

stopScan() => Promise<void>

addListener('faceScanned', ...)

addListener(eventName: 'faceScanned', listenerFunc: (event: ActiveFaceSanResult) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
ParamType
eventName'faceScanned'
listenerFunc(event: ActiveFaceSanResult) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


addListener('scanError', ...)

addListener(eventName: 'scanError', listenerFunc: (event: ScanErrorEvent) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
ParamType
eventName'scanError'
listenerFunc(event: ScanErrorEvent) => void

Returns: Promise<PluginListenerHandle> & PluginListenerHandle


removeAllListeners()

removeAllListeners() => Promise<void>

enableTorch()

enableTorch() => Promise<void>

disableTorch()

disableTorch() => Promise<void>

toggleTorch()

toggleTorch() => Promise<void>

isTorchEnabled()

isTorchEnabled() => Promise<IsTorchEnabledResult>

Returns: Promise<IsTorchEnabledResult>


isTorchAvailable()

isTorchAvailable() => Promise<IsTorchAvailableResult>

Returns: Promise<IsTorchAvailableResult>


openSettings()

openSettings() => Promise<void>

isSupported()

isSupported() => Promise<IsSupportedResult>

Returns: Promise<IsSupportedResult>


checkPermissions()

checkPermissions() => Promise<PermissionStatus>

Returns: Promise<PermissionStatus>


requestPermissions()

requestPermissions() => Promise<PermissionStatus>

Returns: Promise<PermissionStatus>


Interfaces

StartActiveScanOptions
PropType
lensFacingLensFacing
FaceDetectionResults
PropType
facesFace[]
Face

Represents a face detected by FaceDetector.

PropTypeDescription
boundsRectReturns the axis-aligned bounding rectangle of the detected face.
landmarksFaceLandmark[]Returns a list of face landmarks.
contoursFaceContour[]Returns a list of face contours.
trackingIdnumberReturns the tracking ID if the tracking is enabled.
headEulerAngleXnumberReturns the rotation of the face about the horizontal axis of the image. Positive euler X is the face is looking up.
headEulerAngleYnumberReturns the rotation of the face about the vertical axis of the image. Positive euler y is when the face turns toward the right side of the image that is being processed.
headEulerAngleZnumberReturns the rotation of the face about the axis pointing out of the image. Positive euler z is a counter-clockwise rotation within the image plane.
smilingProbabilitynumberReturns a value between 0.0 and 1.0 giving a probability that the face is smiling.
leftEyeOpenProbabilitynumberReturns a value between 0.0 and 1.0 giving a probability that the face's left eye is open.
rightEyeOpenProbabilitynumberReturns a value between 0.0 and 1.0 giving a probability that the face's right eye is open.
Rect

Rect holds four integer coordinates for a rectangle.

PropTypeDescriptionSince
leftnumberThe X coordinate of the left side of the rectangle.5.1.0
topnumberThe Y coordinate of the top of the rectangle.5.1.0
rightnumberThe X coordinate of the right side of the rectangle.5.1.0
bottomnumberThe Y coordinate of the bottom of the rectangle.5.1.0
FaceLandmark

Represent a face landmark. A landmark is a point on a detected face, such as an eye, nose, or mouth.

PropTypeDescriptionSince
typeLandmarkTypeGets the FaceLandmark.LandmarkType type.5.1.0
positionPointGets a 2D point for landmark position, where (0, 0) is the upper-left corner of the image.5.1.0
Point

Point holds two coordinates

PropType
xnumber
ynumber
FaceContour

Represent a face contour. A contour is a list of points on a detected face, such as the mouth.

PropTypeDescriptionSince
typeContourTypeGets the FaceContour.ContourType type.5.1.0
pointsPoint[]Gets a list of 2D points for this face contour, where (0, 0) is the upper-left corner of the image.5.1.0
readFaceFromImageOptions
PropType
pathstring
PluginListenerHandle
PropType
remove() => Promise<void>
ActiveFaceSanResult
PropType
faceFace
ScanErrorEvent
PropType
messagestring
IsTorchEnabledResult
PropType
enabledboolean
IsTorchAvailableResult
PropType
availableboolean
IsSupportedResult
PropType
supportedboolean
PermissionStatus
PropType
cameraCameraPermissionState

Type Aliases

CameraPermissionState

PermissionState | 'limited'

PermissionState

'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'

Enums

LensFacing
MembersValue
Front'FRONT'
Back'BACK'
LandmarkType
MembersValueDescriptionSince
MouthBottom0The center of the subject's bottom lip.5.1.0
LeftCheek1The midpoint between the subject's left mouth corner and the outer corner of the subject's left eye. For full profile faces, this becomes the centroid of the nose base, nose tip, left ear lobe and left ear tip.5.1.0
LeftEar3The midpoint of the subject's left ear tip and left ear lobe.5.1.0
LeftEye4The center of the subject's left eye cavity.5.1.0
MouthLeft5The subject's left mouth corner where the lips meet.5.1.0
NoseBase6The midpoint between the subject's nostrils where the nose meets the face.5.1.0
RightCheek7The midpoint between the subject's right mouth corner and the outer corner of the subject's right eye. For full profile faces, this becomes the centroid of the nose base, nose tip, right ear lobe and right ear tip.5.1.0
RightEar9The midpoint of the subject's right ear tip and right ear lobe.5.1.0
RightEye10The center of the subject's right eye cavity.5.1.0
MouthRight11The subject's right mouth corner where the lips meet.5.1.0
ContourType
MembersValueDescriptionSince
Face1The outline of the subject's face.5.1.0
LeftEyebrowTop2The top outline of the subject's left eyebrow.5.1.0
LeftEyebrowBottom3The bottom outline of the subject's left eyebrow.5.1.0
RightEyebrowTop4The top outline of the subject's right eyebrow.5.1.0
RightEyebrowBottom5The bottom outline of the subject's right eyebrow.5.1.0
LeftEye6The outline of the subject's left eye cavity.5.1.0
RightEye7The outline of the subject's right eye cavity.5.1.0
UpperLipTop8The top outline of the subject's upper lip.5.1.0
UpperLipBottom9The bottom outline of the subject's upper lip.5.1.0
LowerLipTop10The top outline of the subject's lower lip.5.1.0
LowerLipBottom11The bottom outline of the subject's lower lip.5.1.0
NoseBridge12The outline of the subject's nose bridge.5.1.0
NoseBottom13The outline of the subject's nose bridge.5.1.0
LeftCheek14The center of the left cheek.5.1.0
RightCheek15The center of the right cheek.5.1.0

Keywords

FAQs

Package last updated on 28 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc