CN108198156A - A kind of Enhancement Method and device of crop leaf image - Google Patents

A kind of Enhancement Method and device of crop leaf image Download PDF

Info

Publication number
CN108198156A
CN108198156A CN201711260921.1A CN201711260921A CN108198156A CN 108198156 A CN108198156 A CN 108198156A CN 201711260921 A CN201711260921 A CN 201711260921A CN 108198156 A CN108198156 A CN 108198156A
Authority
CN
China
Prior art keywords
image
coloured image
sub
crop leaf
images
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201711260921.1A
Other languages
Chinese (zh)
Other versions
CN108198156B (en
Inventor
王志彬
王开义
潘守慧
赵向宇
刘忠强
韩焱云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Research Center for Information Technology in Agriculture
Original Assignee
Beijing Research Center for Information Technology in Agriculture
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Research Center for Information Technology in Agriculture filed Critical Beijing Research Center for Information Technology in Agriculture
Priority to CN201711260921.1A priority Critical patent/CN108198156B/en
Publication of CN108198156A publication Critical patent/CN108198156A/en
Application granted granted Critical
Publication of CN108198156B publication Critical patent/CN108198156B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20224Image subtraction

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The present invention provides a kind of Enhancement Method and device of crop leaf image, including:S1, collected coloured image is zoomed in and out, obtains crop leaf coloured image;S2, crop leaf coloured image is filtered based on improved guiding filtering algorithm, obtains the first coloured image;S3, first coloured image is subtracted with the crop leaf coloured image, obtains the second coloured image, second coloured image is the detail pictures of first coloured image;The contrast of each pixel of S4, the mean value based on the pixel brightness value in second coloured image and second coloured image merges first coloured image and second coloured image, obtains the enhancing image of crop leaf.The present invention enhances crop leaf image, reduces influence of noise, highlights the useful information in image, improves picture quality;The problems such as overcoming cross-color in the prior art, enhancing effect unobvious.

Description

A kind of Enhancement Method and device of crop leaf image
Technical field
The present invention relates to digital image processing techniques field, more particularly, to a kind of enhancing side of crop leaf image Method and device.
Background technology
Blade is that most sensitive organ is reacted in crop formalness.It can be accurately real according to complete leaf image The judgement of existing crop species ownership, the monitoring of upgrowth situation, identification of pest and disease damage etc..Crop leaf figure is acquired under the environment of crop field During picture, due to the influence of the disturbing factors such as environment complexity, illumination variation, haze, weather, acquired crop leaf is seriously reduced The quality of picture.At present, common image enhancement technique effect when enhancing leaf image is not very good.
Primarily now there are several methods for carrying out leaf image enhancing.First, carry out image increasing using median filtering technology By force, when image edge information is more complicated, effect is poor.Second is that Wavelet Transform, this method is then primarily present more The problem of calculation amount of grade wavelet decomposition is larger, and image enhancement efficiency is low, and the factor of human visual system is not accounted for, enhance Easily there is distortion phenomenon in image afterwards, it is difficult to obtain satisfactory image enhancement effects.Followed by based on the figure of Retinex theories Image intensifying method and the single scale Retinex developed on this basis, multiple dimensioned Retinex and multiple dimensioned with color recieving The innovatory algorithms such as Retinex algorithm are primarily present the problem of will appear different degrees of chromatic distortion.
Invention content
The present invention provides a kind of Enhancement Method and device of a kind of crop leaf image for overcoming the above problem.
According to an aspect of the present invention, a kind of Enhancement Method of crop leaf image is provided, including:S1, for acquisition To coloured image zoom in and out, obtain crop leaf coloured image;S2, based on improved guiding filtering algorithm to the crop Blade coloured image is filtered, and obtains the first coloured image;S3, described is subtracted with the crop leaf coloured image One coloured image obtains the second coloured image, and second coloured image is the detail pictures of first coloured image;S4、 The contrast of each pixel of mean value and second coloured image based on the pixel brightness value in second coloured image, First coloured image and second coloured image are merged, obtain the enhancing image of crop leaf.
Preferably, step S1 further comprises:The collected coloured image is carried out based on bilinear interpolation method Normalized obtains the crop leaf coloured image, and the size of the crop leaf coloured image is col × row, In, col is the number of pixels of the preset crop leaf coloured image on the width, and row is the preset crop leaf The number of pixels of coloured image in height.
Preferably, it is further included after step S4:S5, the enhancing image of the crop leaf is normalized, obtained Take normalized color image.
Preferably, step S2 further comprises:S21, for the crop leaf coloured image on RGB color Green sub-image corresponding to red red sub-images, corresponding to green and the blue sub-image corresponding to blue, are obtained respectively Take filtering after red sub-images, filtering after green sub-image and filtering after blue sub-image;S22, will red son after the filtering Blue sub-image combines after green sub-image and the filtering after image, the filtering, obtains first coloured image.
Preferably, step S21 further comprises:S211, by the following group formula, setting radius is obtained based on least square method In the range of the red sub-images center pixel neighborhood of a point in linear coefficient:
Wherein, E for minimize cost function, i be neighborhood window in pixel, ωkFor neighborhood window, N is neighborhood window The number of pixel, F in mouthfuliFor navigational figure, piFor red sub-images,For the edge weights factor, γ is constraint factor, ε is setup parameter, | gr (k) | for the gradient magnitude of all gradient directions comprehensive at field window center point k, akAnd bkIt is neighbour Linear coefficient in domain;| gr (i) | the gradient magnitude for comprehensive all gradient directions;
T is gradient direction, GtImage gradient amplitude during for direction t;
S212, according to the linear coefficient in the neighborhood and the navigational figure, obtained by following formula red after the filtering Dice image:
Wherein, qiFor red sub-images after filtering, FiFor navigational figure, akAnd bkIt is the linear coefficient in neighborhood, i is Pixel in neighborhood window, ωkFor neighborhood window;
S213, the method by step S211 to S212 obtain green sub-image and the filtering after the filtering respectively Blue sub-image afterwards.
Preferably, step S4 further comprises:S41, the correspondence for second coloured image on RGB color In red red sub-images, the green sub-image corresponding to green and the blue sub-image corresponding to blue, obtain increase respectively Blue sub-image after green sub-image and enhancing after red sub-images, enhancing after strong;
Red sub-images are obtained by following formula after the enhancing:
Wherein, 1≤c≤col, 1≤r≤row, Img are red sub-images after enhancing, and Ims is red sub-images, and col is The number of pixels of the preset crop leaf coloured image on the width, row are the preset crop leaf coloured image Number of pixels in height, mean values of the mean (L) for the pixel brightness value in second coloured image, wl(c,r)It is described The contrast of any pixel of second coloured image;Obtain after the enhancing green sub-image and described respectively by the above method Blue sub-image after enhancing;S42, will be after green sub-image after red sub-images, the enhancing after the enhancing and the enhancing Blue sub-image combines, and obtains enhanced second coloured image;S43, according to enhanced second coloured image and institute The first coloured image is stated, the enhancing image of the crop leaf is obtained by following formula:
I5=II4+I3
Wherein, I5For the enhancing image of crop leaf, II4For enhanced second coloured image, I3For the first cromogram Picture.
Preferably, it is further included before step S41:S40, the crop leaf coloured image is converted from RGB color To Lab color spaces.
Preferably, in step S41, the contrast of any pixel of second coloured image is obtained according to the following formula:
Wl(c, r)=value(c, r)/mean(L);
Wherein, wl(c,r)The contrast of any pixel for second coloured image, value(c,r)For the described second coloured silk The pixel value of any pixel of color image, mean values of the mean (L) for the pixel brightness value in second coloured image, (c, r) Any pixel for second coloured image.
Preferably, step S5 further comprises:S51, for the crop leaf enhancing image on RGB color Correspond to red red sub-images, the green sub-image corresponding to green and the blue sub-image corresponding to blue, respectively Obtain normalization red sub-images, normalization green sub-image and normalization blue sub-image;
Any pixel point of the normalization red sub-images is obtained by following two formulas:
Wherein, FDAny pixel point of (c, r) for the first normalization red sub-images, FI(c, r) is appointing for red sub-images One pixel, VminFor the minimum pixel value of red sub-images, Dynamic is weight parameter, VstdPixel for red sub-images The mean square deviation of value, VmaxFor the max pixel value of red sub-images, 1≤c≤col, 1≤r≤row, col are the preset work The number of pixels of object blade coloured image on the width, row are the picture of the preset crop leaf coloured image in height Plain number;
Wherein, FE(c, r) be normalize red sub-images any pixel point, FD(c, r) is the red subgraph of the first normalization Any pixel point of picture;Obtain the normalization green sub-image and the blue subgraph of the normalization respectively by the above method Picture;S52, the normalization red sub-images, the normalization green sub-image and the normalization blue sub-image are combined, Obtain the normalized color image.
According to another aspect of the present invention, a kind of intensifier of crop leaf image is provided, including:Zoom module, For being zoomed in and out for collected coloured image, crop leaf coloured image is obtained;Filtering process module, for being based on changing Into guiding filtering algorithm the crop leaf coloured image is filtered, obtain the first coloured image;Obtain details Image module for subtracting first coloured image with the crop leaf coloured image, obtains the second coloured image, described Second coloured image is the detail pictures of first coloured image;Enhancing image module is obtained, for being based on the crop leaf The contrast of the mean value of pixel brightness value in piece coloured image and each pixel of the crop leaf coloured image, by described in First coloured image and second coloured image are merged, and obtain the enhancing image of crop leaf.
The Enhancement Method and device of a kind of crop leaf image provided by the invention, by using image processing techniques to making Object leaf image filters and fusion, and crop leaf image is enhanced, reduces influence of noise, highlights having in image With information, picture quality is improved;The problems such as overcoming cross-color in the prior art, enhancing effect unobvious.
Description of the drawings
Fig. 1 is a kind of flow chart of the Enhancement Method of crop leaf image in the embodiment of the present invention;
Fig. 2 is a kind of structure diagram of the intensifier of crop leaf image in the embodiment of the present invention.
Specific embodiment
With reference to the accompanying drawings and examples, the specific embodiment of the present invention is described in further detail.Implement below Example is used to illustrate the present invention, but be not limited to the scope of the present invention.
For problem of the prior art, the present invention provides a kind of Enhancement Method of crop leaf image, to improve crop Leaf image quality reduces influence of noise, protrudes the useful information in crop leaf image, is carried for subsequent image segmentation and feature The processing such as take to provide basis.
Coloured image is acquired first with image capture device, described image collecting device is set for camera or mobile phone etc. Monitoring system standby or for crop field.
Fig. 1 is a kind of flow chart of the Enhancement Method of crop leaf image in the embodiment of the present invention, as shown in Figure 1, institute Enhancement Method is stated to include:S1, collected coloured image is zoomed in and out, obtains crop leaf coloured image;S2, based on changing Into guiding filtering algorithm the crop leaf coloured image is filtered, obtain the first coloured image;S3, with described Crop leaf coloured image subtracts first coloured image, obtains the second coloured image, second coloured image is described The detail pictures of first coloured image;S4, the mean value based on the pixel brightness value in second coloured image and described second The contrast of each pixel of coloured image merges first coloured image and second coloured image, obtains The enhancing image of crop leaf.
Specifically, the mean value of the pixel brightness value in step S4 in the second coloured image is by the second coloured image What the brightness value of all pixels obtained.
The Enhancement Method of a kind of crop leaf image provided by the invention, by using image processing techniques to crop leaf Image filtering and fusion enhance crop leaf image, reduce influence of noise, highlight the useful letter in image Breath, improves picture quality;The problems such as overcoming cross-color in the prior art, enhancing effect unobvious.
On the basis of above-described embodiment, step S1 further comprises:It is collected based on bilinear interpolation method to described Coloured image be normalized, obtain the crop leaf coloured image, the size of the crop leaf coloured image For col × row, wherein, col is the number of pixels of the preset crop leaf coloured image on the width, and row is preset The number of pixels of the crop leaf coloured image in height.
Specifically, bilinear interpolation, also known as bilinear interpolation.Mathematically, there are two variables for bilinear interpolation The linear interpolation extension of interpolating function, core concept is to carry out once linear interpolation respectively in both direction.Bilinear interpolation As a kind of interpolation algorithm in numerical analysis, it is widely used in signal processing, digital picture and video processing etc..
On the basis of above-described embodiment, further included after step S4:S5, the enhancing image of the crop leaf is carried out Normalized obtains normalized color image.
Specifically, normalization is a kind of mode of simplified calculating, will there is the expression formula of dimension, by transformation, turns to nothing The expression formula of dimension, becomes scalar.This method is all often used in a variety of calculating.
In the above-described embodiments, step S2 has carried out filtering process, and the present embodiment is made step S2 and further said It is bright.
Step S2 further comprises:S21, for crop leaf coloured image the corresponding on RGB color Red red sub-images, the green sub-image corresponding to green and the blue sub-image corresponding to blue, obtains filtering respectively Afterwards red sub-images, filtering after green sub-image and filtering after blue sub-image;S22, by red sub-images, institute after the filtering It states after filtering that blue sub-image combines after green sub-image and the filtering, obtains first coloured image.
Specifically, filtering (Wave filtering) be by the operation that specific band frequency filters out in signal, be inhibit and Prevent an important measures of interference.Filtering is divided into classical filter and modern filtering.
Step S21 in above-described embodiment is specifically unfolded through this embodiment.
Step S21 further comprises:
S211, by the following group formula, obtained in setting radius in the red sub-images based on least square method Linear coefficient in imago element neighborhood of a point:
Wherein, E for minimize cost function, i be neighborhood window in pixel, ωkFor neighborhood window, N is neighborhood window The number of pixel, F in mouthfuliFor navigational figure, piFor red sub-images,For the edge weights factor, γ is constraint factor, ε is setup parameter, | gr (k) | for the gradient magnitude of all gradient directions comprehensive at field window center point k, akAnd bkIt is neighbour Linear coefficient in domain;| gr (i) | the gradient magnitude for comprehensive all gradient directions.
T is gradient direction, GtImage gradient amplitude during for direction t.
S212, according to the linear coefficient in the neighborhood and the navigational figure, obtained by following formula red after the filtering Dice image:
Wherein, qiFor red sub-images after filtering, FiFor navigational figure, akAnd bkIt is the linear coefficient in neighborhood, i is Pixel in neighborhood window, ωkFor neighborhood window.
S213, the method by step S211 to S212 obtain green sub-image and the filtering after the filtering respectively Blue sub-image afterwards.
Specifically, step S211 to S212 is the procedure of red sub-images after acquisition filtering, and the present embodiment is come It says, blue sub-image and the method class of red sub-images after acquisition filtering after green sub-image and acquisition filter after acquisition filtering Seemingly, it is to be obtained by the linear coefficient in neighborhood and navigational figure.This is described one by one below.
Step S21111 to step S21112 is the process of green sub-image after acquisition filtering.
S21111, pass through the following group formula, the neighbour of the central pixel point based on the least square method acquisition green sub-image Linear coefficient in domain:
Wherein, E for minimize cost function, i be neighborhood window in pixel, ωkFor neighborhood window, N is neighborhood window The number of pixel, F in mouthfuliFor navigational figure, piFor green sub-image,For the edge weights factor, γ is constraint factor, ε is setup parameter, | gr (k) | for the gradient magnitude of all gradient directions comprehensive at field window center point k, akAnd bkIt is neighbour Linear coefficient in domain;| gr (i) | the gradient magnitude for comprehensive all gradient directions.
T is gradient direction, GtImage gradient amplitude during for direction t.
S21112, according to the linear coefficient in the neighborhood and the navigational figure, after obtaining the filtering by following formula Green sub-image;
Wherein, qiFor green sub-image after filtering, FiFor navigational figure, akAnd bkIt is the linear coefficient in neighborhood, i is Pixel in neighborhood window, ωkFor neighborhood window.
Step S21121 to step S21122 is the process of blue sub-image after acquisition filtering.
S21121, pass through the following group formula, the neighbour of the central pixel point based on the least square method acquisition blue sub-image Linear coefficient in domain:
Wherein, E for minimize cost function, i be neighborhood window in pixel, ωkFor neighborhood window, N is neighborhood window The number of pixel, F in mouthfuliFor navigational figure, piFor blue sub-image,For the edge weights factor, γ is constraint factor, ε is setup parameter, | gr (k) | for the gradient magnitude of all gradient directions comprehensive at field window center point k, akAnd bkIt is neighbour Linear coefficient in domain;| gr (i) | the gradient magnitude for comprehensive all gradient directions.
T is gradient direction, GtImage gradient amplitude during for direction t.
S21122, according to the linear coefficient in the neighborhood and the navigational figure, after obtaining the filtering by following formula Blue sub-image;
Wherein, qiFor blue sub-image after filtering, FiFor navigational figure, akAnd bkIt is the linear coefficient in neighborhood, i is Pixel in neighborhood window, ωkFor neighborhood window.
Specifically, the present embodiment preferably carries out operation using least square method, and other optimization methods can also be used.
Further, navigational figure can be selected according to practical application, and in the present embodiment, preferably navigational figure is with treating Filtering image is same image.
As a preferred embodiment, explanation is further explained for step S3 in the present embodiment.
Step S3 further comprises:First coloured image is subtracted with the crop leaf coloured image, passes through following formula The second coloured image is obtained, second coloured image is the detail pictures of first coloured image:
I4=I2-I3
Wherein, I4For the second coloured image, I2For crop leaf coloured image, I3For the first coloured image.
Specifically, i.e. respective pixel does subtraction to image subtraction between the two images, i.e., in the second coloured image and Respective pixel does subtraction between third coloured image.
The present embodiment is made step S4 and is further explained below.
Step S4 further comprises:
S41, red red sub-images, correspondence are corresponded on RGB color for second coloured image Green sub-image in green and the blue sub-image corresponding to blue obtain green after red sub-images, enhancing after enhancing respectively Blue sub-image after dice image and enhancing.
Red sub-images are obtained by following formula after the enhancing:
Wherein, 1≤c≤col, 1≤r≤row, Img are red sub-images after enhancing, and Ims is red sub-images, and col is The number of pixels of the preset crop leaf coloured image on the width, row are the preset crop leaf coloured image Number of pixels in height, mean values of the mean (L) for the pixel brightness value in second coloured image, wl(c,r)It is described The contrast of any pixel of second coloured image.
Obtain after the enhancing blue sub-image after green sub-image and the enhancing respectively by the above method.
S42, by blue sub-image after green sub-image after red sub-images, the enhancing after the enhancing and the enhancing Combination obtains enhanced second coloured image.
S43, according to enhanced second coloured image and first coloured image, the work is obtained by following formula The enhancing image of object blade:
I5=II4+I3
Wherein, I5For the enhancing image of crop leaf, II4For enhanced second coloured image, I3For the first cromogram Picture.
It should be noted that in the present embodiment, obtain green sub-image and blue sub-image after acquisition enhancing after enhancing Method and step with obtain enhance after red sub-images it is similar, using identical step, details are not described herein.
A kind of Enhancement Method of crop leaf image provided by the invention is obtained according to mean value and contrast by setting and increased Image after strong, can greatly improve the adaptability of algorithm according to the adaptive adjustment weights of the brightness of crop leaf image, Promote the application of the Enhancement Method of crop leaf image.
Based on above-described embodiment, further included before step S41:S40, by the crop leaf coloured image from RGB color Space is transformed into Lab color spaces.
It makes explanations below to the concret moun occurred in the present embodiment:RGB color is with R (Red, red), G Based on three kinds of Essential colour of (Green, green), B (Blue, blue), different degrees of superposition is carried out, generates abundant and extensive face Color, so being commonly called as three primary colours pattern.RGB color be life in a most common model, television set, computer CRT show It is all using this model to show the major part such as device.Any one of nature color can be mixed by three kinds of coloured light of red, green, blue It closes.
Lab color spaces are a kind of color spaces being of little use.Lab color spaces are in International Commission on Illumination in 1931 (CIE) it is set up on the basis of the color measurements international standard formulated.It 1976, is officially named after modified CIELab.Lab color spaces are a kind of device-independent color system and a kind of color system based on physiological characteristic.This It also means that, is the visual response that people is described with method for digitizing.L * component in Lab color spaces is used to represent The brightness of pixel, value range are [0,100], are represented from black to pure white;A represents the range from red to green, value model Enclose is [127, -128];B represents the range from yellow to blue, and value range is [127, -128].
Based on above-described embodiment, below the present embodiment for each pixel of the second coloured image in step S41 pair Acquisition methods than degree make further instructions.
In step S41, the contrast of any pixel of second coloured image is obtained according to the following formula:
wl(c,r)=value(c,r)/mean(L);
Wherein, wl(c,r)The contrast of any pixel for second coloured image, value(c,r)For the described second coloured silk The pixel value of any pixel of color image, mean values of the mean (L) for the pixel brightness value in second coloured image, (c, r) Any pixel for second coloured image.
Specifically, contrast refer to light and shade region in piece image it is most bright it is white and most dark it is black between different brightness layers The measurement of grade, bigger represent of disparity range compare bigger, smaller, the good contrast ratio 120 of the smaller representative comparison of disparity range:1 just Lively, abundant color is easily shown, when contrast ratio is up to 300:When 1, the color of each rank can be supported.
In above-described embodiment, step S5 is the operation being normalized, below the present embodiment for step S5 into advance one Step ground explanation.
Step S5 further comprises:
S51, red red subgraph is corresponded on RGB color for the enhancing image of the crop leaf Picture, the green sub-image corresponding to green and the blue sub-image corresponding to blue obtain normalization red sub-images, return respectively One changes green sub-image and normalization blue sub-image.
Any pixel point of the normalization red sub-images is obtained by following two formulas:
Wherein, FDAny pixel point of (c, r) for the first normalization red sub-images, FI(c, r) is appointing for red sub-images One pixel, VminFor the minimum pixel value of red sub-images, Dynamic is weight parameter, VstdPixel for red sub-images The mean square deviation of value, VmaxFor the max pixel value of red sub-images, 1≤c≤col, 1≤r≤row, col are the preset work The number of pixels of object blade coloured image on the width, row are the picture of the preset crop leaf coloured image in height Plain number.
Wherein, FE(c, r) be normalize red sub-images any pixel point, FD(c, r) is the red subgraph of the first normalization Any pixel point of picture.
Obtain the normalization green sub-image and the normalization blue sub-image respectively by the above method.
S52, red sub-images, the normalization green sub-image and the normalization blue sub-image are normalized by described Combination, obtains the normalized color image.
Specifically, above-mentioned normalization algorithm can also be realized according to other mapping algorithms, for example, gamma gamma correction or Person's linear stretch etc., it is without being limited thereto.
As a preferred embodiment, the present invention is illustrated to be further explained with a specific example below.
First with the coloured image of image capture device acquisition crop leaf, described image collecting device for camera or The equipment such as person's mobile phone or the monitoring system for crop field.
Secondly collected coloured image is zoomed in and out, obtains the crop leaf coloured image.This process packet It includes:The collected coloured image is normalized based on bilinear interpolation method, it is color to obtain the crop leaf Color image, the size of the crop leaf coloured image is col × row, wherein, col is colored for the preset crop leaf The number of pixels of image on the width, row are the number of pixels of the preset crop leaf coloured image in height.It will adopt The color image size collected is 5240 × 6680, is scaled to the crop leaf coloured image that size is 5000 × 6000.
Then crop leaf coloured image is filtered based on improved guiding filtering algorithm, it is colored to obtain first Image.Including:
Red red sub-images, correspondence are corresponded on RGB color for the crop leaf coloured image Green sub-image in green and the blue sub-image corresponding to blue obtain green after red sub-images, filtering after filtering respectively Blue sub-image after dice image and filtering.
Above-mentioned steps further comprise:By the following group formula, obtained based on least square method described in setting radius Linear coefficient in the center pixel neighborhood of a point of red sub-images:
Wherein, E for minimize cost function, i be neighborhood window in pixel, ωkFor neighborhood window, N is neighborhood window The number of pixel, F in mouthfuliFor navigational figure, piFor red sub-images,For the edge weights factor, γ is constraint factor, ε is setup parameter, | gr (k) | for the gradient magnitude of all gradient directions comprehensive at field window center point k, akAnd bkIt is neighbour Linear coefficient in domain;| gr (i) | the gradient magnitude for comprehensive all gradient directions;
T is gradient direction, GtImage gradient amplitude during for direction t.
According to the linear coefficient in the neighborhood and the navigational figure, red subgraph after the filtering is obtained by following formula Picture;
Wherein, qiFor red sub-images after filtering, FiFor navigational figure, akAnd bkIt is the linear coefficient in neighborhood, i is Pixel in neighborhood window, ωkFor neighborhood window.
By the above method, blue sub-image after green sub-image and the filtering is obtained after the filtering respectively.
By blue sub-image group after green sub-image after red sub-images, the filtering after the filtering and the filtering It closes, obtains first coloured image.
In the present embodiment, rs=8, ε=0.12, rs is setting radius value.The value of γ, T can be carried out according to practical application Setting.When calculating image progress gradient magnitude, may be used such as Sobel, Tuscany, Gauss-Laplace Method, but not limited to this.The present embodiment γ be 0.15 times of maximum gradient magnitude, T=8, using 5 × 58 direction Sobel moulds Plate, to enhance marginal information.
This 8 directions are 0 °, 22.5 °, 45 °, 67.5 °, 90 °, 112.5 °, 135 ° and 157.5 ° respectively.
8 direction templates are:
A1=[1 4641;2 8 12 8 2;0 0 0 0 0;-2 -8 -12 -8 -2;-1 -4 -6 -4 -1];
A2=[4 6412;1 12 12 8 0;2 8 0 -8 -2;0 -8 -12 -12 -1;-2 -1 -4 -6 - 4];
A3=[6 4120;4 12 8 0 -2;1 8 0 -8 -1;2 0 -8 -12 -4;0 -2 -1 -4 -6];
A4=[4 12 0-2;6 12 8 -8 -1;4 12 0 -12 -4;1 8 -8 -12 -6;2 0 -2 -1 - 4];
A5=[1 2 0-2-1;4 8 0 -8 -4;6 12 0 -12 -6;4 8 0 -8 -4;1 2 0 -2 -1];
A6=[2 0-2-1-4;1 8 -8 -12 -6;4 12 0 -12 -4;6 12 8 -8 -1;4 1 2 0 - 2];
A7=[0-2-1-4-6;2 0 -8 -12 -4;1 8 0 -8 -1;4 12 8 0 -2;6 4 1 2 0];
A8=[- 2-1-4-6-4;0 -8 -12 -12 -1;2 8 0 -8 -2;1 12 12 8 0;4 6 4 1 2]。
Wherein, A1~A8 is respectively 0 °, 22.5 °, 45 °, 67.5 °, 90 °, 112.5 °, 135 °, the mould corresponding to 157.5 ° Plate, 8 direction templates is also can rule of thumb be set.
First coloured image is subtracted with the crop leaf coloured image later, obtains the second coloured image, it is described Second coloured image is the detail pictures of first coloured image.
The crop leaf coloured image is transformed into Lab color spaces from RGB color again.
The contrast of any pixel of second coloured image is obtained according to the following formula:
wl(c,r)=value(c,r)/mean(L);
Wherein, wl(c,r)The contrast of any pixel for second coloured image, value(c,r)For the described second coloured silk The pixel value of any pixel of color image, mean values of the mean (L) for the pixel brightness value in second coloured image, (c, r) Any pixel for second coloured image.
Be then based on the pixel brightness value in second coloured image mean value and second coloured image it is each First coloured image and second coloured image are merged, obtain the enhancing of crop leaf by the contrast of pixel Image.It specifically includes:
Red red sub-images are corresponded to, corresponding to green on RGB color for second coloured image The green sub-image of color and the blue sub-image corresponding to blue, green after red sub-images, enhancing after acquisition enhances respectively Blue sub-image after image and enhancing;
Red sub-images are obtained by following formula after the enhancing:
Wherein, 1≤c≤col, 1≤r≤row, Img are red sub-images after enhancing, and Ims is red sub-images, and col is The number of pixels of the preset crop leaf coloured image on the width, row are the preset crop leaf coloured image Number of pixels in height, mean values of the mean (L) for the pixel brightness value in second coloured image, wl(c,r)It is described The contrast of any pixel of second coloured image;
Obtain after the enhancing blue sub-image after green sub-image and the enhancing respectively by the above method.
By blue sub-image group after green sub-image after red sub-images, the enhancing after the enhancing and the enhancing It closes, obtains enhanced second coloured image
According to enhanced second coloured image and first coloured image, the crop leaf is obtained by following formula The enhancing image of piece:
I5=II4+I3
Wherein, I5For the enhancing image of crop leaf, II4For enhanced second coloured image, I3For the first cromogram Picture.
Finally the 5th coloured image is normalized, obtains normalized color image:
Red red sub-images, right are corresponded on RGB color for the enhancing image of the crop leaf Normalization red sub-images, normalization should be obtained respectively in the green sub-image of green and corresponding to blue blue sub-image Green sub-image and normalization blue sub-image;
Any pixel point of the normalization red sub-images is obtained by following two formulas:
Wherein, FDAny pixel point of (c, r) for the first normalization red sub-images, FI(c, r) is appointing for red sub-images One pixel, VminFor the minimum pixel value of red sub-images, Dynamic is weight parameter, VstdPixel for red sub-images The mean square deviation of value, VmaxFor the max pixel value of red sub-images, 1≤c≤col, 1≤r≤row, col are the preset work The number of pixels of object blade coloured image on the width, row are the picture of the preset crop leaf coloured image in height Plain number;
Wherein, FE(c, r) be normalize red sub-images any pixel point, FD(c, r) is the red subgraph of the first normalization Any pixel point of picture,
Obtain the normalization green sub-image and the normalization blue sub-image respectively by the above method.
By the normalization red sub-images, the normalization green sub-image and the normalization blue sub-image group It closes, obtains the normalized color image.
Based on above-described embodiment, Fig. 2 is a kind of structure of the intensifier of crop leaf image in the embodiment of the present invention Schematic diagram, as shown in Fig. 2, including:Zoom module for being zoomed in and out for collected coloured image, obtains crop leaf Coloured image;Filtering process module filters the crop leaf coloured image for being based on improved guiding filtering algorithm Wave processing, obtains the first coloured image;Detail pictures module is obtained, for subtracting described the with the crop leaf coloured image One coloured image obtains the second coloured image, and second coloured image is the detail pictures of first coloured image;It obtains Enhance image module, it is color for the mean value based on the pixel brightness value in the crop leaf coloured image and the crop leaf The contrast of each pixel of color image merges first coloured image and second coloured image, obtains and makees The enhancing image of object blade.
The Enhancement Method and device of a kind of crop leaf image provided by the invention, by using image processing techniques to making Object leaf image filters and fusion, and crop leaf image is enhanced, reduces influence of noise, highlights having in image With information, picture quality is improved;The problems such as overcoming cross-color in the prior art, enhancing effect unobvious.Increase Strong method speed is fast, enhancing effect is apparent, additionally it is possible to applied to mobile terminals such as smart mobile phones, be suitble to field operation, widen The application range of this method.Enhanced image is obtained according to mean value and contrast by setting, it can be according to crop leaf figure The adaptive adjustment weights of the brightness of picture greatly improve the adaptability of algorithm, promote the Enhancement Method of crop leaf image Application.
Finally, method of the invention is only preferable embodiment, is not intended to limit the scope of the present invention.It is all Within the spirit and principles in the present invention, any modification, equivalent replacement, improvement and so on should be included in the protection of the present invention Within the scope of.

Claims (10)

1. a kind of Enhancement Method of crop leaf image, which is characterized in that including:
S1, collected coloured image is zoomed in and out, obtains crop leaf coloured image;
S2, the crop leaf coloured image is filtered based on improved guiding filtering algorithm, it is colored obtains first Image;
S3, first coloured image is subtracted with the crop leaf coloured image, obtains the second coloured image, described second is color Color image is the detail pictures of first coloured image;
Each pixel of S4, the mean value based on the pixel brightness value in second coloured image and second coloured image Contrast merges first coloured image and second coloured image, obtains the enhancing image of crop leaf.
2. Enhancement Method according to claim 1, which is characterized in that step S1 further comprises:
The collected coloured image is normalized based on bilinear interpolation method, it is color to obtain the crop leaf Color image, the size of the crop leaf coloured image is col × row, wherein, col is colored for the preset crop leaf The number of pixels of image on the width, row are the number of pixels of the preset crop leaf coloured image in height.
3. Enhancement Method according to claim 1, which is characterized in that further included after step S4:
S5, the enhancing image of the crop leaf is normalized, obtains normalized color image.
4. Enhancement Method according to claim 1, which is characterized in that step S2 further comprises:
S21, red red sub-images, correspondence are corresponded on RGB color for the crop leaf coloured image Green sub-image in green and the blue sub-image corresponding to blue obtain green after red sub-images, filtering after filtering respectively Blue sub-image after dice image and filtering;
S22, by blue sub-image group after green sub-image after red sub-images, the filtering after the filtering and the filtering It closes, obtains first coloured image.
5. Enhancement Method according to claim 4, which is characterized in that step S21 further comprises:
S211, by the following group formula, the middle imago of the red sub-images in setting radius is obtained based on least square method Linear coefficient in plain neighborhood of a point:
Wherein, E for minimize cost function, i be neighborhood window in pixel, ωkFor neighborhood window, N is picture in neighborhood window The number of vegetarian refreshments, FiFor navigational figure, piFor red sub-images,For the edge weights factor, γ is constraint factor, and ε is sets Determine parameter, | gr (k) | for the gradient magnitude of all gradient directions comprehensive at field window center point k, akAnd bkIt is in neighborhood Linear coefficient;| gr (i) | the gradient magnitude for comprehensive all gradient directions;
T is gradient direction, GtImage gradient amplitude during for direction t;
S212, according to the linear coefficient in the neighborhood and the navigational figure, red son after the filtering is obtained by following formula Image:
Wherein, qiFor red sub-images after filtering, FiFor navigational figure, akAnd bkIt is the linear coefficient in neighborhood, i is neighborhood window Pixel in mouthful, ωkFor neighborhood window;
S213, the method by step S211 to S212 obtain blue after green sub-image and the filtering after the filtering respectively Dice image.
6. Enhancement Method according to claim 1, which is characterized in that step S4 further comprises:
S41, red red sub-images are corresponded to, corresponding to green on RGB color for second coloured image The green sub-image of color and the blue sub-image corresponding to blue, green after red sub-images, enhancing after acquisition enhances respectively Blue sub-image after image and enhancing;
Red sub-images are obtained by following formula after the enhancing:
Wherein, 1≤c≤col, 1≤r≤row, Img are red sub-images after enhancing, and Ims is red sub-images, and col is default Crop leaf coloured image number of pixels on the width, row is the preset crop leaf coloured image in height Number of pixels on degree, mean values of the mean (L) for the pixel brightness value in second coloured image, wl(c,r)It is described second The contrast of any pixel of coloured image;
Obtain after the enhancing blue sub-image after green sub-image and the enhancing respectively by the above method;
S42, by blue sub-image group after green sub-image after red sub-images, the enhancing after the enhancing and the enhancing It closes, obtains enhanced second coloured image;
S43, according to enhanced second coloured image and first coloured image, the crop leaf is obtained by following formula The enhancing image of piece:
I5=II4+I3
Wherein, I5For the enhancing image of crop leaf, II4For enhanced second coloured image, I3For the first coloured image.
7. Enhancement Method according to claim 6, which is characterized in that further included before step S41:
S40, the crop leaf coloured image is transformed into Lab color spaces from RGB color.
8. Enhancement Method according to claim 7, which is characterized in that in step S41, it is color to obtain described second according to the following formula The contrast of any pixel of color image:
wl(c,r)=value(c,r)/mean(L);
Wherein, wl(c,r)The contrast of any pixel for second coloured image, value(c,r)For second coloured image Any pixel pixel value, mean (L) be second coloured image in pixel brightness value mean value, (c, r) is described Any pixel of second coloured image.
9. Enhancement Method according to claim 3, which is characterized in that step S5 further comprises:
S51, red red sub-images, right are corresponded on RGB color for the enhancing image of the crop leaf Normalization red sub-images, normalization should be obtained respectively in the green sub-image of green and corresponding to blue blue sub-image Green sub-image and normalization blue sub-image;
Any pixel point of the normalization red sub-images is obtained by following two formulas:
Wherein, FDAny pixel point of (c, r) for the first normalization red sub-images, FI(c, r) is any picture of red sub-images Vegetarian refreshments, VminFor the minimum pixel value of red sub-images, Dynamic is weight parameter, VstdPixel value for red sub-images Mean square deviation, VmaxFor the max pixel value of red sub-images, 1≤c≤col, 1≤r≤row, col are the preset crop leaf The number of pixels of piece coloured image on the width, row are preset crop leaf coloured image pixel in height Number;
Wherein, FE(c, r) be normalize red sub-images any pixel point, FD(c, r) is the first normalization red sub-images Any pixel point;
Obtain the normalization green sub-image and the normalization blue sub-image respectively by the above method;
S52, red sub-images, the normalization green sub-image and the normalization blue sub-image group are normalized by described It closes, obtains the normalized color image.
10. a kind of intensifier of crop leaf image, which is characterized in that including:
Zoom module for being zoomed in and out for collected coloured image, obtains crop leaf coloured image;
Filtering process module is filtered place for being based on improved guiding filtering algorithm to the crop leaf coloured image Reason obtains the first coloured image;
Detail pictures module is obtained, for subtracting first coloured image with the crop leaf coloured image, obtains second Coloured image, second coloured image are the detail pictures of first coloured image;
Enhancing image module is obtained, for the mean value based on the pixel brightness value in the crop leaf coloured image and the work The contrast of each pixel of object blade coloured image melts first coloured image and second coloured image It closes, obtains the enhancing image of crop leaf.
CN201711260921.1A 2017-12-04 2017-12-04 Crop leaf image enhancement method and device Active CN108198156B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711260921.1A CN108198156B (en) 2017-12-04 2017-12-04 Crop leaf image enhancement method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711260921.1A CN108198156B (en) 2017-12-04 2017-12-04 Crop leaf image enhancement method and device

Publications (2)

Publication Number Publication Date
CN108198156A true CN108198156A (en) 2018-06-22
CN108198156B CN108198156B (en) 2020-06-09

Family

ID=62573521

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711260921.1A Active CN108198156B (en) 2017-12-04 2017-12-04 Crop leaf image enhancement method and device

Country Status (1)

Country Link
CN (1) CN108198156B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110532935A (en) * 2019-08-26 2019-12-03 李清华 A kind of high-throughput reciprocity monitoring system of field crop phenotypic information and monitoring method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100040300A1 (en) * 2008-08-18 2010-02-18 Samsung Techwin Co., Ltd. Image processing method and apparatus for correcting distortion caused by air particles as in fog
CN106803257A (en) * 2016-12-22 2017-06-06 北京农业信息技术研究中心 The dividing method of scab in a kind of crop disease leaf image

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100040300A1 (en) * 2008-08-18 2010-02-18 Samsung Techwin Co., Ltd. Image processing method and apparatus for correcting distortion caused by air particles as in fog
CN106803257A (en) * 2016-12-22 2017-06-06 北京农业信息技术研究中心 The dividing method of scab in a kind of crop disease leaf image

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
TAMAL BOSE著: "《数字信号与图像处理》", 31 July 2006, 高等教育出版社 *
武昆等: "四元数引导滤波彩色图像细节增强", 《计算机辅助设计与图形学学报》 *
莫德举等主编: "《数字图像处理》", 31 January 2010, 北京邮电大学出版社 *
龙鹏等: "LoG边缘算子改进的加权引导滤波算法", 《计算机应用》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110532935A (en) * 2019-08-26 2019-12-03 李清华 A kind of high-throughput reciprocity monitoring system of field crop phenotypic information and monitoring method

Also Published As

Publication number Publication date
CN108198156B (en) 2020-06-09

Similar Documents

Publication Publication Date Title
US20220292658A1 (en) Image fusion method and apparatus, storage medium, and electronic device
CN105915909B (en) A kind of high dynamic range images layered compression method
CN103517046B (en) Method, apparatus and computer program product for capturing video content
CN102722868B (en) Tone mapping method for high dynamic range image
CN106920221B (en) Take into account the exposure fusion method that Luminance Distribution and details are presented
CN106897981A (en) A kind of enhancement method of low-illumination image based on guiding filtering
CN107918929B (en) A kind of image interfusion method, apparatus and system
CN107038680A (en) The U.S. face method and system that adaptive optical shines
CN108230407B (en) Image processing method and device
CN106997584A (en) A kind of haze weather image enchancing method
Hanumantharaju et al. Color image enhancement using multiscale retinex with modified color restoration technique
CN106570850B (en) A kind of image interfusion method
CN107967668A (en) A kind of image processing method and device
CN113132696B (en) Image tone mapping method, image tone mapping device, electronic equipment and storage medium
CN105701773B (en) A kind of method and device of quick processing image
WO2023231583A1 (en) Image processing method and related device thereof
CN111105359B (en) Tone mapping method for high dynamic range image
CN106056565B (en) A kind of MRI and PET image fusion method decomposed based on Multiscale Morphological bilateral filtering and contrast is compressed
CN105354801A (en) HSV color space based image enhancement method
CN110796612A (en) Image enhancement method and system
CN106097261A (en) Image processing method and device
CN106550227A (en) A kind of image saturation method of adjustment and device
CN106709888B (en) A kind of high dynamic range images production method based on human vision model
CN109636739B (en) Detail processing method and device for enhancing image saturation
CN107705263A (en) A kind of adaptive Penetrating Fog method and terminal based on RGB IR sensors

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant