Skip to content

no4ni/scaleSmooth

Repository files navigation

scaleSmooth

Algorithms for most-accurate upscaling image without AI and neural network


(gray or color/ smooth, rough, furry, separate, approximation, bold or contrastBold / fast or accuracy variants available)

Мои эксперименты с изображениями
Объяснение принипа работы и больше примеров и сравнений в FullHD: #1, #2



Free and Open Source Image Upscaler

scaleSmooth lets you enlarge and enhance low-resolution images using only math.
Enlarge images and get more quality without losing accuracy (except contrastBoldScale) and hallucinations. It's just math!

scaleSmooth is a windows application on .NET 8.0 on Visual Studio C#, but we'll be glad, if you create your repository of scaleSmooth / scaleRough / scaleFurry / contrastBoldScale / scaleSeparate / scaleBilinearApproximation for other platforms and languages (write me and I'll attach link to your repository) or commit here updates for translations for other languages, optimization, batch, interface or more accuracy. If you want improve anything we'll be glad for pull request, if you disagree with something boldly fork to your own repository

Threshold, autoThreshold, Mean Cuvatute Blur, Median Blur, adjustment by Lanczos, Antiringing and other tools, which can help you get more usefull results for your specific needs are NOT included!

🏃 Run

(required Windows 7?-10+ x64, .NET 8.0+)

🛠 Using in your projects

  • Just copy necessary function (ScaleSmoothGray / ScaleSmoothColor / ScaleRoughGray and S255 / ScaleRoughColor and S255 / ScaleFurryGray and S255 / ScaleFurryColor and S255 / ContrastBoldScaleGray and S255f / ContrastBoldScaleColor and S255f / BoldScaleGray and S255f / BoldScaleColor and S255f / ScaleSeparateGray, Quadrilateral and Bilinear / ScaleSeparateColor, Quadrilateral and Bilinear / ScaleBilinearApproximationGray, Dist4 and Bilinear / ScaleBilinearApproximationColor, Dist4 and Bilinear) (you can harmless remove ProgressText from code)
  • Call it with parameters (image as type Image, int scale (2-255), int accuracy - where 0 is fast, 100 is accurate)
  • It returns new image as type Image

ℹ️ Description of methods

  • scaleSmooth
    Most accurate for scenes where objects are completely in the image, but little bit blurred (much less than any interpolation) and grid structure is still visible
    Fast, and you can process multiple images at the same time without losing speed (just run function in other thread or run .exe one more time)

  • scaleSmoothContinuous
    Most accurate for scenes where objects extend beyond the boundaries of the image, but little bit blurred (much less than any interpolation) and grid structure is still visible
    Fast, and you can process multiple images at the same time without losing speed (just run function in other thread or run .exe one more time)

  • boldScale
    Grid structure, little bit noisy and contrasty (for accuracy, subsequent reverse correction is desirable) and too small details may lost
    Fast - Slow, but you can process multiple images at the same time without losing speed

  • contrastBoldScale
    Perfect result, but too contrasty (for accuracy, subsequent reverse correction is required) and too small details are lost
    Fast - Slow, but you can process multiple images at the same time without losing speed

  • scaleFurry
    Beautiful and detailed result, but only if bigger version must be monochrome image (only pure black and white, or for color - only pure red, black, green, yellow, fuchsia, blue, cyan and white)
    Slow - Very slow, but you can process multiple images at the same time without losing speed

  • scaleRough
    Typographic raster stylization, but if bigger version must be monochrome image it gives acceptable upscaling
    Slow - Very slow, but you can process multiple images at the same time without losing speed

  • scaleSeparate
    Gives beatiful, but almost monochrome result and there are Gibbs ringing artifacts
    Very fast, but you can't process multiple images at the same time without losing speed

  • scaleBilinearApproximation
    A clearly defined grid structure and Gibbs ringing artifacts are present, but even if these shortcomings are not removed with other tools, it is more accurate than Lanczos and clearer than Lanczos and Bicubic
    Very fast - Very very slow, and you can't process multiple images at the same time without losing speed

You can increase speed instead of accuracy and vice versa