Author Topic: An explanation of the 'structure elements' in MT please  (Read 3458 times)

Offline DaveS

  • PixInsight Addict
  • ***
  • Posts: 115
    • Dave's Astronomy Pages
An explanation of the 'structure elements' in MT please
« on: 2010 October 04 05:58:29 »
With the MT process there are a wide variety of size options to choose from, with each size increase inlcluding more elements.

I am assuming that the 'elements' are pixels. However, for example, with size 7, 49 elements are included, whereas the star circular option) comprises only seven of these 49 elements.

What is the relationship between the total number of elements included, and those apparently chosen for the star by the software?

Dave
8" LX200ACF
William Optics FLT110
NEQ6 Mount
SXVF-H9
SXVR-16
SX Lodestar
DMK21AU04
Baader LRGB and NB filters
DiY Observatory
http://www.progressiveastroimaging.com/davesastronomy/

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: An explanation of the 'structure elements' in MT please
« Reply #1 on: 2010 October 04 06:58:05 »
To understand what the structure element means, just imagine what the MT is doing on a single pixel, anyone.

So, the algorithm is on the pixel (i,j). Now, it places the struc. elem. "over" that pixel, centered. It creates a new array, a vector, to store the pixel values that will be used. Now, you look through the struct. If it has a 1 value anywhere, you read the value under it and copy it to the array. Do the same for every pixel in the struct. At the end, you have the collection of values, and you may perform the statistical operations you selected (minimum, maximum, etc.)

To summarize, the structure element defines the neighbourhood of every pixel.
0 1 0
1 1 1
0 1 0
 the 3x3 cross, is telling the algorithm to look a the current pixel, and all 4 pixels that are contiguous to it.
0 1 0
1 0 1
0 1 0
 this is almost the same, but you'll ignore the value of the current pixel.

I'll try to create a few examples of structures and different shapes tomorrow, and the results on simple images.
Regards,

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

Offline DaveS

  • PixInsight Addict
  • ***
  • Posts: 115
    • Dave's Astronomy Pages
Re: An explanation of the 'structure elements' in MT please
« Reply #2 on: 2010 October 04 12:16:21 »
I can follow that logic Carlos, and a visible example would add to my understanding of the effect.

Many thanks  :)

Dave
8" LX200ACF
William Optics FLT110
NEQ6 Mount
SXVF-H9
SXVR-16
SX Lodestar
DMK21AU04
Baader LRGB and NB filters
DiY Observatory
http://www.progressiveastroimaging.com/davesastronomy/

Offline Carlos Milovic

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2172
  • Join the dark side... we have cookies
    • http://www.astrophoto.cl
Re: An explanation of the 'structure elements' in MT please
« Reply #3 on: 2010 October 05 09:24:57 »
Hi Dave (and all)

I attached a image with some sample figures, to play with the morphological filters. Just open it with PI, create a full size preview, and try different sizes and operators (I suggest min, max, opening and closing).

You may try some of the following structures:

0 1 0
1 1 1
0 1 0

1 1 1
1 1 1
1 1 1

0 0 0
1 1 1
0 0 0

0 1 0
0 1 0
0 1 0

0 0 1
0 1 0
1 0 0

and so on... :) Then change to 5x5 filters and do the same.
Regards,

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

Offline DaveS

  • PixInsight Addict
  • ***
  • Posts: 115
    • Dave's Astronomy Pages
Re: An explanation of the 'structure elements' in MT please
« Reply #4 on: 2010 October 05 11:47:39 »
Thanks Carlos, you are a gentleman  :)

Dave
8" LX200ACF
William Optics FLT110
NEQ6 Mount
SXVF-H9
SXVR-16
SX Lodestar
DMK21AU04
Baader LRGB and NB filters
DiY Observatory
http://www.progressiveastroimaging.com/davesastronomy/