# Using the Guided Fireworks Algorithm for Local Backlight Dimming
## 3 Local Dimming Based on the Guided Fireworks Algorithm
### Guided Fireworks Algorithm  
In a local backlight system, the optimal backlight luminance is related to the image content. For example, a backlight block behind an image region with high overall pixel values is suitable for high luminance levels. Therefore, some parameter-based algorithms which calculate the backlight luminance based on the image pixel values are proposed. Compared with solutions generated randomly, the solutions generated by the parameter-based algorithms usually achieve higher quality. In ISFLA, as proposed in [12], an initial solution is generated based on the parameter-based algorithm, and the search interval is centered on this initial solution. These strategies are conducive to maintaining the correlation between the image content and the backlight luminance. According to the search strategy of the FWA, a lot of random searches will be done around firework locations with good quality. Therefore, if the solution generated by the parameter-based algorithm is taken as a firework location, many new solutions will be generated around this firework location; the search strategies of the FWA can therefore satisfy the correlation between the backlight luminance and the image content well. In the FWA, general spark locations are generated randomly around firework locations, and then the Gaussian spark locations are generated by randomly selected firework locations. These strategies maintain population diversity well, but the random generation method may give some spark locations with poor quality, thereby leading to worse quality in the current population. On the other hand, the firework locations of the next generation are selected from all the locations in the current generation, and the selection is mainly based on the distances between these locations. This selection strategy is beneficial for maintaining population diversity, but it also means that any location in the population is likely to be selected. Therefore, when the quality of the current population is bad, the quality of the firework locations of the next generation is likely to also be bad, thereby resulting in poor searching performance. In order to improve the performance of the FWA, this paper introduces the guiding strategy, and proposes the improved algorithm, the GFWA. The flow chart of the GFWA is shown in Figure 3. The pseudo code of Algorithm A3 is shown in Appendix A. It can be seen from the flow chart and Algorithm A3, there are three improvements in the GFWA:  
1. In the GFWA, the solution of the parameter-based algorithm is taken as the first firework location, and other firework locations are generated within an interval which is centered on the first location. To ensure the diversity of the population, the radius of the interval is set to a relatively large value. In this paper, the luminance level of a block is from 0 to 255, and the radius value is set to 50. For example, if the luminance level of a block calculated by the parameter-based algorithm is 100, the search interval at this block is (50,150). The solutions obtained by parameter-based algorithms are related to the image content, and they usually have higher quality compared with the solutions generated randomly. Therefore, this strategy mainly avoids generating initial solutions which are obviously unrelated to the image content. It is also beneficial for improving the quality of the initial solutions and improving the quality of the output solution. 2. In the search process of the GFWA, the strategy of generating guided sparks is applied. After the general spark locations are generated, the firework locations and the general spark locations are mixed together. Then, in the mixed set, the bad locations will search for guided spark locations to replace themselves, based on the guidance of the best location. With the guidance of the location which has the highest quality in the population, the newly generated guided spark locations have much higher quality than the bad locations in the population.