Take the 2-minute tour ×

Facing some issues with image warping. My application (C#, VS2010) takes as input an image and tiles it and applies perspective using a homography matrix. All that works fine and I get a tiled output image with the required perspective. But the output image has some jaggered edges and missing pixels.

This is a sample output from my application: http://www.4shared.com/photo/vIeRhc9y/InterPol.html (Enlarge the image to see the problem clearly)

Check out the jaggered edges and some missing white lines towards the top left corner of the image. I tried applying bicubic interpolation to the pixels based on the explanation provided here: http://paulbourke.net/texture_colour/imageprocess/

The output is slightly better, but most of the missing lines and jaggered edges remain. What can I do to solve the issue?

Thanks in advance.


share|improve this question
add comment

1 Answer

You need to do better ;) are you using System.Drawing or something else? I know how to make the quality really good with GDI+ but you should be able to get better results with bicubic interpolation. Are you doing any filtering?

For simple comparsion, just opening the image in Paint.NET and doing some resizing I'm not experiencing the same problem.

share|improve this answer
I am actually mapping the destination pixels to the source pixels in the image when warping. I am setting values for each and every pixel myself. I apply the bicubic interpolation to the source pixel and apply it to the destination pixel. I calculate the interpolated value for each and every pixel in the output image. –  over.drive Jun 2 '11 at 7:29
I suppose, this is what I require: en.wikipedia.org/wiki/Spatial_anti-aliasing , any idea how I could implement that. I mean, do I find the output image and then apply anti aliasing or do I have to do something at pixel level. –  over.drive Jun 2 '11 at 7:32
I've been trying to learn that myself sadly I don't know how to implement anti-aliasing. This though seems to be a good start, it's relativly simple. web.cs.wpi.edu/~matt/courses/cs563/talks/antialiasing/… and to be clear, it's going to involve a lot of cool signal processing math. What you wanna look into is en.wikipedia.org/wiki/Supersampling which is pretty straight forward before going into more heavy stuff. –  John Leidegren Jun 2 '11 at 7:41
add comment

Your Answer


