import math
import numpy as np
import cv2 as cv
def Polar2Cartesian(theata):
"""
极坐标转直角坐标系
:return: 斜率
"""
pi = 3.14
radian = pi * theata / 180
return math.tan(radian)
def Painter(ori,theta):
"""
painter a picture
:param ori: origin image
:param theta: θ
:return: img
"""
width, height = ori.shape[0], ori.shape[1]
img = np.zeros((height,width))
slope = Polar2Cartesian(theta