18 #ifndef PIC_METRICS_LOG_RMSE_HPP 19 #define PIC_METRICS_LOG_RMSE_HPP 23 #include "../base.hpp" 24 #include "../image.hpp" 25 #include "../util/math.hpp" 26 #include "../metrics/base.hpp" 38 if(ori == NULL || cmp == NULL) {
50 int size = ori->
size();
54 for(
int i = 0; i < size; i++) {
55 if(ori->
data[i] > 0.0f && cmp->
data[i] > 0.0f) {
63 acc = acc / double(counter);
int size() const
size computes the number of values.
Definition: image.hpp:481
float * data
data is the main buffer where pixel values are stored.
Definition: image.hpp:91
PIC_INLINE int log2(int n)
log2 computes logarithm in base 2 for integers.
Definition: math.hpp:302
PIC_INLINE double logRMSE(Image *ori, Image *cmp)
logRMSE computes root mean square error (RMSE) in the log_e domain.
Definition: log_rmse.hpp:36
bool isSimilarType(const Image *img)
isSimilarType checks if the current image is similar to img; i.e. if they have the same width...
#define PIC_INLINE
Definition: base.hpp:33
The Image class stores an image as buffer of float.
Definition: image.hpp:60
Definition: bilateral_separation.hpp:25
bool isValid()
isValid checks if the current image is valid, which means if they have an allocated buffer or not...