ImageTools - Maple Programming Help

Home : Support : Online Help : Graphics : Image Processing : ImageTools Package : ImageTools/HSVtoRGB

ImageTools

 HSVtoRGB
 convert HSV color image to RGB color image

 Calling Sequence HSVtoRGB(img, opts)

Parameters

 img - Image; input image opts - (optional) equation(s) of the form option = value; specify options for the HSVtoRGB command

Options

 • inplace = truefalse
 Specifies whether the operation is performed in-place. This can be used to avoid allocating memory. The default is false.
 • output = Image
 Specifies a data structure into which the output is written. This can be used to avoid allocating memory. The size and number of layers must match that of the input. The dimensions of the output image are adjusted so that the row and column indices match the input. The default is NULL.

Description

 • The HSVtoRGB command converts a color image with an HSV color representation to an RGB color representation.
 • The img parameter is the input image and must be of type ColorImage or ColorAImage.

Examples

 > $\mathrm{with}\left(\mathrm{ImageTools}\right):$
 > $\mathrm{img_h}≔360\mathrm{Create}\left(100,200,\left(r,c\right)→c,'\mathrm{fit}'\right):$
 > $\mathrm{img_s}≔\mathrm{Create}\left(100,200,\left(r,c\right)→\mathrm{evalf}\left(\mathrm{sin}\left(0.0025\left({r}^{2}+{c}^{2}\right)\right)\right),'\mathrm{fit}'\right):$
 > $\mathrm{img_v}≔\mathrm{Create}\left(100,200,\left(r,c\right)→r,'\mathrm{fit}'\right):$
 > $\mathrm{img_hsv}≔\mathrm{CombineLayers}\left(\mathrm{img_h},\mathrm{img_s},\mathrm{img_v}\right)$
 ${\mathrm{img_hsv}}{≔}\left[\begin{array}{c}{\mathrm{1..100 x 1..200 x 1..3}}{\mathrm{Array}}\\ {\mathrm{Data Type:}}{{\mathrm{float}}}_{{8}}\\ {\mathrm{Storage:}}{\mathrm{rectangular}}\\ {\mathrm{Order:}}{\mathrm{C_order}}\end{array}\right]$ (5.1)
 > $\mathrm{img_rgb}≔\mathrm{HSVtoRGB}\left(\mathrm{img_hsv}\right)$
 ${\mathrm{img_rgb}}{≔}\left[\begin{array}{c}{\mathrm{1..100 x 1..200 x 1..3}}{\mathrm{Array}}\\ {\mathrm{Data Type:}}{{\mathrm{float}}}_{{8}}\\ {\mathrm{Storage:}}{\mathrm{rectangular}}\\ {\mathrm{Order:}}{\mathrm{C_order}}\end{array}\right]$ (5.2)
 > $\mathrm{img_r}≔\mathrm{GetLayer}\left(\mathrm{img_rgb},1\right)$
 ${\mathrm{img_r}}{≔}\left[\begin{array}{c}{\mathrm{1..100 x 1..200}}{\mathrm{Array}}\\ {\mathrm{Data Type:}}{{\mathrm{float}}}_{{8}}\\ {\mathrm{Storage:}}{\mathrm{rectangular}}\\ {\mathrm{Order:}}{\mathrm{C_order}}\end{array}\right]$ (5.3)
 > $\mathrm{img_g}≔\mathrm{GetLayer}\left(\mathrm{img_rgb},2\right)$
 ${\mathrm{img_g}}{≔}\left[\begin{array}{c}{\mathrm{1..100 x 1..200}}{\mathrm{Array}}\\ {\mathrm{Data Type:}}{{\mathrm{float}}}_{{8}}\\ {\mathrm{Storage:}}{\mathrm{rectangular}}\\ {\mathrm{Order:}}{\mathrm{C_order}}\end{array}\right]$ (5.4)
 > $\mathrm{img_b}≔\mathrm{GetLayer}\left(\mathrm{img_rgb},3\right)$
 ${\mathrm{img_b}}{≔}\left[\begin{array}{c}{\mathrm{1..100 x 1..200}}{\mathrm{Array}}\\ {\mathrm{Data Type:}}{{\mathrm{float}}}_{{8}}\\ {\mathrm{Storage:}}{\mathrm{rectangular}}\\ {\mathrm{Order:}}{\mathrm{C_order}}\end{array}\right]$ (5.5)
 > $\mathrm{Embed}\left(\left[\mathrm{FitIntensity}\left(\mathrm{img_h}\right),\mathrm{img_s},\mathrm{img_v}\right]\right)$

 > $\mathrm{Embed}\left(\mathrm{img_rgb}\right)$

 > $\mathrm{Embed}\left(\left[\mathrm{img_r},\mathrm{img_g},\mathrm{img_b}\right]\right)$

 >