Skip to content
Snippets Groups Projects
Commit b1cd1299 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Add local whitebalance

parent c62b97db
No related branches found
No related tags found
1 merge request!41Add automated matching to registration app
Pipeline #11663 passed
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "local.hpp" #include "local.hpp"
#include <opencv2/core.hpp> #include <opencv2/core.hpp>
#include <opencv2/opencv.hpp> #include <opencv2/opencv.hpp>
#include <opencv2/xphoto.hpp>
using ftl::rgbd::detail::LocalSource; using ftl::rgbd::detail::LocalSource;
using cv::Mat; using cv::Mat;
...@@ -269,6 +270,11 @@ bool LocalSource::get(cv::Mat &l, cv::Mat &r) { ...@@ -269,6 +270,11 @@ bool LocalSource::get(cv::Mat &l, cv::Mat &r) {
0, 0, cv::INTER_LINEAR); 0, 0, cv::INTER_LINEAR);
} }
cv::Ptr<cv::xphoto::WhiteBalancer> wb;
wb = cv::xphoto::createSimpleWB();
wb->balanceWhite(l, l);
wb->balanceWhite(r, r);
if (flip_v_) { if (flip_v_) {
Mat tl, tr; Mat tl, tr;
cv::flip(l, tl, 0); cv::flip(l, tl, 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment