|
From: Travis O. <oli...@ee...> - 2006-01-24 00:36:41
|
Mark Heslep wrote:
> Christopher Barker wrote:
>
>> Mark Heslep wrote:
>>
>>> Ive got some NumArray C API investment in the typemaps.
>>
>>
>>
>> Are these SWIG typemaps? If so I think there are a bunch of us that
>> wold like to see them, and maybe we can all work together to port
>> them to NumPy.
>>
>> -Chris
>>
> Yes they are SWIG typemaps for OpenCv* data structures, based on prior
> Numeric art I'd found and ported to Numarray.
> Attached.
>
> 1. numdata.h example that works well for simple Cv structures
> containing uniform types: CvPoint2D32F => struct { float x, float y
> }. Can I use a record array here, or is there some Numpy overhead
> interlaced with fields?
You can use a record array, but for uniform types I don't know what the
advantage is (except for perhaps named-field slicing---which may
actually be faster I'm not sure) over a x2 float array.
> 2. numarray.h Attempt to replace the main Cv Image structures CvMat,
> IplImage. Needs work. Some success but there's segfault or two in
> there somewhere.
>
These can be ported fairly easily, I think (actually, the old Numeric
typemaps would still work --- and work with Numarray), so the basic
Numeric C-API still presents itself as the simplest way to support all
the array packages.
-Travis
|