round robin image rotation what is the best way to do in opencv

后端 未结 2 833
余生分开走
余生分开走 2020-12-21 23:53

I want to do a round robin image rotation as shown below. \"enter

The x vertical line

2条回答
  •  北海茫月
    2020-12-22 00:29

    Mat outImg(inputImg.size(),inputImg.type());
    inputImg(Rect(0, 0, shiftX, height)).copyTo(outImg(Rect(width-shiftX, 0, shiftX, height)));
    inputImg(Rect(shiftX, 0, width-shiftX, height)).copyTo(outImg(Rect(0, 0, width-shiftX, height)));
    

提交回复
热议问题