滑动轨迹栏作调色板
cv.createTrackbar(‘R’, ‘image’, 0, 255, nothing)
参数:哪个滑动轨迹栏,哪个窗口,最小值,最大值,回调函数
cv.getTrackbarPos(‘R’, ‘image’)
参数:轨迹栏名,窗口名
import numpy as np
import cv2 as cv
def nothing(x):
pass
img = np.zeros((600, 512, 3), np.uint8)
cv.namedWindow('image', 0)
cv.createTrackbar('R'