last day (14 days later) » 

11:23 AM
0
A: Opencv import highgui in android studio is showing error.Cannot resolve(I added the library still the error remain)

ExceptionIn opencv3.0, there is no more highgui module in java. the functionality was split up into new videoio and imgcodecs (that's where you will find imread) modules. import org.opencv.core.*; import org.opencv.imgcodecs; // imread, imwrite, etc import org.opencv.videoio; // VideoCapture EDIT: C...

 
when i import these they too show errors. Please tell exactly what all to change so that I can fix it . I am new to this so. Also rectangle is showing an error. Is this due to the same import.?
 
Change img=Highgui.imread(pathtoimage); to img = Imgcodecs.imread(pathtoimage);
BTW which version of openCV are you using?
 
version is 3.0 . that removed the error but now same error in rectangle which in the code is used as -- Core.rectangle(img, tl, br, color);
I have removed errors as suggested by you but now it shows the app stopped. Any help would be helpful. I have posted the logcat for the same.
 
Where is your logcat??
 
I have posted the logcat. Kindly look at it and get back. Thanks. I think the image path may be the cause of error, or it is showing the val img is redundant, maybe this is the problem.
 
11:23 AM
No, you are getting UnsatisfiedLinkError. After searching a little about it, I found these answers. Try them out and I hope one of them works for you if not then I suggest you ask a new question so that someone with more experience may help you.
 
hey I have used the static calling of the library. (See the updated code again) but it still gives the error as : logcat : Trying to get library list 05-20 08:41:01.204 22632-22632/com.example.android.seg D/dalvikvm﹕ Trying to load lib /mnt/asec/com.example.android.seg-1/lib/libopencv_info.so 0x41616138 05-20 08:41:01.207 22632-22632/com.example.android.seg A/libc﹕ Fatal signal 7 (SIGBUS) at 0x4bf6d9b8 (code=2)
 
Have you created the jnilibs as mentioned in that answer??And update your logcat also.
 
yes I added that under the main directory.I am posting the updated logcat.
 
Here I am assuming main directory means the location /app/src/main/??
 
yes! now what should I di. Wait I will post that untill the program runs. Untill then you can go through the above logcat I posted in the comments.
Look at the updated logcat!
 
11:23 AM
If you are using android studio then make sure you followed all the steps given here.
The error you are getting is still due to some linking problem.
Can you post the screenshot of your directory structure of android?
 
Yes I followed the exact method to import the opencv library in android studio.what can you infer from the logcat. It isnt even showing the log.i message !
 
Its hard to tell. It should have worked by now. I still think we are missing something small.
I suggest you ask a fresh question so that someone with better knowledge can answer it.
 
I cant post the screenshot as not enough credits. but it looks like: app ...build ...libs(nothing under it but opencv directory shows in the location where I hv this in my pc) ...src ......androidtest ......main .........java .........jniLibs .........res
For final I am trying to implement what this code is trying to: stackoverflow.com/questions/26002467/… so if you can implement it on you own . Kindly let me know. You dont know how much of help you have been to me.
 
What do you have inside jniLibs folder?
 
All the four files we have in the native/libs of the opencv sdk.
 
11:23 AM
Sorry! but I really don't see any error because of which it shouldn't work. Anyway if you find the solution I would love to hear about it.
One more thing, I just realized the logcat you posted is in debug mode. Make it verbose and the re post it.
 
It shows log level verbose. So I guess it should be in verbose mode only.
 
But, its showing everything D/. And your logcat like last one is not showing particular error name.
 
I dont know but i think its the verbose. Can you chat to my fb anamika.agrwal.98 so that i can share screenshot and hv better interaction !
 
Make a stackexchange account and I can start a chat room here.
Use tinypic.com site to upload image, then copy image's URL and paste it here.
 
Where is your mail id? Have you deleted ! I have now access to my yahoo accnt on my mobile ! can you repost or mail me your id!
oh no tinypic is blocked too in here ! drop me a mail on anamikaagrawal12@yahoo.in
 

last day (14 days later) »