7

I'm planning on writing software that morphs images to a certain shape (based on points and vectors that define similar regions in different images, and the calculation of an "average" shape).

Obviously this is pretty difficult, and therefore I'm looking for a library that can handle the morphing of images (so I can focus on the GUI, and feeding the necessary coordinates to the library).

To clarify, an example of what I want to do is:

  • Load images (say, image 1 and 2)
  • Define similar points in images (say, the tip of a nose in image 1 and 2, on coordinates (1,5) and (1,7))
  • Calculate the average coordinates for the points (so that would be (1,6))
  • Morph defined points on each image to the same coordinate (so morph all noses to (1,6))
  • Save images

Now of course the actual use case would be a lot more complex (instead of singular coordinates I would also like to morph lines and other shapes (vectors), but the principle would remain sort of the same.

4 Answers4

3

You might try ImageJ / FIJI on this one.

Ramon Fincken
  • 253
  • 1
  • 5
  • 11
2

Haven't tried it myself yet, but you should be able to use a Java wrapper for ImageMagick and use it's Shepard's distortion functionality

George Profenza
  • 50,687
  • 19
  • 144
  • 218
  • That is very interesting. The only downside is "*Just remember that this distortion is point driven, not line or area driven, so parts between the points can bulge, or swirl unexpectedly when differently moving control points are positioned too close together.*". Do you know of a method that also accepts line or area driven transformations? –  Jul 23 '12 at 13:21
2

Try this ..http://www.cs.bris.ac.uk/~majid/mengine/morph.html

This software tool is designed to be used as a learning aid for demonstrating the effects of different image morphology transformations on binary (black and white) images. Images can be loaded into the tool, a structuring element defined or chosen from the list of predefined ones, and then the chosen transformation applied. The original and morphed images are displayed at the same time to visualize the changes that have been made.

NIlesh Sharma
  • 5,445
  • 6
  • 36
  • 53
1

It depends on what transformation do you need you can try http://biocomp.cnb.uam.es/~iarganda/bUnwarpJ/

http://bigwww.epfl.ch/thevenaz/UnwarpJ/

mrgloom
  • 20,061
  • 36
  • 171
  • 301