Categories

Median Pass Filter

Apply median pass filter to remove noise while preserving edges with multiple algorithms

Click to upload file or drag and drop file here

Maximum file size: 20MB Supported formats: image/jpeg, image/png, image/webp, image/gif, image/bmp, image/tiff

Upload any image file (JPEG, PNG, WebP, GIF, BMP, TIFF) to remove noise while preserving edges

Choose median filter algorithm. Standard works well for most noise types

3 3 25

Size of the median filter kernel (must be odd). Larger kernels remove more noise but may blur details

Number of median filter passes. More iterations = stronger noise reduction

0 30 255

Sensitivity for noise detection. Higher values filter less aggressively

Maintain edge detail while removing noise

Choose which color channels to process

Choose output format or keep original. PNG recommended for maximum quality

Output quality for lossy formats (JPEG, WebP). Higher = better quality but larger file size

Key Facts

Category
Design
Input Types
file, select, range, number, checkbox
Output Type
file
Sample Coverage
4
API Ready
Yes

Overview

The Median Pass Filter is a powerful image processing tool designed to effectively remove noise, such as salt-and-pepper or speckle artifacts, while maintaining sharp edges and critical image details.

When to Use

  • Removing digital noise from low-light or high-ISO photographs.
  • Cleaning up scanned documents that contain speckle or grain artifacts.
  • Smoothing textures in images while preserving structural boundaries.

How It Works

  • Upload your image file and select the preferred median algorithm, such as Standard or Bilateral.
  • Adjust the kernel size and iteration count to control the intensity of the noise reduction.
  • Enable edge preservation settings to ensure that fine details remain sharp during the filtering process.
  • Download your processed image in your chosen format, such as PNG or WebP, with optimized quality settings.

Use Cases

Restoring old, grainy scanned photos by removing digital artifacts.
Cleaning up medical or scientific imaging data where noise interferes with analysis.
Pre-processing images for computer vision tasks to improve feature detection accuracy.

Examples

1. Restoring Grainy Night Photos

Amateur Photographer
Background
A series of night-time shots taken with a high ISO setting resulted in significant digital grain and speckle noise.
Problem
The noise obscures fine details in the shadows and makes the images look unprofessional.
How to Use
Upload the JPEG files, select the 'Bilateral Median' algorithm to protect edge details, and set a kernel size of 3.
Example Config
algorithm: bilateral, kernelSize: 3, preserveEdges: true
Outcome
The image grain is significantly reduced while the sharp outlines of buildings and streetlights remain crisp.

2. Cleaning Scanned Documents

Archivist
Background
Old paper documents were scanned as high-resolution images, but the scanner introduced unwanted speckle noise across the background.
Problem
The noise makes the text harder to read and interferes with OCR software performance.
How to Use
Upload the TIFF scan, choose 'Standard Median' with 2 iterations, and process only the 'Luminance' channel.
Example Config
algorithm: standard, iterations: 2, channels: luminance
Outcome
The background noise is smoothed out, resulting in a clean, high-contrast document ready for text recognition.

Try with Samples

image, png, jpg

Related Hubs

FAQ

What is the difference between Standard and Bilateral median filters?

Standard median filters are excellent for general noise reduction, while Bilateral filters are specifically designed to preserve edges by considering pixel intensity differences.

Why must the kernel size be an odd number?

The median filter calculates the middle value of a pixel neighborhood; an odd-sized kernel ensures there is a single central pixel to represent the median value.

Will this tool reduce the resolution of my image?

No, the tool processes pixel values to remove noise but does not change the dimensions or resolution of your original image file.

Can I process specific color channels?

Yes, you can choose to apply the filter to all channels, or isolate processing to luminance, chrominance, or the alpha channel only.

What is the maximum file size I can upload?

You can upload image files up to 20MB in size, including formats like JPEG, PNG, WebP, GIF, BMP, and TIFF.

API Documentation

Request Endpoint

POST /en/api/tools/image-median-pass

Request Parameters

Parameter Name Type Required Description
imageFile file (Upload required) Yes Upload any image file (JPEG, PNG, WebP, GIF, BMP, TIFF) to remove noise while preserving edges
algorithm select No Choose median filter algorithm. Standard works well for most noise types
kernelSize range No Size of the median filter kernel (must be odd). Larger kernels remove more noise but may blur details
iterations number No Number of median filter passes. More iterations = stronger noise reduction
threshold range No Sensitivity for noise detection. Higher values filter less aggressively
preserveEdges checkbox No Maintain edge detail while removing noise
channels select No Choose which color channels to process
format select No Choose output format or keep original. PNG recommended for maximum quality
quality number No Output quality for lossy formats (JPEG, WebP). Higher = better quality but larger file size

File type parameters need to be uploaded first via POST /upload/image-median-pass to get filePath, then pass filePath to the corresponding file field.

Response Format

{
  "filePath": "/public/processing/randomid.ext",
  "fileName": "output.ext",
  "contentType": "application/octet-stream",
  "size": 1024,
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
File: File

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-image-median-pass": {
      "name": "image-median-pass",
      "description": "Apply median pass filter to remove noise while preserving edges with multiple algorithms",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=image-median-pass",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

Supports URL file links or Base64 encoding for file parameters.

If you encounter any issues, please contact us at [email protected]