-
Notifications
You must be signed in to change notification settings - Fork 262
Expand file tree
/
Copy pathDLibFunctionsTest.java
More file actions
38 lines (31 loc) · 1.05 KB
/
DLibFunctionsTest.java
File metadata and controls
38 lines (31 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import android.test.suitebuilder.annotation.SmallTest;
import com.tzutalin.dlib.PedestrianDet;
import com.tzutalin.dlib.VisionDetRet;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.util.List;
@RunWith(AndroidJUnit4.class)
@SmallTest
public class DLibFunctionsTest {
private Context mInstrumantationCtx;
@Before
public void setup() {
mInstrumantationCtx = InstrumentationRegistry.getTargetContext();
}
@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();
}
}
}