What is the name of this algorithm, and how does it compare to other image resampling algorithms?

后端 未结 5 731

This algorithm has been in my mind for a long time, but I cannot find it described anywhere. It\'s so simple though that I can\'t be the only one who has thought of it. Here\'s

5条回答
  •  悲&欢浪女
    2021-02-08 05:53

    The algorithm you have stated is called an area-averaging algorithm, it is an algorithm which is seldom applied for shrinking images.

    A simpler variant of it is used as an anti-aliasing technique for smoothing rendered images in computer games.

    The algorithm for this technique is called Supersampling

    enter image description here

    Thanks to @Guffa for pointing it out, it is a simplification of the above algorithm, as it takes sample points and it could miss out on certain colors, or choose one color more times than another even though its not most dominant.
    The algorithm above is equal to an infinite points sampling of the supersampling algorithm.

    Update: Just noticed that even Java appreciates your algorithm :)
    AreaAveragingScaleFilter

提交回复
热议问题