> For the complete documentation index, see [llms.txt](https://docs.augelab.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.augelab.com/function-blocks/blocks-reference/image-transformations/operations/merge-channels.md).

# Merge Channels

This function block combines three single-channel (grayscale) images into a single color image. Use it when you have separate red, green and blue channel images that should be merged into one RGB image for visualization or further processing.

## 📥 Inputs <a href="#inputs" id="inputs"></a>

* `Red Channel` Input socket - Grayscale image representing the red channel.
* `Blue Channel` Input socket - Grayscale image representing the blue channel.
* `Green Channel` Input socket - Grayscale image representing the green channel.

## 📤 Outputs <a href="#outputs" id="outputs"></a>

* `ImageRGB` Output socket - The resulting RGB image produced by merging the three input channels.

## 🕹️ Controls <a href="#controls" id="controls"></a>

* `No Controls` This block has no adjustable widgets; it performs the merge as soon as inputs are provided.

## 🎨 Features <a href="#features" id="features"></a>

* Simple and fast merging of three single-channel images into a color image.
* Keeps pixel alignment if input channels share the same dimensions and coordinate system.
* Works with standard image workflows: merge then visualize or apply color operations.

## 📝 Usage Instructions <a href="#usage" id="usage"></a>

1. Prepare three grayscale images for each color channel.
2. Connect the grayscale image that represents red information to `Red Channel` input socket.
3. Connect the grayscale image that represents blue information to `Blue Channel` input socket.
4. Connect the grayscale image that represents green information to `Green Channel` input socket.
5. Read the combined color image from the `ImageRGB` output socket and use it with downstream blocks.

Note: For correct results, ensure all three inputs have the same width, height and alignment before merging.

## 📊 Evaluation <a href="#evaluation" id="evaluation"></a>

When executed, this block outputs a single RGB image created by combining the three provided single-channel images. If any input is missing or dimensions differ, downstream results may be unexpected—verify inputs before running.

## 💡 Tips and Tricks <a href="#tips-and-tricks" id="tips-and-tricks"></a>

* To split an existing color image into separate channels before processing, use the `Split Image` block then feed the outputs into this block.
* If channel images have mismatched sizes, use the `Image Resize` or `Image Resizer` block to normalize dimensions first.
* Preview the merged result with the `Show Image` block to verify correct channel placement.
* Before merging, you can denoise or blur individual channels using `Denoising` or `Blur` to reduce artifacts.
* Use `Adjust Colors` after merging to tweak contrast/white balance if colors look off.
* Use `RGB Mask` or `RGB Set` earlier in the pipeline to selectively modify or mask specific channel areas before merging.

## 🛠️ Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

* If the final image looks tinted or colors are swapped, double-check that each grayscale image is connected to the correct input socket (`Red Channel`, `Green Channel`, `Blue Channel`).
* If you see errors or distorted output, confirm that all three channel images share identical resolution and orientation. Use `Image Resize` or `Image AutoRotator` if needed.
* If the merged image contains noise or artifacts, apply `Denoising` to each channel before merging.
