Hi Douglas,
It's good to see an example (albeit partial) like this, I haven't
really used ImageMath and ImageFilter. Would be interesting to compare
with equivalent numpy implementations performance-wise for some image
processing problems.
Cheers,
JB.
Douglas Bagnall wrote:
> John Ba
Hi Will,
Will Henney wrote:
> How about this for a numpy implementation? Runs nearly as fast as the C
> version
> on my mac (1.58 vs 1.16 secs).
This is great! I get about 0.34 vs 0.55. The numpy implementation is
darn good for a python only implementation. There is a subtle
difference in t
John Barratt wrote:
> http://www.langarson.com.au/blog/?p=14
>
This is an observation, not a recommendation, but you could *almost* do
all of this in pure PIL, without explicit loops. You could find the
slope like so:
dxfilter = ImageFilter((3,3), [1, 0, -1,
Hi John
How about this for a numpy implementation? Runs nearly as fast as the C version
on my mac (1.58 vs 1.16 secs).
def hillShadeNumPy(filenameIn, filenameOut, scale=1.0, azdeg=315.0,
altdeg=45.0):
''' Create a hill shade version of the given image using numpy '''
from numpy import s
This is a follow up on my previous posts about PIL/gd speed comparisons,
which is perhaps now a bit of a misnomer. It is now really just a
C/python speed comparison for custom intensive image operations given it
is clearly possible to access the same sort of raw data with both gd and
PIL withi