How to fill empty parts of a projected image?

与世无争的帅哥 提交于 2019-12-02 01:14:39

问题


When i projected a 3D model on a 2D plan (Perspective projection) the result of the projection appeared as the following image.

and i need to fill empty points in this image to look like this one

i wonder that i can find a good way to fill this points with a professional way using any image processing algorithms using matlab


回答1:


Here is a MATLAB version somewhat equivalent to @belisarius answer:

I = double(imread('http://i.stack.imgur.com/sedZH.png'));
BW = im2bw(I,graythresh(I));
BW = imerode(BW,strel('square',2*3+1));
BW = imfilter(BW, fspecial('average',10));
BW = imdilate(BW,strel('square',2*3+1));
BW = imcomplement(BW);
imshow(BW)




回答2:


Code in Mathematica. Matlab surely has the equivalent image transformations.

Let's see how both images fit:

As you can see, the neck is a bit Hulkish ... otherwise the result is quite good



来源:https://stackoverflow.com/questions/6599833/how-to-fill-empty-parts-of-a-projected-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!