其他分享
首页 > 其他分享> > opencv第6讲--tracking_bar的使用

opencv第6讲--tracking_bar的使用

作者:互联网

Mat dst,m,src;
int lightness = 50;

static void on_track(int, void*)
{
	m = Scalar(lightness, lightness, lightness);

	add(src, m, dst);

	imshow("亮度调整", dst);
}

void QuickDemo::tracking_bar_demo(Mat& image)
{
	namedWindow("亮度调整", WINDOW_AUTOSIZE);

	dst = Mat::zeros(image.size(), image.type());
	m = Mat::zeros(image.size(), image.type());

	src = image;

	int max_value = 100;

	createTrackbar("value bar", "亮度调整", &lightness, max_value, on_track);

	on_track(50, 0);
}

  

标签:tracking,Mat,--,image,opencv,int,track,lightness,dst
来源: https://www.cnblogs.com/xcxfury001blogs/p/15725888.html