Morphing points based on edge of a shape in an image

Hello there,
I made a mesh and I picked up the contours of this mesh as some points and I have an MRI image. So I want to move these points based on a heart on this mri image. I have tried to read like a lot of articles on morphing, points wrapping and so on.... but they are explaining either morphing between two image or two mesh. So I am a kind of stocked.
I appreciate any idea! Sareh

3 件のコメント

Sean de Wolski
Sean de Wolski 2012 年 11 月 9 日
Picture is worth 1000 words...
sareh
sareh 2012 年 11 月 10 日
http://hpics.li/3b95b3a This is the Mri image hold on with my mesh contours
sareh
sareh 2012 年 11 月 10 日
http://hpics.li/aee7e41 The plot of my mesh contours

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2012 年 11 月 9 日
編集済み: Image Analyst 2012 年 11 月 9 日

0 投票

Try maketform() and tformfwd(). Or else imtransform. You pass the actual point locations and the desired locations into maketform() and it gives you a transform. Then use tformfwd() to apply this transform to warp your "bad" image into your "desired" image.

3 件のコメント

sareh
sareh 2012 年 11 月 10 日
Thank you for your answer! but the the contours are just coordinates of vector X = [] and Y by the size of 149 values of two circles. so here the question is how to compare the coordinates X,Y with an image binary which I have made out of my original MRI?
sareh
sareh 2012 年 11 月 10 日
I added the images for you also!
sareh
sareh 2012 年 11 月 11 日
編集済み: sareh 2012 年 11 月 11 日
Actually I have found the function
[z,v] = size(pu); bw = poly2mask(X + 30 ,Y + 32 ,z,v); imshow(bw) hold on plot(X + 30,Y + 32,'.r') hold off
to make a mask of my points BUT I dont understand why some points are not placed on the correct coordinates http://hpics.li/380602d
Any idea why logical 1 points are not on my coordinats?

サインインしてコメントする。

カテゴリ

ヘルプ センター および File Exchange で Read, Write, and Modify Image についてさらに検索

タグ

質問済み:

2012 年 11 月 9 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by