.setPositiveButton(“Ok”, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int j) {
FSDK.LockID(mTracker, mTouchedID);
String userName = input.getText().toString();
FSDK.SetName(mTracker, mTouchedID, userName);
if (userName.length() <= 0)
FSDK.PurgeID(mTracker, mTouchedID);
FSDK.UnlockID(mTracker, mTouchedID);
mTouchedIndex = -1;
}
})
这代码,看来人脸图和特征应该是放在手机存储里,存储里想查看但是查不到,无法改目录才能查看
抱歉,这项目源代码暂时不公开哈,id和key也不公开,先看一下代码吧,代码如下:
完整的MainActivity.java
public class MainActivity extends Activity implements OnClickListener {
private boolean mIsFailed = false;
private Preview mPreview;
private ProcessImageAndDrawResults mDraw;
private final String database = “Memory50.dat”;
private final String help_text = “Luxand Face Recognition\n\nJust tap any detected face and name it. The app will recognize this face further. For best results, hold the device at arm’s length. You may slowly rotate the head for the app to memorize you at multiple views. The app can memorize several persons. If a face is not recognized, tap and name it again.\n\nThe SDK is available for mobile developers: www.luxand.com/facesdk”;
public static float sDensity = 1.0f;
public void showErrorAndClose(String error, int code) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(error + ": " + code)
.setPositiveButton(“Ok”, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
android.os.Process.killProcess(android.os.Process.myPid());
}
})
.show();
}
public void showMessage(String message) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(message)
.setPositiveButton(“Ok”, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
}
})
.setCancelable(false) // cancel with button only
.show();
}
private void resetTrackerParameters() {
int errpos[] = new int[1];
FSDK.SetTrackerMultipleParameters(mDraw.mTracker, “ContinuousVideoFeed=true;FacialFeatureJitterSuppression=0;RecognitionPrecision=1;Threshold=0.996;Threshold2=0.9995;ThresholdFeed=0.97;MemoryLimit=2000;HandleArbitraryRotations=false;DetermineFaceRotationAngle=false;InternalResizeWidth=70;FaceDetectionThreshold=3;”, errpos);
if (errpos[0] != 0) {
showErrorAndClose(“Error setting tracker parameters, position”, errpos[0]);
}
}
/**
- Called when the activity is first created.
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
sDensity = get