-2
for (Point point : landmarks)
{
for (int i = 48; i <= 66; i++)
{
point = landmarks.get(i);
//Log.d(TAG,"landmarks (" + landmarks.get(i) +")");
int pointX = (int) (point.x * resizeRatio);
int pointY = (int) (point.y * resizeRatio);
Log.d(TAG,"My points:(" + pointX +","+ pointY +")");
point=landmarks.get(i+1);
int pointXX = (int) (point.x * resizeRatio);
int pointYY = (int) (point.y * resizeRatio);
canvas.drawLine(pointX, pointY, pointXX, pointYY, mFaceLandmardkPaint);
}
}
從上面的代碼我必須訪問整數值到變量,pointX和pointY.How可以在必須將這些值存儲到一個文件?將整數值存儲到文件中
您搜索到_how在第一檔中的數據寫入?網上有足夠的教程。 – AxelH
String lipfile =「lip-data」; FileOutputStream fout = new FileOutputStream(「/ sdcard /」+ lipfile +「。txt」);嘗試{fout.write(65); //fout.write(pointX); catch(IOException e){ e.printStackTrace(); }。使用此代碼數據將文件寫入爲「A」。該符號代表ASCII值65. – Ammu
因此,您可以在一個文件中寫入,這是什麼問題? – AxelH