Retinex-based unmanned aerial vehicle shooting image enhancement algorithm

文档序号:9227 发布日期:2021-09-17 浏览:40次 中文

1. An unmanned aerial vehicle shooting image enhancement algorithm based on Retinex comprises the following steps:

s1, enhancing the poor-quality image shot by the unmanned aerial vehicle by adopting a multi-scale Retinex MSRCP model;

s2, adjusting control parameters of the MSRCP model based on the MSRCP model by using a two-stage optimization algorithm;

s3, the two-stage optimization algorithm of the MSRCP model is Rao-2 algorithm and NM algorithm, wherein the Rao-2 algorithm is used for global search, and the NM algorithm is responsible for local search;

s4, performing global search by using Rao-2 algorithm to obtain a local optimal solution of the target function;

s5, improving the result through local search by using an NM simplex method;

and S6, taking the finally obtained optimal solution as a parameter of the MSRCP model to achieve the optimal image enhancement effect.

2. The Retinex-based unmanned aerial vehicle photographic image enhancement algorithm of claim 1, wherein in step S2, the MSRCP model can be expressed by equations (1) and (2):

wherein SRi、SGi、SBiIs the three color channels of the input image S, SintIs thatThe intensity of the image to be input is,is the output of the MSR model applied to the S image, fcbIs a color balance function that expands the value of a color channel into two values, the percentage of top clipped pixels (pt) and the percentage of bottom clipped pixels (pb).

3. The Retinex-based unmanned aerial vehicle photographic image enhancement algorithm of claim 1, wherein to find suitable parameters in different image scenes, the MSRCP model is transformed into an optimization problem, as shown in formula (3):

where S is the input image, σ1、σ2、σ3、pt、pbIs a control parameter of the MSRCP model and CEIQ is an image quality metric based on contrast enhancement.

4. The Retinex-based unmanned aerial vehicle photographic image enhancement algorithm of claim 1, wherein in step S4, the update strategy of the Rao-2 algorithm is defined as equations (4) and (5):

Pj',k,i=Pj,k,i+r1,j,i(Pj,best,i-Pj,worst,i)+r2,j,i(|Pj,k,i or Pj,l,i|-|Pj,l,i or Pj,k,i|) (4)

wherein P isj,best,iAnd Pj,worst,iAre respectively jthBest and worst candidate solutions for variables, P'j,k,iIs Pj,k,iUpdated solution, rl,j,iAnd r2,j,iIs jthTwo random numbers in the period, the value of which is 0, 1]In the range of f (P)k,i) And from candidate solution Pk,iAnd obtaining the fitness value.

5. The Retinex-based unmanned aerial vehicle photographic image enhancement algorithm of claim 1, wherein: in said step S5, on the basis of the Rao-2 result, the NM algorithm proposed by Nelder and Mead is adopted, which belongs to a non-derivative nonlinear optimization search method, minimizes the scalar value nonlinear function using only the function value without any derivative information, and rescales the simplex of (n +1) vertices through the four basic processes of initial, reflection, expansion and contraction according to the local behavior of the function, and through these steps, the simplex can improve itself and gradually approach the optimal solution.

6. The Retinex-based unmanned aerial vehicle photographic image enhancement algorithm of claim 1, wherein: in step S6, the parameters of Retinex are optimized by the improved Rao-2 algorithm to realize the optimal parameters for image enhancement.

Background

Recent advances in drone technology have facilitated their use in various fields, such as infrastructure surface inspection, remote rescue, and farm pest control, among others. Since many applications based on drones rely on images captured by drones, related image processing algorithms are highly needed, but in actual operation, due to external factors such as insufficient light or severe weather conditions, the captured images may lose important details and information, dark and fuzzy areas are often observed in the images, and it is difficult to identify details of objects, so that the performance of computer vision algorithms in different tasks such as target detection, target tracking and semantic segmentation may be affected.

Image enhancement is an inevitable part of digital image processing that modifies the interpretability and perception of details in an image to optimize the input image for the computer or human visual system, and many image enhancement techniques aim to obtain details of an image that are not visible due to different lighting conditions, such as histogram equalization, gamma correction, homomorphic filtering, filter strength transformations, and the like. The image enhancement algorithm can improve the quality and information content of the originally collected image, so that it is of great significance to develop a proper image enhancement algorithm for the image shot by the unmanned aerial vehicle, wherein the most challenging part is to adjust parameters and lack a unified algorithm, and the parameters of most image enhancement algorithms need to be manually adjusted to obtain a proper result.

The Retinex-based image enhancement method usually includes a plurality of control parameters, such as gaussian scale, gain, offset, and the like, and the parameters need to be manually adjusted according to the image, which results in that the robustness of the Retinex-based image enhancement method cannot be ensured when the method is applied to different environments and scenes.

The PSO is applied to parameter optimization of the MSRCP model, a better result is obtained, real color loyalty is provided under the condition of low light, color distortion is avoided, and the optimal weight of Gaussian filters with different scales is searched for a multi-scale Retinex (MSR) algorithm by using a flower pollination algorithm. However, the evolutionary computing algorithms applied usually contain algorithm specific parameters, and adjusting these introduced parameters requires more computational cost.

Disclosure of Invention

Aiming at the defects of the prior art, the invention provides an unmanned aerial vehicle shot image enhancement algorithm based on Retinex, and solves the problems in the prior art.

In order to achieve the purpose, the invention is realized by the following technical scheme: an unmanned aerial vehicle shooting image enhancement algorithm based on Retinex comprises the following steps:

s1, enhancing the poor-quality image shot by the unmanned aerial vehicle by adopting a multi-scale Retinex MSRCP model;

s2, adjusting control parameters of the MSRCP model based on the MSRCP model by using a two-stage optimization algorithm;

s3, the two-stage optimization algorithm of the MSRCP model is Rao-2 algorithm and NM algorithm, wherein the Rao-2 algorithm is used for global search, and the NM algorithm is responsible for local search;

s4, performing global search by using Rao-2 algorithm to obtain a local optimal solution of the target function;

s5, improving the result through local search by using an NM simplex method;

and S6, taking the finally obtained optimal solution as a parameter of the MSRCP model to achieve the optimal image enhancement effect.

Alternatively, in step S2, the MSRCP model may be represented by equations (1) and (2):

wherein SRi、SGi、SBiIs the three color channels of the input image S, SintIs thatThe intensity of the image to be input is,is the output of the MSR model applied to the S image, fcbIs a color balance function that expands the value of a color channel into two values, the percentage of top clipped pixels (pt) and the percentage of bottom clipped pixels (pb).

Optionally, in order to find suitable parameters in different image scenes, the MSRCP model is transformed into an optimization problem, as shown in formula (3):

51≤σ2≤100

101≤σ3≤255

0.01≤pt≤0.05

0.95≤pb≤0.99

where S is the input image, σ1、σ2、σ3、pt、pbIs a control parameter of the MSRCP model and CEIQ is an image quality metric based on contrast enhancement.

Optionally, in step S4, the update strategy of the Rao-2 algorithm is defined as equations (4) and (5):

P′j,k,i=Pj,k,i+r1,j,i(Pj,best,i-Pj,worst,i)+r2,j,i(|Pj,k,iorPj,l,i|-|Pj,l,iorPj,k,i|) (4)

wherein P isj,best,iAnd Pj,worst,iAre respectively jthBest and worst candidate solutions for variables, P'j,k,iIs Pj,k,iUpdated solution, r1,j,iAnd r2,j,iIs jthTwo random numbers of period, whichThe value is [0, 1 ]]In the range of f (P)k,i) And from candidate solution Pk,iAnd obtaining the fitness value.

Optionally, in step S5, on the basis of the Rao-2 result, an NM algorithm proposed by Nelder and Mead is adopted, the algorithm belongs to a non-derivative nonlinear optimization search method, only the function value is used to minimize the scalar value nonlinear function, no derivative information is available, and the simplex of (n +1) vertices is rescaled through four basic processes of initial, reflection, expansion and contraction according to the local behavior of the function, and through these steps, the simplex can improve itself and gradually approach the optimal solution.

Optionally, in step S6, parameters of Retinex are optimized through an improved Rao-2 algorithm to achieve optimal parameters for image enhancement.

The invention provides an unmanned aerial vehicle shot image enhancement algorithm based on Retinex, which has the following beneficial effects:

1. in the unmanned aerial vehicle shooting image enhancement algorithm based on Retinex, Retinex is a nonlinear image enhancement algorithm simulating a human visual system, is based on brightness and color perception of human vision, and has the functions of color constancy, high dynamic range and capability of sharpening details; the invention provides an improved Rao-2 algorithm to optimize parameters of a Retinex image enhancement method.

2. In the Retinex-based unmanned aerial vehicle image shooting enhancement algorithm, parameters of a multi-scale Retinex (MSRCP) model with chromaticity reservation are adjusted by using various evolutionary algorithms, and a better result is obtained.

3. In the unmanned aerial vehicle shooting image enhancement algorithm based on Retinex, parameters of Retinex are optimized through an improved Rao-2 algorithm so as to realize optimal parameters of image enhancement; compared with the standard and the existing method using Retinex algorithm, the method improves the quality of the color image, realizes high performance in the aspects of color quality and definition, and reduces the calculation cost of the algorithm because the improved Rao-2 does not need specific control parameters compared with other evolutionary algorithms.

4. In the Retinex-based unmanned aerial vehicle image shooting enhancement algorithm, the improved Rao-2 algorithm adjusts the optimal parameters for realizing image enhancement through two-stage optimization, so that compared with the standard using the Retinex algorithm and the existing method, the proposed method not only provides real color loyalty under the low-light condition, but also avoids color distortion, ensures that good robustness is kept for the pictures shot by the unmanned aerial vehicle under different scenes, and meanwhile, compared with the evolutionary algorithm used in the existing method, the improved Rao-2 algorithm only has public parameters without specific parameters, thereby avoiding the consumption of calculation amount and improving the efficiency of the algorithm.

5. The image enhancement algorithm for unmanned aerial vehicle shooting based on Retinex provides an image enhancement mixing algorithm based on Retinex to improve the image quality captured by the unmanned aerial vehicle, and parameters of an adopted MSRCP model are automatically adjusted through an improved Rao-2 algorithm of two-stage optimization calculation.

6. The Retinex-based unmanned aerial vehicle image shooting enhancement algorithm greatly enhances the robustness of the model image enhancement method by automatically adjusting the parameters of the MSRCP model, and compared with the existing method, the model applied to the unmanned aerial vehicle image has the beneficial effects that the contrast is greatly enhanced; most of the image details are preserved; the image is more natural, and the improved Rao-2 algorithm only comprises common parameters and has no specific parameters, so that the calculation amount of the method is greatly reduced, and the calculation speed is improved.

Drawings

FIG. 1 is a flow chart of the method of the present invention.

FIG. 2 is a schematic view of the structure of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.

In the description of the present invention, "a plurality" means two or more unless otherwise specified; the terms "upper", "lower", "left", "right", "inner", "outer", "front", "rear", "head", "tail", and the like, indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, are only for convenience in describing and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed in a particular orientation, and be operated, and thus, should not be construed as limiting the invention. Furthermore, the terms "first," "second," "third," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.

In the description of the present invention, it is to be noted that, unless otherwise explicitly specified or limited, the terms "connected" and "connected" are to be interpreted broadly, e.g., as being fixed or detachable or integrally connected; can be mechanically or electrically connected; may be directly connected or indirectly connected through an intermediate. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.

Referring to fig. 1 and fig. 2, the present invention provides a technical solution: an unmanned aerial vehicle shooting image enhancement algorithm based on Retinex comprises the following steps:

s1, enhancing the poor-quality image shot by the unmanned aerial vehicle by adopting a multi-scale Retinex MSRCP model;

s2, adjusting control parameters of the MSRCP model based on the MSRCP model by using a two-stage optimization algorithm;

s3, the two-stage optimization algorithm of the MSRCP model is Rao-2 algorithm and NM algorithm, wherein the Rao-2 algorithm is used for global search, and the NM algorithm is responsible for local search;

s4, performing global search by using Rao-2 algorithm to obtain a local optimal solution of the target function;

s5, improving the result through local search by using an NM simplex method;

and S6, taking the finally obtained optimal solution as a parameter of the MSRCP model to achieve the optimal image enhancement effect.

In the present invention, in step S2, the MSRCP model can be expressed by equations (1) and (2):

wherein SRi、SGi、SBiIs the three color channels of the input image S, SintIs thatThe intensity of the image to be input is,is the output of the MSR model applied to the S image, fcbIs a color balance function that expands the value of a color channel into two values, the percentage of top clipped pixels (pt) and the percentage of bottom clipped pixels (pb).

In the invention, in order to find suitable parameters in different image scenes, the MSRCP model is converted into an optimization problem, as shown in formula (3):

51≤σ2≤100

101≤σ3≤255

0.01≤pt≤0.05

0.95≤pb≤0.99

where S is the input image, σ1、σ2、σ3、pt、pbIs a control parameter of the MSRCP model and CEIQ is an image quality metric based on contrast enhancement.

In the present invention, in step S4, the update strategy of the Rao-2 algorithm is defined as equations (4) and (5):

P′j,k,i=Pj,k,i+r1,j,i(Pj,best,i-Pj,worst,i)+r2,j,i(|Pj,k,iorPj,l,i|-|Pj,l,iorPj,k,i|) (4)

wherein P isj,best,iAnd Pj,worst,iAre respectively jthBest and worst candidate solutions for variables, P'j,k,iIs Pj,k,iUpdated solution, r1,j,iAnd r2,j,iIs jthTwo random numbers in the period, the value of which is 0, 1]In the range of f (P)k,i) And from candidate solution Pk,iAnd obtaining the fitness value.

In the invention, in step S5, on the basis of Rao-2 results, an NM algorithm proposed by Nelder and Mead is adopted, the algorithm belongs to a non-derivative nonlinear optimization search method, only function values are used for minimizing a scalar value nonlinear function, no derivative information is generated, the simplex of (n +1) vertexes is rescaled through four basic processes of initial, reflection, expansion and contraction according to local behaviors of the function, and through the steps, the simplex can be self-improved and gradually approaches to an optimal solution.

In the invention, in step S6, the parameters of Retinex are optimized by the improved Rao-2 algorithm to realize the optimal parameters for image enhancement.

In conclusion, the Retinex-based unmanned aerial vehicle shot image enhancement algorithm automatically adjusts the control parameters of the MSRCP model by using an improved Rao-2 algorithm, in order to obtain the optimal parameter setting, the improved Rao-2 algorithm comprises two search stages of global search and local search, the Rao-2 algorithm is used for carrying out global search, the candidate solution of the Rao-2 algorithm is iteratively updated based on random interaction between the best solution and the worst solution, any parameter specific to the algorithm is not needed, the calculation cost of the adjustment parameters can be avoided, and then the solution obtained by the Rao-2 algorithm is further improved by using a Nelder-Mead (NM) algorithm; the combination of Rao-2 and simplex algorithm can enhance the exploration and development capability of Rao-2 algorithm, and simultaneously optimize the algorithm to finally obtain the optimal control parameters of the MSRCP model so as to optimize the optimal optimization result of the degree required by the unmanned aerial vehicle to shoot images;

then, an MSRCP model of multi-scale Retinex is adopted to carry out enhancement processing on the inferior images shot by the unmanned aerial vehicle, the hyper-parameters of the MSRCP are automatically adjusted through a two-stage evolutionary computing algorithm, in the two-stage optimization algorithm, the Rao-2 algorithm is firstly applied to carry out global search to obtain a local optimal solution of an objective function, then an NM simplex method is used to improve results through local search, and the final optimal solution is used as the parameters of the MSRCP model to achieve the optimal image enhancement effect.

The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be able to cover the technical scope of the present invention and the equivalent alternatives or modifications according to the technical solution and the inventive concept of the present invention within the technical scope of the present invention.

完整详细技术资料下载
上一篇:石墨接头机器人自动装卡簧、装栓机
下一篇:一种基于优化BP神经网络的MPO表面复原系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!