1.3.64
 
Loading...
Searching...
No Matches
LensFlare Class Reference

Class for computing physically-based lens flare effects. More...

#include <LensFlare.h>

Public Member Functions

 LensFlare (const LensFlareProperties &lens_flare_props, helios::int2 resolution)
 Constructor.
 
void apply (std::map< std::string, std::vector< float > > &pixel_data, helios::int2 resolution)
 Apply lens flare effect to image data.
 
std::vector< std::tuple< int, int, float > > findBrightPixels (const std::map< std::string, std::vector< float > > &pixel_data, helios::int2 resolution, float threshold) const
 Find bright pixels that will generate lens flare.
 

Detailed Description

Class for computing physically-based lens flare effects.

Implements lens flare rendering using two components:

  1. Ghost reflections - Internal lens reflections computed using Fresnel equations
  2. Starburst diffraction - Aperture diffraction pattern computed via FFT

Definition at line 35 of file LensFlare.h.

Constructor & Destructor Documentation

◆ LensFlare()

LensFlare::LensFlare ( const LensFlareProperties lens_flare_props,
helios::int2  resolution 
)

Constructor.

Parameters
[in]lens_flare_propsLens flare rendering properties
[in]resolutionCamera resolution (width, height)

Definition at line 27 of file LensFlare.cpp.

Member Function Documentation

◆ apply()

void LensFlare::apply ( std::map< std::string, std::vector< float > > &  pixel_data,
helios::int2  resolution 
)

Apply lens flare effect to image data.

Applies both ghost reflections and starburst diffraction to the camera image.

Parameters
[in,out]pixel_dataMap of band labels to pixel intensity vectors
[in]resolutionImage resolution (width, height)

Definition at line 39 of file LensFlare.cpp.

◆ findBrightPixels()

std::vector< std::tuple< int, int, float > > LensFlare::findBrightPixels ( const std::map< std::string, std::vector< float > > &  pixel_data,
helios::int2  resolution,
float  threshold 
) const

Find bright pixels that will generate lens flare.

Parameters
[in]pixel_dataMap of band labels to pixel intensity vectors
[in]resolutionImage resolution
[in]thresholdMinimum intensity threshold (0-1)
Returns
Vector of (x, y, intensity) tuples for bright pixels

Definition at line 62 of file LensFlare.cpp.


The documentation for this class was generated from the following files: