mirror of
https://github.com/opencv/opencv.git
synced 2025-06-12 20:42:53 +08:00
Fixed uninitialized value and naming
This commit is contained in:
parent
fd08d0d80d
commit
c72a855214
@ -60,6 +60,7 @@ namespace detail {
|
|||||||
class CV_EXPORTS_W ExposureCompensator
|
class CV_EXPORTS_W ExposureCompensator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
ExposureCompensator(): updateGain(true) {}
|
||||||
virtual ~ExposureCompensator() {}
|
virtual ~ExposureCompensator() {}
|
||||||
|
|
||||||
enum { NO, GAIN, GAIN_BLOCKS, CHANNELS, CHANNELS_BLOCKS };
|
enum { NO, GAIN, GAIN_BLOCKS, CHANNELS, CHANNELS_BLOCKS };
|
||||||
@ -189,7 +190,7 @@ public:
|
|||||||
CV_WRAP BlocksGainCompensator(int bl_width = 32, int bl_height = 32)
|
CV_WRAP BlocksGainCompensator(int bl_width = 32, int bl_height = 32)
|
||||||
: BlocksGainCompensator(bl_width, bl_height, 1) {}
|
: BlocksGainCompensator(bl_width, bl_height, 1) {}
|
||||||
CV_WRAP BlocksGainCompensator(int bl_width, int bl_height, int nr_feeds)
|
CV_WRAP BlocksGainCompensator(int bl_width, int bl_height, int nr_feeds)
|
||||||
: BlocksCompensator(bl_width, bl_height, nr_feeds) {setUpdateGain(true);}
|
: BlocksCompensator(bl_width, bl_height, nr_feeds) {}
|
||||||
|
|
||||||
void feed(const std::vector<Point> &corners, const std::vector<UMat> &images,
|
void feed(const std::vector<Point> &corners, const std::vector<UMat> &images,
|
||||||
const std::vector<std::pair<UMat,uchar> > &masks) CV_OVERRIDE;
|
const std::vector<std::pair<UMat,uchar> > &masks) CV_OVERRIDE;
|
||||||
@ -210,7 +211,7 @@ class CV_EXPORTS_W BlocksChannelsCompensator : public BlocksCompensator
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CV_WRAP BlocksChannelsCompensator(int bl_width=32, int bl_height=32, int nr_feeds=1)
|
CV_WRAP BlocksChannelsCompensator(int bl_width=32, int bl_height=32, int nr_feeds=1)
|
||||||
: BlocksCompensator(bl_width, bl_height, nr_feeds) {setUpdateGain(true);}
|
: BlocksCompensator(bl_width, bl_height, nr_feeds) {}
|
||||||
|
|
||||||
void feed(const std::vector<Point> &corners, const std::vector<UMat> &images,
|
void feed(const std::vector<Point> &corners, const std::vector<UMat> &images,
|
||||||
const std::vector<std::pair<UMat,uchar> > &masks) CV_OVERRIDE;
|
const std::vector<std::pair<UMat,uchar> > &masks) CV_OVERRIDE;
|
||||||
|
@ -62,11 +62,10 @@ Ptr<ExposureCompensator> ExposureCompensator::createDefault(int type)
|
|||||||
e = makePtr<ChannelsCompensator>();
|
e = makePtr<ChannelsCompensator>();
|
||||||
else if (type == CHANNELS_BLOCKS)
|
else if (type == CHANNELS_BLOCKS)
|
||||||
e = makePtr<BlocksChannelsCompensator>();
|
e = makePtr<BlocksChannelsCompensator>();
|
||||||
|
|
||||||
if (e.get() != nullptr)
|
if (e.get() != nullptr)
|
||||||
{
|
|
||||||
e->setUpdateGain(true);
|
|
||||||
return e;
|
return e;
|
||||||
}
|
|
||||||
CV_Error(Error::StsBadArg, "unsupported exposure compensation method");
|
CV_Error(Error::StsBadArg, "unsupported exposure compensation method");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user