+ All Categories
Home > Documents > 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the...

2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the...

Date post: 09-Oct-2020
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
134
E-mail: [email protected] http://web.yonsei.ac.kr/hgjung 2. Computer Vision 1 2. Computer Vision 1
Transcript
Page 1: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

2. Computer Vision 12. Computer Vision 1

Page 2: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Why Vision?Why Vision?

http://www.melexis.com

Page 3: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Why Vision?Why Vision?

http://www.melexis.com

Page 4: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Introduction toIntroduction toComputer VisionComputer Vision

Page 5: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

What is vision? [0, 3]What is vision? [0, 3]

• What does it mean, to see?• How to discover from images what is present in the world, where things are, what actions are taking place.

In computer vision, we are trying to do the inverse, i.e., to describe the world that we see in one or more images and to reconstruct its properties, such as shape, illumination, and color distribution.

Page 6: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

[3]

Page 7: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

[3]

Page 8: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

[3]What’s the name of the Palace?

Page 9: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

[3]

Page 10: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

[3]

Page 11: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

[3]

Page 12: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

What are computer vision used for ? [3]

Page 13: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Page 14: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Page 15: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Page 16: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Page 17: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Why is vision so difficult? [0]Why is vision so difficult? [0]

In part, it is because vision is an inverse problem, in which we seek to recover some unknowns given insufficient information to fully specify the solution.

We must therefore resort to physics-based and probabilistic models to disambiguate between potential solutions.

Page 18: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Three HighThree High--Level Approaches [0]Level Approaches [0]

In formulating and solving computer vision problems, I have often found it useful to draw inspiration from three high-level approaches:

• Scientific: build detailed models of the image formation process and develop mathematical techniques to invert these in order to recover the quantities of interest (where necessary, making simplifying assumption to make the mathematics more tractable).

• Statistical: use probabilistic models to quantify the priori likelihood of your unknowns and the noisy measurement processes that produce the input images, then infer the best possible estimates of your desired quantities and analyze their resulting uncertainties. The inference algorithms used are often closely related to the optimization techniques used to invert the (scientific) image formation processes.

• Engineering: develop techniques that are simple to describe and implement but that are also known to work well in practice. Test these techniques to understand their limitation and failure modes, as well as their expected computational costs (run-time performance).

Page 19: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

The best way to validate your algorithms [0]The best way to validate your algorithms [0]

Three part strategy:

1. Test your algorithm on clean synthetic data, for which the exact results are known.

2. Add noise to the data and evaluate how the performance degrades as a function of noise level.

3. Test the algorithm on real-world data, preferably drawn from a wide variety of sources, such as photos found on the Web.

Page 20: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Page 21: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

ReferencesReferences

[0] Richard Szeliski, “Computer Vision: Algorithms and Applications,” Springer Verlag, 2010.

[1] Steve Seitz, “Introduction to Computer Vision,” Washington University lecture material of computer vision (CSE455), 2008.

[2] Linda Shapiro, “Introduction to Computer Vision,” Washington University lecture material of computer vision (CSE455), 2007.

[3] Fei-Fei Li, “Introduction to Computer Vision,” Princeton University lecture material of computer vision (EE598), 2005.

Page 22: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

CameraCamera

Page 23: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Virtual image, perspective projection [1]Virtual image, perspective projection [1]

Page 24: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

How large a pinhole? [1]How large a pinhole? [1]

Page 25: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Shrinking the aperture [2]Shrinking the aperture [2]

Page 26: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Shrinking the aperture [2]Shrinking the aperture [2]

Page 27: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Same function with large pinhole: Lens [1]Same function with large pinhole: Lens [1]

Page 28: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

광전효과광전효과(Photoelectric Effect)(Photoelectric Effect)

In the photoelectric effect, electrons are emitted from matter (metals and non-metallic solids, liquids or gases) as a consequence of their absorption of energy from electromagnetic radiation of very short wavelength, such as visible or ultraviolet light. Electrons emitted in this manner may be referred to as "photoelectrons".

Light-matter interaction

http://en.wikipedia.org/wiki/Photoelectric

Symbol for photodiode.

Page 29: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Image SensorImage Sensor

http://www.rocketroberts.com/astro/ccd_fundamentals.htm

Page 30: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Image SensorImage Sensor

An image sensor is a device that converts an optical image to an electric signal. It is used mostly in digital cameras and other imaging devices. Early sensors were video camera tubes but a modern one is typically a charge-coupled device (CCD) or a complementary metal–oxide–semiconductor (CMOS) active pixel sensor.

A CCD image sensor on a flexible circuit board

http://en.wikipedia.org/wiki/Image_sensor

Page 31: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Image Sensor: CCDImage Sensor: CCD

A charge-coupled device (CCD) is a device for the movement of electrical charge, usually from within the device to an area where the charge can be manipulated, for example conversion into a digital value. This is achieved by "shifting" the signals between stages within the device one at a time. CCDs move charge between capacitive bins in the device, with the shift allowing for the transfer of charge between bins.

Often the device is integrated with an image sensor, such as a photoelectric device to produce the charge that is being read, thus making the CCD a major technology for digital imaging.

http://en.wikipedia.org/wiki/Charge-coupled_device

The charge packets (electrons, blue) are collected in potential wells (yellow) created by applying positive voltage at the gate electrodes (G). Applying positive voltage to the gate electrode in the correct sequence transfers the charge packets.

Page 32: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Image Sensor: CCDImage Sensor: CCD

http://en.wikipedia.org/wiki/Charge-coupled_device

Vertical smear.

Page 33: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Image Sensor: CMOS, APS (Active Pixel Senor)Image Sensor: CMOS, APS (Active Pixel Senor)

An active-pixel sensor (APS), also commonly written active pixel sensor, is an image sensor consisting of an integrated circuit containing an array of pixel sensors, each pixel containing a photodetector and an active amplifier. There are many types of active pixel sensors including the CMOS APS used most commonly in cell phone cameras, web cameras and in some DSLRs. Such an image sensor is produced by a CMOS process (and is hence also known as a CMOS sensor), and has emerged as an alternative to charge-coupled device (CCD) imager sensors.

http://en.wikipedia.org/wiki/Active_pixel_sensor

A three-transistor active pixel sensor.

Page 34: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Image Sensor: CMOS, APS (Active Pixel Senor)Image Sensor: CMOS, APS (Active Pixel Senor)

강문식, 신경욱, “IT CookBook, 전자회로: 핵심 개념부터 응용까지,” 한빛미디어.

Page 35: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Interlaced .vs. Progressive ScanInterlaced .vs. Progressive Scan

With progressive scan, an image is captured, transmitted, and displayed in a path similar to text on a page: line by line, from top to bottom. The interlaced scan pattern in a CRT (cathode ray tube) display completes such a scan too, but only for every second line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated again, only this time starting at the second row, in order to fill in those particular gaps left behind while performing the first progressive scan on alternate rows only.

When interlaced video is watched on a progressive monitor with very poor deinterlacing, it exhibits combing when there is movement between two fields of one frame.

http://en.wikipedia.org/wiki/Interlaced_video

Page 36: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

ShutteringShuttering

http://www.vision-systems.com/articles/print/volume-10/issue-5/features/component-integration/auto-cameras-benefit-from-cmos-imagers.html

- Image sensor의 sensitivity좋아야 Shuttering speed 높일 수 있고motion blur 줄일 수 있음.

- Rolling shutter .vs. global shuttering 노출의 동기화 global shuttering 선호

Page 37: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

ShutteringShuttering

In photography, shutter speed is a common term used to discuss exposure time, the effective length of time a camera's shutter is open. The total exposure is proportional to this exposure time, or duration of light reaching the film or image sensor.

http://en.wikipedia.org/wiki/Shutter_speed

A demonstration of the effect of exposure in night photography. Longer shutter speeds result in increased exposure.

Shutter speed can have a dramatic impact on the appearance of moving objects. Changes in background blurring are apparent from the need to adjust the aperture size to achieve proper exposure.

A pinwheel photographed at three different shutter speeds

짧은 shuttering 선호

화면이 어두워질 수 있음 Sensitivity 좋은 소자 필요

Page 38: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

ShutteringShuttering

Rolling shutter (also known as line scan) is a method of image acquisition in which each frame is recorded not from a snapshot of a single point in time, but rather by scanning across the frame either vertically or horizontally. In other words, not all parts of the image are recorded at exactly the same time, even though the whole frame is displayed at the same time during playback. This in contrast with global shutter in which the entire frame is exposed for the same time window. This produces predictable distortions of fast-moving objects or when the sensor captures rapid flashes of light.

Rolling Shutter Frame (Global) Shutterhttp://www.ptgrey.com/support/kb/index.asp?a=4&q=115

Page 39: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

ShutteringShuttering

http://en.wikipedia.org/wiki/Global_shutter

고속으로 움직이면서 촬영하는 자동차응용의 경우, global shuttering 필요

Page 40: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Shuttering: stoboscopic effectShuttering: stoboscopic effect

Extraordinary stroboscopic effect

http://youtu.be/rVSh-au_9aM

Stroboscope: Grinder

http://youtu.be/8mQaXaRVUoM

Page 41: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

HDRC(HighHDRC(High Dynamic Range CMOS) Dynamic Range CMOS) 카메라카메라

http://www.vision-systems.com/articles/print/volume-10/issue-5/features/component-integration/auto-cameras-benefit-from-cmos-imagers.html

Page 42: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

원적외선원적외선(FIR: Far (FIR: Far InfraRedInfraRed) ) 카메라카메라

http://en.wikipedia.org/wiki/Electromagnetic_wave

Page 43: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

원적외선원적외선(FIR: Far (FIR: Far InfraRedInfraRed) ) 카메라카메라

Flir Systems - "Path Finder" Automotive Infrared Camera

http://youtu.be/PM9OcBpZaPo

Page 44: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

근적외선근적외선(NIR: Near (NIR: Near InfraRedInfraRed) ) 카메라카메라

http://en.wikipedia.org/wiki/Infrared

Active-infrared night vision : the camera illuminates the scene at infrared wavelengths invisible to the human eye. Despite a dark back-lit scene, active-infrared night vision delivers identifying details, as seen on the display monitor.

Page 45: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

근적외선근적외선(NIR: Near (NIR: Near InfraRedInfraRed) ) 카메라카메라

Page 46: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Features of Automotive CameraFeatures of Automotive Camera

High dynamic range: Intra-scene dynamic range is particularly important for scene-understanding applications. If an image is washed out, vital data, like the position of a potential obstacle, can be lost.

Industrial temp: Automotive applications can be some of the harshest environments an image sensor faces, withstanding temperatures of –40°C to +125°C.

Low-light and near-IR sensitivity: People drive in the dark. That means your automotive sensor has to work in the dark.

Fast frame rates: Fast-moving objects (think others cars or scenery) require a speedy CMOS image sensor. We’ve developed blazing fast imagers capable of freezing fast motion, including a sensor equipped with a global shutter.

http://www.aptina.com/solutions/automotive.jsp

Page 47: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Virtual image, perspective projection [1]Virtual image, perspective projection [1]

Page 48: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Modeling Projection [2]Modeling Projection [2]

Page 49: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Modeling Projection [2]Modeling Projection [2]

-dz

yydz

Page 50: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Effects of Perspective Transformation [2]Effects of Perspective Transformation [2]

Page 51: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Perspective ControlPerspective Control

(a) Keeping the camera level, with an ordinary lens, captures only the bottom portion of the building.

(b) Tilting the camera upwards results in vertical perspective.

(c) Shifting the lens upwards results in a picture of the entire subject.

http://en.wikipedia.org/wiki/Perspective_control_lens

Perspective transformPerspective transform의의 ZZ는는 image planeimage plane으로부터의으로부터의 수직거리이다수직거리이다!!!!!!

(Optical center(Optical center로부터의로부터의 거리가거리가 아니다아니다.).)

Page 52: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Perspective ControlPerspective Control

The 1961 35 mm f/3.5 PC-Nikkorlens—the first perspective control lens for a 35 mm camera http://staticmixers.net/jq/?uid=Using-a-

perspective-control-lens

Page 53: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Perspective ControlPerspective Control

Picture taken with a 50mm lenson a normal 35mm Camera

Same picture taken with a 50mm lenswith Perspective Control

http://www.danheller.com/tech-persp.html

Page 54: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Perspective ControlPerspective Control

http://en.wikipedia.org/wiki/Perspective_control

Page 55: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Vanishing Points [2]Vanishing Points [2]

Page 56: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Vanishing Points [2]Vanishing Points [2]

Page 57: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

More than One Vanishing Point [2]More than One Vanishing Point [2]

Page 58: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Weak Perspective [4]Weak Perspective [4]

• Issue– perspective effects, but not over the scale of individual objects– collect points into a group at about the same depth, then divide each

point by the depth of its group– Adv: easy– Disadv: wrong

Page 59: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Weak Perspective [4]Weak Perspective [4]

f

Z

O -x

ZZ

XconstZfXx

Z

),(),,( yxszyx • s is constant for all points.

• Parallel lines no longer converge, they remain parallel.

Page 60: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Weak Perspective [4]Weak Perspective [4]

Weak perspective Perspective

Page 61: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Orthographical Projection [4]Orthographical Projection [4]

yYxX When the camera is at a

(roughly constant) distancefrom the scene, take m=1.

Page 62: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Affine Camera [4]Affine Camera [4]

Page 63: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Constant object size [5]Constant object size [5]

Page 64: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Dolly zoom [6]Dolly zoom [6]

Dolly zoom in movieshttp://www.youtube.com/watch?v=Y48R6-iIYHs

Page 65: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Depth of field [2]Depth of field [2]

Page 66: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

ScheimpflugScheimpflug PrinciplePrinciple

If the subject plane is not parallel to the image plane, it will be in focus only along a line where it intersects the PoF(Plane of Focus), as illustrated in Figure 1.

Figure 1. With a normal camera, when the subject is not parallel to the image plane, only a small region is in focus.

http://en.wikipedia.org/wiki/Scheimpflug_principle

Page 67: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

ScheimpflugScheimpflug PrinciplePrincipleWhen an oblique tangent is extended from the image plane, and another is extended from the lens plane, they meet at a line through which the PoF also passes, as illustrated in Figure 2 . With this condition, a planar subject that is not parallel to the image plane can be completely in focus.

http://en.wikipedia.org/wiki/Scheimpflug_principle

Page 68: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

The 24 mm PC-E lens shown in its tilt mode

Pentax-mount Arax 35 mm f/2.8 TS at max tilt and no shift.

ScheimpflugScheimpflug PrinciplePrinciple

Page 69: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

ScheimpflugScheimpflug PrinciplePrinciple

http://1.bp.blogspot.com/-wqgFh-V5yrU/TYp4iH9seOI/AAAAAAAAAdY/BDMeT1R2N6U/s1600/Scheimpflug_diptych.jpg

Page 70: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

ScheimpflugScheimpflug PrinciplePrinciple

http://www.treklens.com/gallery/North_America/Canada/photo512860.htm

Page 71: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

ReferencesReferences

1. Trevor Darrell, “Cameras and Lenses,” MIT lecture material of computer vision and applications (6.891), 2004.

2. Rajesh Rao, “Cameras and image formation,” Washington Univ. lecture material of computer vision (CSE 455), 2009.

3. Dan Huttenlocher, “Camera geometry,” Cornell Univ. lecture material of computer vision (CS 664), 2008.

4. Chandra Kambhamettu, “Camera graphics,” Delaware Univ. lecture material of computer vision (CISC 4/689), 2007.

5. “Telephoto lens,” Wikipedia, accessed on 4 Sep. 2009.6. “Dolly zoom,” Wikipedia, accessed on 4 Sep. 2009.

Page 72: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

LensLens

Page 73: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Wavefronts and Rays [1]Wavefronts and Rays [1]

Page 74: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Diffraction (Diffraction (회절회절) [1]) [1]

Page 75: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Refraction, Refractive IndexRefraction, Refractive Index

Page 76: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Refraction, SnellRefraction, Snell’’s Law [1]s Law [1]

travel time t is commont = d1/v1 = d2/v2

light speed c is constantc d1/v1 = c d2/v2d1 c/v1= d2 c/v2

Using the refractive index’s definitiond1 n1 = d2 n2

Page 77: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Reflection [1]Reflection [1]

Page 78: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Thin Lens Equation [2]Thin Lens Equation [2]

limo

i iss f

limi

o oss f

1 1 1

i is f

1 1 1

o os f

1 1 1

o is s f

f

So Si

Page 79: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Thin Lens Equation [2]Thin Lens Equation [2]

f

SoSi

물체가 초점거리 안쪽에 존재하면, 허상: So가 f보다 작으면, Si는 음수

1 1 1

o is s f

Page 80: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Thin Lens Equation [2]Thin Lens Equation [2]

실상과 허상에서의 렌즈의 초점거리와 배율과의 관계는?

실상: 초점거리가 커질수록, 배율 증가 렌즈가 얇을수록, 배율 증가

허상: 초점거리가 커질수록, 배율 감소 렌즈가 두꺼울수록, 배율 증가

f

So Si

f

Page 81: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Thin Lens Equation [2]Thin Lens Equation [2]

f

SoSi

실상과 허상에서의 렌즈의 초점거리와 배율과의 관계는?

실상: 초점거리가 커질수록, 배율 증가 렌즈가 얇을수록, 배율 증가

허상: 초점거리가 커질수록, 배율 감소 렌즈가 두꺼울수록, 배율 증가

f

Page 82: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

The Seidel AberrationsThe Seidel Aberrations

Page 83: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Chromatic AberrationChromatic Aberration

Page 84: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Correcting Chromatic Aberration: Achromatic doubletCorrecting Chromatic Aberration: Achromatic doublet

Page 85: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Determining Focal LengthDetermining Focal Length

Page 86: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Camera ModelCamera Model

Page 87: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Homogeneous Coordinates [2]Homogeneous Coordinates [2]

Page 88: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Homogeneous Coordinates: Geometric intuition [2]Homogeneous Coordinates: Geometric intuition [2]

Page 89: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Lines in 2D Homogeneous Coordinates [3]Lines in 2D Homogeneous Coordinates [3]

Page 90: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Lines and Points in 2D Homogeneous Coordinates [3]Lines and Points in 2D Homogeneous Coordinates [3]

Page 91: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Pinhole Camera Model in Homogeneous Coordinates [3]Pinhole Camera Model in Homogeneous Coordinates [3]

숨겨진숨겨진 가정은가정은? ? focal length ffocal length f에에 초점이초점이 맞는맞는 영상이영상이 생긴다생긴다..

물체까지의물체까지의 거리가거리가 초점거리초점거리 ff에에 비하여비하여 월등히월등히 크다크다..

Page 92: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Principal Point [3]Principal Point [3]

Page 93: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Considering Imaging Element [3]Considering Imaging Element [3]

Page 94: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Meaning of Eq. in Homo. Meaning of Eq. in Homo. CoordCoord. Sys.. Sys.

• Equation in homogeneous coordinate systems is not an identity, but a calculation formula.1) If we have a transform matrix and input vectors, then we can calculate

the output vectors.

2) However, when we have input vectors and output vectors, we only know that LHS (Left Hand Side) and RHS (Right Hand Side) is in a relationship of scalar production, that is, equal up to scale.

, given and Y A X A XY A X

:, :, :, :,

, given and

, 0j j j j j

Y A X X Y

Y A X Y k A X Y A X

, ,: :,

,: :,, ,: :,,

, ,: :,,: :,

i j j i j

j i ji j i ji j

N j N jj N j

Y k A X

k A XY A XY

Y A Xk A X

ItIt’’s an identity.s an identity.

Page 95: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Robust EstimationRobust Estimation

Page 96: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Which is belonging to the line?Which is belonging to the line?

• Until now, we assume that all data are belonging to the line.

-10 -8 -6 -4 -2 0 2 4 6 8 10-5

0

5

10

-20 -15 -10 -5 0 5 10 15 20

-10

-5

0

5

10

15

20

• However, in a practical situation, we should determine the set of data belonging to a line.1. Multiple lines2. Outliers

Page 97: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Voting vs. Random Sampling MethodVoting vs. Random Sampling Method

1. Even with outliers, a line supported most strongly by data should be the true one voting method, e.g. Hough transform.

2. If a set of data sampled randomly satisfies a certain error criterion, it should be the true one random sampling method, e.g. RANSAC.

Page 98: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Hough TransformHough Transform

• If we have coordinates of data (x,y), the line parameter is unknown.• Line parameters (r,θ): the parameter r represents the distance between the

line and the origin, while θ is the angle of the vector from the origin to this closest point.

θ

r

r = xcosθ + ysinθ

Page 99: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Hough TransformHough Transform

• A data (x,y) is corresponding to all possible (r,θ).

-4 -3 -2 -1 0 1 2 3 4-20

-15

-10

-5

0

5

10

theta

r

Page 100: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Hough TransformHough Transform

• If we accumulate all data,

-4 -3 -2 -1 0 1 2 3 4-20

-15

-10

-5

0

5

10

theta

r

Page 101: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Hough TransformHough Transform

• If the number of data is sufficient, the correct answer will become a peak in Hough space.

-4 -3 -2 -1 0 1 2 3 4-20

-15

-10

-5

0

5

10

theta

r

0

50

100

150

010

20

30400

200

400

600

800

Page 102: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Hough TransformHough Transform

• By finding the maximum point in the Hough space, the original line could be estimated robustly.

theta

r

-25 -20 -15 -10 -5 0 5 10 15 20

-15

-10

-5

0

5

10

15

20

Page 103: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

RANSAC [2]RANSAC [2]

• RANdom SAmple Consensus

Page 104: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

RANSACRANSAC

• Randomly selected two points and the line.

-15 -10 -5 0 5 10 15

-10

-5

0

5

10

-20 -15 -10 -5 0 5 10 15 20

-10

-5

0

5

10

15

20

Page 105: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

RANSACRANSAC

• Consensus set and refined line.

-20 -15 -10 -5 0 5 10 15 20

-10

-5

0

5

10

15

20

t=0.5

-20 -15 -10 -5 0 5 10 15 20

-10

-5

0

5

10

15

20

error=5.0874 w.r.t. all samples

Page 106: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

RANSACRANSAC

• Consensus set and refined line.

-15 -10 -5 0 5 10 15

-10

-5

0

5

10

error=82.9453 w.r.t. all samples

-20 -10 0 10 20 30-20

-15

-10

-5

0

5

10

15

20

25

error=4.0028 w.r.t. all samples

Page 107: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

RANSACRANSAC

• The best result, k=100, d=1% of the total number of samples.

error=2.1295 w.r.t. all samples

-25 -20 -15 -10 -5 0 5 10 15 20

-15

-10

-5

0

5

10

15

20

Page 108: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

RANSAC, Required Iteration Number [3]RANSAC, Required Iteration Number [3]

• How many times should we iterate the random sampling to find an acceptable solution?

• Let w be the probability that any selected data point is within the error tolerance of the model.

• The following is a tabulation of some values of E(k) for corresponding values of n and w:

필요한 sample point 수

한 sample point가 outlier가 아닐 확률

“n개 샘플을 뽑는 일”을몇 번이나 반복해야 하나?

Page 109: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

SVD vs. Pseudo InverseSVD vs. Pseudo Inverse

• Disadvantage of SVD1) The computation of SVD is heavy.2) If the unknown should be found deterministically, one more equation is

needed.

• Therefore, with ignorable error, pseudo inverse is preferable.• It is noticeable that SVD is LS (Least Squared) estimate w.r.t. algebraic error

and pseudo inverse is LS w.r.t. output variable.

ex) ax+by+c=0 [x y 1][a b c]’=0 SVD minimizing the error orthogonal to the line.

y=mx+b y=[x 1][m b]’ pseudo inverse minimizing the error of output variable, y.

Page 110: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

ReferencesReferences

1. Wikipedia, “Hough transform,” available at http://en.wikipedia.org/wiki/Hough_transform

2. Martin A. Fischler and Robert C. Bolles, “Random Sample Consensus: A Paradigm for Model Fitting with Applications to Image Analysis and Automated Cartography,” Communications of the ACM, Vol. 24, Issue 6, Jun. 1981, pp. 381-395.

Page 111: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Camera CalibrationCamera Calibration

Page 112: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

ReferencesReferences

1. Joaquim Salvi, Xavier Armangué, Joan Batlle, “A comparative review of camera calibrating methods with accuracy evaluation,” Pattern Recognition 35 (2002) pp. 1617-1635.

Page 113: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Camera Calibration [1]Camera Calibration [1]

1.1. Camera modelingCamera modeling: mathematical approximation of the physical and optical behavior of the sensor by using a set of parameters

2.2. Estimation of the parametersEstimation of the parameters• Intrinsic parameters: the internal geometry and optical

characteristics of the image sensor.How is the light projected through the lens onto the image plane of the sensor?

• Extrinsic parameters: the position and orientation of the camera with respect to a world coordinate system.

Page 114: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Camera Calibration MethodsCamera Calibration Methods

1. E.L. Hall, et al., “Measuring curved surfaces for robot vision,” Comput. J. 15 (1982) 42-54.

2. O.D. Faugeras, et al., “The calibration problem for stereo,” CVPR 1986, pp. 15-20.

3. Faugeras non-linearJ. Salvi, “An approach to coded structured light to obtain three dimensional information,” Ph.D. Thesis, 1997.J. Salve, et al., “A robust-coded pattern projection for dynamic 3D scene measurement,” Int. J. Pattern Recognition Lett. 19 (1998) 1055-1065.

4. R. Y. Tsai, “A versatile camera calibration technique for high-accuracy 3D machine vision metrology using off-the shelf TV cameras and lenses,”IEEE Int. J. Robot. Automat. RA-3 (1987) 323-344.

5. J. Weng, et al., “Camera calibration with distortion models and accuracy evaluation,” PAMI 14 (1992) 965-980.

Page 115: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

NotationsNotations

RCPReference

Coordinate system

Page 116: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Camera ModelingCamera Modeling

• Camera modeling is usually broken down into 4 steps.1. Translation & rotation 2. Projection3. Lens distortion4. Image coordinates

W CW WP P

C CW uP P

C Cu dP P

C Id dP P

Page 117: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Camera Modeling: Step1Camera Modeling: Step1

• Changing the world to the camera coordinate system W CW WP P

The position of the origin of the world coordinate system measured with respect to {C}.

The orientation of the world coordinate system {W} with respect to the axis of the camera coordinate system {C}.

Page 118: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Camera Modeling: Step2Camera Modeling: Step2

• Optical sensor is modeled as a pinhole camera.

The image plane is located at a distance f from the optical center OC, and is parallel to the plane defined by the coordinate axis XC and YC.

C CW uP P

Page 119: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Camera Modeling: Step3Camera Modeling: Step3

• Modeling the distortion of the lens.

• Faugeras-Toscani model

•• Tsai modelTsai model

• Weng model

C Cu dP P

• The radial distortion

• The decentering distortion

• The thin prism distortion

Page 120: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Camera Modeling: Step4Camera Modeling: Step4

• Changing from the camera image to the computer image coordinate system

(ku,kv) transformation from metric measures with respect to the camera coordinate system to pixels with respect to the computer image coordinate system(u0,v0) defines the projection of the focal point in the plane image in pixels, i.e. the principal point.

C Id dP P

Page 121: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Image Center EstimationImage Center Estimation

Orthocenter Theorem: Image Center from Vanishing PointsB. CAPRILE and V. TORRE, “Using Vanishing Points for Camera Calibration,” IJCV 4, pp. 127-140 (1990).

PROPERTY 3. Let Q, R, S be three mutually orthogonal straight lines in space, and let VQ = (xQ, yQ, f), vR = (xR, yR,f), VS = (xs, ys,f) be the three vanishing points associated with them.The orthocenter of the triangle with vertexes in the three vanishing points is the intersection of the optical axis and the image plane.

Page 122: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

The Method of Hall (1/2)The Method of Hall (1/2)

i

i

i

WW

WW

WW

X

Y

Z

i

i

i

WW

WW

WW

X

Y

Z

Page 123: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

The Method of Hall (2/2)The Method of Hall (2/2)

i

i

i

WW

WW

WW

X

Y

Z

Consider without loss of generality that

By applying the pseudo-inverse

i

i

i

WW

WW

WW

X

Y

Z

Page 124: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

The Method of The Method of FaugerasFaugeras (1/2)(1/2)

A can be estimated by Hall’s method.

=

Page 125: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

The Method of The Method of FaugerasFaugeras (2/2)(2/2)

The orientation of the vectors ri must be orthogonal and each ri is unit vector.r1r2=r2r3=r3r1=0 r1r1=r2r2=r3r3=1

Page 126: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

Orthogonal and ParallelOrthogonal and Parallel

• Unit Vectors

0|| 0

A B A BA B A B

Page 127: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

The Method of Tsai (1/8)The Method of Tsai (1/8)

The method of Tsai models the radial lens distortion but assumes that there are some parameters of the camera which are provided by manufacturers.

u0, v0, dx’, dy

CXd’ and CYd’ are obtained in metric coordinates from the pixel coordinates IXd and IYd.

Page 128: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

The Method of Tsai (2/8)The Method of Tsai (2/8)

Considering the radial distortion of lens, the relationship between the image point Pd (in metric coordinates) and the object point Pw.

Page 129: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

The Method of Tsai (3/8)The Method of Tsai (3/8)

Even with the radial distortion,

Page 130: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

The Method of Tsai (4/8)The Method of Tsai (4/8)

Page 131: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

The Method of Tsai (5/8)The Method of Tsai (5/8)

After expanding (60), divide it by ty:

Page 132: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

The Method of Tsai (6/8)The Method of Tsai (6/8)

For n points, combine (61) and (55)

1

7

aA

a

A can be estimated by LS.

121

122

123

y

y

y

t r

t r

t r

Page 133: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

The Method of Tsai (7/8)The Method of Tsai (7/8)

Using the case ty is definitely positive,

r3 can be calculated by a cross product between r1 and r2.

4 /x y xt a t s

Page 134: 2. Computer Vision 1 - Yonsei University Computer Vision … · line. This is carried out from the top left corner to the bottom right corner of a CRT display. This process is repeated

E-mail: [email protected]://web.yonsei.ac.kr/hgjung

The Method of Tsai (8/8)The Method of Tsai (8/8)

Parameters still unknown: the focal length f, the radial distortion coefficient k1, and the translation of the camera w.r.t. the Z axis tz.

Assuming k1=0 to get the initial guess of f and tz.

Iterate the non-linear optimization routine using (45)

-


Recommended