Author Topic: Layers  (Read 4564 times)

Offline rdryfoos

  • PixInsight Old Hand
  • ****
  • Posts: 377
Layers
« on: 2016 August 01 07:48:45 »
To the PI Gurus,

I am a dedicated PI man...from day1 (which is only 8 months ago)--went to an intensive week long PI seminar (Georgia, USA) which required travel, use nothing but PI, use it daily, watch as many tutorials as I can, crossed swords (pens actually) with numerous PI detractors on other forums in vehement defense of the platform (many of which having way more experience and knowledge than I)....my way of saying that, although the following question may kindle the ire of PI aficionados, asking it should not be held against me.  It has to do with layers.  I have heard that PI offers more control than other platforms, is more scientifically accurate to the data...etc...etc.  So repeating the party line is not necessary.  I am part of the party.  But I am having a crisis of faith as it were.   Here is the reason.   
 

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: Layers
« Reply #1 on: 2016 August 01 08:00:48 »
Hi Rodd,

Having layers is simply a pragmatic issue, as any operation that you usually would do through layers can be actually done with the currently available tools in PixInsight. For instance, when you have a mask in a layer and you modify the mask, then the resulting layered image is automatically recalculated; in PixInsight, you modify the mask (which is a separate image) and then apply the process again to the target image to see the result. On the other hand, you also have the PixelMath tool that lets you do any kind of operation between images, which is much more flexible and powerful than having a short list of "composition modes" in a layer tool.


Hope this helps.
Best regards,
Vicent.

Offline jkmorse

  • PixInsight Padawan
  • ****
  • Posts: 931
  • Two questions, Mitch . .
    • Jim Morse Astronomy
Re: Layers
« Reply #2 on: 2016 August 01 08:12:26 »
Vicent is absolutely right.  While I missed layers when I first started using PI, once I got a handle on all the tools in the PI toolbox, I have never looked back and in fact, wouldn't even know what to do with a layers tool in PI. 

But, if you can't live without them, our friend, “oldwexi” (Gerald Wechselberger) has come to the rescue, by, along with Hartmut Bornemann, building a great javascript on one originally developed by Mike Reid that should give you everything you could want in this regard.  To find it, click on the following address:

http://www.werbeagentur.org/oldwexi/Daten/Blend_StarMask_english.js

(He also has a German language version available at:

http://www.werbeagentur.org/oldwexi/Daten/Blend.js)

Gerald reports that it can also be used with a mask and that the latest version can also create a starmask from the actual Image. 

If you are unfamiliar with how to open javascripts in PI, simply save the process file to a location you will remember (such a creating a subfolder to hold PI scripts).   Then, go to the scripts tab along the top and click.  Near the bottom, four options up, just below a dividing line, is an option to “execute script file”.  Click on that and then navigate to where you saved the script.  Just click on the javascript icon in that folder and the tool should open right up.

And, if you find it useful, be sure to drop by the PI Forum and give oldwexi the thanks he and the others mentioned above deserve.

Best,

Jim
 
Really, are clear skies, low wind and no moon that much to ask for? 

New Mexico Skies Observatory
Apogee Aspen 16803
Planewave CDK17 - Paramount MEII
Planewave IFR90 - Astrodon LRGB & NB filters
SkyX - MaximDL - ACP

http://www.jimmorse-astronomy.com
http://www.astrobin.com/users/JimMorse

Offline rdryfoos

  • PixInsight Old Hand
  • ****
  • Posts: 377
Re: Layers
« Reply #3 on: 2016 August 01 08:52:37 »
Vicent--Perhaps the issue is one of practical utility.  I know ease of use is not a factor PI developers care about (that is stated by Juan).  A Formula 1 race car used at Monte Carlo handles better than a Honda Civic or Toyota (if one is a professional race car driver).  For the rest of us--the opposite is true.  Maybe layers are just as difficulty to use as PI--Lord knows the Gimp2 was incomprehensible to me and that is supposed to be a PS substitute.  I don't know.  PI professional (well respected) say one thing and PS experts (well respected) say another.  I (who knows nothing) am caught in the middle.  You should set up a seminar where you have examples of doing an image in PS and one in PI and SHOW US that it is better.  I believe you (I have regurgitated the party line enough times to enough people to be able to say this--unfortunately I can'y back it up).  There are many misconceptions about it.  Trust me when I say if this demonstration was done and it proved true--many would switch to PI, or at least get it and use it (which is want you want).  If the seminar was advertised as a "potential for compatibility" type of thing you would avoid any "this vs that" tension (if that is a concern).    Just an idea.

I don't know if I can live without them--I do know I can't live like I am.  I am willing to bet that I spend as much time, or more, processing (trying to process) as anyone alive--at times days go by and I have not stopped.  Usually I end up deleting all that I have done and start over.  I also know that my PI scripts, the ones not actually part of the program, never work--I have trouble with PI that no-one else has--error messages (especially with dymanic processies)  and repository errors--It dates back to the color mask issue I had some months back.  I kept asking why it wouldn't work and people on the forum kept giving me the link.  I keep saving it to the computer and when I opened it--nothing was there.  Finally i just gave up. 

Offline ChoJin

  • PixInsight Addict
  • ***
  • Posts: 106
Re: Layers
« Reply #4 on: 2016 August 01 09:20:09 »
I'm a PI newbie (on my trial period) I therefore can't offer any expertise, but in case you dont know about this video, there is a youtube video about photoshop and pixinsight on the same image.

"PixInsight and Photoshop Parallel Paths"
https://www.youtube.com/watch?v=sLl380aGNj4

hopefully that could give you some (pix)insights

Offline rdryfoos

  • PixInsight Old Hand
  • ****
  • Posts: 377
Re: Layers
« Reply #5 on: 2016 August 01 10:58:17 »
That's interesting--will give it a watch.  Hopefully they get into the details.

Thanks

Offline rdryfoos

  • PixInsight Old Hand
  • ****
  • Posts: 377
Re: Layers
« Reply #6 on: 2016 August 01 12:13:39 »
I watched some of it.  They did not really answer the single most important question--how to assign portions of the image to a particular layer.  Not all the red or green or blue channel, but portions--like everything seen in a high pass filter--or low pass filter, or the stars( that would be a good one)  or the Nebula itself.  I want to isolate features and I am having a very difficult time doing this in PI.  I try making masks and making clones and splitting the image into LRGB channels and using Pixel Math to subtract/add these various images together in efforts to isolate the nebula--but nothing works.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Layers
« Reply #7 on: 2016 August 02 03:10:34 »
Quote
I want to isolate features and I am having a very difficult time doing this in PI.  I try making masks and making clones and splitting the image into LRGB channels and using Pixel Math to subtract/add these various images together in efforts to isolate the nebula

The crucial question you have to ask yourself is: why do I need to isolate these features? To modify them selectively? In such case, why and how? What properties of the image and/or of the represented objects are you basing your decision on? Or, is it an arbitrary decision, not based on physical properties of the objects on the entire image, or on coherent properties of the data set as a whole (such as statistical or morphological properties, for example)?

If the answer to the last question is yes, then you are probably not applying documentary criteria to process the image. In such case you are not, in my honest opinion, working with the due respect to the data.

Quote
Not all the red or green or blue channel, but portions--like everything seen in a high pass filter--or low pass filter

Do you refer to the kind of things some people do with hand-painted masks in Photoshop, or other painting/retouching applications? Please forget these practices. They are extremely wrong approaches induced by lack of knowledge about fundamental image processing elements.

The layers paradigm is great to implement interactive manual operations, such as the kind of actions required in drawing, painting and design applications, where layers provide an efficient way to organize and combine graphical and geometric entities. However, layers provide nothing at all in terms of image processing operations. On the other hand, image processing is not compatible with painting. Hence, you don't need layers unless you are painting. It's that simple.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline lucchett

  • PixInsight Old Hand
  • ****
  • Posts: 449
Re: Layers
« Reply #8 on: 2016 August 08 19:49:08 »
For me The positive of layers is that can help doing logical operations with images.

I can live very well without layers ( also because I forgot how to use them:-)) but I'd like to have the ability to use two masks on the same image. That will save me some headache to create the right mask.
Andrea

Offline oldwexi

  • PixInsight Guru
  • ****
  • Posts: 627
    • Astronomy Pages G.W.
Re: Layers
« Reply #9 on: 2016 August 09 01:36:47 »
Andrea,

PixelMath is THE tool for doing logical operations with Images.
No other SW has so many Logical Operators you can use for image calculations
(Open PixelMath and browse through the many functions and operators provided by PI)

Using PixelMath you can have as many masks as you want for images.
You have Image (layer) A and Image (layer) B
The simplest solution for 2 masks (m1 and m2) is:  putting mask
m1
over the actual Image (layer) A and having in PixelMath the Expression:

($T * m2) + (B * ~m2)

Gerald


Offline rdryfoos

  • PixInsight Old Hand
  • ****
  • Posts: 377
Re: Layers
« Reply #10 on: 2016 August 09 07:46:46 »
Thank you for the detailed response Juan.  But I don't see the difference (in principle) between isolating a PI "layer" in MSLT for sharpening or denoising, and isolating the same features in a PS "Layer" using the layer technique.  We selectively manipulate the data all the time in PI.  The only "true data" is a raw image, calibrated, with perhaps some noise reduction.  Anything beyond that is altering the data.

Now--how about my dithering question?  I think its a good question.

Rodd

Offline jkmorse

  • PixInsight Padawan
  • ****
  • Posts: 931
  • Two questions, Mitch . .
    • Jim Morse Astronomy
Re: Layers
« Reply #11 on: 2016 August 09 09:07:01 »
What dithering question???
Really, are clear skies, low wind and no moon that much to ask for? 

New Mexico Skies Observatory
Apogee Aspen 16803
Planewave CDK17 - Paramount MEII
Planewave IFR90 - Astrodon LRGB & NB filters
SkyX - MaximDL - ACP

http://www.jimmorse-astronomy.com
http://www.astrobin.com/users/JimMorse

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Layers
« Reply #12 on: 2016 August 15 03:18:41 »
Thank you for the detailed response Juan.  But I don't see the difference (in principle) between isolating a PI "layer" in MSLT for sharpening or denoising, and isolating the same features in a PS "Layer" using the layer technique.

The key differences here are algorithmic versus manual, documentary versus arbitrary, and knowledge versus magic. These are crucial differences that define the core of our concept of astrophotography. So now you've touched a serious topic :)

The MultiscaleLinearTrasform (MLT) tool allows you to isolate image structures algorithmically as a function of typical structure dimensions in a multiscale representation. In this sense, MLT (if properly used) is technically "blind" or "neutral" because it does not allow you to perform arbitrary selections based on the "I like this more than that" kind of criteria. The same is true of most PixInsight tools, processes, scripts, and resources.

When people uses layers in other applications, they generally perform arbitrary manual selections and manipulations using hand-made masks with tools like lasso and brush. Once they have selected things based on "because I'm worth it" decisions, they usually apply funny actions such as "dust and scratches", "selective color", "give it life", "make it crispy", "burn it", "heal it", "sharpen it here and there", and so on. All of these things are very creative in the artistic sense, but I wouldn't call them image processing. Obviously, nothing can compete with layers when it comes to apply these artistic touches, simply because layers have been conceived, among other purposes, to facilitate manual selective transformations.

Undoubtedly, you can use PixInsight to manipulate images arbitrarily without any documentary criteria, if you want. You can even write a script to create synthetic deep-sky images (some time ago I was thinking on writing an APODOMatic script; maybe I'll write one if I ever get so bored that I don't know what to do with my time, which is extremely improbable). You can also use PixInsight to apply completely wrong procedures. The difference is that PixInsight has been conceived, designed and implemented to help you process your images with documentary criteria, algorithmically, applying image processing algorithms implemented rigorously and efficiently, and with the maximum possible respect to the original data. Other applications have been conceived and designed to help you achieve just the opposite goals.

Quote
The only "true data" is a raw image, calibrated, with perhaps some noise reduction.  Anything beyond that is altering the data.

Astrophotography is all about altering the data. That's because astrophotography is all about communicating facts and objects of nature with the goal of stimulating admiration and reflection. The key points here are how and why do we alter the data.

Juan Conejero
PixInsight Development Team
http://pixinsight.com/