Skip to main content
. 2022 Sep 28;22(19):7383. doi: 10.3390/s22197383
Algorithm 1 Extract–Append Algorithm
Require: Pretrained semantic segmentation model Φ
Input: Input image containing an object Iobj, Background image Iback
Output: Create new image Aobj
1: MS ΦIobj Extract the mask of an object
2: MS^=1, object 0,background  Binarization of MS
3: for each iteration do
4: Eobj Iobj  MS^   Extract an object from Iobj
5: Cback Iobj  1MS^  Making room for object insertion in Iback
6: Aobj  Eobj+Cback
7: end for