Author Topic: Layer in PI  (Read 11678 times)

Offline Stephane Murphy

  • Member
  • *
  • Posts: 63
Layer in PI
« on: 2009 July 11 13:09:04 »
Hi, I am trying to mimic what I am use todo in Photoshop CS3. I want to color boost (or make some otehr change) only on the spiral of a galaxy without affecting other area of the image. In CS3, the way I approach this is by creating a layer , boost the color saturation, hide the changes using layer mask and only reveal the change using the pait brush.

Any suggestion how to do this in PI?

Thank you for any suggestions,
Srephane
Stephane Murphy
CDK 12.5 Planewave Instrument
Paramount ME
SBIG STL11000M
SBIG ST-402 Guider
Astrodon MOAG
Astrodon Filters

Offline Cheyenne

  • PixInsight Addict
  • ***
  • Posts: 146
    • Link to Picasa gallery of my astronomy photos
Re: Layer in PI
« Reply #1 on: 2009 July 11 13:24:02 »
Create your mask layer first then apply the the changes.

Harry has a good video on doing a masked saturation boost http://www.harrysastroshed.com/saturation.html
Cheyenne Wills
Takahashi 130 TOA
Losmandy G11
SBIG STF8300M
Canon 20Da
SBIG ST-i + openPHD for autoguiding

Offline Stephane Murphy

  • Member
  • *
  • Posts: 63
Re: Layer in PI
« Reply #2 on: 2009 July 11 16:09:15 »
Thanks for the reference. Harry techique work great if you want to protect the background (global protection) but I what I am looking for is more to applied changes to a selective region of interest such as a part of the galaxy spiral, so more as layer mask in CS. I am not sure with Harry techique how to create that region of interest  mask.

Thanks again for any input
Stephane
Stephane Murphy
CDK 12.5 Planewave Instrument
Paramount ME
SBIG STL11000M
SBIG ST-402 Guider
Astrodon MOAG
Astrodon Filters

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Layer in PI
« Reply #3 on: 2009 July 11 18:26:37 »
Hi Stephane,

Quote
creating a layer , boost the color saturation, hide the changes using layer mask and only reveal the change using the pait brush.

You can do that in PixInsight. But before telling you how, I'd like to know your answers to these questions: Why do you think you need to do that? What do you want to achieve by doing that?

Disclaimer: What follows reflects only my particular vision of astrophotography.
Please don't take me wrong. I just want to trigger a reflection that I think will help you to improve your astrophotography.


What you want to do is a retouch by hand painting. IMO, this is contradictory to the documentary nature of astrophotography.

Astrophotography is documentary photography of astronomical subjects. To apply an image processing technique or algorithm selectively, pixel selections must be defined based on plausible criteria applied homogeneously to the whole image. Plausible selection criteria are based on properties of the objects (usually physical or morphological properties). Arbitrary manual selections, in general, are incompatible with this principle.

There are sound exceptions. For example, you can fix small artifacts or imperfections with the clone stamp or a similar tool, always with great care and knowledge of what you are removing. If in doubt, always prefer to leave the artifacts. A big blooming left in place is more honest than a nice and perfect retouch, if the latter cannot be done without destroying significant data.

Most "techniques" based on the layer+brush paradigm are IMO incorrect to say the least. For example, I refer to those selective sharpening tricks that are so popular these days, unfortunately. They are absolutely wrong, IMO. You cannot decide arbitrarily (hand-wise, specifically) which parts of an object should be sharpened and which ones shouldn't.

And the best part of it is: you don't need those tricks, not at all. In fact, they are only a huge obstacle to develop your processing skills, and hence your personal evolution in astrophotography.

Harry's video teaches you the right way. For example, he basically uses a luminance mask to select those pixels that will be saturated. A luminance mask follows a global selection criterion based on a fundamental property of the objects (their brightness). PixInsight has been (and will be) designed with this concept of astrophotography in mind since the beginning.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Stephane Murphy

  • Member
  • *
  • Posts: 63
Re: Layer in PI
« Reply #4 on: 2009 July 11 18:43:15 »
Thanks Juan for sharing your philosophy on astro image processing. I completely agree with you, and this is how I usually process my pictures in Pixinsight, I only apply global changes. In the past in Photoshop, I admit I did a lot of convoluted techniques to applied local processing.
Now, I also like the APOD type pretty pictures that call bubble gum type processing where you can obviously see local color boost saturation that sometime provide in my more depth in certain case.

The reason I ask is that I am trying to mimic one of the APOD picture of M51

http://apod.nasa.gov/apod/image/0905/m51deep_christensen_big.jpg

Looking at this picture it is clear to me that local color boost was applied in Photoshop.
Maybe it is possible to reach that level of colorful image without my suggested technique - Selective processing, just not sure how.

Again I agree with you but I also I am curious  to learn how to this in PixInsight.

Thanks for the help
Stephane









Stephane Murphy
CDK 12.5 Planewave Instrument
Paramount ME
SBIG STL11000M
SBIG ST-402 Guider
Astrodon MOAG
Astrodon Filters

Offline Cheyenne

  • PixInsight Addict
  • ***
  • Posts: 146
    • Link to Picasa gallery of my astronomy photos
Re: Layer in PI
« Reply #5 on: 2009 July 11 21:20:49 »
I think you can pull that off with Harry's saturation video.  Basically you take the luminance of the image, do a hard clip on the low end and use that as a mask to protect the background then do a saturation curve adjustment. 

There is also an M42 processing example that get into creating the masks.

I think the approach that PI has taken is the "correct" one from a scientific standpoint.  Basically it's reproducible and theoretically each step in the the entire process could be described using a mathematical  equation.
Cheyenne Wills
Takahashi 130 TOA
Losmandy G11
SBIG STF8300M
Canon 20Da
SBIG ST-i + openPHD for autoguiding

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: Layer in PI
« Reply #6 on: 2009 July 12 03:08:15 »
Hi,

following Juan's words... Even if you make a selection based on properties of the objects, you must think why you need that, and wich is your goal by doing that. In astrophotography, as in any other science or art, all your actions must be filtered out by your brain.

Regarding the M51, it has simply a saturation boost in the areas where there's more signal. But to me, the interesting areas of the external halo are completely colorless... The solution would be, appart from doing more RGB exposures, to deal with the chrominance noise.

PI doesn't take this approach only from a scientific standpoint, but also from an artistic one.


Regards,
Vicent.

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: Layer in PI
« Reply #7 on: 2009 July 12 11:50:10 »
Hi all,

As I started my long journey in the field of astrophotography, I soon realised that most of the 'best' images I came across were really closer to 'painting' than they were to 'photography'. In fact, as soon as I hear of a step involving a 'lasso tool', or a manually created 'layer mask' or, indeed, most other masks created in programs such as PhotoShop, etc., I know that the end result will be more of an artistic impression than reality would suggest.

Don't get me wrong - I 'like' the pictures - they provide nice 'eye candy' - but many, if not all, of them could be produced using the program that was used to create them, without EVER using a telescope or camera at all.

That is why I use PI. The end result of my efforts truly represent the photonic data I was able to capture - warts, blemishes, spots and all. Even the removal of residual 'hot-pixel' data is a stage that, in my mind, must exist right at the very END of the process. If I was not able to eliminate localised defects by some scientific process, then the blemish should remain right up to the end. Only then can I allow myself the indulgence of some 'clone stamp' action to help the image along.

I am also intelligent enough NOT to 'kid myself' - if I were to get the chance to photograph some sultry maiden then I know that my photographs ARE going to show her 'blemishes'. Not so the photographer working for some glossy fashion magazine (and their team of airbrushing artists). Whose photographs are the more 'realistic'? Whose images would bring more confidence to an aspiring photographer (assuming that the aspiration is not one of fame and fortune, but rather the aspiration of 'personal achievement') ?

No, as far as I am concerned, PI serves every aim of a true astrophotographer.

We should leave the fictional methods of other software to that other class of imager - the astroartist.

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 Stephane Murphy

  • Member
  • *
  • Posts: 63
Re: Layer in PI
« Reply #8 on: 2009 July 13 05:21:12 »
Thanks to all for sharing your point of view on this subject. Again I completly agree with all of you and most of the time this is also my philosophy. I say most of the time because I also like to create more artistic effect some time that have nothing todo with science at this point.

I just wanted to know if it was possible to mimic this in PI, more an intellectual curiosity.
Stephane
Stephane Murphy
CDK 12.5 Planewave Instrument
Paramount ME
SBIG STL11000M
SBIG ST-402 Guider
Astrodon MOAG
Astrodon Filters

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Layer in PI
« Reply #9 on: 2009 July 13 07:40:52 »
Hi Stephane,

You can use the CloneStamp tool to modify a mask by hand in PixInsight. Unfortunately, we still lack a suite of drawing tools that I want to implement this year, along with a complete layered composition system. When these tools are available, PixInsight will be a powerful image editing platform. My intention is to implement most of the current PixelMath features into a layered composition tool.

In the meanwhile, you can use CloneStamp to alter a luminance mask, for example; just clone bright pixels over the regions of interest. Remember that white mask pixels allow full action of any process, while black mask pixels protect original data. Of course, you can define a mask and then activate it as an inverted mask, so this is actually quite flexible.

Note that CloneStamp also allows you to copy pixels from one image to another. Ctrl+Click on a "source" image to define the cloner's origin, then click on the target image to copy pixels. You can use this technique to transfer pixels between images.

Of course, you can also use another application to define a mask by had; The Gimp is an obvious choice. I have used the wonderful Inkscape sometimes to create a drawing that can easily be exported as a PNG image, then the drawing can be used as a mask in PixInsight.

Hope this helps.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Stephane Murphy

  • Member
  • *
  • Posts: 63
Re: Layer in PI
« Reply #10 on: 2009 July 13 08:00:09 »
Thanks Juan, I understand your suggestions, very clear. After reading strong feedback I got from this group, I want to give a shot at color boost using the PI way and see what I can archive.

Now I am also a little puzzle on the direction of PI regarding support for layering features. Is by implemeting the layering feature will encougare the "wrong way" (Photoshop layer, lasso, etc. for example) of processing images?

Thaks again
Stephane
Stephane Murphy
CDK 12.5 Planewave Instrument
Paramount ME
SBIG STL11000M
SBIG ST-402 Guider
Astrodon MOAG
Astrodon Filters

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Layer in PI
« Reply #11 on: 2009 July 13 08:33:10 »
Quote
Is by implemeting the layering feature will encougare the "wrong way" (Photoshop layer, lasso, etc. for example) of processing images?

Not at all. The problem is definitely not with the tools available, but with how the tools are used. While there are some tools that are clearly prone to misuse (e.g. the Lasso), no tool by itself is inherently "bad". On the contrary, I think the more tools we have the better because we have more freedom. Of course, more freedom means more responsibility, just as in real life :)

Along with the fact that PixInsight can be used in a wide range of image processing scenarios (including purely artistic photography, why not), drawing tools are really necessary. For example, we need them to prepare images for publishing, or to generate annotated versions.

A layered composition tool can also be very useful. For example, you can build mosaics using layers, or compare images very easily by dragging a layer on top of an image. There is something that can only be done with layers and we lack: accumulate and merge several processed versions of the same image, using composition operators and masks. We definitely must have this possibility in PixInsight. And as you probably know, our philosophy is always to improve on existing things, so you can only expect us to redefine the concept of layered composition once we put our heads on this task 8)
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline mmirot

  • PixInsight Padawan
  • ****
  • Posts: 881
Re: Layer in PI
« Reply #12 on: 2009 July 13 08:51:52 »
Juan,

I basically agree with your imaging philosophy.
 However,  I think some exta tools such as a paint brush and layers should be included in PI.
So, I will play the devils advocate here.

"Astrophotography is documentary photography of astronomical subjects. To apply an image processing technique or algorithm selectively, pixel selections must be defined based on plausible criteria applied homogeneously to the whole image. Plausible selection criteria are based on properties of the objects (usually physical or morphological properties). Arbitrary manual selections, in general, are incompatible with this principle."

Nonsense!  We selectively inhance our images non globally with masks in PI now. If I use a mask that selects a galaxy core and excludes the background and perhaps the outer spiral arms then this is non homogenous process. I can then apply sharping or other enhancemnet to a portion of image.

"There are sound exceptions. For example, you can fix small artifacts or imperfections with the clone stamp or a similar tool, always with great care and knowledge of what you are removing. If in doubt, always prefer to leave the artifacts. "

Agreed. 
What do have you against the paint brush tool?
 It can be a lot easier to use than the clone stamp

Typical example : I produce a nice star mask. 
It is nearly perfect but a few structures are left , such as a touch of bright nebula. 
Also, perhaps a few of brightest stars were excluded because they have more structure do to diffraction spikes.

Now I can play all with the tools for ever and never isolate these structures. 
So, I have to have modify the mask. But how?
Now I can try the clone stamp tool but can be difficult to use. Perhaps not much saturated black or white in the mask to clone.  The simplist method would be to touch up the mask with a brush tool. Better yet have the mask layed in a mode that shows that I am painting the right part of the mask. 

"A big blooming left in place is more honest than a nice and perfect retouch, if the latter cannot be done without destroying significant data."

 It is in the original image but there is no significant data here since it is fully saturated.


"Most "techniques" based on the layer+brush paradigm are IMO incorrect to say the least. For example, I refer to those selective sharpening tricks that are so popular these days, unfortunately. They are absolutely wrong, IMO. You cannot decide arbitrarily (hand-wise, specifically) which parts of an object should be sharpened and which ones shouldn't."

I agree but these tools still have some good uses that don't include this.
No reason not support some of these tools just because someone processes with a different Philosophy than you and I.






Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: Layer in PI
« Reply #13 on: 2009 July 13 09:56:50 »
Hi all,

I think this is the point Juan is already making.

We cannot, and perhaps 'should not', exclude "artistic tools" - just because they do not sit well with a totally 'scientific' approach.

That said, personally, I still like to differentiate between 'art' and 'data', and find that I cannot justify an 'airbrush' approach to eliminate artifacts that could have been eliminated by other means (one example here would be the imager's choice of CCD, i.e. ABG or NABG, the latter usually presenting 'blooms' that need (?) to be eliminated by some artistic process, replacing missing data with the ARTIST'S concept of what might have been there in the first place. Wouldn't an alternative choice of camera have eliminated the need for this in the first place?)

One thing that I would hope would become more commonplace with PI users, is the presentation of their Process History - so that novices can see how much artistic licence was (often) necessary to create the stunning masterpiece that they might be looking at. The same applies with the 'RAW' data - perhaps we should all be as forthcoming with our 'starting point' as well - so that others can see what CAN be achieved in PI - often from an image that, to a novice, might initially look like a 'lost cause'.

At least, with access to the process history, a beginner can hopefully see where the 'clever tricks' have taken place, as well as where the 'magic wand' has had to be invoked.

Going back to the idea of 'homogeneous' and 'non-homogeneous' areas of selection, surely the selection of these areas by relying on pixel intensity and structure size - by relying on Histograms and Wavelets is more 'natural' than by 'painting' a selection area based on what 'seems right' to the user? Given that Ron Wodaski's excellent Zone Processing system does actually work, and given that PI has a more than adequate ability to split our source data into suitable 'zones', then all we need is the concept of 'layers' to allow us to rebuild our image from the individually processed zones.

And, given that 'airbrushing' (et al) does help PI fulfil ALL needs, then it just remains for users to implement their processing workflow in a manner most appropriate to them.

In fact, perhaps it brings with it a benefit - in that users of software like PS, can migrate their skills over to PI, and bring with them tricks that we can develop within PI. At the moment there are those who cannot migrate from PS, because 'airbrushing' and 'layers' are not currently available.

Poor Juan - you will NEVER get PI finished  :'(

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 Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Layer in PI
« Reply #14 on: 2009 July 13 11:33:18 »
Hi Max,

I must say your devil's advocacy is excellent :)

Quote
I think some exta tools such as a paint brush and layers should be included in PI.

Me too. See my previous post above. Having a paint brush available does not mean that we are going to paint our images. I explain this in my post.

Quote
Quote
"Astrophotography is documentary photography of astronomical subjects. To apply an image processing technique or algorithm selectively, pixel selections must be defined based on plausible criteria applied homogeneously to the whole image. Plausible selection criteria are based on properties of the objects (usually physical or morphological properties). Arbitrary manual selections, in general, are incompatible with this principle."

Nonsense!  We selectively inhance our images non globally with masks in PI now. If I use a mask that selects a galaxy core and excludes the background and perhaps the outer spiral arms then this is non homogenous process. I can then apply sharping or other enhancemnet to a portion of image.

Homogeneity here refers to selection criteria, not to the selection itself. Advanced processing techniques are all about building and using masks to apply transformations selectively. My paragraph refers to the "why" and the "how" of selections. You've put a good example. If your selection of the galaxy core:

- obeys to some physical properties of the object --for example, its brightness,

- or obeys to properties of the data --for example, the signal-to-noise ratio,

- and those properties are evaluated uniformly over the entire image (within the reasonable limits allowed by the tools available),

- and you don't try (purposely) to remove significant data and/or add nonexistent data (again, with the technical limits imposed by the tools and algorithms available),

- and you don't apply algorithms or techniques inappropriately, so that you only try to represent the nature of the objects (this has a lot to do with common sense and good taste),

then you are applying documentary criteria, and your procedures are honest and respectful with the data. Then I will see your image and will trust what you are communicating. The image will have the value of transmitting the essence and wildness of nature. This is the wonderful mixture of science, art and technology that astrophotography is about.

Oppositely, if you draw a lasso selection by hand to encompass what you arbitrarily decide, then you are painting and not doing astrophotography (IMO).

My point of view has more to do with the ethics of image processing and with what we want to achieve with astrophotography, both as a personal way of evolution and as a way to carry out divulgation of science and knowledge of nature.

Quote
Quote
"There are sound exceptions. For example, you can fix small artifacts or imperfections with the clone stamp or a similar tool, always with great care and knowledge of what you are removing. If in doubt, always prefer to leave the artifacts. "

Agreed. 
What do have you against the paint brush tool?
 It can be a lot easier to use than the clone stamp

Nothing at all. A paint brush tool can also be useful to carry out these tasks. However, I prefer the clone stamp or similar tools when it comes to act directly over the image. The reason is that the clone stamp can reproduce the distribution of noise in the vicinity of the modified areas, in a plausible and "natural" way.

Quote
Typical example : I produce a nice star mask. 
It is nearly perfect but a few structures are left , such as a touch of bright nebula. 
Also, perhaps a few of brightest stars were excluded because they have more structure do to diffraction spikes.

I see no major problems in using a paint brush in these particular cases, although in my opinion they are close to the limit of what I consider as acceptable. These applications are always complex and require a case-by-case analysis.

You get that touch of bright nebula or diffraction spike because the wavelet-based tools that you've used to build the mask, despite they are very accurate and powerful in their concept and implementation, are of course not perfect. Then you, with precise knowledge of these facts and limitations, apply a paint brush to remove it with great care. Close to the limit as I've said, but acceptable in this case.

I personally would prefer to fine tune the mask using purely algorithmic methods, until it can't be further improved reasonably. Only then I'd apply a paint brush to modify a mask by hand, as a last resort. And if by doing so I feel like crossing the limit, then I'd restart my processing strategy from scratch.

Quote
Better yet have the mask layed in a mode that shows that I am painting the right part of the mask.

Indeed. The new mask rendering system that comes with PI 1.5.5 fixes the current problems in this regard.

Quote
Quote
"A big blooming left in place is more honest than a nice and perfect retouch, if the latter cannot be done without destroying significant data."

It is in the original image but there is no significant data here since it is fully saturated.

Unfortunately, the things are usually not so easy; that's why good blooming removal tools are difficult to write. To remove a blooming artifact giving its surrounding areas a natural aspect, the tool must inevitably modify not only the blooming, but also some of its neighbor pixels, providing some "feathering" effect. This is what one does manually with the clone stamp. There is always the risk to damage some nearby image structures.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/