danieljonker / PersonFinder

4 stars 3 forks source link

Could not find the Class #1

Open chandrashekhardhakite opened 11 years ago

chandrashekhardhakite commented 11 years ago

Hi I am using person finder code for face recognition However i am getting error even i have tried to solve and digging it on Google unable to get the solution Could you please help me out. error 02-19 17:01:20.870: E/dalvikvm(4226): Could not find class 'com.googlecode.javacv.cpp.opencv_core$CvSize', referenced from method danie.jonker.personfinder.FaceRecognition.bmpToIpl

danieljonker commented 11 years ago

Hi,

I would like to help you but my phone is currently broken and won't run the application and I don't plan on buying a new one till the galaxy s4 comes out. But it looks like your missing an import for a library or the library itself.

Could you get the full stack trace by any chance? That is hard to debug. I can probably use work phones and environment to look at it.

Could not find class 'com.googlecode.javacv.cpp.opencv_core$CvSize is probably referring to the import import static com.googlecode.javacv.cpp.opencv_core.cvSize;

So I would assume perhaps you have accidentally deleted that import or don't have the library that contains cvSize, I'm not sure if I packaged all the libraries in with it so you may need to reinstall javacv. It's been months since i've looked at this but it is on the to do list.

chandrashekhardhakite commented 11 years ago

Hi,

Thanks for reply. Please find the below logcat

02-20 05:25:20.050: E/dalvikvm(774): Could not find class 'com.googlecode.javacv.cpp.opencv_core$CvSize', referenced from method danie.jonker.personfinder.FaceRecognition.bmpToIpl 02-20 05:25:20.050: W/dalvikvm(774): VFY: unable to resolve new-instance 484 (Lcom/googlecode/javacv/cpp/opencv_core$CvSize;) in Ldanie/jonker/personfinder/FaceRecognition; 02-20 05:25:20.050: D/dalvikvm(774): VFY: replacing opcode 0x22 at 0x000b 02-20 05:25:20.091: W/dalvikvm(774): VFY: array-length on non-array 02-20 05:25:20.091: W/dalvikvm(774): VFY: rejecting opcode 0x21 at 0x002d 02-20 05:25:20.091: W/dalvikvm(774): VFY: rejected Ldanie/jonker/personfinder/FaceRecognition;.learn (Ljava/lang/String;)V 02-20 05:25:20.091: W/dalvikvm(774): Verifier rejected class Ldanie/jonker/personfinder/FaceRecognition; 02-20 05:25:20.091: D/AndroidRuntime(774): Shutting down VM 02-20 05:25:20.091: W/dalvikvm(774): threadid=1: thread exiting with uncaught exception (group=0x40a70930) 02-20 05:25:20.110: E/AndroidRuntime(774): FATAL EXCEPTION: main 02-20 05:25:20.110: E/AndroidRuntime(774): java.lang.VerifyError: danie/jonker/personfinder/FaceRecognition 02-20 05:25:20.110: E/AndroidRuntime(774): at danie.jonker.personfinder.MainMenu.(MainMenu.java:33) 02-20 05:25:20.110: E/AndroidRuntime(774): at java.lang.Class.newInstanceImpl(Native Method) 02-20 05:25:20.110: E/AndroidRuntime(774): at java.lang.Class.newInstance(Class.java:1319) 02-20 05:25:20.110: E/AndroidRuntime(774): at android.app.Instrumentation.newActivity(Instrumentation.java:1054) 02-20 05:25:20.110: E/AndroidRuntime(774): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097) 02-20 05:25:20.110: E/AndroidRuntime(774): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) 02-20 05:25:20.110: E/AndroidRuntime(774): at android.app.ActivityThread.access$600(ActivityThread.java:141) 02-20 05:25:20.110: E/AndroidRuntime(774): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) 02-20 05:25:20.110: E/AndroidRuntime(774): at android.os.Handler.dispatchMessage(Handler.java:99) 02-20 05:25:20.110: E/AndroidRuntime(774): at android.os.Looper.loop(Looper.java:137) 02-20 05:25:20.110: E/AndroidRuntime(774): at android.app.ActivityThread.main(ActivityThread.java:5039) 02-20 05:25:20.110: E/AndroidRuntime(774): at java.lang.reflect.Method.invokeNative(Native Method) 02-20 05:25:20.110: E/AndroidRuntime(774): at java.lang.reflect.Method.invoke(Method.java:511) 02-20 05:25:20.110: E/AndroidRuntime(774): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 02-20 05:25:20.110: E/AndroidRuntime(774): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 02-20 05:25:20.110: E/AndroidRuntime(774): at dalvik.system.NativeStart.main(Native Method)

Please help me on this i have added all .so and jar file in the lib the also i am getting error ,can you plz suggest me on this.

chandrashekhardhakite commented 11 years ago

Hi danieljonker ,

I am using below setup files for windows 7 32 bit system please cross check once am i using the correct setup files for run "android face recognition code"- 1) OpenCV-2.4.4-beta 2) Microsoft Visual C++ 2010 Redistributable Package (x86) 1) ffmpeg-1.0-android-arm 2) javacv-0.3-bin 3) opencv-2.4.3-android-arm

Please suggest for above error logcat i have posted on above comment.

Thanks..

chandrashekhardhakite commented 11 years ago

Hi danieljonker ,

I have resolved the above issues However now i am getting strange error I'm currently having issues accessing a facedata.xml file which will contain the data from the trained images. This is my code:

CvFileStorage fileStorage; fileStorage = cvOpenFileStorage("/sdcard/FaceDB/facedata.xml", null, CV_STORAGE_WRITE, null); cvOpenFileStorage returns null

I'm not sure if it is an issue with JavaCV or what i'm doing wrong. It should be pretty straight forward.

danieljonker commented 11 years ago

Does the face_data.xml file exist? the app should generate it but if the directory /sdcard/FaceDB/ doesn't exist I think it crashes, there's quite a bit of hard coding in there as it was for a uni project and not app store. I think you will also need to provide the training data, I based mine off AT&T database, think there should be examples included in git though.

On Thu, Feb 21, 2013 at 5:28 AM, chandrashekhardhakite < notifications@github.com> wrote:

Hi danieljonker ,

I have resolved the above issues However now i am getting strange error I'm currently having issues accessing a facedata.xml file which will contain the data from the trained images. This is my code:

CvFileStorage fileStorage; fileStorage = cvOpenFileStorage("/sdcard/FaceDB/facedata.xml", null, CV_STORAGE_WRITE, null); cvOpenFileStorage returns null

I'm not sure if it is an issue with JavaCV or what i'm doing wrong. It should be pretty straight forward.

— Reply to this email directly or view it on GitHubhttps://github.com/danieljonker/PersonFinder/issues/1#issuecomment-13841080.

chandrashekhardhakite commented 11 years ago

Hi,

i have added the all required file(txt) and images ( .pgm image format.) in sdcard and once i click the train button i am passing all the images However i am getting error in below code

private IplImage[] loadFaceImgArray(final String filename) // Method name personNumTruthMat = cvCreateMat(1, // rows nFaces, // cols CV_32SC1); // type, 32-bit unsigned, one channel

please find below logs 02-21 12:02:48.644: E/AndroidRuntime(9023): java.lang.ExceptionInInitializerError 02-21 12:02:48.644: E/AndroidRuntime(9023): at danie.jonker.personfinder.FaceRecognition.loadFaceImgArray(FaceRecognition.java:443)

Please suggest for the same this really important for me .