src/utils.py
def gauss2d(sigma=(1,1), order=(0,0), angle=0, nstd=3, normalize=True):
	"""
	Derivative of the rotated 2d Gaussian filter
	"""
	assert (sigma[0]>0)&(sigma[1]>0), "sigma cannot be equal to zero"
	# if angle==None:
	# 	g = np.outer( gauss1d(size[1],sigma[1],order[1]), gauss1d(size[0],sigma[0],order[0]) )
	# else:
	x,y = generate_filter_support(sigma,angle,nstd)
	x_theta,y_theta = rotate(x,y,-angle)
	g = gauss1d(x=x_theta,sigma=sigma[0],order=order[0],normalize=False) * gauss1d(x=y_theta,sigma=sigma[1],order=order[1],normalize=False)
	if normalize:
		# return g / np.linalg.norm(g,1)
		return g / g.sum()
	else:
		return g

	Derivative of the rotated 2d Gaussian filter
	
Derivative of the rotated 2d Gaussian filter
Derivative of the rotated 2d Gaussian filter
def gauss2d(sigma=(1,1), order=(0,0), angle=0, nstd=3, normalize=True):
	assert (sigma[0]>0)&(sigma[1]>0), "sigma cannot be equal to zero"
	x,y = generate_filter_support(sigma,angle,nstd)
	x_theta,y_theta = rotate(x,y,-angle)
	g = gauss1d(x=x_theta,sigma=sigma[0],order=order[0],normalize=False) * gauss1d(x=y_theta,sigma=sigma[1],order=order[1],normalize=False)
	if normalize:
		return g / g.sum()
	else:
		return g
def gauss2d ( sigma = ( 1 , 1 ) , order = ( 0 , 0 ) , angle = 0 , nstd = 3 , normalize = True ) : assert ( sigma [ 0 ] > 0 ) & ( sigma [ 1 ] > 0 ) , "sigma cannot be equal to zero" x , y = generate_filter_support ( sigma , angle , nstd ) x_theta , y_theta = rotate ( x , y , - angle ) g = gauss1d ( x = x_theta , sigma = sigma [ 0 ] , order = order [ 0 ] , normalize = False ) * gauss1d ( x = y_theta , sigma = sigma [ 1 ] , order = order [ 1 ] , normalize = False ) if normalize : return g / g . sum ( ) else : return g
Derivative of the rotated 2d Gaussian filter
Derivative of the rotated 2d Gaussian filter
"""
	Derivative of the rotated 2d Gaussian filter
	""" # if angle==None: # 	g = np.outer( gauss1d(size[1],sigma[1],order[1]), gauss1d(size[0],sigma[0],order[0]) ) # else: # return g / np.linalg.norm(g,1)
sigma
order
angle
nstd
normalize