<br />

The output result of InteractiveSegmenterLegacy.

**Signature:**

```typescript
export declare class InteractiveSegmenterLegacyResult 
```

## Constructors

| Constructor | Modifiers | Description |
|---|---|---|
| [(constructor)(confidenceMasks, categoryMask, qualityScores)](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.interactivesegmenterlegacyresult.md.txt#interactivesegmenterlegacyresultconstructor) |   | Constructs a new instance of the `InteractiveSegmenterLegacyResult` class. |

## Properties

| Property | Modifiers | Type | Description |
|---|---|---|---|
| [confidenceMasks](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.interactivesegmenterlegacyresult.md.txt#interactivesegmenterlegacyresultconfidencemasks) |   | MPMask\[\] \| undefined | Multiple masks represented as `Float32Array` or `WebGLTexture`-backed `MPImage`s where, for each mask, each pixel represents the prediction confidence, usually in the \[0, 1\] range. |
| [categoryMask](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.interactivesegmenterlegacyresult.md.txt#interactivesegmenterlegacyresultcategorymask) |   | MPMask \| undefined | A category mask represented as a `Uint8ClampedArray` or `WebGLTexture`-backed `MPImage` where each pixel represents the class which the pixel in the original image was predicted to belong to. |
| [qualityScores](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.interactivesegmenterlegacyresult.md.txt#interactivesegmenterlegacyresultqualityscores) |   | number\[\] \| undefined | The quality scores of the result masks, in the range of \[0, 1\]. Defaults to `1` if the model doesn't output quality scores. Each element corresponds to the score of the category in the model outputs. |

## Methods

| Method | Modifiers | Description |
|---|---|---|
| [close()](https://developers.google.com/edge/api/mediapipe/js/tasks-vision.interactivesegmenterlegacyresult.md.txt#interactivesegmenterlegacyresultclose) |   | Frees the resources held by the category and confidence masks. |

## InteractiveSegmenterLegacyResult.(constructor)

Constructs a new instance of the `InteractiveSegmenterLegacyResult` class.

**Signature:**

```typescript
constructor(confidenceMasks?: MPMask[] | undefined, categoryMask?: MPMask | undefined, qualityScores?: number[] | undefined);
```

### Parameters

| Parameter | Type | Description |
|---|---|---|
| confidenceMasks | MPMask\[\] \| undefined | Multiple masks represented as `Float32Array` or `WebGLTexture`-backed `MPImage`s where, for each mask, each pixel represents the prediction confidence, usually in the \[0, 1\] range. |
| categoryMask | MPMask \| undefined | A category mask represented as a `Uint8ClampedArray` or `WebGLTexture`-backed `MPImage` where each pixel represents the class which the pixel in the original image was predicted to belong to. |
| qualityScores | number\[\] \| undefined | The quality scores of the result masks, in the range of \[0, 1\]. Defaults to `1` if the model doesn't output quality scores. Each element corresponds to the score of the category in the model outputs. |

## InteractiveSegmenterLegacyResult.confidenceMasks

Multiple masks represented as `Float32Array` or `WebGLTexture`-backed `MPImage`s where, for each mask, each pixel represents the prediction confidence, usually in the \[0, 1\] range.

**Signature:**

```typescript
readonly confidenceMasks?: MPMask[] | undefined;
```

## InteractiveSegmenterLegacyResult.categoryMask

A category mask represented as a `Uint8ClampedArray` or `WebGLTexture`-backed `MPImage` where each pixel represents the class which the pixel in the original image was predicted to belong to.

**Signature:**

```typescript
readonly categoryMask?: MPMask | undefined;
```

## InteractiveSegmenterLegacyResult.qualityScores

The quality scores of the result masks, in the range of \[0, 1\]. Defaults to `1` if the model doesn't output quality scores. Each element corresponds to the score of the category in the model outputs.

**Signature:**

```typescript
readonly qualityScores?: number[] | undefined;
```

## InteractiveSegmenterLegacyResult.close()

Frees the resources held by the category and confidence masks.

**Signature:**

```typescript
close(): void;
```

**Returns:**

void