Learned super-resolution
Use a trained network to infer a higher-resolution image from a lower-resolution input.
The sample drawing makes the data representation visible; it is not an actual model input/output pair.
Set its architecture name and scale factor.
Successive learned operations transform activations. Actual layers and tensor shapes come from the loaded model.
Twice the width and height gives four times as many samples. Learned detail depends on the model and may not match the original scene.
Run the network and assemble the high-resolution output.
Illustrative example. The stages explain the method; they are not a live OpenCV execution.
Try it on an image
Experiment at pixel level
Upscale with the bundled FSRCNN ×2 model, or upload a compatible TensorFlow .pb model. Architecture and scale must match the model. Input is capped at 256 pixels for this CPU preview.
The engine loads on your first run. Your images stay in this browser.
Scroll over either image to zoom at the pointer. Use the scrollbars to pan both views over the same relative area. Zoom is relative to the input; pixel coordinates belong to each image. Warps can change scene correspondence.
Pixel inspector RGBA · native values · matched scale · 9 × 9 output pixels
Select a pixel
Select a pixel
When to use it
Produce model-based upscaled images when a supported model and its expected scale are available.
How it works
- 01Load a compatible super-resolution model.
- 02Set its architecture name and scale factor.
- 03Run the network and assemble the high-resolution output.
low-resolution input → learned reconstruction → larger image
What to tune
setModel must agree with the loaded network and scale. Benchmark small images first on the CPU WASM backend.
Where it breaks down
Generated fine detail is inferred, not a recovered observation. Models can hallucinate texture and use substantial memory.
TypeScript API
Open an entry for its exact overloads, parameter descriptions, result ownership and pinned upstream source.
All of these calls execute on the CPU. Native objects need explicit disposal. See matrices and ownership and build compatibility.