Log in

View Full Version here: : Nearest neighbour v bicubic b spline


Bassnut
29-10-2010, 09:05 PM
Damb, there I was viewing a very interesting thread on the above, prepared a post, and bingo, thread gone !.

Dunno, I maybe im just stupid and just cant find it. Anyway, here (https://sites.google.com/site/fredsastro/temp) are 2 mean stacked images, with each of the above applied, uncompressed scaled TIFFs with no data reject or any processing of any kind. Average amount of noise.

Id like to understand the thoretical arguments with reference to actual images, if the original posters could please peruse and comment.

Bassnut
29-10-2010, 09:32 PM
Well, I cant see any diff, but have always use bicubic. I didnt upsize on this, perhaps I should have to compare. Anyway, cant see the reason for the delete. Robust post perhaps, but not worthy of a delete, Im sure both partys could handle it ;), the subject was worthy of a continuance :shrug:.

Moon
29-10-2010, 09:39 PM
As I mentioned in the now deleted thread, I'll try to do a test of the Adam Block nearest neighbor method (using the CCDStack data reject procedures) and compare it to Bicubic b-spline. I'm not at all sure if I can do a meaningful test, but I'll give it a try. I'm also not the person to ask about the full mathematical background I might add - that would be the guy that did this masterpiece (http://d1355990.i49.quadrahosting.com.au/2010_06/m7m8m20S.jpg).:thumbsup:

The thing that worries me about the nearest neighbor is the way it distorts the image. But every time I try it, it seems to work well.

James

avandonk
29-10-2010, 09:42 PM
We used to have weekly meetings at CSIRO and I have called my superiors all the names you can think of and they did the same to me. It was about free and frank exchange of opinion. No matter how wrong you were!

But this is a nice zone so from now on I will only think very nice pink thoughts.

Bert

rat156
29-10-2010, 09:55 PM
No Bert,

'twas me who complained. You were rude.

I always use bicubic when registering images, seems more accurate. Though my images are serious oversampled, so it probably doesn't matter.

WRT the hot pixels, remove them straight after image calibration, this works much better than anything else.

Cheers
Stuart

BTW I think you owe the 36 poster an apology.

Bassnut
29-10-2010, 09:55 PM
It is not a data reject process in CCD stack2, its a resample after align, so it makes sence it would make a difference in resizing. The samples I posted were all bin 1, perhaps it would make more of a diff with a mix of bin1-bin2 subs.

Bassnut
29-10-2010, 09:56 PM
Geez Stuart, why did you bother, aint it up to the target?

multiweb
29-10-2010, 10:04 PM
I use nearest neighbourg all the time. If I have a lot of subs it works alright. On two subs it's not good. You'd use bicubic b-spline. Nearest neighbourg will move entire blocks of your subs to align them, like solid tiles without resampling or blurring the lot. So you keep the noise sharp and it's easier for the data rejection algorithm to paint outliers. If you use bicubic b-spline you'll interpolate all those pixels in between the stars and smear the noise. So it's harder for the data rejection algo to do its job. That's my understanding from Adam Block's tutorials.

avandonk
29-10-2010, 10:05 PM
There is nothing wrong with nearest neighbour. We have computers now that can fit a curve to the pixels based on a localised curve that gives a far better approximation for interpolation. A bicubic curve does this extremely well.

You cannot make a silk purse out of a sows ear. If the image is very noisy you are wasting your time.

Bert the grump!

Moon
29-10-2010, 10:11 PM
I know the resample happens with the align - the thing Adam Block points out is that if you use 'nearest neighbor' then you can do better data rejection on the stack after **the align**. A hot pixel will still look hot (statistically) whereas if you align with something like Bicubic B-spline, the hot pixel is now averaged out a bit and won't look so hot, and thus harder to reject.
If you dither the images, then this will make the hot pixels stand out like .... well you know the saying.
James

avandonk
29-10-2010, 10:12 PM
I am sorry if I have missed something here. You are discussing stacking with on the fly averaging?

I thought it was upsizing!

See I am a silly old bunt!

Bert

rat156
29-10-2010, 10:19 PM
The B-Spline kicks in with the image align calculations, as these are sub-pixel calculations, they require image resampling I think?

Cheers
Stuart

avandonk
29-10-2010, 10:23 PM
Now we have a totally different problem.

I have noticed that RegiStar is very good a stacking noise. It will distort to put a bit of noise on noise.

I use IP to correct for darks and flats.

I then use DSS to stack the images. With a bit of noise rejection.

Seems to work OK.

Bert

Moon
29-10-2010, 10:27 PM
Don't worry - I just noticed CCDStack does EXACTLY the same thing! It's amazing what you notice if you look carefully enough! I'm shattered.
James

Moon
30-10-2010, 01:41 AM
I did a quick test with a stack of 9 images.
As expected, data rejection works better after using nearest neighbor interpolation for the stacking when compared to Bicubic B-Spline.
Although the Bicubic version seems smoother (image 1) than the nearest neighbor version (image 2) , I think this is just because it has been blurred a bit. When I added a Gaussian blur to the nearest neighbor version (image 3) it looked better than the Bicubic B-Spline version to my eye.

The video is a bit hard to follow but it compares the Bicubic B-Spline vs. the non blurred nearest neighbor. LINK (http://www.youtube.com/watch?v=XiP4-568bJg)
James

iceman
30-10-2010, 08:32 AM
Enough talk about the thread that wasn't.

Keep it on topic and no personal attacks please.

Bassnut
31-10-2010, 09:55 AM
That is very interesting, Ill give that a try too.

gregbradley
05-11-2010, 07:03 AM
I remember a post I think its from PHD site about these 2. Nearest neighbour in that comparison seemed to be superior.

One problem I have had recently is I get some hot red blue and green pixels near the end of image processing. Sometimes black spots in Ha images.

I haven't always had this. I am wondering is it time to take fresh darks, or is it my change to CCDStack 2 versus CCDstack. Nearest neighbour is now an option in CCDstack 2 and I don't think it was available in CCDStack.

Opinions?

Greg.

multiweb
05-11-2010, 08:15 AM
Data rejection will work better if you register with nearest neighbor.



Hot/cold pixel then impute/interpolate will take care of those residual specks. Nearest Neighbor was already available in previous versions of CCD Stack. That's the registration algo I've always been using.