-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop'
- Loading branch information
Showing
23 changed files
with
347 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.suaro.pidroid; | ||
|
||
import android.content.Context; | ||
import android.content.res.AssetManager; | ||
import android.content.res.Resources; | ||
|
||
import com.suaro.pidroid.core.FaceDetectionResult; | ||
import com.suaro.pidroid.core.NativeMethods; | ||
import com.suaro.pidroid.core.PidroidConfig; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
|
||
public final class Pidroid { | ||
private static AssetManager mgr; | ||
private static PidroidConfig cascadeConfig; | ||
|
||
|
||
|
||
public static void setup(@NotNull Context context, @NotNull PidroidConfig config) { | ||
mgr = context.getResources().getAssets(); | ||
cascadeConfig = config; | ||
NativeMethods.setup(cascadeConfig, mgr); | ||
} | ||
|
||
public static void detectFace(@NotNull int[] byteArray, int width, int height, @NotNull FaceDetectionResult dInfo) { | ||
NativeMethods.detectFace(byteArray, width, height, dInfo); | ||
} | ||
|
||
private Pidroid() { | ||
} | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.suaro.pidroid.core; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
public final class Eye { | ||
private Point center = new Point(0, 0); | ||
private int radius; | ||
|
||
@NotNull | ||
public final Point getCenter() { | ||
return this.center; | ||
} | ||
|
||
public final void setCenter(@NotNull Point point) { | ||
this.center = point; | ||
} | ||
|
||
public final int getRadius() { | ||
return this.radius; | ||
} | ||
|
||
public final void setRadius(int rad) { | ||
this.radius = rad; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package com.suaro.pidroid.core; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
import java.util.ArrayList; | ||
|
||
|
||
public final class Face { | ||
|
||
@NotNull | ||
private Point topLeft = new Point(0, 0); | ||
private int width; | ||
private int height; | ||
|
||
@NotNull | ||
private ArrayList<Eye> eyes = new ArrayList<Eye>(); | ||
|
||
@NotNull | ||
private ArrayList<Landmark> landmarks = new ArrayList<Landmark>(); | ||
|
||
@NotNull | ||
public final Point getTopLeft() { | ||
return this.topLeft; | ||
} | ||
|
||
public final void setTopLeft(@NotNull Point topLeft) { | ||
this.topLeft = topLeft; | ||
} | ||
|
||
public final int getWidth() { | ||
return this.width; | ||
} | ||
|
||
public final void setWidth(int width) { | ||
this.width = width; | ||
} | ||
|
||
public final int getHeight() { | ||
return this.height; | ||
} | ||
|
||
public final void setHeight(int height) { | ||
this.height = height; | ||
} | ||
|
||
@NotNull | ||
public final ArrayList<Eye> getEyes() { | ||
return this.eyes; | ||
} | ||
|
||
public final void setEyes(@NotNull ArrayList<Eye> eyes) { | ||
this.eyes = eyes; | ||
} | ||
|
||
@NotNull | ||
public final ArrayList<Landmark> getLandmarks() { | ||
return this.landmarks; | ||
} | ||
|
||
public final void setLandmarks(@NotNull ArrayList<Landmark> landmarks) { | ||
this.landmarks = landmarks; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
pidroid/src/main/java/com/suaro/pidroid/core/FaceDetectionResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.suaro.pidroid.core; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
import java.util.ArrayList; | ||
|
||
public final class FaceDetectionResult { | ||
@NotNull | ||
private ArrayList<Face> faces = new ArrayList<Face>(); | ||
private boolean detected; | ||
|
||
@NotNull | ||
public final ArrayList<Face> getFaces() { | ||
return this.faces; | ||
} | ||
|
||
public final void setFaces(@NotNull ArrayList<Face> faces) { | ||
this.faces = faces; | ||
} | ||
|
||
public final boolean getDetected() { | ||
return this.detected; | ||
} | ||
|
||
public final void setDetected(boolean detected) { | ||
this.detected = detected; | ||
} | ||
} |
9 changes: 0 additions & 9 deletions
9
pidroid/src/main/java/com/suaro/pidroid/core/FaceDetectionResult.kt
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
pidroid/src/main/java/com/suaro/pidroid/core/Landmark.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.suaro.pidroid.core; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
public final class Landmark { | ||
@NotNull | ||
private Point center = new Point(0, 0); | ||
private int radius; | ||
|
||
@NotNull | ||
public final Point getCenter() { | ||
return this.center; | ||
} | ||
|
||
public final void setCenter(@NotNull Point center) { | ||
this.center = center; | ||
} | ||
|
||
public final int getRadius() { | ||
return this.radius; | ||
} | ||
|
||
public final void setRadius(int radius) { | ||
this.radius = radius; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.