Ask Your Question
0

OpenCV: BGR to YUV conversion

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

begueradj gravatar image

updated 2015-03-05 03:03:13 -0500

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 -0500

bvbdort gravatar image

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

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 -0500 )edit

it works, thank you very much !

begueradj gravatar imagebegueradj ( 2015-03-05 05:26:14 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

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

Seen: 13,267 times

Last updated: Mar 05 '15