Constructor
new RevieveCV(sdk)
RevieveCV class.
Revieve Computer Vision module
Parameters:
Name | Type | Description |
---|---|---|
sdk |
Object | instance of RevieveSDK |
Methods
analyzeImage() → {Promise}
Method to analyze an image and get results from server.
Returns:
- Type
- Promise
detectSkintoneFromSkinColor(skinColor) → {String}
Method to detect skin tone in Fitzpatrick scale from skin color
Parameters:
Name | Type | Description |
---|---|---|
skinColor |
String | Array | base skin color for skintone detection in hex or rgb format |
Returns:
string with Fitzpatrick scale's value detected
- Type
- String
getAcne(normalized) → {float}
Get acne value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
acne overall value
- Type
- float
getAnonymizeImage() → {Object}
Get the image analyzed anonymized
Returns:
image
- Type
- Object
getDarkcircles(normalized) → {float}
Get the dark circles value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
dark circles intensity
- Type
- float
getDarkSpots(normalized) → {float}
Get the dark spots value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
dark spots intensity
- Type
- float
getDarkSpotsAdjusted(normalized) → {float}
Get the dark spots adjusted value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
dark spots intensity
- Type
- float
getDullSkin(normalized) → {float}
Get the dull skin value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
dull skin intensity
- Type
- float
getEyebags(normalized) → {float}
Get the eyebags value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
eyebags intensity
- Type
- float
getEyeColor() → {float}
Get the eye color value detected by CV processor
Returns:
eye color detected
- Type
- float
getFaceArea() → {Object}
Get the object with the information of the face area from server image analysis
Returns:
results
- Type
- Object
getFaceShape() → {float}
Get the face shape value detected by CV processor
Returns:
face shape detected
- Type
- float
getFindings() → {Object}
Get JSON structure with all the data detected by CV motor
Returns:
JSON structure with data
- Type
- Object
getForeheadLines(normalized) → {float}
Get forehead lines value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
forehead lines overall value
- Type
- float
getFreckles(normalized) → {float}
Get the freckles value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
freckles intensity
- Type
- float
getHairFrizziness() → {string}
Get hair frizz value detected by CV processor
Returns:
hair frizz value
- Type
- string
getHairType() → {string}
Get the face shape value detected by CV processor
Returns:
face shape detected
- Type
- string
getHairVolume(normalized) → {float}
Get hair volume value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
acne overall value
- Type
- float
getHyperpigmentation(normalized) → {float}
Get the hyperpigmentation value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
hyperpigmentation intensity
- Type
- float
getImage() → {Object}
Get the image analyzed
Returns:
image
- Type
- Object
getImageConditions() → {Object|undefined}
Get the image conditions object from server image analysis (if available)
Returns:
image conditions
- Type
- Object | undefined
getMarionetteLines(normalized) → {float}
Get marionette lines value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
marionette lines overall value
- Type
- float
getMasks() → {Array.<Object>}
Get the masks detected by server image analysis
Returns:
masks
- Type
- Array.<Object>
getMelasma(normalized) → {float}
Get the melasma value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
melasma intensity
- Type
- float
getNasolabialFolds(normalized) → {float}
Get nasolabial folds value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
nasolabial folds overall value
- Type
- float
getPoreDilation(normalized) → {float}
Get the pore dilation value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
redness intensity
- Type
- float
getRadiance(normalized) → {float}
Get the radiance value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
radiance intensity
- Type
- float
getRadianceAdjusted(normalized) → {float}
Get the radiance adjusted value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
radiance intensity
- Type
- float
getRedness(normalized) → {float}
Get the redness value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
redness intensity
- Type
- float
getRednessAbsolute(normalized) → {float}
Get the redness absolute value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
redness intensity
- Type
- float
getResults() → {Object}
Get the results object from server image analysis
Returns:
results
- Type
- Object
getSeralizableState() → {Object}
Returns a copy of the state configuration object in SDK
Returns:
JSON with all configuration values
- Type
- Object
getSkinFirmness(normalized) → {float}
Get the skin firmness value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
redness intensity
- Type
- float
getSkinFoundation() → {Object}
Get the skin foundation info detected by CV processor
Returns:
returns an object with rgb and hex skintone color
and skintone value in Fitzpatrick scale detected
- Type
- Object
getSkinSagging(normalized) → {float}
Get the skin sagging value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
redness intensity
- Type
- float
getSkinShine(normalized) → {float}
Get skin shine value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
skin shine overall value
- Type
- float
getSkinUndertone() → {float}
Get the skin undertone value detected by CV processor
Returns:
skin undertone detected
- Type
- float
getSmoothness(normalized) → {float}
Get the smoothness value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
smoothness intensity
- Type
- float
getState() → {Object}
Use this method to get the state of CV module
Returns:
General state
- Type
- Object
getStatus() → {Array.<Object>}
Use this method to check warnings and errors in image analysis.
Returns:
JSON object with description, idx, and isError boolean.
- Type
- Array.<Object>
getTexture(normalized) → {float}
Get texture value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
texture intensity
- Type
- float
getUnderEyeLines(normalized) → {float}
Get under eye lines value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
under eye lines overall value
- Type
- float
getUnevenSkinTone(normalized) → {float}
Get the uneven skin tone value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
uneven skin tone intensity
- Type
- float
getWrinkles(normalized) → {float}
Get the wrinkles value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
wrinkles intensity
- Type
- float
getWrinklesForeheadEyes(normalized) → {float}
Get forehead lines value detected by CV processor
Parameters:
Name | Type | Default | Description |
---|---|---|---|
normalized |
bool | false | force the returned value to be between 0 and 1 |
Returns:
forehead lines overall value
- Type
- float
hasError() → {Boolean}
Use this method to check if there were errors in image analysis.
Returns:
Error
- Type
- Boolean
hydrateState(state)
Hydrate the state with the provided one
Parameters:
Name | Type | Description |
---|---|---|
state |
Object | JSON with all configuration values |
resizeResults() → {Promise.<(Size|Error)>}
Use this method to resize image and result visualizations after analysis
Returns:
A promise that contains the size of the results image when fulfilled.
- Type
- Promise.<(Size|Error)>
setFindings()
Method to set sdk state findings entries with cv values.
setImage() → {Promise}
Sets an image
Returns:
returns image dimensions
- Type
- Promise
setTimeout(timeout)
Sets the timeout for image analysis service call. Default is 60000 ms.
Parameters:
Name | Type | Description |
---|---|---|
timeout |
number | Timeout in milliseconds |