Option RGB2BGR disappeared from cvtColor

I am trying to compile my code with opencv 3.0.0 (which worked with previous versions of opencv)
  cvtColor (img, img, CV_RGB2BGR)

and get a compilation error
 CV_RGB2BGR was not declared in this area
The option also does not exist in the documentation

How can I get the same functionality (RGB2BGR) with the new version?

+4
source share
3 answers

Use the constant cv :: COLOR_RGB2BGR instead of CV_RGB2BGR.

It works for other conversions, just change CV_ to cv :: COLOR_.

Just checked it works for me.

+6
source

, ?
, , CV_BGR2RGB - . mixChannels() .

+1

, OpenCV 3 - , , , . , , dev. , , COLOR_RGB2BGR. CV_RGB2BGR types_c.h

0

All Articles