A gray scale image is an image which has the same RGB values.It means R=G=B.We need to take a Color Image which has the different RGB values in a pixel.We take an average of RGB value & put it into RGB values of Output Image.Then we get grayscaled image of input Image.
Here we discuss different methods to convert a 24-bit color image into gray scale image .In both of these methods there are some predefined constant which are multiplied to the RGB values of pixel to get a grayscale image for every pixel.These predefined values are some standard values diffrent for all three values
![Y' = 0.2126 R + 0.7152 G + 0.0722 B](https://lh3.googleusercontent.com/blogger_img_proxy/AEn0k_vgYHZkGS0fW7pK2vz0es9_2-UK-HDYJXsCdnE0CLNTmAM_5vOmfTljJ-knIApmzr32P9RSnzLglkpqRJlw1CTj1FjkF6j1KmYEZvT-miMCfvrnn6C9V7f3pPSFlbI6GUH6VJjYr-dcfI6Yw9-8zg=s0-d)
3) Y'=0.333(R+G+B)
4) Y' =Max (R,G,B)
In this type we calculate Maximum value among RGB value put it into the place of two other color's values.
5) Y' =Min (R,G,B)
In this type we calculate Minimum value among RGB value put it into the place of two other color's values.
6) Y'= (Max(R,G,B)+Min(R,G,B)) /2
In this type we calculate both Max & min of RGB values .& Then average of them put into place of rgb values
If Input image is same then output from various aalgorithm is here:-
.
The Last two images are respectively with Max & MIn algo.The Image with max algo is more brighter & The image with min algo is least brighter than other images.
Rest all four images are almost same in vision.
![]() |
Color Image |
![]() |
Gray Scale Image |
& multiplied into them to get a grayscale image.
1)
2)
3) Y'=0.333(R+G+B)
4) Y' =Max (R,G,B)
In this type we calculate Maximum value among RGB value put it into the place of two other color's values.
5) Y' =Min (R,G,B)
In this type we calculate Minimum value among RGB value put it into the place of two other color's values.
6) Y'= (Max(R,G,B)+Min(R,G,B)) /2
In this type we calculate both Max & min of RGB values .& Then average of them put into place of rgb values
If Input image is same then output from various aalgorithm is here:-
.
The Last two images are respectively with Max & MIn algo.The Image with max algo is more brighter & The image with min algo is least brighter than other images.
Rest all four images are almost same in vision.
No comments:
Post a Comment