Releases: Yoonit-Labs/ios-yoonit-camera
2.7.3
2.7.2
📝 Update Readme
- Add demo example facefy usage as gif;
2.7.1
⚡️ Improvements
Make the class CameraView
open
. With this modification, for example, it is possible to extends the CameraView
.
2.7.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.6.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:
func onImageCaptured(
_ type: String,
_ count: Int,
_ total: Int,
_ imagePath: String
)
Now:
func onImageCaptured(
_ type: String,
_ count: Int,
_ total: Int,
_ imagePath: String,
_ darkness: NSNumber?,
_ lightness: NSNumber?,
_ sharpness: NSNumber?
)
✨ 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, darkness: NSNumber?, lightness: NSNumber?, sharpness: NSNumber? |
Must have started capture type of face/frame (see startCaptureType ). Emitted when the image file is created:
|
🐛 Bug Fix
- 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.5.0
💥 Breaking Changes
Face Contours
Temporary disable the methods setFaceContours
and setFaceContoursColor
due to an error on drawing the contours in devices that has notch.
Detection Size
The detection validation by size is not related only to face anymore. It's applicable to QR code detection too.
- [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: Float, red: Float, green: Float, blue: Float |
(1.0, 1.0, 1.0, 1.0) |
Set detection box color. |
setROIAreaOffsetColor | alpha: Int, red: Int, green: Int, blue: Int |
(0.4, 1.0, 1.0, 1.0) |
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.4.2
🐛 Bug Fix
- Fix the
x
,y
,width
andheight
parameters (face bounding box) send by theonFaceDetected
event;
📝 Update Readme
- Add Yoonit Facefy integration links in the description for:
- Android: android-yoonit-facefy
- iOS: ios-yoonit-facefy
2.4.1
2.4.0
💥 Breaking Changes
- Add in the event
onFaceDetect
the Face Analysis parameters.
Before:
func onFaceDetected(
x: Int,
y: Int,
width: Int,
height: Int
)
Now:
func onFaceDetected(
x: Int,
y: Int,
width: Int,
height: Int,
leftEyeOpenProbability: NSNumber?,
rightEyeOpenProbability: NSNumber?,
smilingProbability: NSNumber?,
headEulerAngleX: NSNumber?,
headEulerAngleY: NSNumber?,
headEulerAngleZ: NSNumber?
)
✨ 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.
-
Face Contours
- [Method] Add new method,
setFaceContours
, to enable or disable the face contours. Must have set "capture type face" (startCaptureType("face")
); - [Method] Add new method,
setFaceContoursColor
, to change the face contours ARGB value color. Default value is white with opacity value of0.4
;
- [Method] Add new method,
🏗️ Architectural Changes
- Replace
Vision
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/ios-yoonit-camera#start-capturing-face-images];
-
Update
onFaceDetect
event; -
Add new section, the Face Analysis;
-
Add new section, the Head movement;
-
Add new
KeyError
INVALID_FACE_CONTOURS_COLOR
definitions;
Function | Parameters | Valid values | Return Type | Description |
---|---|---|---|---|
setFaceContours | enable: Boolean |
true or false |
void | Set to enable/disable face contours when face detected. |
setFaceContoursColor | alpha: Float, red: Float, green: Float, blue: Float |
Positive value between 0.0 and 1.0 |
void | Set face contours ARGB color. Default value is (0.4, 1.0, 1.0, 1.0) . |
KeyError | Description |
---|---|
INVALID_FACE_CONTOURS_COLOR | Tried to input invalid face contour ARGB value color. |
➕ New Dependencies
2.3.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;
🏗️ 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;
Created a dedicated camera drawing view, the CameraGraphicView
. This means:
- Removed the process to draw the "face detection box" (
faceDetectionBox
) inCAShapeLayer
; - The new class
CameraGraphicView
gather the algorithms to draw thefaceDetectionBox
and future features; - The class
FaceAnalyzer
has better control of thefaceDetectionBox
;
📝 Update Readme
- Add method
setFaceROIAreaOffset
definitions; - Add method
setFaceROIAreaOffsetColor
definitions; - Add new
KeyError
INVALID_FACE_ROI_COLOR
definitions;
Function | Parameters | Valid values | Return Type | Description |
---|---|---|---|---|
setFaceROIAreaOffset | enable: Bool |
true or false |
void | Set face region of interest offset color visibility. |
setFaceROIAreaOffsetColor | alpha: Float, red: Float, green: Float, blue: Float |
Any positive float between 0.0 and 1.0 | void | Set face region of interest area offset color. Default value is (0.4, 1.0, 1.0, 1.0). |
KeyError | Description |
---|---|
INVALID_FACE_ROI_COLOR | Tried to input invalid face region of interest area offset ARGB value color. |