Ask Your Question

ashok's profile - activity

2016-01-25 21:08:15 -0600 received badge  Student (source)
2015-06-25 01:20:59 -0600 received badge  Scholar (source)
2015-06-23 06:12:20 -0600 commented answer How to increase the text brightness opencv c++

Thanks for the code.

2015-06-23 06:10:40 -0600 commented answer How to change the background of scanned document in opencv c++

thak you for the code.

2015-06-22 07:38:47 -0600 commented question How to increase the text brightness opencv c++

If i use Histogram equalization document is converted to gray color. My document have somany color of text . I am tried with 3rd solution, it's changed the actual color of text. Please give me any other suggestions.

2015-06-22 06:04:52 -0600 asked a question How to increase the text brightness opencv c++

This is output image:C:\fakepath\Screen Shot 2015-06-22 at 6.57.01 pm.png

This 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);
2015-06-22 05:13:02 -0600 commented question How to change the background of scanned document in opencv c++

Threshold is not working. I am tried with this code cv::threshold(imgH, imgH, 245, 255, CV_THRESH_TRUNC); And also tried with CV_THRESH_BINARY. both are not working. Actually this not my full image, I cropped the one letter from my output text document.

2015-06-19 02:42:00 -0600 received badge  Editor (source)
2015-06-18 05:09:31 -0600 received badge  Enthusiast
2015-06-09 04:31:18 -0600 asked a question How to change the background of scanned document in opencv c++

C:\fakepath\Screen Shot 2015-06-19 at 7.57.23 pm.png

I can removed the background from outside of my image (O).how to remove the background gray color inside circle of image.

Here is my code.

//src have my actual mat object image.

cv::Mat source(src.rows, src.cols,CV_8UC1);
cv::addWeighted(src, 2.5, src, -1, 2.0, source);
cv::GaussianBlur(source, imgH, cv::Size(5, 5), cv::BORDER_WRAP);
cv::cvtColor(imgH,imgH,CV_BGR2RGB);

imgH = imgH + cvScalar(-50, -50, -50);

//Now replace the black background with white color
cv::floodFill(imgH, cv::Point(10,10), cv::Scalar(255,255,255), (cv::Rect*)0, cv::Scalar(), cv::Scalar(255,255,255));
cv::floodFill(imgH, cv::Point(imgH.cols-10 ,10), cv::Scalar(255,255,255), (cv::Rect*)0, cv::Scalar(), cv::Scalar(255,255,255));

cv::floodFill(imgH, cv::Point(10,imgH.rows-10), cv::Scalar(255,255,255), (cv::Rect*)0, cv::Scalar(), cv::Scalar(255,255,255));
cv::floodFill(imgH, cv::Point(imgH.cols-10,imgH.rows-10), cv::Scalar(255,255,255), (cv::Rect*)0, cv::Scalar(), cv::Scalar(255,255,255));