The content of the invention
The technical problems to be solved by the invention are that providing a kind of best quality image based on artificial neural network sweeps
Retouch method and system, it is intended to solve the problems, such as that convention scanning scheme combination more than the sweep parameter can not obtain optimum image.
The present invention is achieved in that a kind of best quality image scan method based on artificial neural network, including with
Lower step:
Step A, the original scan parameter of image is analyzed, obtain training sample and checking sample;
Step B, the training sample and the interpolated data of the checking sample unknown point are obtained by interpolation, will be obtained respectively
Take the training sample after interpolated data and the checking sample to be normalized, obtain training sample normalization data
With checking samples normalization data;
Step C, using neutral net instrument, primary artificial neural network is established according to the training sample normalization data
Model is simultaneously trained;
Step D, the primary artificial nerve network model is verified according to the checking samples normalization data, obtained most
Whole artificial nerve network model;
Step E, simulation and prediction is carried out according to the artificial nerve network model.
Further, the step C includes:
Step C1, training sample normalization data is imported, obtain the input vector of primary artificial neural network and it is expected defeated
Outgoing vector;
Step C2, training error permissible value ε is set, initializes each weighted value and threshold value;
Step C3, calculate each hidden layer and export the output of node layer;
Step C4, the error criterion function E of the primary artificial neural network reality output and desired output is calculated, is compared
The error criterion function E and training error permissible value ε size;
Step C5, if E≤ε, training terminates, and exports training result;
Step C6, if E > ε, update the weighted value and the threshold value and judge whether to reach default frequency of training, if
Reach frequency of training, then deconditioning;
Step C7, if not up to default frequency of training, jump to step C3 and continue to train.
Further, the step D is specifically included:
Step D1, import checking samples normalization data;
Step D2, proving program is performed, obtains the output result of the primary artificial nerve network model;
Step D3, the validation error between the output result and actual value;
Step D4, judges whether the validation error meets default expectation quality;
If the result meets default expectation quality, the primary artificial nerve network model is defined as finally
Artificial nerve network model;
If the result does not meet default expectation quality, correct the primary artificial nerve network model and redirect
To step C.
Present invention also offers a kind of best quality image scanning system based on artificial neural network, including:
Analytic unit, for analyzing the original scan parameter of image, obtain training sample and checking sample;
Processing unit, it is connected with the analytic unit, for obtaining the training sample and the checking by interpolation
The interpolated data of sample unknown point, the training sample after acquisition interpolated data and the checking sample are subjected to normalizing respectively
Change is handled, and obtains training sample normalization data and checking samples normalization data;
Training unit, it is connected with the processing unit, for utilizing neutral net instrument, is returned according to the training sample
One change data are established primary artificial nerve network model and trained;
Authentication unit, it is connected with the training unit, for verifying samples normalization data to described first according to described
Level artificial nerve network model checking, obtains final artificial nerve network model;
Simulation and prediction unit, it is connected with the authentication unit, for being imitated according to the artificial nerve network model
True prediction.
Further, the training unit is specifically used for:
First, training sample normalization data is imported, obtains the input vector and desired output of primary artificial neural network
Vector;
Then, training error permissible value ε is set, initializes each weighted value and threshold value;
Then, calculate each hidden layer and export the output of node layer;
Again, the error criterion function E of the artificial neural network reality output and desired output, the mistake are calculated
Poor index function E and training error permissible value ε size;
Again, if E≤ε, training terminates, and exports training result;
Again, if E > ε, update the weighted value and the threshold value and judge whether to reach default frequency of training, if reaching
To frequency of training, then deconditioning;
Finally, if not up to default frequency of training, recalculate each hidden layer and output node layer continues to instruct
Practice.
Further, the authentication unit is specifically used for:
First, checking samples normalization data are imported;
Then, proving program is performed, obtains the output result of the primary artificial nerve network model;
Then, the validation error between the output result and actual value;
Finally, judge whether the validation error meets default expectation quality;
If the result meets default expectation quality, the primary artificial nerve network model is defined as finally
Artificial nerve network model;
If the result does not meet default expectation quality, correct the primary artificial nerve network model and redirect
Continue to train to the training unit.
Compared with prior art, beneficial effect is the present invention:The sample data that the present invention obtains orthogonal experiment is carried out
Classification, and artificial nerve network model is established accordingly, sweep parameter is predicted and optimized by artificial nerve network model,
Shorten the optimization sweep parameter time, improve image scanning efficiency.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
It is referred to as sweep parameter to the parameter that picture quality has an impact in scanning process, linear array CCD scanning parameter is main
Including camera parameter, light source parameters and kinematic parameter.Camera parameter includes:Frequency acquisition and focal length.Light source is linear array CCD scanning
The necessary condition of image, light source parameters mainly include:Color, intensity, light angle and the linearity.Kinematic parameter is continuously scanning
In play very important effect, mainly include:(vibration, target are because of inertia generation caused by motion for sweep speed, vibration
Vibration and camera caused by vibration etc.).Linear array CCD scanning parameter has a lot, and each parameter influences different, this hair on picture quality
It is bright mainly to study the sweep parameter being had a major impact to picture quality, including:Sweep speed, light illumination and the linearity, exposure
Degree and picture-taken frequency.
Orthogonal experiment obtains the major parameter image quality integrated evaluating corresponding with each parameter for influenceing scan image quality
Desired value, neutral net data available is chosen, by neutral net instrument, image scanning is established by neural network structure and optimized
Neural network model, according to the model prediction unknown-value, the re-optimization if not meeting, meet the requirements, establish final mould
Type.
According to principles above, the present invention provides a kind of best quality image scan method based on artificial neural network,
In the factor for influenceing picture quality, except major parameter other parameters are influenceed less, on this basis, by just on picture quality
Experiment extraction sweep speed, frequency acquisition, aperture exposure, light illumination is handed over to be integrated with the picture quality of corresponding scan image
Evaluation index, as the original scan parameter of neural metwork training, as shown in figure 1, the step of best quality image scan method
Including:
S1, original scan parameter is analyzed, obtain training sample and checking sample.In this step, first to original
Beginning sweep parameter is analyzed, pick out meet image quality requirements can employment artificial neural networks, Approximation Theory analyzed
The data used, these data are divided into training sample and checking sample two parts.
S2, the training sample and the interpolated data of the checking sample unknown point are obtained by interpolation, will be obtained respectively
The training sample after interpolated data and the checking sample are normalized, obtain training sample normalization data and
Verify samples normalization data;
S3, using neutral net instrument, primary artificial neural network mould is established according to the training sample normalization data
Type is simultaneously trained;
S4, the primary artificial nerve network model is trained;
S5, the primary artificial nerve network model is verified according to the checking samples normalization data, obtained final
Artificial nerve network model.In this step, the artificial nerve network model obtained for can approach original scan parameter and
The model of the image quality integrated evaluating index of corresponding scan image, best quality image can be carried out according to the model and swept
Retouch.
S6, simulation and prediction is carried out according to the artificial nerve network model.
As shown in Fig. 2 S3 specifically comprises the following steps:
S31, import training sample normalization data;
S32, obtain the input vector and desired output vector of primary artificial neural network.In this step, training is imported
Samples normalization data are the input vector and desired output vector of primary artificial neural network.
S33, training error permissible value ε is set, initializes each weighted value and threshold value.In this step, set weighted value and
Initial value of the threshold value as follow-up neural metwork training, initial each weighted value and threshold value are arranged to less numerical value, typically all
0.0001-0.0000001 is set to, specific setting value will judge according to the training result of neutral net, too big neutral net
Training result is undesirable, too small and can not restrain;
S34, calculate each hidden layer and export the output of node layer;
S35, calculate the error criterion function E of the primary artificial neural network reality output and desired output;
S36, the training error permissible value ε and the error criterion function E, if E≤ε, training terminates, output instruction
Practice result.Because training process is exactly constantly to correct each weighted value and threshold value so that is inputted in the range of training error permissible value
Vector sum output vector sets up non-linear relation, and the training result of output is exactly to obtain final weighted value and threshold value.
S37, if E > ε, the weighted value and the threshold value are updated, and carry out frequency of training judgement;
S38, judge whether to reach default frequency of training, if reaching frequency of training, deconditioning;
S39, if not up to default frequency of training, jump to step S34 and continue to train.
In above-mentioned steps S4, concretely comprise the following steps:
S41, import checking samples normalization data;
S42, proving program is performed, obtains the output result of the primary artificial nerve network model.In this step, root
According to the training result exported in step S3 the weighted value final as primary artificial neural network and threshold value, import checking sample and return
One change data obtain output result.
S43, the validation error between the output result and actual value.In this step, checking sample is imported to return
One change packet contains input value and desired output, and output knot is obtained according to the training result exported in input value and step S3
Fruit, actual value are desired output.
S44, judges whether the validation error meets default expectation quality;
If the result meets default expectation quality, the primary artificial nerve network model is defined as finally
Artificial nerve network model;
In S45, if the result does not meet default expectation quality, the primary artificial nerve network model is corrected
And jump to step S3.
As shown in figure 3, it is a kind of best quality image scanning based on artificial neural network provided in an embodiment of the present invention
System, including:
Analytic unit 1, for analyzing the original scan parameter of image, obtain training sample and checking sample;
Processing unit 2, it is connected with analytic unit 1, for obtaining the training sample and the checking sample by interpolation
The interpolated data of this unknown point, the training sample after acquisition interpolated data and the checking sample are normalized respectively
Processing, obtain training sample normalization data and checking samples normalization data;
Training unit 3, it is connected with processing unit 2, for utilizing neutral net instrument, according to the training sample normalizing
Change data to establish primary artificial nerve network model and trained;
Authentication unit 4, it is connected with training unit 3, for verifying samples normalization data to the primary according to described
Artificial nerve network model is verified, obtains final artificial nerve network model;
Simulation and prediction unit 5, it is connected with authentication unit 4, for being emulated according to the artificial nerve network model
Prediction.
Further, training unit 3 is specifically used for:
First, training sample normalization data is imported, obtains the input vector and desired output of primary artificial neural network
Vector;
Then, training error permissible value ε is set, initializes each weighted value and threshold value;
Then, calculate each hidden layer and export the output of node layer;
Again, the error criterion function E of the artificial neural network reality output and desired output, the mistake are calculated
Poor index function E and training error permissible value ε size;
Again, if E≤ε, training terminates, and exports training result;
Again, if E > ε, update the weighted value and the threshold value and judge whether to reach default frequency of training, if reaching
To frequency of training, then deconditioning;
Finally, if not up to default frequency of training, recalculate each hidden layer and output node layer continues to instruct
Practice.
Further, authentication unit 4 is specifically used for:
First, checking samples normalization data are imported;
Then, proving program is performed, obtains the output result of the primary artificial nerve network model;
Then, the validation error between the output result and actual value;
Finally, judge whether the validation error meets default expectation quality;
If the result meets default expectation quality, the primary artificial nerve network model is defined as finally
Artificial nerve network model;
If the result does not meet default expectation quality, correct the primary artificial nerve network model and redirect
Continue to train to the training unit.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention
All any modification, equivalent and improvement made within refreshing and principle etc., should be included in the scope of the protection.