Author Topic: [Unofficial] New Module: Sharpen  (Read 20130 times)

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
[Unofficial] New Module: Sharpen
« on: 2009 September 15 10:27:22 »
Hi everybody

Here is a new release, this time a process I called Sharpen. Why? Because it is an implementation of one of the most simplest version of a sharpen algorithm... well, not that simple in this case :D A long time ago I was wondering if a laplacian sharpening filter (using the second derivative) may be used at larger scales, not just as a simple difference between neighbor pixels. So, here is the result, a scale variable algorithm. You may choose between 4 filters, Laplacian4, Laplacian8, WeightedLaplacian8 and LaplaceOfGaussian. The first 3 are straightforward: just decide how many pixels are defined as neighborhood, and how their influence is calculated. The last algorithm is a bit different, first a gaussian blur is applied, with the defined radius as standard deviation, and then a simple laplacian filter is applied too.

Additionally, you may adjust the amount (strength), set a threshold, deringing... and modify the dynamic range.


Here is the Win32 compilation:
http://pteam.pixinsight.com/carlos/modules/Sharpen-pxm.zip

Source code (this module may include a real time preview option, but everything related has been disabled there):
http://pteam.pixinsight.com/carlos/modules/Sharpen-src-2009-09-25.zip


I hope you like it :) Have fun trying the results with different values for the radius.
« Last Edit: 2009 September 24 22:38:29 by Carlos Milovic »
Regards,

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

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: [Unofficial] New Module: Sharpen
« Reply #1 on: 2009 September 15 10:36:07 »
Well well, you've been busy Carlos! Looks like I need to put my coding hat back on and finish the profile tool :)

Many thanks!
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 Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: [Unofficial] New Module: Sharpen
« Reply #2 on: 2009 September 15 10:49:06 »
Thanks Sander :)

Yes, quite busy... and boring week with economics ans chemistry tests, and a flu :)


What does your profile tool so? Just asking to avoid doing the same thing :D
Btw., I'm starting a tool that plots the intensity of pixels v/s a spatial coordinate (row, column, any line, or a radius)
Regards,

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

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: [Unofficial] New Module: Sharpen
« Reply #3 on: 2009 September 15 10:53:58 »
Hi Carlos,

it was announced here:

http://pixinsight.com/forum/index.php?topic=1308.0

but I need to recompile it for the latest PCL. You draw a line on an image and the tool plots RGB, R, G, B, Lum or Sat. There's also an export to .csv function but that needs some work. Sounds like it may be similar to what you have in mind except yours has more options for how to draw the line?
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 Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: [Unofficial] New Module: Sharpen
« Reply #4 on: 2009 September 15 10:59:17 »
Yes, sounds very similar :P  already wrote a lot of the code one or two years ago, and left unfinished... Let me finish it, see what you have, and start a combined project we two ;)
Regards,

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

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: [Unofficial] New Module: Sharpen
« Reply #5 on: 2009 September 15 11:35:29 »
Hi Carlos,

sure, that might be possible. As we both already have code written it may be our approaches are very different so it may not be possible to merge. We can certainly help each other make progress though. Let me get the module recompiled so you can give it a try. It'll be an opportunity to try Juan's new makefile generator and see if it can create 32bit binaries on a 64bit system.
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 Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: [Unofficial] New Module: Sharpen
« Reply #6 on: 2009 September 15 12:50:15 »
I did not remember how old, and complex the code was :P It will take me a while to update the code to the current PCL, and understand what I wrote :D (now I'm fighting against the parameters... next, interface, the old foe :D )
Regards,

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

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: [Unofficial] New Module: Sharpen
« Reply #7 on: 2009 September 15 12:53:01 »
Just making the module work isn't so hard but to tie everything together so the process can be saved in the image history and as a process icon etc., well, that's enough to make a grown man cry :)
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 Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: [Unofficial] New Module: Sharpen
« Reply #8 on: 2009 September 15 12:57:42 »
Aren't those side-effects of making it work? :D
Regards,

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

Offline Harry page

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1458
    • http://www.harrysastroshed.com
Re: [Unofficial] New Module: Sharpen
« Reply #9 on: 2009 September 15 14:25:05 »
Hi Carlos

Sorry I am a dumbo but how do you install this module and I presume its a 32 bit only job  ;)

Regards Harry
Harry Page

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: [Unofficial] New Module: Sharpen
« Reply #10 on: 2009 September 15 15:21:01 »

Hi Harry,

- uncompress it somewhere
- use the process->modules->install module dialog
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 Harry page

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1458
    • http://www.harrysastroshed.com
Re: [Unofficial] New Module: Sharpen
« Reply #11 on: 2009 September 16 12:35:40 »
Hi

Thanks for the info now got it loaded   :D

Also many thanks for this Carlos , works great and is a great addition to pixinsight as If we are to totally wean ourselves of photoshop we need relatively simple tools like this one, as well as the complex ( all be it probably more powerful ) Modules.

Any chance of a 64 bit version   ;)

Regards Harry
Harry Page

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: [Unofficial] New Module: Sharpen
« Reply #12 on: 2009 September 16 13:22:50 »
Hi Harry,

you *could* install PCL64 and Visual Studio Express 2008 (free) and compile it yourself :)

Or you can wait till I get around to doing it. I meant to do so last night but didn't.
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 Harry page

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1458
    • http://www.harrysastroshed.com
Re: [Unofficial] New Module: Sharpen
« Reply #13 on: 2009 September 16 13:26:33 »
Hi

I have tried your filter and find the 4 version works fine , but the 8 filters crash with a memory violation  :'(

What do you think

Harry
Harry Page

Offline C. Sonnenstein

  • PixInsight Addict
  • ***
  • Posts: 262
    • http://astrosurf.com/astro35mm
Re: [Unofficial] New Module: Sharpen
« Reply #14 on: 2009 September 16 14:43:20 »
Hi Carlos!

This tool is very exciting, and very useful for flatten star masks. Congratulations.
Carlos Sonnenstein