I am new to android app development. I need to develop a very simple app that could detect coloured circles.Can someone please tell me in detail how to use openCV Circle Recognition code in developing a simple android app that can detect coloured circles. I am currently using openCV+ Eclipcs but it does not allow me to compile the source code in to .apk file
I have already done what u are saying...I have done the following
I download the full NVidia tegra-devpack-2.0-windows-2013-02-06-14961502 and installed It contains both android ADT for eclipse and eclipse also. It also contains the open CV and it automatically configures everything.
Everything works fine when I make a new android app like “my first HELLO WORLD app” and I can even install it to my android phone that means everything is working fine and everything is configured correctly.
The problem arises when I try to import the source code of the “CVCamera” an common app for detecting circles in android devices
When I import it in the eclipse as an android project from existing code it gives me following 2 errors
(a) Project 'CVCamera' is missing required Java project: 'OpenCV'
(b) The project cannot be built until build path errors are resolved.
I have tried lots of things I even tried to link the open CV library to the project but of no use
I have a simple objective I want to develop an android application for detection of coloured circles by using the already available code on the web. Please help me in achieving the following
I am using openCV4android . I can even create new apps but the problem arises when i try develop the application by using already made source code. I am using the sources code of the CV camera app which has been already developed by so many developers Following is the link of the error I am getting in the eclipse.
Please see the image
Following is the link of the CV camera application which I am trying to import
stanford.edu/class/ee368/Android/OpenCV/CVCamera_Canny.zip
Here is the link for another error “Build path entry is missing: OpenCV”
image
building workspace problim image
Use opencv4android in eclipse.
Before that you should deploy android ADT for eclipse, or download bundle for android dev.
Then follow the tutorial at opencv official site to start your way to android.
Use hough transform for circle detection.
You must link JavaCV lib into your project rather than OpenCV.
Android app cannot use OpenCV(C++) unless you use JNI, which is far beyond the scope of this question.
So please follow the tutorial for using JavaCV on Android rather than doing the import stuff on your own. Please make some JavaCV examples compile and run on your phone before you try to adapt the code.
Besides I strongly recommend you use openCV4android, which is sure to work, rather than JavaCV + Android, which takes your considerable time coping with configuration and integration.
Related
As the title says, I have an existing Android project and I want to import Unity classes.jar so I can access the UnityPlayer.UnitySendMessage.
I found this other question with similar goal, but the answers were unintelligible or unhelpful.
I also found this on the Unity forums, but it is apparently very outdated (2011).
Essentially, all I'm trying to do is:
Open up an Android application.
Select which scene (or, preferably, more than one scene) I want to view from the Unity app.
Launch the Unity GearVR application.
Play the selected scene(s).
I've already got steps 1 and 3 working, and steps 2 and 4 I'm making work by loading each scene up as a different APK and launching a specific APK depending on which scene I want to view, but, ideally, I could host all the scenes in a single application so I could then watch several off the scenes in a row (and also so I could cut down significantly on memory usage).
I've found some tutorials on using UnityPlayer.UnitySendMessage, so I think I can get it working if I can only get Android Studio to recognize and use UnityPlayer.UnitySendMessage, but if you have any other ideas, I appreciate those as well!
I've found some tutorials on using UnityPlayer.UnitySendMessage, so I
think I can get it working if I can only get Android Studio to
recognize and use UnityPlayer.UnitySendMessage
Get classes.jar from one of the sub-folders from
<UnityInstallationDirectory>\Editor\Data\PlaybackEngines\AndroidPlayer\Variations\mono
or
<UnityInstallationDirectory>\Editor\Data\PlaybackEngines\AndroidPlayer\Variations\il2cpp
depending on if you are using mono or IL2CPP as Scripting Backend to build your Android Project.
Import it into Android Studio. Right-click on it and click Add As library and Android Studio should add it as library. See this if you are still confused. You can now use UnityPlayer.UnitySendMessage.
As for the rest of your question, I think that you should look into this answer. It explains how you can show Unity scene in a sub-view. That is another way to get what you want.
I just bought a Google Cardboard Viewer and decided to take a shot at making an app. I have played around with OpenGL and have no problem with the basics of that.
I created a new project following the source from the only sample I could find "Treasure Hunt" linked to from the "Getting Started" for Cardboard.
I can run my own test application and the Treasure Hunt sample application from Google on my Nexus 7 tablet, but I get an error on my phone:
JNI DETECTED ERROR IN APPLICATION: can't call void com.google.vrtoolkit.cardboard.CardboardView$StereoRenderer.onNewFrame(com.google.vrtoolkit.cardboard.HeadTransform) on instance of my.app.cardboardtest.CardboardRenderer
Since I get the same error from the sample from Google, I don't think I need to share any of my code specifically. This is a link to their code:
https://github.com/googlesamples/cardboard-java
I have a T-Mobile Galaxy Note 3 running Android 5.0
Is this the final tipping point for me to upgrade my phone? lol
This seems to be a problem with your build in Android Studio.
Try moving the cardboard.jar file (that contains the vrtoolkit.so binary) to a folder called /lib and point to it.
Upshot is, android cannot find vrtoolkit.so in the delployed apk. The binary is a new addition to the jar, and the docs are older than that.
Or, just stick with Eclipse until Studio is a little more rattled in.
Just a headsup the learning curves around VR development are turbulent like the event horizon of a black hole ...
I am new in developing apps for Android with Java Eclipse.
I get a simple problem: after following the procedure explained here:
http://www.tutorialspoint.com/android/android_hello_world_example.htm
I tried to push the "Finish" button to create my first app, but it doesn't work: the wizard remains open and nothing happens.
Also, I have several problems in the Demo apps, errors like:
'<>' source operator is not allowed for source level
and many more.
I guess I created problems with the configurations.
Thanks if you can help me to create my first app for Android and to load
the demos.
It is really had to tell what is the problem, but as Abdullah advised to use android studio because it is well designed to develop android applications. and most of the company's now days use android studio as there IDE preference, but still its developer's choice. Eclipse ADT plugin is buggy
How do I add the Chartdroid library to my android project? I have gone on their website to download the source code but every way I try to add the file to my project it just shows up as gibberish and gives me an error message.
If possible could you give an extremely basic/simple explanation on how to do this because I am very new to both programming and android platforms.
Try to get the example app working and understand how it works. Then create your own application on the level of a HelloWorld appliction which makes a simple chart from a static array of data. That should get you pointed in the right direction.
I am new to the concept of ZXing,so i want to know the step by step process to use the ZXing in android and i am using elicpse as IDE.Any one knows about it please help me.
As advised by the moderator, I am posting what did to import zxing into my android app, on this post. Seems like many people refer to this post to get an answer for zxing.
The zxing guys have made it easier to create a android project with 1.7. Its not as painful as it used to be. This is a quick blog for anyone who would like to create a zxing project for android quickly.
Checkout the zxing sources from zxing.org
Create a Android project on your eclipse
Delete main.xml
Right click on “src” directory and hit import. Browse to the following directories in the order mentioned. As you add them for
import one by one, ensure that you have the src directory in the edit
field of the import wizard. And that you select only the “com”
directory on the left directory tree. Do not select src.
core
android-integration
android
Ensure that your android sdk version is 9, anything lesser and androidmanifest.xml will cry.
Strings.xml in one of the languages will crib, just put a / before the ‘ character
For the benefit of people,
I have a android hello world integrated with zxing 1.7 http://www.4shared.com/file/bFx8Y5Ys/zXingJune2010.html
Another blog that has interesting direction for integrating zxing
http://damianflannery.wordpress.com/2011/06/13/integrate-zxing-barcode-scanner-into-your-android-app-natively-using-eclipse/