To increase the depth of the embossing filter, increase the radius of the filter mask. Low depth:
h = [[1, 0, 0] [0, 0, 0] [0, 0, -1]]
against great depth:
h = [[1, 0, 0, 0, 0, 0, 0] [0, 0, 0, 0, 0, 0, 0] [0, 0, 0, 0, 0, 0, 0] [0, 0, 0, 0, 0, 0, 0] [0, 0, 0, 0, 0, 0, 0] [0, 0, 0, 0, 0, 0, 0] [0, 0, 0, 0, 0, 0, -1]]
To change the azimuth, place non-zero coefficients at a different angle:
h = [[0, 0, 1] [0, 0, 0] [-1, 0, 0]]
I'm not sure about the height. You may need to change non-zero coefficient values? I just know that this should be a high pass filter.
In any case, to calculate and display an image using the Scipy solution:
import scipy.misc, scipy.signal im = scipy.misc.imread(filename) im_out = scipy.signal.convolve2d(im, h, 'same') scipy.misc.imshow(im_out)
Hope this helps.
EDIT: Well, as Paul hinted at PIL, you can adjust the filter options or even define a completely new kernel. The scale and offset options have nothing to do with what you are looking for. Filter size is most important for depth adjustment.
Upon further investigation, PIL does not allow the filter to be resized beyond 5x5. Seems strange. This way, you will not get such a drastic change in depth as you probably expect.
For complete control, you can try the Scipy solution by me and Paul mentioned earlier. Resize the filter to something funny, like 21x21, and see if it makes the type of difference you want.