How can I rotate an image in Python with the help of the OpenCV library, and by changing the value of height and width of the image (without using the built-in methods for rotation in OpenCV). It has to implement with two nested loops.
img=cv2.imread('Images/Screenshot.png',cv2.IMREAD_GRAYSCALE)
height, width = img.shape
# for i in range(0,height):
# for j in range(0,width):
# img[i][j]=
# show rotated image
cv2.imshow("image",img)
Thanks for your attention!
img[i][j]
toimg[j][i]
in your loop?