Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
robingenz committed Sep 17, 2023
1 parent 14b2bd8 commit 8caa766
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 27 deletions.
5 changes: 5 additions & 0 deletions .changeset/dry-mice-admire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@capacitor-mlkit/face-mesh-detection': minor
---

Initial release 🎉
12 changes: 6 additions & 6 deletions packages/face-detection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ Represents a face detected by `FaceDetector`.

<a href="#rect">Rect</a> holds four integer coordinates for a rectangle.

| Prop | Type | Description | Since |
| ------------ | ------------------- | --------------------------------------------------- | ----- |
| **`left`** | <code>number</code> | The X coordinate of the left side of the rectangle | 5.1.0 |
| **`top`** | <code>number</code> | The Y coordinate of the top of the rectangle | 5.1.0 |
| **`right`** | <code>number</code> | The X coordinate of the right side of the rectangle | 5.1.0 |
| **`bottom`** | <code>number</code> | The Y coordinate of the bottom of the rectangle | 5.1.0 |
| Prop | Type | Description | Since |
| ------------ | ------------------- | ---------------------------------------------------- | ----- |
| **`left`** | <code>number</code> | The X coordinate of the left side of the rectangle. | 5.1.0 |
| **`top`** | <code>number</code> | The Y coordinate of the top of the rectangle. | 5.1.0 |
| **`right`** | <code>number</code> | The X coordinate of the right side of the rectangle. | 5.1.0 |
| **`bottom`** | <code>number</code> | The Y coordinate of the bottom of the rectangle. | 5.1.0 |


#### FaceLandmark
Expand Down
8 changes: 4 additions & 4 deletions packages/face-detection/src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,25 +265,25 @@ export interface Face {
*/
export interface Rect {
/**
* The X coordinate of the left side of the rectangle
* The X coordinate of the left side of the rectangle.
*
* @since 5.1.0
*/
left: number;
/**
* The Y coordinate of the top of the rectangle
* The Y coordinate of the top of the rectangle.
*
* @since 5.1.0
*/
top: number;
/**
* The X coordinate of the right side of the rectangle
* The X coordinate of the right side of the rectangle.
*
* @since 5.1.0
*/
right: number;
/**
* The Y coordinate of the bottom of the rectangle
* The Y coordinate of the bottom of the rectangle.
*
* @since 5.1.0
*/
Expand Down
24 changes: 14 additions & 10 deletions packages/face-mesh-detection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,14 @@ A working example can be found here: [robingenz/capacitor-mlkit-plugin-demo](htt
## Usage

```typescript
import { FaceMeshDetection } from '@capacitor-mlkit/face-mesh-detection';

const echo = async () => {
await FaceMeshDetection.echo();
import { FaceMeshDetection, UseCase } from '@capacitor-mlkit/face-mesh-detection';

const processImage = async () => {
const { faceMeshs } = await FaceMeshDetection.processImage({
path: 'path/to/image.jpg',
useCase: UseCase.FaceMesh,
});
return faceMeshs;
};
```

Expand Down Expand Up @@ -101,12 +105,12 @@ The triangle information is a group of 3 `FaceMeshPoint`s representing a valid s

<a href="#rect">Rect</a> holds four integer coordinates for a rectangle.

| Prop | Type | Description | Since |
| ------------ | ------------------- | --------------------------------------------------- | ----- |
| **`left`** | <code>number</code> | The X coordinate of the left side of the rectangle | 5.3.0 |
| **`top`** | <code>number</code> | The Y coordinate of the top of the rectangle | 5.3.0 |
| **`right`** | <code>number</code> | The X coordinate of the right side of the rectangle | 5.3.0 |
| **`bottom`** | <code>number</code> | The Y coordinate of the bottom of the rectangle | 5.3.0 |
| Prop | Type | Description | Since |
| ------------ | ------------------- | ---------------------------------------------------- | ----- |
| **`left`** | <code>number</code> | The X coordinate of the left side of the rectangle. | 5.3.0 |
| **`top`** | <code>number</code> | The Y coordinate of the top of the rectangle. | 5.3.0 |
| **`right`** | <code>number</code> | The X coordinate of the right side of the rectangle. | 5.3.0 |
| **`bottom`** | <code>number</code> | The Y coordinate of the bottom of the rectangle. | 5.3.0 |


#### Contours
Expand Down
11 changes: 4 additions & 7 deletions packages/face-mesh-detection/src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export interface ProcessImageOptions {
* @since 5.3.0
*/
path: string;

/**
* Sets the use case.
*
Expand Down Expand Up @@ -90,14 +89,12 @@ export interface FaceMesh {
* @since 5.3.0
*/
bounds: Rect;

/**
* Returns contours with a list of `FaceMeshPoint` representing the detected face.
*
* @since 5.3.0
*/
contours?: Contours;

/**
* Returns a list of `FaceMeshPoint` representing the whole detected face.
*
Expand All @@ -123,25 +120,25 @@ export interface FaceMesh {
*/
export interface Rect {
/**
* The X coordinate of the left side of the rectangle
* The X coordinate of the left side of the rectangle.
*
* @since 5.3.0
*/
left: number;
/**
* The Y coordinate of the top of the rectangle
* The Y coordinate of the top of the rectangle.
*
* @since 5.3.0
*/
top: number;
/**
* The X coordinate of the right side of the rectangle
* The X coordinate of the right side of the rectangle.
*
* @since 5.3.0
*/
right: number;
/**
* The Y coordinate of the bottom of the rectangle
* The Y coordinate of the bottom of the rectangle.
*
* @since 5.3.0
*/
Expand Down

0 comments on commit 8caa766

Please sign in to comment.