Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this is the question and the code i have so far. please advise. In this step, you will write a function that takes affino parameters

this is the question and the code i have so far. please advise. image text in transcribed
In this step, you will write a function that takes affino parameters as Inputs and returna a combined 3 x 3 matrix. DO THIS: Write a function that takes seven Inputs and returns a transformation T. Name this function affine_transform. These include the following: 8 - Rotation around the center of the image (-180,180). sx - Sale factor for the image in the x direction (0,6) sy - Sale factor for the image in the x direction (0,5 tx- translation in the x direction (pixels) ty - translation in the y direction (pixels) shx - Shear in the x direction (0,1) shy - Shear in the y direction [0.1) The order of these is very important. First, assume the image is already centered, then apply shear, scaling, rotation, and finish with translation. [66): ##Put your function here from ipywidgets import interact, interact_manual def affine_transform(a-@,sx 0.5, sy 8.5, txu, ty@,shx @, shy-): T = np.matrix([[i,a,d], [0,1,0], [0,0,1))) *Your transformations go here. a(-180, 180) a - -angle/180 np.pi SH - np.matrix([[1, shx, ), Ishy, 1,0], [0,0,1))) S np.matrix(lisx,0,0), te,sy.bi, 16,0 1155 - np.matrix(I Inp.cos(a), np.sin(a), 01. Inp.sin(a), np.cos(a),e1, [0,0,111) np.matrix([11,0, tx), te, 1, tyl, 10,0,1))) TSH S RAT; mp2 Tkim; return T In this step, you will write a function that takes affino parameters as Inputs and returna a combined 3 x 3 matrix. DO THIS: Write a function that takes seven Inputs and returns a transformation T. Name this function affine_transform. These include the following: 8 - Rotation around the center of the image (-180,180). sx - Sale factor for the image in the x direction (0,6) sy - Sale factor for the image in the x direction (0,5 tx- translation in the x direction (pixels) ty - translation in the y direction (pixels) shx - Shear in the x direction (0,1) shy - Shear in the y direction [0.1) The order of these is very important. First, assume the image is already centered, then apply shear, scaling, rotation, and finish with translation. [66): ##Put your function here from ipywidgets import interact, interact_manual def affine_transform(a-@,sx 0.5, sy 8.5, txu, ty@,shx @, shy-): T = np.matrix([[i,a,d], [0,1,0], [0,0,1))) *Your transformations go here. a(-180, 180) a - -angle/180 np.pi SH - np.matrix([[1, shx, ), Ishy, 1,0], [0,0,1))) S np.matrix(lisx,0,0), te,sy.bi, 16,0 1155 - np.matrix(I Inp.cos(a), np.sin(a), 01. Inp.sin(a), np.cos(a),e1, [0,0,111) np.matrix([11,0, tx), te, 1, tyl, 10,0,1))) TSH S RAT; mp2 Tkim; return T

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Database Programming

Authors: Chris Fehily

1st Edition

1937842312, 978-1937842314

More Books

Students also viewed these Databases questions

Question

Explain the Neolithic age compared to the paleolithic age ?

Answered: 1 week ago

Question

What is loss of bone density and strength as ?

Answered: 1 week ago

Question

8. Design office space to facilitate interaction between employees.

Answered: 1 week ago