# Train AI with shapes + drop shadows to remove background colors

for a screen printing app, I'd like to remove background colors from images.

There is still a white border around text from anti-aliasing. Dropshadows also break it.

So, I was thinking I could train an AI by creating images with shapes and text, with and without backgrounds.

The AI input would get a version with a background and the "goal" would be the version without the background.

How do I go about doing this? ( total AI noob )

================

Non-AI solution

If anyone is interested... I have made a non AI solution which takes all colors within a tolerance of the background, then looks at the 4x4 neighbors.. from each neighbor(which is a candidate for converting into semi-transparent), it looks at the 3x3 neighbors around the candidate for the furthest color from the removal color ( which typically grabs the solid pixels ), and then converts the current pixel to an alpha version by copying the rgb values, and converting alpha to 255 * (1 - dist_removal_to_current / dist_removal_to_furthest) or something like that.

I should write an article or something... it was an interesting algorithm to write. linkedin me Dan Schumann in wisconsin