Author Topic: bleeding star fix?  (Read 20007 times)

Offline zvrastil

  • PixInsight Addict
  • ***
  • Posts: 179
    • Astrophotography
Re: bleeding star fix?
« Reply #15 on: 2012 January 19 02:38:16 »
Hi Neil,

just a suggestion what I'd try to do in your shoes in attempt to debloom manually with PixInsight:

1) Use RangeSelection to create mask covering saturated & nearly saturated pixels (image A)
2) Create suitable StarMask (image B)
3) Subtract B from A using PixelMath - the tricky part is to set up StarMask parameters so saturated star centers are removed from image A, leaving only bloom spikes
4) Select pixel math result as mask for your image
5) Try to apply MorphologicalTransformation, Erosion with horizontal kernel (assuming bloom spikes are vertical)
6) If needed, parameters in points 1-3 to create better mask

Of course this can't be compared with sophisticated inpainting techniques mentioned by Juan and you may as well use another application to do deblooming.

regards, Zbynek

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: bleeding star fix?
« Reply #16 on: 2012 January 19 06:11:19 »
What do you need a layering system for? I haven't had the need yet and I think my images look OK.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: bleeding star fix?
« Reply #17 on: 2012 January 21 18:55:13 »
What do you need a layering system for? I haven't had the need yet and I think my images look OK.

Layers will make PI more competitive against rival products. As I've said before I am not a marketing guy, but we have to sell licenses, and I am responsible for that. Common wisdom says that layers are necessary in astrophotography. That's false, of course, and is just a 'legacy' of many years of hegemony of applications that have nothing better to offer. The fact is that lack of layers is currently one of the main arguments against PixInsight.

Instead of fighting against the layers concept, I think it is much more productive to adapt it to PixInsight. On the other hand, the layering paradigm isn't a bad idea for some tasks. With a good design and integration, layers can be very useful in PixInsight. We are currently considering the possibility to implement a layering system in the PI Core application, which would allow us to achieve a better integration with the whole platform.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Neil

  • Newcomer
  • Posts: 21
Re: bleeding star fix?
« Reply #18 on: 2012 January 22 03:39:40 »
Hi Neil,

just a suggestion what I'd try to do in your shoes in attempt to debloom manually with PixInsight:

1) Use RangeSelection to create mask covering saturated & nearly saturated pixels (image A)
2) Create suitable StarMask (image B)
3) Subtract B from A using PixelMath - the tricky part is to set up StarMask parameters so saturated star centers are removed from image A, leaving only bloom spikes
4) Select pixel math result as mask for your image
5) Try to apply MorphologicalTransformation, Erosion with horizontal kernel (assuming bloom spikes are vertical)
6) If needed, parameters in points 1-3 to create better mask

Of course this can't be compared with sophisticated inpainting techniques mentioned by Juan and you may as well use another application to do deblooming.

regards, Zbynek

My initial idea is along the same line but also a little different as follows;

1. Find the centroid of the top 50 or so brightest stars in the image
2. Of those stars find the ones with blooms
3. Remove the bloom and protect the centroid and a certain size / diameter determined by the none bloomed width???

Now the dilemma is what or how should I replace the bloomed data??? Use the statistical average from around the bloom???

Comments are of course welcome? The inpainting techniques look nice but I couldn't find an formula to implement? So I guess its trial and error time!!!

Regards


Neil.

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: bleeding star fix?
« Reply #19 on: 2012 January 22 05:02:07 »
Look at the software pointed to in http://pixinsight.com/forum/index.php?topic=1300.msg25999#msg25999.
One method they offer is to replace bleeded pixels by their counterparts that are 90 degrees away, with the star as a center.
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: bleeding star fix?
« Reply #20 on: 2012 January 22 07:20:42 »
What I would do is to copy the gradient information. This way, intensity would remain the same as in  the surroundings, but you'll be copying just texture information.
Regards,

Carlos Milovic F.
--------------------------------
PixInsight Project Developer
http://www.pixinsight.com

Offline Neil

  • Newcomer
  • Posts: 21
Re: bleeding star fix?
« Reply #21 on: 2012 January 22 08:48:04 »
Look at the software pointed to in http://pixinsight.com/forum/index.php?topic=1300.msg25999#msg25999.
One method they offer is to replace bleeded pixels by their counterparts that are 90 degrees away, with the star as a center.

Are, thats actually no use to me since I have a MAC and no visual basic environment!!!

If someone could post the actual code in a text readable format, then I can have a go at bring it into JAVA JavaScript etc...

Not played with Java for a long time though... Gave up on it years ago and went down the Python C++ route. Still if its the interface to PI then so be it.

Regards


Neil.

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: bleeding star fix?
« Reply #22 on: 2012 January 22 10:05:10 »
Visual Basic is normal text, and with a little bit of fantasy you should be able to understand the algorithm from it. Also, it contains a good documentation in PDF.
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Neil

  • Newcomer
  • Posts: 21
Re: bleeding star fix?
« Reply #23 on: 2012 January 23 07:48:21 »
Visual Basic is normal text, and with a little bit of fantasy you should be able to understand the algorithm from it. Also, it contains a good documentation in PDF.
Georg

I did take a look using "Text Wrangler" but could locate the essential code. I'll have another look but I believe the interesting stuff is packaged in the DLL.

I only looked in the files with a couple of hundred kilobytes??? Didn't bother with the DLL.

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: bleeding star fix?
« Reply #24 on: 2012 January 23 11:53:55 »
I downloaded the version for CCDSoft from http://newastro.com/downloads/free/debloomer_ccdsoft_free.zip. The relevant source code in in fixBlooms.bas, the handbook in debloomer2.pdf. The MaximDL version has a similar structure.

Georg

Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)