Skip to content

Releases: Yoonit-Labs/android-yoonit-camera

2.12.0

19 Sep 14:24
e85473b
Compare
Choose a tag to compare

💥 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

15 Apr 14:07
03857af
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.10.0

07 Apr 14:13
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:

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:
  • type: '"face"' or '"frame"'
  • count: current index
  • total: total to create
  • imagePath: the image path
  • inferences: each array element is the image inference result.
  • darkness: image darkness classification.
  • lightness: image lightness classification.
  • sharpness: image sharpness classification.

    🐛 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

    01 Apr 20:09
    ec28300
    Compare
    Choose a tag to compare

    💥 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 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: 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 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.8.0

    18 Mar 14:13
    Compare
    Choose a tag to compare

    🏗️ Architectural Changes

    • Remove Google MLKit FaceDetection dependency;
    • Convert Facefy input to a Bitmap;
    • Handle "face undetected" event when Facefy return the FaceDetected object as null;

    🎨 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

    08 Mar 19:54
    5e6536c
    Compare
    Choose a tag to compare

    💥 Breaking Changes

    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:

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

    android-yoonit-facefy 1.0.2;

    2.6.0

    02 Feb 21:33
    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;
    • 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;

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

    25 Jan 21:03
    594f8ef
    Compare
    Choose a tag to compare

    ♻️ Refactor

    Do not remove the cameraEventListener at the destroy method;

    2.5.2

    21 Jan 22:47
    Compare
    Choose a tag to compare

    ♻️ Refactor

    Change in the event onImageCaptured fourth argument from kotlin.Pair to android.util.Pair type.

    2.5.1

    21 Jan 21:24
    Compare
    Choose a tag to compare

    🐛 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:

    1. Color encoding;
    2. Rotate image;
    3. Crop image;
    4. Mirror image;
    5. 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;