白平衡 opencv

https://docs.opencv.org/master/d7/d71/classcv_1_1xphoto_1_1GrayworldWB.html#details

https://docs.opencv.org/master/d9/dcd/white__balance_8hpp.html

Gray-world white balance algorithm.

白平衡算法是灰度世界法

More sophisticated learning-based automatic white balance algorithm

A simple white balance algorithm that works by independently stretching each of the input image channels to the specified range. For increased robustness it ignores the top and bottom p% of pixel values.

    //灰度世界算法
    Ptr<xphoto::WhiteBalancer> grayWB = xphoto::createGrayworldWB();
    grayWB->balanceWhite(inputImage, grayWBImage);

    //完美反射算法
    Ptr<xphoto::WhiteBalancer> simpleWB = xphoto::createSimpleWB();
    simpleWB->balanceWhite(inputImage, simpleWBImage);

pcl@pclrov:~/catws/opencv_contrib$ find  . -name "*.cpp" | xargs grep "balanceWhite"
./modules/xphoto/samples/color_balance.cpp:    wb->balanceWhite(src, res);
./modules/xphoto/test/simple_color_balance.cpp:            wb->balanceWhite(src, currentResult);
./modules/xphoto/test/simple_color_balance.cpp:        wb->balanceWhite(test, test);
./modules/xphoto/test/test_grayworld.cpp:            wb->balanceWhite(src, currentResult);
./modules/xphoto/test/test_grayworld.cpp:            wb->balanceWhite(src_16U, currentResult_16U);
./modules/xphoto/src/learning_based_color_balance.cpp:    void balanceWhite(InputArray _src, OutputArray _dst) CV_OVERRIDE
./modules/xphoto/src/simple_color_balance.cpp:void balanceWhiteSimple(std::vector<Mat_<T> > &src, Mat &dst, const float inputMin, const float inputMax,
./modules/xphoto/src/simple_color_balance.cpp:    void balanceWhite(InputArray _src, OutputArray _dst) CV_OVERRIDE
./modules/xphoto/src/simple_color_balance.cpp:            balanceWhiteSimple(mv, dst, inputMin, inputMax, outputMin, outputMax, p);
./modules/xphoto/src/simple_color_balance.cpp:            balanceWhiteSimple(mv, dst, inputMin, inputMax, outputMin, outputMax, p);
./modules/xphoto/src/simple_color_balance.cpp:            balanceWhiteSimple(mv, dst, inputMin, inputMax, outputMin, outputMax, p);
./modules/xphoto/src/simple_color_balance.cpp:            balanceWhiteSimple(mv, dst, inputMin, inputMax, outputMin, outputMax, p);
./modules/xphoto/src/grayworld_white_balance.cpp:    void balanceWhite(InputArray _src, OutputArray _dst) CV_OVERRIDE
./modules/xphoto/perf/perf_grayworld.cpp:    TEST_CYCLE() wb->balanceWhite(src, dst);
./modules/xphoto/perf/perf_learning_based_color_balance.cpp:    TEST_CYCLE() wb->balanceWhite(src, dst);
pcl@pclrov:~/catws/opencv_contrib$

pcl@pclrov:~/catws/opencv_contrib$ find  . -name "*.cpp" | xargs grep "balanceWhite"
./modules/xphoto/samples/color_balance.cpp:    wb->balanceWhite(src, res);
./modules/xphoto/test/simple_color_balance.cpp:            wb->balanceWhite(src, currentResult);
./modules/xphoto/test/simple_color_balance.cpp:        wb->balanceWhite(test, test);
./modules/xphoto/test/test_grayworld.cpp:            wb->balanceWhite(src, currentResult);
./modules/xphoto/test/test_grayworld.cpp:            wb->balanceWhite(src_16U, currentResult_16U);
./modules/xphoto/src/learning_based_color_balance.cpp:    void balanceWhite(InputArray _src, OutputArray _dst) CV_OVERRIDE
./modules/xphoto/src/simple_color_balance.cpp:void balanceWhiteSimple(std::vector<Mat_<T> > &src, Mat &dst, const float inputMin, const float inputMax,
./modules/xphoto/src/simple_color_balance.cpp:    void balanceWhite(InputArray _src, OutputArray _dst) CV_OVERRIDE
./modules/xphoto/src/simple_color_balance.cpp:            balanceWhiteSimple(mv, dst, inputMin, inputMax, outputMin, outputMax, p);
./modules/xphoto/src/simple_color_balance.cpp:            balanceWhiteSimple(mv, dst, inputMin, inputMax, outputMin, outputMax, p);
./modules/xphoto/src/simple_color_balance.cpp:            balanceWhiteSimple(mv, dst, inputMin, inputMax, outputMin, outputMax, p);
./modules/xphoto/src/simple_color_balance.cpp:            balanceWhiteSimple(mv, dst, inputMin, inputMax, outputMin, outputMax, p);
./modules/xphoto/src/grayworld_white_balance.cpp:    void balanceWhite(InputArray _src, OutputArray _dst) CV_OVERRIDE
./modules/xphoto/perf/perf_grayworld.cpp:    TEST_CYCLE() wb->balanceWhite(src, dst);
./modules/xphoto/perf/perf_learning_based_color_balance.cpp:    TEST_CYCLE() wb->balanceWhite(src, dst);
pcl@pclrov:~/catws/opencv_contrib$ 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值