Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Lanczos4 has a sharpening effect built in. Try using cubic for the warp perspective call.

Lanczos4 has a sharpening effect built in. Try using cubic for the warp perspective call.

EDIT Attempt #3:

Sorry, I keep losing things I post. Hopefully this works.

I should expand on the above a bit. The clarity you see in your images is somewhat less truthful than the blurriness in the cubic images. If you look HERE, you can see a description of how the lanczos4 and the cubic interpolation work.

Cubic contains no sharpening, so it looks blurrier, but it does use all the information. Lanczos4 also uses all the information, but it has some sharpening, so it can create halos. The nearest option however, blurs nothing, but it can lose data, or duplicate pixels if two result pixels have the same nearest original pixel.

Visually, Lanczos4 looks better, but scientifically, cubic is more accurate. Lanczos4 can create artifacts that don't actually exist, as you are seeing here.

I'm pretty sure the halo is not caused by the data-type wrapping around. Rather, it is the sharpening effect.

For example, your star is 15000 counts, and the bit right next to it is 1000. If the kernel is (I'm guessing numbers here) [-0.1, 1.2, -0.1], then you get sum[-1500, 1200, 0] = -300, which is the halo.