Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015 Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing About Perception and Hue About Perception and Hue Histograms in HSV Space Histograms in HSV Space Michel Alves dos Santos May, 2015 *original *hue-saturation projection *saturation *brightness *hue histogram
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
About Perception and HueAbout Perception and HueHistograms in HSV SpaceHistograms in HSV Space
Michel Alves dos SantosMay, 2015
*original
*hue-saturation projection
*saturation
*brightness*hue histogram
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
IntroductionIntroduction
red channel green channel blue channel
What's your perception aboutthe colors of this image?
*Barns Grand Teton: Grand Teton National Park
Note the marked areas!
And the distribution by channel?How each color component behaves in its proper channel?
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
IntroductionIntroduction*Barns Grand Teton: Grand Teton National Park
Observe the distribution ofenergy for each channel:
But, about the hues? What the RGB model can tell us? This kind of graph shows us how the energy of each channel is distributed!
red channel green channel blue channel
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
IntroductionIntroduction*Barns Grand Teton: Grand Teton National Park
Firstly, we will use the HSV Color Space ...
How to build a hue histogram?
Now, note the diagram below:
Can you identify hues distinctly?
Probably not! Because of clustersand the intersection of colors!
A histogram of hues can help usimprove our perception!
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
RGB Vs HSV RGB Vs HSV (Color Spaces)(Color Spaces)
RGB Color Space HSV Color Space*Solids produced using POVRay [http://lib.povray.org/]
Simplicity in representation and storage Close to human perception
Some point operations are faster... Easy interpolation between colors
Invariant to illumination transformsHave lighting and color properties togetherHave lighting and color properties together
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
RGB Vs HSV RGB Vs HSV (Color Spaces – a common mistake...)(Color Spaces – a common mistake...)
RGB Color Space HSV Color Space*Solids produced using POVRay [http://lib.povray.org/]
A cone is commonly adopted but cylindricalrepresentation is more mathematically accurate.
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
RGB Vs HSV RGB Vs HSV (Color Spaces – Solids Transition)(Color Spaces – Solids Transition)
RGB Color Space HSV Color Space*Solids produced using POVRay [http://lib.povray.org/]
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
RGB Vs HSV RGB Vs HSV (Transformation)(Transformation)
RGB HSV Transformationisn't linear!
Some care should be takenwith monochromatic
pixels!*[avoid divisions by zero]
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
RGB Vs HSV RGB Vs HSV (Transformation)(Transformation)
RGB HSV Transformationisn't linear!
Alternative
Some care should be takenwith monochromatic
pixels!*[avoid divisions by zero]
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
RGB Vs HSV RGB Vs HSV (Color Image Thresholding)(Color Image Thresholding)
Find the yellow M&M's!
A simple task for a humanobserver, but not so easy
for machines:
Complexity depends of the space!
Using RGB:R:
G:
B:
200 255
200 255
0 50
Using HSV:(3 intervals) (1 interval)
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
RGB Vs HSV RGB Vs HSV (Color Image Thresholding)(Color Image Thresholding)
Find the yellow M&M's!
A simple task for a humanobserver, but not so easy
for machines:
Complexity depends of the space!
Using RGB:R:
G:
B:
200 255
200 255
0 50
Using HSV:(3 intervals) (1 interval)
[This approach is independent of saturation or brightness]
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
*Barns Grand Teton: Grand Teton National Park
RGB Vs HSV RGB Vs HSV (Color Image Thresholding)(Color Image Thresholding)
*hues of sky *hues of barn *hues of grass
Using this feature some taskscan be easily performed!
As detection of regions or objectsby its characteristic colors!It's one of the bases of color perception!
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
RGB Vs HSV RGB Vs HSV (Color Perception)(Color Perception)
And now, what's your perceptionabout the colors of this image?
*Barns Grand Teton: Grand Teton National Park
Where we have more blue hues?
Where we have more orange hues?
Where we have more green hues?
Here we have a blend of yellow and green hues!
Do not fool yourself!
(Grass???)
(Sky)
(Barn)
*hue histogram
*hue projection
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
RGB Vs HSV RGB Vs HSV (Color Perception)(Color Perception)
And now, what's your perceptionabout the colors of this image?
*Barns Grand Teton: Grand Teton National Park
Where we have more blue hues?
Where we have more orange hues?
Where we have more green hues?
Here we have a blend of yellow and green hues!
Do not fool yourself!
(Grass???)
(Sky)
(Barn)
*hue histogram
*hue projection
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
RGB Vs HSV RGB Vs HSV (Meanings of the Components)(Meanings of the Components)
Energy of red channel Energy of green channel Energy of blue channel
What is the basic color? How vibrant is the color? How brightness is the color?
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
Hue HistogramsHue Histograms
*hue projection *saturation *value
We will build our histograms takingaccount the number of positions
of the hue circle!Number of bins (discrete positions): 0..360 or 0 to 2π
Note that the hue channel is a ring structure!
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
Hue Histograms - StepsHue Histograms - Steps
Our input images are in RGB Color Space, the output is a transformed hue histogram...
We are applying a square root transformation to obtain the final hue histogram...
Observe the followdiagram!
The metric of contribution is a flexible part of the process and depends of application...
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
Hue Histograms - StepsHue Histograms - Steps
Our input images are in RGB Color Space, the output is a transformed hue histogram...
We are applying a square root transformation to obtain the final hue histogram...
Observe the followdiagram!
The metric of contribution is a flexible part of the process and depends of application...
Get to work!
Now, I will showsome metrics!
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
Hue Histograms :: Simple FrequencyHue Histograms :: Simple Frequency*Barns Grand Teton: Grand Teton National Park
Kronecker Delta
Hue
Picture or Image
*hue histogram
This is a simple counting!
It doesn't consider otherHSV channels.
Bin Position
PixelHistogram
Notation
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
Hue Histograms :: by SaturationHue Histograms :: by Saturation*Barns Grand Teton: Grand Teton National Park
*hue histogram
Kronecker Delta
Hue
Picture
Only considers the saturation channel...
Saturation
Ref: [LP'15]
Bin Position
PixelHistogram
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
Hue Histograms :: by ContributionHue Histograms :: by Contribution*Barns Grand Teton: Grand Teton National Park
*hue histogram
Kronecker DeltaSaturation ValuePicture
HueHistogram Pixel
Bin Position
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
Hue Histograms :: Hue Histograms :: Weighted by ContributionWeighted by Contribution*Barns Grand Teton: Grand Teton National Park
*hue histogram
Kronecker DeltaSaturation ValuePicture
Hue
*similar to the previous!
Normalization FactorBin Position
Pixel
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
Hue Histograms :: Hasan WeightedHue Histograms :: Hasan Weighted Ref: [MAH'12]
*hue histogram
*Barns Grand Teton: Grand Teton National Park
Picture Previous Histogram
*exponential weighted histogram
Mean of Hues
*similar to the previous???
Mean
Variance
Variance of Hues
Notation
Weighted Histogram
Bin Position
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
Hue Histograms :: Hasan WeightedHue Histograms :: Hasan Weighted Ref: [MAH'12]
*hue histogram
*Barns Grand Teton: Grand Teton National Park
Picture Previous Histogram
*exponential weighted histogram
Mean of Hues
*similar to the previous???
Variance of Hues *before weighting *after weighting
frequency frequencyhue hue
Weighted Histogram
Bin Position
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
Hue Histograms :: Hue Histograms :: Smoothed by BoxSmoothed by Box*hue histogram, window size = 1x9
*Barns Grand Teton: Grand Teton National Park
Box function
Convolution
Gaussian Function
Previous HistogramWeighted Histogram
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
Hue Histograms :: Hue Histograms :: Smoothed by BoxSmoothed by Box*hue histogram, window size = 1x9
*Barns Grand Teton: Grand Teton National Park
Box function
Convolution
Gaussian Function
Previous HistogramWeighted Histogram
*smoothing employing a boxcar function
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
Hue Histograms :: Hue Histograms :: Smoothed by GaussianSmoothed by Gaussian*hue histogram, window size = 1x9
*Barns Grand Teton: Grand Teton National Park
Gaussian function
Convolution
Gaussian Function
Previous HistogramWeighted Histogram
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
Hue Histograms :: Hue Histograms :: Smoothed by a KernelSmoothed by a Kernel*hue histogram, window size = 1x11
*Barns Grand Teton: Grand Teton National Park
kernel
Kernel function
Convolution
Gaussian Function
Previous HistogramWeighted Histogram
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
Hue Histograms :: Hue Histograms :: Smoothed by a KernelSmoothed by a Kernel*hue histogram, window size = 1x11
*Barns Grand Teton: Grand Teton National Park
kernel function employed: Epanechnikov
kernel
Kernel function
Convolution
Gaussian Function
Previous HistogramWeighted Histogram
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
Hue Histograms ::Hue Histograms :: Spatial Color Coherence Spatial Color Coherence*hue histogram, window size = 1x11
*Barns Grand Teton: Grand Teton National Park
kernelSpatial Color Coherence Neighborhood Difference
Kernel functionConvolution
*8-connected neighborhood
Gaussian FunctionWeighted Histogram Saturation Value Kronecker Delta
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
Hue Histograms ::Hue Histograms :: Spatial Color Coherence Spatial Color Coherence*hue histogram, window size = 1x11
*Barns Grand Teton: Grand Teton National Park
kernelSpatial Color Coherence Neighborhood Difference
Kernel functionConvolution
*8-connected neighborhood
Gaussian FunctionWeighted Histogram Saturation Value Kronecker Delta
*Spatial Color Coherence Map
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
Hue Histograms :: The end of our jorney...Hue Histograms :: The end of our jorney...Simple Frequency
By Contribution
Weighted Contribution
Hasan Weighted
By Saturation
Gaussian WeightedSmoothed
A brief visualA brief visualcomparison!comparison!
This is the end!
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
ConclusionConclusion
Use the appropriate space for your problem! Always!
Hue based histograms can be employed in a wide range of applications!
Color spaces that have hue separation approximate human perception!
Some considerations should be taken into account in the construction of a huehistogram as brightness and perceptive contribution...
Federal University of Rio de Janeiro (UFRJ) :: Campus Cidade Universitária :: Rio de Janeiro :: Fundão Island :: COPPE/PESC/Laboratory of Computer Graphics :: March/2015
Michel Alves -- Five Minute Speech (FMS) :: Overview of Activities Developed in Disciplines and Guided Studies :: Graduate Program in Systems Engineering and Computing
Thanks for your attention!Thanks for your attention!Michel Alves dos SantosMichel Alves dos SantosReferences:References: