I want to solve a programming Problem OpenCv numpy Python

Job ID: 32985484

Budget: $10 – $30 USD

x = np.interp(320, (shapenew[1, 0], shapenew[0, 0]), (0, wScr))
y = np.interp(200, (shapenew[1, 1], shapenew[0, 1]), (0, hScr))

this is the code i am using for interpolation

but problem is that

it only takes Xmin and Xmax
yMin and yMax

which keep it restrict to only two side

i am interpolating this small screen into big one

with respect to the axis of camera 320,200

but it is fine and working untill the camera is normal when i rotate camera the interpolation lose it accuracy because it get rotated

the "pink" rectangle is shown in image to tell how interpolation is working before rotation and after rotation


the software takes the screen size in image

give axis of screen image to interpolation

the interpolation interpolate and find where 320,200 of camera is pointing

it take my mouse at the same place of the screen
Related categories: Python Algorithm OpenCV NumPy