[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Proposed additions to Transform: connected components, upper and lower thresholding, and centroids



Nirav Patel wrote:
> The plan is to be able to do while having to traverse the image array
> as few times as possible.  I want to be able to run it at 30 fps on an
> OLPC XO while still leaving time to do other stuff each frame.

You might want to just write it up in C, then, if you need that kind of
performance.  I'll warn you, though, that it's awfully easy to implement
this kind of thing badly, and end up worse off than if you'd just used
prebuilt pieces to start with.

The job of a library (like pygame) is to provide common functions that
can be assembled into larger things.  If you want something that does
exactly what you need as efficiently as possible, you've got to do it
yourself.  Otherwise, the library ends up bloated with dozens of
single-use functions (or function features) that are a royal mess to
maintain.

-FM

Attachment: signature.asc
Description: OpenPGP digital signature