GithubHelp home page GithubHelp logo

yuanxy92 / autowhitebalance Goto Github PK

View Code? Open in Web Editor NEW
43.0 43.0 16.0 9.58 MB

efficient and robust white balance algorithm

License: GNU General Public License v3.0

MATLAB 84.26% Python 0.28% TeX 0.56% C 1.55% M 0.02% CMake 0.20% C++ 13.13%

autowhitebalance's People

Contributors

yuanxy92 avatar zhu-ty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

autowhitebalance's Issues

Why double autoWB.apply() despite no differences in the result?

Hi, yuanxy92.
Thanks for your great implementation!
During my work, I have a question about Cpp implementation codes.
In Cpp/main.cpp Line 32 and 33, you did autoWB.apply() twice.
I commented one of them and found there was no difference in their results.
Do you have any reason to do so?

By the way, I think this function has typo: autoWB.apply() has to be autoWB.calc().
Thanks.

Is there any limitation about FFCC algorithms?

Hi yuan, thanks for your sharing.

I used your code to test my own images while the results look not good.
Is there any limitation about this method? PNG16 raw images are used for training. Does it work for normal 8bit image?

  • input image:

image

  • output image:

image

(I modified the funcion name in main.cpp. Is it a correct usage? )

int main(int argc, char* argv[]) {
	AutoWhiteBalance autoWB;
	autoWB.loadModel("E:/Project/AutoWhiteBalance/data/model/model.bin");

	cv::Mat img = cv::imread("E:/data/giga/NanshanIPark/2/calibrate/ref_00.jpg");
	cv::cuda::GpuMat img_d;
	img_d.upload(img);

	float gain_r, gain_g, gain_b;

	time_t begin, end;
	begin = clock();

	// autoWB.apply(img_d, gain_r, gain_g, gain_b);
	// autoWB.apply(img_d, gain_r, gain_g, gain_b);

        autoWB.calc(img_d, gain_r, gain_g, gain_b);

	end = clock();
	printf("Auto white balance update, cost %f milliseconds ...\n",
		static_cast<float>(end - begin) / static_cast<double>(CLOCKS_PER_SEC) * 1000);

	autoWB.applyWhiteBalance(img_d, gain_r, gain_g, gain_b);

	cv::Mat img2;
	img_d.download(img2);

	return 0;
}

Training data extension

Hi Yuan,

Thanks for the great work! Could you give some instructions about extending the training data?
The pretrained model is not really optimized for my image sensor. I would like to train the system specifically for the images captured by my image sensor.

Thanks!
Burak

How to run the calc_log_hist.m and visualize_hist.m?

I am trying to understand the "Convolutional Color Constancy" paper. Can you please comment and explain how is the log chroma histogram built and how to actually visualize it?
In the visualize_hist.m function, what is the input X and rho?
I only want to visualize the 2D log chroma histogram.

AutoWhiteBalance.Apply() is not found

Hi, yuan,
When I try to test main.cpp, I found that AutoWhiteBalance class does not comtain "Apply" function in main.cpp line 32. Is there something wrong with it?

ps, could you please share me your opencvConfig.cmake. When I cmake CMakeLists.txt, there is always something wrong with opencv.

Thank you very much.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.