Augmented Reality Tutorial No. 1: Marker-Based Primitive Object Augmentation

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: , , , , , , ,

36 Responses

  1. 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

  2. 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

  3. 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.

  4. 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

  5. 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.

  6. is this possible to making augmented reality based android application in processing 3 ? if this possible then how to do this?

  7. 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!