Skip to content

Commit

Permalink
chore: update magic number for face height
Browse files Browse the repository at this point in the history
  • Loading branch information
phantumcode committed Nov 29, 2023
1 parent 15de0d1 commit cb0cbac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct DetectedFace {
}

let faceWidth = ow
let faceHeight = 1.68 * faceWidth
let faceHeight = 1.618 * faceWidth
let faceBoxBottom = boundingBox.maxY
let faceBoxTop = faceBoxBottom - faceHeight
let faceBoxLeft = min(cx - ow / 2, rightEar.x)
Expand Down
4 changes: 2 additions & 2 deletions Tests/FaceLivenessTests/DetectedFaceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ final class DetectedFaceTests: XCTestCase {
let ovalRect = CGRect.zero
let expectedBoundingBox = CGRect(
x: 0.1658528943614037,
y: 0.041756969751750916,
y: 0.072967669448238516,
width: 0.6240418540649166,
height: 0.8457092820983773
height: 0.8144985824018897
)
let boundingBox = detectedFace.boundingBoxFromLandmarks(ovalRect: ovalRect)
XCTAssertEqual(boundingBox.origin.x, expectedBoundingBox.origin.x)
Expand Down

0 comments on commit cb0cbac

Please sign in to comment.