|
Path Tracer
|
#include "Picture.h"Functions | |
| DoubleVec3D | toneMapping (const DoubleVec3D &radiance, double middleGrey) |
| Converts a radiance to a colour value. More... | |
| DoubleVec3D | getColourMovingAverage (const std::vector< std::vector< DoubleVec3D >> &pixelValues, unsigned int pixelX, unsigned int pixelY, unsigned int size) |
| Computes the value of a pixel when having applied a moving average. More... | |
| void | to_json (json &j, const Picture &picture) |
| Conversion to json. More... | |
| Picture | importPictureFromJson (const json &j) |
| Imports a picture out of json. More... | |
| DoubleVec3D getColourMovingAverage | ( | const std::vector< std::vector< DoubleVec3D >> & | pixelValues, |
| unsigned int | pixelX, | ||
| unsigned int | pixelY, | ||
| unsigned int | size | ||
| ) |
Computes the value of a pixel when having applied a moving average.
| pixelValues | The values of all pixels (can be radiance or colour value, depending whether you first use the toneMapping function or not). |
| pixelX | The x coordinate of the pixel. |
| pixelY | the y coordinate of the pixel. |
| size | The size of the moving average. |
Imports a picture out of json.
| j | The json input. |
Conversion to json.
| j | Json output. |
| picture | The picture that will be converted to json. |
| DoubleVec3D toneMapping | ( | const DoubleVec3D & | radiance, |
| double | middleGrey | ||
| ) |
Converts a radiance to a colour value.
This is a very naive tone mapping. See my TM's report for more explanations.
| radiance | The radiance we want to convert. |
| middleGrey | The radiance value that corresponds to the middle-grey. |