As shown in the figure
1: Please note that pictures cannot be superimposed on each other
2: It is best to use a universal algorithm, and the x and y positions are best not to be hard-coded
3: It is best to be universal N pictures
I tried drawing curves to intercept but failed. The amount of calculation seemed a bit large, or my idea was wrong. I hope the master can provide an algorithm that is simple, easy to understand and maintainable.
Picture processing, take a circular area and add strokes;
Sort pictures, arrange them clockwise or counterclockwise according to the center of the circle;
Calculate the overlapping area;
Image merging, decide which image to use in the overlapping area according to the serial number.