<< Chapter < Page Chapter >> Page >

Replacement

Once all of the cups have been identified the replacement process begins by breaking up the area surrounding each cup into small boxes and examining each one individually. We then cycle through a bank of re-sized possible replacement images, breaking the corresponding area into the same sized chunks.  We calculate the cross correlation between each box, giving us an idea as to how well the replacement image matches the area surrounding the cup in the actual picture.  In order for the final product to look cohesive, the replacement image needs to “fit” the area surrounding the hole left by the cup.  The correlation between the cup itself and the object in the replacement image are inconsequential because the object will completely replace the cup after the replacement. Thus, only the correlation of the surrounding areas determine the selection of our replacement image.

The correlation of each pair of boxes is calculated in the same way as in the identification process, by taking the sum of products of each pixel. Once every pair of boxes has had its correlation calculated, the best match in the replacement bank is determined, and is placed in the position the detected red cup occupies. The best match does not necessarily have the most boxes with the highest correlation, or have the highest total correlation. Instead, some boxes are given a greater weight based on results from running an edge detector on each box. If the box contains more edges, it is given a greater weight. This is because it is most important to match edges when replacing the red solo cup, particularly hands. It is more obvious when edges do not match, and therefore edges are given a higher priority when selecting a replacement image. The replacement bank contains pictures of objects being held in hands in different orientations, so this methodology of weighting the boxes differently should lead to the most visually pleasing replacement possible.

The surrounding areas whose correlation was calculated are blurred and combined with the area surrounding the hole using a simple linear intensity blend to further facilitate blending of the replacement image with the image being filtered.

Questions & Answers

what is biology
Hajah Reply
the study of living organisms and their interactions with one another and their environments
AI-Robot
what is biology
Victoria Reply
HOW CAN MAN ORGAN FUNCTION
Alfred Reply
the diagram of the digestive system
Assiatu Reply
allimentary cannel
Ogenrwot
How does twins formed
William Reply
They formed in two ways first when one sperm and one egg are splited by mitosis or two sperm and two eggs join together
Oluwatobi
what is genetics
Josephine Reply
Genetics is the study of heredity
Misack
how does twins formed?
Misack
What is manual
Hassan Reply
discuss biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles
Joseph Reply
what is biology
Yousuf Reply
the study of living organisms and their interactions with one another and their environment.
Wine
discuss the biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles in an essay form
Joseph Reply
what is the blood cells
Shaker Reply
list any five characteristics of the blood cells
Shaker
lack electricity and its more savely than electronic microscope because its naturally by using of light
Abdullahi Reply
advantage of electronic microscope is easily and clearly while disadvantage is dangerous because its electronic. advantage of light microscope is savely and naturally by sun while disadvantage is not easily,means its not sharp and not clear
Abdullahi
cell theory state that every organisms composed of one or more cell,cell is the basic unit of life
Abdullahi
is like gone fail us
DENG
cells is the basic structure and functions of all living things
Ramadan
What is classification
ISCONT Reply
is organisms that are similar into groups called tara
Yamosa
in what situation (s) would be the use of a scanning electron microscope be ideal and why?
Kenna Reply
A scanning electron microscope (SEM) is ideal for situations requiring high-resolution imaging of surfaces. It is commonly used in materials science, biology, and geology to examine the topography and composition of samples at a nanoscale level. SEM is particularly useful for studying fine details,
Hilary
cell is the building block of life.
Condoleezza Reply
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Red cup replacement. OpenStax CNX. Dec 19, 2011 Download for free at http://cnx.org/content/col11390/1.1
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Red cup replacement' conversation and receive update notifications?

Ask