- Media API
- Transformations
- Adjust
- median
median
The median transformation applies a median filter to reduce noise while preserving edges. The filter replaces each pixel with the median value of neighboring pixels, making it effective for removing salt-and-pepper noise and smoothing surfaces while maintaining detail.
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/median:radius=RADIUS/ASSET_ID.jpgExamples
Small Median Filter
curl -i GET https://media.vyso.io/median:radius=1/ASSET_ID.jpgStandard Median Filtering
curl -i GET https://media.vyso.io/median:radius=2/ASSET_ID.jpgMedium Noise Reduction
curl -i GET https://media.vyso.io/median:radius=3/ASSET_ID.jpgAggressive Filtering
curl -i GET https://media.vyso.io/median:radius=5/ASSET_ID.jpgOn 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
radiusREQUIREDMedian filter radius in pixels. Accepted values:
- Range: 1.0 to 10.0+
1.0- Subtle noise reduction2.0- Standard median filtering3.0- Moderate smoothing5.0- Aggressive noise reduction- Larger radius processes more neighboring pixels; increases processing time
Response
The API returns the median-filtered 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)