Showing posts with label Color Channels. Show all posts
Showing posts with label Color Channels. Show all posts

9/02/2011

Simple Image Processing Tool / C++ Source(MFC, OpenCV) / κ°„λ‹¨ν•œ μ˜μƒμ²˜λ¦¬ 툴

Created Date : 2008.10
Language : C++(MFC)
Tool : Visual C++ 6.0
Library & Utilized : OpenCV 1.0
Reference :  Image Processing Book, Learning OpenCV
etc. : -



When I teach Image Processing to undergraduate students,  this program is made for practicing programming.
This code includes simple image processing method.

ex) Image adding, reverse, Lookup Table making, Gamma adjusting, Image Zoom in/out, Rotation, Morphology, Histogram Drawing, Stretching, Laplacian, sovel, RGB, HSI, YCbCr..

The code may be useful to beginner studying image processing , MFC and OpenCV.


<source code>



If you have good idea or advanced opinion, please reply me. Thank you

(Please understand my bad english ability. If you point out my mistake, I would correct pleasurably. Thank you!!)---------------------------------------------------------------------------



κ°„λ‹¨ν•œ μ˜μƒ 처리 μ†ŒμŠ€
RAW λ₯Ό μ˜€ν”ˆν•˜μ—¬
2μ˜μƒ λ”ν•˜κΈ°, 역상계산, 룩업데이블 생성, 감마 쑰절
μ˜μƒ μΆ•μ†Œ, μ˜μƒν™•λŒ€, μ˜μƒ νšŒμ „
λͺ¨ν΄λ‘œμ§€, 히슀트그램 그리기, 슀트레칭, ν‰ν™œν™”
λΌν”ŒλΌμ‹œμ•ˆ, 평화화 μ†Œλ²¨
을 μ²˜λ¦¬ν•¨
λ˜ν•œ BMP νŒŒμΌμ„ μ˜€ν”ˆν•˜μ—¬ RGB, HSI, Ycbcr둜 채널을 λΆ„λ¦¬ν•œλ‹€.
그리고 OpenCVλ₯Ό μ΄μš©ν•˜μ—¬
μ˜μƒ 밝기 쑰절, 크기 쑰절, νšŒμ „, 이진화, 팽창, μˆ˜μΆ•, ν•„ν„°λ₯Ό μ μš©ν•΄ λ³Έλ‹€.

μ••μΆ• νŒŒμΌμ— μ†ŒμŠ€, 이미지, κ°„λž΅ν•œ μ„€λͺ… λ¬Έμ„œκ°€ 있음



<source code>



쒋은 μ˜κ²¬μ΄λ‚˜ λ‹΅λ³€ 남겨 μ£Όμ„Έμš”.

8/21/2011

Split color channels -> RGB, HSI, YCbCr, YUV, YIQ, YUW / C++ source / 칼라 채널 뢄리

Created Date : 2007.8
Language : C/C++
Tool : Microsoft Visual C++ 6.0 (MFC)
Library & Utilized : -
Reference : Simplified approach to image processing book -Randy Crane-
etc. : Bmp Image File
                                            RGB                                                   YCbCr


 
                                            YIQ                                                      YUV

                                             HSI                                                       YUW    

This program splits the channel into several version.
There are many color channels for image processing such as RGB, HSI, YCbCr, YUV, YIQ, YUW.
Each channels is made by specific formula that is introduced from many image processing books. The method of covert is simple and not difficult.

For example YCbCr is made by blow formula.
Y = 0.299*R + 0.587*G + 0.114*B
Cb = -0.16874*R + -0.33126*G + 0.5*B
Cr = 0.5*R + -0.41869*G - 0.08131*B

You can download entire source code and report document(doc) but the report is written by korean (sorry). -> <here>

If you have any question or opinion for improving, please reply.
Thank you.

(Please understand my bad english ability. If you point out my mistake, I would correct pleasurably. Thank you!!)
-------------------------------------

이 ν”„λ‘œκ·Έλž¨μ€ bmpνŒŒμΌμ„ μ—΄μ–΄μ„œ μ—¬λŸ¬κ°€μ§€ μ±„λ„λ‘œ λΆ„λ¦¬ν•˜λŠ” κ°„λ‹¨ν•œ μ˜μƒ 처리 ν”„λ‘œκ·Έλž¨μž…λ‹ˆλ‹€.
색 채널 λΆ„λ¦¬λŠ” 이미지 처리 μ±…μ—μ„œ μ‰½κ²Œ κ·Έ 방법과 원리λ₯Ό μ°Ύμ•„ λ³Ό 수 μžˆμŠ΅λ‹ˆλ‹€.
예λ₯Ό λ“€μ–΄ RGBμ—μ„œ YCbCr둜 λΆ„λ¦¬ν•˜λŠ” 방법은 μ•„λž˜ μˆ˜μ‹μœΌλ‘œ κ°€λŠ₯ν•©λ‹ˆλ‹€.

Y = 0.299*R + 0.587*G + 0.114*B
Cb = -0.16874*R + -0.33126*G + 0.5*B
Cr = 0.5*R + -0.41869*G - 0.08131*B


더 μžμ„Έν•œ λ‚΄μš©μ€ λ§ν¬ν•œ μ €μ˜ 전체 μ†ŒμŠ€ μ½”λ“œλ₯Ό μ²¨λΆ€ν•˜μ„Έμš”.
μ••μΆ• νŒŒμΌμ—λŠ” ν•œκΈ€λ‘œ 된 λ³΄κ³ μ„œλ„ ν¬ν•¨λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€. - > <here>

였래 전에 λ§Œλ“  μ†ŒμŠ€λΌ 뢀쑱함이 λ§Žμ„ 것 κ°™λ„€μš”.
λ¬Έμ œμ μ΄λ‚˜ κ°œμ„  사항 있으면 λ‹΅λ³€ μ£Όμ„Έμš”.
κ°μ‚¬ν•©λ‹ˆλ‹€.