Bicubic interpolation artifacts (image upscale)
Asked Answered
B

1

8

I am using a bicubic interpolation algorithm in order to upscale an height map, and I am noticing some artifacts around the pixels boundaries. However, these artifacts don't seem to appear when I use a simple cubic interpolation (spline).

Could it be because the bicubic interpolation doesn't guarantee the second derivative to be continuous, unlike the cubic spline ? If so, is there known algorithms that have a continuous second derivative ? Otherwise, is there a way to deal with these artifacts ?

Linear interpolation (shows the pixels boundaries): Linear interpolation

Bicubic interpolation (artifacts visible at pixels boundaries): Bicubic interpolation

Cubic interpolation (no noticeable artifacts): enter image description here

I tried several bicubic formulas, which gave me the same results. Here are some examples:


Edit: I made some searches and found that B-Spline have a continuous C2 (also suggested by Bharat). I implemented it and it looks fine, even if it's an approximation and not an interpolation (it doesn't go through the samples).

B-spline (approximation): b-spline

Babel answered 12/2, 2014 at 14:53 Comment(4)
What software are you using to generate those images? Looks really nice!Cicatrix
I am working on my own OpenGL engine.Babel
There's a bunch of related bicubic filters of which B-Spline is one. See cs.utexas.edu/~fussell/courses/cs384g/lectures/mitchell/… for the original paper and entropymine.com/imageworsener/bicubic for the simplified version. You might try the one recommended by Mitchell and Netravali with B=1/3, C=1/3.Larousse
@MarkRansom Nice paper. I implemented the generic function proposed there and tried several parameters. They all shows more or less artifacts (except b-spline). Mitchell is a good one though.Babel

© 2022 - 2024 — McMap. All rights reserved.