• Nem Talált Eredményt

2.4 Detection of stars

2.4.1 Image partitioning

Pixel links and equivalence classes

The first step of the detection algorithm is to define local pixel connections with the following properties. An ordinary pixel has 8 neighbors, and the number of neighbors is less only if the pixel is a boundary pixel (in this case there can be 5 or 3 neighbors) or if any of the neighboring pixels are excluded due to a mask of bad, hot or saturated pixel. Including the examined pixel with the coordinates of x and y, we select the one with the largest intensity from this set. Let us denote the coordinates of this pixel bynx(x, y) and ny(x, y).

For a shorter notation, we introduce x = (x, y) and n(x) = [nx(x, y), ny(x, y)]. Obviously,

|nx−x| ≤1 and|ny−y| ≤1, i.e. kn(x)−xk ≤1, wherekxk= max(|x|,|y|), the maximal norm. The derivation of this set of n = (nx, ny) points requires O(N) time. Second, we definem(x) = [mx(x, y), my(x, y)] for a given pixel by

m(x) =

( x if n(x) =x,

m(n(x)) otherwise. (2.8)

Note that this definition of m(x) is only a functional of the relation x → n(x): there is no need for the knowledge of the underlying neighboring and the partial ordering between pixels. This definition results a set of finite pixel links x, n(x), n(n(x)) ≡n2(x), . . . where the length L of this link is the smallest value where nL(x) = nL+1(x) = m(x). Third, we define two pixels, say, x1 = (x1, y1) and x2 = (x2, y2) to be equivalent if m(x1) = m(x2).

This equivalence relation partitions the image into disjoint sets, equivalence classes. In other words, each equivalence contains links with the same endpoint. Let us denote these classes by Ci.

Each class is represented by the appropriate mi ≡ m(Ci) pixel, that is, by definition, a local maximum. Each equivalence class can be considered as a possible star, or a part of a star if the image was defocused or smeared. In Fig. 2.8, one can see stamps from a typical image obtained by one of the HATNet telescopes and the derived pixel links and the respective equivalence classes. In the figure, the mapping x → n(x) is represented by the n(x)−xvectors, originating from the pixel x.

6@I @@ @I - - 6@@I 6@I @ 6 - - 6@I@ 6 6@I @@@I -

-Figure 2.8: Left panel: a stamp of 128×128 pixels from a typical crowded HAT image, covering approximately 0.5×0.5 area on the sky. Middle panel: the central are of the stamp shown in the left panel, covering approximately an area of 7×7. This smaller stamp has a size of 32×32 pixels. Right panel: the links and equivalence classes generated from the smaller stamp.

Note that even the faintest stars are detected and the belonging pixels form separated partitions (for an example see the stars encircled on the middle panel).

Background

Let us define the number of possible neighbors of a given pixel x by K0(x). As it was described above, in average it is 8, for boundary pixels it is 5 or 3, and it can be less if there are surrounding masked ones. The quantity R(x) is defined by the cardinality of the set {x ∈Image : n(x) = x}. Let us also define K(x) =K0(x) + 1 andG(x) as the cardinality of

{x ∈Image : kx −xk≤ 1 and m(x) =m(x)}, (2.9) which is the number of surrounding pixels in the same class. For a given equivalence class C we can define its background pixels by

B(C) ={x ∈C : R(x) = 0 and G(x)< K(x)}. (2.10) This set of pixels are the boundary starting points of pixel links in this equivalence class.

Note that this definition may not reflect the true background if there are merging stars in the vicinity. In such case these pixels are saddle points between two or more stars. However, the median of the pixel intensities in the setB(C) is a good assumption of the local background for the star candidate C, even for highly crowded images. For simplicity, let us denote the background of C by

b(C)≡ hB(C)i. (2.11)

Collection of subsets

The above definitions of equivalence classes and background pixels are quite robust ones, but still there are some demands for certain cases. First, in extremely crowded fields, the number of background pixels can be too small for a local background assumption. Second, the defocused or smeared stars may consist of several separate local maxima that yield distinct

2.4. DETECTION OF STARS

equivalence classes instead of one cohesive set of pixels. To overcome these problems, we make some other definitions. An equivalence class C is degenerated if

R(m(C))< K(m(C)). (2.12)

In other words, degenerated partitions have local maxima on their boundary. For such a partition, one can define the two sets of pixels:

J1(C) ={x ∈Image : kx−m(C)k= 1}, (2.13) and

J2(C) ={x ∈J1(C) : m(x)6=m(C)}. (2.14) Let us denote the location of the maximum of a given setJ by

M(J) ={x : ∀x ∈J I(x)≤I(x),} (2.15) where I(x) is the intensity of the pixel x. Using the above definitions, we can coalesce this degenerated partition C with one or more other partitions by two ways. Obviously, n(m(C)) =m(C), so we re-define n(m(C)) by either

n1(m(C)) :=M(J1(C)) (2.16)

if and only ifJ1(C) is not the empty setand m[M(J1(C))]6=m(C) or

n2(m(C)) :=M(J2(C)) (2.17)

if and only ifJ2(C) is not the empty set. Otherwise we do not affectn(m(C)). We note that the latter expansion may result in a larger amount of coalescing sets, i.e. in the former case it may happen that the maximum of the neighboring pixels fall into the same class while in the latter case we definitely excluded such cases (see the definition ofJ2(C)).

Prominence

In case of highly defocused star images, the PSF can be donut-shaped and a single star may have separated distinct (and not degenerated) maxima. To coalesce such equivalence classes, we define the discrete prominence, with almost the same properties as it is known from topography. The prominence of a mountain peak in topography (a.k.a. topographic prominence or autonomous height) is defined as follows. For every path connecting the peak to higher terrain, find the lowest point on that path, that is at a saddle point. The key saddle is defined as the highest of these saddles, along all connecting paths. Then the prominence is the difference between the elevation of the peak and the elevation of the key saddle. This definition cannot be directly applied to our discrete case, since the number of

- 6@@I 6@I@ 6@I @ - 6 - @@I @@I - 6

Figure 2.9: Left panel: a stamp of a star, covering 32×32 pixels from a typical blurred KeplerCam image. Middle panel: the links and equivalence classes generated from this stamp, using the basic algorithm without any coalescing. Right panel: the links and equivalence classes generated from the stamp, when the partitions with zero prominence are joined to their neighboring partitions.

possible connecting paths between two maxima is an exponential function of the number of the pixels, i.e. we cannot get an O(N) algorithm. Thus, we use the following definition for the key saddle s of an equivalence class C:

s(C) = {x∈C : G(x)< K(x) and (2.18)

∀x ∈C G(x)< K(x)⇒I(x)≤I(x)}. Thus, the prominence of this class is going to be

p(C) =I(m(C))−I(s(C)). (2.19)

Note that p(C) is always non-negative and if C is degenerated, p(C) is zero. The related classesR(C) of C are defined as

R(C) ={C ∈Classes : ∃x ∈C kx−s(C)k= 1} (2.20) We define the set of parent classes of C as the set

P(C) = {C ∈ R(C) : ∀ C′′∈ R(C) (2.21) m(C′′)≤m(C) and m(C)<m(C′′)}

The set of parent classes P(C) can be empty if the class C is the most prominent one. If at least one parent class exists, the relative prominence of C is defined as

r(C) = p(C)

I[m(P(C))]− hB(P(C))i, (2.22) and, by definition, it is always between 0 and 1. Since the classes with low relative promi-nences are most likely parts of a larger object that is dominated by the parent class (or, moreover, by the parent of the parent class and so on), we connect these low-prominence

2.4. DETECTION OF STARS

classes to their parents below a critical relative prominence r0. Namely, we alter n(s(C)) to one point of P(C), say, x ∈ P(C) where ks(C)−xk= 1. Note that this algorithm for r0 = 0 yields the same collection of partitions as the usage of the definitionJ2(C) in the end of the previous subsection only for degenerated partitions.