Author Topic: Region of Interest Mask?  (Read 8678 times)

Offline Rob Friefeld

  • Newcomer
  • Posts: 34
Region of Interest Mask?
« on: 2014 June 12 10:22:21 »
Is there a way to create a region-based mask which covers the whole image except for a hole? I think this would be useful for working intensively on a small area, such as a bloated star or galactic core. I can imagine doing this with PixelMath, but I can only imagine very cumbersome solutions.

Ideally, we would have a script to produce a "region of interest" mask from a Preview, perhaps shaped as a configurable ellipse within the Preview borders, with a control for smoothing the edge.

It wouldn't surprise me if this already exists or could be done trivially with current tools. Any suggestions?

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Region of Interest Mask?
« Reply #1 on: 2014 June 12 10:43:58 »
you can probably get there with RangeSelection by tweaking the smoothness and fuzziness parameters…

rob

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: Region of Interest Mask?
« Reply #2 on: 2014 June 12 10:46:46 »
You may try the Seed process, in my CMSegmentation module
http://www.astrophoto.cl/Research.html

Name: Seed
Description: More commonly known as the "Magic Wand". This algorithm plants a seed, and through local and global comparisons, determines a similar neighborhood.
Category: MaskGeneration

Hope this is what you whant.
Regards,

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

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Region of Interest Mask?
« Reply #3 on: 2014 June 12 11:23:28 »
Quote
Is there a way to create a region-based mask which covers the whole image except for a hole? I think this would be useful for working intensively on a small area, such as a bloated star or galactic core.

Why do you want to process a region of the image using an arbitrary manual selection?
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Rob Friefeld

  • Newcomer
  • Posts: 34
Re: Region of Interest Mask?
« Reply #4 on: 2014 June 13 17:39:02 »

Why do you want to process a region of the image using an arbitrary manual selection?

To avoid unintended consequences in the rest of the image--without having to be super-clever about creating a suitable mask.

Offline Rob Friefeld

  • Newcomer
  • Posts: 34
Re: Region of Interest Mask?
« Reply #5 on: 2014 June 13 17:44:53 »
you can probably get there with RangeSelection by tweaking the smoothness and fuzziness parameters…

rob
So far, that has been the best option, sometimes adding it to an inverted Star Mask for example.

Offline Rob Friefeld

  • Newcomer
  • Posts: 34
Re: Region of Interest Mask?
« Reply #6 on: 2014 June 15 13:46:07 »
You may try the Seed process, in my CMSegmentation module
http://www.astrophoto.cl/Research.html

I installed that module and it does exactly what I was thinking. Thank you, Carlos!

Offline Rob Friefeld

  • Newcomer
  • Posts: 34
Re: Region of Interest Mask?
« Reply #7 on: 2014 June 15 17:10:10 »
Specifically, what I was working on was my lo-res f/5 image of M81 and M82. I wanted work on M82 separately, just to do an additional HDMRT without messing up M81. The seed mask seems an easy way to do this.
Before:

After:

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Region of Interest Mask?
« Reply #8 on: 2014 June 16 04:32:18 »
Hi Rob,

See my answer to a similar question in a post from January. After processing the image selectively that way, it is no longer a valid astrophotograph in my opinion. This kind of arbitrary selective processing does not fit in the concept of astrophotography that we are striving for with PixInsight.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: Region of Interest Mask?
« Reply #9 on: 2014 June 16 10:20:23 »
Hi Rob,

Please try to apply a second HDRMT process with fewer layers (3 IMO) and activating the "Lightness maask" option in the tool. This will enhance the visibility of the inner structures in *both* galaxies. Let me know if it works.


Best regards,
Vicent.

PS: BTW, I did this photo seven years ago and I always processed the image as a whole, without any manual / arbitrary mask. So it's actually possible to get good results at the same time in both galaxies.

Offline Rob Friefeld

  • Newcomer
  • Posts: 34
Re: Region of Interest Mask?
« Reply #10 on: 2014 June 16 15:39:23 »
Hi Rob,

See my answer to a similar question in a post from January. After processing the image selectively that way, it is no longer a valid astrophotograph in my opinion. This kind of arbitrary selective processing does not fit in the concept of astrophotography that we are striving for with PixInsight.

Hi Juan,

At first, your idea of a "valid astrophotograph" sounds a bit harsh, since I am just producing a pretty picture here. On reflection, I think of those composite images of, say, the Andromeda Galaxy rising behind a perfect bristlecone pine tree on a ridge, which present something which simply does not exist and which are of no interest to me, no matter how good they look. The better I understand the aim of PixInsight, the better I will be able to use it. So thank you for your guidance.

Offline Rob Friefeld

  • Newcomer
  • Posts: 34
Re: Region of Interest Mask?
« Reply #11 on: 2014 June 16 15:42:16 »
Hi Vicent,

I hadn't tried HDMRT with as few as 3 layers, but I think it produced a very acceptable result on my image. Just a little lightness boost afterward...


Offline vicent_peris

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 988
    • http://www.astrofoto.es/
Re: Region of Interest Mask?
« Reply #12 on: 2014 June 16 23:49:19 »
Hi Rob,

Good result, congratulations! This is a difficult photo because these are two very different galaxies. One is small and concentrated while the other is very big and more diffuse. This means that, if you use multiscale tools, some parameters work good for one while you need different parameters for an optimal result with the other galaxy. Finding the right equilibrium is usually the lesson to learn when photographing both objects. Try to apply the second HDRMT process with the attached mask.


Best regards,
Vicent.


Offline Rob Friefeld

  • Newcomer
  • Posts: 34
Re: Region of Interest Mask?
« Reply #13 on: 2014 June 17 10:27:44 »
Hi Vicent,

I had missed the earlier thread on this issue referenced by Juan. Apparently, I am not the first to be tempted to Photoshop-style solutions to the problem. Your mask is much stronger on M81 than on M82, which is what is needed. I think I will learn a lot by reverse engineering it! Even so, I am currently getting the best result with HDMRT's built in lightness mask with a manual midtones setting of 0.1. This is giving me the best M81. More experimentation to be done... I really appreciate your help.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Region of Interest Mask?
« Reply #14 on: 2014 June 18 01:40:06 »
Hi Rob,

At first, your idea of a "valid astrophotograph" sounds a bit harsh, since I am just producing a pretty picture here.

I am sorry for the harshness, but I haven't other way to communicate the importance of staying far from these arbitrary manipulation practices. As I understand it, there are no "pretty pictures" in astrophotography. Our concept of astrophotography is all about striving for excellence; about trying to achieve the best results with the resources available and, above all, about maximizing information understanding and respecting the data and the nature of the objects represented.

Quote
On reflection, I think of those composite images of, say, the Andromeda Galaxy rising behind a perfect bristlecone pine tree on a ridge, which present something which simply does not exist and which are of no interest to me, no matter how good they look.

I also don't like those compositions; they are just boring for me. However, note that the artificiality of these composite images is so evident that they are honest in the sense that nobody (who is minimally informed) could ever believe them. In contrast, arbitrary manual manipulations in astrophotography can be very difficult to nearly impossible to detect. This makes these practices dangerous for the present and future of this discipline.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/