cvtcolor for CV_RGB2HSV or CV_RGB2HSV_FULL does not maintain color standard (Bug #3159)


Added by Md Iftekhar Tanveer over 11 years ago. Updated over 11 years ago.


Status:Cancelled Start date:2013-07-16
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
Affected version:2.4.6 (latest release) Operating System:Any
Difficulty:Easy HW Platform:Any
Pull request:

Description

All commercial software handles HSV color-space (including image processing toolbox of MATLAB) in a specific sequence for hue. It is commonly known as HSV color wheel and represented in the attached picture.

OpenCV does not follow this standard. In opencv, the wheel is rotated so that blue is now in 0 degrees, instead of red. As a result, standard thresholds known for common colors doesn't apply to opencv even if we scale the 360 degree wheel to 255. This "non-conformity to what is already well established" can be considered a bug for opencv. Because, the whole purpose of HSV color-space is to be more similar to human perception.

Contributors can add a new flag CV_RGB2HSV_STANDARD for this purpose


84697-Labeled_Color_Wheel.jpg (93.3 kB) Md Iftekhar Tanveer, 2013-07-16 10:34 pm


Associated revisions

Revision efebd83b
Added by Alexander Alekhin over 10 years ago

Merge pull request #3159 from ElenaGvozdeva:ocl_gemm

History

Updated by Md Iftekhar Tanveer over 11 years ago

Sorry for the wrong info. It works correctly. I was testing RGB2HSV_FULL while providing a BGR image.

  • Status changed from New to Done

Updated by Andrew Senin over 11 years ago

I'm closing it since you confirmed it works correctly. Please feel free to reopen the issue if it is necessary.

  • Status changed from Done to Cancelled

Also available in: Atom PDF