Binarization question
Binarization question
I am trying to binarize color image of some document produced by digital camera. I tried all ConvertTo1BppXX procedures, but all of them lose significant parts of document information. The document itself, probably, too dark (I mean document background is not white but gray), but in the same time it is readable well. What is the best way to do convert such images?
Re: Binarization question
Hello,
Could you attach an example of such document?
Kind regards,
Loïc
Could you attach an example of such document?
Kind regards,
Loïc
Re: Binarization question
Hello,
The quality of the image is definitively too poor to get something acceptable with linear or adaptive thresholding method.
What I can suggest is to dither input image in order to be able to retain characters contours.
IE:
This should provide such result:
Let me know your thoughts.
Kind regards,
Loïc
The quality of the image is definitively too poor to get something acceptable with linear or adaptive thresholding method.
What I can suggest is to dither input image in order to be able to retain characters contours.
IE:
Code: Select all
int imageID = oGdPictureImaging.CreateGdPictureImageFromFile("c:\\img_101495455004512479694874535.jpg");
oGdPictureImaging.FxBlackNWhite(m_imageID , BitonalReduction.Burke);
oGdPictureImaging.ConvertTo1BppFast(m_imageID );
Kind regards,
Loïc
Re: Binarization question
I have attached binarized image produced with another software. These software doesn't have dotNET implementation and this is the reason why we are looking for its replacement. But binarization is one of the must features we are looking for.
Thank you.
Thank you.
- Attachments
-
- img_101495455004512479694874535.tif (28.22 KiB) Viewed 8542 times
Re: Binarization question
Hello,
Are you sure you've obtained the tif document from the .jpg bitmap with your other software?
if yes, could you share a snippet?
Kind regards,
Loïc
Are you sure you've obtained the tif document from the .jpg bitmap with your other software?
if yes, could you share a snippet?
Kind regards,
Loïc
Re: Binarization question
The are is nothing to share. It has very special function called AdvancedBinarize for hard cases like that. It doesn't accept any parameters. That's it. But it works very accurate. Sometimes it produces too much black dots, but at least data never lost and a background is always white. Do you think GDPicture can reproduce such behavior?
Thank you.
Thank you.
Re: Binarization question
Hello,
OK thank you for the info. But my question still remains: "Are you sure you've obtained the tif document from the .jpg bitmap with your other software?"
The jpeg compression is lossy, so I have a serious doubt that you can obtain the tiff content result from the jpeg content source you've provided. This is why I've asked for a snippet, to check that you open the attached jpeg (and not other format such tiff or png).
Kind regards,
Loïc
OK thank you for the info. But my question still remains: "Are you sure you've obtained the tif document from the .jpg bitmap with your other software?"
The jpeg compression is lossy, so I have a serious doubt that you can obtain the tiff content result from the jpeg content source you've provided. This is why I've asked for a snippet, to check that you open the attached jpeg (and not other format such tiff or png).
Kind regards,
Loïc
Re: Binarization question
Hello,
Yes it is. The tif document was definitely obtained from the .jpg bitmap which I sent you.
As far as I understand, it suppresses(filters) smooth background and highlights everything which is not background.
Thank you.
Yes it is. The tif document was definitely obtained from the .jpg bitmap which I sent you.
As far as I understand, it suppresses(filters) smooth background and highlights everything which is not background.
Thank you.
Re: Binarization question
Thank you for the info. We are internally working on the problematic. I will get back to you soon with a solution.
Kind regards,
Loïc
Kind regards,
Loïc
Re: Binarization question
Hello,
May I expect to any solution for my question?
Thank you.
May I expect to any solution for my question?
Thank you.
Re: Binarization question
Hello,
Yes, we've obtained quite good results by implementing Sauvola local adaptive thresholding method + contrast normalization. The feature is implemented in the 9.4 that will be published tomorrow. It will also include an example of usage.
Kind regards,
Loïc
Yes, we've obtained quite good results by implementing Sauvola local adaptive thresholding method + contrast normalization. The feature is implemented in the 9.4 that will be published tomorrow. It will also include an example of usage.
Kind regards,
Loïc
Re: Binarization question
Thank you. Could you inform me when you will publish it?
Re: Binarization question
How can I get new evaluation key?
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest