Improve documentation about imread and cvtColor function behaviour (Bug #2282)


Added by Ramiro Pereira de Magalhães over 12 years ago. Updated about 12 years ago.


Status:Cancelled Start date:2012-08-19
Priority:Low Due date:
Assignee:- % Done:

0%

Category:documentation
Target version:2.4.4
Affected version:branch '2.4' Operating System:
Difficulty: HW Platform:
Pull request:

Description

"imread" documentation does not clearly states how RGB pixel data is stored in a Mat after loading an image. Since it is not stored in a intuitive manner (in red, green, blue order), I believe that this should be present in its page (which, I think, is this one: http://docs.opencv.org/modules/highgui/doc/reading_and_writing_images_and_video.html#imread).

Also, documentation about converting RGB to HLS with function cvtColor (http://docs.opencv.org/modules/imgproc/doc/miscellaneous_transformations.html#cvtcolor) should also be fixed. It seems that the section that explains how H, L, and S values are converted to 8, 16 or 32 bits values has been copied from the RGB to HSV equivalent section. Also, I think you should add in this function a statement about the order those values are stored in a Mat object.


History

Updated by Andrey Kamaev over 12 years ago

  • Category set to documentation

Updated by Vadim Pisarevsky over 12 years ago

  • Target version deleted ()

Updated by Daniel Takacs over 12 years ago

In general it should be specifically stated that the default ordering is BGR in highgui.
Even the tutorial (http://docs.opencv.org/doc/tutorials/introduction/load_save_image/load_save_image.html) is using the CV_RGB2GRAY conversion instead of the correct BGR2GRAY one.
(Maybe a special note around cvtColor will help also.)

Updated by Kirill Kornyakov over 12 years ago

  • Target version set to Next Hackathon

Updated by Vadim Pisarevsky about 12 years ago

  • Target version deleted (Next Hackathon)

Updated by Daniil Osokin about 12 years ago

imread() docs have notice, that it uses BGR channel order. Conversion formulas from RGB to HSV are good. This task cancelled. But tutorial http://docs.opencv.org/doc/tutorials/introduction/load_save_image/load_save_image.html should be checked (http://code.opencv.org/issues/2739).

  • Affected version set to branch '2.4'
  • Status changed from Open to Cancelled

Updated by Kirill Kornyakov about 12 years ago

  • Target version set to 2.4.4

Also available in: Atom PDF