I'm trying to generate new data using the copy/paste method. I want to know how I can do blending on foreground borders to make new images that are close to reality. I tried alpha blending but I don't want to do blending on all parts of the foreground, I just want to do it on the borders. here is one line of the code that refers to pasting the foreground into the background using the PIL library. attention: I want to paste the foreground in the desired position and do alpha blending on the borders.
background_paste.paste(foreground, (i, j), foreground)