Lut -> LutBase
This commit is contained in:
@@ -69,7 +69,7 @@ Array<Coord<2>, kColorCheckerSrgb.size()> FindClosest(const Image<X, Y, C>& imag
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <int32_t X, int32_t Y, int32_t C>
|
template <int32_t X, int32_t Y, int32_t C>
|
||||||
int32_t ScoreLut(const Image<X, Y, C>& image, const Lut& lut) {
|
int32_t ScoreLut(const Image<X, Y, C>& image, const LutBase& lut) {
|
||||||
static_assert(C == 3);
|
static_assert(C == 3);
|
||||||
|
|
||||||
Array<int32_t, kColorCheckerSrgb.size()> diff;
|
Array<int32_t, kColorCheckerSrgb.size()> diff;
|
||||||
|
|||||||
2
lut.cc
2
lut.cc
@@ -1,4 +1,4 @@
|
|||||||
#include "lut.h"
|
#include "lut.h"
|
||||||
|
|
||||||
Lut::~Lut() {
|
LutBase::~LutBase() {
|
||||||
}
|
}
|
||||||
|
|||||||
12
lut.h
12
lut.h
@@ -5,11 +5,11 @@
|
|||||||
#include "coord.h"
|
#include "coord.h"
|
||||||
#include "image.h"
|
#include "image.h"
|
||||||
|
|
||||||
class Lut {
|
class LutBase {
|
||||||
public:
|
public:
|
||||||
Lut() = default;
|
LutBase() = default;
|
||||||
Lut(const Lut&) = default;
|
LutBase(const LutBase&) = default;
|
||||||
virtual ~Lut();
|
virtual ~LutBase();
|
||||||
|
|
||||||
virtual Color<3> MapColor(const Color<3>& in) const = 0;
|
virtual Color<3> MapColor(const Color<3>& in) const = 0;
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ class Lut {
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <int32_t X, int32_t Y, int32_t C>
|
template <int32_t X, int32_t Y, int32_t C>
|
||||||
std::unique_ptr<Image<X, Y, C>> Lut::MapImage(const Image<X, Y, C>& in) const {
|
std::unique_ptr<Image<X, Y, C>> LutBase::MapImage(const Image<X, Y, C>& in) const {
|
||||||
auto out = std::make_unique<Image<X, Y, C>>();
|
auto out = std::make_unique<Image<X, Y, C>>();
|
||||||
|
|
||||||
for (int32_t y = 0; y < Y; ++y) {
|
for (int32_t y = 0; y < Y; ++y) {
|
||||||
@@ -33,7 +33,7 @@ std::unique_ptr<Image<X, Y, C>> Lut::MapImage(const Image<X, Y, C>& in) const {
|
|||||||
|
|
||||||
|
|
||||||
template <int32_t X, int32_t Y, int32_t Z>
|
template <int32_t X, int32_t Y, int32_t Z>
|
||||||
class Lut3d : public Array<Array<Array<Color<3>, X>, Y>, Z>, public Lut {
|
class Lut3d : public Array<Array<Array<Color<3>, X>, Y>, Z>, public LutBase {
|
||||||
public:
|
public:
|
||||||
static Lut3d<X, Y, Z> Identity();
|
static Lut3d<X, Y, Z> Identity();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user