Releases: Yoonit-Labs/android-yoonit-camera
2.12.0
💥 Breaking Changes
Deprecated | New |
---|---|
setComputerVision | ComputerVision.enable |
setComputerVisionLoadModels | ComputerVision.modelPaths |
computerVisionClearModels | ComputerVision.clear |
✨ New Feature
- Computer Vision Input Size of the Image.
Variable | Type | Default Value | Description |
---|---|---|---|
ComputerVision.inputSize | Size |
(0, 0) |
Image Input Size to use in the loaded computer vision models. |
ComputerVision.enable | Boolean |
false |
Enable/disable computer vision usage. |
ComputerVision.modelPaths | ArrayList<String> |
[] |
Set the computer vision model paths. |
Function | Input Type | Valid Values | Default Value | Description |
---|---|---|---|---|
ComputerVision.clear | - | - | - | Clear computer vision path models. |
🏗 Architectural Changes
Remove methods related with "Computer Vision" and create a module.
It is accessible like this:
cameraView.ComputerVision.enable
cameraView.ComputerVision.modelPaths
cameraView.ComputerVision.clear
📝 Update Readme
- Add face understanding usage;
- Add Facefy badge version;
2.11.0
🗑 Deprecated
- [Method] Removed
setFacePaddingPercent
;
✨ New Feature
- [Variable]
detectionTopSize
: Represents the percentage. Positive value enlarges and negative value reduce the top side of the detection. Use thesetDetectionBox
to have a visual result. - [Variable]
detectionRightSize
: Represents the percentage. Positive value enlarges and negative value reduce the right side of the detection. Use thesetDetectionBox
to have a visual result. - [Variable]
detectionBottomSize
: Represents the percentage. Positive value enlarges and negative value reduce the bottom side of the detection. Use thesetDetectionBox
to have a visual result. - [Variable]
detectionLeftSize
: Represents the percentage. Positive value enlarges and negative value reduce the left side of the detection. Use thesetDetectionBox
to have a visual result.
🐛 Bug Fix
- Fix saved image orientation when using camera lens back;
📝 Update Readme
- Add Variables section;
- Add Image Quality specifications:
Image Quality
The image quality is the classification of the three attributes: darkness, lightness and sharpness. Result available in the onImageCaptured
event. Let's see each parameter specifications:
Threshold | Classification |
---|---|
Darkness | |
darkness > 0.7 | Too dark |
darkness <= 0.7 | Acceptable |
Lightness | |
lightness > 0.65 | Too light |
lightness <= 0.65 | Acceptable |
Sharpness | |
sharpness >= 0.1591 | Blurred |
sharpness < 0.1591 | Acceptable |
2.10.0
💥 Breaking Changes
Changes in the event onImageCaptured
. Add the image quality parameters:
- darkness: image darkness classification;
- lightness: image lightness classification;
- sharpness: image sharpness classification;
Before:
fun onImageCaptured(
type: String,
count: Int,
total: Int,
imagePath: String,
inferences: ArrayList<android.util.Pair<String, FloatArray>>
)
Now:
fun onImageCaptured(
type: String,
count: Int,
total: Int,
imagePath: String,
inferences: ArrayList<android.util.Pair<String, FloatArray>>,
darkness: Double,
lightness: Double,
sharpness: Double
)
✨ New Feature
The image quality parameters classify three attributes related to the image captured:
- darkness;
- lightness;
- sharpness;
Event | Parameters | Description |
---|---|---|
onImageCaptured | type: String, count: Int, total: Int, imagePath: String, inferences: ArrayList<Pair<String, FloatArray>>, darkness: Double, lightness: Double, sharpness: Double |
Must have started capture type of face/frame (see startCaptureType ). Emitted when the image file is created:
|
🐛 Bug Fix
- Fix qrcode reading in specific devices. Fox example, the Xiaomi devices;
- Fix face analysis "directions" (right/left) when using the back camera lens;
📝 Update Readme
- Fix project description;
- Add image quality parameters description;
- Add image quality parameters usage;
2.9.0
💥 Breaking Changes
Detection Size
The detection validation by size is not related only to face anymore. It's applicable to QR code detection too. Soon, this feature will be applicable to the "computer vision" features.
- [Method]
setFaceCaptureMinSize
renamed tosetDetectionMinSize
: is applicable whenroi
enabled; - [Method]
setFaceCaptureMaxSize
renamed tosetDetectionMaxSize
: ignored whenroi
enabled;
Region of Interest
ROI
is not related only to face detection, it's generic and can be applicable to QR code detection. Soon, the ROI
will be applicable to the entire camera frame. In the name of the consistency and pattern, changes made necessary not only internal, but also method's names and some were removed:
- [Method]
setFaceROIEnable
renamed tosetROI
; - [Method]
setFaceROITopOffset
renamed tosetROITopOffset
; - [Method]
setFaceROIRightOffset
renamed tosetROIRightOffset
; - [Method]
setFaceROIBottomOffset
renamed tosetROIBottomOffset
; - [Method]
setFaceROILeftOffset
renamed tosetROILeftOffset
; - [Method]
setFaceROIAreaOffset
renamed tosetROIAreaOffset
; - [Method]
setFaceROIMinSize
removed; - [Method]
setFaceDetectionBox
renamed tosetDetectionBox
;
✨ New Feature
Function | Input Type | Default Value | Description |
---|---|---|---|
setTorch | Bool | false |
Enable/disable device torch. Available only to camera lens "back" . |
setDetectionColor | alpha: Int, red: Int, green: Int, blue: Int |
(255, 255, 255, 255) |
Set detection box color. |
setROIAreaOffsetColor | alpha: Int, red: Int, green: Int, blue: Int |
(100, 255, 255, 255) |
Set display of the region of interest area offset color. |
♻️ Refactor
- [Message]
INVALID_CAPTURE_FACE_MIN_SIZE
renamed toINVALID_MINIMUM_SIZE
; - [Message]
INVALID_CAPTURE_FACE_MAX_SIZE
renamed toINVALID_MAXIMUM_SIZE
; - [Message]
INVALID_CAPTURE_FACE_OUT_OF_ROI
renamed toINVALID_OUT_OF_ROI
; - [Message]
INVALID_CAPTURE_FACE_ROI_MIN_SIZE
removed;
🐛 Bug Fix
- Fix region of interest offset area that sometimes was not updating;
- Fix Head Movements definitions in the Demo;
🎨 Code Style & Comments
- Change comments related to
ROI
anddetectionBox
features;
📝 Update Readme
- Update KeyError definitions;
- Update Message definitions;
- Update Head Movements definitions;
2.8.0
🏗️ Architectural Changes
- Remove Google MLKit FaceDetection dependency;
- Convert
Facefy
input to aBitmap
; - Handle "face undetected" event when
Facefy
return theFaceDetected
object asnull
;
🎨 Code Style & Comments
- Update all file headers;
- Fix some typos;
- Remove some unnecessary internal methods;
📝 Update Readme
- Improve description;
- Fix some types;
2.7.0
💥 Breaking Changes
- Add in the event
onFaceDetect
the Face Analysis parameters.
Before:
fun onFaceDetected(
x: Int,
y: Int,
width: Int,
height: Int
)
Now:
fun onFaceDetected(
x: Int,
y: Int,
width: Int,
height: Int,
leftEyeOpenProbability: Float?,
rightEyeOpenProbability: Float?,
smilingProbability: Float?,
headEulerAngleX: Float,
headEulerAngleY: Float,
headEulerAngleZ: Float
)
✨ New Feature
- Face Analysis: add in the event
onFaceDetect
new parameters:- Face Analysis parameters;
- Head movement detection;
- These parameters is the result of the Facefy face analysis.
🏗️ Architectural Changes
- Replace
Google MLKit
usage by the Yoonit Facefy. The motivations:- Modularize the face analysis code in a different project:
- Avoid inflate Yoonit Camera project and better maintenance;
- Enables other projects that not use the camera to analyse faces by image;
📝 Update Readme
- Update usage (capturing faces)[https://github.com/Yoonit-Labs/android-yoonit-camera#start-capturing-face-images];
- Update
onFaceDetect
event; - Add new section, the Face Analysis;
- Add new section, the Head movement;
➕ New Dependencies
2.6.0
✨ New Feature
-
Face ROI Area Offset
- Add new method,
setFaceROIAreaOffset
, to enable or disable the face region of interest area offset. Must have one of the values (top, right, bottom or left) different from0
; - Add new method,
setFaceROIAreaOffsetColor
, to change the region of interest area offset ARGB value color. Default color is white with opacity value of 0.4;
- Add new method,
-
Face Contours
- Add new method,
setFaceContours
, to enable or disable the face contours. Must have set "capture type face" (startCaptureType("frame")
) and "face detection box" (setFaceDetectionBox(true)
); - Add new method,
setFaceContoursColor
, to change the face contours ARGB value color. Default value is white with opacity value of 0.4;
- Add new method,
🏗️ Architectural Changes
- Change the class
CaptureOptions
to a singleton. This means:- Unnecessary pass the instance ahead;
- Unnecessary to create in each class the var
captureOptions
; - Easy reset
captureOptions
, if necessary;
📝 Update Readme
- Add method
setFaceROIAreaOffset
definitions; - Add method
setFaceROIAreaOffsetColor
definitions; - Add new
KeyError
INVALID_FACE_ROI_COLOR
definitions; - Add new
KeyError
INVALID_FACE_CONTOURS_COLOR
definitions;
Function | Parameters | Valid values | Return Type | Description |
---|---|---|---|---|
setFaceContours | enable: Bool |
true or false |
void | Set to show/hide face contours when face detected. |
setFaceContoursColor | alpha: Int, red: Int, green: Int, blue: Int |
Positive value between 0 and 255 | void | Set face contours ARGB color. |
setFaceROIAreaOffset | enable: Bool |
true or false |
void | Set face region of interest offset color visibility. |
setFaceROIAreaOffsetColor | alpha: Int, red: Int, green: Int, blue: Int |
Any positive integer between 0 and 255 | void | Set face region of interest area offset color. Default value is (100, 255, 255, 255). |
KeyError | Description |
---|---|
INVALID_FACE_ROI_COLOR | Tried to input invalid face region of interest area offset ARGB value color. |
INVALID_FACE_CONTOURS_COLOR | Tried to input invalid face contour ARGB value color. |
2.5.3
♻️ Refactor
Do not remove the cameraEventListener
at the destroy
method;
2.5.2
♻️ Refactor
Change in the event onImageCaptured
fourth argument from kotlin.Pair
to android.util.Pair
type.
2.5.1
🐛 Bug Fix
Fix the crop face image: the error was in the order of the process.
With the face bounding box and the camera frame image in hands:
- Color encoding;
- Rotate image;
- Crop image;
- Mirror image;
- Scale image;
⚡ Improvements
- Allow to draw face detection box (
setFaceDetectionBox
) and/or the face blurred image (setBlurFaceDetectionBox
); - Not necessary to enable face detection box to draw the face blurred image;
- Refactor
FaceAnalyzer
class for better "understanding" and code quality;