In this article we will see how we can covert xyz image to rgb image in mahotas. Xyz is an additive color space based on how the eye intereprets stimulus from light. Unlike other additive rgb like Rgb, Xyz is a purely mathmatical space and the primary components are “imaginary”, meaning we can’t create the represented color in the physical by shining any sort of lights representing x, y, and z. An RGB image, sometimes referred to as a truecolor image, is stored in MATLAB as an m-by-n-by-3 data array that defines red, green, and blue color components for each individual pixel. We use
mahotas.colors.rgb2xyz method for converting rgb image to xyz image.
In this tutorial we will use “lena” image, below is the command to load it.
Below is the lena image
In order to do this we will use
Syntax : mahotas.colors.xyz2rgb(img)
Argument :It takes image object as argument
Return : It returns image object
Below is the implementation
- Mahotas - RGB to XYZ Conversion
- Mahotas - XYZ to LAB Conversion
- Mahotas - RGB to Gray Conversion
- Mahotas - RGB to Sepia Conversion
- Mahotas - RGB to LAB Conversion
- Mahotas – Creating RGB Image
- Mahotas - Image Stretch RGB
- Detect the RGB color from a webcam using Python - OpenCV
- Mahotas - Re-Labeling
- Mahotas - Labelled Image from the Normal Image
- Mahotas - Getting Mean Value of Image
- Mahotas - Element Structure for Eroding Image
- Mahotas - Dilating Image
- Mahotas - Eroding Image
- Mahotas - Opening Process on Image
- Mahotas - Element Structure for Dilating Image
- Labeled Image Function in Python Mahotas
- Where's Wally Problem using Mahotas
- Python Mahotas - Introduction
- Loading Image using Mahotas - Python
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.