Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any limitation about FFCC algorithms? #6

Open
gonglixue opened this issue Oct 11, 2022 · 0 comments
Open

Is there any limitation about FFCC algorithms? #6

gonglixue opened this issue Oct 11, 2022 · 0 comments

Comments

@gonglixue
Copy link

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;
}
@gonglixue gonglixue changed the title Is there any limitations about FFCC algorithms? Is there any limitation about FFCC algorithms? Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant