Ask Your Question
0

Flipping image to create canvas with simmetry

asked 2020-06-19 07:00:13 -0600

i'm using Python cv2 to create a canvas image based on a small part cutted and flipped. This is an example of image:

base image

than i crop a small part of the left side

crop_image = test[:, 0:70,  :]
crop_flip = cv2.flip(crop_image, 1)
test_points_1 = getOrderedPoints(crop_flip)
mat = cv2.getPerspectiveTransform(test_points_1, style_s4h_side_points)

And merge the base image and the flipped part with a template i have got obtaining this output

base image

The problem is that on the left side should be just a mirror and there should be symmetry between lines. How can i solve this problem? I tried moving points but i deform the base image. Thanks!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-06-19 20:40:25 -0600

mvuori gravatar image

The problem is in the code that you, for some reason, don't show: your function getOrderedPoints gets the points wrong.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-06-19 07:00:13 -0600

Seen: 380 times

Last updated: Jun 19 '20