INF 1040 – Digital Representation – 2006 Compulsory work 3 Formalities

advertisement
INF 1040 – Digital Representation – 2006
Compulsory work 3
Out: Friday 3. November 2006, 12:00 hrs
Due: Friday 17. November 2006, 23:59:59 hrs
Formalities
•
•
•
•
The answer should be a text document containing the necessary illustrations.
The document should be converted into a pdf file.
Append your answer in an e-mail, and send it to your group teacher within the
date and time given above.
The subject field of the e-mail should read INF1040 – Oblig3.
To create a pdf file, you may first create a postscript file with the print command (but
route the output to a file instead of a printer) and then run the program distill on the
postscript file. Here an example:
print –o <outfile.ps> <infile.txt>
distill <outfile.ps> (genererer outfil.pdf)
The work may be done in small groups of up to 2 students. Students in the same group
are allowed to deliver identical solutions, but in that case, the collaboration should be
clearly stated on the front page of the document. This page should also contain the
following clause:
“I/we have read and understood the rules given in the document
”Departemental guidelines for written assignments” on
http://www.ifi.uio.no/studinf/skjemaer/declaration.pdf .”
You may find a lot of background material on the Internet. You may also use material
from the lecture foils and from the course book. Remember to include references
whenever you quote or build on material published on the Internet or in print. Good and
exact references will be evaluated positively. On the other side: Using other peoples
material without giving the source is dishonest and in serious cases a crime, and may in
connection with work that contributes to a mark be considered as cheating!
A group of students should send only one file, in that case the username coming first in
an alphabetical sequence should be used. If the students belong to two different exercisegroups, the file should be sent to the group-teacher who is responsible for the student
whose username is the first in an alphabetical sequence, whereas the other student sends
an e-mail to his group-teacher telling that the answers has been delivered, giving the
username of the first student.
Ask the group-teacher for help if you have any problems!
Introduction
Multimedia presentation for amateur masons
We are going to do some reasoning around the production of multimedia presentations
that illustrate different bricklaying patterns for amateur masons. Bricks are laid down in
patterns, often by a horizontal displacement and/or rotation between adjacent layers
(shifts). For each pattern there is a simple set of elementary rules that form the pattern. A
survey of different bricklaying patterns and the terminology used in this context may be
found at
http://www.murkatalogen.no/wip4/ekstranet/detail.epl?cat=1349&id=31981.
For an illustration of how different bricklaying
patterns together with the choice of stone color can
give different effects, see the demonstration web at
http://www.acmebrick.com/md/index.htm
To-skifts munkeforband
Sålen ligger klar…
Such a multimedia presentation is supposed to
show how the brick wall is built up by a brick
having the proper size coming in at the top left
corner of the image and coming to rest in its proper
place. Large stones are 20 cm long, small ones 10
cm, and all stones are 10 cm high. It must be
possible to choose between 15 different colors for
each stone. Instructive subtitles are to be put in
proper places within the presentation.
You may see an example of such a demonstration
at
Koppen er lagt. Nå kommer en løper
http://www.ifi.uio.no/~inf1040/oppgaver20
06/muranimasjon.pps. The presentation can be
shown using Powerpoint under Windows (with
sound) or using OpenOffice under Linux (without
sound)
(use the command ooffice muranimasjon.pps &
after copying the file to your home area).
The presentation can be found as separate images at
Etter to løpere kommer en kopp
http://www.ifi.uio.no/~inf1040/oppgaver20
06/muranimasjon.pdf.
The figure to the left sketches three selected images
with their subtitles.
NB! You are NOT supposed to produce a multimedia presentation, just find out how
much storage space an animation would require, in addition to answering some questions
regarding imaging of a brick wall.
Task 1: A digital video for amateur masons
Assume that we are going to use a slightly hypothetic digital RGB mobile camera to
produce a digital instruction video to visualize the laying of a two-shift brick wall as
illustrated on the previous page.
The camera has a field of view of 32 ×24 degrees (horizontal × vertical), and there are
640 × 480 detectors in the focal plane.
a) Assume that we place the camera at such a distance from the wall that a small stone is
seen under an angle of 1/3 degree. A lens having focal length f = 4 mm is used, and
the wavelength of the light is 476.866 nanometers. We want to exploit the camera up
to the Rayleigh resolution criterion, so that we barely can see the smallest stones.
To what diameter may we then stop down the lens?
b) Assume that are oversampling the image in the focal plane by a factor of 5 compared
to the shortest period that can de found horizontally or vertically within the structure
of the image. We disregard the mortar lining between the bricks, and assume that
neighboring stones do not have the same color.
At what distance (given in meters) from the wall can we then place the camera lens?
(Hint: the trigonometric function tangent of an angle has been used in section 13.2.5 of
the textbook, and is described in Appendix A.7.)
c) What do we achieve by using a pixel size corresponding to 5 times oversampling
instead of say 2 times oversampling?
d) How many KiB do we get per image from a 24 bits RGB camera having the given
number of piksels, without any sort of compression of the image?
e) What percentage of error do we get if we assume that the quoted image size is given
using units of 103 , and not 210 ?
f) We want to transmit and store these images by transforming them from RGB to the
IHS color space, and then store the chromaticity components with a halved geometric
resolution, by averaging two and two pixel values horizontally and vertically (similar
to the 4:2:0 subsampling that you find in the bottom right hand figure on page 246 of
the textbook).
i. Explain how this will influence the storage space requirements for each of
the IHS components as compared to the RGB components in the original
image.
ii. How much is the storage space reduced compared to the original RGB
image.
g) How many kB do we get per image, given the reduced geometrical resolution in H and
S, if we use 6 bits for I, 7 bits for H, and 5 bits for S?
h) The brick wall may contain 15 different brick colors, and a gray mortar color. So we
do not have a sufficiently high number of different colors to justify using 24 bits per
pixel.
i. Explain how you may use color tables for IHS (without the reduced resolution in
H and S) to reduce the storage space needed for each image.
ii. What is the reduction in storage space compared to what you found in question d),
if you disregard the storage space occupied by the lookup table?
Task 2:
A digital multimedia presentation for amateur masons
We are now going to estimate the storage requirements for a multimedia presentation
based on a vector representation.
Please note that you are NOT asked to create the multimedia presentation.
You are just asked to describe a possible representation and calculate the storage
requirements - under certain assumptions.
We will assume that pictures, sound and subtitles are stored on separate files, without use
of any of the compression techniques presented in Chapter 18 of the textbook. Integrated
in these files are stored the points in time (measured from the beginning of the
presentation) when pictures an texts should be displayed. Further we assume that there
exists a presentation program that is able to read the data from these files and play the
multimedia presentation on a suitable medium like a PC, a PDA or a mobile phone. In
addition, you may make you own reasonable assumptions about the capabilities of this
program. None of the presentation media have resolutions better than 1280 × 1024 pixels.
a) Propose a vector representation for one single brick placed in a certain position on the
screen with a certain angle to the x-axis, and calculate the storage requirement for this
representation.
b) Propose a representation for the movement of this brick from one position on the
screen to another, and calculate the storage requirement for this representation. You
may assume that the presentation program can move and rotate the stone based solely
on information about its start and end position.
c) Propose a vector representation for the image of a finished brick wall containing 100
stones, and calculate the storage requirement for this representation.
d) The subtitles should be stored in an XML-format. In the presentation, it should be
possible to select one out of five languages. We estimate that 10 % of the characters
are outside the ASCII character set. Propose a representation and calculate the storage
requirement for this representation, based on an estimate of how many and how long
subtitles are needed.
e) Estimate the total storage requirement for such a multimedia presentation of one
minute duration.
i. Estimate the total storage space required for a soundtrack having CD quality.
ii. Assume that we want to save some storage space by using a “state-of-the-art”
sound compression. In addition, we feel that mono sound is sufficient. We
therefore choose mono MP3 at 64 kbits/s.
Estimate the reduced storage space requirement of this sound representation.
What compression factor do we achieve?
f) Estimate the total storage space required for the whole multimedia presentation.
Remember to state clearly the assumptions behind your estimates.
There is of course no definite right answer on this estimate of the total storage space
required – it depends on the assumptions you make and the solutions you choose. The
magnitude of the values that you end up with is therefore without significance for the
evaluation of your work – it is how you arrive at the value that counts.
Good luck!
03.11.2006 GS og FA
Download