Ai SizsAi Sizs

Zero-Upload Image Forensics: SSIM Similarity & Laplacian Blur Analysis

Two powerful client-side image analysis engines in one tool. Compare structural similarity between any two images with pixel-level SSIM diff heatmaps, or detect photo sharpness with Laplacian variance scoring and blur region visualization. No server upload 鈥?all computation runs locally in your browser.

add_photo_alternate Image A Drop or click to upload
add_photo_alternate Image B Drop or click to upload

SSIM Structural Similarity: How the Comparison Engine Works

Unlike naive pixel-difference methods that treat every RGB deviation equally, our SSIM (Structural Similarity Index) engine evaluates images the way the human visual system does 鈥?by measuring luminance, contrast, and structural patterns across localized 8脳8 pixel windows. This perceptual approach produces scientifically meaningful similarity scores rather than misleading numeric deltas.

Luminance-Contrast-Structure Decomposition

The SSIM algorithm separates each 8脳8 image patch into three independent perceptual components. Luminance comparison evaluates mean intensity levels between corresponding patches, revealing exposure shifts and brightness discrepancies. Contrast comparison measures local standard deviation to detect texture strength variations and dynamic range mismatches across the two images. Structure comparison normalizes both signals to unit standard deviation before computing cross-correlation, isolating genuine spatial pattern differences from illumination artifacts. These three scores multiply together to produce a single patch-level similarity index between -1 and 1.

8脳8 Sliding Window with 50% Stride Overlap

To achieve spatially smooth similarity maps without missing edge discontinuities, our implementation slides the SSIM kernel across the image with exactly 4-pixel strides (50% overlap). Each overlapping window contributes its local similarity score to a running Mean SSIM (MSSIM) accumulator. The partial overlap eliminates checkerboard artifacts common in non-overlapping block-based approaches, while the half-stride design keeps computation cost at roughly 4脳 the baseline 鈥?well within browser memory budgets for images up to 4096px on either edge.

Difference Heatmap: Red-Yellow Gradient Overlay

After computing the SSIM map, we generate a red-to-yellow difference heatmap overlaid directly onto Image A. Regions with SSIM scores near 1.0 (structurally identical) remain transparent, allowing the base image to show through undisturbed. Areas where the local SSIM drops below 0.99 receive alpha-blended red overlays proportional to dissimilarity magnitude, transitioning through orange to yellow at moderate difference levels. The final output renders on an HTML5 Canvas element, compositing the original image data with the heatmap layer pixel-by-pixel for zero-loss visualization.

Laplacian Blur Detection: Precision Sharpness Scoring Without AI Models

Determining whether a photograph is technically sharp matters for quality assurance in stock photography, surveillance footage triage, and pre-print validation. Our Laplacian variance detector applies a classical 3脳3 discrete Laplacian convolution kernel across the image's grayscale channel, computing the second spatial derivative at every pixel. The variance of the resulting Laplacian response map serves as a robust, computationally efficient proxy for perceived image sharpness 鈥?no GPU-bound neural networks required.

3脳3 Laplacian Kernel Convolution: The Math Behind the Score

The detector converts the source image to grayscale using the BT.601 luminance formula (0.299R + 0.587G + 0.114B), then slides a standard 4-neighbor Laplacian kernel [0,1,0; 1,-4,1; 0,1,0] across every interior pixel. The Laplacian operator measures the second spatial derivative, producing high-magnitude responses at sharp edges and texture boundaries while returning near-zero values in smoothly blurred or out-of-focus regions. The variance of the full Laplacian response map is computed and transformed through a logarithmic normalization function to produce a human-readable 0-100 sharpness score.

Five-Tier Sharpness Classification System

Raw Laplacian variance values are mapped to five intuitive sharpness categories: Excellent Sharpness (80-100) for crisp, high-edge-energy images suitable for professional printing; Good Sharpness (60-79) for adequately focused photographs with minor softness; Moderate Blur (40-59) indicating noticeable focus issues or motion blur artifacts; Significant Blur (20-39) for severely degraded images likely unsuitable for publication; and Severe Blur (0-19) for extremely defocused or heavily motion-blurred captures. Each tier maps to a distinct color-coded score bar for instant visual feedback.

Blur Region Heatmap: Blue Overlay for Defocused Zones

Beyond the global sharpness score, the tool generates a spatial blur heatmap overlaid on the original image. Any pixel whose absolute Laplacian response falls below 15% of the maximum response detected in the image is classified as a blur zone and receives a semi-transparent blue overlay. The blue channel intensity scales inversely with Laplacian magnitude 鈥?deeper blue indicates more severe blur. Sharp edges and high-texture regions pass through the heatmap layer transparently, allowing users to visually identify exactly which parts of their photograph suffer from focus falloff, lens softness, or motion blur artifacts.

Client-Side Only: Zero Bytes Leave Your Device

Both analysis engines 鈥?SSIM comparison and Laplacian blur detection 鈥?execute entirely within your browser's JavaScript runtime and Canvas rendering context. No image pixels, metadata, or analysis results are ever transmitted to external servers. The HTML5 Canvas API handles all pixel-level operations locally, from grayscale conversion to kernel convolution to heatmap compositing. This architecture ensures complete data sovereignty for proprietary photographs, confidential documents, and sensitive visual material.

In alignment with the 345tool UX core principles 鈥?Convenient, Simple, and Beautiful 鈥?Ai Sizs operates without registration walls, tracking cookies, or cloud processing queues. Simply drop your images, run the analysis, and receive instant results. Refresh or close the tab, and every byte of image data evaporates from temporary browser memory with zero residual traces.

Technical Frequently Asked Questions

How does SSIM differ from pixel-by-pixel MSE comparison?

expand_more

MSE (Mean Squared Error) naively subtracts per-pixel RGB values, treating a one-level brightness shift identically to a structural edge misalignment. SSIM instead decomposes each 8脳8 patch into luminance, contrast, and structure components, mirroring how the human visual cortex processes spatial information. Two images with identical structural patterns but different exposure levels will score near 100% under SSIM but poorly under MSE. This perceptual alignment makes SSIM the academic gold standard for image quality assessment, cited in over 50,000 research papers since its 2004 publication by Wang, Bovik, Sheikh, and Simoncelli.

What Laplacian kernel does the blur detector use and why?

expand_more

The engine uses the classical 4-neighbor discrete Laplacian operator [0,1,0; 1,-4,1; 0,1,0], which computes the sum of second partial derivatives in both x and y directions. This isotropic kernel is rotationally symmetric and responds equally to edges in all orientations, making it ideal for general-purpose sharpness estimation without directional bias. Unlike Sobel or Prewitt edge detectors that measure only first derivatives, the Laplacian's second-derivative nature makes it particularly sensitive to the crispness of edge transitions 鈥?precisely what distinguishes sharp focus from motion blur or lens softness. The variance-of-Laplacian metric is a well-established technique in computer vision, used in autofocus systems and industrial quality control pipelines.

Are my uploaded images transmitted to any server?

expand_more

No. Every pixel operation 鈥?grayscale conversion, SSIM window computation, Laplacian kernel convolution, heatmap rendering 鈥?executes inside your browser's local JavaScript runtime via the HTML5 Canvas API. Ai Sizs deploys a strict zero-server footprint mandate: no image data, no metadata, no analysis results, and no usage telemetry leave your device at any point. The tool remains fully functional even if you disconnect from the internet after the page loads. This air-gapped architecture is particularly critical for users analyzing confidential documents, proprietary product photography, or legally sensitive visual evidence.

What image formats and resolutions are supported?

expand_more

The tool accepts PNG, JPEG, and WebP image formats with a per-file size limit of 5MB. Source images exceeding 4096 pixels on either dimension are automatically downscaled proportionally before analysis to maintain smooth browser performance within local memory constraints. The SSIM comparison engine normalizes both images to matching dimensions using the smaller image's width and height as the reference, ensuring valid structural comparison even when source files have different resolutions. For optimal results with the blur detector, submit images at their native resolution 鈥?the Laplacian variance metric is resolution-sensitive and produces more meaningful scores on full-size captures.

Can I use this tool for automated batch testing or API integration?

expand_more

Ai Sizs is designed as an interactive browser utility, not a REST API endpoint. Because all computation runs client-side without server involvement, there is no backend endpoint to POST images to for programmatic access. However, developers can inspect the open-source JavaScript implementation directly in their browser's developer tools 鈥?both similarity.js (SSIM) and blur-detector.js (Laplacian variance) are self-contained vanilla scripts with no external dependencies. The algorithms can be extracted and integrated into automated Node.js pipelines using node-canvas or sharp for server-side batch processing workflows.

Who built Ai Sizs and what is the platform's business model?

expand_more

Ai Sizs is engineered and maintained by 345tool, an independent international developer collective specializing in lightweight, privacy-first browser utilities. The platform operates on a zero-tracking, zero-registration model. Monetization relies exclusively on non-disruptive, contextually relevant banner placements positioned outside the core analysis workspace. Over time, these placements transition into premium B2B link partnerships with verified technical organizations. No user data, image content, or behavioral analytics are ever collected, packaged, or sold to third parties.

345tool Team

345tool Team

We are the 345tool Team

345tool is an independent developer collective engineering elite, pure client-side, and privacy-first web utilities to replace bloated internet tools.

Visit 345tool.com →