Module: @appium/opencv
Table of contents
Interfaces
- MatchComputationResult
- MatchingOptions
- MatchingResult
- OccurrenceOptions
- OccurrenceResult
- OpenCVBindings
- Point
- Rect
- Region
- SimilarityOptions
- SimilarityResult
Type Aliases
Functions
Type Aliases
OccurrenceResultMethod
Ƭ OccurrenceResultMethod<>: "TM_CCOEFF"
| "TM_CCOEFF_NORMED"
| "TM_CCORR"
| "TM_CCORR_NORMED"
| "TM_SQDIFF"
| "TMSQDIFF_NORMED"
Defined in
packages/opencv/lib/index.js:464
Functions
getImageOccurrence
▸ getImageOccurrence(fullImgData
, partialImgData
, options?
): Promise
<OccurrenceResult
>
Calculates the occurrence position of a partial image in the full image.
Throws
If no occurrences of the partial image can be found in the full image
Parameters
Name | Type | Description |
---|---|---|
fullImgData |
Buffer |
The data of the full image packed into a NodeJS buffer |
partialImgData |
Buffer |
The data of the partial image packed into a NodeJS buffer |
options? |
OccurrenceOptions |
Set of occurrence calculation options |
Returns
Promise
<OccurrenceResult
>
Defined in
packages/opencv/lib/index.js:502
getImagesMatches
▸ getImagesMatches(img1Data
, img2Data
, options?
): Promise
<MatchingResult
>
Calculates the count of common edges between two images. The images might be rotated or resized relatively to each other.
Throws
If detectorName
value is unknown.
Parameters
Name | Type | Description |
---|---|---|
img1Data |
Buffer |
The data of the first image packed into a NodeJS buffer |
img2Data |
Buffer |
The data of the second image packed into a NodeJS buffer |
options |
MatchingOptions |
[{}] Set of matching options |
Returns
Promise
<MatchingResult
>
Maching result
Defined in
packages/opencv/lib/index.js:238
getImagesSimilarity
▸ getImagesSimilarity(img1Data
, img2Data
, options?
): Promise
<SimilarityResult
>
Calculates the similarity score between two images. It is expected, that both images have the same resolution.
Throws
If the given images have different resolution.
Parameters
Name | Type | Description |
---|---|---|
img1Data |
Buffer |
The data of the first image packed into a NodeJS buffer |
img2Data |
Buffer |
The data of the second image packed into a NodeJS buffer |
options |
SimilarityOptions |
[{}] Set of similarity calculation options |
Returns
Promise
<SimilarityResult
>
The calculation result
Defined in
packages/opencv/lib/index.js:393
initOpenCv
▸ initOpenCv(): Promise
<void
>
Spins until the opencv-bindings module is fully loaded
Returns
Promise
<void
>