<br />

Performs hand landmarks detection on images.

**Signature:**

```typescript
export declare class HandLandmarker extends VisionTaskRunner 
```

## Properties

| Property | Modifiers | Type | Description |
|---|---|---|---|
| [HAND_CONNECTIONS](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.handlandmarker.md.txt#handlandmarkerhand_connections) | `static` | Connection\[\] | An array containing the pairs of hand landmark indices to be rendered with connections. |

## Methods

| Method | Modifiers | Description |
|---|---|---|
| [createFromOptions(wasmFileset, handLandmarkerOptions)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.handlandmarker.md.txt#handlandmarkercreatefromoptions) | `static` | Initializes the Wasm runtime and creates a new `HandLandmarker` from the provided options. |
| [createFromModelBuffer(wasmFileset, modelAssetBuffer)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.handlandmarker.md.txt#handlandmarkercreatefrommodelbuffer) | `static` | Initializes the Wasm runtime and creates a new `HandLandmarker` based on the provided model asset buffer. |
| [createFromModelPath(wasmFileset, modelAssetPath)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.handlandmarker.md.txt#handlandmarkercreatefrommodelpath) | `static` | Initializes the Wasm runtime and creates a new `HandLandmarker` based on the path to the model asset. |
| [setOptions(options)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.handlandmarker.md.txt#handlandmarkersetoptions) |   | Sets new options for this `HandLandmarker`. Calling `setOptions()` with a subset of options only affects those options. You can reset an option back to its default value by explicitly setting it to `undefined`. |
| [detect(image, imageProcessingOptions)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.handlandmarker.md.txt#handlandmarkerdetect) |   | Performs hand landmarks detection on the provided single image and waits synchronously for the response. Only use this method when the HandLandmarker is created with running mode `image`. |
| [detectForVideo(videoFrame, timestamp, imageProcessingOptions)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.handlandmarker.md.txt#handlandmarkerdetectforvideo) |   | Performs hand landmarks detection on the provided video frame and waits synchronously for the response. Only use this method when the HandLandmarker is created with running mode `video`. |

## HandLandmarker.HAND_CONNECTIONS

An array containing the pairs of hand landmark indices to be rendered with connections.

**Signature:**

```typescript
static HAND_CONNECTIONS: Connection[];
```

## HandLandmarker.createFromOptions()

Initializes the Wasm runtime and creates a new `HandLandmarker` from the provided options.

**Signature:**

```typescript
static createFromOptions(wasmFileset: WasmFileset, handLandmarkerOptions: HandLandmarkerOptions): Promise<HandLandmarker>;
```

### Parameters

| Parameter | Type | Description |
|---|---|---|
| wasmFileset | WasmFileset | A configuration object that provides the location of the Wasm binary and its loader. |
| handLandmarkerOptions | HandLandmarkerOptions | The options for the HandLandmarker. Note that either a path to the model asset or a model buffer needs to be provided (via `baseOptions`). |

**Returns:**

Promise\<HandLandmarker\>

## HandLandmarker.createFromModelBuffer()

Initializes the Wasm runtime and creates a new `HandLandmarker` based on the provided model asset buffer.

**Signature:**

```typescript
static createFromModelBuffer(wasmFileset: WasmFileset, modelAssetBuffer: Uint8Array | ReadableStreamDefaultReader): Promise<HandLandmarker>;
```

### Parameters

| Parameter | Type | Description |
|---|---|---|
| wasmFileset | WasmFileset | A configuration object that provides the location of the Wasm binary and its loader. |
| modelAssetBuffer | Uint8Array \| ReadableStreamDefaultReader | An array or a stream containing a binary representation of the model. |

**Returns:**

Promise\<HandLandmarker\>

## HandLandmarker.createFromModelPath()

Initializes the Wasm runtime and creates a new `HandLandmarker` based on the path to the model asset.

**Signature:**

```typescript
static createFromModelPath(wasmFileset: WasmFileset, modelAssetPath: string): Promise<HandLandmarker>;
```

### Parameters

| Parameter | Type | Description |
|---|---|---|
| wasmFileset | WasmFileset | A configuration object that provides the location of the Wasm binary and its loader. |
| modelAssetPath | string | The path to the model asset. |

**Returns:**

Promise\<HandLandmarker\>

## HandLandmarker.setOptions()

Sets new options for this `HandLandmarker`. Calling `setOptions()` with a subset of options only affects those options. You can reset an option back to its default value by explicitly setting it to `undefined`.

**Signature:**

```typescript
setOptions(options: HandLandmarkerOptions): Promise<void>;
```

### Parameters

| Parameter | Type | Description |
|---|---|---|
| options | HandLandmarkerOptions | The options for the hand landmarker. |

**Returns:**

Promise\<void\>

## HandLandmarker.detect()

Performs hand landmarks detection on the provided single image and waits synchronously for the response. Only use this method when the HandLandmarker is created with running mode `image`.

**Signature:**

```typescript
detect(image: ImageSource, imageProcessingOptions?: ImageProcessingOptions): HandLandmarkerResult;
```

### Parameters

| Parameter | Type | Description |
|---|---|---|
| image | ImageSource | An image to process. |
| imageProcessingOptions | ImageProcessingOptions | the `ImageProcessingOptions` specifying how to process the input image before running inference. |

**Returns:**

HandLandmarkerResult

## HandLandmarker.detectForVideo()

Performs hand landmarks detection on the provided video frame and waits synchronously for the response. Only use this method when the HandLandmarker is created with running mode `video`.

**Signature:**

```typescript
detectForVideo(videoFrame: ImageSource, timestamp: number, imageProcessingOptions?: ImageProcessingOptions): HandLandmarkerResult;
```

### Parameters

| Parameter | Type | Description |
|---|---|---|
| videoFrame | ImageSource | A video frame to process. |
| timestamp | number | The timestamp of the current frame, in ms. |
| imageProcessingOptions | ImageProcessingOptions | the `ImageProcessingOptions` specifying how to process the input image before running inference. |

**Returns:**

HandLandmarkerResult