def find_centers(binary_img, find_ball_center, find_basket_center):
	"""
	Function that returns both the ball and basket center. If the ball center is
	not found in the ROI it means that the user already shot the ball. Then there
	is no point in estimating the basket center position and hence it is not computed.

	:param binary_img: np.array with the representation of the binarized image
	:param find_ball_center: function that returns the ball center
	:param find_basket_center: function that returns the basket center
	:returns (ball_center, basket_center): tuple with the coordinates of the centers if found else (None, None)
	"""
	ball_center  = find_ball_center(binary_img)
	# basket center should return only the true center
	# only perform basket detection if ball has been previously found in ROI. 
	if ball_center:
		basket_center = find_basket_center(binary_img)
		return (ball_center, basket_center)
	else:
		return (None, None)