Functions > Reading and Writing Files > Example: Separating and Combining RGB Components
Example: Separating and Combining RGB Components
1. Consider the following image.
dog.bmp
2. Use READ_RED to read the red component of an image.
Click to copy this expression
3. Use READ_GREEN to read the green component of an image.
Click to copy this expression
4. Use READ_BLUE to read the blue component of an image.
Click to copy this expression
5. Manipulate the red and the blue values.
Click to copy this expression
Click to copy this expression
6. Use the augment function to create a packed image matrix.
Click to copy this expression
7. Write out the graphic file to create a new image.
Click to copy this expression
The new image is displayed in different colors.
dog.bmp
1.bmp
Was this helpful?