def visualize(frame, coordinates_list, alpha = 0.80, color=[255, 255, 255]):
"""
Args:
1. frame: OpenCV's image which has to be visualized.
2. coordinates_list: List of coordinates which will be visualized in the given `frame`
3. alpha, color: Some parameters which help in visualizing properly.
A convex hull will be shown for each element in the `coordinates_list`
"""
layer = frame.copy()
output = frame.copy()
for coordinates in coordinates_list:
c_hull = cv2.convexHull(coordinates)
cv2.drawContours(layer, [c_hull], -1, color, -1)
cv2.addWeighted(layer, alpha, output, 1 - alpha, 0, output)
cv2.imshow("Output", output)
data_preprocessing_autoencoder.py 文件源码
python
阅读 30
收藏 0
点赞 0
评论 0
评论列表
文章目录