Author Topic: Background Enhance Script  (Read 10429 times)

Offline Silvercup

  • PixInsight Addict
  • ***
  • Posts: 187
Background Enhance Script
« on: 2010 May 14 01:00:31 »
Hello:

I spent a couple of days on Pixi Script, and you already have an early version of Background Enhance  Script (based on m27 tutorial processing secuence) .



Although it is very intuitive I'll explain a bit how it goes:

Running the script opens an imagewindow where we do all "previews" and the script window opens to the left.

We can zoom with the mouse wheel and use the Zoom to Fit, Fit View and ZoomtoOptimalFit to adjust the size of the window (thanks to Nikolay).

Under "Enhancement parameters"

Small Scales Layers  are small-scales that are going to be deleted to form large-scale image.
Scales Small Amount is the amount that we will highlight the small scale to prevent potential artifacts due to stars or bright objects that can produce halos.
Amount is the amount by which the image is mixed with the original scale.
Mask Amount is the amount that we will highlight a mask to protect the bright areas of the image.

Preview button: performs all operations of "Background Enhance" and displays it in the "preview ". May take some time depending on the image.

Extract Images: Marking the options extract  large-scale, small-scale or mask images.

Show images: Clicking on each button we see the corresponding image.

Hope reviews and see your results before and after.

Best. Silvercup

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: Background Enhance Script
« Reply #1 on: 2010 May 14 01:22:03 »
That looks like a very well-formed script - well done

I'll be having a closer look at this when I get back to my PI machine - I am keen to see how you have implemented some of the functions, as I have an idea than could take advantage of some of your hard work :D (sorry, but it is the easiest way for me to learn, and I will ensure credit is given where due ::))

Cheers,
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline avastro

  • PixInsight Addict
  • ***
  • Posts: 181
    • http://astrosurf.com/avastro/
Re: Background Enhance Script
« Reply #2 on: 2010 May 14 01:59:19 »
Hello Silvercup,
Tested your script in some images, it work just fine.
Standard settings are doing a fine job in most of my test.
Great piece of script, thanks to take the time to do it.
Cheers

Antoine
Antoine
Lentin Observatory
http://www.astrosurf.com/avastro/

Offline budguinn

  • PixInsight Addict
  • ***
  • Posts: 106
Re: Background Enhance Script
« Reply #3 on: 2010 May 14 06:45:41 »
Hi Silvercup,

Very nice, and works well....my only request would be for a defaults reset button.

bud

« Last Edit: 2010 May 14 07:49:19 by budguinn »

Offline Jack Harvey

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 975
    • PegasusAstronomy.com & Starshadows.com
Re: Background Enhance Script
« Reply #4 on: 2010 May 16 08:29:53 »
Well this is pretty darn neat!  Needs to become a regular PI tool IMO.  Although the script runs fine.  Thanks for your work on this!!
Jack Harvey, PTeam Member
Team Leader, SSRO/PROMPT Imaging Team, CTIO

Offline NKV

  • PTeam Member
  • PixInsight Guru
  • ****
  • Posts: 677
Re: Background Enhance Script
« Reply #5 on: 2010 June 01 02:16:24 »
Hello Silvercup, thank you for nice script.

Small trick:
Instead for(var i=0;i<11;++i) {Preview.zoomIn();} you can use Preview.zoomFactor=11;
Also I found solution to avoid 'strange' movement of green rectangle:
Code: [Select]
      var busy = false;
      onMouseMove = function(x,y)
      {
         if (this.busy) return;
         this.busy = true;
         Preview.setViewport( x*w/Size, y*w/Size );
         repaint();
         this.busy = false;
      }

Best regards,
Nikolay.

Offline Christoph Puetz

  • PixInsight Addict
  • ***
  • Posts: 150
  • Peterberg Observatory (Germany, Saarland)
    • Fotos
Re: Background Enhance Script
« Reply #6 on: 2010 July 02 00:42:40 »
Hi, very nice script.

I wondered, why I did not see it in the Menu entries. So I started it "per hand".
If you like, you could add this line to your script:

#feature-id    Utilities > BackgroundEnhance

So - this was my first try in understanding Javascript in PI  ;)
Kind regards,
      Christoph
---
ATIK 383L+, Canon EOS 450d, modified,
Canon EOS 500d, 
20" Planewave CDK, 6" APO Starfire Refractor,
Celestron 8", Skywatcher ED80,
Peterberg Observatory (www.sternwarte-peterberg.de)
PixInsight, PHD-Guiding
private URL: www.ccdsky.eu