CSci 6971: Image Registration Lecture 3: Images and Transformations March 1, 2005

35
CSci 6971: Image Registration Lecture 3: Images and Transformations March 1, 2005 Prof. Charlene Tsai

description

CSci 6971: Image Registration Lecture 3: Images and Transformations March 1, 2005. Prof. Charlene Tsai. Outline. Images: Types of images Coordinate systems Transformations Similarity transformations in 2d and 3d Affine transformations in 2d and 3d Projective transformations - PowerPoint PPT Presentation

Transcript of CSci 6971: Image Registration Lecture 3: Images and Transformations March 1, 2005

Page 1: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

CSci 6971: Image Registration Lecture 3: Images and Transformations

March 1, 2005

CSci 6971: Image Registration Lecture 3: Images and Transformations

March 1, 2005

Prof. Charlene TsaiProf. Charlene Tsai

Page 2: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 2

OutlineOutline

Images: Types of images Coordinate systems

Transformations Similarity transformations in 2d and 3d Affine transformations in 2d and 3d Projective transformations Non-linear and deformable transformations

Images: Types of images Coordinate systems

Transformations Similarity transformations in 2d and 3d Affine transformations in 2d and 3d Projective transformations Non-linear and deformable transformations

Page 3: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 3

ImagesImages

Medical (tomographic) images: CT and MRI

Intensity / video images Range images

Medical (tomographic) images: CT and MRI

Intensity / video images Range images

Page 4: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 4

CT: X-Ray Computed TomographyCT: X-Ray Computed Tomography

電腦斷層 X-ray projection through body Reconstruction of interior via

computed tomography A volume of slices

Voxels in each slice are between 0.5 mm and 1.0 mm on a side

Spacing between slices is typically 1.0 and 5.0 mm

Resulting intensities are measured in Hounsfield units 0 for water ~ -1000 for air, +1000 for bone

電腦斷層 X-ray projection through body Reconstruction of interior via

computed tomography A volume of slices

Voxels in each slice are between 0.5 mm and 1.0 mm on a side

Spacing between slices is typically 1.0 and 5.0 mm

Resulting intensities are measured in Hounsfield units 0 for water ~ -1000 for air, +1000 for bone

Page 5: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 5

MRI: Magnetic Resonance ImagesMRI: Magnetic Resonance Images

磁核共振影像 Magnetic fields:

Nuclei of individual water molecules

Induced fields Measure the relaxation times of

molecules as magnetic fields are changed

Images are recorded as individual slices and as volumes Slices need not be axial as in CT

MRIs are subject to field distortions There are many different types of

MRIs

磁核共振影像 Magnetic fields:

Nuclei of individual water molecules

Induced fields Measure the relaxation times of

molecules as magnetic fields are changed

Images are recorded as individual slices and as volumes Slices need not be axial as in CT

MRIs are subject to field distortions There are many different types of

MRIs

Page 6: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 6

Video ImagesVideo Images

Pixel intensities depend on Illumination Surface orientation Reflectance Viewing direction projection Digitization

By themselves Pixel dimensions have no

physical meaning Pixel intensities have no

physical meaning

Pixel intensities depend on Illumination Surface orientation Reflectance Viewing direction projection Digitization

By themselves Pixel dimensions have no

physical meaning Pixel intensities have no

physical meaning

Page 7: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 7

Range ImagesRange Images

Measuring depth Representation:

(x,y,z) at each pixel “Point cloud” of (x,y,z)

values

Measuring depth Representation:

(x,y,z) at each pixel “Point cloud” of (x,y,z)

values

Brighter pixels are further away

Intensity image of same scene

Page 8: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 8

Coordinate SystemsCoordinate Systems

Topics: Image coordinates Physical coordinates Mapping between them

One must be aware of these, especially in the implementation details of a registration algorithm

Topics: Image coordinates Physical coordinates Mapping between them

One must be aware of these, especially in the implementation details of a registration algorithm

Page 9: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 9

Image Coordinate SystemsImage Coordinate Systems

The origin is generally at the corner of the image, often the upper left

Directions: x axis is across y axis is down

Differs from matrix coordinates and Cartesian coordinates

Units are integer increments of grid indices

The origin is generally at the corner of the image, often the upper left

Directions: x axis is across y axis is down

Differs from matrix coordinates and Cartesian coordinates

Units are integer increments of grid indices

v

u(0,0)

Page 10: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 10

Physical CoordinatesPhysical Coordinates

Origin: Near center in video

images Defined by scanner for

medical images Directions:

Right-handed coordinate frame

Units are millimeters (medical images)

Origin: Near center in video

images Defined by scanner for

medical images Directions:

Right-handed coordinate frame

Units are millimeters (medical images)

v

u

x

y

Page 11: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 11

Non-Isotropic Voxels in Medical ImagesNon-Isotropic Voxels in Medical Images

Axial (z) dimension is often greater than within slice (x and y) dimensions

At worst this can be close to an order of magnitude

New scanners are getting close to isotropic dimensions

Axial (z) dimension is often greater than within slice (x and y) dimensions

At worst this can be close to an order of magnitude

New scanners are getting close to isotropic dimensions

Page 12: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 12

Change of Coordinates as Matrix MultiplicationChange of Coordinates as Matrix Multiplication

Physical coordinates to pixel coordinates: Physical coordinates to pixel coordinates:

Scaling from physical to pixel units: parameters are pixels per mm Translation of origin in

pixel units

Page 13: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 13

Homogeneous FormHomogeneous Form

Using homogeneous coordinates --- in simplest terms, adding a 1 at the end of each vector --- allows us to write this using a single matrix multiplication:

Using homogeneous coordinates --- in simplest terms, adding a 1 at the end of each vector --- allows us to write this using a single matrix multiplication:

Page 14: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 14

TransformationsTransformations

Geometric transformations Intensity transformations

Geometric transformations Intensity transformations

Page 15: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 15

Forward Geometric TransformationForward Geometric Transformation

“Moving” image, Im “Fixed” image, If

Transformed moving image, Im’. It is mapped into the coordinate system of If

Page 16: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 16

Mapping Pixel Values - Going BackwardsMapping Pixel Values - Going Backwards

“Moving” image, Im “Fixed” image, If

Need to go backward to get pixel value. This will generally not “land” on a single pixel location. Instead you need to do interpolation.

Page 17: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 17

Backward TransformationBackward Transformation

Because of the above, some techniques estimate the parameters of the “backwards” transformation, T-1: From the fixed image to the moving image

This can sometimes become a problem if the mapping function is non-invertible

Intensity-based algorithms generally estimate the backwards transformation

Because of the above, some techniques estimate the parameters of the “backwards” transformation, T-1: From the fixed image to the moving image

This can sometimes become a problem if the mapping function is non-invertible

Intensity-based algorithms generally estimate the backwards transformation

Page 18: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 18

Intensity Transformations As WellIntensity Transformations As Well

When the intensities must be transformed as well, the equations get more complicated:

When the intensities must be transformed as well, the equations get more complicated:

Intensity mapping function Intensity mapping parameters

Fortunately, we will not be very concerned with intensity mapping

Page 19: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 19

Transformation Models - A StartTransformation Models - A Start

Translation and scaling in 2d and 3d Similarity transformations in 2d and 3d Affine transformations in 2d and 3d

Translation and scaling in 2d and 3d Similarity transformations in 2d and 3d Affine transformations in 2d and 3d

Page 20: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 20

Translation and Independent ScalingTranslation and Independent Scaling

We’ve already seen this in 2d: Transformations between pixel and physical coordinates Translation and scaling in the retina application

In matrix form:

Where

In homogeneous form:

We’ve already seen this in 2d: Transformations between pixel and physical coordinates Translation and scaling in the retina application

In matrix form:

Where

In homogeneous form:

Two-component vector

Page 21: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 21

Similarity TransformationsSimilarity Transformations

Components: Rotation (next slide) Translation Independent scaling

“Invariants” Angles between vectors remain fixed All lengths scale proportionally, so the ratio of

lengths is preserved Example applications:

Multimodality, intra-subject (same person) brain registration

Registration of range images (no scaling)

Components: Rotation (next slide) Translation Independent scaling

“Invariants” Angles between vectors remain fixed All lengths scale proportionally, so the ratio of

lengths is preserved Example applications:

Multimodality, intra-subject (same person) brain registration

Registration of range images (no scaling)

Page 22: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 22

Rotations in 2dRotations in 2d

Assume (for now) that forward transformation is only a rotation

Image origins are in upper left corner; angles are measured “clockwise” with respect to x axis

Assume (for now) that forward transformation is only a rotation

Image origins are in upper left corner; angles are measured “clockwise” with respect to x axis

Im If

Page 23: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 23

Similarity Transformations in 2dSimilarity Transformations in 2d

As a result:

Or:

As a result:

Or:

Page 24: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 24

Rotation Matrices and 3d RotationsRotation Matrices and 3d Rotations

The 2d rotation matrix is orthonormal with determinant 1:

In arbitrary dimensions, these two properties hold.

Therefore, we write similarity transformations in arbitrary dimensions as

The 2d rotation matrix is orthonormal with determinant 1:

In arbitrary dimensions, these two properties hold.

Therefore, we write similarity transformations in arbitrary dimensions as

Page 25: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 25

Representing Rotations in 3d (Teaser)Representing Rotations in 3d (Teaser)

R is a 3x3 matrix, giving it 9 parameters, but it has only 3 degrees of freedom Its orthonormality properties remove the

other 6. Question: How to represent R? Some answers (out of many):

Small angle approximations about each axis

Quaternions

R is a 3x3 matrix, giving it 9 parameters, but it has only 3 degrees of freedom Its orthonormality properties remove the

other 6. Question: How to represent R? Some answers (out of many):

Small angle approximations about each axis

Quaternions

Page 26: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 26

Affine TransformationsAffine Transformations

Geometry: Rotation, scaling (each dimension separately),

translation and shearing Invariants:

Parallel lines remain parallel Ratio of lengths of segments along a line remains

fixed. Example application:

Mosaic construction for images of earth surface (flat surface, relatively non-oblique cameras)

Geometry: Rotation, scaling (each dimension separately),

translation and shearing Invariants:

Parallel lines remain parallel Ratio of lengths of segments along a line remains

fixed. Example application:

Mosaic construction for images of earth surface (flat surface, relatively non-oblique cameras)

Page 27: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 27

Affine Transformations in 2dAffine Transformations in 2d

In 2d, multiply x location by arbitrary, but invertible 2x2 matrix:

In general,

Or, in homogeneous form,

In 2d, multiply x location by arbitrary, but invertible 2x2 matrix:

In general,

Or, in homogeneous form,

Page 28: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 28

Affine Transformations in 2dAffine Transformations in 2d

y

xa

x

10

1;T x

ax

1

01;TOR

x

y’

x’

Page 29: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 29

Projective TransformationsProjective Transformations

General linear transformation Lengths, angle, and parallel lines are NOT

preserved Coincidence, tangency, and complicated

ratios of lengths are the invariants Application:

Mosaics of image taken by camera rotating about its optical center

Mosaic images of planar surface

General linear transformation Lengths, angle, and parallel lines are NOT

preserved Coincidence, tangency, and complicated

ratios of lengths are the invariants Application:

Mosaics of image taken by camera rotating about its optical center

Mosaic images of planar surface

Page 30: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 30

Algebra of Projective TransformationsAlgebra of Projective Transformations

Add non-zero bottom row to the homogeneous matrix:

Transformed point location:

Estimation is somewhat more complicated than for affine transformations

Add non-zero bottom row to the homogeneous matrix:

Transformed point location:

Estimation is somewhat more complicated than for affine transformations

Page 31: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 31

Non-Linear TransformationsNon-Linear Transformations

Transformation using in retinal image mosaics is a non-linear function of the image coordinates:

Transformation using in retinal image mosaics is a non-linear function of the image coordinates:

Page 32: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 32

Deformable ModelsDeformable Models

Non-global functions Often PDE-based, e.g.:

Thin-plate splines Fluid mechanics

Representation B-splines Finite elements Fourier bases Radial basis functions

Lectures 27-28 will provide an introduction

Non-global functions Often PDE-based, e.g.:

Thin-plate splines Fluid mechanics

Representation B-splines Finite elements Fourier bases Radial basis functions

Lectures 27-28 will provide an introduction

Page 33: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 33

SummarySummary

Images and image coordinate systems Watch out for the difference between physical and

pixel/voxel coordinates and for non-isotropic voxels! Transformation models

Forward and backward mapping Our focus will be almost entirely geometric

transformation as opposed to intensity transformations Transformations:

Similarity Affine Projective Non-linear and deformable

Images and image coordinate systems Watch out for the difference between physical and

pixel/voxel coordinates and for non-isotropic voxels! Transformation models

Forward and backward mapping Our focus will be almost entirely geometric

transformation as opposed to intensity transformations Transformations:

Similarity Affine Projective Non-linear and deformable

Page 34: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 34

HomeworkHomework

Available online Available online

Page 35: CSci 6971: Image Registration  Lecture 3:  Images and Transformations March 1, 2005

Image Registration Lecture 3 35

Looking Ahead to Lecture 4Looking Ahead to Lecture 4

Introduction to intensity-based registration Introduction to intensity-based registration