Rotating a 2D pixel array by 90 degrees

前端 未结 4 1828
予麋鹿
予麋鹿 2020-12-05 20:59

I have an array of pixel data for an image. The image I am getting is already rotated to 270 degrees. So I am trying to rotate it again by 90 degrees to have the correct ima

4条回答
  •  甜味超标
    2020-12-05 21:26

    You have old_data[rows][cols] and new_data[cols][rows], then:

    for(int i=0; i

    This should rotate old_data by 90 degrees CW.

提交回复
热议问题