visumorph.change_hue
Module Contents
Functions
|
Change the hue of a VisuMorph Image object by blending it with a layer of specified color. |
- visumorph.change_hue.change_hue(image, color='white', delta_hue=1)[source]
Change the hue of a VisuMorph Image object by blending it with a layer of specified color.
- Parameters:
image (visumorph.Image) – A VisuMorph Image object whose hue is to be changed.
color (str, optional) – The color used for the blending layer (default is “white”).
delta_hue (float or int, optional) – The degree of blending with the color layer. A value of 0 means no change, and 1 means complete replacement with the color layer (default is 1).
- Returns:
Image – A new VisuMorph Image object with the modified hue.
- Return type:
- Raises:
TypeError – If the input is not a valid VisuMorph Image object.
ValueError – If ‘delta_hue’ is not a number.
Examples
>>> import visumorph as vm >>> img = vm.load_image("test.jpg") >>> hue_changed = vm.change_hue(img)