将图像从圆柱内投影到平面2D [Matlab] [英] Projection of a image from inside a cylinder to a plane 2D [Matlab]

查看:1473
本文介绍了将图像从圆柱内投影到平面2D [Matlab]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在相机内部使用相机拍摄图像。我想将该图像转换为平面2d。圆柱体内的图像有很多点,形成一个网格。





我尝试做的是估算转换。通过斑点分析,我可以检测每个点的中心并获得以像素为单位的坐标。我把它保存在名为ImCilynder的矩阵中。之后我创建了一个矩阵,其坐标位于平面中,名称为Im2d。



我计算求解等式的变换(H):

  Imcilynder * H = Im2d; 

H =矩阵[9x1]

H = pinv(Imcilynder)* Im2d

但是,当我用相同的点进行测试时,结果是完全随机的,所以我做错了。



<有没有更好的方法来解决这个问题?你可以帮我吗?



解释得更好,



我正在尝试找到将上面的图像转换为此图像的转换:



所以,为了澄清,我想要在第一张图片中看到的点的投影飞机基本上我想要打开圆筒。



计算转换矩阵后。我期望将第一个图像与变换矩阵相乘并获得平面中的点。或者乘以黑点中心的坐标并获得平面中该点的坐标。这可能吗?



非常感谢,



Afonso

解决方案

嗯,你希望飞机上有什么?圆圈形成一个网格?因为如果是这种情况你需要去除径向变形,这些模型由一些参数表示,顺便说一下是非线性的。可能如果你能找到一个非常好的算法,你将获得这样的东西:





如果这不是你的想法,你需要应用弹性转换,这种转换需要使用一种网格作为转换的模型,你需要提出你的网格模型。如果你想自动执行此操作,你需要使用弹性配准算法,你可以使用这样的模型:





任何方式,这不是一项琐碎的任务,有很多如果你想自动获得转换,研究复杂的转换。否则你可以使用photoshop;)。


With a camera inside a cylinder I capture a image. I want to transform that image into a plane 2d. The image inside the cylinder have a lot of dots which forms a grid.

What I tried to do was estimating the transformation. With blob analysis I can detect the center of each point and obtain the coordinates in pixels. I save this in matrix called ImCilynder. After that i create a matrix with coordinates of that points in the plane with the name Im2d.

I calculate the transformation (H) solving the equation:

Imcilynder * H= Im2d;

H= matrix [9x1]

H=pinv(Imcilynder) * Im2d

But, when i'm doing the test with the same points, the result is completely random, so i'm doing something wrong.

Is there a better way to solve this? Can you help me?

Explaining better,

I'm trying to find the transformation which transforms the image above to this image:

So, to clarify, I want the projection of the points which i see in the first image to a plane. Basically i want o unwrap the cylinder.

After the calculation of the transformation matrix. I'm expecting to multiply the first image with the transformation matrix and obtain the points in the plane. Or to multiply the coordinates of the center of the black dots and obtain the coordinates of that dots in the plane. Is this possibly?

Thank you very much,

Afonso

解决方案

Well, what do yo wish to have in a plane? the circles forming a grid? Because if this is the case you need to remove the radial distortion, these kind of models are represented by some parameters, are non-linear by the way. May be if you can find a very good algorithm, you are going to obtain something like this:

If this is not your idea, you need to apply an elastic transformation and this kind of transformation needs to use a kind of grid that is the model of the transformation and you need to propose your model of grid. If you want to do this automatically you need to resort to elastic registration algorithms and you can use a model like this one:

Any ways, this is not a trivial task, there are a lot of research about complex transformations of course if you want to automatically obtain the transformation. Otherwise you can use photoshop ;).

这篇关于将图像从圆柱内投影到平面2D [Matlab]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆