Cameras
Computer+Vision
Prof.&Flávio&Cardeal&– DECOM&/&CEFET7MG
cardeal@decom.cefetmg.br&
Computer+Vision Cameras Prof.&Flvio&Cardeal& - - PowerPoint PPT Presentation
Computer+Vision Cameras Prof.&Flvio&Cardeal& DECOM&/&CEFET7MG cardeal@decom.cefetmg.br& Abstract This lecture discusses features of cameras that help you to decide which camera should be used in your research
Prof.&Flávio&Cardeal&– DECOM&/&CEFET7MG
cardeal@decom.cefetmg.br&
2
world into images, we need to understand the geometry and photometry of the used cameras.
models for a single camera or a stereo?camera system, to be eventually used in our applications.
3
sensors for recording a projected image.
array of sensor elements, named phototransistors, which capture photons and convert them to electrons.
CMOS technology.
4
CMOS is short for Complementary Metal Oxide
5
CCDESensor CMOSESensor
TheEindividualEcellsE areEsoEtinyEthatEtheyE cannotEbeEseenE here,EevenEafterE zoomingEin.
to CMOS because of their quality.
higher dynamic range and higher resolution.
power dissipationK cost more to manufacture.
6
AEsceneE demandingE highEdynamicE range.
improvements in quality.
are approaching those of CCDs.
requirements and higher integration potential.
7
quality digital cameras.
8
requiring high?quality cameras.
9
Analysis of a car crash test based
high?resolution images captured at 1,000 fps.
Source:&R.&Klette
vision cameras are typically permanently connected to a computer (via a video port or a frame grabber).
camera control (e.g., for time synchronization, panning, tilting, or zooming).
10
Panning Tilting
recording still images or video data.
resolution is typically a constant.
4,320 (i.e. 33 Mpx) at 60 fps, records 1.99 Gpx (Gigapixels) per second.
11
the odd or the even lines of the image sensor.
video frame captured at two different times.
be displayed, and then with the second field, the even lines of that image would be shown.
12
13 Source:&http://t3rfde.com/hdtv/
Odd Lines – Field 1 1/60th sec Even Lines – Field 2 1/60th sec Fields 1+2 = Frame 1/30th sec
Interlaced Scan
capable of showing the individual fields in a sequential order.
such that a human eye cannot perceive that there is always a blank field of rows in the screen.
14
become blurry when they are paused.
interlaced (e.g., 480i or 1080i video sources).
video source uses to reproduce the video.
15
consecutively displayed video frames that contain all the horizontal lines of the image being shown.
motion sequences are sharper.
provides an appropriate input for video analysis.
16
17 Source:&http://t3rfde.com/hdtv/
All lines scanned in a single sweep Frame 1/30th sec
Progressive Scan
confusion, partly because there are different types of aspect ratio, not just one.
Aspect Ratio (DAR) or image aspect ratio.
display frame, the aspect ratio of what we see.
18
colon, as in 16:9 (width always comes first).
screen).
width, diagonal, or area.
19
20
Comparison of crops of a given image at 4:3 and 16:9, with different parameters equal.
Same diagonal size Same height Same area (number of pixels)
Source:&A.&Hornig
21
Aspect Ratio (PAR), and the aspect ratio of the stored data named Storage Aspect Ratio (SAR).
particular frame size and aspect ratio, the SAR.
is a matter of scaling it to the correct size.
22
showing video stored with a frame size of 1280 x 720 pixels. Both have the same aspect ratio.
aspect ratio SAR that does not match the display.
distorting the SAR to make it match the DAR.
23
showing video stored with a frame size of 720 x 480 pixels.
does not match the 16:9 display.
24
latter situation is
referred to as anamorphic video.
aspect ratio, the Pixel Aspect Ratio (PAR).
ratios is DAR = PAR x SAR.
25
the smallest single component of a digital image.
in a page, photosensor elements in a digital camera or pixels on a display device.
26
considered to be square (i.e. width = height).
= SAR. If pixels are non?square, then the PAR is not 1:1 and acts as a correction factor.
is 3:2, then PAR is 32:27.
27
rectangular cell (e.g. and are about 2 μm each).
shouldEbeEequalEtoE1E(i.e.EsquareEcells).
28
sensorEelements)EisEspecifiedEinEMegapixels (Mpx).E
pixels for a 2272 x 1704 (4:3) image resolution.
means “color pixels”. Observation: a large number
29
sensor area per pixel, thus less light per sensor area and a worse signal?to?noise ratio (SNR).
than just 8 bits per pixel value in one channel.
in a grey?level image when doing stereo analysis.
30
to record an image.
31
SensorEMatrixEorE CavityEArray
Source:&http://www.cambridgeincolour.com
and the exposure begins, each of these is uncovered to collect and store photons.
32
PhototransistorsEorE LightECavities
Source:&http://www.cambridgeincolour.com
each of these phototransistors, and then tries to assess how many photons fell into each.
then sorted into various intensity levels.
255 for an 8?bit image).
33
scale images, since these cavities are unable to distinguish how much they have of each color.
images?
Bayer pattern or Bayer filter mosaic.
34
arranging RGB color filters on the square grid of
35 Source:&R.&Klette
ItEisEplacedEoverEeachEcavityEthatE permitsEonlyEparticularEcolorsEofElight.
in most current single?chip digital image sensors.
and 25% blue.
blue to mimic the physiology of the human eye, which is most sensitive to green light.
36
color, the data from each cavity cannot fully specify each of the red, green, and blue values.
algorithms can be used to interpolate a set of red, green, and blue values for each pixel.
37
an exact measurement of the green component.
interpolate its red value. Also two blue neighbors can be interpolated to yield the its blue value.
38 Source:&R.&Klette
39
WhatEtheEcameraEseesE (throughEaEBayerEfilter). FullEcolorE image.
evaluated by using a color checker.
different grey?levels or color values.
40 Source:&R.&Klette
such a chart, under diffuse illumination (to reduce the impact of lighting on color appearance).
acquired image. For instance, the red one.
41 Source:&R.&Klette
then three histograms) should describe a “thin peak” for a camera with high color accuracy.
42 Source:&R.&Klette
deforms and bends physically straight lines and makes them appear curvy in images.
design of the lens.
generally exhibit greater amounts of distortion.
43
distortion simply misplaces information geometrically and can be calculated or mapped
distortion and pincushion distortion.
before, let’s see a lens with zero distortion.
44
45 Source:&https://photographylife.com
SuchE“perfect”ElensesE areEveryErare.
are radially symmetric, or approximately so, they are also called radial distortions.
shape of a barrel, this type of aberration is called barrel distortion.
46
47 Source:&https://photographylife.com
StraightElinesEareE visiblyEcurvedEinwards.
lenses (informally: short?focal?length lenses).
much wider than the size of the image sensor and hence it needs to be “squeezed” to fit.
barrel distortion is usually a pretty straightforward process.
48
49
BarrelEdistortionE causedEbyEtheEusageE
barrel distortion, that is, straight lines are curved
is commonly seen
telephoto lenses (informally: long?focal?length lenses).
sensor’s size and it needs to be “stretched” to fit.
50
51 Source:&https://photographylife.com
StraightElinesEareE visiblyEcurvedE
52
PincushionEdistortionE causedEbyEtheEusageE
Source:&S.&Rutherford&/&Tom’s&guide&
small hole can be described by the theoretical model of a pinhole camera.
assumed to be “very close” to zero.
pinholes and long exposure times.
53
54 Source:&https://www.youtube.com/watch?v=0Bx8P4EvYLA
pinhole camera.
55
TheEmodelEcontainsEanE imageEplaneEofEwidthEW andEviewingEangleEα.
=Epinhole
ForEavoidingEtop?downE reversedEimages,EtheE projectionEcenterEisEbehindE theEimageEplane.
Source:&R.&Klette
camera coordinate system comes from sensor.
data in the 3D world. A laser range?finder or radar are other examples of sensors.
?axis points into the world, called the optic axis.
56
pinhole camera.
57
=Epinhole
Source:&R.&Klette
distortion, we have undistorted projected points in the image plane with coordinates and .
between the image plane and the projection center is the focal length. An ideal pinhole camera has a viewing angle of:
58
α = 2arctan W 2f
59
W 2 W 2
α1 α2
ProjectionECenter ImageEPlane
tanα1 = W 2 f tanα2 = W 2 f α1 = arctan W 2 f α2 = arctan W 2 f α =α1 +α2 = 2⋅arctan W 2 f
mm and mm, the horizontal viewing angle equals about .
wave nature of light by assuming ideal geometric rays.
60
also assumes that
are in focus, whatever their distance is to the camera.
cameraEcoordinateEsystemEcanEbeE usedEforErepresentingEanyEpointEinEtheE3DEworld.E
mappedEbyEtheEcentralEprojectionEintoEaEpixelE locationE inEtheEimageEplane.
61
62 Source:&R.&Klette
P =[ Xs Ys Zs ]T
p =[ xu yu ]T
that to (of point ) is the same as (of pixel location ) to (of point ).
plane. Thus, we have that:
63
xu = f Xs Zs and yu = f Ys Zs
intersects the image plane somewhere close to its center.
64 Source:&R.&Klette
image coordinate system we have the coordinate origin in the upper left corner of the image.
close to the image center, as it occurs for the image coordinates.
65
beEtheEintersectionEpointEofEtheE
coordinates.
is called the principal point in the image plane, and it is determined by camera calibration. It follows that:
66
[ x y ]T =[ xu +cx yu +cy ]T =[ f ⋅ Xs Zs +cx f ⋅Ys Zs +cy ]T
67
ImageEPlane
(0,0)
c =[ cx cy ]T pu =[ xu yu ]T p = c+ pu =[ x y ]T =[ cx + xu cy + yu ]T
TheEpixelElocationEE inEourE 2DE imageEcoordin.EsystemE alsoEhasEtheE3DEcoordinatesEEE inEtheEEE cameraEcoordinateEsystem.E
xy
XsYsZs
[ x y ]T
[ x −cx y −cy f ]T
is convenient to use more than just one camera.
cameras is commonly called Stereo Vision.
vision application, then they should be as identical as possible for avoiding unnecessary difficulties.
68
identical copies of the same camera.
is the translational distance between the projection centers of two cameras.
69
A stereo camera rig on a suction pad with base distance b.
Source:&R.&Klette
forward?looking integrated stereo camera system has a base distance of 110 mm.
70
Forward?lookingE stereoEcameraEsystem.
Source:&R.&Klette
cameras perfectly aligned as illustrated below.
71 Source:&R.&Klette
P =[ Xs Ys Zs ]T
pinhole camera.
characterized by a copy of the camera on the left translated by the distance .
?axis of the camera coordinate system of the left camera.
72
and the projection center of the cloned right camera is at . In other words, we have:
Two coplanar images of identical size K Parallel optic axesK An identical focal length K Collinear image rows.
73
(0,0,0) (b,0,0) Ncols × Nrows f
for both cameras.
inE theEEEEEEEEEEEEcoordinateEsystemEofEtheEleftEcameraEisE mappedEintoEundistortedEimageEpoints:
74
puL =[ xuL yuL ]T =[ f ⋅ Xs Zs f ⋅Ys Zs ]T puR =[ xuR yuR ]T =[ f ⋅(Xs − b) Zs f ⋅Ys Zs ]T
75
xuL Xs = f Zs ⇒ xuL = f ⋅ Xs Zs
f
puL =[ xuL yuL ]T
b
f
puR =[ xuR yuR ]T
Xs Zs
xuR Xs − b = f Zs ⇒ xuR = f ⋅(Xs − b) Zs
yuL = yuR = f ⋅Ys Zs
P =[ Xs Ys Zs ]T
andE forEbeingEableEtoEuseEtheEequationsEbelowE whenEdoingEstereoEvision.
76
puL =[ xuL yuL ]T =[ f ⋅ Xs Zs f ⋅Ys Zs ]T puR =[ xuR yuR ]T =[ f ⋅(Xs − b) Zs f ⋅Ys Zs ]T
applied in several different areas.
wide?angle image in one shot or are designed for recording multiple images.
combined into one wide?angle image.
77
panoramic imaging sensor technology.
horizontal plane, or a visual field that covers a hemisphere or (approximately) the entire sphere.
field coverage is needed, such as robotics.
78
79
AEfish?eyeE camera. AEdigitalEcameraEwithE aEhyperboloidal? shapedEmirror
Source:&R.&Klette
80
WithEaE singleEmirrorE atEaEmobileE robot.E
Source:&FU7Fighters&Middle7Size&Robot&2005. Source:&Jahobr (Wikipedia).
81 Source:&https://www.youtube.com/watch?v=0ZAuSFymeQY&– Published&on&January&3rd,&2016.
catadioptric or dioptric systems.
catadioptric system combines a standard camera with a shaped mirror, such as a parabolic, hyperbolic, or elliptical mirror.
in the horizontal plane.
82
83
UsedEforEobtaining panoramicEimages UsedEforE surfaceE reconstruction
into a cylindric panorama is a solution to support common subsequent image analysis.
like appearance.
view is just one image.
84
lenses (e.g., fisheye lenses) and can reach a field
such as, surgical operations or on board in microaerial vehicles for pipeline inspection.
85
86
UsedEbyEvideo? basedEsurveillanceE systems UsedEforEpeopleE counting
Source:&:&http://business.panasonic.com/
panoramas when used in a configuration as follows.
87
ItEcontainsEaEsmallEturntableE(forE selectingEaEviewingEangleEω),EwhichE isEonEanEextensionEslide,EthatEallowsE usEtoEchoseEaEdistanceER fromEtheE rotationEcenterEofEa bigEturntable.
Source:&R.&Klette
pixels.E
times) images during one rotation.
line? images into one array?image.
88
canEbeEseveralEthousandsEofEpixels.E
images within a time frame needed for taking individual shots during one full rotation.
captured by a rotating sensor?line camera.
89
90
AEpanoramicEimageE
recordedEfromEtheEtopE
BridgeEusingEaE sensor?lineEcamera.E
Source:&R.&Klette
World Coordinates. Homogeneous Coordinates. Camera
Section 6.2 of textbook.
91