How to increase the text brightness of text document using opencv c++ in IOS.I am changed the text document color to white, text is display very light. Thanks in advance.
1 | initial version |
How to increase the text brightness of text document using opencv c++ in IOS.I am changed the text document color to white, text is display very light. Thanks in advance.
2 | No.2 Revision |
This actual image:C:\fakepath\Screen Shot 2015-06-22 at 6.57.01 pm.png
This is output image: C:\fakepath\Screen Shot 2015-06-22 at 6.56.20 pm.png
How to increase the text brightness of text document using opencv c++ in IOS.I am changed the text document color to white, text is display very light. Thanks in advance.
cv::Mat lab_image; cv::cvtColor(src, lab_image, CV_BGR2Lab);
// Extract the L channel
std::vector<cv::Mat> lab_planes(3);
cv::split(lab_image, lab_planes); // now we have the L image in lab_planes[0]
// apply the CLAHE algorithm to the L channel
cv::Ptr<cv::CLAHE> clahe = cv::createCLAHE();
clahe->setClipLimit(4);
cv::Mat dst;
clahe->apply(lab_planes[0], dst);
// Merge the the color planes back into an Lab image
dst.copyTo(lab_planes[0]);
cv::merge(lab_planes, lab_image);
// convert back to RGB
cv::Mat imgH;
cv::cvtColor(lab_image, imgH, CV_Lab2BGR);
3 | No.3 Revision |
This actual is output image:C:\fakepath\Screen Shot 2015-06-22 at 6.57.01 pm.png
This is output actual image:
C:\fakepath\Screen Shot 2015-06-22 at 6.56.20 pm.png
How to increase the text brightness of text document using opencv c++ in IOS.I am changed the text document color to white, text is display very light. Thanks in advance.
cv::Mat lab_image; cv::cvtColor(src, lab_image, CV_BGR2Lab);
// Extract the L channel
std::vector<cv::Mat> lab_planes(3);
cv::split(lab_image, lab_planes); // now we have the L image in lab_planes[0]
// apply the CLAHE algorithm to the L channel
cv::Ptr<cv::CLAHE> clahe = cv::createCLAHE();
clahe->setClipLimit(4);
cv::Mat dst;
clahe->apply(lab_planes[0], dst);
// Merge the the color planes back into an Lab image
dst.copyTo(lab_planes[0]);
cv::merge(lab_planes, lab_image);
// convert back to RGB
cv::Mat imgH;
cv::cvtColor(lab_image, imgH, CV_Lab2BGR);