本文整理匯總了Java中com.tzutalin.dlib.VisionDetRet.getLabel方法的典型用法代碼示例。如果您正苦於以下問題:Java VisionDetRet.getLabel方法的具體用法?Java VisionDetRet.getLabel怎麽用?Java VisionDetRet.getLabel使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.tzutalin.dlib.VisionDetRet
的用法示例。
在下文中一共展示了VisionDetRet.getLabel方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: testDetBitmapFace
import com.tzutalin.dlib.VisionDetRet; //導入方法依賴的package包/類
@Test
public void testDetBitmapFace() {
FaceDet faceDet = new FaceDet(Constants.getFaceShapeModelPath());
Bitmap bitmap = BitmapFactory.decodeFile("/sdcard/test.jpg");
assertThat(bitmap, notNullValue());
List<VisionDetRet> results = faceDet.detect(bitmap);
for (final VisionDetRet ret : results) {
String label = ret.getLabel();
int rectLeft = ret.getLeft();
int rectTop = ret.getTop();
int rectRight = ret.getRight();
int rectBottom = ret.getBottom();
assertThat(label, is("face"));
Assert.assertTrue(rectLeft > 0);
}
faceDet.release();
}
示例2: testDetFace
import com.tzutalin.dlib.VisionDetRet; //導入方法依賴的package包/類
@Test
public void testDetFace() {
Bitmap bitmap = BitmapFactory.decodeFile("/sdcard/test.jpg");
assertThat(bitmap, notNullValue());
FaceDet faceDet = new FaceDet(Constants.getFaceShapeModelPath());
List<VisionDetRet> results = faceDet.detect("/sdcard/test.jpg");
for (final VisionDetRet ret : results) {
String label = ret.getLabel();
int rectLeft = ret.getLeft();
int rectTop = ret.getTop();
int rectRight = ret.getRight();
int rectBottom = ret.getBottom();
assertThat(label, is("face"));
Assert.assertTrue(rectLeft > 0);
}
faceDet.release();
}
示例3: testDetBitmapFaceLandmarkDect
import com.tzutalin.dlib.VisionDetRet; //導入方法依賴的package包/類
@Test
public void testDetBitmapFaceLandmarkDect() {
Bitmap bitmap = BitmapFactory.decodeFile("/sdcard/test.jpg");
assertThat(bitmap, notNullValue());
FaceDet faceDet = new FaceDet(Constants.getFaceShapeModelPath());
List<VisionDetRet> results = faceDet.detect(bitmap);
for (final VisionDetRet ret : results) {
String label = ret.getLabel();
int rectLeft = ret.getLeft();
int rectTop = ret.getTop();
int rectRight = ret.getRight();
int rectBottom = ret.getBottom();
ArrayList<Point> landmarks = ret.getFaceLandmarks();
assertThat(label, is("face"));
Assert.assertTrue(landmarks.size() > 0);
Assert.assertTrue(rectLeft > 0);
}
faceDet.release();
}
示例4: testDetFaceLandmark
import com.tzutalin.dlib.VisionDetRet; //導入方法依賴的package包/類
@Test
public void testDetFaceLandmark() {
FaceDet faceDet = new FaceDet(Constants.getFaceShapeModelPath());
List<VisionDetRet> results = faceDet.detect("/sdcard/test.jpg");
for (final VisionDetRet ret : results) {
String label = ret.getLabel();
int rectLeft = ret.getLeft();
int rectTop = ret.getTop();
int rectRight = ret.getRight();
int rectBottom = ret.getBottom();
ArrayList<Point> landmarks = ret.getFaceLandmarks();
assertThat(label, is("face"));
Assert.assertTrue(landmarks.size() > 0);
Assert.assertTrue(rectLeft > 0);
}
faceDet.release();
}
示例5: testFacialLandmark
import com.tzutalin.dlib.VisionDetRet; //導入方法依賴的package包/類
@Test
public void testFacialLandmark() {
PedestrianDet peopleDet = new PedestrianDet();
List<VisionDetRet> results = peopleDet.detect("/sdcard/test.bmp");
for (final VisionDetRet ret : results) {
String label = ret.getLabel();
int rectLeft = ret.getLeft();
int rectTop= ret.getTop();
int rectRight = ret.getRight();
int rectBottom = ret.getBottom();
}
}