iterative closest point algorithm

I’m looking for a way to integrate object aligment / surface matching in Blender. There are multiple other applications and libraries which do this well already (point cloud library, VTK, meshlab). My client needs it within Blender for a very specific purpose but I can imagine applications for rigging and modelling.

Loose Design Specs:

  1. User guided pre alignment
    -picked points
    -drawn line or pattern on surface

  2. Ability to limit/specify areas of mesh
    -areas to exclude
    -use partial areas for alignment
    -can easily use vertex groups + weight paint or sculpt masking for this

  3. Error reporting of alignment quality

  4. Windows, Mac and Linux compatible

I’m open to tackling this several ways
A. Building dll/so to use with ctypes and python
B. A pure python/bpy implementation
C. C implementaiton with a custom blender build with python API exposure in geom utils or mesh utils

Speed is not going to be hugely important because the mesh sizes are going to be in the 100k verts range and using masking/area selection and limiting should keep our data sets manageable.

If some of the above parts aren’t achievable, at a minimum I need a function like the following

(transform_matrix, error) =  icp(verts1, verts2, iterations, target_convergence)

Code will be GPL so someone can take the guts and make a nice addon with it
PM me with $ and timeline to see if this is feasible.

If you want something done…at all, you gotta do it yourself

Yes, thats good shrinkwrap.

Well, it’s really more of a lock and key fit because the surface is not deformed like it would be in a shrink wrap.


Great preview patmo. Will this be part of Contour? :slight_smile: Would be awesome while retopoing, hitting couple of times to conform the mesh, a sort of relax/smooth tool but with shrinkwrap.

Reminds me of Wrapit.

Well, this is really not directly related to contours. Perhaps the video is a little misleading. What you are seeing happen is the alignment of two different representations of the same object. This will be meant to align data from a 3d scanner or, in my case, to align a CAD model (clean exact topology) with a 3d scan of the physical object (messy scanner topology). So the only real way this could be applied with contours would be to align primitives with a sculpted model but that would be a very limited use case.

Could this work like a Shrinkwrap projection, but with better fitting like in cloth simulation with sewing springs?

A use case would be to create a nice topology model from any input mesh, maybe by using metaballs to create an approximate, good-topo mesh for wrapping?

I don’t think so, as patmo141’s code snippet suggests all ICP does is calculate the rigid transformation matrix (rotation+translation) that will move a data object to a new pose such that the distance between it and a fixed reference object is minimized. Besl and McKay 1992 is the original paper on the algorithm for those interested.

this is correct. Old stuff, but useful.

An awesome numpy python matrix math resource

Correctly, that’s actually ultimately related to contours. Maybe the video generally is a minor wrongly diagnosed. Cures are discovering take place would be the positioning regarding two specific representations in the identical issue. That is designed to format details from a animated graphics scanning gadget or possibly, during my function, in order to format the actual CAD product or service (clean exact topology) that includes a animated graphics look at out of your physical issue (messy scanning gadget topology). Therefore a standard implies this could be put on along with contours is usually to format primitives that includes a attractive product or service nonetheless that is certainly a tremendously restricted employ function.