There are many descriptions of how to turn a 2D image into a 3D one, however I want to do the opposite, in particular to a ball. As an example, consider the following ball:
If only the (relatively) slow change in intensity due to the light could be removed, the ball would look 2D.
My first approach was to try get a low frequency version of the original, and divide through by that image. A simple way to do that is to blur the image. Here is a sample result using that approach:
This does the job of flattening the light, but there are some problems:
- There is a light 'halo' around sharp edges.
- Large flat patches (e.g. the black patches) lose their uniformity in the middle.
- The edges of the ball are affected by the background during the blurring (there's a dark ring around the ball, particularly noticeable at the bottom right corner).
I've tried mucking about with filters (e.g. bilinear) but haven't really found anything that works. I've also tried to use wavelets (a frequency based approach makes sense to me), but those approaches tended to distort the fine detail, which is very important.
Any ideas on how to do this are greatly appreciated!