hi, i haf faced with a prob which i dunoe y after exec("java matchUploadPic");
e code nvr return as i need to read a file written by from that execution, i CANT READ AT ALL.. it will jus skip it. Can anyone help to check whether did i do wrongly? Thanks!!!
$pFile = $_FILES["file"]["name"];
echo $pFile."</br>";
chdir("extractFeatures\siftDemoV4\\");
storeUpload($pFile);
$pos = strpos($pFile,".jpg");
$fileN = substr($pFile,0,$pos);
chdir("C:\Program Files\IrfanView\\");
$convert = "cmd /c i_view32.exe D:\YunFong's FYP\Test\PhpProject1\Images from Columbia\\".
$pFile." /convert=D:\YunFong's FYP\Test\PhpProject1\extractFeatures\siftDemoV4\\".$fileN.".pgm";
exec($convert);
chdir("D:\YunFong's FYP\Test\PhpProject1\extractFeatures\siftDemoV4\\");
$run = "cmd /c siftWin32 <".$fileN.".pgm >".$fileN.".key";
$wt = fopen("key.txt","w");
fwrite($wt,$run);
fclose($wt);
exec("java key");
copy($fileN.".pgm",'pics/'.$fileN.".pgm"); //move file to another inner folder (pics folder)
copy($fileN.".key","pics/".$fileN.".key");
unlink($fileN.".key");
unlink($fileN.".pgm");
chdir("pics\\");
$match = "cmd /c match -im1 ".$fileN.".pgm -k1 ".$fileN.".key -im2 ";
$wt2 = fopen("match.txt","w");
fwrite($wt2,$match);
fclose($wt2);
exec("java matchUploadPic");
chdir("..\\");
//echo getcwd();
$sortMatch = fopen("detectedMatching_C.txt","r");
if($sortMatch) {
while(!feof($sortMatch)) {
$s = fgets($sortMatch);
$sort = explode("\t",$s);
$sortedArr[$a] = $sort;
$a++;
}
}
fclose($sortMatch);