Whilst a k-grouping algorithm is used to get the dominant colour, which works OK, often the dominant colour isn't the background colour so that the scaled art is obviously letterboxed. Some art has a solid background. In this case, median perimeter detection will work better.
Whilst a k-grouping algorithm is used to get the dominant colour, which works OK, often the dominant colour isn't the background colour so that the scaled art is obviously letterboxed. Some art has a solid background. In this case, median perimeter detection will work better.