Ask Your Question
0

OpenCV: BGR to YUV conversion

asked 2015-03-04 11:06:06 -0600

begueradj gravatar image

updated 2015-03-05 03:03:13 -0600

Is there a way to convert an image from BGR to YUV color space ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
4

answered 2015-03-04 11:47:41 -0600

bvbdort gravatar image

updated 2015-03-05 05:25:26 -0600

In c++ use

  cvtColor(img_in, img_out, CV_BGR2YUV);

In python

 img_out = cv2.cvtColor(img_in, cv2.COLOR_BGR2YUV)
edit flag offensive delete link more

Comments

I did that in Python and it says : AttributeError: 'module' object has no attribute 'CV_BGR2YUV'

begueradj gravatar imagebegueradj ( 2015-03-05 05:02:58 -0600 )edit

it works, thank you very much !

begueradj gravatar imagebegueradj ( 2015-03-05 05:26:14 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-03-04 11:06:06 -0600

Seen: 31,268 times

Last updated: Mar 05 '15