Using Contours to expand image in python

Hi All,

I have an image of a fruit like this :

3_100

here i need to expand/shrink the orange within the same boundary, ie fill up the white space of the same image. Resize would just change the overall image but not fill up the white space of the original image.
So I tried using contour to detect the boundary of the image but got stuck on how to expand the image after that.

Can anyone suggest on this please ?

Thanks
Swati

© Copyright 2013-2019 Analytics Vidhya