OpenCV code/library to remove scanning artifacts [closed]

asked 2018-02-05 10:28:41 -0600

alexanoid gravatar image

I see a lot of questions on internet in order to remove the scanning artifacts/lines/background noise etc.. from images with help of OpenCV library. For example to prepare image for OCR process. Looks like this is a pretty common task but I unable to find any opensource implementation based on OpenCV for this purpose. Is there anything already available for this purpose with no needs to implement such kind of task on the low level with OpenCV help ?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-12-07 09:20:32.267050

Comments

"Is there anything already available for this purpose with no needs to implement such kind of task" -- NO.

simply, because there is no generalization for "the task".

berak gravatar imageberak ( 2018-02-05 13:00:42 -0600 )edit

There are libraries like for example Inlite Clearimage where you can perform such operations in a very abstract way, something like this:

    repair.AdvancedBinarize(-1, 0, 0);

    repair.BorderExtract(EBorderExtractFlags.ciBexBorderDeskewCrop, EBorderExtractAlgorithm.ciBeaCleaner);
    repair.RemovePunchHoles();
    repair.CleanNoiseExt(new ECleanNoiseFlags(ECleanNoiseFlags.ciCnxBlackNoise, ECleanNoiseFlags.ciCnxWhiteNoise), 10, 10, 10, 0);
    repair.ClearBackground(30);
    repair.DeleteLines(ELineDirection.ciLineVertAndHorz, EBoolean.ciFalse);
    repair.FaxRemoveHeader();
    repair.FaxStandardToFine();
    repair.FaxRemoveBlankLines();

Do we have something similar and abstract for OpenCV?

alexanoid gravatar imagealexanoid ( 2018-02-05 13:40:48 -0600 )edit

@alexanoid, -- again, no. opencv is a generic computer-vision library, it does not focus on the task you require

berak gravatar imageberak ( 2018-02-05 13:46:46 -0600 )edit

I understand the purpose of opencv library but I'm asking about "opensource implementation based on OpenCV for this purpose"

alexanoid gravatar imagealexanoid ( 2018-02-05 13:48:49 -0600 )edit