opencv学习笔记--色彩空间转换

 色彩空间

效果图:

opencv学习笔记--色彩空间转换_第1张图片

# coding=GBK
import cv2 as cv
import numpy as np

def color_space_demo(image):
	cv.imshow("yuan",image)
	hsv=cv.cvtColor(image,cv.COLOR_BGR2HSV)
	cv.imshow("hsv",hsv)
	yuv=cv.cvtColor(image,cv.COLOR_BGR2YUV)
	cv.imshow("yuv",yuv)

	
image=cv.imread("D://img.jpg")

color_space_demo(image)

cv.waitKey(0)
cv.destroyAllWindows()

 

你可能感兴趣的:(opencv)