clahe

The clahe transformation applies Contrast Limited Adaptive Histogram Equalization, an advanced contrast enhancement technique that improves local contrast while preventing over-amplification of noise. Excellent for enhancing details in underexposed images and medical imaging.

Serving Content via CDN

The Media API is a CDN-based service that serves transformed images via GET requests. When you request a transformed image URL, the transformation is applied dynamically on the first request and then cached for subsequent requests.

URL Pattern

https://media.vyso.io/clahe:clipLimit=LIMIT:tileSize=SIZE/ASSET_ID.jpg

Examples

Light CLAHE Enhancement

curl -i GET https://media.vyso.io/clahe:clipLimit=2:tileSize=8/ASSET_ID.jpg

Standard CLAHE

curl -i GET https://media.vyso.io/clahe:clipLimit=3:tileSize=16/ASSET_ID.jpg

Strong Contrast Enhancement

curl -i GET https://media.vyso.io/clahe:clipLimit=5:tileSize=16/ASSET_ID.jpg

Aggressive CLAHE with Large Tiles

curl -i GET https://media.vyso.io/clahe:clipLimit=4:tileSize=32/ASSET_ID.jpg

Fine Detail Enhancement (Small Tiles)

curl -i GET https://media.vyso.io/clahe:clipLimit=2.5:tileSize=8/ASSET_ID.jpg

On the first request, you'll receive a X-Cache: MISS header while the transformation is applied and cached. Subsequent requests will return X-Cache: HIT.

Parameters

clipLimitOPTIONAL

Contrast clip limit to prevent over-amplification. Accepted values:

  • Range: 1.0 to 40.0
  • 2.0 - Conservative enhancement (less noise amplification)
  • 3.0 - Standard CLAHE (default)
  • 5.0 - Aggressive enhancement
  • Higher values allow stronger contrast enhancement but may amplify artifacts
tileSizeOPTIONAL

Size of histogram equalization tiles in pixels. Accepted values:

  • Range: 2 to 256
  • 8 - Small tiles (fine detail enhancement)
  • 16 - Standard tiles (default, balanced)
  • 32 - Larger tiles (broader contrast)
  • Smaller tiles process more granular regions; larger tiles for global effects

Response

The API returns the contrast-enhanced image. The response format depends on the format of the asset stored in the Vyso asset cloud.

Content-Type: Determined by the stored asset format (e.g., image/jpeg, image/png)