Android :: Use An OpenCV Rotation And Translation Vector With OpenGL ES In Droid?

Sep 14, 2010

I'm am working on a basic augmented reality application on Android. What I did so far is detect a square with opencv and then using cvFindExtrinsicCameraParams2() I calculated a rotation and translation vector. For this I used 4 object points, which are just the corners of a square around (0,0,0) and the 4 corners of the square in the image.

This yields me a pretty good rotation and translation matrix. I also calculated the rotation matrix with cvRodrigues2() since using this is easier than the rotation vector. As long as I use these to draw some points in the image everything works fine. My next step is however to pass these vectors and the matrix back to java and then use them with OpenGL to draw a square in an OpenGLView. The square should be exactly around the square in the image which is displayed behind the OpenGLView.

My problem is that I cannot find the correct way of using the rotation matrix and translation vector in OpenGL. I started of with exactly the same object points as used for the openCV functions. Then I applied the rotation matrix and translation vector in pretty much any possible way I could think of. Sadly none of these approaches produce a result which is anyway near what I hoped for. So my question is can anyone tell me how to use them correctly?

So far the "closest" results I have gotten, was when randomly multiplying the whole matrix with -1. But most of the time the squares still look mirror inverted or rotated for 180 degrees. So I guess it was just a lucky hit, but not the right approach.

Android :: Use an OpenCV rotation and translation vector with OpenGL ES in droid?


Android :: Need To Calculate Rotation Vector

May 18, 2010

I need to calculate a rotation vector out of the data i get from Sensor.TYPE_ORIENTATION. The sensor data is defined like this: the values have to be recalculated to become a correct 3d position: values[0]: Azimuth, angle between the magnetic north direction and the Y axis, around the Z axis (0 to 359). 0=North, 90=East, 180=South, 270=West values[1]: Pitch, rotation around X axis (-180 to 180), with positive values when the z-axis moves toward the y-axis. values[2]: Roll, rotation around Y axis (-90 to 90), with positive values when the x-axis moves away from the z-axis need all three values like the Z axis value (from 0 to 360 degree). I tried a lot but cant figure out how to do this :/ So i bet there is a simple solution how to recall the values of sensor.TYPE_ORIENTATION to make them a 3d rotation vector, but i just dont know how to do it. If you know the answer please tell me. Code...

View 3 Replies View Related

Android :: Have Translation Service In Droid App?

Feb 24, 2010

How can a translation service be called in an Android app? Can we have an app that can translate multiple languages into another?

View 3 Replies View Related

Android :: Opencv CvCanny Link Error

Oct 4, 2010

I'm using android-opencv (android-opencv -- http://code.google.com/p/android-opencv/ -- ) , it was built successfully and worked like charm.

Then I tried to use "cvCanny" to detect faces but the linker reported an error "undefined reference".

CODE:...................

compile command

CODE:.............

When I inspect "libimgproc.a" with "nm" command, it says it has the symbol of "cvCanny" , but the linker complains ...

CODE:.........................

View 2 Replies View Related

Android :: Possible To Sell Commercial Android Application Using OpenCV Port?

Sep 28, 2010

I'm interested in developing an android app that makes use of an OpenCV android port. Particularly, I want to use SURF features which comes embedded in the OpenCV framework but I'm not sure if then I will be able to sell this app. anyway, is there any non-free app making use of any of the OpenCV android ports?

View 2 Replies View Related

Android :: Put A Vector Into My Arrayadapter?

Sep 3, 2010

I have the current code...

How would i put a vector into my array_spinner?

View 1 Replies View Related

Android :: OpenGL Speed Issue - Code Contribution To Other OpenGL

Feb 25, 2009

Single Threaded OpenGL game ! (check bottom, you can download and use the helper class) Lighting disabled ! Depth Buffer disabled ! Culling enabled ! Textures disabled !

Just 176 integers (x,y values only) making 88 vertexes along with 132 index numbers making "44 triangles only"

Framerates I get is

with GL_BLENDING disabled - 145 fps approx only! enabled - 110 fps approx only!

I have the screenshot of exact code in the draw function here.. just 2 damn lines ! I have hidden only the comments.. click here to see it http://prasna991.googlepages.com/drawframe.png

variable details in the 2 lines of code =========================== ipts = 176 elements (only x and y for each vertex) totallinetriangles * 3 = 176 lineindexes = 132 elements - type "short"

Here is the screenshot of output drawing and how it will look like http://prasna991.googlepages.com/screen.png

OpenGL single threaded Initialization Helper ================================ Here is my OpenGL helper class.. makes the OpenGL initialization for newbies a cakewalk http://prasna991.googlepages.com/OpenGLHelperclass.txt

I tested by rendering on the touch event only.. frame rate drops only when u touch and drag and here I have just tested by tapping and releasing gently on the emulator and on the device

Is this the device limitations ? So graphics is actually a lot lot lot slower than on iPhone ?

View 8 Replies View Related

Android :: NDK OpenGL - Mixing Java And Native - C - Calls To OpenGL API

Jul 24, 2010

I would like to be able to use the OpenGL API from both Java and C (via NDK).

In Java, there is a GL object passed, which has all GL methods on it.

In C, you just talk to the native library.

In a single onDrawFrame callback (for which Java is passed a GL), can I use methods on the GL object, and also call NDK methods which access the openGL library?

In other words, is the GL object just a wrapper for the same instance of the native library?

View 3 Replies View Related

Android :: Scalable Vector Graphics

Jun 26, 2009

Does the current API support scalable vector graphics? If so which file formats? If not, will it be added in the future? I ask because I'd like my animations to based off of SVGs - in order to better support different screen resolutions while reducing file size.

View 2 Replies View Related

Android :: How To Put Vector Into Intent.extra?

Aug 20, 2010

I've started to write a small app for android. It looks very nice, but there is one thing I don't understand.I've created a new intent in the activity A and I've added a serialized vector intent.putExtra("key", vector).

View 3 Replies View Related

Android :: Call Intent And Put Into Vector?

Aug 25, 2010

b = this.getIntent().getExtras();
s = this.getIntent().getStringExtra("DEFAULTTEXT");

public void onClick(View v)
{
String a = "http://152.226.152.156:1010/jsp-examples/test1";
URL url = null;
HttpURLConnection httpurlconnection = null;
try {
url = new URL(a);
httpurlconnection = (HttpURLConnection) url
.openConnection();
httpurlconnection.setDoOutput(true);
httpurlconnection.setRequestMethod("POST");
Toast.makeText(Booking.this, a, Toast.LENGTH_SHORT).show();
Toast.makeText(Booking.this, "Toast1", Toast.LENGTH_SHORT).show();
ObjectOutputStream dos = new ObjectOutputStream(httpurlconnection.getOutputStream());
SendVEctor.add(txtArrivalTime.getText().toString());
SendVEctor.add(txtFerry.getText().toString());
SendVEctor.add(txtStatus.getText().toString());
SendVEctor.add(txtDestination.getText().toString());
SendVEctor.add(s.toString());
dos.writeObject(SendVEctor);
dos.close();

s would be my intent and how would i put it into my SendVEctor?

View 2 Replies View Related

Android :: How To Load Dynamic Array From Vector?

Feb 1, 2010

how to load dynamic array from vector in android?

View 1 Replies View Related

Android : How To Display Contents Of A Vector In Phone?

Sep 7, 2010

how to display the contents of a vector in android?do i need to use TextView?

View 2 Replies View Related

Android :: Translation Tools Available?

Sep 25, 2010

I am just going through a translation of resource files and I am wondering if there is additional support. At the moment I have both the base strings.xml and the localised version opened parallel in Eclipse. This quite works, but I am thinking of the following tools: - Showing both (or more) versions of a key together - Showing missing keys in a version - Integrating a lookup service (Google Translate, Wikipedia). I didn't find anything like this, is such a tool available?

View 3 Replies View Related

Android :: Need To Store _ Retrieve Vector In Sqlite Database

Sep 1, 2010

I need to store an retrieve a vector of an unknown number of objects in an android sqlite database. Essentially, the setup is this: I am developing a task management app, where the user can add as many notes as they like to their tasks. My current setup uses one database, with one row per task. This presents a problem when I need to associate multiple notes and their associated information with one task. I can see two approaches: try to store an array of notes or a vector or something as a BLOB in the task's row, or have another notes database in which each row contains a note and it's info, as well the id of the task which the note belongs to. This seems a little easier to implement, as all I would have to do to retrieve the data would be to get a cursor of all notes matching a particular id and then iterate through that to display them to the user. However, it seems a little inefficient to have a whole new database just for notes, and it makes syncing and deleting notes a little more difficult as well. What do you think? Is it worth it to have a separate notes database? Should I use a BLOB or go for the separate database? If a BLOB, are there any good tutorials out there for storing and retrieving objects as BLOBs?

View 2 Replies View Related

Android :: J2ME Converting/translation

Apr 25, 2010

I want to know if exists a converter for a j2me source-code to android. Listen, itīs not a runner, like a midp runner for android, it īs a converter for a source code. A tool for translate a source code for a new plataform, from j2me to android.

View 6 Replies View Related

Android :: Translation App Use In Europe Without Connection?

Jul 9, 2010

I understand EVO 4G is CDMA thus can't be used roaming in European countries say in Germany (mostly GSM I believe).
Is there a way to still use "Google Translate" without connection? (is there another translation app, which can be completely downloaded to SD Card and can be used without 3g or wifi ?)

View 1 Replies View Related

Android :: Translation App That Works Offline?

Aug 19, 2010

Google Translate is great, but it's crippling fault is that it needs a data connection to work. Obviously the only time I am going to need language translation tools, is the same time I don't want to pay for roaming data access!!

Are there any good (and preferably free, or minimal cost) language apps for Android that work offline? I need English > Italian initially, but the major languages would need to be supported too.

View 1 Replies View Related

Android :: Translation Animation In Code?

Jun 23, 2010

I was able to get the animation to work on the emulator -- however my problem is that it animates for a second, but then then goes back to its original posistion right after it finishes animating. How can I stop this for happening.

This is how I animate my objects:

CODE:.................

View 2 Replies View Related

Android :: Way To Store / Display Vector Text In Phone Without Flash?

Aug 12, 2010

What vector graphic formats can be used to display the in a view in an android application? As I understand, PDF is not an option at the moment, so what other options are there for storage and display of complex text+graphics? Unfortunately, I cannot use embedded browser with Flash because I need this app to work on Android versions before 2.2.

View 1 Replies View Related

Android :: Instant Dictionary Translation Interface

Jun 27, 2010

Is there such a thing in Android...? For example, I'm writing an email and would like to lookup a word, but don't want to switch to the other app, is there an app which can invoke the dictionary within another app...?

View 3 Replies View Related

Android :: How Does PostScale Affect Translation Part Of Matrix?

Aug 7, 2010

Ive been trying to implement a limit to prevent the user from scaling the image too much in my multitouch zoom app. Problem is, when i set the max zoom level by dumping the matrix, the image starts to translate downward once the overall scale of the image hits my limit. I believe it is doing this because the matrix is still being affected by postScale(theScaleFactorX,theScaleFactorY,myMidpointX,myMidpointY) where theScaleFactorX/Y is the amount to multiply the overall scale of the image (so if the theScaleFatorX/Y is recorded as 1.12, and the image is at .60 of its origional size, the overall zoom is now .67). It seems like some sort of math is going on thats creating this translation, and was wondering if anyone knew what it was so i can prevent it from translating, and only allow the user to zoom back out.

View 1 Replies View Related

Android :: Canvas And Its Transformation Matrix Have Different Translation Values

Aug 31, 2010

I might be completely off-base here, but I've spent the last two days trying to figure this out and, without success, you're my only hope.What I'm doing is simple:

* I have a canvas where I draw a circle with center on (10, 10), with radius = 5;

* Then, I obtain the canvas transformation matrix

* And then I create a new rectangle, I map it using the matrix and I use the canvas to draw it.

My problem: basically, the rectangle is being drawn in a different position along the Y-axis.I outputed the transformation matrix and, by default, it is translated by zero in the X-axis and by 25.0 in the Y-axis. Please note that I made NO transformations, either translate, scale or rotate. I am unable to understand why this is happening and how to avoid it.

View 3 Replies View Related

Android :: Kernel / Userland Input Events Translation Process

Oct 22, 2009

I am now learning how android handles linux input events from kernel raw input events to the userland level KeyEvent and so on. And I want to handle input events in native language. I've do some experiments on handling events using NDK but the touch screen events are very hard to handle(when I touch the screen, It generates a lot of kernel events).

I've read the eventhub class in framework base dir in the android source repo. And I now I know how android collects linux kernel raw events using eventhub class by reading from /dev/input/event* , but I still have no idea how it translates these raw events into the userland logic input events like KeyEvent. The file keyinput service only wrappers eventhub to JNI functions but there are no translation. So please give me some hints on the kernel event and userland event translation process.

View 3 Replies View Related

Android :: Build A Language Translation Tool For Smart Phones?

Nov 8, 2010

I am implementing a language conversion tool, to convert Spanish to English, on a variety of smart phones: Android, BlackBerry, iPhone, Windows Phone 7.

How do I implement language conversions? Searching, I am not finding a tutorial about this, and I don't having any experience with this.

View 1 Replies View Related

General :: No Menu In Translation App?

May 18, 2013

I have the Google Translate app on my Samsung Galaxy Tablet (running ICS) and it works great, including the offline. I also have it on my Samsung Galaxy Ace phone (running Gingerbread 2.3.7) but I cannot even see a menu option (whichis needed to use the offline facility) on the phone version. I have downloaded the latest verions from Google Play. Review of Google Translate say the offline bit shuld work with Android 2.3 and later..

View 2 Replies View Related

General :: HTC Legend - Twitter And Translation Functionality?

Jan 26, 2012

I'm interested in having a Twitter app in my HTC legend in order to translate some tweets, if possible Japanese tweets.

Last year I was using TweetDeck wich translated the tweets, even from Japanese in English, but I know don't why, since september i'm unable to translate them anymore.Twitter app on Android with the translation functionality ? (To translate from Japanese if possible)

View 1 Replies View Related

Android :: Android - Offline - Non Vector Based - Custom Maps

Sep 26, 2009

For an application I am working on, I need to display custom raster image tiles (not vector based, probably from satellite imagery), and I need to do so offline. I would like to use the MapView, but I cannot see a way to tell it to use custom, offline map tiles instead of pulling down data from google's servers.

I've seen a few alternatives, but none seem appropriate to my need MapDroyd Seems to only support vector-based maps. mapdroyd.com/ OSMDroid Appears to use Open Street Maps; I don't see any documentation anywhere stating that you can use custom map tiles. code.google.com/p/osmdroid/ There was a third alternative, but my post got eaten and I can't find it in my history. Am I going to have to bite the bullet and 'roll my own'?

View 4 Replies View Related

Motorola Droid :: Screen Rotation On BB1.1

Feb 26, 2010

Running BB1.1, but it doesn't allow the screen to rotate automatically, even though that option is turned on in the settings. I noticed Ultimate 3.7 does allow this, what other ROMs allow it? It's a minor feature, but one I like to have....

View 5 Replies View Related

Motorola Droid X :: Screen Rotation In 2.2

Aug 23, 2010

Is horrendous with the update. It goes landscape all of the time in unwanted situations. Is this just me?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved