Skip to content

Commit

Permalink
image.cpp: fix MAE computation
Browse files Browse the repository at this point in the history
Fixes #442.
  • Loading branch information
mmp committed Oct 9, 2024
1 parent 2cc9d5b commit 710bc1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pbrt/util/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ ImageChannelValues Image::MAE(const ImageChannelDesc &desc, const Image &ref,
ImageChannelValues vref = ref.GetChannels({x, y}, refDesc);

for (int c = 0; c < desc.size(); ++c) {
double error = double(v[c]) - double(vref[c]);
double error = std::abs(double(v[c]) - double(vref[c]));
if (IsInf(error))
continue;
sumError[c] += error;
Expand Down

0 comments on commit 710bc1a

Please sign in to comment.