MATLAB: How to plot object if one has area and centroid of it

image processingImage Processing Toolbox

I have an image of size 500X500. It contains two objects,their centroid are at (100,100) and (300,250) respectively. centroid obtained by "regionprops(bw, 'centroid')" method. I also have Area of two object by "regionprops(bw2, 'Area')" method.
now only using the area and centroid of objects,help me to construct totally new image say Z=zeros(500,500) in which i am able to plot two objects without using the original image,but using solely the centroid and area of those two object from an image.
Thank you.

Best Answer

If you have no knowledge of the original gray scale image or the binary image, and you have only two areas and two centroids, then you can make an image of those if you decide on a shape. For example if you want a circle, you can use code from the FAQ: http://matlab.wikia.com/wiki/FAQ?&cb=1921#How_do_I_create_a_circle.3F