sc241
sc241

Reputation: 189

Insert a patch (32x32) into an image (256x256), how?

I have a patch with size 32x32 and I have the center coordinate and the x1,y1,x2,y2 coordinates of the patch in the image. I do not know how to add this patch to its position in an image with 256x256?

Upvotes: 1

Views: 2021

Answers (1)

fireant
fireant

Reputation: 14538

You can simply use slicing in Python. Remember that opencv images are numpy arrays in Python.

See a sample code in this answer.

Upvotes: 3

Related Questions