Hello, I got a trouble to run OpenCV2.4.6 face detection sample program(OpenCV-2.4.6-android-sdk-r2.zip) on Android2.2.2 device(LG VM670).
Eclips informed that "FileIOException happen in FdActivity.java"
Finally, I solved this issue. But I can't understand this issue only happen on my device or general issue or not. Let me share it.
(Original code in line 72 : FdActivity.java in OpenCV Sample - face-detection)
mCascadeFile = new File(cascadeDir, "lbpcascade_frontalface.xml");
FileOutputStream os = new FileOutputStream(mCascadeFile);
In this case, FileIOException happen at new FileOutputStream(mCascadeFile). I was assuming that "FileOutputStream" will make new file if a file is not existing...then I had screwed up. I couldn't get a reason why "FileIOException" happen.
Finally, I solved this issue like below.
(Modified code in line 72 : FdActivity.java in OpenCV Sample - face-detection)
mCascadeFile = new File(cascadeDir, "lbpcascade_frontalface.xml");
mCascadeFile.createNewFile(); // CreateNewFile!
FileOutputStream os = new FileOutputStream(mCascadeFile);
Then face detection sample can work correctly.
I checked other OpenCV topics in this forum. But I couldn't find similar trouble in history. I'm not sure this issue only happen on my device and environment or not.
I just want to share this fact and I would like to get some advice from expert(For example, I missed some step to setup OpenCV enviroment...something like that)
Best Regards
Bgb.Tom