Professional Documents
Culture Documents
Multiscaleretinex
Multiscaleretinex
Multiscaleretinex
#include <opencv2/opencv.hpp>
if (image.empty()) {
cerr << "Error: Couldn't load image at " << imagePath << endl;
exit(EXIT_FAILURE);
return image;
Mat retinexImage;
vector<Mat> channels;
split(inputImage, channels);
Mat logImage;
log(channels[i] + 1, logImage);
Mat blurredImage;
merge(channels, retinexImage);
return retinexImage;
Mat enhancedImage;
sigmoid(sigmoidInput, enhancedImage);
return enhancedImage;
int main() {
waitKey(0);
return 0;