MCPcopy Create free account
hub / github.com/UVA-Computer-Vision-Lab/FrameINO / sigma_matrix2

Function sigma_matrix2

utils/optical_flow_utils.py:154–165  ·  view source on GitHub ↗

Calculate the rotated sigma matrix (two dimensional matrix). Args: sig_x (float): sig_y (float): theta (float): Radian measurement. Returns: ndarray: Rotated sigma matrix.

(sig_x, sig_y, theta)

Source from the content-addressed store, hash-verified

152
153############################################# The following is for dilation method in optical flow ######################################
154def sigma_matrix2(sig_x, sig_y, theta):
155 """Calculate the rotated sigma matrix (two dimensional matrix).
156 Args:
157 sig_x (float):
158 sig_y (float):
159 theta (float): Radian measurement.
160 Returns:
161 ndarray: Rotated sigma matrix.
162 """
163 d_matrix = np.array([[sig_x**2, 0], [0, sig_y**2]])
164 u_matrix = np.array([[np.cos(theta), -np.sin(theta)], [np.sin(theta), np.cos(theta)]])
165 return np.dot(u_matrix, np.dot(d_matrix, u_matrix.T))
166
167
168def mesh_grid(kernel_size):

Callers 1

bivariate_GaussianFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected