Ask Your Question
2

how to align vector and raster images?

asked 2012-08-23 09:09:31 -0600

mrgloom gravatar image

updated 2012-11-29 05:37:51 -0600

how to align vector and raster images? For example vector images will be static/rigid and raster image will be morphable. For example I manually do initial guess and algorithm must converge to optimal solution by morphing raster image.

I know about chamfer matching but it isn't working good.

I think I need something like this http://cs.fit.edu/~eribeiro/papers/liu_ribeiro_isvc2010_shape.pdf or some non rigid object registration algorithm.

I also tried to represent raster and vector data as points and then apply ICP algorithm to them http://www.cvlibs.net/software/libicp.html but this lib seems can provide only shift and rotate invariance. I will try this lib http://code.google.com/p/gmmreg/ but it seems it very complicated, maybe there is simpler approach.

some example picture shapes that I need to align.(I have already convert raster and vector to points) some real life example using gmmreg lib (I'm still not sure I'm using it right)

rigid

TPS_L2

seems I'm not using lib right,even if points are aligned it works wrong.

I have raster and vector data represented as point clouds in 2d. Raster data extracted as contours so it contain some noise. Raster and vector data slightly differs in scale and position,raster data can also have some small perspective distortion and barrel distortion, but I can provide initian alignment. I want to raster data "converged" to unchangeble vector data, so I think I want some kind of non-rigid point cloud matching. By alignment of 2 point clouds then I want to determine some parameters(maybe TPS spline?) and unwarp raster image and then draw vector image above it.

For example if we use homography matrix and assume perspective transform we have 8 parameters. I tried to use KCReg it use some specific metric for point clouds, but it give me unsatisfactory results because my distortion can be only roughly expressed by perspective transform and I need some more non-rigid alignment. So the task consist of some function E(p)(metric)+minimizer+bounds for minimizer. I also tried gmmerg. I seems it uses some Broyden Fletcher Goldfarb Shannon minimization from VNL, but I managed to achive good results only for simple tasks.

for example affine http://dl.dropbox.com/u/8841028/ICP/gmmreg_tests/%D0%B0%D1%84%D0%B8%D0%BD%D0%BD%D0%BE%D0%B5.png http://dl.dropbox.com/u/8841028/ICP/gmmreg_tests/%D1%82%D1%80%D0%B0%D0%BF%D0%B5%D1%86%D0%B8%D1%8F.png

barrel-barrel backwards-barrel rigid http://dl.dropbox.com/u/8841028/ICP/gmmreg_tests/barrel_test.png http://dl.dropbox.com/u/8841028/ICP/gmmreg_tests/barrel_test_back.png http://dl.dropbox.com/u/8841028/ICP/gmmreg_tests/barrel_test_rigid.png rigid scale rotate shift http://dl.dropbox.com/u/8841028/ICP/gmmreg_tests/rigid%3Dscale_rotate_shift_noise.png

but it fails on real problem, maybe I don't set constraints/bounds or initial guess well. rigid shift http://dl.dropbox.com/u/8841028/ICP/gmmreg_tests ... (more)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
4

answered 2012-08-26 05:34:27 -0600

Michael Burdinov gravatar image

updated 2012-08-30 06:26:41 -0600

  1. That fact that you are performing registration between vector and raster image does not mean that should be ellastic. Your application is what determines type of transformation (for example shift, rigid, similarity, affine, perspective, ellastic, and so on), not the way it is stored.

  2. You are trying to morph image. But morphing polygins is by many orders of magnitude easier than morphing raster image. So you better keep the raster image constant, and morph vector image.

  3. There literaly thousands of different approaches to find registration between image and polygons. Can you please be more specific about what you are trying to achive? It will be good to see examples of your input, output and prior information.

Edit

Ok, images indeed make problem clearer :).

  1. First i would try to simplify the problem. You can measure barrel distortion coefficients a-priory on some qrid that you will prepare. Then you will be able rectify your images, so that they will have only perspective distortion.

  2. I see that you can extract points that belong to object and not to its surrounding, you can use moments to align those sets of points. (Was that your approach for initial guess?).

  3. I would recommend you ICP, but you already know it. If the one you got does not fit your application, search for anther one. There many ways to implement it. In worst case you can implement one yourself.

edit flag offensive delete link more

Comments

I can change only scale of vector image, but the raster image is distorted(perspective transform+barrel distortion) and it must be aligned to vector image.Also raster(represented with contours) and vector image can differ in 30% of the presence and absence of elements.I also tried ICP algorithm(check my update) but it seems I need not rigid ICP algorithm.I'll post images soon.Maybe you can tell me some words how this problem called in literature so I can google it?

mrgloom gravatar imagemrgloom ( 2012-08-27 04:38:26 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2012-08-23 09:09:31 -0600

Seen: 2,982 times

Last updated: Nov 29 '12