Converting Png to Text With Knime

Hello everyone,

I’ am new at Knime and I have lots .png images like this : indir
I would like these images converting to text, maybe it can be excel file.

I searched documents and I learnt needs Tess4J for this job but I didn’t found any easy workflow.
Is there anybody have helpful workflow for this?

Thank you in advance

This WF looks pretty easy
https://nodepit.com/workflow/public-server.knime.com%3A80%2F99_Community%2F01_Image_Processing%2F02_Integrations%2F03_Tess4J%2F01_Tess4J

1 Like

Thank you for your reply. But I already tried this workflow, it’s not working transparent png files.

Hi @idris,
did you try removing the Alpha channel from the transparent PNG images? You can do this by combining the Splitter, Column Filter and Merger nodes. First split the image along the Channel dimension. Then filter out the 4th dimension and merge the columns together again.

best,
Gabriel

1 Like

Hello Gabriel, Thank you for your answer.
I tried something in this workflow;PngToText.knwf (72.8 KB)
But I am really new at Knime and I could not found how to filter out the 4th dimension. Could you show me or do you have any documents about this?
Thank you in advance,
Best Regards
İdris

Hi @idris,

Take a look at this workflow: 01_Tess4J-Gabriel.knwf (38.6 KB)

I modified your workflow a little and used the PNG file you posted earlier in this thread. I hope this works for you :slight_smile: If not please post some example data.

best,
Gabriel

2 Likes

Yes, now it’s working, thank you so much you’re such a great man!
And I have one more question, is there any way to getting image from a website? I mean if it possible I don’t want to use Image reader for images, I want to use some links like:
data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAAGwAAAARCAYAAAA42knSAAADcUlEQVR4nO3YW6gVZRQH8J9HM7tpD4ZFgQT1UAZ2e1CP1iHIroTRBbKnMigqY2NFcAqKeggyiuq56MEiyMoudCGJ6KJIGRlBZVZQRplFdrOwsB7WN545s2fO/mYf6Wn/Ydh7Pv7812XWrG99wwADDDDAAAMMMMD/jGkYxef4K/2OpvUyOvi34fp+EroFrsBG/Imf8SJOr3BmYzU+S7wdeB3nVXhTcCXewE/4HZtweY3dNtxc+x3tckVe/OAZ/IZbMYJV+BXrUjBVJ0aSUPmaPwndqXgKe/AAzhYJeBxbjT3gI/EtPsQ1GMYyvJL8urqkuUYUyf1J7yw8lHh3VvzM5bax35Gfq9z4wcVJuFohS9P6pTVOHK432uhei3+wpEZnZuV+ue43dAgf4b3S2k1YUKP3qKjgg/rk5trvyM9Vm/i9jM0NQptE9fTjRBvdDXg+Q3MirMebGbzrRQzH7mdu1X5Hfq6y4h9Kv8N4dwKhYePbF5wreu0f2IUncFSF00b3VPEQT8Nr2C1a6XM4vkFjKg7AXNwj3pC7GrhlzBftr2kfyeXm2s/JVXb8h4kqGG1w+Dbjq6ST7t/CZViIlWKj/sLY69tG99D0fy2+xI1YhKvwDXbimBqNtcY28U9T0L1wgmhxj+0Hbi/7HXm5ahV/kdjbG5wqEjsr3c8Ue9NQhbck8Vb1oTsr/d+Ooyu8E/E37qvROA6niD1yTQqsdqJKmINtyc4RE/Byub3s5+aqdfy78EiDUw/iF90tsQ7b8WQfukOi7axu4G7Bqxn21xm/6ZcxV0xbO3FSD5023Fz7VZRzlR1/8eTfEftJHRbjbVEBvTBNTDoFcnX3igmrbkojJrTdGfY342TdxTUv+XIwzsTHE2i04ebar0M5V63jv0gk7oIK8Zy0vqy0tlS0syqKUX1Fn7rXpbXqA14oAroh3c8Wb+2BNT6sx9eVtQvFm/yB7nZTRQ63jf02ucqNfx+eFlPJLaKyigPus8ZXzMok/AIuEf34ZhHoBkzvU3cKXhLT2IqkW2zQ72NG4s3Dj/gkBXEGzk929oozUoE70tqWxKseXg/pg9vGfptc5ca/D9VPSNs0f0IaSU78IE7mX+Fe0UYmozsdd4tJaY/o8w/rPjjOEV8Dtoop7jvR4xeXODM0fxYqrgV9cHPtFxiRn6ue8f8HQdR9bCQ/+9AAAAAASUVORK5CYII=
Don’t Worry if you copy and paste this adress to your web browser bar, it’s not a blank page, if you do right click>save as… you can see a transparent png file.
I tried Read Images node with your workflow but I guess doing something really wrong.

Thank you in advance,
Best Regards,
İdris

1 Like

Hi @idris,
I had to fall back onto the Java Snippet node but here you go:

01_Tess4J-Gabriel-base64.knwf (41.7 KB)

best,
Gabriel

2 Likes

Yes, Now I learned many things from you. Thank you soo much Gabriel you are really great great man! It isn’t enough how much I say thanks for you :slight_smile:

Best Regards,
İdris

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.