Quantifying the Consistency and Characterizing the Confidence of Coronal Holes Detected by Active Contours Without Edges (ACWE)

Coronal Holes (CHs) are regions of open magnetic-field lines, resulting in high-speed solar wind. Accurate detection of CHs is vital for space-weather prediction. This paper presents an intramethod ensemble for coronal-hole detection based on the Active Contours Without Edges (ACWE) segmentation algorithm. The purpose of this ensemble is to develop a confidence map that defines, for all ondisk regions of a solar extreme ultraviolet (EUV) image, the likelihood that each region belongs to a CH based on that region’s proximity to, and homogeneity with, the core of identified CH regions. By relying on region homogeneity, and not intensity (which can vary due to various factors, including line-of-sight changes and stray light from nearby bright regions), to define the final confidence of any given region, this ensemble is able to provide robust, consistent delineations of the CH regions. Using the metrics of global consistency error (GCE), local consistency error (LCE), intersection over union (IOU), and the structural similarity index measure (SSIM), the method is shown to be robust to different spatial resolutions maintaining a median IOU \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$>0.75$\end{document}>0.75 and minimum SSIM \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$>0.93$\end{document}>0.93 even when the segmentation process was performed on an EUV image decimated from \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$4096\times 4096$\end{document}4096×4096 pixels down to \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$512\times 512$\end{document}512×512 pixels. Furthermore, using the same metrics, the method is shown to be robust across short timescales, producing segmentation with a mean IOU of 0.826 from EUV images taken at a 1-h cadence, and showing a smooth decay in similarity across all metrics as a function of time, indicating self-consistent segmentations even when corrections for exposure time have not been applied to the data. Finally, the accuracy of the segmentations and confidence maps are validated by considering the skewness (i.e., unipolarity) of the underlying magnetic field.

The remainder of the paper is organized as follows.Section 2 provides an overview of the ACWE algorithm and the adaptation of ACWE to CH detection.Section 3 describes the dataset and provides an overview of the metrics used for evaluation of the segmentations produced by ACWE.Section 4 characterizes the invariability of CH segmentations generated by ACWE as a function of spatial resolution, comparing the effects of performing ACWE on images decimated by 8× in each dimension, which is the default from Boucheron et al. [2016], to the effects of performing ACWE at higher resolutions.Section 4 also characterizes the invariability of CH segmentations generated by ACWE across short time scales, where CH evolution is expected to be minimal, to determine the consistency in identifying and segmenting CH regions.The development of a confidence map via an intramethod ensemble is outlined in Section 5.This method is then evaluated in Section 6 by comparing the ensemble to underlying magnetic field as expressed in Helioseismic and Magnetic Imager (HMI) magnetograms [Scherrer et al., 2012].Section 7 provides a conclusion and discusses future work.Appendix A contains an additional study of the performance of ACWE as a function of different intensity resolutions and dynamic ranges, comparing the resulting segmentations to the corresponding default segmentation generated from the EUV at the original dynamic range.These results are included as they indicate that preserving the dynamic range between on-disk features is crucial for accurate CH detection.

General Implementation
Developed by Chan and Vese [2001], Active Contours without Edges (ACWE) generates a segmentation by evolving an initial contour C, which separates an image I into two regions: foreground (the region inside the contour, or C i ), and background (the region outside the contour, or C o ).This evolution is performed in an iterative fashion to minimize the energy functional where each term within the energy functional attempts to minimize a "force" acting on C. The term µℓ(C) seeks to minimize the length of the contour ℓ(C); it is weighted by user-defined weight µ.The term λ i Ci |I(x, y) − m i | 2 dxdy seeks to maximize the homogeneity of the foreground by comparing the region of I inside of C to the mean intensity of that region, m i ; it is weighted by user-defined weight λ i .The final term, λ o Co |I(x, y) − m o | 2 dxdy, seeks to maximize the homogeneity of the background by comparing the region of I outside of C to the mean intensity of the background, m o ; it is weighted by user-defined weight λ o .

Segmenting Coronal Holes via ACWE
In adapting ACWE for CH segmentation, Boucheron et al. [2016] developed a seeding algorithm for defining the initial contour, developed methods for constraining ACWE to on-disk areas, defined a set of stopping criteria to account for finite precision due to input image resolution, and identified an optimal range of parameters for CH segmentation.The segmentation method outlined by Boucheron et al. [2016] is preceded by the decimation of the spatial resolution of the EUV images by 8× and the correction for limb brightening outlined in Verbeeck et al. [2014].To create the initial contour, Boucheron et al. [2016] utilize a circular mask on the decimated image to identify and extract a 100-bin intensity histogram of the on-disk region of the image.The mean intensity of the quiet Sun (QS) (low-activity) region, m QS , is estimated from the histogram by calculating the mean intensity of the bin with the most pixels.Since CHs are expected to be darker than QS, the initial seed is defined as all pixels with an intensity ≤ α × m QS where α is a user-defined parameter < 1.
When performing ACWE Boucheron et al. [2016] constrain evolution to on-disk areas by performing ACWE on a copy of the decimated EUV image where all off-disk areas are set to the mean intensity of the non-CH region.ACWE is then performed with µ = 0, which causes ACWE to ignore the length constraint, and the remaining parameters, λ i and λ o , are co-defined through a ratio λ i /λ o , which describes how much more homogeneous CHs are expected to be compared to the aggregate of all remaining on-disk features.To account for cases where the boundary between foreground and background lies within a pixel instead of at a pixel boundary, which will result in pixels alternating between foreground and background without converging, evolution of the contour is halted when the only evolution that occurs between iterations consists of pixels along the boundary that alternate between foreground and background.Boucheron et al. [2016] utilize the ratio λ i /λ o = 50, with a length constraint µ = 0, and an initial seeding parameter α = 0.3, for method validation.
The work presented in this paper uses the ACWE CH segmentation algorithm as described in Boucheron et al. [2016] and expands on that work in two ways.First, the robustness of the ACWE CH algorithm to changes in spatial resolution is characterized in Section 4.1 and to small temporal changes is characterized in Section 4.2.Second, a confidence map is generated via an intraensemble method to correlate region homogeneity to likelihood a region belongs to a CH.The confidence maps are validated by considering the unipolarity (skewness) of the underlying magnetic field.An Appendix is also provided which explores the robustness of ACWE CH algorithm to intensity resolution.The GitHub repository at https://github.com/DuckDuckPig/CH-ACWEcontains code to download the dataset used in this paper, the base ACWE segmentation code, and code to replicate all experiments described herein.

Dataset
The dataset used in this work consists of 2381 observations taken from Carrington rotations (CRs) 2099, 2100, 2101 and 2133.To produce this dataset, image groups consisting of AIA Level 1 EUV images at 94, 131, 171, 193, 211, 304, and 335 Å as well as the corresponding 720s HMI magnetogram were collected at a one hour cadence from the aforementioned CRs using the drms library [Glogowski et al., 2019].This dataset was then reduced by eliminating image groups where at least one image did not have a QUALITY key of 0, resulting in the 2381 observations.It should be noted that one gap of 2 days and 2 hours exists in CR 2099, and gaps of ≤ 7 hours exist in the remaining CRs.Prior to performing ACWE, the Level 1 EUV images are converted into level 1.5 data products using aiapy.calibrate.update_pointing as described in Barnes et al. [2020] to ensure the header is correct and aiapy.calibrate.register to align the image to solar north and center the image so that solar center lines up with image center.ACWE is performed on the 193 Å observation only.The remaining observations were collected to facilitate future work with this dataset.
Each experiment is initially performed on CRs 2099-2101, which contain data from 13 July -3 October 2010, and have a total of 1763 observations.The process is then repeated on CR 2133, which contains 618 observations from 25 January -22 February 2013, in order to verify that the behavior of the algorithm is consistent across different time frames and points within the solar cycle.

Metrics
Across all experiments the consistency of ACWE is determined by comparing segmentations to each other using the following four metrics: intersection over union (IOU), structural similarity index measure (SSIM), global consistency error (GCE), and local consistency error (LCE).

Intersection Over Union
The Jacard Index or Intersection Over Union (IOU) is defined as the area of agreement normalized by the total area.This metric was first introduced in Jaccard [1912].For binary segmentations (Section 4) the IOU for two segmentations S 1 and S 2 will be defined as where S 1 ∩ S 2 is the intersection of the two segmentations, S 1 ∪ S 2 is the union of the two segmentations, and | • | is the cardinality of the resulting region.When comparing maps that report probability or likelihood, such as the confidence maps (Section 5), the weighted IOU (wIOU) for the maps P 1 and P 2 will be determined by comparing the value (confidence) of each each pixel i in P 1 to the corresponding pixel in P 2 .It is defined as where the summations over i denote a summation over all pixels contained in P 1 ∪ P 2 .When two segmentations are compared using IOU or wIOU, the resulting score will be bound to a range of [0,1] where 1 indicates that the two segmentations are identical.IOU and wIOU are sensitive to changes in orientation, placement, shape and scale.

Structural Similarity Index
Wang et al. [2004] define the Structural SIMilarity index measure (SSIM) for two images x and y as where µ x is the mean intensity of x, µ y is the mean intensity of y, σ x is the standard deviation of x, σ y is the standard deviation of y, σ xy is the covariance between x and y, and C 1 and C 2 are small constants that prevent instability when (µ 2 x + µ 2 y ) or (σ 2 x + σ 2 y ) are close to zero.SSIM provides an evaluation of the quality of the structure within a pair of images or segmentations in a manner that is considered more consistent with the human visual system [Wang et al., 2004].In order to match the implementation of Wang et al. [2004], where K 1 = 0.01, K 2 = 0.03, and L is the dynamic range of the segmentations.SSIM is bound to the range (−1, 1] [Nilsson and Akenine-Möller, 2020], where 1 indicates that the two segmentations are identical, 0 indicates no similarity, and -1 indicates anti-correlation.SSIM is most sensitive to the structure present within the images or segmentations [Wang et al., 2004].

Global and Local Constancy Error
Global Consistency Error (GCE) and Local Consistency Error (LCE) are introduced in Martin et al. [2001] as methods for evaluating segmentation accuracy while accounting for the variability that exists within human-segmented data.In particular, Martin et al. [2001] note that, in human-generated segmentations, it is possible that one segmentation may be a refinement of another, either by further subdividing a region of interest or by providing finer granularity at image boundaries.To account for this, both GCE and LCE rely on an intermediate metric called local error E, which is evaluated on a per-pixel basis.For pixel i present in segmentations S 1 and S 2 , local error is defined as where − denotes the set difference, R(S 1 , i) is the region in S 1 which contains pixel i, R(S 2 , i) is the region in S 2 which contains pixel i, and | • | is the cardinality of the region.This metric returns a value of zero any time R(S 1 , i) is fully contained in R(S 2 , i) to account for subdivision of regions, and a small value when only a few pixels of R(S 1 , i) are not contained in R(S 2 , i), such as when the region R(S 1 , i) is a refinement of R(S 2 , i).
For a segmentation of an image with n pixels, GCE is defined as which forces GCE to be most sensitive to cases where one segmentation is a refinement of another.LCE is defined as which allows LCE to be sensitive to cases where some portions of each segmentation are refinements of the other.For this reason, LCE is a less strict error measure than GCE.Both GCE and LCE are bound to a range of [0,1] with 0 indicating no error.

Sensitivity of the ACWE Algorithm
Prior to developing an intramethod ensemble for CH detection, the consistency of ACWE when applied to CH segmentation is first evaluated.These experiments characterize the expected degradation in the accuracy of CH segmentations when reducing the spatial resolution of the input image to optimize the process of generating the segmentation and the consistency of segmentations across short timescales where CH evolution is expected to be minimal.

Spatial Resolution Effects
ACWE is an iterative process, requiring successive manipulations of the contour that defines a region of interest to minimize the energy functional (Equation ( 1)).To help reduce the computation time needed to calculate the energy functional in each iteration, and, by extension, reduce the computation time needed to generate a contour map, ACWE can be performed on a copy of the target image which has a reduced spatial resolution.Boucheron et al. [2016] demonstrate that this process may be viable for improving computational efficiency.In particular, Boucheron et al.
[2016] note that segmentations remain qualitatively similar across spatial resolutions, and that the primary difference between the reduced resolution segmentations and the full-scale segmentations is the absence of smaller regions that, due to pixel removal and lowpass filtering, are no longer dark enough to be included in the initial seed.
Here, a study of the effects of down-sampling the original AIA 193 Å image on final segmentation was performed by generating ACWE segmentations for each image within the dataset at original resolution, one-half scale (decimation by 2× in each dimension), one-quarter scale (decimation by 4×), and one-eighth scale (decimation by 8×).In each instance correction for limb brightening, as implemented by Verbeeck et al. [2014], was applied to the image after decimation.
For the initial seeding of the algorithm, the seeding process was performed through analysis of the down-sampled image, with threshold α of 0.3.Across all spatial resolutions, evolution of the segmentation was performed using a homogeneity ratio λ i /λ o of 50 and a length constraint µ of 0. The segmentations generated from the decimated images were then upscaled to match the resolution of the segmentation generated from the original image and directly compared.
The effects that reducing spatial resolution had on the final segmentation for CRs 2099 through 2101 are presented in Figure 1. Figure 2 presents the effects for CR 2133.Both figures show the resulting similarity after applying bi-linear interpolation to upscale the image and converting the result back to a binary mask by setting all values > 0.5 to 1 and setting all values ≤ 0.5 to 0. The results in Figure 1 and Figure 2 suggest that general structures in the segmentations are preserved, even when decimated by 8×, resulting in a high IOU and SSIM, and low GCE and LCE in both time frames.It should be noted that this process was repeated with up scaling performed using nearest-neighbor, bi-quadratic, bi-cubic, bi-quartic, and bi-quintic interpolation.Figure 3 shows the IOU between the one-eighth scale segmentations, upscaled using each of the described interpolation methods, and the corresponding full scale segmentation.These results indicate that interpolation method has minimal effect on the similarity of final segmentation.
Visual examination of ACWE segmentations revealed three primary sources of discrepancy between segmentations performed at the original resolution and segmentations performed on decimated images.First, segmentations generated from decimated images sometimes excluded smaller CH regions.This is consistent with the observations of Boucheron et al. [2016].Second, spurious bright regions within larger CHs may be excluded or included at different spatial resolutions.Finally, larger CH regions show a gradual reduction in the granularity of the segmentation boundary as spatial resolution decreases.All three effects can be seen in Figure 4.

Effects Across Small Temporal Changes
In order to gauge the consistency of ACWE segmentations, a study of the similarity of segmentations across small time spans was performed on all four CRs.This process was performed using the the one-eighth scale segmentations as described in Section 4.1 in order to characterize the behavior of the default implementation of ACWE.These images were upscaled to the original resolution using bi-linear interpolation to allow for the reprojection process.For each segmentation in the dataset, the preceding twelve hours of segmentations and the succeeding twelve hours of segmentations were reprojected to account for the rotation of the Sun and then compared.The reprojection was achieved using the sunpy.coordinatestools Helioprojective, RotatedSunFrame, and transform_with_sun_center described in The SunPy Community et al. [2020] to define the reprojection and reproject.reproject_interpdescribed in Robitaille et al. [2020] to perform the reprojection.
Segmentation similarity as a function of the difference in time for CRs 2099, 2100, and 2101 is presented in Figure 5. Segmentation similarity for CR 2133 is presented in Figure 6.In both time frames, segmentation similarity as measured by all metrics decays smoothly as a function of time, with the most dramatic change in similarity occurring within    the first hour.In addition to this, a high SSIM and low GCE and LCE are maintained, even with 12 hours difference between segmentations.These results demonstrate the robustness of the ACWE algorithm across time, indicating that the differences in segmentation are minimal across time scales shorter than those expected for CH evolution.

Confidence Map Generation from an ACWE Ensemble
By using region homogeneity to define CHs within a Solar EUV image, ACWE provides the ability to account for intensity variations within a coronal hole region, allowing for a more robust definition of the CHs.This method, however, is affected by all on-disk features, which control the relative homogeneity of the collective "background" or non-CH region.
Boucheron et al. [2016] suggest that homogeneity ratios λ i /λ o ≥ 10 result in "a reasonable segmentation of the CHs and that the segmentation varies very slowly with respect to λ i /λ o ," such as the results seen in Figure 7.While this holds true for the majority of images within the dataset, two other behaviors were noted in a minority of cases.The first behavior, seen in Figure 8, consists of examples where segmentation area decreases drastically as the homogeneity ratio increases for lower homogeneity ratios.The second behavior, seen in Figure 9

Development of Confidence Maps
The effects of homogeneity on final segmentation were studied by generating multiple ACWE segmentations at oneeighth spatial resolution for each EUV image.Following the procedure outlined in Section 4.1, correction for limb brightening and seeding with α = 0.3 were performed after resizing the EUV image.Each segmentation was generated independently, starting at the initial seed, and evolving to one λ i /λ o ratio in the range [10, 100] (with µ = 0 in all cases).This study found that for any collection of segmentations generated from the same EUV image (hereafter referred to as a segmentation group), including those which show a change of target at lower homogeneity ratios, the majority of segmentations converge to a region of high homogeneity surrounding the initial seed.This can be seen in Figure 10, which shows a normalized summation of all segmentations at homogeneity ratios λ i /λ o in the range [10, 100] for the observations in Figure 7, Figure 8, and Figure 9.In addition to this, for change of target cases, aggregating only those segmentations with a homogeneity ratio above the change of target point, results in a behavior that matches the rest of the dataset.This can been seen in Figure 11, which was generated from the same segmentation group as Figure 10c, by eliminating all segmentations with a λ i /λ o ≤ 35, the point where the darkest pixel in the initial seed was no longer present in the final segmentation.
Prior to change of target (if it occurs), regions of higher homogeneity are contained within the regions of lower homogeneity.For this reason, the aggregated maps generated from an ensemble of homogeneity ratios above the change of target point (i.e., Figure 10a, Figure 10b, and Figure 11) can be interpreted as confidence maps wherein the confidence that a region belongs to a CH is directly correlated with the similarity of that region to the core region of that CH.The confidence maps herein developed are generated in a two-step process.First, the segmentation group, which contains segmentations for all λ i /λ o ratios in the range [10, 100], is created.Second, the confidence map is generated from the ensemble by summing the individual maps within the segmentation group and normalizing the result by the total number of maps within that group.

Optimization of Ensemble Generation
The generation of segmentation groups can be made more computationally efficient by relying on the deterministic nature of ACWE evolution.In particular, for a given initial seed and input image, the evolution of ACWE will follow a set progression.The stopping criteria, represented by the λ i /λ o ratios, identify points along this evolution where the user wishes to record the results of this process.To generate the segmentation group using this optimized approach, the 193 Å image is resized to one-eighth resolution, correction for limb brightening is applied and the initial seed (using α = 0.3) is generated.ACWE is then used to evolve the initial seed to the largest λ i /λ o ratio and the resulting segmentation is saved.Evolution then continues, from the current segmentation, targeting the next largest λ i /λ o ratio.This is repeated, recording the result when each λ i /λ o ratio is reached, until a segmentation exists for each λ i /λ o ratio in the range [10,100].
Figure 12 shows confidence maps generated from independently produced segmentations (center) and confidence maps generated from successive evolutions of ACWE (right) for the examples in Figure 10.These results show that maps generated via both methods are nearly identical in behavior, including in the case of change of target (see Figure 12c).It should be noted that, for all images within the dataset, the SSIM between confidence maps generated from independently produced segmentations and confidence maps generated from a successive evolutions of ACWE was 1.
In addition, a comparison of maps generated via the two methods yielded high wIOU, low GCE, and low LCE.The mean and standard deviation for each metric, organized by Carrington Rotation, are presented in Table 1.
The differences between the independent and successive evolution confidence map as measured by wIOU, GCE, and LCE (see Table 1) can be explained by the fact that ACWE cannot define a boundary with sub-pixel accuracy.When the true boundary between foreground and background for a given λ i /λ o ratio lies within a pixel instead of on a pixel Table 1: Comparison of confidence map methods, organized by Carrington Rotation CR wIOU SSIM GCE LCE 2099 0.9826 ± 0.0207 1.0000 0.0096 ± 0.0088 0.0079 ± 0.0065 2100 0.9890 ± 0.0055 1.0000 0.0073 ± 0.0037 0.0064 ± 0.0033 2101 0.9867 ± 0.0089 1.0000 0.0065 ± 0.0049 0.0055 ± 0.0042 2133 0.9879 ± 0.0088 1.0000 0.0083 ± 0.0056 0.0071 ± 0.0048 boundary, this pixel will continually alternate between foreground and background as ACWE converges to the final solution.To account for this, a stopping criterion from Boucheron et al. [2016] was used.This criterion dictates that ACWE will halt evolution and return a segmentation map whenever the only pixels that evolve between iterations are pixels along the boundary that alternate between foreground and background.
By evolving from the previous segmentation instead of evolving from the initial seed, the optimized implementation changes (reduces) the number of iterations needed to converge to a solution, thus changing the point at which the stopping criteria is encountered.Over CR 2099 the successive evolutions method generated segmentation groups an average of 2.9209 ± 0.2622 times faster than the independent method.

A Further Study of Change of Target
Automated identification of change of target cases remains an area of open research.The current method of identifying change of target consists of calculating the change in the percent of the initial seed present in final segmentation as a function of λ i /λ o ratio.If the drop in the percent of the seed present is ≥ 5% from one λ i /λ o ratio to the next smallest λ i /λ o ratio, then it is assumed that the segmentation with the smaller λ i /λ o ratio exhibits signs of change of target.When this occurs, that segmentation as well as all other segmentations with a smaller λ i /λ o ratio, are omitted from the segmentation group during summation and normalization.The percent of the initial seed present in the segmentation with the largest λ i /λ o ratio is used as a starting value for this process.This ensures that in the case of overfitting (high λ i /λ o ratios causing ACWE to open a hole in the darkest part of the initial seed, even when still detecting CHs), the absence of a portion of the initial seed does not result in an erroneous report of change of target.Similarly, in the case that the seeding process includes a portion of the QS which is subsequently removed in the evolution of the contour, the absence of a portion of the initial seed does not result in an erroneous report of change of target.Without this concession, the absence of a portion of the initial seed at the largest homogeneity ratio would result in the entire ensemble being dismissed, preventing the generation of a confidence map. Figure 13 illustrates an example of this scenario containing overfitting but no change of target.On the other hand, Figure 14 illustrates an example of both overfitting for high homogeneity ratios and also a change of target at lower homogeneity ratios.
Manual exploration of the full dataset revealed 125 cases of change of target, of which 96 cases were identified via this method.An additional 14 cases of change of target not identified by the human observer were also found via this method.The total number of cases of change of target identified via either method (139 cases) constitute < 5.63% of the total dataset.The change of target cases identified by human observer and not identified by the automated method (29 cases) constitute < 1.22% of the total dataset.While a robust automatic identification of change of target is still under investigation, the proposed criterion appears to perform well for the datasets studied here.

Validation of ACWE Boundaries
Validation of the confidence maps is performed by calculating the skew of the flux of the underlying magnetic field as a function of confidence value.For this process, evaluation is limited to CHs that appear near disk center to minimize the influence of projection effects [Leka et al., 2017].

Calculating Skew
In order to calculate the skew of the flux of the underling magnetic field, the HMI magnetogram image that corresponds to an AIA observation must be scaled and aligned to match the scale and orientation of the level 1.5 193 Å image used to generate the segmentation group.In addition to this, the confidence map, which was generated at one-eighth spatial resolution, must be resized to match the resolution of the EUV image.The process of aligning the magnetogram is achieved by providing reproject.reproject_interp[Robitaille et al., 2020] with the HMI magnetogram and the astropy [Astropy Collaboration et al., 2013, 2018], world coordinate system (WCS) of the level 1.5 193 Å EUV image.To resize the confidence map, each segmentation within the group is upscaled to the original resolution using bi-linear interpolation.Once upscaled the segmentations are combined and normalized.(d) Area of initial seed retained in final segmentation.A small portion of the initial seed is not included even for the highest homogeneity ratios, indicating overfitting, but not a change of target.
Figure 13: Example of overfitting at high λ i /λ o .The two graphs show that absence of the darkest part of the initial seed is limited to higher homogeneity ratios, likely due to the λ i /λ o ratio being too stringent for the image.Note that the proposed method for identifying change of target was able to identify that the absence of a portion of the initial seed was solely due to overfit and therefore did not exclude any segmentations when generating the confidence map.To calculate the skew of the underlying CH region, CHs are partitioned into CH groups.A CH group is defined as all eight-connected regions with a confidence value V > 0 that are within 40 pixels (equivalent to 5 pixels at the original one-eighths resolution) of each other.The partitioning process was achieved by generating a binary mask of the upscaled confidence mask wherein all pixels with a confidence value V > 0 are set to 1. Dilation is applied to this map using the scikit-image [van der Walt et al., 2014] function skimage.morphology.dilation,with a 40 × 40 pixel square.Once dilated, this map is then labeled using skimage.measure.label,and one binary mask is generated for each labeled region.These masks are converted into confidence maps of their respective CH groups by replacing the region of the binary mask with a value of 1 with the confidence values of the corresponding pixels in the original confidence map.
Once the CH groups are generated they are are then utilized as masks to identify the corresponding region within the matching HMI magnetogram.Skew is calculated as a function of confidence such that for a confidence value V only regions of the magnetogram that correspond to a region within the CH group with a confidence ≥ V are included.The skew of the magnetic flux of the region is defined as where N is the number of pixels within the region, Φ i is the magnetic flux of pixel i, Φ is the mean flux of the region, and σ is the standard deviation of the flux of the region.
Instead of attempting to mitigate the projection effects in HMI magnetograms by estimating the skew of each region, the skew of the underlying region is calculated twice for each confidence value, once directly on the magnetogram (called the "unweighted skew"), and a second time on a weighted magnetogram ("weighted skew").For the weighted skew the weight for each pixel of the magnetogram is defined as where z i is the z coordinate (Cartesian) of pixel i within the heliocentric frame, and max(z) is the z coordinate of the pixel directly in line with the Sun center and observer.This weighting favors regions near disk center [The SunPy Community], where flux observations are least affected by projection effects [Leka et al., 2017].

Behavior of Confidence Maps
The exact behavior of the skew of the flux of the underlying magnetic field as a function of confidence, varied hour by hour as CH groups traversed the center of disk. Figure 15 provides an example of this variation, providing three observations of the same CH region at one hour intervals.As can be noted in Figure 15, the range of the skew, both weighted and unweighted, is relatively consistent from one hour to the next.This further validates the consistency of the ACWE CH segmentation algorithm and the accuracy of the confidence maps in delineating CHs.Three primary trends were noted within the data.The first trend, seen in Figure 16, consists of examples where the magnitude of the skew increased as a function of confidence.This trend was the most prevalent within the data, with nearly all cases where increasing confidence resulted in significantly decreased area showing this trend.This result suggests that higher confidence levels, as expressed by the ACWE confidence map, generally represent better delineations of CH regions in that the underlying magnetic field is more strongly unipolar.
The second trend consisted of cases where confidence did not significantly affect skew magnitude for the majority of confidence levels.Figure 15 provides an example of this, with two additional cases presented in Figure 17.This indicates that a highly unipolar region is maintained throughout the suite of confidence levels, suggesting that these regions nonetheless represent accurate delineations of CH regions.
The decrease in skew magnitude present in the early, low confidence regions in both cases in Figure 17 is the third notable trend.This result is not isolated to lower confidence levels.Figure 18 presents two examples of drops in skew magnitude at larger confidence levels.The cause of these drops in skew may vary from CH to CH, with the presence of nearby spurious bright regions providing potential explanations in the case of Figure 17b and the two examples in Figure 18.Drops in confidence may also be the result of overfitting, potentially explaining the second drop in skew magnitude seen in Figure 18b.Despite this, skew magnitude remains high across all confidence levels, suggesting that these segmentations nonetheless represent accurate segmentations of the CH region.
Based on the skew data provided by HMI, it appears that in addition to the CHs identified by ACWE, at least two additional regions, both from CR2133, were also identified.The first region, seen in Figure 19, appears to be a filament   based on the low absolute skewness values and the change from negative to positive skew as the confidence level is increased.This indicates that ACWE will misidentify sufficiently dark regions as CHs.This result may highlight the need to integrate data related to the magnetic field into ACWE to provide better segmentations.The second group, shown in Figure 20, consists of what appears to be a CH region with very low skew at high confidence.This result may the the result of the nearby active region, similar to the effects in Figure 17b.

Formation of a CH
As a final interesting result stemming from the validation of the ACWE confidence maps, ACWE was able to identify the formation of a CH in CR 2099.This region initially appeared as a low confidence region with large changes in segmentation area from one confidence level to the next and minimal skew on 2010-07-16 at 10:00:00 before forming into a CH as it entered disk center.As the region formed, the area of confidence increased, and difference in area from one confidence level to the next at higher confidence levels decreased until this observation matched other CHs within the dataset.Figure 21 shows the formation of this CH at six hour intervals.This is the same CH as seen in Figure 16a.The frequency with which ACWE can identify and catalog the formation of CH regions remains an open area of research.

Conclusion and Future Work
This work demonstrates the robustness and consistency of coronal hole segmentation via the Active Contours Without Edges (ACWE) algorithm and furthers this by introducing an ensemble method that leverages the ability of ACWE to define region boundaries on the basis of homogeneity.The ACWE algorithm was found to preserve general structures in the CH segmentations, even when operating on images decimated by 8×.Additionally, the ACWE algorithm was found to be relatively insensitive to aggressive intensity scaling (e.g., from float64 to uint8) provided that the relative difference between CH and quiet Sun intensity is maintained.These results have implications for cross-instrument application of the ACWE algorithm (or any other algorithm that depends on intensities, homogeneity of intensities, or   The ACWE algorithm was found to provide consistent segmentations across short timescales (i.e., shorter than the expected timsecales for CH evolution).This highlights the importance of relying on image-derived features rather than hard thresholds to segment CHs.The ACWE segmentation method relies on image features not only in initial seeding (using an estimate of the quiet Sun intensity), but also in defining the final CH regions as the initial seed is evolved to maximize the homogeneity of the CH regions with respect to the remaining on disk area.
In order to better leverage the region refinement capabilities of ACWE, an intraensemble method was developed that correlates likelihood that a region is part of a CH with the similarity of that region to the core region of that CH.It was found that the magnitude of skew increased with increase in confidence of the ensemble, suggesting that the higher confidence regions represent delineations of CH regions with a more strongly unipolar magnetic field.
These results, however, also introduce additional considerations, constituting avenues for future work.First, it was found that some segmentations began targeting quiet Sun rather than CH regions, likely a result of relative homogeneity of the non-CH regions on disk.More robust methods to identify these change of target cases are needed, along with methods to identifying overfit wherein inner portions of CH regions are excluded for stringent homogeneity ratios.Second, ACWE is vulnerable, as are many CH detection algorithms, to false detections caused by other dark regions such as filaments.To mitigate this, ACWE will require additional data, such as from the magnetic field of the underlying regions.In both of these avenues of future work, it is important that any developed methods be able to preserve any regions where ACWE identifies CH formation.
Additional improvements to this method may also come in the form of introducing data from other wavelengths captured by AIA or other instruments with an overlapping field of view.These data could be used to both aid in the seeding of the algorithm, and also to better define the CH region.Introduction of other data could be performed either independently, generating additional segmentations to be considered within the ensemble, or jointly through a vector-valued implementation of the ACWE algorithm [Chan et al., 2000].Finally, adaptation of ACWE to operate on additional observations, such as those produced by the Solar Terrestrial Relations Observatory (STEREO) [Kaiser et al., 2008] can help to develop a more complete picture of CH activity to aid in space weather applications.

A Intensity and Dynamic Range Effects
In addition to evaluating the effects of spatial resolution on segmentation, the effects of intensity on segmentation were also evaluated.These evaluations were designed to study the sensitivity of ACWE segmentation of CHs with the hypothesis that intensity rescaling, e.g., a log scaling commonly used to visualize AIA images, may provide an advantage.It was found, however, that direct representation of EUV intensities using a log scale hindered the segmentation process.Since the use of an intensity rescaled image is not used for subsequent processing (e.g., to compute a confidence map) these results are not included in the main text.Since these results could be of interest in application of ACWE for segmentation of CHs on other data with other intensity distributions (e.g., cross-instrument applications), the results are included here as an appendix.For the process of evaluating the effects of intensity scaling on segmentation, the Level 1.5 EUV images were remapped to a reduced intensity range of 256 intensity levels (the dynamic range of popular image formats such as PNG and JPEG).The data from CRs 2099 through 2101 originally contained intensities in the range [−128, 16383], while the data from CR 2133 contained intensities in the range [−16, 16383].Eight remapping schemes were tested: • Linear Full: The EUV image is linearly rescaled so that the maximum intensity is 255 and the minimum intensity is 0. Each intensity is then then rounded to the nearest integer value producing an image with 256 discrete intensity levels.The minimum and maximum intensity present within the original EUV image are separately recorded for use in restoring the native intensity range.• Linear 0 to Max: The image is clipped so that all negative intensity values are replaced with a value of 0.
This clipped image is then rescaled.As before, the intensity of each pixel is rounded to the nearest integer, and the minimum (0) and maximum intensity (image dependent) are separately recorded.• Linear Solar Limits: The image is clipped to the range of on-disk intensities prior to remapping the image.
• Linear 20 to 2500: The image is clipped to the range of 20 to 2500 prior to remapping the image.• Log10 Full: An offset is applied to the intensities of all pixels to ensure that the minimum intensity is remapped to 1 and the range of intensities are preserved.The resulting image is remapped by taking the log 10 of each pixel, consistent with common practice in visualizing AIA images.This remapped image is then rescaled.The original minimum, original maximum, and the offset are separately recorded for use in restoring the native intensity range.• Log10 Compress 0 to Max: The image is clipped so that all negative intensity values are replaced with a value of 0. An offset of 1 is then applied to all pixels within the image.The resulting image is remapped by taking the log 10 of each pixel.This reduced and remapped image is then rescaled.The minimum (0), offset (1), and the original maximum are separately recorded for use in restoring the native intensity range.• Log10 Solar Limits: The image is clipped to the range of on-disk intensities and, if needed, offset to ensure the minimum intensity is > 0. The resulting image is remapped by taking the log 10 of each pixel.This reduced and remapped image is then rescaled.• Log10 20 to 2500: The image is clipped to the range of 20 to 2500, the resulting image is remapped by taking the log 10 of each pixel.This reduced and remapped image is then rescaled.
For each of the intensity compression schemes, ACWE is performed both on the compressed image and on a "restored image."For linear remapping schemes, the restoration process is achieved by assigning to all pixels of intensity b the intensity value where the offset O is defined as Next the original intensity value of each pixel is approximated using In all cases (both restored and unrestored), decimation to one-eighth spatial resolution, correction for limb brightening, and seeding are performed, following the method outlined in Boucheron et al. [2016], using the altered EUV image as if it was the original.ACWE is then performed, also using the altered EUV image.These results are compared against the one-eighth scale segmentations generated in Section 4.1.Table 2: Number of cases where an empty segmentation was returned.The remapping scheme is noted along with whether the image was segmented using the [0, 255] range or the restored range (Rest.).
Remapping intensities via a log transform minimizes the dynamic range of higher intensities in order to maximize the dynamic range of lower intensities.By maximizing the dynamic range of lower intensities, this remapping scheme is artificially decreasing the homogeneity of the CH region while simultaneously increasing the homogeneity of the non-CH region.
Figure 22 shows the IOU, SSIM, GCE and LCE between the segmentations generated from the intensity remapped images and segmentations generated from the original EUV image in CRs 2099, 2100, and 2101.Figure 23 shows the results for CR 2133.It should be noted the restoration process had little effect on the linear remapping schemes which preserved the majority of the dynamic range (such as the full and 0 to max mapping schemes), and minimal effect on the remaining linear schemes.By contrast, restoring the log 10 images significantly improved segmentation similarity across all four metrics.Based on these metrics, the restoration processed resulted in nearly identical segmentations for the restored log 10 schemes that used the full on-disk range, 0 to max intensity range, and solar intensity range.This result is consistent with observations of the resulting segmentation, a sample of which is provided in Figure 24.As noted above, the process of remapping the intensities via a log transform minimizes the dynamic range of higher intensities in order to maximize the dynamic range of lower intensities.This means that a larger portion of the intensities in the compressed image (b) were used to represent the lower intensity levels, allowing for a finer representation of the structure in CH regions.The low GCE and LCE for the un-restored log 10 images (i.e., those images in the range [0, 255]) represent a known problem with these metrics.Martin et al. [2001] note that both GCE and LCE fail to characterize the quality of a segmentation when one segmentation is empty as both metrics treat any segmentation as a refinement of an empty segmentation.For that reason, the presence of a large number of empty segmentations in the un-restored log 10 examples reduced the reported error of the ensemble.These results have implications for cross-instrument application of the ACWE algorithm (or any other algorithm that depends on intensities, homogeneity of intensities, or dynamic range) as they indicate a strong effect of changing the dynamic range and distribution of intensities within that dynamic range.It would thus be expected that instruments with a reduced dynamic range of intensities may cause issues in obtaining accurate segmentations of CHs.

Figure 1 :
Figure1: Effects of decimation in spatial resolution for CRs 2099, 2100, and 2101 using bilinear interpolation.In this figure the orange line is the median value, the box represents the range between the first (Q1) and third (Q3) quartile, the whiskers represent 1.5 times the interquartile range above Q3 or below Q1, and circles represent outliers.

Figure 2 :Figure 3 :
Figure2: Effects of decimation in spatial resolution for CR 2133 using bilinear interpolation.In this figure the orange line is the median value, the box represents the range between the first (Q1) and third (Q3) quartile, the whiskers represent 1.5 times the interquartile range above Q3 or below Q1, and circles represent outliers.

Figure 4 :
Figure 4: Comparison of segmentations of the same observation performed at different spatial resolutions.
Figure 5: Similarity of segmentation as a function of time across CRs 2099, 2100, and 2101 represented as mean similarity or error (blue line) and standard deviation (grey shaded region).

Figure 7 :
Figure 7: Example of slowly varying segmentation versus homogeneity ratio

Figure 8 :
Figure 8: Example of quickly varying segmentation versus homogeneity ratio for low homogeneity ratios

Figure 9 :
Figure 9: Example of change of target at low homogeneity ratios Figure 10: Normalized summation of segmentations at homogeneity ratios λ i /λ o ∈ [10, 100].The color bar to the right of each map shows the proportion of the segmentations in which a region in the original image was identified by the segmentation group as belonging to a CH.A value of 1 (yellow) indicates that all segmentations identified that region as a CH region.A value of 0 (purple) indicates that none of the segmentations identified the region as a CH region.

Figure 11 :
Figure 11: Normalized summation of segmentations at homogeneity ratios λ i /λ o ∈ [36, 100] for the segmentation group in Figure 10c.The color bar to the right of each map shows the proportion of the segmentations in which a region in the original image was identified by the segmentation group as belonging to a CH.A value of 1 (yellow)indicates that all segmentations identified that region as a CH region.A value of 0 (purple) indicates that none of the segmentations identified the region as a CH region.
(a) Example of slowly varying segmentation versus homogeneity ratio (b) Example of quickly varying segmentation versus homogeneity ratio for low homogeneity ratios (c) Example of change of target at low homogeneity ratios

Figure 12 :
Figure 12: Comparison of normalized summation of segmentations at homogeneity ratios λ i /λ o ∈ [10, 100] generated independently (center) and through the evolution of a single segmentation (right).The color bar to the right of each map shows the proportion of the segmentations in which a region in the original image was identified by the segmentation group as belonging to a CH.A value of 1 (yellow) indicates that all segmentations identified that region as a CH region.A value of 0 (purple) indicates that none of the segmentations identified the region as a CH region.
(a) AIA 193 Å image (left) and initial seed (right) (b) Confidence map built from full ensemble (left) and using change of target criterion (right).Since change of target did not occur, both maps are identical.Intensity of segmentations compared to intensity of initial seed, normalized by mean intensity of seed.Note the smooth variation in the segmentation intensities versus homogeneity ratio, indicating the absence of a change of target.Seed Retained as a function of λ i /λ o ratio (a) AIA 193 Å image (left) and initial seed (right) (b) Confidence map built from full ensemble (left) and confidence map built using change of target criterion (right) Intensity of segmentations compared to intensity of initial seed, normalized by mean intensity of seed.Note the sudden jumps in minimum and mean intensities versus homogeneity ratio, a hallmark of change of target.Note also that the minimum intensity of the segmentation is always larger than the minimum intensity of the initial seed, indicating that overfitting resulted in the removal of the darkest part of the initial seed before change of target occurred.
Seed Retained as a function of λ i /λ o ratio (d) Area of initial seed retained in final segmentation.Note the sudden decrease in area with decreasing homogeneity ratio, a hallmark of change of target.

Figure 14 :
Figure 14: Example of overfitting and change of target within the same segmentation group.Note that the proposed method for identifying change of target can identify and retain the overfit region while removing the effects of change of target.
Figure 15: Skew of the flux of the magnetic field of a centrally located CH in CR2100 for three consecutive hours.From left to right for (a)-(c): AIA 193 Å observation, confidence map (on disk area encircled in red), graph of skew as a function of confidence level.Note the relative consistency of skew values over the three observations.
(a) CH observed in CR2099, in the graph a downward trend (↓) indicates increasing unpopularity (b) CH observed in CR2101, in the graph a downward trend (↓) indicates increasing unpopularity

Figure 17 :
Figure 17: Example CH groups where skew magnitude remained consistent for a majority of confidence Levels.From left to right for (a)-(b): AIA 193 Å observation, confidence map (on disk area encircled in red), graph of skew as a function of confidence level.

Figure 18 :
Figure 18: Example CH groups where skew magnitude dropped at higher confidence levels.Skew magnitude remains high across all confidence levels, suggesting that these segmentations nonetheless represent good segmentations of the CH region.From left to right for (a)-(b): AIA 193 Å observation, confidence map (on disk area encircled in red), graph of skew as a function of confidence level.

Figure 19 :
Figure 19: Filament captured by ACWE, based on the low absolute skewness values and the change from negative to positive skew as the confidence level is increased.From left to right: AIA 193 Å observation, confidence map (on disk area encircled in red), graph of skew as a function of confidence level.In the graph any trend away from 0 would indicate increasing unipolarity.

Figure 20 :
Figure 20: Example of CH with minimal skew at high confidence, possibly due to the nearby active region.From left to right: AIA 193 Å observation, confidence map (on disk area encircled in red), graph of skew as a function of confidence level.In the graph a downward trend (↓) would indicate increasing unpopularity (a) First observation (b) Six hours into formation (c) Twelve hours into formation (d) Fifteen hours into formation (e) Twenty-one hours into formation

Figure 21 :
Figure 21: Example of formation of a CH identified by ACWE.From left to right for (a)-(e): AIA 193 Å observation, confidence map (on disk area encircled in red), graph of skew as a function of confidence level.
(I) − min(I)) + min(I), (10) where max(I) is the maximum intensity of the original EUV image and min(I) is the minimum intensity of the original image.For log 10 remapping schemes, the restoration process is completed in two steps.First the intensity range of the compressed image in the log domain is restored by assigning each pixel the intensity value v l10 = b 255 × (log 10 (max(I) + O) − log 10 (min(I) + O)) + log 10 (min(I) + O),
as a function of intensity scale over CR2133 (d) Local Consistency Error

Figure 24 :
Figure 24: Comparison of segmentations of the same observation performed using the various intensity remapping schemes overlaid onto the remapped image.It should be noted that the topmost image is the original EUV image, presented here without any remapping of intensities, and the segmentation is the same segmentation seen in Figure 4 at one-eighth scale resolution.Each image is accompanied by a color bar showing the range of intensities in the final image.

Table 2
summarizes the number of times where ACWE returned a segmentation wherein no regions were identified as belonging to CHs.These results indicate that ACWE, when applied to CH detection using the method outlined in Boucheron et al.[2016], has difficulty with data that has been remapped via the the log 10 operator unless attempts are made to restore the original dynamic range of the data.This result may be, in part, due to the fact that remapping the