Question: I need to modify current code that I have in cv 2 need to rotate image that is in the center by 3 6 0
I need to modify current code that I have in cv
need to rotate image that is in the center by degrees
CAN NOT USE BUILD IN FUNCTIONS
NEED TO WRITE OUT THE CODE
A function for multiplying two arbitrary nxm matrices
n and m should be dynamic
using the matrix multiplication function
when you rotate the image by degrees for example, the corners can't be clipped
import cv
import numpy as np
imagecvimreadapplepng
numRowsimageshape
numColsimageshape
#shiftRows heightOfEmptyImage heightOfImage
num
emptyImnpzerosnumRowsnum numColsnum npfloat
shiftrowsintnumRowsnumnumRows
shiftcolintnumColsnumnumCols
for i in rangenumRows:
for j in rangenumCols:
emptyImintishiftrowsintjshiftcolimageij
emptyImintishiftrowsintjshiftcolimageij
emptyImintishiftrowsintjshiftcolimageij
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
