Skip to content

Releases: Yoonit-Labs/ios-yoonit-camera

2.7.3

29 Oct 22:49
8bfe4c6
Compare
Choose a tag to compare

📝 Update Readme

  • Update README.md apresentation;
  • Update files header;

2.7.2

21 Sep 21:07
Compare
Choose a tag to compare

📝 Update Readme

  • Add demo example facefy usage as gif;

2.7.1

08 Jul 13:49
Compare
Choose a tag to compare

⚡️ Improvements

Make the class CameraView open. With this modification, for example, it is possible to extends the CameraView.

2.7.0

15 Apr 14:04
Compare
Choose a tag to compare

🗑 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 the setDetectionBox to have a visual result.
  • [Variable] detectionRightSize: Represents the percentage. Positive value enlarges and negative value reduce the right side of the detection. Use the setDetectionBox to have a visual result.
  • [Variable] detectionBottomSize: Represents the percentage. Positive value enlarges and negative value reduce the bottom side of the detection. Use the setDetectionBox to have a visual result.
  • [Variable] detectionLeftSize: Represents the percentage. Positive value enlarges and negative value reduce the left side of the detection. Use the setDetectionBox to have a visual result.

🐛 Bug Fix

  • Fix saved image orientation when using camera lens back;

📝 Update Readme

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

07 Apr 14:17
31902fa
Compare
Choose a tag to compare

💥 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:
  • type: '"face"' or '"frame"'
  • count: current index
  • total: total to create
  • imagePath: the image path
  • darkness: image darkness classification.
  • lightness: image lightness classification.
  • sharpness: image sharpness classification.

    🐛 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

    02 Apr 17:24
    523a70e
    Compare
    Choose a tag to compare

    💥 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 to setDetectionMinSize: is applicable when roi enabled;
    • [Method] setFaceCaptureMaxSize renamed to setDetectionMaxSize: ignored when roi 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 to setROI;
    • [Method] setFaceROITopOffset renamed to setROITopOffset;
    • [Method] setFaceROIRightOffset renamed to setROIRightOffset;
    • [Method] setFaceROIBottomOffset renamed to setROIBottomOffset;
    • [Method] setFaceROILeftOffset renamed to setROILeftOffset;
    • [Method] setFaceROIAreaOffset renamed to setROIAreaOffset;
    • [Method] setFaceROIMinSize removed;
    • [Method] setFaceDetectionBox renamed to setDetectionBox;

    ✨ 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 to INVALID_MINIMUM_SIZE;
    • [Message] INVALID_CAPTURE_FACE_MAX_SIZE renamed to INVALID_MAXIMUM_SIZE;
    • [Message] INVALID_CAPTURE_FACE_OUT_OF_ROI renamed to INVALID_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 and detectionBox features;

    📝 Update Readme

    2.4.2

    18 Mar 15:57
    Compare
    Choose a tag to compare

    🐛 Bug Fix

    • Fix the x, y, width and height parameters (face bounding box) send by the onFaceDetected event;

    📝 Update Readme

    2.4.1

    17 Mar 22:36
    2f22513
    Compare
    Choose a tag to compare

    🎨 Code Style & Comments

    • Update all file headers;
    • Fix some typos;
    • Improve code style in the FaceAnalyzer class;
    • Remove some unnecessary internal methods;

    ⬆️ Upgrade Dependencies

    • ios-yoonit-facefy update from 1.0.1 to 1.0.4;

    2.4.0

    11 Mar 18:09
    a1a6bb7
    Compare
    Choose a tag to compare

    💥 Breaking Changes

    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 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 of 0.4;

    🏗️ 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

    ios-yoonit-facefy 1.0.1;

    2.3.0

    02 Feb 21:31
    Compare
    Choose a tag to compare

    ✨ 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 from 0;
    • 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) in CAShapeLayer;
    • The new class CameraGraphicView gather the algorithms to draw the faceDetectionBox and future features;
    • The class FaceAnalyzer has better control of the faceDetectionBox;

    📝 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.