"painting" one array onto another using python / numpy
Posted
by Nate
on Stack Overflow
See other posts from Stack Overflow
or by Nate
Published on 2009-12-22T21:17:03Z
Indexed on
2010/03/12
13:37 UTC
Read the original article
Hit count: 263
I'm writing a library to process gaze tracking in Python, and I'm rather new to the whole numpy / scipy world. Essentially, I'm looking to take an array of (x,y) values in time and "paint" some shape onto a canvas at those coordinates. For example, the shape might be a blurred circle.
The operation I have in mind is more or less identical to using the paintbrush tool in Photoshop.
I've got an interative algorithm that trims my "paintbrush" to be within the bounds of my image and adds each point to an accumulator image, but it's slow(!), and it seems like there's probably a fundamentally easier way to do this.
Any pointers as to where to start looking?
© Stack Overflow or respective owner