[mob][photos] Move FaceBoxImage to face_util

This commit is contained in:
laurenspriem 2024-04-27 12:19:29 +05:30
parent 9eeab36392
commit 6235f7ee78
2 changed files with 20 additions and 20 deletions

View file

@ -41,23 +41,3 @@ class FaceBox {
'height': height,
};
}
/// Bounding box of a face.
///
/// [xMin] and [yMin] are the coordinates of the top left corner of the box, and
/// [width] and [height] are the width and height of the box.
///
/// One unit is equal to one pixel in the original image.
class FaceBoxImage {
final int xMin;
final int yMin;
final int width;
final int height;
FaceBoxImage({
required this.xMin,
required this.yMin,
required this.width,
required this.height,
});
}

View file

@ -7,6 +7,26 @@ import "package:image/image.dart" as img;
import "package:logging/logging.dart";
import "package:photos/face/model/box.dart";
/// Bounding box of a face.
///
/// [xMin] and [yMin] are the coordinates of the top left corner of the box, and
/// [width] and [height] are the width and height of the box.
///
/// One unit is equal to one pixel in the original image.
class FaceBoxImage {
final int xMin;
final int yMin;
final int width;
final int height;
FaceBoxImage({
required this.xMin,
required this.yMin,
required this.width,
required this.height,
});
}
final _logger = Logger("FaceUtil");
final _computer = Computer.shared();
const _faceImageBufferFactor = 0.2;