Light source optimization apparatus and light source optimization method
The invention provides a light source optimization apparatus including a storage apparatus and a processor. The storage apparatus stores a plurality of modules. The processor is coupled to the storage apparatus and configured to execute the plurality of modules. The plurality of modules include a critical pattern module and a light source optimization module. The critical pattern module retrieves critical pattern data. The light source optimization module executes an ant colony optimization (ACO) algorithm according to a preset parameter to adjust an initial light source image to generate an output light source image, and the initial light source image corresponds to the critical pattern data.
1 . A light source optimization apparatus, comprising:
a storage apparatus storing a plurality of modules; and
a processor coupled to the storage apparatus and configured to execute the plurality of modules, wherein the plurality of modules comprise:
a critical pattern module retrieving critical pattern data; and
a light source optimization module executing an ant colony optimization (ACO) algorithm according to a preset parameter to adjust an initial light source image to generate an output light source image, wherein the initial light source image corresponds to the critical pattern data, and the preset parameter includes a number of ants,
wherein the processor is further configured to control the light source optimization module to calculate the number of ants based on a dimension of the initial light source image and m values that each pixel of the initial light source image corresponding to, wherein m is an integer.
2 . The light source optimization apparatus of claim 1 , wherein the plurality of modules further comprise:
a deep learning module, comprising:
an encoding module encoding the critical pattern data as feature data; and
a decoding module decoding the feature data to obtain the initial light source image.
3 . The light source optimization apparatus of claim 2 , wherein the encoding module is a convolutional neural network (CNN) encoder, and the decoding module is a CNN decoder.
4 . The light source optimization apparatus of claim 2 , wherein the deep learning module further comprises:
an automatic weighting module performing a weighting operation on the feature data according to a plurality of weighting coefficients to generate feature summary data, wherein
the decoding module decodes the feature summary data to obtain the initial light source image.
5 . The light source optimization apparatus of claim 2 , wherein
the critical pattern data comprises a plurality of input images,
the encoding module comprises a plurality of encoders,
the plurality of encoders respectively encode the plurality of input images to generate a plurality of eigenvectors.
6 . The light source optimization apparatus of claim 4 , wherein
the automatic weighting module comprises:
a plurality of fully connected (FC) layers; and
a softmax layer, wherein
the automatic weighting module respectively flattens a plurality of eigenvectors and then inputs the plurality of FC layers and generates a plurality of weighting coefficients via the softmax layer,
the automatic weighting module performs a weighting operation on the plurality of eigenvectors according to the plurality of weighting coefficients to generate the feature summary data.
7 . The light source optimization apparatus of claim 1 , wherein the preset parameter further comprises a pheromone concentration, a decay rate, and a probability distribution.
8 . The light source optimization apparatus of claim 7 , wherein the light source optimization module performs a roulette wheel selection operation according to the preset parameter to generate a first light source image, and updates the probability distribution according to the first light source image.
9 . The light source optimization apparatus of claim 7 , wherein the light source optimization module generates a plurality of second light source images in one round of the ACO algorithm, the light source optimization module selects a plurality of third light source images according to an error between the plurality of second light source images and a target light source image, the light source optimization module superimposes the plurality of third light source images and updates the probability distribution according to the superimposed light source images.
10 . A light source optimization method, comprising:
retrieving critical pattern data; and
executing an ant colony optimization (ACO) algorithm according to a preset parameter to adjust an initial light source image to generate an output light source image, wherein the initial light source image corresponds to the critical pattern data, and the preset parameter includes a number of ants;
wherein executing the ACO algorithm according to the preset parameter to adjust the initial light source image to generate the output light source image comprises:
using a processor to calculate the number of ants based on a dimension of the initial light source image and m values that each pixel of the initial light source image corresponding to, wherein m is an integer.
11 . The light source optimization method of claim 10 , further comprising:
encoding the critical pattern data as feature data; and
decoding the feature data to obtain the initial light source image.
12 . The light source optimization method of claim 11 , further comprising:
performing a weighting operation on the feature data according to a plurality of weighting coefficients to generate feature summary data.
13 . The light source optimization method of claim 12 , wherein the step of decoding the feature data to obtain the initial light source image comprises:
decoding the feature summary data to obtain the initial light source image.
14 . The light source optimization method of claim 11 , wherein the critical pattern data comprises a plurality of input images, and the step of encoding the critical pattern data as the feature data comprises:
encoding the plurality of input images respectively to generate a plurality of eigenvectors.
15 . The light source optimization method of claim 12 , wherein performing the weighting operation on the feature data according to the plurality of weighting coefficients to generate the feature summary data comprises:
flattening a plurality of eigenvectors respectively and then inputting a plurality of FC layers and generating the plurality of weighting coefficients via a softmax layer, and
performing the weighting operation on the plurality of eigenvectors according to the plurality of weighting coefficients to generate the feature summary data.
16 . The light source optimization method of claim 10 , wherein the preset parameter further comprises a pheromone concentration, a decay rate, and a probability distribution.
17 . The light source optimization method of claim 16 , wherein executing the ACO algorithm according to the preset parameter to adjust the initial light source image to generate the output light source image further comprises:
performing a roulette wheel selection operation according to the preset parameter to generate a first light source image, and updating the probability distribution according to the first light source image.
18 . The light source optimization method of claim 16 , wherein executing the ACO algorithm according to the preset parameter to adjust the initial light source image to generate the output light source image further comprises:
generating a plurality of second light source images in one round of the ACO algorithm;
selecting a plurality of third light source images according to an error between the plurality of second light source images and a target light source image; and
superimposing the plurality of third light source images and updating the probability distribution according to the superimposed light source images.