안드로이드 개발 질문/답변
(글 수 45,052)
FaceDetector.Face[] faces = new FaceDetector.Face[10]; // 최대 인식할 얼굴수 설정
FaceDetector detector = new FaceDetector(bitmap.getWidth(), bitmap.getHeight(), faces.length);
int numFaces = detector.findFaces(bitmap, faces); // 얼굴 인식 실행
for(FaceDetector.Face face : faces) {
PointF midPoint = new PointF();
face.getMidPoint(midPoint); //눈과 눈사의 가운데 지점
float eyesDistance = face.eyesDistance(); //눈과 눈사이의 거리
//처리.
}
회색님이 올려주신 FaceDetector 소스를 보고 사용해 보려고 하는대요
위와 같이 소스를 짜서 테스트를 해보았는대 faces에 들어있는 모든값이 null이네요
이건 얼굴을 인식하지 못하는건가요
꽤 여러 사진을 찍어서 테스트 해보았는대 계속 null이어서
값을 가지고 오지 못하네요 ㅠㅠ
혹시 알고 계신분 계신가요 ㅠ