pyimreg / python-register

Linear and non-linear image registration methods, using scipy and numpy.
Other
62 stars 34 forks source link

Thin-plate splines (warp field estimates from features) #10

Closed nfaggian closed 13 years ago

nfaggian commented 13 years ago

We can make the non-linear warp using salient features (reasonably) well using thin plate splines.

Refer to:

http://en.wikipedia.org/wiki/Thin_plate_spline

RegisterData should be extended to include features required for spline fitting - point features or line constraints come to mind.

nfaggian commented 13 years ago

Made a ThinPlateSpline branch - might need a code review of this work.

The fast fitting is a bit of mind bending numpy.

riaanvddool commented 13 years ago

I am very much interested in feature based registration as well. I think it will be fast. Can also contribute a Haar wavelet salient feature finder. C++ code.

riaanvddool commented 13 years ago

I have added my code to the ThinPlateSpline branch but cant get it to run properly. Fails to find the library or something.

nfaggian commented 13 years ago

I think you made a new branch actually ;)

riaanvddool commented 13 years ago

oh, sorry

nfaggian commented 13 years ago

No drama - did you see the idea about consolidating the c++ code. I think its a good idea to put it all in an Extern directory

riaanvddool commented 13 years ago

Yes, i agree. Less duplication.

riaanvddool commented 13 years ago

I struggling with the Haar code. Getting a segmentation fault somewhere.

nfaggian commented 13 years ago

I can imagine that it is really hard to debug c++ code exposed to python.

Maybe a good starting point is to use the gdb server?

http://davis.lbl.gov/Manuals/GDB/gdb_17.html

nfaggian commented 13 years ago

Got the code more or less working now, just cleaning up tests. Managed to vectorize the code - interesting:

Vectorized : 100x100 image - 14.536 ms Untouched : 100x100 image - 2505.894 ms

nfaggian commented 13 years ago

Performing a merge of this feature into master.

nfaggian commented 13 years ago

I think there is more work to do here:

1) features should be more flexible in their definition

2) split apart the linear and non-linear components

3) Generalize the feature registrator to make the thin-plate-spline deformation model

nfaggian commented 13 years ago

Making more commits to the feature branch slowly - attending pycon and moving house has really slowed me down.