opencv/modules/stitching/doc/exposure_compensation.rst

112 lines
3.9 KiB
ReStructuredText
Raw Normal View History

2012-01-19 10:43:13 +01:00
Exposure Compensation
=====================
.. highlight:: cpp
detail::ExposureCompensator
2012-01-19 10:43:13 +01:00
----------------------------
.. ocv:class:: detail::ExposureCompensator
2012-01-19 10:43:13 +01:00
Base class for all exposure compensators. ::
class CV_EXPORTS ExposureCompensator
{
public:
virtual ~ExposureCompensator() {}
enum { NO, GAIN, GAIN_BLOCKS };
static Ptr<ExposureCompensator> createDefault(int type);
void feed(const std::vector<Point> &corners, const std::vector<Mat> &images,
const std::vector<Mat> &masks);
virtual void feed(const std::vector<Point> &corners, const std::vector<Mat> &images,
const std::vector<std::pair<Mat,uchar> > &masks) = 0;
virtual void apply(int index, Point corner, Mat &image, const Mat &mask) = 0;
};
detail::ExposureCompensator::feed
2012-01-26 14:28:04 +01:00
----------------------------------
.. ocv:function:: void detail::ExposureCompensator::feed(const std::vector<Point> &corners, const std::vector<Mat> &images, const std::vector<Mat> &masks)
2012-01-26 14:28:04 +01:00
.. ocv:function:: void detail::ExposureCompensator::feed(const std::vector<Point> &corners, const std::vector<Mat> &images, const std::vector<std::pair<Mat,uchar> > &masks)
2012-01-26 14:28:04 +01:00
:param corners: Source image top-left corners
:param images: Source images
:param masks: Image masks to update (second value in pair specifies the value which should be used to detect where image is)
detil::ExposureCompensator::apply
2012-01-26 14:28:04 +01:00
----------------------------------
Compensate exposure in the specified image.
.. ocv:function:: void detail::ExposureCompensator::apply(int index, Point corner, Mat &image, const Mat &mask)
2012-01-26 14:28:04 +01:00
:param index: Image index
:param corner: Image top-left corner
:param image: Image to process
:param mask: Image mask
2012-01-19 10:43:13 +01:00
detail::NoExposureCompensator
-----------------------------
.. ocv:class:: detail::NoExposureCompensator : public detail::ExposureCompensator
2012-01-19 10:43:13 +01:00
Stub exposure compensator which does nothing. ::
class CV_EXPORTS NoExposureCompensator : public ExposureCompensator
{
public:
void feed(const std::vector<Point> &/*corners*/, const std::vector<Mat> &/*images*/,
const std::vector<std::pair<Mat,uchar> > &/*masks*/) {};
void apply(int /*index*/, Point /*corner*/, Mat &/*image*/, const Mat &/*mask*/) {};
};
.. seealso:: :ocv:class:`detail::ExposureCompensator`
2012-01-19 10:43:13 +01:00
detail::GainCompensator
-----------------------
.. ocv:class:: detail::GainCompensator : public detail::ExposureCompensator
2012-01-19 10:43:13 +01:00
2012-01-27 08:40:23 +01:00
Exposure compensator which tries to remove exposure related artifacts by adjusting image intensities, see [BL07]_ and [WJ10]_ for details. ::
2012-01-19 10:43:13 +01:00
class CV_EXPORTS GainCompensator : public ExposureCompensator
{
public:
void feed(const std::vector<Point> &corners, const std::vector<Mat> &images,
const std::vector<std::pair<Mat,uchar> > &masks);
void apply(int index, Point corner, Mat &image, const Mat &mask);
std::vector<double> gains() const;
private:
2012-01-27 08:40:23 +01:00
/* hidden */
2012-01-19 10:43:13 +01:00
};
.. seealso:: :ocv:class:`detail::ExposureCompensator`
2012-01-19 10:43:13 +01:00
detail::BlocksGainCompensator
-----------------------------
.. ocv:class:: detail::BlocksGainCompensator : public detail::ExposureCompensator
2012-01-19 10:43:13 +01:00
2012-01-27 08:40:23 +01:00
Exposure compensator which tries to remove exposure related artifacts by adjusting image block intensities, see [UES01]_ for details. ::
2012-01-19 10:43:13 +01:00
class CV_EXPORTS BlocksGainCompensator : public ExposureCompensator
{
public:
BlocksGainCompensator(int bl_width = 32, int bl_height = 32)
2012-01-19 10:43:13 +01:00
: bl_width_(bl_width), bl_height_(bl_height) {}
void feed(const std::vector<Point> &corners, const std::vector<Mat> &images,
const std::vector<std::pair<Mat,uchar> > &masks);
void apply(int index, Point corner, Mat &image, const Mat &mask);
private:
2012-01-27 08:40:23 +01:00
/* hidden */
2012-01-19 10:43:13 +01:00
};
.. seealso:: :ocv:class:`detail::ExposureCompensator`
2012-01-19 10:43:13 +01:00