CS654: Digital Image Analysis

CS654: Digital Image Analysis
Slide Note
Embed
Share

In this lecture series, the fundamentals of color image processing and color models are explored. Topics covered include the conversion of RGB to HSI models, intensity and saturation components, and techniques for processing color images. The lectures delve into the intricacies of color representation, RGB primaries, and the calculation of hue values. Various images and diagrams aid in understanding the concepts discussed.

  • Color Models
  • Image Analysis
  • HSI Model
  • RGB Conversion
  • Color Processing

Uploaded on Feb 20, 2025 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. CS654: Digital Image Analysis Lecture 30: Color Model Conversion

  2. Recap of Lecture 29 Color image processing Fundamentals of colors Primary and secondary colors (light and pigment) Color models

  3. Outline of Lecture 30 HSI Model Conversion from HIS RGB, RGB HIS Pseudo color image processing Application Image processing techniques on color images

  4. Images: Gonzalez & Woods, 3rd edition Color Models

  5. Images: Gonzalez & Woods, 3rd edition The HSI Color Models

  6. Color model conversion

  7. Color model conversion Intensity (I) Saturation (S)

  8. Color model conversion 120 60

  9. Convert RGB to HSI

  10. HSI to RGB Conversion HIS Color triangle HIS Color solid

  11. HSI model color representation RGB primaries ? ? ? ? = ? = ? = ? + ? + ? ? + ? + ? ? + ? + ? Where, ?,?,? [0,1] Also and ?,?,? [0,1] ? + ? + ? = 1 For any ?,?,? value the intensity component (?) is given by ? =? ?(? + ? + ?)

  12. Calculation of Hue (H) 1 3,1 ?;?0=? 3,1 Let, ? = ? = ?,?,? 3 ?0=? ?;?0=? ? ?????? has ?0 ?0 ?????? has ?0 ?0 Line ????separates the ?0> ?0, region from the ?0< ?0 region. RG ??? ??? =1 3;??? ???? =2 ? ?,?,? 3

  13. Calculation of Hue 0 ? 180 ? ? . ?? ? = ? ? ?? ? cos? Where, ?= Hue 20.5 2 2 ? 1 + ? 1 + ? 1 ? ? = 3 3 3 ?.? ? ??+ ??+ ?? ? ? + ? + ?? ? ? + ? + ?? ? ? = ?.? ?? ?? ? =

  14. Calculation of Hue 0 ? 180 ? ? . ?? ? = 2 3 ? 1 +1 ? 1 +1 ? 1 3 3 3 3 3 2? ? ? 3(? + ? + ?) = ? ? ? ? + (? ?) ? = cos ? ? ??+ (? ?)(? ?)?.? If ??> ?? then ? = ??? ?

  15. Calculation of Saturation (S) ? 1 3 ? ? =|??| |?? | =|??| |??|= ?? |??| |??| ? ? 1 3 ? = 1 3? ? = (? ??) ? = 3 ?

  16. Calculation of S In the RG sector ?0= min(?0,?0,?0) ? = ? ???(??,??,??) ? ? = ? ? + ? + ?[??? ?,?,? ] RG

  17. The HSI Color Models Converting colors from RGB to HSI if B G = H 360 if B G 1 + [( ) ( )] R G R B 2 = 1 cos + 2 / 1 2 [( ) ( )( )] R G R B G B 3 G = 1 [min( , , )] S R G B + + ( ) R B 1 = + + ( ) I R G B 3

  18. Converting colors from HSI to RGB Input: HSI values within the range 0,1 Output: Corresponding RGB values in the same range RG

  19. Saturation calculation: RG region ? =? We know that ? = 1 3? ?(? ?) A plane that contains ? and is perpendicular to the red axis Value of ? is the projection of ? onto the red axis

  20. Saturation calculation: RG region From similar triangles, ???? ??? =? ? = 1 ?; ? ? = |????| ?? cos ? + |???| ? =|???| |????|+ ?? |????|cos ? =1 ?? |????|cos ? 3+ ?

  21. Saturation calculation: RG region ? =1 ?? |????|cos ? 3+ ?? = ?|?? | Angle formed at ? by line segments ???? and ??? is 60 ??? = ?? cos(60 ?) ?? = ???/cos 60 ? ? =1 ? ??? ? =? ???? ? ??? ?? ? 3+ |????|cos 60 ? cos ? ? + ?

  22. HSI to RGB: RG Sector H 0 120 120 cos S H = = + = + 1 ( I ) 3 ( ) G I R B B S 1 R I cos( 60 ) H

  23. HSI to RGB: GB Sector H 120 240 = H 120 H 120 cos S H = 1 ( I ) = + R S = + 3 ( ) 1 B I R G G I cos( 60 ) H

  24. HSI to RGB: BR Sector H 240 360 = H 240 H 120 cos S H = = + = + 1 ( I ) G S 3 ( ) 1 R I G B B I cos( 60 ) H

  25. The HSI Color Models

  26. The HSI Color Models RGB H H S S I RGB I

  27. Pseudocolor Image Processing False color processing Assigning colors to gray values based on a specified criterion. Human visualization and interpretation of gray-scale events in an image or sequence of images.

  28. Intensity Slicing

  29. Intensity Slicing : Example

  30. Intensity Slicing : Example

  31. Gray Level to Color Transformations

  32. Gray Level to Color Transformations

  33. Gray Level to Color Transformations

  34. Gray Level to Color Transformations

  35. Pseudocolor: example A pseudocolor MRI of a knee created using three different grayscale scans A grayscale MRI of a knee

  36. Basic of Full Color Image Processing Let c represent an arbitrary vector in RGB color space c R R = = c c G G c B B For an image of size M*N, ( , ) ( , ) c x y R x y R = = ( , ) ( , ) ( , ) c x y c x y G x y G ( , ) ( , ) c x y B x y B

  37. Basic of Full Color Image Processing

  38. Basic of Full-Color Image Processing Major categories of full-color Image processing: Per-color-component processing Vector-based processing

  39. Color Transformation Processing the components of a color image within the context of a single color model. ) y i = ( , ) ( , g ( i x y T f x ) = 2 , 1 = ,2 , , , ,..., s T r r r n 1 i n Color components of g Color components of f Color mapping functions

  40. Color Transformation: Example CMYK Some difficulty in interpreting the HUE: RGB Discontinuity where 0 and 360 meet. Hue is undefined for a saturation 0 HSI

  41. Color Transformation: Modify the Intensity = s r = 3 , 2 , 1 = s kr i = ( , ) ( , ) g x y kf x y 1 1 r i i = s = + 3 , 2 , 1 = 1 ( ) s kr k i 2 2 i i = s kr 3 3

  42. Color Complement

  43. Color Complement: Example

  44. Tone and Color Correction The tonal range of an image, also called its key-type, refers to its general distribution of color intensities. High-key images: Most of the information is concentrated at high intensities. Low-key images: Most of the information is concentrated at low intensities.

  45. Tonal correction: Example Middle-key Image

  46. Tonal correction: Example High-key Image

  47. Tonal correction: Example Low-key Image

  48. Color correction The proportion of any color can be increased by decreasing the amount of the opposite (or complementary) color in the image or by raising the proportion of the two immediately adjacent colors or decreasing the percentage of the two colors adjacent to the complement. Magenta Removing Red and Blue Adding Green

  49. Color correction

  50. Histogram Processing Histogram Equalizing the Intensity Saturation Adjustment

More Related Content