Professional Documents
Culture Documents
Designed: COMSATS University Islamabad (CUI)
Designed: COMSATS University Islamabad (CUI)
DESIGNED
By
Teacher:
MA’AM SAIRA BAIG
i
DECLARATION
We hereby declare that this software, neither whole nor as a part has been copied out from any
source. It is further declared that we have developed this software and accompanied report
entirely on the basis of our personal efforts. If any part of this project is proved to be copied out
from any source or found to be reproduction of some other. We will stand by the consequences.
No Portion of the work presented has been submitted of any application for any other degree or
qualification of this or any other university or institute of learning.
Supervisor
Co-Supervisor
External Examiner
Head of Department
(Department of Computer Science)
Executive Summary
An everyday person does not have access to professional tools that can assist them in simple
interior renovation. All forms of professional help are costly and mostly inaccessible by a normal
person. The mobile industry has touched millions of lives and everyone today has access to
mobile devices and several smartphone applications exist that allow user to view the products on
screen but in this case a picture does not speak a thousand words and there is an ambiguity when
buying products online. The user has no idea how the product will look onsite. Furthermore, no
such platform exists where users can interact with one another and share ideas regarding home
furnishing, interior designing or even get a second opinion on something as simple as buying a
new chair. Thus, there is a need for a simple and easily learnable system that assists users in
small everyday interior design decisions.
To prevent all these problems from prevailing, DesignAR has been developed. The application
uses the power of augmented reality to assist the user in making simple interior design decisions.
The application will utilize mobile devices and allow the user to view elements which include
but are not limited to chairs, tables, sofas, beds, and floor tiles in the real-world using the
device’s camera. We will eliminate the ambiguity of how the item will look onsite when buying
the item either online or in-person. This will in return save the user’s resources i.e. money and
time.
DesignAR is an android based application that uses Augmented Reality by accessing the phone’s
camera to place models in the environment. It allows sharing the design on the application’s
stand- alone social network. It also allows the users to upload their 3d models to be used in the
application.
iv
Acknowledgement
All praise is to Almighty Allah who bestowed upon us a minute portion of His boundless
knowledge by virtue of which we were able to accomplish this challenging task.
We are greatly indebted to our project supervisor “Mr. Qasim Malik”. Without his personal
supervision, advice and valuable guidance, completion of this project would have been doubtful.
We are deeply indebted to him for his encouragement and continual help during this work.
And we are also thankful to our parents and family who have been a constant source of
encouragement for us and brought us the values of honesty & hard work.
AR Augmented Reality
Table of Contents
1 Introduction...........................................................................................................................1
1.1 Brief Overview...........................................................................................................................1
1.2 Relevance to Course Modules....................................................................................................2
1.3 Project Background....................................................................................................................2
1.4 Literature Review.......................................................................................................................3
1.5 Analysis from Literature Review...............................................................................................4
1.6 Methodology and Software Lifecycle for this Project................................................................4
1.6.1 Rationale behind the Selected Methodology..........................................................................4
2 Problem Definition................................................................................................................5
2.1 Problem Statement.....................................................................................................................5
2.2 Deliverables and Development Requirements............................................................................5
2.3 Current System...........................................................................................................................6
3 Requirement Analysis...........................................................................................................7
3.1 Event Table................................................................................................................................7
3.2 Detailed Use Case......................................................................................................................9
3.2.1 Module 1: Account Management...........................................................................................9
3.2.2 Module 2: Decor..................................................................................................................15
3.2.3 Module 3: Room Designer...................................................................................................20
3.2.4 Module 4: Community.........................................................................................................23
3.2.5 Module 5: Showcase............................................................................................................27
3.3 Functional Requirements..........................................................................................................28
3.4 Non-Functional Requirements..................................................................................................36
3.4.1 Usability...............................................................................................................................36
3.4.2 Performance.........................................................................................................................36
3.4.3 Supportability..................................................................................................................xxxvi
3.4.4 Availability..........................................................................................................................36
4 Design and Architecture.....................................................................................................37
4.1 System Architecture.................................................................................................................37
4.2 Data Representation.................................................................................................................38
4.3 Design Models.........................................................................................................................39
4.3.1 Structural Diagrams.............................................................................................................39
4.3.2 Behavioral Diagrams............................................................................................................40
5 Implementation....................................................................................................................50
5.1 Algorithm.................................................................................................................................50
5.1.1 Model Placement.................................................................................................................50
5.1.2 Post Sharing.........................................................................................................................51
5.1.3 Room Designing..................................................................................................................51
5.2 External APIs...........................................................................................................................52
5.3 User Interface...........................................................................................................................52
6 Testing and Evaluation.......................................................................................................56
6.1 Manual Testing.........................................................................................................................56
6.1.1 Unit Testing.........................................................................................................................56
6.1.2 Functional Testing...............................................................................................................62
6.1.3 Integration Testing...............................................................................................................64
6.1.4 System Testing.....................................................................................................................65
7 Conclusion and Future Work.............................................................................................66
7.1 Conclusion...............................................................................................................................66
7.2 Future Work.............................................................................................................................66
8 References............................................................................................................................67
List of Figures
Figure 4.1: System Architecture Diagram.....................................................................................37
Figure.4.2: Class Diagram.............................................................................................................39
\Figure 5.1: Main Screen...............................................................................................................52
Figure 5.2: User Activity...............................................................................................................53
Figure 5.3: Newsfeed.....................................................................................................................53
Figure 5.4: Post Sharing Screen....................................................................................................54
Figure 5.5: Room Designer Environment.....................................................................................54
Figure 5.6: Model Catalog.............................................................................................................55
Figure 5.7: Model Placement inside Template..............................................................................55
1 Introduction
The project involves building an application that will allow the user to furnish rooms using
Augmented Reality. Users should make a computerized ID to utilize the application. The
application will enable them to make advanced ID which will be secure. User can then access the
phones camera and place different elements in the scene. The user will have to browse through a
catalogue of items before selecting any item. Upon selecting the users shall drag the item in the
scene and manipulate it as desired. The user will be given the option to share an image view of
the designed scene with other users of the application. Other users can critique the design by
commenting on the shared image. The application will also enable commercial users to showoff
product by submitting their creations to the platform.
We used Object Oriented Methodology to develop this application. We coded in Java and C# on
Android Studio and in Unity on Visual Studio IDE respectively. We have studied various similar
applications and tried to bring improvements in our application. We have tested the system
manually.
We believe that by using our application users will be able to take the design decisions with ease.
We hope to work more on the application in future and add more features and make our
application competitive to related applications.
1
1.2 Relevance to Course Modules
CSC241: Object Oriented Programming
This course helped us in choosing the Object-Oriented design methodology and helped in
implementing the concepts of OOP.
An AR solution captures part of an environment using a smartphone camera. Then it scans for
horizontal and vertical surfaces and put on feature points on detected surface. Then it estimates
for average color temperature and brightness in physical space. It detects the 3d objects to be
placed and places it on the feature points after detection.
1.4 Literature Review
Table 1.1: Literature Review
2 Problem Definition
M1-UC1 Sign up
M1-UC2 Login
M1-UC3 View Profile
M1-UC4 Edit Profile
M1-UC5 Edit Image
M1-UC8 View User History
M1-UC9 Sign out
3.2.1.1 M1-UC1:
Signup
Table 3.3: Signup Use Case
3.2.1.2 M1-UC2:
Login
Table 3.4: Login Use Case
3.2.1.7 M1-UC7:
Logout
Table 3.8: Logout Use Case
3.2.4 Module 4:
Community
Table 3.21: Module 4 Use Cases
Identifier FR1
Title Username verification
Requirement The system shall check for any matching usernames in the database every
time a user requests to create a new account.
Source Supervisor
Rationale To provide all users with a unique identification.
Business Rule N/A
Dependencies FR3
Table 3.30:FR2
Identifier FR2
Title Create Account
Requirement The system shall create a new account for the user upon getting users
credentials.
Source Supervisor
Rationale To provide the user with an identity.
Business Rule (if N/A
required)
Dependencies N/A
Identifier FR3
Title Surface Recognition
Requirement The system shall identify key points on a surface to act as an anchor for
placing objects.
Source Supervisor
Rationale To place virtual objects in the scene.
Business Rule N/A
Dependencies N/A
3.3.1.4 FR-04: Motion Tracking
Table 3.32: FR4
Identifier FR4
Title Motion Tracking
Requirement The system shall track the users device position in real time in order to
keep account of where the virtual objects were placed.
Source Stakeholders
Rationale To place virtual objects in the scene.
Business Rule N/A
Dependencies N/A
Identifier FR5
Title Password Verification
Requirement The system shall verify the entered password for its correctness.
Source Supervisor
Rationale To verify user account.
Business Rule N/A
Dependencies N/A
3.3.1.6 FR-06: Update Profile Information
Table 3.34: FR6
Identifier FR6
Title Update Profile Information
Requirement The system shall update user profile information as per the user’s request.
Source Supervisor
Rationale To allow user to update personal information when desired.
Business Rule N/A
Dependencies N/A
Identifier FR7
Title Verify Profile Picture Size
Requirement The system shall not allow user to upload a profile picture of size
exceeding 2 Mega Bytes.
Source Supervisor
Rationale To maintain system performance.
Business Rule N/A
Dependencies N/A
Identifier FR8
Title Save user activity
Requirement The system shall keep a record of which posts the user uploaded and how
many likes, followers and following the user has.
Source Supervisor
Rationale To keep a history of user activity on the social network.
Business Rule N/A
Dependencies FR12
Identifier FR9
Title Categorize user elements
Requirement The system shall display the furniture elements in a category.
Source Supervisor
Rationale To organize the element for the user to navigate easily.
Business Rule N/A
Dependencies N/A
Identifier FR10
Title Drag and Drop
Requirement The user shall be able to drag elements from the catalogue and drop them
into the project.
Source Supervisor
Rationale To increase quality of user experience.
Business Rule N/A
Dependencies N/A
Identifier FR11
Title Share Content
Requirement The user shall be able to share image view of any scene into the social
network.
Source Supervisor
Rationale To allow user the ability to share with other members of the community.
Business Rule N/A
Dependencies N/A
Identifier FR12
Title Save to local directory
Requirement The system shall save scenes and builds as image into the phones local
directory as per user request to save the file.
Source Supervisor
Rationale To allow user to view and use images at any desired time.
Business Rule N/A
Dependencies N/A
Identifier FR13
Title Post Availability
Requirement The system shall make all content posted by users onto the social network
available to all users of the application.
Source Supervisor
Rationale To make all content available for all users to interact.
Business Rule N/A
Dependencies N/A
Identifier FR14
Title Display community content
Requirement The system shall display all content posted by users as a single newsfeed.
Source Supervisor
Rationale To display content as a list for user.
Business Rule N/A
Dependencies N/A
Identifier FR15
Title Sort content chronologically
Requirement The user shall be able to sort the content listed in the social network by
chronological order.
Source Supervisor
Rationale To increase user experience
Business Rule N/A
Dependencies N/A
Priority Medium
Identifier FR16
Title Display content chronologically
Requirement The system shall sort user content being displayed chronologically.
Source Supervisor
Rationale To increase user experience.
Business Rule N/A
Dependencies N/A
Identifier FR17
Title Upload model
Requirement The user shall be able to upload models onto the application server.
Source Supervisor
Rationale To keep applications catalogue updated
Business Rule N/A
Dependencies N/A
3.4 Non-Functional Requirements
3.4.1 Usability
USE-1: The application shall take a maximum of 5 minutes for an average user to learn
the system.
USE-2: All text shall have font size equal to or more than 10dp for easy readability.
3.4.2 Performance
PER-1: The system shall show object in scene in 2 seconds.
3.4.3 Supportability.
SR-1: The application shall function on devices with android version 7 and those that
support google ARcore services.
3.4.4 Availability
AVA-1: The system shall be available 24/7.
4 Design and Architecture
Posts authorId
description Text string
Title Text string
createdDate Date and Time
hasComplain Boolean
likesCount Integer
commentsCount Integer
watchersCount Integer
Post-comments Id
authorId
Text Text string
createdDate Date and Time
Followers profileId
createdDate Date and Time
Models Id
description Text string
Title Text string
Username Text string
Postimage Reference
4.3 Design Models
profileCreate
-username: String
-password: String
-image: Image
+createProfile(username,password,image)
userProfile
profileEdit postCreate
-userPosts: List
-username: String -userList: List
-password: String 1 1…* -title
-likes: Integer
-image: Integer -description
-comments: String
-image
+changeUsernName(username) +displayNewsfeed(userPosts,likes,comments)
+changeImage(image) +openDecor() +createPost(image,title,description)
+openRoom()
1
1…*
1…*
roomPanel
foundFloor
-canvas
-hasFoundFloor:Boolean -buttons
+update() -transformView
1 +init()
+setMode()
1…* +activeGUI()
modelPlacement 1
-itemSetIntoPlacer:gameObject
1…*
-objectPlaced:gameObject
textureChange -gui: gameObject
+drag()
roomController
-inPos: Boolean
+start() +rotate() -camera
+update() +remove() -room
+changePosition() +delete() -rotated: Boolean
+inPlace() -gui: Boolean
+duplicate() -panel: roomPanel
+remove() +start()
takeSS() +reset()
+update()
+addItem()
+touchItem()
+drag()
+place()
+delete()
+rotate()
Figure.4.2: Class Diagram
4.3.2 Behavioral Diagrams
5 Implementation
5.1 Algorithm
Steps
AR solution captures part of environment using smartphone’s camera.
Scan the surface and put on feature points on the scanned surface.
Estimate for average color temperature and brightness in physical space
Detect and scan 3d model and place on scanned surface.
Output
Model placed in the environment.
Steps
Get image with the help of native gallery plugin and store reference.
Store title and description input by user.
Display post on user newsfeed using Drawable class.
Keep track of views, comments, and likes.
Output
Post shared in newsfeed.
Steps
Interact with in the interface using Touch Gestures.
Dragging & Dropping Furniture Objects from Menu to a defined room area.
Viewing the current placement from various point of view.
Output
The items have been placed in the respective assigned area.
5.2 External APIs
No. Test Case/Test Test Data Expected Result Actual Result Pass/Fail
Script /Not
Executed
/
Suspend
ed
TC-01 Email and Email: User newsfeed User newsfeed Pass
password valid mail@yahoo.com appears. appears.
Password:
google36@
TC-02 Email format Email: Message Message Pass
invalid mail displayed “email displayed “email
Password: badly formatted” badly formatted”
google0336
6.1.1.2 Unit Testing 2: Login
Testing Objective: To ensure the login form is working properly and user is logged into his profile.
Test Case Id: TC_U2
Test Case Description: Test the Login functionality.
Table 6.2: Test Cases for Login
No. Test Case/Test Test Data Expected Result Actual Result Pass/Fail/N
Script ot
Executed/
Suspended
TC-01 Selected Image .jpg file Image displayed as Image displayed as Pass
valid profile photo profile photo
TC-02 Image format Image file Message displayed Message displayed Pass
invalid “Invalid image “Invalid image
format” format”
TC-03 Image size .jpg file Message displayed Message displayed Pass
invalid “image too big” “image too big”
No. Test Case/Test Test Data Expected Result Actual Result Pass/Fail/
Script Not
Executed/
Suspende
d
TC-01 Add Content Text, image Post written and Post written and Pass
ready to share ready to share
No. Test Case/Test Test Data Expected Result Actual Result Pass/Fail/
Script Not
Executed/
Suspende
d
TC-01 Share when Button: Share Content posted Content posted Pass
content written and displayed on and displayed on
newsfeed newsfeed
TC-02 Share when field Button: Share Content not Content not
blank shared shared
6.1.1.6 Unit Testing 6: Like/Dislike Post
Testing Objective: To ensure that vote on the post is
added. Test Case Id: TC_U6
Test Case Description: Test the Like/Dislike Post functionality.
Table 6.6: Test Cases Like/Dislike Post
No. Test Case/Test Test Data Expected Result Actual Result Pass/Fail/
Script Not
Executed/
Suspende
d
TC-01 Check by Button: Vote added Vote added Pass
clicking thumbs Up/down vote
up/down icon icon
No. Test Case/Test Test Data Expected Result Actual Result Pass/Fail/
Script Not
Executed/
Suspende
d
TC-01 Post when text Button: Post Comment Comment Pass
written published published
6.1.1.8 Unit Testing 8: Browse Model
Testing Objective: To ensure that models can be browsed through.
Test Case Id: TC_U8
Test Case Description: Test the Browse Model functionality.
Table 6.8: Test Cases for Browse Model
No. Test Case/Test Test Data Expected Result Actual Result Pass/Fail/N
Script ot
Executed/
Suspended
TC-01 Browse Button: Models Models Displayed Pass
Browse model displayed
No. Test Case/Test Test Data Expected Result Actual Result Pass/Fail/N
Script ot
Executed/
Suspended
TC-01 Surface textured AR camera Surface marked Surface marked Pass
and light fair
TC-02 Object dragged Object Object Placed Object Placed Pass
No. Test Case/Test Test Data Expected Result Actual Result Pass/Fail/N
Script ot
Executed/
Suspended
TC-01 Space enough Tap on camera Photo saved Photo saved Pass
icon
No. Test Case/Test Script Test Data Expected Result Actual Pass/Fail/Not
Result Executed/
Suspended
1. Register Username User has access to User has Pass
Password the application. access to
the
application.
No. Test Case/Test Script Test Data Expected Result Actual Pass/Fail/Not
Result Executed/
Suspended
1. Login Username User newsfeed User Pass
Password appears. newsfeed
appears.
6.1.2.3 Functional Testing 3: View Profile
Test Objective: To ensure that profile information is displayed.
Test Case Id: TC_F3
No. Test Case/Test Script Test Data Expected Result Actual Pass/Fail/Not
Result Executed/
Suspended
1. View Profile Button: Profile information Profile Pass
View displayed information
Profile displayed
Test Scenario 2:
To enter the Room designing environment user taps the room designer icon and
the template is displayed along with the model’s catalog. The user selects a model
and drags it inside the template.
Status: Pass
Test Scenario 3:
The user takes the photo of the scene and is saved in the device gallery. The user
shares the photo in the community section if the internet connection is available
but if the connection is not available a message is displayed.
Status: Pass
7 Conclusion and Future Work
7.1 Conclusion
In conclusion, our project a complete platform specifically designed for everyday people who
require help and ideas in renovating, designing and furnishing their homes. The application
delivers help without any sharp learning curve and proves to be up to date with the social norms
and trends of today.