Indian Institute of Information Technology , Nagpur
Digital signal Processing Project Report
Course : ECL : 301
Submited By: Mayur Raul
Making Invisible Augmented Reality Tags using
MATLAB and Implementing Augmented Reality in MATLAB
Abstract:
Augmented Reality (AR) is been widely used in our daily life. Augmented Reality (AR)
a technology that superimposes a computer-generated image on a user's view of the real
world, thus providing a composite view. In Today’s world AR is one of the most emerging
technology. AR is used for advertisement, learning, for fun, etc. There are Different types of
AR :
(i) Marker Based Augmented Reality (ii) Markerless Augmented Reality
(iii) Projection Based Augmented Reality (iv) Superimposition Based Augmented Reality
This project is Based on Marker Based Augmented Reality. The AR tags are used in Marker
Based Augmented Reality. The AR Systems detects and track the two dimensional symbol
similar to a QR code(AR tags/ AR Marker). This allows the AR system to do different things.
This AR tags can be hidden in an image which doesn’t affect the resolution of the original
image and the AR object can be easily Imposed on the Image, which is very useful in
advertising. This can be done by using MATLAB and also the AR application can be created
in MATLAB.
Introduction:
Augmented Reality is the new technology which puts virtual objects on the real-world
environment via the help of auxiliary devices , such as mobile phone. In general , according
to the computer imaging technology ,it makes real environment and virtual objects exist on the
same screen or simultaneously combines them in the same space. To exhibit the virtual object
in the real- world , an AR tag is usually adopted within the marker based AR system. In this
project will be making an invisible AR tag using Steganography in MATLAB and also
implementing AR in MATLAB, by augmenting a video on the AR tag created. By using object
recognition and tracking will create a augmented reality application with a webcam in
MATLAB. Recognize an image in a scene, track its position, and augment the display by
playing a video in the image’s place. The AR tag is a predefined pattern that is linked with the
virtual object in AR systems. The virtual object thereby can be located on the AR tag. In the
marker- based AR applications , the AR tag usually sticks on the surface of products. The
irregular AR pattern inevitably distorts the quality and the appearance of the products. Based
on this Observation , we aim to develop a method that conveys the AR tag in the digital media
with invisibility for preserving the integrity and appearance of the original media content. The
figure 1 shows an instance of augmented reality.
Figure 1(a) Figure 1(b)
Image
Mixed Processing Image with AR Tag
AR Tag
Figure 2
The above Figure shows the procedure to obtain the invisible AR tag.
Implementation:
In order to obtain the invisible AR tag in an image we will use a method called
Steganography. Steganography is the process of hiding a secret message within a larger
one in such a way that someone can not know the presence or contents of the hidden
message. The purpose of Steganography is to maintain secret communication between two
parties. It is the object that will 'carry' the hidden message. In our case the AR tag is the
message image that will be hidden in the image.
This is a simplest steganographic technique that embeds the bits of secret
message directly into the least significant bit (LSB) plane of the cover image. In a gray-
level image, every pixel consists of 8 bits. The basic concept of LSB substitution is to
embed the confidential data at the rightmost bits (bits with the smallest weighting) so that
the embedding procedure does not affect the original pixel value greatly.
The imperceptibility of a Steganography technique is the most important necessity, since
the quality of Steganography lies in its capacity to be unseen by the naked eyes .
In this technique, the binary representations of the secret data have been taken and the
LSB of each byte is overwritten within the image. If 24-bit color images are used, then the
quantity of modification will be small.
Algorithm to Implement LSB Steganography :
Step-1: Read the original file.
Step-2: Count the total number of words, alphabets, special characters and digits in the
file.
Step-3: Find out the repeated words in the file.
Step-4: Prepare the word dictionary for the original file context.
Step-5: Create compressed file. In the compressed file place the word’s number instead
of actual words.
Step-6: Add dictionary to compressed file.
Step-7: Save the compressed file along with the dictionary.
Implementing Augmented Reality in MATLAB :
There are many framework to implement AR such as AR Core, AR Kit, Unity,
Vuforia, Ar.js, etc. But Augmented Reality can also be implemented in MATLAB using
Object recognition and tracking.
Algorithm:
Step-1: Load the reference image (image on which the video is to be augmented).
Step-2: Detect SURF features and extract Descriptors. Then Displaying SURF Features.
Step-3: Initializing the Replacement Video (‘rkk.mp4’).
Step-4: Creating Camera Object and set its Resolution.
Step-5: Take a snapshot using the webcam. (note : Add a add on extension in MATLAB
if not installed).
Step-6: Detect SURF features in webcam frame.
Step-7: Try to match the reference image and camera frame features.
Step-8: Get geometric transformation between reference image and webcam frame.
Step-9: Rescale replacement video frame.
Step-10 : Apply estimated geometric transform to scaled replacement video frame.
Step-11: Insert transformed replacement video frame into webcam frame.
Step-12 : Initialize Point Tracker and track points between two frames.
Step-13: Estimate geometric transformation between two frames.
Step-14 : Accumulate geometric transformations from reference to current frame.
Step-15 : Now repeat the Step-9, Step-10, Step-11 number of times.
Step-16 : Finish and Clean up.
Implementing AR in MATLAB:
SURF points in Image SURF Points in image captured
Matching features with the cam captured image
Geometric Transformation
Rescale Replacement Video Frame
Estimated geometric transform to scaled replacement video frame
Inserting transformed replacement video frame into webcam frame
Tracking Markers
Tracking Markers between two consecutive Frames
Rescale new replacement video frame
Inserted Video on to the image in next frame
Observation:
This project lets us develop an invisible AR tag and also lets us develop an
Augmented Reality application in MATLAB. Making an Augmented Reality application in
MATLAB gives an advantage over other methods of making AR applications such as using
Different SDKs like the Vuforia, ARcore, ARkit, etc. It provides more control over handling
the target image. However we cannot link the image with a textured 3D Model in MATLAB.
(Another observations: The video doesn’t play on its own, the AR system is not as precise as the other that can be
build using other well-known SDKs.)
Conclusion:
The invisible AR Tag was implemented and an AR application was implemented
in MATLAB.