Академический Документы
Профессиональный Документы
Культура Документы
ZOOME
Make a Photo Moasic
ZOOME | PHOTO MOASIC SOFTWARE
INTRODUCTION:
Looking for a way to create the perfect image for anniversaries,
mothers day, birthdays, team events, invitations, and weddings
or simply to say thanks? You just found it.
Table of Contents
Table of Contents............................................................................................................................................ 2
Chapter 1 ....................................................................................................................................................... 4
Chapter 2 ........................................................................................................................................................ 8
Chapter 3 ...................................................................................................................................................... 28
Chapter 4 ...................................................................................................................................................... 41
Chapter 5 ...................................................................................................................................................... 45
Chapter 6 ...................................................................................................................................................... 58
Chapter 7 ...................................................................................................................................................... 68
Chapter One
1-Overview
2- Motivation
3-Problem view
4- System Objectives
5-System Overview & Top Features
6- Document Organization
7- Summary
1-Overview
This chapter will present the reasons behind choosing this project, a
problem view and our suggested solution.
Also we will present system objective and main features inbrief , plus some
possible scenarios that can be applied by this system.
2- Motivation
The use of different technologies and social medias and the wide use of
photos , videos and media in the society is expanding and always need to be
updated and elevated to the next level.
3-Problem view
As per the expansion happening and the evolution of media , as well for the
excess use of social media as facebook , instagram and snapchat that mainly
use images as data , evolution of sales and marketing techniques and the
use of high resolution photos and filters , some new features , ideas ,
techniques and applications has to be added and developed .
4- System Objectives
4
Zoome is looking forward to making one high resolution photo that gathers
memories for families and friends , add a plus to the marketing campaigns
that relay on photos , change in the photo based social medias and , elevate
a side of entertainment world .
Top Features:
6- Document Organization
Chapter 1:
5
7- Summary
In this chapter we have presented the motivation to choose this project and
we presented the proposed system overview and objective, also we have
presented the top features of the proposed system and some scenarios of
use that are predicted .
Chapter Two
1-background about Technologies
2-Similar and Related Systems
3- Summary
MOSAIC
Mosaic makes figure or image by attaching small pieces or tiles in various
colors on the basic draft . When mosaic images are viewed in short
distance, we can see small pieces and when they are viewed in long
distance, we can see one large form made by the pieces. Mosaic has been
mostly done by artists. In these days, such mosaic work is fixed as one of
unrealistic rendering techniques by researchers of computer graphics.
The images made by this technique enhance the interest and artistic
property of image. In the past, many materials should be collected for long
time for this mosaic. However, this problem is considerably solved by lowpriced digital device that is launched recently in wide variety. Because of
the appearance of software that can be easily used by general users, they are
much interested in mosaic management. Thus, unrealistic rendering
technique recently becomes the target of embodiment for many graphic
designers rather than technology of some researchers and mosaic in diverse
types are introduced.
Photo-mosaic refers to make one large photo by collecting many small
photos. Due to the recent development of digital imaging technology, these
photo-mosaic technologies are actively used in magazine, poster,
installation, music video and TV advertisement . Since the mosaic images
are mostly made by specialized graphic designer manually, it is difficult for
general users to make photo-mosaic images. Even specialized graphic
designer takes long time to make mosaic image, because work is done
manually
10
When you look at a photo mosaic from a distance, you see one big image, but as
you move close, you understand that it's not just a single, large picture but rather a
collection of small, separate images.
The application has two modes hue adjustment and extended search, that will
produce different styles of output image. In addition, the application managed
memory such that it can deal with very large image sizes and hundreds of tile
images.
11
The photo mosaic process can be summed up in two phases averaging and
tiling.
AVERAGING
1. Get the master image, the defined tile size, and the list of tile images.
2. Break the master image down into a grid of tiles of the defined size.
3. Calculate the average pixel color of each tile and record it.
4. For each tile image, calculate its average pixel color and record it.
After this phase, the application holds in memory a grid of tiles and their average
colors
On completion of this phase, you should have essentially two lists of averages, our
source tile averages, and our target master image averages .
Thus it then becomes a straightforward process of matching one set of averages to
another.
13
If one of our tile images has a similar average to one of our master image grid
tiles , then it would simply slot in that position.
In reality, however, it is not likely you will regularly find exact matches for these
averages, short of having literally millions of images with enough average colours
to cover your whole master image.
The approach I have taken is to supply two different tiling modes which will
produce different images based on all the images you are using and their
composition.
14
Tile searching
15
For each master image tile, try and find a matching tile from our source tile
list, within a given threshold.
If the list is exhausted and no tile is found within the threshold, increase the
threshold and try again.
Keep repeating until a tile is found (the threshold will eventually widen to
include all the tiles in our list).
Put the source tile found into the master tile grid.
16
17
-For each master image tile, pick a random tile from our list, making sure
that it hasnt been used in the last (X) tiles.
-Adjust the color of the tile so that it is closer in average to the master
image tile.
-Put the (adjusted) source tile into the master tile grid.
18
Memory Management
The application has been refined so that it shouldnt run out of memory for
conventionally sized images, which can still be quite large.
The specific exception will literally pause the loading while the .NET
garbage collector frees up memory after large IO operations.
Additionally, you do not have to resize your tile images , because the
application performs that automatically.
In order to minimize concurrent memory usage, the application will load,
resize, then re-save all the tile images to a defined cache folder;
these files are then re-loaded in their smaller tile size.
The other feature that optimizes performance is the use of the LockBitmap
class
The LockBitmap class allows for extremely fast manipulation of pixels
without using unsafe code.
19
Reference of PAPERS :
*Auto generation of Fractal Photographic Mosaic Images
-http://www.uoguelph.ca/~jbrown16/Fractal.pdf
*An artistic photographic collage on a mobile device
-http://link.springer.com.sci-hub.org/article/10.1007/s11042-014-2316-4
*A study on stackable mosaic generation for mobile devices (Dongwann
Kang Sanghyun Seo Seungtaek Ryoo Kyunghyun Yoon)
-http://link.springer.com.sci-hub.org/article/10.1007/s11042-012-1065-5
*Generation of Photo-Mosaic Images through Block Matching and Color
Adjustment (World Academy of Science, Engineering and Technology
International Journal of Computer, Control, Quantum and Information
Engineering Vol:8, No:3, 2014)
-http://waset.org/publications/9997759/generation-of-photo-mosaicimages-through-block-matching-and-color-adjustment
*Describe a process for creating an image mosaic (Image Mosaics | Adam
Finkelstein and Marisa Range)
-http://gfx.cs.princeton.edu/proj/mosaic/princeton-cs-tr-574-98.pdf
*Design a process for creating photo mosaics (Mati Krner - University of
Tartu, Institute of Computer Science)
-http://kodu.ut.ee/~b04866/poster.pdf
20
21
2. Andrea Mosaic
Another free photo mosaic software program that is named after its
developer, AndreaMosaic is packed full of customizable features. The
software allows you to set several parameters that will dictate the final
appearance of your photo mosaic, including the pixel width, number of tiles
per row, tile spacing and duplication, and color changes. You even have the
option to create photo mosaics from videos. Theres a 41-page MANUAL
22
that walks you through the features of the software and you can also
download a library of over 500 sample images you can use to create your
photo mosaic.
3. Mosaizer Pro
23
Like the other options listed here, this feature-rich photo mosaic software is
completely free to use. Unlike other mosaic creators which limit the user to
only creating photo mosaics, Mozaizer Pro boasts that it provides its users
with, almost unlimited freedom to create your photographic paintings
yourself, based on a library of bitmaps with an extensive range of
supporting creativity tools. We offer an exotic range of additional effects to
play with pattern, texture, shadow, color, shape and other effects that you
find in many bitmap editing software. Actually, we have combined the
basics of photo editing and painting with the possibilities of photo mosaic
creation.
4. Mosaically
24
-Upload the photo that you want made into the big picture.
25
-Upload all the smaller images you wish the mosaic to be made from you
can add up to 10,000 images and choose to upload photos from your
computer, the web, or Facebook.
-Generate your photo mosaic, adjusting the tile size and colorization to your
liking.
5. EasyMoza
26
your main image and all the smaller images youd like your mosaic to be
made of. If youd prefer, EasyMoza offers a library of 100 flower photos and
100 animal photos you can choose from. After your photos are uploaded,
the online tool will automatically crop and resize your images into squares.
EasyMoza recommends you use a minimum of 250 photos for your mosaic.
This is just a taste of the numerous free photo mosaic software options
available. Have you ever created a photo mosaic? If so, what program did
you use? Leave a comment to let us know
3- Summary
In this chapter we have presented the Technologies that the system Include
with details of each of them , and the similar and Related Systems .
27
Chapter Three
1-Overview
2-System Functional Requirements
3- Non-Functional Requirements
4-System Use-case Diagram
5-System Sequential Diagram
6-Summary
28
1-Overview
Systems analysis is the study of sets of interacting entities , including
computer systems analysis. This field is closely related to requirements
analysis or operations research. It is also "an explicit formal inquiry carried
out to help someone (referred to as the decision maker) identify a better
course of action and make a better decision than he might otherwise have
made."
In this chapter we will present ZOOME system analysis including
(Functional requirements, nonfunctional requirements, Use case diagrams
and Sequence diagrams).
System Functions :
the main Function of our Application is to create Moasic.
FN1 : Upload Master Image.
Browse to upload the Master Image which you need to make mosaic on it ,
the master image will be converted into BitMap Image to ease our
operation
29
3- Non-Functional Requirements
30
31
The specific exception will literally pause the loading while the .NET garbage
collector frees up memory after large IO operations.
- Additionally , you do not have to resize your tile images because the application
performs that automatically.
In order to minimize concurrent memory usage , the application will load , resize,
then re-save all the tile images to a defined cache folder because these files are
then re-loaded in their smaller tile size.
- The other feature that optimizes performance is the use of the LockBitmap class.
We use a Class Library from Link:
http://www.codeproject.com/Tips/240428/Work-with-bitmap-faster-with-Csharp
The LockBitmap class allows for extremely fast manipulation of pixels without
using unsafe code .
2-Maintainability
- The maintainability is the ability to maintain system bugs And issues with
less loss that doesnt affect the services or stop it.
3-Portability
The system now works as a Desktop Application, it can run at any
Operating system Support .NET Framework
- Future Phase will work as a Mobile Application that run at IOS ,
ANDRIOD and WINDOWS PHONE
Future Plan at Chapter Seven
4-Usability:
ZOOME don't need any experience because it have Simple User Interface
(UI) to make ease of use the application To use by anyone have experience
or Not .
32
5-Quality:
We achieved very good resolution whin the two modes tile Searching and
Hue Quality .
such that this resolution didnt reached in many applications which
generate mosaic photos and heres an example of the following photos:
33
34
35
the use case diagram and the overall use case in the development or
redesign of a software system or program. The use case analysis is the
foundation upon which the system will be built.
6-Summary
On this chapter we talked about ZOOME system analysis including system
functional and nonfunctional requirements, Use case analysis and sequence
38
39
Chapter Four
System Design
1-Overview
2-Class Diagram
3- Sequence Diagram
4-Activity Diagram
5-Architecture Diagram
6-Summary
40
1-Overview
Systems design is the process of defining the architecture , components ,
modules, interfaces , and data for a system to satisfy specified requirements
. Systems design could be seen as the application of systems theory to
product development. There is some overlap with the disciplines of systems
analysis, systems architecture and systems engineering.
2-Class Diagram
In software engineering, a class diagram in the Unified Modeling Language
(UML) is a type of static structure diagram that describes the structure of a
system by showing the system's classes, their attributes, operations (or
methods), and the relationships among the classes.
41
3- Sequence Diagram
A Sequence Diagrams in Unified Modeling Language (UML) is a kind of
interaction diagram that shows how processes operate with one another
and in what order. It is a construct of a Message Sequence Chart. The
following figures show the detailed process sequence between the system
users and the proposed system.
42
4-Activity Diagram
An activity diagram is represented by shapes that are connected by arrows.
Arrows run from activity start to completion and represent the sequential
order of performed activities. Black circles represent an initial workflow
state. A circled black circle indicates an end state. Rounded rectangles
represent performed actions, which are described by text inside each
rectangle.
43
5-State Diagram
is one of the five UML diagrams used to model dynamic nature of a system.
They define differentstates of an object during its lifetime. And these states
are changed by events. So State chart diagrams are useful to model reactive
systems. Reactive systems can be defined as a system that responds to
44
6-Summary
In this chapter, the design phase of the proposed Application .
45
First, the system components and interaction among them are described in
system architecture. The components interaction leads to define proposed
application processes and data. The proposed application processes are
described in Process Modeling section and data are described in Data
Modeling section. The processes modeling section describes the full
Sequence Diagrams of the system that describes the full interaction
between system and user. However, the class diagram describes the
proposed system processes as object oriented classes.
46
Chapter Five
System Implementation
FN1 : GenerateMoasic();
This is the function that mainly creates the mosaic .
1)Load Master Photo
2)spilt masterPhoto into grids with a given Height and width
3)call another function to get average
47
}
}
/// Notification
lblUpdate.Text = String.Format("Averaging
Master Bitmap...");
Application.DoEvents();
/// Average Master Image Phase
int tX = bMaster.Width / szTile.Width;
int tY = bMaster.Height / szTile.Height;
Color[,] avgsMaster = new Color[tX, tY];
/// Notification
pgbUpdate.Maximum = tX * tY;
pgbUpdate.Value = 0;
for (int x = 0; x < tX; x++)
{
for (int y = 0; y < tY; y++)
{
avgsMaster[x, y] =
GetTileAverage(bMaster, x * szTile.Width, y * szTile.Height,
szTile.Width, szTile.Height);
pgbUpdate.Value++;
Application.DoEvents();
}
}
/// Output Load Phase
bLoaded = false;
while (!bLoaded)
{
try
{
bOut = new LockBitmap(bMaster);
49
bLoaded = true;
}
catch (OutOfMemoryException)
{
GC.WaitForPendingFinalizers();
}
}
/// Close Master Image Phase
bMaster.Dispose();
bMaster = null;
/// Notification
lblUpdate.Text = String.Format("Loading and
Resizing Tile Images...");
Application.DoEvents();
/// Tile Load And Resize Phase
List<Tile> bTiles = new List<Tile>();
String errorFiles = String.Empty;
Bitmap bTile;
/// Notification
pgbUpdate.Maximum = fTiles.Count();
pgbUpdate.Value = 0;
for (int i = 0; i < fTiles.Count(); i++)
{
try
{
bTile =
(Bitmap)Bitmap.FromFile(fTiles[i]);
bTile = ResizeBitmap(bTile, szTile);
bTile.Save(fCache + "\\tile" +
i.ToString() + ".bmp");
bTile.Dispose();
50
pgbUpdate.Value++;
Application.DoEvents();
}
catch (ArgumentException e)
{
errorFiles += String.Format("{0}:
{1}\r\n", fTiles[i], e.Message);
}
catch (OutOfMemoryException)
{
GC.WaitForPendingFinalizers();
i--;
}
}
if (errorFiles.Length > 0) { throw new
Exception(errorFiles); }
/// Notification
lblUpdate.Text = String.Format("Reloading
Tiles...");
pgbUpdate.Maximum = fTiles.Count();
pgbUpdate.Value = 0;
Application.DoEvents();
/// Tile Reload Phase
for (int i = 0; i < fTiles.Count(); i++)
{
bTile = new Bitmap(fCache + "\\tile" +
i.ToString() + ".bmp");
bTiles.Add(new Tile(bTile,
Color.Black));
pgbUpdate.Value++;
Application.DoEvents();
}
51
/// Notification
lblUpdate.Text = String.Format("Averaging
Tiles...");
pgbUpdate.Maximum = bTiles.Count();
pgbUpdate.Value = 0;
Application.DoEvents();
/// Average Tile Images Phase
foreach (Tile t in bTiles)
{
t.setColor(GetTileAverage(t.getBitmap(),
0, 0, t.getBitmap().Width, t.getBitmap().Height));
pgbUpdate.Value++;
Application.DoEvents();
}
/// Iterative Replacement Phase / Search
Phase
if (bTiles.Count > 0)
{
/// Notification
lblUpdate.Text = String.Format("Applying
Search Pattern...");
pgbUpdate.Maximum = tX * tY;
pgbUpdate.Value = 0;
Application.DoEvents();
Random r = new Random();
if (bAdjustHue)
{
// Adjust hue - get the first
(random) tile found and adjust its colours
// to suit the average
List<Tile> tileQueue = new
List<Tile>();
Tile tFound = null;
52
tX; x++)
y < tY; y++)
0;
it's the same as
53
54
{
tFound =
bTiles[index];
Application.DoEvents();
}
else
{
searchCounter++;
if (searchCounter >=
bTiles.Count) { threshold += 5; }
Application.DoEvents();
}
}
// Apply found tile to
section
for (int w = 0; w <
szTile.Width; w++)
{
for (int h = 0; h <
szTile.Height; h++)
{
bOut.SetPixel(x *
szTile.Width + w, y * szTile.Height + h,
tFound.getBitmap().GetPixel(w, h));
Application.DoEvents();
}
}
// Increment the progress
bar
pgbUpdate.Value++;
}
}
}
55
}
// Close Files Phase
foreach (Tile t in bTiles)
{
t.Close();
}
/// Notification
lblUpdate.Text = String.Format("Job
Completed");
Application.DoEvents();
return bOut;
}
catch
{
throw;
}
}
FN2 : GetTileAverage();
Get Average Color of an Image RGB Average
public static Color GetTileAverage(Bitmap bSource, int x, int y, int width, int height)
{
long aR = 0;
long aG = 0;
long aB = 0;
for (int w = x; w < x + width; w++)
{
for (int h = y; h < y + height; h++)
{
Color cP = bSource.GetPixel(w, h);
aR += cP.R;
56
aG += cP.G;
aB += cP.B;
}
}
aR = aR / (width * height);
aG = aG / (width * height);
aB = aB / (width * height);
return Color.FromArgb(255, Convert.ToInt32(aR), Convert.ToInt32(aG),
Convert.ToInt32(aB));
}
FN3 : GetDifference();
Get Difference between tiles and grids by comparing two colors
to operate Tiling search Algorithm
public static int GetDifference(Color source, Color target)
{
int dR = Math.Abs(source.R - target.R);
int dG = Math.Abs(source.G - target.G);
int dB = Math.Abs(source.B - target.B);
int diff = Math.Max(dR, dG);
diff = Math.Max(diff, dB);
return diff;
}
FN4 : AdjustHue();
Set RGB Effects On the Random tiles to Get the best Quality .
57
FN5 : ResizeBitmap();
Resize the tiles with a given height and width and save it in your
PC to Save memory
{
Bitmap result = new Bitmap(newSize.Width,
newSize.Height);
using (Graphics g = Graphics.FromImage(result))
{
g.DrawImage(bSource, 0, 0, newSize.Width,
newSize.Height);
g.Dispose();
}
return result;
}
}
59
Chapter Six
System Testing
1-Overview
2-Scinarios and test Cases
4-Summary
1-Overview
System testing of software or hardware is testing conducted on a
complete, integrated system to evaluate the system's compliance with
its specified requirements. System testing falls within the scope of black
60
box testing, and as such, should require no knowledge of the inner design
of the code or logic.We will present on this chapter some test cases and
scenarios of use
After the user sees welcome page , he will press on the logo to navigate to
the main screen in which he will use the application.
61
This is the look of the application before using (its very simple and its UI is
simple for the user to understand and use
Then the user will follow the following steps as follows :
1)Choose master photo
62
63
64
Browse for the destination we would save our app small tiles for
database management
65
66
67
68
4-Summary
This chapter presented test cases and some possible scenarios of use.
After the test cases that are presented, the proposed system is verified
to work properly according to the end user needs and actions provided in
system requirement chapter 3
69
Chapter Seven
1-Conclustion
2-Future Work
3- Glossary
70
1-Conclusion
Xoome is a powerful system in the field of image processing, that lets
you create a photo consists of many small photos via
some algorithms and functions to save the quality. This software is
developed to run on PCs as we using the huge amount of processing
comparing it with the small processing of mobiles and tablets.
We have discussed in chapter one what are the functionalities that our
system perform. But we will not stop at this point anymore. We have our
plans to continue it in the future. We have designed this software to be a
commercial product. By applying our market research we found that,
people are very fond of taking photos. So our project will target some
segments. Lets see
71
2-Future Work
Our Project
Touristic
village
Supermarket
Offers
New Cities
Weddings
Internationa
l Schools
New Malls
Educational
programs
Virtual
Tour
72
73
2- New cities :
are almost like Tourist Villages in addition to we can create this very
big photo and put it up of street bridges. By narrowing from it you will
see the change of the big photo and the consist of it will be shown step
by step.
74
75
3-Weddings :
Now we see the millions of weddings and every day brides and grooms
need amazing ideas to have a unique wedding. So our plan is to create a
large mosaic on the front of the hall this mosaic is a photo of bride and
groom and when you get zooming in it you will see some memories of them
together, their childhood, their friends, etc.
76
4-Supermarket offers:
Now the big supermarkets like Carrefour, Spinneys and so on make offers
like you can by 10 chocolates by 20 LE or you can pay it and have 10 Bags of
Chipsy. And more and more of those offers which can be represented by
photo of 20 ponds and when you zooming in it you can see the offer
packages.
77
5- International Schools:
these schools can attract the parents by uploading some of their photos
combined together in one photo by our project to facilitate the process of
choosing a suitable school for their children.
78
79
6- Educational programs :
people can use our system in education field by making a photo of a letter
and when you zooming in it you can see the objects which start with this
letter.
80
7-New Malls :
everyday new places are explored and set in them new malls but you have
to make a wonderful idea to distinguish between your mall and the others
malls which are located in your city. People always love creative ideas and
searching for the latest marketing ideas. By applying the idea of tourist
81
82
8-Instgram update:
We will contact Instagram and Facebook owners and make our software is
a built in feature in them.
83
And , finally Our plan will be extended to reach Virtual tours but this we
have no idea about it now and make sure we will rock .
ZOOME
3-Glossary
Activity Class: in Android, a class takes care of creating a window for you
in which you can place your While activities are often presented to the user
as full-screen windows.
Class Diagram : a type of static structure diagram that describes the
structure of a system by showing the system's classes, their attributes,
operations(or)methods and the relationships between the classes.
Framework : reusable set of libraries or classes for a software system.
Functional Requirements: defines a function of a software system or its
component. A function is described as a set of inputs, the behavior and
outputs.
Global Positioning System: a space-based global navigation satellite
system (GNSS) that provides location and time information in all weather,
anywhere on or near the Earth. of arrival at a destination.
Non-Functional Requirements: a requirement that specifies criteria
that can be used to judge the operation of a system, rather than specific
behaviors.
84
85