Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Ramziddin Khusanov

Smart Scanner for Advertisements


The article describes one of the methods of smart advertisements with latest new discoveries such
as Augmented Reality (AR) and Object recognition. The main concept of the article is to
implement certain smart mobile application for user to have an easy and reliable access to any
product or service. Article fully describes the all procedures of all action which application
supposed to perform. In paper below, is provided “Break down of code” where heart coding of
the main project which is proposed in the given article.

Key Words: Advertisement, Augmented Reality, Object Recognition, Camera.

Introduction In the given article author is trying to


Advertisement is covering up our world combine and implement this 2 latest nova as
day by day. With development of the AR (Augmented Reality) and OR (Object
technologies, adds also are getting advanced Recognition) into the unified project.
accordingly. One of the latest discoveries such
as Augmented reality and Object recognition is
already pacified by advertising productions. Problem Statement of Article
Management of huge amount of information
1. Augmented reality (AR) is a live direct around us is getting more complicated and
or indirect view of a physical, real-world complex, so it raises misunderstandings
environment whose elements are augmented among the users. Moreover, informational
(or supplemented) by computer-generated float might be in appropriate, so truthfulness of
sensory input such as sound, video, graphics data had to safe and secured for both sides for
or GPS data [1]. It is related to a more general advertiser either user.
concept called mediated reality, in which a  Data analysis of adds around the user
view of reality is modified (possibly even  Truthfulness of given information
diminished rather than augmented) by a  Immediate response from
computer. As a result, the technology manufacturers
functions by enhancing one’s current  Safety of the users
perception of reality. By contrast, virtual
reality replaces the real world with a
simulated one [1]. Implementation
Implementation of the project does not require
2. Object recognition is a computer vision any integrity with hardware. It is mobile based
technique for identifying objects in images or application where cell phone with camera
videos. It is well computed algorithm which would be completely sufficiently. Mobile
allows computer to identify special shapes Application could be written for two platforms
(keyed in by developer) within help of such as Android and iOS.
advance camera[2]. Figure 1.0 describes the interaction between
user and devise where device simultaneously
connected to the host.

1
@Override public void
onRequestPermissionsResult(int
requestCode,String
Permissions[],int[]grantResults){
Toast.makeText(getApplicationContext(),
"onRequestPermissionsResult",
Toast.LENGTH_LONG).show();
switch(requestCode){ case MY_PER_CAM:
{ if(grantResults.length>0 &&
grantResults[0] ==
PackageManager.PERMISSION_GRANTED
){
Toast.makeText(getApplicationContext(),"Ca
mera
Granted",Toast.LENGTH_LONG).show();
Break down of code base }else{
1. It allows us to enter the API Key, which key Toast.makeText(getApplicationContext(),"Ca
will only work when using the eu.kudan.ar mera
application Id and can be found at Denied",Toast.LENGTH_LONG).show(); }
https://wiki.kudan.eu/Development_License_ return; } } }
Keys.
2. System request for the camera permission to 4. Create our trackable with an image:
be granted while using the callback. ARImageTrackable trackable =
if(ContextCompat.checkSelfPermission(this, createTrackable("Marker","lego.jpg");
Manifest.permission.CAMERA) != Get the trackable Manager:
PackageManager.PERMISSION_GRANTED ARImageTracker trackableManager =
){ Log.d("Marker","Did != ARImageTracker.getInstance();
PackageManager.PERMISSION_GRANTED Add image trackable to the image tracker
"); manager:
if(ActivityCompat.shouldShowRequestPermi trackableManager.addTrackable(trackable)
ssionRationale(this,
Manifest.permission.CAMERA)){ } else{ 5. Create an image node using an image of
//request forpermission-use the callback the kudan cow:
ActivityCompat.requestPermissions(this, new ARImageNode cow = new
String[]{Manifest.permission.CAMERA}, ARImageNode("target.png"); Add the image
MY_PER_CAM); } } } node as a child of the trackable's world:
trackable.getWorld().addChild(cow);
3. This method should be overridden and all
the AR content setup placed within it. This 6. Initialize "video texture"
method is called only at the point at which the ARVideoTexture videoTexture = new
AR Content is ready to be set up. It checks for ARVideoTexture();
the camera permission is granted or denied. If videoTexture.loadFromAsset("sample-mp4-
granted hence the workflow of the system will video.mp4");
continue or else it will return until and unless Initialise video node with video texture
the permission is not granted. ARVideoNode videoNode = new
ARVideoNode(videoTexture);
2
Add video node to image trackable texture2D.loadFromAsset("bigBenTexture.pn
trackable.getWorld().addChild(videoNode); g");
Apply Video scale Apply model texture to model texture
float scale = trackable.getWidth() / material
videoTexture.getWidth(); ARLightMaterial material = new
videoNode.scaleByUniform(scale*0.5f); ARLightMaterial();
material.setTexture(texture2D);
material.setAmbient(0.8f, 0.8f, 0.8f);
Apply texture material to models mesh nodes
7. Initialize "bigimage" node for(ARMeshNode meshNode :
ARImageNode imageNode = new modelImporter.getMeshNodes()){
ARImageNode("eyebrow.png"); meshNode.setMaterial(material); }
Add image node to image trackable modelNode.rotateByDegrees(90,1,0,0);
trackable.getWorld().addChild(imageNode); modelNode.scaleByUniform(0.25f);
Apply image scale
ARTextureMaterial textureMaterial = Figure 2.0 presents the Activity Diagram of
(ARTextureMaterial)imageNode.getMaterial( Article
); float scale = trackable.getWidth() /
textureMaterial.getTexture().getWidth();
//imageNode.scaleByUniform(scale);

8. Initialise "alphavideo" texture


ARVideoTexture videoTexture = new
ARVideoTexture();
videoTexture.loadFromAsset("kaboom.mp4")
; Initialise alpha video node with video
texture
ARAlphaVideoNode alphaVideoNode = new
ARAlphaVideoNode(videoTexture);
Add alpha video node to image trackable
trackable.getWorld().addChild(alphaVideoNo
de);
Apply alpha video scale
float scale = trackable.getWidth() /
videoTexture.getWidth();
alphaVideoNode.scaleByUniform(scale*10f);
9. Import model
ARModelImporter modelImporter = new
ARModelImporter();
modelImporter.loadFromAsset("ben.jet");
ARModelNode modelNode =
(ARModelNode)modelImporter.getNode();
Load model texture
ARTexture2D texture2D = new
ARTexture2D();

3
Conclusion
The Project which is expressed in article
covers Advertising industry and could be
implemented also in different spheres of
industry. Within help of this application users
could easily interact with right and safe
commercials (information). It allows them to
grab detailed data about certain product or
service. Application itself could only run with
advanced smartphones which has well
configured cameras. The given project in
article is developed for Android, but it could
be converted to iOS for the future work.
Moreover, this project includes internal
entrainment for user itself, with 360⁰ pictures,
advanced augmented reality videos etc.

Literature
[1] National Center for Supercomputing
Applications, University of Illinois.. 1995.
INTRODUCING VIRTUAL
ENVIRONMENTS. [ONLINE] Available at:
http://archive.ncsa.illinois.edu/Cyberia/VETo
pLevels/VR.Overview.html. [Accessed 19
July 2017].

[2] “Concept of Object Recognition”


United States 2016
Link:
https://www.mathworks.com/solutions/deep-
learning/object-recognition.html

Ramziddin Khusanov - Teaching Assistant


at INHA University
Email: r.khusanov@inha.uz
Tel: +998933790589

You might also like