Marker based Augmented Reality
This is one of the first and easiest to accomplish Marker based Augmented Reality tutorial in just a few minutes. Black square marker tracking have lots of drawbacks, therefore, in future tutorials we use markerless solutions. It’s getting more interesting in www.ourtechart.com.
Download # Processing
Download # Newest nyar4psg 2.0.0 library for Augmented Reality (*.rar file)
Download # Hiro Marker (*.pdf file)
NOTE: Extract library and put nyar4psg folder to Processing libraries location as you can see in example here: “C:\Users\EdgarasArt\Documents\Processing\libraries”. If there are no libraries folder in Processing folder (in My Documents) – create it!
Tags: 3D primitive objects, AR, augmented reality, Hiro Marker, marker-based, marker-based Augmented Reality, Primitive Object Augmentation, Processing Programming Language
Hi. I have downloaded Processing 3. When I run simpleLite the following error is shown in the console. “No library found for processing.video
Libraries must be installed in a folder named ‘libraries’ inside the ‘sketchbook’ folder.”
Any Solution
Hello, download 2.2.1 version of Processing (https://processing.org/download/?processing) and you should not have the following problem.
Hi,
I don’t have any camera on my computer, athough I would like to use the camera of my mobilephone, is it possible to make the program search for IP address of a camera?
Cheers
Hello. Nothing is impossible, however, I never tried to do this. Trust me, you don’t need this additional problem solving.
Hi, I use Processing 2.2.1 and install . When I run simpleLite the following error is shown in the console like that(https://dl.dropboxusercontent.com/u/39808973/Screen%20Shot%202015-11-01%20at%207.52.58%20AM.png). Can you help me please?
Hi, I use Processing 2.2.1 and install nyar4psg 2.0.0 library. When I run simpleLite the following error is shown in the console like that(https://dl.dropboxusercontent.com/u/39808973/Screen%20Shot%202015-11-01%20at%207.52.58%20AM.png). Can you help me please?
If the library is in place, it’s really hard to say what else could be wrong here.
What is folder direction to your library?
Documents > Processing > libraries > nyar4psg
I can see that you’re not using Win OS so it’s hard for me to suggest something. Also, you’re using Processing 2.1.2 not 2.2.1 but I don’t think that this causes the problem.
Can pls share d code?
Actually i needed the code with which u had drawn the rectangle around the maker and how to return the coordinates of corners of the marker.
The code is build in the library itself, so just start the example code and look for the code fragment related to marker corner coordinates.
Thank u very much ,just did not go through all d examples properly . Got it now .
Hey admin do you have any example which runs on Matlab??
Nope
I cannot find the file [patt.hiro]
I want to change the marker file.
Do you know where the file is?
in nyar4psg library folder
Hi, i had printed the marker but its not working, can you please tell the dimension of your marker?
great videos btw
8×8 cm, thanks!
when i try to start the camera is freezing. any suggestion? i am using notebook.
Without any errors?
Can the marker be anything of my own choice ? Like any image I want ?
Yes, if you start follow from Augmented Reality Tutorial No. 14.
but thats using unity3d and vuforia. So does nyar4psg has this limitation of predefined marker file ?
With nyar4psg you will be able to track only square black markers, of course, you can make it your own, but nothing alike images. Such marker-based tracking won’t be so robust.
Hai Admin,,,
I try processing in Ubuntu but I don’t know how to import library Nyar4PSG,, I try to create and copy in ~/Documents/Processing/libraries but it doesn’t work correctly
I’m not sure about the Ubuntu… Processing version 2.2.1?
Yes , I try processing version 2.2.1 and 3.0.2
Use 2.2.1. What errors do you receive?
Works well. Thanks so much
I am running NyAR4psg/3.0.5;NyARToolkit/5.0.9 in processing 2.2.1 with a Microsoft LifeCam HD-5000 on windows 7. When I run simpleLite, the background (camera) image appears only in the upper right corner of the window. It shows the lower left of the camera view. If the background image was correct the tracking appears to be correct. I looked in the reference material and found public void drawBackground (processing.core.PImage i_img)
This function draws the PImage to the background. PImage draws in part of farclip surface +1.
This function is equivalent to the following code.
:
PMatrix3D Om = New PMatrix3D (((PGrapPGraphicsOpenGLhics3D) G) .Projection);
SetBackgroundOrtho (Img.Width, Img.Height)
pushMatrix ();
ResetMatrix ();
Translate (0, 0, – (Far * 0.99F));
Image (img, -Width / 2, -Height / 2);
popMatrix ();
SetPerspective (Om);
:
My approach was to sub this code in for the line “nya.drawBackground(cam);” then mess with the translate to correct the issue. But I get a “syntax error, maybe a missing semicolon?” – I added a semi-colon to the end of the second line SetBackgroundOrtho (Img.Width, Img.Height); and It still hangs on the first line with the same error.
Any help would be appreciated.
is this possible to making augmented reality based android application in processing 3 ? if this possible then how to do this?
I suggest you drop out Processing 3 and use Unity3D. Don’t waste time on Processing.
And one more , Can we use our own marker ?
Hi, Thanks for AR Tutorial. Could you please tell me how I would be able to make this example as an Android App?
Hello, take a look at Unity3D + Vuforia plugin. Once you have thee tools installed, you can have something running in about 20 minutes (from Unity3D editor) that would wokr the same way on Android/iOS platforms once the solution will be exported. Good luck!