Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started