Graphics Image Processing kucg korea ac kr Graphics
- Slides: 70
Graphics Image Processing 고려대학교 컴퓨터 그래픽스 연구실 kucg. korea. ac. kr Graphics Lab @ Korea University
Overview n Image Representation n n KUCG What is an image? Sampling and Reconstruction n Key steps in image processing kucg. korea. ac. kr Graphics Lab @ Korea University
What is an Image? n KUCG An image is a 2 D rectilinear array of pixels Continuous image Digital image A pixel is a sample, not a little square!! kucg. korea. ac. kr Graphics Lab @ Korea University
What is an Image? n KUCG An image is a 2 D rectilinear array of pixels Continuous image kucg. korea. ac. kr Digital image Graphics Lab @ Korea University
What is an Image? n KUCG An image is a 2 D rectilinear array of pixels Continuous image kucg. korea. ac. kr Digital image Graphics Lab @ Korea University
Image Acquisition n KUCG Pixels are samples from continuous function Photoreceptors in eye n CCD cells in digital camera n Rays in virtual camera n kucg. korea. ac. kr Graphics Lab @ Korea University
Quantization n KUCG Artifact due to limited intensity resolution Frame buffers have limited number of bits per pixel n Physical devices have limited dynamic range n 255 150 255 255 150 150 75 750 255 150 75 750 255 150 75 0 kucg. korea. ac. kr 75 750 0 0 Blue channel Green channel Red channel Graphics Lab @ Korea University
Image Display n KUCG Re-create continuous function from samples n Example: cathode ray tube Image is reconstructed by displaying pixels with finite area (Gaussian) kucg. korea. ac. kr Graphics Lab @ Korea University
Image Resolution n Intensity resolution n n Each pixel has only “Depth” bits for colors/intensities Spatial resolution n n KUCG Image has only “Width” x “Height” pixels Temporal resolution n Monitor refreshes images at only “Rate” Hz kucg. korea. ac. kr Graphics Lab @ Korea University
Overview n Image Representation n n KUCG What is an image? Sampling and Reconstruction n Key steps in image processing kucg. korea. ac. kr Graphics Lab @ Korea University
Sampling and Reconstruction KUCG Sampling Reconstruction kucg. korea. ac. kr Graphics Lab @ Korea University
Sampling and Reconstruction kucg. korea. ac. kr KUCG Graphics Lab @ Korea University
Image Processing § Pixel operations KUCG n Filtering Blur n Detect edge n Add luminance n Add contrast n n Warping Scale n Rotate n Warps n kucg. korea. ac. kr Graphics Lab @ Korea University
Adjusting Brightness n KUCG Simply scale pixel components n Must clamp to range (e. g. , 0 to 255) Original kucg. korea. ac. kr Brighter Graphics Lab @ Korea University
Adjusting Contrast n Compute mean luminance L for all pixels n n KUCG Luminance = 0. 30*r + 0. 59*g + 0. 11*b Scale deviation from L for each pixel component n Must clamp to range (e. g. 0 to 255) L Original kucg. korea. ac. kr More contrast Graphics Lab @ Korea University
Image Processing § Pixel operations KUCG n Filtering Blur n Detect edge n Add luminance n Add contrast n n Warping Scale n Rotate n Warps n kucg. korea. ac. kr Graphics Lab @ Korea University
Adjusting Blurriness n KUCG Convolve with a filter whose entries sum to one n Each pixel becomes a weighted average of its neighbors Original kucg. korea. ac. kr Blur Graphics Lab @ Korea University
Edge Detection n KUCG Convolve with a filter that finds differences between neighbor pixels Original kucg. korea. ac. kr Edge Detection Graphics Lab @ Korea University
Blurring and Convolution KUCG 3 We call this “filter” kucg. korea. ac. kr Graphics Lab @ Korea University
Blurring and Convolution KUCG 3 kucg. korea. ac. kr Graphics Lab @ Korea University
Blurring and Convolution KUCG 3 kucg. korea. ac. kr Graphics Lab @ Korea University
Blurring and Convolution KUCG 3 kucg. korea. ac. kr Graphics Lab @ Korea University
Blurring and Convolution KUCG 3 kucg. korea. ac. kr Graphics Lab @ Korea University
Blurring and Convolution KUCG 3 kucg. korea. ac. kr Graphics Lab @ Korea University
Blurring and Convolution KUCG 3 kucg. korea. ac. kr Graphics Lab @ Korea University
Blurring and Convolution KUCG 3 kucg. korea. ac. kr Graphics Lab @ Korea University
Blurring and Convolution KUCG 3 kucg. korea. ac. kr Graphics Lab @ Korea University
Blurring and Convolution KUCG 3 kucg. korea. ac. kr Graphics Lab @ Korea University
Blurring and Convolution KUCG 3 kucg. korea. ac. kr Graphics Lab @ Korea University
Blurring and Convolution KUCG 3 kucg. korea. ac. kr Graphics Lab @ Korea University
Blurring and Convolution KUCG 3 kucg. korea. ac. kr Graphics Lab @ Korea University
Blurring and Convolution KUCG 3 kucg. korea. ac. kr Graphics Lab @ Korea University
Blurring and Convolution KUCG 3 kucg. korea. ac. kr Graphics Lab @ Korea University
Blurring and Convolution KUCG 3 kucg. korea. ac. kr Graphics Lab @ Korea University
Blurring and Convolution KUCG 3 kucg. korea. ac. kr Graphics Lab @ Korea University
Blurring and Convolution KUCG 3 kucg. korea. ac. kr Graphics Lab @ Korea University
Blurring and Convolution KUCG 3 kucg. korea. ac. kr Graphics Lab @ Korea University
Blurring and Convolution KUCG 3 kucg. korea. ac. kr Graphics Lab @ Korea University
Blurring and Convolution KUCG 3 kucg. korea. ac. kr Graphics Lab @ Korea University
Edge Detection kucg. korea. ac. kr KUCG Graphics Lab @ Korea University
Discretize Convolution kucg. korea. ac. kr KUCG Graphics Lab @ Korea University
Edge Detection n Pixel alteration using convolution mask KUCG int sum. X, sum. Y, sum; for( y=1 ; y<image_height-1 ; y++ ) for( x=1 ; x<image_width-1 ; x++ ) { sum. X=0; for( j=0 ; j<3 ; j++ ) for( i=0 ; i<3 ; i++ ){ sum. X += mask. X[i][j]*image[x+i-1][y+j-1] } sum. Y=0; for( j=0 ; j<3 ; j++ ) for( i=0 ; i<3 ; i++ ){ sum. Y += mask. Y[i][j]*image[x+i-1][y+j-1] } mask sum = abs(sum. X)+abs(sum. Y); if(sum > 255) sum =255; if(sum < 0) sum = 0; result_Image[x][y] = sum; } kucg. korea. ac. kr Graphics Lab @ Korea University
Edge Detection n KUCG Various masks for edge detection Prewitt Sobel Frei-Chen Laplacian 1 Laplacian 2 Laplacian 3 kucg. korea. ac. kr Graphics Lab @ Korea University
Image Processing § Pixel operations KUCG n Filtering Blur n Detect edge n Add luminance n Add contrast n n Warping Scale n Rotate n Warps n kucg. korea. ac. kr Graphics Lab @ Korea University
Image Warping n KUCG Move pixels of image Mapping n Resampling n Warp Source Image kucg. korea. ac. kr Destination Image Graphics Lab @ Korea University
Overview n KUCG Mapping Forward n Reverse n n Resampling Point sampling n Triangle filter n Gaussian filter n kucg. korea. ac. kr Graphics Lab @ Korea University
Mapping n KUCG Define transformation n Describe the destination (x, y) for every location (u, v) in the source (or vice-versa, if invertible) v y u kucg. korea. ac. kr x Graphics Lab @ Korea University
Example Mappings n KUCG Scale by factor : x = factor * u n y = factor * v n v y Scale 0. 8 u kucg. korea. ac. kr x Graphics Lab @ Korea University
Example Mappings n KUCG Rotate by θ degrees: x = u cos θ – v sin θ n y = u sin θ + v cos θ n y v Rotate 30 u kucg. korea. ac. kr x Graphics Lab @ Korea University
Example Mappings n Shear in X by factor : x = u + factor * v ny=v n n KUCG v Shear X 1. 3 Shear in Y by factor : x=u n y = v + factor * u n y u v y Shear Y 1. 3 u kucg. korea. ac. kr x x Graphics Lab @ Korea University
Other Mappings n KUCG Any function of u and v : x = fx(u, v) n y = fy(u, v) n Fish-eye kucg. korea. ac. kr Swirl Rain Graphics Lab @ Korea University
Image Warping Implementation I n KUCG Forward mapping : for(int u=0; u<umax; u++) { for(int v=0; v<vmax; v++) { float x = fx(u, v); float y = fy(u, v); dst(x, y) = src(u, v); } } (u, v) Source Image kucg. korea. ac. kr f (x, y) Destination Image Graphics Lab @ Korea University
Forwarding Mapping n KUCG Iterate over source image y v Rotate -30 u kucg. korea. ac. kr x Graphics Lab @ Korea University
Forwarding Mapping – NOT n KUCG Iterate over source image Many source pixels can map to same destination pixel y v Rotate -30 u kucg. korea. ac. kr x Graphics Lab @ Korea University
Forwarding Mapping – NOT n Iterate over source image Many source pixels can map to same destination pixel KUCG Some destination pixels may not be covered y v Rotate -30 u kucg. korea. ac. kr x Graphics Lab @ Korea University
Image Warping Implementation II n KUCG Reverse mapping for(int x=0; x<xmax; x++) { for(int y=0; y<ymax; y++) { float u = fx-1(x, y); float v = fy-1(x, y); dst(x, y) = src(u, v); } } (u, v) Source Image kucg. korea. ac. kr f (x, y) Destination Image Graphics Lab @ Korea University
Reverse Mapping n KUCG Iterate over destination image At least, no pixel in destination goes empty n Must resample source n May oversample, but much simpler n y v Rotate -30 u kucg. korea. ac. kr x Graphics Lab @ Korea University
Resampling n KUCG Evaluate source image at arbitrary (u, v) Usually (u, v) is not an integer (u, v) Source Image kucg. korea. ac. kr (x, y) Destination Image Graphics Lab @ Korea University
Overview n KUCG Mapping Forward n Reverse n n Resampling Point sampling n Triangle filter n Gaussian filter n kucg. korea. ac. kr Graphics Lab @ Korea University
Point Sampling n KUCG Take value at closest pixel n int iu = trunc(u+0. 5); int iv = trunc(v+0. 5); dst(x, y) = src(iu, iv); This method is simple, but it causes aliasing y v F u kucg. korea. ac. kr x Graphics Lab @ Korea University
Triangle Filtering n KUCG Convolve with triangle filter Input kucg. korea. ac. kr Output Graphics Lab @ Korea University
Triangle Filtering n KUCG Bilinearly interpolate four closest pixels a = linear interpolation of src(u 1, v 2) and src(u 2, v 2) n b = linear interpolation of src(u 1, v 1) and src(u 2, v 1) n dst(x, y) = linear interpolation of “a” and “b” n a (u 1, v 2) (u 2, v 2) (u, v) (u 1, v 1) (u 2, v 1) b kucg. korea. ac. kr Graphics Lab @ Korea University
Gaussian Filtering n KUCG Convolve with Gaussian filter Input Output Width of Gaussian kernel affects bluriness kucg. korea. ac. kr Graphics Lab @ Korea University
Gaussian Filtering n KUCG Compute weighted sum of pixel neighborhood : n Weights are normalized values of Gaussian function r (u, v) kucg. korea. ac. kr Graphics Lab @ Korea University
Filtering Methods Comparison n KUCG Trade-offs Aliasing versus blurring n Computation speed n Point kucg. korea. ac. kr Bilinear Gaussian Graphics Lab @ Korea University
Image Warping Implementation III n KUCG Reverse mapping for(int x=0; x<xmax; x++) { for(int y=0; y<ymax; y++) { float u = fx-1(x, y); float v = fy-1(x, y); dst(x, y) = resample_src(u, v, w); } } (u, v) f Source Image kucg. korea. ac. kr (x, y) Destination Image Graphics Lab @ Korea University
Image Warping Implementation III n KUCG Reverse mapping for(int x=0; x<xmax; x++) { for(int y=0; y<ymax; y++) { float u = fx-1(x, y); float v = fy-1(x, y); dst(x, y) = resample_src(u, v, w); } } (u, v) f w Source Image kucg. korea. ac. kr (x, y) Destination Image Graphics Lab @ Korea University
Example: Scale n KUCG Scale (src, dst, sx, sy) : float w ≈ max(1/sx, 1/sy) for(int x=0; x<xmax; x++) { for(int y=0; y<ymax; y++) { float u = x/sx ; float v = y/sy; dst(x, y) = resample_src(u, v, w); } v y } (u, v) Scale 0. 5 (x, y) u kucg. korea. ac. kr x Graphics Lab @ Korea University
Example: Rotate n KUCG Rotate (src, dst, theta) for(int x=0; x<xmax; x++) { for(int y=0; y<ymax; y++) { float u = x*cos(-θ)-y*sin(-θ) float v = x*sin(-θ)+y*cos(-θ) dst(x, y) = resample_src(u, v, w); } y v } (x, y) (u, v) Rotate 30 u kucg. korea. ac. kr x Graphics Lab @ Korea University
Example: Fun n KUCG Swirl (src, dst, theta) for(int x=0; x<xmax; x++) { for(int y=0; y<ymax; y++) { float u = rot(dist(x, xcenter)*θ) float v = rot(dist(y, ycenter)*θ) dst(x, y) = resample_src(u, v, w); } v } (u, v) y (x, y) Swirl 45 u kucg. korea. ac. kr x Graphics Lab @ Korea University
- Point processing operations
- Point processing in image enhancement
- Histogram processing in digital image processing
- Neighborhood processing in digital image processing
- Point processing
- Morphological processing in digital image processing
- Translate
- Noise
- Spatial and temporal redundancy in digital image processing
- Image segmentation in digital image processing
- Fidelity criteria in image compression
- Image sharpening in digital image processing
- Geometric transformation in digital image processing
- Image formation model in digital image processing ppt
- Image transform in digital image processing
- Image geometry in digital image processing
- Image restoration in digital image processing
- Kucg
- Kucg
- Kucg
- Kucg
- Kucg
- Ekucg
- Kucg
- Ekucg
- Kucg
- Kucg
- Kucg
- Kucg
- Translate
- Bottom-up processing example
- Gloria suarez
- Bottom up processing example
- What is secondary processing of food
- Parallel processing vs concurrent processing
- Top down processing vs bottom up processing
- What is interactive processing
- Vertex processing in computer graphics
- Graphics processing unit
- Gpu rasterization
- Graphic monitor and workstation in computer graphics
- 3d viewing devices in computer graphics ppt
- Image processing place.com
- Fourier transform formula
- Topological descriptors in image processing
- Flood fill algorithm are used to fill the
- Spatial operations in image processing
- Opening image processing
- Idl fft
- Aliasing image processing
- Representation and description in digital image processing
- Computer vision vs image processing
- Threshold image matlab
- Ipp image processing
- Renender
- Orthogonal transformation in image processing
- Introduction to digital image processing
- Frequency domain image
- Intensity level slicing matlab
- Some basic relationships between pixels
- Intensity transform functions
- Zooming and shrinking of digital images
- Image maps are of two types
- Hit or miss transformation in image processing
- Histogram modified .ex5
- A function
- Processing
- Bf image processing
- Image processing lecture notes
- Image processing
- Gray level transformation in digital image processing