Convolution (FFT) Bloom

Slides:



Advertisements
Similar presentations
David Hansen and James Michelussi
Advertisements

Computer Vision Lecture 7: The Fourier Transform
3-D Computational Vision CSc Image Processing II - Fourier Transform.
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 4: Image Processing 1 Ravi Ramamoorthi
Advanced Computer Graphics CSE 190 [Spring 2015], Lecture 4 Ravi Ramamoorthi
Fourier Transform A Fourier Transform is an integral transform that re-expresses a function in terms of different sine waves of varying amplitudes, wavelengths,
Fourier Transform – Chapter 13. Image space Cameras (regardless of wave lengths) create images in the spatial domain Pixels represent features (intensity,
Lecture 2: Filtering CS4670/5670: Computer Vision Kavita Bala.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi Some slides.
Lecture #17 INTRODUCTION TO THE FAST FOURIER TRANSFORM ALGORITHM Department of Electrical and Computer Engineering Carnegie Mellon University Pittsburgh,
Image Filtering CS485/685 Computer Vision Prof. George Bebis.
Reminder Fourier Basis: t  [0,1] nZnZ Fourier Series: Fourier Coefficient:
General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F(  ) is the spectrum of the function.
Digital Image Processing Chapter 4: Image Enhancement in the Frequency Domain.
Introduction to Fast Fourier Transform (FFT) Algorithms R.C. Maher ECEN4002/5002 DSP Laboratory Spring 2003.
Advanced Computer Graphics (Spring 2006) COMS 4162, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi
Reconfigurable Computing S. Reda, Brown University Reconfigurable Computing (EN2911X, Fall07) Lecture 16: Application-Driven Hardware Acceleration (1/4)
Image Enhancement.
Acceleration on many-cores CPUs and GPUs Dinesh Manocha Lauri Savioja.
Image Analysis Preprocessing Arithmetic and Logic Operations Spatial Filters Image Quantization.
Advanced Computer Graphics (Spring 2005) COMS 4162, Lecture 3: Sampling and Reconstruction Ravi Ramamoorthi
Transforms: Basis to Basis Normal Basis Hadamard Basis Basis functions Method to find coefficients (“Transform”) Inverse Transform.
Topic 7 - Fourier Transforms DIGITAL IMAGE PROCESSING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
Presentation Image Filters
: Chapter 14: The Frequency Domain 1 Montri Karnjanadecha ac.th/~montri Image Processing.
Multimedia Data Introduction to Image Processing Dr Sandra I. Woolley Electronic, Electrical.
Part I: Image Transforms DIGITAL IMAGE PROCESSING.
09/19/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Dithering.
October 29, 2013Computer Vision Lecture 13: Fourier Transform II 1 The Fourier Transform In the previous lecture, we discussed the Hough transform. There.
7- 1 Chapter 7: Fourier Analysis Fourier analysis = Series + Transform ◎ Fourier Series -- A periodic (T) function f(x) can be written as the sum of sines.
Sejong Univ. CH3. Area Processes Convolutions Blurring Sharpening Averaging vs. Median Filtering.
Fourier Transform.
G52IIP, School of Computer Science, University of Nottingham 1 Image Transforms Basic idea Input Image, I(x,y) (spatial domain) Mathematical Transformation.
Lecture 1: Images and image filtering CS4670/5670: Intro to Computer Vision Noah Snavely Hybrid Images, Oliva et al.,
Filters– Chapter 6. Filter Difference between a Filter and a Point Operation is that a Filter utilizes a neighborhood of pixels from the input image to.
The Frequency Domain Digital Image Processing – Chapter 8.
Digital Image Processing Lecture 8: Image Enhancement in Frequency Domain II Naveed Ejaz.
1 “A picture speaks a thousand words.” Art By Ranjith & Waquas Islamiah Evening College.
A novel approach to visualizing dark matter simulations
Digital Image Processing Lecture 8: Fourier Transform Prof. Charlene Tsai.
Advanced Computer Graphics
Generalized and Hybrid Fast-ICA Implementation using GPU
Advanced Computer Graphics
FOURIER THEORY: KEY CONCEPTS IN 2D & 3D
Real-Time Soft Shadows with Adaptive Light Source Sampling
DIGITAL SIGNAL PROCESSING ELECTRONICS
Deferred Lighting.
Sampling Theorem & Antialiasing
Miguel Tavares Coimbra
General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F() is the spectrum of the function.
Fourier Transform.
All about convolution.
ENG4BF3 Medical Image Processing
Lecture #17 INTRODUCTION TO THE FAST FOURIER TRANSFORM ALGORITHM
CSCE 643 Computer Vision: Thinking in Frequency
Image Processing, Leture #14
Static Image Filtering on Commodity Graphics Processors
4. Image Enhancement in Frequency Domain
Z TRANSFORM AND DFT Z Transform
Digital Image Processing
HKN ECE 210 Exam 3 Review Session
Adaptive Filter A digital filter that automatically adjusts its coefficients to adapt input signal via an adaptive algorithm. Applications: Signal enhancement.
Fourier Transforms.
Lecture 2: Image filtering
Lecture 1: Images and image filtering
Intensity Transformation
Lecture #17 INTRODUCTION TO THE FAST FOURIER TRANSFORM ALGORITHM
Deblurring Shaken and Partially Saturated Images
The Frequency Domain Any wave shape can be approximated by a sum of periodic (such as sine and cosine) functions. a--amplitude of waveform f-- frequency.
Presentation transcript:

Convolution (FFT) Bloom David Hill Principal Mathematician Epic Games 5/25/2017

Bloom: Why Invest? A convincing bloom adds subtle but impactful physically motivated effect. Currently feasible on today’s high end hardware.. Adapt film / offline approach for use in real time Additional realism with highly detailed effects Provide ability to customize the camera / eye response Target Cinematics and High End hardware

Bloom As Weak Scattering Weak Scattering: Some Causes Haze Car Windshield (mine is always a little dirty) Eyelash Diffraction Inner-Camera Effects Fraunhofer Diffraction Physically-Based Glare Effects for Digital Images (1995, Spencer et al) Glare Generation Based on Wave Optics (2004, Kakimoto et al, Computer Graphics Forum)

Bloom As Weak Scattering A single pin point remains mostly focused Model Assumptions: Every point of light is scattered the same For most sources the scattered amount is imperceptible The scattering from bright sources creates “bloom” In Camera scattering of a point

Bloom: Standard Game-Style Weak Scattering Sum of Gaussian Filter Image down-sampled multiple times and Gaussian Blur applied Resulting images are summed and added to original Every pixel scatters light in a symmetric way to its neighbors Very Fast! But... Standard Bloom in UE4: Recommended for game use

Bloom As Weak Scattering The camera response to a single bright source: Close Up of center Center pixel about 10,000 times brighter than any other point in this .exr Camera scattering of point Appears to be a very small star Full image, adjusted contrast Detail extents far across image!

Bloom Scatter As Gather: Convolution View this as a weighted sum, here in one dimension : Original Value Filtered Value Filter Each Pixel Scatters to all the others according to the filter. For Example, simple smoothing

Bloom Scatter As Gather: Convolution Every point is weighted sum of all other points N points gather from all N points. O(N^2) We need a faster way! -> FFT

Bloom Scatter As Gather: Convolution Convolution With Fast Fourier Transform: Image_Frequencies = FFT(Image) Filter_Frequencies = FFT(Filter) Convolved_Frequencies = Image_Frequencies x Filter_Freqencies Convolved_Image = InverseFFT(Convolved_Frequencies)

Bloom: Why FFT Convolution? Better Scaling FFT from signal to frequencies - O(N Log N) Convolution in frequency space - O(N) FFT from frequencies to signal - O(N Log N) Overall Scaling O(N Log N) For our purposes, the Fast Fourier Transform (FFT) is an acceleration technique for convolution.

Bloom: What is Fourier Transform? Any finite length signal can be expresses as a sum of sines and cosines Signal Amplitude of each frequency Sine & Cos Inverse computes amplitudes of each frequency Low-Pass filter: only used first few V_k

Bloom: Fast Fourier Transform? Sines and Cosines have symmetries that can be exploited speeding the transform Split the sum into even and odd terms, and symmetry saves work! Now recurse, each small transform (Even, Odd) and be treated as new transforms And subdivided. Due to this splitting FFT does best with power_2 signals.

Bloom : Parallel FFT for GPU GPU: Highly parallel, but with thread-communication limitations. Similar restriction are found in supercomputing architectures. Stockham Formulation: Parallel formulation Used for Vector Computers (1987 D Baily, Journal of Supercomputer Applications) Applied to GPUs (2008 Govindaraju, Proceedings of ACM/IEEE on Supercomputing) Our implementation largely follow this Each Scanline Transformed independently Assigned to a thread group with group shared memory

Bloom: Compute Shaders FFT implemented as compute shaders Pass Forward Horizontal Transform Uses 2-for-1 trick to transform (r,g) and (b,a) Forward Vertical Transform Convolution, i.e. Multiply, with cached pre-transformed Kernel Inverse Vertical Transform Inverse Horizontal Transform Inverts 2-for-1 trick From GPUVisualizer