> 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/transformation-filters/contrast-brightness-gamma.md).

# Contrast-Brightness-Gamma

This function block lets you adjust the overall contrast, brightness, and gamma of an image using three simple sliders. It's ideal for quick visual tuning or as a preprocessing step before further analysis.

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

* `Image Any` Input image to be adjusted.

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

* `Image Any` Adjusted image after contrast, brightness, and gamma are applied.

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

* `Contrast Value` Slider to increase or decrease image contrast.
* `Brightness Value` Slider to shift image brightness up or down.
* `Gamma Value` Slider to apply gamma correction for midtone adjustments.

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

* Real-time visual tuning via sliders for fast experimentation.
* Combined operations: contrast and brightness are applied first, followed by gamma correction for smooth tonal control.
* Works with any image format supported by the system (color or grayscale).

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

1. Provide an image to the `Image Any` input socket.
2. Move the `Contrast Value` slider to adjust contrast. Values toward the positive side increase contrast; negative values soften it.
3. Move the `Brightness Value` slider to brighten or darken the image.
4. Tweak the `Gamma Value` slider to correct midtones without changing extremes too much.
5. The processed image is available from the `Image Any` output socket for preview or further blocks.

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

When the block runs, it produces a single adjusted image reflecting current slider positions. Use this output to feed downstream analysis, visualization, or storage blocks.

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

* For noisy images, use the `Denoising` block before this block to avoid amplifying noise when increasing contrast.
* If you want automatic improvements, try combining this block with `Auto Contrast` to get a quick baseline before manual fine‑tuning.
* To speed up processing on very large images, put `Image Resizer` upstream to reduce image size before adjustment.
* Use `Show Image` after this block to inspect results in a larger viewer window.
* When producing outputs for logging or records, connect the result to `Image Logger` or `Image Write` to save adjusted frames.
* Use `Load Image`, `Camera USB`, or `Camera IP (ONVIF)` as typical upstream image sources depending on your workflow.

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

* If the image looks overly contrasty or clipped, reduce `Contrast Value` or lower `Brightness Value` and reapply moderate `Gamma Value` adjustments.
* If colors look strange after heavy adjustments, try applying `Auto Contrast` or `Normalize Image` to re-balance pixel ranges.
* If real-time responsiveness is slow, reduce the input image resolution with `Image Resizer` before adjusting.
