ECE516 Lab01, 2022: What is a camera? Fundamentals of Intelligent Image Processing.
This lab teaches, in the most fundamental way, the first and foremost
element of imaging: what a camera is.
This lab will be done individually. Each person in the class does this lab.
Subsequent labs might be done with lab partners, depending on how the pandemic
This first lab will also help
you remotely get to know others in the course and what they are capable of.
Think of this lab as a chance to show off to the rest of the class and
build possible connections, e.g. in anticipation of getting past the pandemic
The word "camera" is an abbreviation of the Latin term "camera obscura"
which means "darkroom". "Camera" is Latin for "room",
and "obscura" is Latin for "dark".
Early cameras were large darkrooms and people would go inside the
camera to see the picture:
Pictures, Wikimedia Commons; article: Camera Obscura
Sometimes people would setup or build a tent or other struture and put a blank
framed canvas inside to make a painting of what appeared there.
You might enjoy watching this video:
Camera obscura on a houseboat https://www.youtube.com/watch?v=nye6iEMv33M
Let's get started
In this lab you will experiment with the camera obscura principle.
In the first part of the lab
you will build 2 cameras, a large on and a small one, and experiment with
various aperture sizes and note the effects of aperture size versus camera
size on the sharpness and light qualities in the camera.
In the second part of the lab you will try to understand the mathematical
principles behind this very simple form of imaging.
Lab 1 Part A
Build a large camera obscura and a small one.
For the large one you can use a room in your house, or a nice large box
that you can look into easily, e.g. ideally big enough to put your head into.
For the small camera build something into
which you can fit a smartphone or a smartphone lens to take a picture of a
picture in the camera. In both cases you are taking a picture of a picture.
This is called metadocumentary, metaphotography, or metavision, or
Through The Viewfinder (TTV) photography.
Meta is a Greek word that means "beyond", e.g. a meta-conversation is a
conversation about conversations, or a meta-argument is an argument about
arguments. Meta-data is data about data, e.g. the GPS location in which a
photograph was taken embedded into the header of a JPEG photo.
Meta is also the name of the Silicon Valley
company founded by Mann and some of his students
such as Raymond Lo, along with Meron Gribetz,
based on the technology of
US Patent 9,720,505, "Extramissive spatial imaging digital eye glass...", Gribetz; Meron (New York, NY), Mann; W. Steve G. (Toronto, CA) , filed January 3rd, 2014, and
US Patent and Trademark Office, Patent Application 61/748,468, Jan 3, 2013.
A room with a small window that has a good view works really well.
A small window is easy to cover up with black cardboard or black cloth
or the like. For example you can cut a piece of cardboard to fit tightly into
a small window to make the room dark. The room should be completely dark except
for a small hole through which light enters to create the picture on an opposite
wall or other surface. Experiment with different sized holes and note the
A black cloth can be stuffed under the
crack in the door to the room to keep it dark.
When choosing a room, it is best to have a
view to a brighly lit place that has high contrast subject matter. I chose
a darkroom with a covered skylight, having a view of a tree.
That didn't turn out too good, so I then chose
a small wood storage
room that faced North so the sun was behind the camera, shining
brightly on the subject matter to be photographed, which was a nice group
of laneway houses. Sitting inside the room I could clearly see the image
of the laneway houses on the screen. I used a white board for the screen,
but imperfections made the image kind of unclear, so I later covered the board
in white paper to get a better image.
I used my smartphone (Huawei P30 Pro) to take the picture of the white board.
I used a 30 second exposure at ISO 3200. If you have
a tripod that helps, or you can press and hold the picture-taking
camera such as a smartphone firmly against a desk or opposite wall or other
structure so it stays perfectly still for the duration of the exposure
(e.g. in my case, for the 30 seconds).
Try various size openings from the whole window, to half window, quarter window, etc., and keep decreasing the size of the opening. This will help you understand the principle.
No need to paint the walls black.| It works better if you have dark walls but try whatever is simplest first. You can try some black cardboard or black cloth
on some of the walls to make the image a bit more crisp and contrasty,
but start with whatever you can readily do with what you have handy.
If you don't have a room with a window that faces a bright scene,
you can use a large box. I didn't have a box big enough for me to fit
inside, so I found one that was big enough I could put my head inside the box,
which still gave me the full "camera obscura" effect of being able to see the
image. If you don't have a really big box handy, you could use a medium-sized
box and cut 2 large holes for your eyes to look into, and of course a small
hole for the pinhole.
Now that you have made a large pinhole camera, make a small pinhole camera.
For this I used a small box with a pinhole for the aperture and a larger hole
to photograph the camera obscura's screen through.
Optimal pinhole size
Explain what you noticed about the large camera versus the small camera.
What size pinhole works best for the large camera? What size pinhole works
best for the small camera?
The optimal pinhole size is based on a tradeoff between classical optics
(i.e. that light travels in straight lines) and modern optics (diffraction
effects). Classical optics would have that a smaller hole gives a sharper
image. So a big window makes a really fuzzy image, but blacking out most of
the window except for a small hole makes a sharper image.
it is well-known that the far-field diffraction pattern is the Fourier transform
of the electric field across the aperture. So when you make the aperture
smaller the diffraction pattern gets bigger.
Take a look at this for example from Lecture 1:
As you can see there is a kind of reversed effect: at some point a smaller
hole gives you a fuzzier image.
A great deal of research has been done regarding the optimum aperture size.
Here's the general formula for diameter of the aperture:
d = optimal hole (aperture) diameter;
f = focal length (distance from aperture to image plane);
λ= wavelength o
light, e.g. pick something around the middle of the range of
human vision such as green = 550nm (which is also the wavelength to which
human vision is most sensitive), or to which your sensor or film is most
c = a constant related to the Rayleigh criterion 1.22λ/d
(with some adjustment for other factors).
We usually use something in the range from c=1.56 to c=2.
So if your screen is 50cm from the aperture, the it should be about 1mm
in diameter. If the screen is
1 metre from the aperture, it should be about
1.5mm in diameter, and if 2 metres away, 2mm in diameter, 4 metres away,
3mm in diameter, and so on.
Reference reseach citations regarding calculation of optimal pinhole size
Professor Petzval, in 1859
proposed c = sqrt(2).
In 1891 Lord Rayleigh confirmed this value c=sqrt(2)
but later published a 2nd paper
suggesting that c should be between sqrt(2) and 2.
More recently it has been suggested that the size of hole should optimize not
just sharpness but also contrast, i.e. containment of stray light,
and this paper proposed the optimum constant to be 1.56:
We often use something in the range c=1.5 to c=2.
Making a small box camera (Part Aii)
There are 2 basic designs, either you can have your screen viewed from the
same side as the image, or from the opposite side.
Use a small box or other housing and put a viewfinder display screen at one end
and a hole or a lens at the other end to let light in.
Ideally you'll make your box black.
You can use black cardboard to make the box, or you can line it with black
cardboard, or paint it black.
Be prepared to explain why it should be black (at least on the inside),
except for the opening and the screen.
Part B: Mathematical analysis
Explain what a camera does.
Derive a mathematical relationship between planar subject matter and
what is projected onto the camera image plane. For simplicity you may assume
you're living in a 2-dimensional world and the image and subject matter are
both 1-dimensional. Draw simple diagrams that show you understand what a
camera is and what it does.
- Design and build a large pinhole camera, and take pictures of it and with it, 3/10;
- Design and build a small pinhole camera, and take pictures of it and with it, 2/10;
- Is it better to have a large camera, i.e. does large-format pinhole photography
produce better pictures, and if so, why? 2/10;
- Provide a mathematical formulation in regards to a simple ideal pinhole
camera model; 3/10.
- If you like, it is possible to get more than 10/10 on the lab.
Bonus marks if you do something really fun and cool. Feel free to show off;
maybe something like
actually using photographic film or photographic paper to take a picture,
or maybe building a camera with a lens and explaining the advantages of using
a lens, in regards to diffraction theory, or the like.
Meta photography (meta-documntary), also known as
"Through the Viewfinder photography":
[Leonardo, Vol. 31, No. 2, pp. 93-102, 1998]
Flickr, "Through the Viewfinder":
Through the viewfinder howto: