How to fill in the empty parts of the projected image?

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

Resulted Projection

and I need to fill in the empty dots in this image to look like this

Interestingly, I can find a good way to fill these points in a professional way using any image processing algorithms using matlab

Silhouette image

+3
source share
2 answers

Here is a version of MATLAB, somewhat equivalent to @belisarius :

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) 

enter image description here

+2
source

Code in Mathematica . Obviously, Matlab has equivalent image conversions.

enter image description here

Let's see how both images correspond:

enter image description here

As you can see, the neck is a little hulkish ... otherwise the result is not bad

+3
source

Source: https://habr.com/ru/post/894240/


All Articles