Ask Your Question
0

cvtcolor parameter four

asked 2016-10-28 08:00:04 -0600

LBerger gravatar image

Hi,

I have try something like this using cvtColor to understand parameter 4

Mat img=imread("lena.jpg",IMREAD_COLOR);// I have try an image with alpha channel too
cvtColor(img,dst, CV_BGR2HSV,1);

but results seems equal to cvtColor(img,dst, CV_BGR2HSV);

Is somebody can give me an example of cvtcolor with parameter 4 used?

Thanks in advance

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-10-28 20:52:55 -0600

Tetragramm gravatar image

For example: COLOR_YUV2BGR with dcn = 4 would return a BGRA, and dcn = 3 would return BGR

BGR2HSV is fixed at 3, but HSV2BGR can be 3 or 4. The same for Lab2BGR and Luv.

edit flag offensive delete link more

Comments

Yes I found those example too and I think that's something is missing in doc like this

LBerger gravatar imageLBerger ( 2016-10-29 02:48:37 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-10-28 08:00:04 -0600

Seen: 264 times

Last updated: Oct 28 '16