Opencv: cvtColorλŠ” sRGB 색상 κ³΅κ°„μ—μ„œ λΉ„μ„ ν˜•μ„±μ„ μ²˜λ¦¬ν•©λ‹ˆκΉŒ?

에 λ§Œλ“  2015λ…„ 07μ›” 27일  Β·  3μ½”λ©˜νŠΈ  Β·  좜처: opencv/opencv

http://code.opencv.org/issues/4293 μ—μ„œ 이전됨

|| Ying Xiong on 2015-04-24 15:45
|| Priority: Normal
|| Affected: None
|| Category: imgproc, video
|| Tracker: Feature
|| Difficulty: 
|| PR: 
|| Platform: None / None

cvtColorλŠ” sRGB 색상 κ³΅κ°„μ—μ„œ λΉ„μ„ ν˜•μ„±μ„ μ²˜λ¦¬ν•©λ‹ˆκΉŒ?

I am wondering whether OpenCV has functions to handle the non-linearities in the sRGB color space.

Say I want to convert an JPEG image from sRGB color space into XYZ color space. As specified in this [Wiki page](https://en.wikipedia.org/wiki/SRGB#Specification_of_the_transformation), one needs to first undo the nonlinearities to convert to linear RGB space, and then multiply with the 3x3 color transform matrix. However, I couldn't find any such discussions in the [cvtColor](http://docs.opencv.org/modules/imgproc/doc/miscellaneous_transformations.html#cvtcolor) documentation. Did I miss something?

Thanks a lot in advance!

역사

Vadim Pisarevsky 2015-05-25 11:14
-   Category set to imgproc, video
auto-transferred imgproc video feature normal

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

예, OpenCVλŠ” 감마 μ˜μ—­μ—μ„œ λ§Žμ€ κ°œμ„ μ΄ ν•„μš”ν•©λ‹ˆλ‹€. http://blog.johnnovak.net/2016/09/21/what-every-coder-should-know-about-gamma/

λͺ¨λ“  3 λŒ“κΈ€

예, OpenCVλŠ” 감마 μ˜μ—­μ—μ„œ λ§Žμ€ κ°œμ„ μ΄ ν•„μš”ν•©λ‹ˆλ‹€. http://blog.johnnovak.net/2016/09/21/what-every-coder-should-know-about-gamma/

λ¬Έμ„œμ—μ„œ 이와 같이 μ–ΈκΈ‰ν•˜λŠ” 것이 쒋을 κ²ƒμž…λ‹ˆλ‹€. 예λ₯Ό λ“€μ–΄, μ—¬κΈ° μ—μ„œ 감마 보정에 λŒ€ν•΄ μ–ΈκΈ‰λœ 것이 μ—†μŠ΅λ‹ˆλ‹€. λ³€ν™˜μ΄ μ„ ν˜• λ³€ν™˜μœΌλ‘œ μ‹œμž‘λœλ‹€λŠ” 사싀은 λ³€ν™˜μ΄ μ–΄λ–€ μ’…λ₯˜μ˜ 감마 보정도 μˆ˜ν–‰ν•˜μ§€ μ•ŠλŠ”λ‹€λŠ” 가정을 κ°•ν™”ν•©λ‹ˆλ‹€. μ—¬μœ  μ‹œκ°„μ΄ 생기면 직접 κΈ°μ—¬ν•˜κ³  문제λ₯Ό ν•΄κ²°ν•˜λ„λ‘ λ…Έλ ₯ν•˜κ² μŠ΅λ‹ˆλ‹€.

κ΄€λ ¨ λ©”λͺ¨μ—μ„œ LRGB λ˜λŠ” LBGR 와 같이 COLOR_LBGR2Lab LBGR 둜 μ‹œμž‘ν•˜λŠ” λ³€ν™˜ μ½”λ“œμ˜ μ‚¬μš©μ„ λͺ…ν™•νžˆ ν•  수 μžˆμŠ΅λ‹ˆκΉŒ? L λŠ” ν•¨μˆ˜κ°€ 감마 μΈμ½”λ”©λœ κ°’ λŒ€μ‹  RGB/BGR에 λŒ€ν•΄ μ„ ν˜• 값을 μ˜ˆμƒν•œλ‹€λŠ” 것을 μ˜λ―Έν•©λ‹ˆκΉŒ?

미리 κ°μ‚¬λ“œλ¦½λ‹ˆλ‹€! ❀️

cv::imshow 및 cv::imdecode λ™μž‘ 방식도 λͺ…ν™•ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. 일뢀 λ¬Έμ„œλŠ” 맀우 κ°μ‚¬ν•˜κ² μŠ΅λ‹ˆλ‹€.

이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰