hsv2rgb
Convert HSV to RGB
HSV Stores colors in terms of hue, saturation, and value. The hue determines the color, which is an angle around the color wheel. The basic colors are: 0 degrees = RED, 60 degrees = YELLOW, 120 degrees = GREEN, 180 degrees = CYAN, 240 degrees = BLUE and 300 degrees = PURPLE. The saturation is how much grey is in the color (intensity of the color). A saturation value of zero means it's perfect, while a saturation value of 1 would cause any color to become pure grey. As an example, the color RGB(255,0,0) is pure so the saturation would be zero. The value is how bright the color is. A value of 0 is always black, and 100 is the color (if not saturated).
In brief,
HUE = COLOR (degrees around the color wheel)
SATURATION = INTENSITY (0-1, 0 being no color/grey)
VALUE = BRIGHTNESS (0 being black)
For more information, see
http://en.wikipedia.org/wiki/Color_spaces
Categories
Related Objects and Documents
Applications
History
Sean Crosby | 2006-01-05 | Original version |
Steven Lambright | 2007-06-20 | Added comment explaining what HSV is and what the code is doing. Also, added code for boundary cases. |
Parameters
Input Files
Type | cube |
---|---|
File Mode | input |
Filter | *.cub |
Type | cube |
---|---|
File Mode | input |
Filter | *.cub |
Type | cube |
---|---|
File Mode | input |
Filter | *.cub |
Output Files
Type | cube |
---|---|
File Mode | output |
Pixel Type | real |
Filter | *.cub |
Type | cube |
---|---|
File Mode | output |
Pixel Type | real |
Filter | *.cub |
Type | cube |
---|---|
File Mode | output |
Pixel Type | real |
Filter | *.cub |
Multiplier
Type | double |
---|---|
Default | 1.0 |
Minimum | 0.0 (inclusive) |
Example 1
Convert RGB image to HSV
Command Line
hsv2rgb
red=../peaks.cub+5 green=../peaks.cub+4 blue=../peaks.cub+3 hue=../hue.cub saturation=../sat.cub value=../val.cub
GUI Screenshot
Example Gui
HSV2RGB GuiScreenshot of GUI with parameters filled in to perform a conversion from HSV to RGB.
Input Images
Input image for hsv2rgb
Hue image
Parameter Name:
HUE
This is the input image for the hsv2rgb example.
Input image for hsv2rgb
Saturation image
Parameter Name:
SATURATION
This is the input image for the hsv2rgb example.
Input image for hsv2rgb
Value image
Parameter Name:
VALUE
This is the input image for the hsv2rgb example.
Output Images
Output image
Output image showing results of hsv2rgb.
Parameter Name:
RED
This is the output image that results from converting Hue to Red.
Output image
Output image showing results of hsv2rgb.
Parameter Name:
GREEN
This is the output image that results from converting Saturation to Green.