代码拉取完成,页面将自动刷新
同步操作将从 luojie326/opencv-pyqt5 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
import cv2
GRAYING_STACKED_WIDGET = 0
FILTER_STACKED_WIDGET = 1
MORPH_STACKED_WIDGET = 2
GRAD_STACKED_WIDGET = 3
THRESH_STACKED_WIDGET = 4
EDGE_STACKED_WIDGET = 5
BGR2GRAY_COLOR = 0
GRAY2BGR_COLOR = 1
COLOR = {
BGR2GRAY_COLOR: cv2.COLOR_BGR2GRAY,
GRAY2BGR_COLOR: cv2.COLOR_GRAY2BGR
}
MEAN_FILTER = 0
GAUSSIAN_FILTER = 1
MEDIAN_FILTER = 2
ERODE_MORPH_OP = 0
DILATE_MORPH_OP = 1
OPEN_MORPH_OP = 2
CLOSE_MORPH_OP = 3
GRADIENT_MORPH_OP = 4
TOPHAT_MORPH_OP = 5
BLACKHAT_MORPH_OP = 6
MORPH_OP = {
ERODE_MORPH_OP: cv2.MORPH_ERODE,
DILATE_MORPH_OP: cv2.MORPH_DILATE,
OPEN_MORPH_OP: cv2.MORPH_OPEN,
CLOSE_MORPH_OP: cv2.MORPH_CLOSE,
GRADIENT_MORPH_OP: cv2.MORPH_GRADIENT,
TOPHAT_MORPH_OP: cv2.MORPH_TOPHAT,
BLACKHAT_MORPH_OP: cv2.MORPH_BLACKHAT
}
RECT_MORPH_SHAPE = 0
CROSS_MORPH_SHAPE = 1
ELLIPSE_MORPH_SHAPE = 2
MORPH_SHAPE = {
RECT_MORPH_SHAPE: cv2.MORPH_RECT,
CROSS_MORPH_SHAPE: cv2.MORPH_CROSS,
ELLIPSE_MORPH_SHAPE: cv2.MORPH_ELLIPSE
}
SOBEL_GRAD = 0
SCHARR_GRAD = 1
LAPLACIAN_GRAD = 2
BINARY_THRESH_METHOD = 0
BINARY_INV_THRESH_METHOD = 1
TRUNC_THRESH_METHOD = 2
TOZERO_THRESH_METHOD = 3
TOZERO_INV_THRESH_METHOD = 4
OTSU_THRESH_METHOD = 5
THRESH_METHOD = {
BINARY_THRESH_METHOD: cv2.THRESH_BINARY, # 0
BINARY_INV_THRESH_METHOD: cv2.THRESH_BINARY_INV, # 1
TRUNC_THRESH_METHOD: cv2.THRESH_TRUNC, # 2
TOZERO_THRESH_METHOD: cv2.THRESH_TOZERO, # 3
TOZERO_INV_THRESH_METHOD: cv2.THRESH_TOZERO_INV, # 4
OTSU_THRESH_METHOD: cv2.THRESH_OTSU # 5
}
EXTERNAL_CONTOUR_MODE = 0
LIST_CONTOUR_MODE = 1
CCOMP_CONTOUR_MODE = 2
TREE_CONTOUR_MODE = 3
CONTOUR_MODE = {
EXTERNAL_CONTOUR_MODE: cv2.RETR_EXTERNAL,
LIST_CONTOUR_MODE: cv2.RETR_LIST,
CCOMP_CONTOUR_MODE: cv2.RETR_CCOMP,
TREE_CONTOUR_MODE: cv2.RETR_TREE
}
NONE_CONTOUR_METHOD = 0
SIMPLE_CONTOUR_METHOD = 1
CONTOUR_METHOD = {
NONE_CONTOUR_METHOD: cv2.CHAIN_APPROX_NONE,
SIMPLE_CONTOUR_METHOD: cv2.CHAIN_APPROX_SIMPLE
}
NORMAL_CONTOUR = 0
RECT_CONTOUR = 1
MINRECT_CONTOUR = 2
MINCIRCLE_CONTOUR = 3
# 均衡化
BLUE_CHANNEL = 0
GREEN_CHANNEL = 1
RED_CHANNEL = 2
ALL_CHANNEL = 3
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。