2013年9月22日星期日

ANDROID Augmented Reality AR Augmented Reality

In my application is now ready to add an augmented reality inside the function .
I hope to be here brainstorming . Interested friends who speak.
done , I hope you share with u guys experience , not done , encounter any problems , you can say it, we are talking about , did not do, and want to , you can come and see fun. Thank you join. Me share with you some websites .
http://www.devx.com/wireless/Article/42482/1954
http://stackoverflow.com/questions/1939318/augmented-reality-framework
http://stackoverflow.com/questions/1870278/how-to-start-writing-an-augmented-reality-application
http://www.androidkit.com/developing-augmented-reality-applications-for-android
http://mobile.tutsplus.com/tutorials/android/android_augmented-reality/
https://github.com/haseman/Android-AR-Kit
------ Solution --------------------- -----------------------
hi add my msn it
we study together . zj_goodbad@hotmail.com
------ eference ----------------- ----------------------
  The reply on 2011-03-09 09:16:38 deleted by moderator

------ eference ------------------------------------ ---
nobody doing this project ? I Dingding yourself first .
------ eference --------------------------------------- < br> added , send you mail. I generally use QQ or gmail
------ eference -------------------------------- -------
Dingyiding
I found some useful information For example, layer

recently found an API called wikitude, mobile phone download a WIKITUDE the MODULE, then in his class call methods on it.
but the problem is it can only be used if you do not pay BETA version .
now I did not expect anything other good way .

realize their own to go with what is done .
Several point coordinates can be changed, I'm just added.
import java.util.ArrayList;
import java.util.Collection;
import org.openintents.intents.WikitudeARIntent;
import org.openintents.intents.WikitudePOI;

import android.app.Activity;
import android.app.Application;
import android.content.ActivityNotFoundException;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class RAugmente extends Activity {
/ ** Called when the activity is first created. * /
@ Override
public void onCreate (Bundle savedInstanceState) {
super.onCreate (savedInstanceState);
setContentView (R.layout.main);

Button b = (Button) findViewById (R.id.reality);
b.setOnClickListener (new View.OnClickListener () {
@ Override
public void onClick (View arg0) {
/ / TODO Auto-generated method stub
/ / lance intent de realite augmente
startARViewBasic ();
}
/ *
* vue réalité augmenté
* /
private void startARViewBasic () {
/ / TODO Auto-generated method stub
/ / Creation d'un intent basic AR
WikitudeARIntent intent = prepareIntent ();

/ / Titre de mon application
intent.addTitleText ("AR application");

/ / lancement de RA
try {
/ / lecontext.startActivity (intent);
startActivity (intent);
}
catch (ActivityNotFoundException e) {
/ / Toast.makeText (this, "Rien trouvé" + e.getMessage (), Toast.LENGTH_SHORT). show ();
/ / email.setText (e.getMessage () + "/" + intent.toString ());

}
}

private WikitudeARIntent prepareIntent () {
/ / TODO Auto-generated method stub
/ / create the intent
WikitudeARIntent intent = new WikitudeARIntent (RAugmente.this.getApplication (), null, null);
/ / add the POIs
this.addPoint (intent);
return intent;

}

/ / ajouter les point ce qu'on va dessiner
private void addPoint (WikitudeARIntent intent) {
/ / première point de la fac (maurienne)
WikitudePOI point1 = new WikitudePOI (45640910, 5869453);

/ / deuxième point (belledonne)
WikitudePOI point2 = new WikitudePOI (45641997, 5869011);

/ / troisième point (entremont)
WikitudePOI point3 = new WikitudePOI (45640421, 5870406);

/ / quatrième point (4 canton)
WikitudePOI point4 = new WikitudePOI (45640523, 5870991);

/ / cinquième point (Bauge)
WikitudePOI point5 = new WikitudePOI (45640155, 5870867);

/ / ma collection de point
Collection points = new ArrayList ();
points.add (point1);
points.add (point2);
points.add (point3);
points.add (point4);
points.add (point5);
intent.addPOIs (points);
}
});
}
}
------ eference ----------------------------------- ----
  This reply was moderator deleted at 2011-03-14 10:29:10

------ eference ------------------------------------ ---
plus one , as long as you can get registered wikitudekey, you can remove the above (beta) watermark. However, if the business then you need to pay . The official website did not write clearly , do not know his last with the GPL or LGPL.

connected to watermark in the phrase of the two null, the first one is sent to you after you have registered on the account key , the second is the developer 's name ( preferably with the alphabet , do not know kanji compatibility problems will not occur )
WikitudeARIntent intent = new WikitudeARIntent (RAugmente.this.getApplication (), null, null)

I wish you all happy in the program !


------ eference ------------------------------------ ---
qq: 27035210 study together
------ eference ---------------------------- -----------
about AR problems like to ask you can add me under it ? QQ: 123724119 msn: rock410@live.com
------ eference ---------------- -----------------------
who can explain the above code stickers out what is meant
------ eference - --------------------------------------
public class BasicOpenARDemoActivity extends Activity ; {

/ ** the callback-intent after pressing any buttons * /
private static final String CALLBACK_INTENT = "wikitudeapi.mycallbackactivity";
/ ** the id of the dialog which will be created when the modelfile cannot be located * /
private static final int DIALOG_NO_MODEL_FILE_ON_SD = 1;
/ ** the model ile name * /
private static final String modelFileName = Environment.getExternalStorageDirectory () + "/ wtc_old_triang.obj";
/ ** the latitude of the origin (0/0/0) of the model * /
private static final float modelCenterLatitude = 47.822f;
/ ** the longitude of the origin (0/0/0) of the model * /
private static final float modelCenterLongitude = 13.045f;
/ ** the altitude of the origin (0/0/0) of the model * /
private static final float modelCenterAltitude = 470;

/ **
* {@ inheritDoc}
* /
@ Override
public void onCreate (Bundle savedInstanceState) {
super.onCreate (savedInstanceState);

setContentView (R.layout.main);

/ / We hook up 3 different buttons.
Button b = (Button) findViewById (R.id.button1);
b.setOnClickListener (new View.OnClickListener () {
public void onClick (View v) {
BasicOpenARDemoActivity.this.startARViewBasic ();
}
});

b = (Button) findViewById (R.id.button2);
b.setOnClickListener (new View.OnClickListener () {
public void onClick (View v) {
BasicOpenARDemoActivity.this.startARViewWithIcons ();
}
});

b = (Button) findViewById (R.id.button3);
b.setOnClickListener (new View.OnClickListener () {
public void onClick (View v) {
BasicOpenARDemoActivity.this.startARViewWithCustomTitle ();
}
});

b = (Button) findViewById (R.id.button4);
b.setOnClickListener (new View.OnClickListener () {
public void onClick (View v) {
BasicOpenARDemoActivity.this.start3dARView ();
}
});
}

/ **
* starts the basic AR view
* /
private void startARViewBasic () {

/ / Create the basic intent
WikitudeARIntent intent = prepareIntent ();

/ / And launch the intent
try {
intent.startIntent (this);
} catch (ActivityNotFoundException e) {
AbstractWikitudeARIntent.handleWikitudeNotFound (this);
}
}

/ **
* does the same as the basic AR view above, but adds custom icons to the POIs
* /
void startARViewWithIcons () {

/ / Create the basic intent
WikitudeARIntent intent = prepareIntent ();

/ / Optionally add a title
intent.addTitleText ("AR app with custom icons");
intent.setPrintMarkerSubText (false);

/ / Optionally: Add icons
addIcons (intent);

/ / And launch the intent
try {
intent.startIntent (this);
} catch (ActivityNotFoundException e) {
AbstractWikitudeARIntent.handleWikitudeNotFound (this);
}
}

/ **
* does the same as the basic AR view above, but adds custom icons to the POIs ; and a graphical title image
* /
void startARViewWithCustomTitle () {
/ / Create the basic intent
WikitudeARIntent intent = prepareIntent ();

intent.setPrintMarkerSubText (false);

/ / Optionally: Add icons
addIcons (intent);

/ / Optionally: Put a custom graphical title:
intent.addTitleImageResource (this.getResources (). getResourceName (R.drawable.custom_title_bar));

/ / Optionally, one could set URIs:
/ / Use Android's content provider or create your own
/ / to host your custom images.
/ / intent.addTitleImageUri ("content :/ / com.IconCP / ANY_ICON_PATH.jpeg");

/ / And launch the intent
try {
intent.startIntent (this);
} catch (ActivityNotFoundException e) {
AbstractWikitudeARIntent.handleWikitudeNotFound (this);
}
}

/ **
* starts the 3D AR view
* /
private void start3dARView () {

/ / Create the basic intent
Wikitude3dARIntent intent = new Wikitude3dARIntent (this.getApplication (), null, null);

File file = new File (modelFileName);
if (! file.exists ()) {
this.showDialog (BasicOpenARDemoActivity.DIALOG_NO_MODEL_FILE_ON_SD);
} else {
intent.setModelPathFileSystem (modelFileName);
intent.setModelOrigin (modelCenterLatitude, modelCenterLongitude, modelCenterAltitude);
intent.setMetersWorth1000Points (1);

/ / And launch the intent
try {
intent.startIntent (this);
} catch (ActivityNotFoundException e) {
AbstractWikitudeARIntent.handleWikitudeNotFound (this);
}
}
}

/ **
* prepares a Wikitude AR Intent (eg adds the POIs to the view)
*
* @ return the prepared intent
* /
private WikitudeARIntent prepareIntent () {
/ / create the intent
WikitudeARIntent intent = new WikitudeARIntent (this.getApplication (), null, null);
/ / add the POIs
this.addPois (intent);
/ / add one menu item
intent.setMenuItem1 ("My menu item", BasicOpenARDemoActivity.CALLBACK_INTENT);
intent.setPrintMarkerSubText (true);
return intent;
}

/ **
* adds hard-coded POIs to the intent
*
* @ param intent
* the intent
* /
private void addPois (WikitudeARIntent intent) {
WikitudePOI poi1 = new WikitudePOI (35.683333, 139.766667, 36, "Tokyo", "Tokyo is the capital of Japan.");
poi1.setLink ("http://www.tourism.metro.tokyo.jp/");
poi1.setDetailAction (BasicOpenARDemoActivity.CALLBACK_INTENT);
WikitudePOI poi2 = new WikitudePOI (41.9, 12.5, 14, "Rome",
"Rome is the capital of Italy and the country's largest and most populous city, with over 2.7 million residents. ");
poi2.setDetailAction (BasicOpenARDemoActivity.CALLBACK_INTENT);
WikitudePOI poi3 = new WikitudePOI (40.716667, -74, 1, "New York" ,
"New York is the most populous city ​​in the United States, and the center of the New York metropolitan area. ");
poi3.setDetailAction (BasicOpenARDemoActivity.CALLBACK_INTENT);
WikitudePOI poi4 = new WikitudePOI (48.208333, 16.373056, 220, "Vienna",
"Vienna is the capital of the Republic of Austria. ");
poi4.setDetailAction (BasicOpenARDemoActivity.CALLBACK_INTENT);
List pois = new ArrayList ();

pois.add (poi1);
pois.add (poi2);
pois.add (poi3);
pois.add (poi4);
intent.addPOIs (pois);

((BasicOpenARDemoApplication) this.getApplication ()). setPois (pois);
}

/ **
* helper-method to add icons to the intent.
*
* @ param intent
* the intent
* /
private void addIcons (WikitudeARIntent intent) {
ArrayList pois = intent.getPOIs ();

Resources res = getResources ();
pois.get (0). setIconresource (res.getResourceName (R.drawable.flag_japan));
pois.get (1). setIconresource (res.getResourceName (R.drawable.flag_italy));
pois.get (2). setIconresource (res.getResourceName (R.drawable.flag_usa));
pois.get (3). setIconresource (res.getResourceName (R.drawable.flag_austria));
/ / to use this, make sure you have the file present on the sdcard
/ / pois.get (3). setIconuri ("content :/ / com.IconCP / sdcard / flag_austria.png") ;
}

/ **
* {@ inheritDoc}
* /
protected Dialog onCreateDialog (int dialogId) {
String message = this.getString (R.string.modelfile_not_found, modelFileName);
return new AlertDialog.Builder (this). setTitle (R.string.modelfile_not_found_title). setMessage (message)
. setPositiveButton ("OK", new DialogInterface. OnClickListener () {
public void onClick ( DialogInterface dialog, int whichButton) {
/ / do nothing, just dismiss the dialog
}
}). create ();
}
}
------ eference ----------------------------------- ----
done it on Windows platforms ?
------ eference --------------------------------------- < br> graduation design have to do this , pointing or two do ? qq807110084
------ eference ---------------------------------------
there was now android augmented reality applications do
------ eference --------------------------- ------------
Hello , I recently also do this and would like to use GPS + Sensor to achieve , similar to google glasses , with the exchange it , QQ: 1227540804
---- - eference ---------------------------------------
QQ: 649186272 ; add me about it just recently done research with the application of ar
------ eference ---------------- -----------------------
QQ: 461267492 add me about it just recently done research with the application of ar
------ eference ---------------------------------------
recently Andrews in the company to do this project just do hope that we can come together to study AR QQ735085013 landlord can create a group thing to everyone plus with
- ---- eference ---------------------------------------
I recently in the research in this area , QQ472947433, we can discuss !
------ eference --------------------------------------- < br> wikitudekey where registered , neighborhoods studied zaburo@gmail.com
------ eference -------------------- -------------------
to me that we study together , I need your study notes, Baidu AR technology Network
------ eference ---------------------------------------
ar program written in Java will not slow do ? I am old tangled this ?
------ eference --------------------------------------- < br> Dingyiding ! Want to see !
------ eference --------------------------------------- < br> seeking occupation , I was in school AR technology , QQ591018930
------ eference ---------------------------- -----------
studying 116097968
------ eference ------------------- --------------------
add my QQ: 1016829303, we study together

没有评论:

发表评论