# Data Analysis: Image Sharpening through Posterisation

I had this image, a picture of Jupiter:

I wanted to measure the pixel diameter of Jupiter. As evident, the image is quite blurry, and thus, many value of equally justified pixel diameters can be obtained. To eliminate this I posterised the image (which is technically, quote from Gimp, "designed to intelligently weigh the pixel colors of the selection or active layer and reduce the number of colors while maintaining a semblance of the original image characteristics"):

With the above result, I obtained three pixel diameters of Jupiter (one from each of the coloured circles), and with a little bit of calculation, realised that the yellow circle gave rise to the most accurate value of Jupiter's diameter (which was surprisingly off by less than one percent!).

My questions are:

1) Why is my original image like that? Is it due to some form of light scattering?

2) Is there a better method of obtaining an accurate pixel diameter than posterising the image

3) Is the posterised result expected? Are there names that can be given to the three distinct spherical objects (which seem to resemble shadows, like the umbra, prenunbra, antumbra, etc.)? Is there a reason why the middle posterised object gives the most accurate value?

• Overexposed Jupiter, also use Blue Filter. Here is an example shot with "Jupiter Filter" vimeo.com/166596695 – fahadash Jun 15 '16 at 12:46

1) your original image is blurred and possibly overexposed. I can't tell if the blurring is due to poor focus or inaccurate tracking. I think you really need much better, sharper images that show the true boundary of the planet before you can start to measure diameters.

2) with a sharp image, there should be no need for posterising the image.

3) "Is there a reason why the middle posterised object gives the most accurate value" - well we could claim that it marks the "average" estimated diameter, but in my opinion the answer is: coincidence. If you posterised it to give, say, four bands instead of three, which would you take as your "true" diameter? And without knowing the real diameter of Jupiter in advance, how would you ever know?

Edit: by the way, I noted your previous question on this subject. Did you read and use those answers? How sure your magnified image is really the size you think? You could try to verify this by photographing a double star of known separation...

• Thanks for your answer. Yes, I used those answers to calculate the diameter of Jupiter from my image. I have a bunch of images like the original one above, and ideally want something that will help me deal with the low image quality. I understand that a sharper image would be ideal, but do you know of any other method I could use to get an accurate estimate of Jupiter's pixel diameter from images of the above quality? – StopReadingThisUsername Jun 16 '16 at 4:01
• @Arjun - hmmm, not a software method but I would suggest trying to collect more images of different exposures and see if they all give around the same diameter estimate. It's still not a good method though (we can't measure better than the resolution of the telescope itself, for example.) – Andy Jun 16 '16 at 7:04

I would do this bare hands so to speak.

Read the image into a package that allows you to do arithmetic on the data. Sum the colour channels. Then threshold at something like half maximum and count the number $N$ of pixels above threshold. You might want to look at the result at this point to make sure the processing has not captured a feature that is not wanted.

This is something like posterisation.

Then you can define the half maximum equivalent diameter as

$$D=2(N/π)^{1/2}$$

Doing this, in GNU Octave, with your top image I get $D\approx 394.6$ pixels.

It would also help if the pixel values were not saturated, but then I suppose we have to work with the image we are given, at least it means we don't have to worry about limb darkening or contrast stretching.

GNU Octave session:

>> i=double(imread("H:/Desktop/Jupiter.png"));
>> ii=i(:,:,1)+i(:,:,2)+i(:,:,3);
>> idd=(ii>max(max(ii))/2);
>> N=sum(sum(idd))
N =  122287
>> D=2*sqrt(N/pi)
D =  394.59
>>