I have a picture here I need to remove the texture. I try the FFT method but I don't get the diamonds to black out when I do it, its sorta flat. whats the best way to get rid of this?
Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It only takes a minute to sign up.Sign up to join this community
There are some sophsticated filters that are implemented in software such as the G'MIC plugin of GIMP. You can try this online here. I've never used G'MIC for texture removal and I have not installed it on my present computer, so I'm not sure if it has a good filter that works well for this case.
Now, if some standard method doesn't work well, you can always try to examine the structure of the texture to see if some simple mathematical formula would be able to sort most of them out. If that works reasonably well then it may be that after you have processed the image yourself, a standard filter will work better (e.g. what is left may now have a sharp periodic structure and you can then easily remove that using FFT).
In this case, you can see that the structures are elongated in the horizontal direction while in the verical direction it is usually just two pixels wide. This means that you can write a simple program that checks for each pixel the difference between the brightness and that of of the average of the pixels two steps above and below. If it is large then is likely due to the texture and you replace the pixel value by the average, otherwise you don't change it. Now, you want to stay away from edges, so you also want to check if the the pixel values 3 steps above and below are not too different from each other.
So, let's try to implement this using the free of charge ImageJ program. We split the picture in the 3 color components and apply the following macro to each component:
m1 = getPixel(x,y+2);m2 = getPixel(x,y-2); m3 = getPixel(x,y+3);m4 = getPixel(x,y-3);df = m3-m4; if(df<0) df =-df; av=(m1+m2)/2; w=v-av; if(w<0) w=-w; if(df<20) if(w>15) if(v>40) v=av
So, if df is too large we're probably near an edge and we then don't want to proceed, if this is not the case then if w is large then that means that the pixel value differs a lot from the average of the pixels two steps above and below and if the pixel value itself is larger than 40 then that's very likely due to the texture being there, we then want to replace the value by that average. The result is then as follows:
Now, this is of course a very crude way of removing the texture, so there is a lot of room for improvement.