🖼️ Old Photo Restoration — Repair & Enhance
What Is Photo Restoration?
Old photos degrade over time. Scratches from physical handling, dust embedded in the emulsion, fading from UV exposure, and noise from low-quality scanning all damage the image. Photo restoration is the process of reversing or mitigating these defects to reveal the original image beneath.
Our tool applies four core algorithms, all running locally in your browser with zero uploads:
- Denoising (Median Filter) — A 3×3 convolution that replaces each pixel with the median value of its neighbors. This smooths out random grain and sensor noise while preserving edges far better than a blur filter.
- Scratch Removal (Adaptive Detection + Inpainting) — Analysis that detects outlier pixels — thin, high-contrast linear defects typical of scratches — and replaces them with averaged neighbor values (inpainting).
- Contrast Enhancement (Histogram Stretching) — Spreads the pixel intensity range to use the full 0–255 spectrum, recovering detail lost in faded or washed-out photos.
- Sharpen (Unsharp Mask) — A blurred copy of the image is subtracted from the original to find edges, which are then amplified for a crisper appearance.
When to Use Each Restoration Technique
- Denoise — Use on grainy photos, low-light shots, or scanned film with visible silver grain. Start at 30–50 and increase until the grain is smoothed. At very high values (80+), fine details may soften.
- Scratch Removal — Essential for scanned prints or negatives with surface scratches. Works by detecting narrow, high-contrast lines and filling them. Best at 40–70. Very deep scratches may require additional manual touch-up.
- Contrast Boost — Ideal for faded, hazy, or underexposed old photos. Histogram stretching recovers detail in shadows and highlights. Start at 30 and adjust; over-boosting creates harsh, unnatural contrast.
- Sharpen — Use after denoising to bring back crispness in faces and text. Max out around 50–70 for most scanned photos. Very old photos with heavy damage may look unnatural if oversharpened.
- Brightness — Adjust the overall exposure. Positive values lighten; negative values darken. Use before contrast adjustment for best results.
- Warmth / Sepia — Adds a classic sepia tone by adjusting the red/blue channel balance. Use at 20–50 for a subtle vintage warmth, or 70–100 for a strong antique sepia look. Excellent for black-and-white portraits.
Understanding How Each Algorithm Works
Median Filter Denoising: The algorithm examines every pixel and its 8 immediate neighbors (a 3×3 window). Instead of averaging them (which blurs edges), it sorts the 9 values and picks the median. This removes salt-and-pepper noise and grain while keeping edges sharp. Unlike Gaussian blur, median filtering preserves fine lines and textures.
Adaptive Scratch Detection: The tool scans each row for pixels that deviate significantly from their horizontal neighbors — a signature of thin scratches. When an outlier is found (pixel value differing by more than a threshold from its neighbors), it's replaced with the average of the 4 surrounding pixels. The threshold adapts based on local contrast so textured areas aren't falsely detected as scratches.
Histogram Stretching (Contrast): The tool computes the minimum and maximum intensity values across all channels. It then remaps the entire range so the darkest pixel becomes 0 and the brightest becomes 255. This recovers hidden detail in faded photos. A clip percentage (typically 0.5%) avoids extreme outliers from skewing the stretch.
Unsharp Mask (Sharpen): A Gaussian-blurred copy of the image is created. The blurred version is subtracted from the original to isolate edge information (the "mask"). This mask is scaled and added back to the original, amplifying transitions between light and dark areas. The result: edges look crisper without adding noise to flat areas.
Scanning Tips for Best Results
The quality of your restoration depends heavily on the input scan. Follow these tips for the best results:
- Scan at 600 DPI or higher. Low-resolution scans lose detail that cannot be recovered. 600 DPI is ideal for prints; use 1200+ DPI for small photos (e.g., 2×3 inches).
- Use a flatbed scanner, not a phone camera. Phone cameras introduce perspective distortion, lens flare, and uneven lighting. A flatbed scanner gives consistent, flat illumination.
- Clean the photo first. Gently wipe the surface with a microfiber cloth. For stubborn dust, use compressed air. Never use wet cleaners on old photos — the emulsion may be water-soluble.
- Avoid flash when photographing old photos. If scanning isn't an option and you must use a phone, photograph in indirect natural light with the photo lying flat. Angle the camera carefully to avoid reflections.
- Save scans as PNG (lossless). For archiving, always save your scan as PNG. JPEG compression introduces artifacts that make restoration harder. Use JPEG only if file size is a concern.
- Scan in color even for B&W photos. Scanning black-and-white photos in color preserves the full tonal range and allows you to apply sepia tones later. Convert to grayscale only if color casts are severe.
- Handle with care. Old photos are fragile. Wear cotton gloves if possible. Handle by the edges only. If the photo is curled, place it under a flat weight for a few hours before scanning.
Why 100% Browser-Based Matters
Traditional photo restoration tools require expensive software like Adobe Photoshop or dedicated restoration plugins. Online services often upload your photos to external servers, raising privacy concerns. Our approach is different:
- No uploads. Your photo never leaves your device. All processing happens in the browser via the Canvas 2D API.
- No signup. No accounts, no emails, no tracking. Just upload and restore.
- No file size limits imposed by servers. The only limit is your browser's memory. We recommend 20MB as a practical maximum.
- Instant processing. No waiting for uploads or server queues. Results are rendered in milliseconds.
- Privacy guaranteed. Since nothing is transmitted, your family photos, historical documents, and sensitive images remain completely private.
This makes SmartImgKit's photo restoration tool ideal for restoring personal family photos, historical documents, and archive materials where privacy matters.