CN107146217B - Image detection method and device - Google Patents

Image detection method and device Download PDF

Info

Publication number
CN107146217B
CN107146217B CN201710227429.8A CN201710227429A CN107146217B CN 107146217 B CN107146217 B CN 107146217B CN 201710227429 A CN201710227429 A CN 201710227429A CN 107146217 B CN107146217 B CN 107146217B
Authority
CN
China
Prior art keywords
image
value
gaussian
pixel
mixture model
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.)
Active
Application number
CN201710227429.8A
Other languages
Chinese (zh)
Other versions
CN107146217A (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 Jiu Rui Technology Co Ltd
Beijing University of Technology
Original Assignee
Beijing Jiu Rui Technology Co Ltd
Beijing University of Technology
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 Jiu Rui Technology Co Ltd, Beijing University of Technology filed Critical Beijing Jiu Rui Technology Co Ltd
Priority to CN201710227429.8A priority Critical patent/CN107146217B/en
Publication of CN107146217A publication Critical patent/CN107146217A/en
Application granted granted Critical
Publication of CN107146217B publication Critical patent/CN107146217B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • 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/20092Interactive image processing based on input by user
    • G06T2207/20104Interactive definition of region of interest [ROI]

Abstract

The invention discloses an image detection method and device. The method comprises the following steps: detecting high-brightness area pixel points in an image to be detected through a double-threshold algorithm; counting a gray level histogram of pixel points in a specified neighborhood except for the pixel points in the highlight region in the image to be detected, and constructing a mixed Gaussian model of gray level distribution of the pixel points except for the pixel points in the highlight region according to the gray level histogram; performing parameter estimation on a Gaussian mixture model of pixel points except for the pixel points in the highlight region by using an expectation maximization algorithm; and determining whether pixel points except the pixel points in the highlight region belong to a target detection region in the image to be detected based on parameter values of the Gaussian mixture model obtained by parameter estimation. According to the image detection method provided by the embodiment of the invention, the region of interest in the image can be accurately detected.

Description

Image detection method and device
Technical Field
The present invention relates to the field of image processing and recognition technologies, and in particular, to an image detection method and apparatus.
Background
With the wide application of image acquisition devices such as digital cameras, ultra-high speed scanners and the like, the technical level and the production efficiency of industrial production are continuously improved, and higher requirements are also imposed on the production detection capability matched with the industrial production technology. The image processing technology is increasingly developed, the image detection technology is widely applied to the fields of industrial production process detection, daily life safety detection and the like, and the production efficiency of enterprises and the living standard of people are greatly improved.
In the technical field of image processing and recognition, generally, an image segmentation method is generally adopted for detecting and recognizing a specific area in an image in the detection of industrial safety. The existing image segmentation method mainly utilizes the integral gray difference between an interested area and a background area to select a proper threshold value to segment an image to obtain the interested area. When the illumination is not uniform or the gray difference between the region to be detected and the background region is small, the region of interest often cannot be accurately segmented.
Disclosure of Invention
The embodiment of the invention provides an image detection method and device, which can accurately detect an interested area in an image.
According to an aspect of an embodiment of the present invention, there is provided an image detection method including: detecting high-brightness area pixel points in an image to be detected through a double-threshold algorithm; counting a gray level histogram of pixel points in a specified neighborhood except for the pixel points in the highlight region in the image to be detected, and constructing a mixed Gaussian model of gray level distribution of the pixel points except for the pixel points in the highlight region according to the gray level histogram; performing parameter estimation on a Gaussian mixture model of pixel points except for the pixel points in the highlight region by using an expectation maximization algorithm; and determining whether pixel points except the pixel points in the highlight region belong to a target detection region in the image to be detected based on parameter values of the Gaussian mixture model obtained by parameter estimation.
According to another aspect of embodiments of the present invention, there is provided an image detection apparatus including: the highlight area detection module is used for detecting highlight area pixel points in the image to be detected through a double-threshold algorithm; the mixed Gaussian model building module is used for counting a gray level histogram of the pixels except the high-brightness region pixels in the image to be detected in the designated neighborhood and building a mixed Gaussian model of the gray level distribution of the pixels except the high-brightness region pixels according to the gray level histogram; the parameter value estimation module is used for carrying out parameter estimation on a Gaussian mixture model of pixel points except the pixel points in the highlight area by utilizing an expectation maximization algorithm; and the target detection region determining module is used for determining whether pixel points except the pixel points of the highlight region belong to the target detection region in the image to be detected based on the parameter values of the Gaussian mixture model obtained by parameter estimation.
According to the image detection method and device in the embodiment of the invention, each pixel point of the image outside the highlight area in the image to be detected is analyzed by using the mixed Gaussian model to analyze the gray value distribution in the neighborhood window, and the image is segmented by using Gaussian coefficient, mean value and variance in the mixed Gaussian model to detect the target detection area. By the image detection method in the embodiment of the invention, when the illumination is not uniform or the gray difference between the to-be-detected area and the background area is small, the interested target area can be accurately segmented.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart illustrating an image detection method according to an embodiment of the present invention;
FIG. 2 is a more detailed flow chart illustrating an image detection method according to another embodiment of the present invention;
FIG. 3 is a schematic diagram showing the structure of an image detection apparatus according to an embodiment of the present invention;
FIG. 4 is a more detailed structural schematic diagram showing an image detection apparatus according to another embodiment of the present invention;
fig. 5 is a block diagram illustrating an exemplary hardware architecture of a computing device capable of implementing the image detection method and apparatus according to an embodiment of the present invention.
Detailed Description
Features and exemplary embodiments of various aspects of the present invention will be described in detail below, and in order to make objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It will be apparent to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the present invention.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The image detection method and the image detection device provided by the embodiment of the invention can be applied to the fields of industrial production process detection, daily life safety detection and the like. As a specific application, the image detection method and the image detection device in the implementation of the invention are used for detecting the water leakage of the tunnel, and the method is a reliable and efficient processing method.
The tunnel leakage water, which is a common tunnel defect, has an important influence on the safety of the tunnel, and the image detection method and the image detection device according to the embodiment of the present invention are described in detail below with reference to the accompanying drawings by taking the image detection of the tunnel leakage water as an example. It should be noted that these examples are not intended to limit the scope of the present disclosure.
Fig. 1 is a flowchart illustrating an image detection method according to an embodiment of the present invention. As shown in fig. 1, the image detection method 100 in the present embodiment includes the steps of:
and step S110, detecting the high brightness area pixel points in the image to be detected through a double-threshold algorithm.
Step S120, counting a gray level histogram of the pixels except the high-brightness area pixels in the image to be detected in the appointed neighborhood, and constructing a mixed Gaussian model of the gray level distribution of the pixels except the high-brightness area pixels according to the gray level histogram.
And step S130, performing parameter estimation on the Gaussian mixture model of the pixel points except the pixel points in the highlight region by using an expectation-maximization algorithm.
Step S140, determining whether pixel points except the pixel points of the highlight region belong to a target detection region in the image to be detected based on parameter values of the Gaussian mixture model obtained by parameter estimation.
According to the image detection method provided by the embodiment of the invention, a mixed Gaussian model is constructed for the pixel points except the pixel points in the highlight region in the image to be detected, the mixed Gaussian model is used, the gray distribution of the image to be detected is learned by utilizing an expectation maximization algorithm, and therefore, the image to be detected is segmented according to the Gaussian model parameters obtained by learning, and the target region is detected.
As an alternative embodiment, the image to be detected may be preprocessed before the image detection.
Fig. 2 is a more detailed flowchart illustrating an image detection method according to another embodiment of the present invention, and the same reference numerals are used for the same or equivalent steps of fig. 2 as those of fig. 1. As shown in fig. 2, the image detection method 200 shown in fig. 2 is substantially the same as the image detection method 100, except that the step S110 may further include the following steps:
and S110-1, performing denoising processing on the image to be detected.
And S110-2, detecting pixels in a high-brightness area in the image to be detected after denoising treatment through a double-threshold algorithm.
Specifically, a median filter can be used for denoising the image to be detected, so that the edge information of the image can be well maintained while the noise is removed.
In other embodiments, the highlight region of the target detection region may be detected first according to the characteristic that the target detection region is darker in the image to be detected. As an alternative embodiment, the step of detecting the pixel points in the highlight region in the image to be detected through the dual-threshold algorithm in step S110 may specifically include:
and step S111, performing image segmentation on the image to be detected by respectively using a preset high gray threshold and a preset low gray threshold to obtain a high-threshold segmentation binary image and a low-threshold segmentation binary image, wherein the high gray threshold is larger than the low gray threshold.
In this step, as an example, the value of the high grayscale threshold may be 200, and the value of the low grayscale threshold may be 150.
Step S112, an N × N neighborhood of a first pixel having a pixel value of 1 in the low-threshold-value-divided binary image is obtained as a first neighborhood, and an N × N neighborhood of a pixel having the same position as the first pixel in the high-threshold-value-divided binary image is obtained as a second neighborhood.
In this step, the value of N may be an odd number between 21 and 25.
In step S113, if there is no pixel having a pixel value of 1 in the second neighborhood, the pixel value of the first pixel is set to 0.
Step S114, marking the pixel point with the pixel value of 1 in the first neighborhood as the pixel point in the highlight area.
Optionally, the detected pixel point in the highlight area may be marked by using a specific value, which is different from other pixel points in the image to be detected.
According to the image detection method in the embodiment of the invention, when the tunnel leakage area is detected, in a general situation, the brightness of the dry area of the tunnel in the image to be detected is higher, and the brightness of the leakage area of the tunnel in the image to be detected is lower. The detection of the high-brightness area is carried out from the image to be detected, and in the subsequent image detection processing process, the detection of the tunnel leakage water is carried out on the images except the high-brightness area, so that the efficiency and the accuracy of image detection can be improved.
In the embodiment of the present invention, an Expectation Maximization Algorithm (Expectation Maximization Algorithm) is abbreviated as an EM Algorithm. In the embodiment of the invention, the EM algorithm is an algorithm for searching the parameter maximum likelihood estimation in the Gaussian mixture model of each pixel point of the image to be detected.
Specifically, the step of performing parameter estimation on the gaussian mixture model of the pixel points other than the pixel point in the highlight region by using the expectation-maximization algorithm in step S130 may specifically include:
step S131, according to the initial value of the parameter value of the preset Gaussian mixture model, iterative optimization is carried out on the parameter value by using an expectation maximization algorithm.
And step S132, when the iterated parameter values enable the likelihood function of the Gaussian mixture model to be converged, taking the iteratively optimized parameter values as parameter values obtained by parameter estimation of the Gaussian mixture model.
In some embodiments, the parameter values of the gaussian mixture model in step S131 include the weight, mean and variance of the gaussian terms in the gaussian mixture model.
As an example, the gaussian mixture model may include two gaussian terms, the parameter values of the two gaussian terms in the gaussian mixture model are initialized respectively, the weights of the two gaussian terms are set to be 1/2, the mean values of the two gaussian terms are set to be 255/3 and 255 × 2/3 respectively, and the squares of the two gaussian terms are set
Specifically, step S131 may include the steps of:
step S131-1, initializing a Gaussian mixture model according to the initial value of the weight, the initial value of the mean value and the initial value of the variance.
Step S131-2, utilizing the formula in the expectation-maximization algorithm
Figure BDA0001264850450000061
Estimating the probability that a pixel point in the Gaussian mixture model is generated by each Gaussian term, wherein,
Figure BDA0001264850450000062
representing the probability value, x, generated by the ith Gaussian item for the jth pixel pointjRepresents the jth pixel, pii、μiAnd σiRespectively representing the weight, the mean value and the variance of the ith Gaussian item; p (x)ji,σi) Indicating that in the current iteration step, pixel point xjProbability in the ith gaussian term.
Step S131-3, maximizing the formula in the algorithm through expectation
Figure BDA0001264850450000063
Calculating to obtain the weight pi of the updated Gaussian mixture modeliMean value of μiSum variance σiAnd m represents the number of pixel points in the Gaussian mixture model.
In the above steps of the present embodiment, step S131-2 may be regarded as an E step in the EM algorithm, i.e., a step of calculating a desired; step S131-3 is taken as the M step, i.e., the maximization step, in the EM algorithm.
Specifically, the EM algorithm may be a successive approximation algorithm, and in step E, the state of the gaussian mixture model corresponding to the set of parameters is determined by giving an initial value of a parameter value of the gaussian mixture model, and the mixture is corrected in the current state; and in the M step, the parameter values in the Gaussian mixture model are re-estimated, and the state of the model is re-determined according to the new parameter values.
And (4) iteratively using the step E and the step M, using the parameter estimation value obtained in the step M in the calculation of the next step E, and continuously and alternately performing the process until the likelihood function of the Gaussian mixture model is converged to obtain a parameter value obtained by performing parameter estimation on the Gaussian mixture model.
In the above embodiment, the parameter values of the gaussian mixture model are gradually improved by the EM algorithm, so that the parameter values of the gaussian mixture model gradually approach the real parameter values. The embodiment of the invention calculates the parameter values of the Gaussian mixture model by the iterative algorithm provided by the EM algorithm, and the calculation method is simple and stable.
In some embodiments, step S140 may specifically include:
step S141, if the weight of one of the two Gaussian items is smaller than a preset weight threshold, determining that the pixel points except the pixel point in the highlight area do not belong to the target detection area.
Step S142, if the absolute value of the difference between the mean values of the two gaussian terms is greater than the preset mean threshold and the absolute value of the difference between the variance of the two gaussian terms is less than the preset variance threshold, determining that the pixel points other than the pixel points in the highlight region belong to the target detection region.
As an example, the preset weight threshold may be 15, the preset mean threshold may be 20, and the preset variance threshold may be 10.
In this embodiment, the image to be detected is segmented according to the weight, the mean, and the variance of the gaussian term in the gaussian mixture model, and the region of the leaking water is detected.
According to the image detection method provided by the embodiment of the invention, the water leakage area in the image can be more accurately detected, the image detection method can be applied to other fields such as safety production processes or safety detection, and the target area in the image can be accurately and efficiently detected.
An image detection apparatus according to an embodiment of the present invention will be described in detail below with reference to the accompanying drawings.
Fig. 3 is a schematic structural diagram of an image detection apparatus according to an embodiment of the present invention. As shown in fig. 3, an image detection apparatus 300 in an embodiment of the present invention includes:
and the highlight area detection module 320 is configured to detect highlight area pixel points in the image to be detected through a dual-threshold algorithm.
And the Gaussian mixture model constructing module 330 is configured to count a gray level histogram of the pixels in the specified neighborhood except the pixels in the highlight region in the image to be detected, and construct a Gaussian mixture model of gray level distribution of the pixels except the pixels in the highlight region according to the gray level histogram.
And the parameter value estimation module 340 is configured to perform parameter estimation on the gaussian mixture model of the pixel points other than the pixel point in the highlight region by using an expectation-maximization algorithm.
And a target detection region determining module 350, configured to determine whether pixel points other than the pixel points in the highlight region belong to a target detection region in the image to be detected based on parameter values of the gaussian mixture model obtained through parameter estimation.
According to the image detection device provided by the embodiment of the invention, for the pixel points in the image to be detected, the gray value distribution in the specified neighborhood window of each pixel point is analyzed by using the mixed Gaussian model, and the image to be detected is segmented according to the parameter values in the mixed Gaussian model, so that the target area can be detected more accurately.
Fig. 4 is a more detailed structural diagram showing an image detection apparatus according to another embodiment of the present invention, and the same reference numerals are used for the steps of fig. 4 that are the same as or equivalent to those of fig. 3. As shown in fig. 4, the image detection apparatus 400 shown in fig. 4 is substantially the same as the image detection apparatus 300, except that the image detection apparatus 400 may further include:
the image preprocessing module 310 is configured to perform denoising processing on the image to be detected.
The highlight region detection module 320 is further configured to detect, through a dual-threshold algorithm, highlight region pixel points in the de-noised image to be detected, and detect, through a dual-threshold algorithm, highlight region pixel points in the de-noised image to be detected.
As an alternative embodiment, the highlight area detection module 320 may further include:
the image segmentation unit 321 is configured to perform image segmentation on the detected image by using a preset high grayscale threshold and a preset low grayscale threshold, respectively, to obtain a high-threshold segmentation binary image and a low-threshold segmentation binary image, where the high grayscale threshold is greater than the low grayscale threshold.
The neighborhood obtaining unit 322 is configured to obtain an nxn neighborhood of a first pixel having a pixel value of 1 in the low-threshold-value-divided binary image as a first neighborhood, and obtain an nxn neighborhood of a pixel having the same position as the first pixel in the high-threshold-value-divided binary image as a second neighborhood.
The pixel value processing unit 323 is configured to set the pixel value of the first pixel to 0 if there is no pixel with a pixel value of 1 in the second neighborhood.
And a highlight region pixel point marking unit 324, configured to mark a pixel point in the first neighborhood whose pixel value is 1 as a highlight region pixel point.
In the embodiment, the highlight area is detected from the image to be detected, and in the subsequent image detection processing process, the tunnel leakage water is detected on the image to be detected from which the highlight area is removed, so that the efficiency and the accuracy of image detection can be improved.
As an alternative embodiment, the parameter value estimation module 340 may further include:
the iterative optimization unit 341 is configured to perform iterative optimization on the parameter values by using an expectation maximization algorithm according to the initial values of the parameter values of the preset gaussian mixture model.
And the parameter value selecting unit 342 is configured to, when the iteratively optimized parameter value enables the likelihood function of the gaussian mixture model to converge, iteratively optimize the parameter in the gaussian mixture model by using an expectation maximization algorithm according to an initial value of the parameter value, where the parameter value is obtained by performing parameter estimation on the gaussian mixture model, so as to enable the gaussian mixture model to converge.
Specifically, the iterative optimization unit 341 may be specifically configured to initialize the gaussian mixture model according to an initial value of the weight, an initial value of the mean, and an initial value of the variance; using equations in expectation-maximization algorithms
Figure BDA0001264850450000091
Estimating the probability that a pixel point in the Gaussian mixture model is generated by each Gaussian term, wherein,
Figure BDA0001264850450000092
representing the probability value, x, generated by the ith Gaussian item for the jth pixel pointjRepresents the jth pixel, pii、μiAnd σiRespectively representing the weight, the mean value and the variance of the ith Gaussian item; p (x)ji,σi) Indicating that in the current iteration step, pixel point xjProbability in the ith gaussian term; and by means of a formula in an expectation-maximization algorithm
Figure BDA0001264850450000093
The calculation being updatedWeight pi of Gaussian mixture modeliMean value of μiSum variance σiAnd m represents the number of pixel points in the Gaussian mixture model.
In the embodiment, the parameter values of the Gaussian mixture model are gradually improved through the EM algorithm, so that the parameter values of the Gaussian mixture model gradually approach to the real parameter values, and the detection and identification of the image are more accurate.
As an alternative embodiment, the gaussian mixture model may include two gaussian terms, and the target detection region determining module 350 is specifically configured to:
if the weight of one of the two Gaussian items is smaller than a preset weight threshold, determining that pixel points except the pixel points in the highlight area do not belong to the target detection area, and if the weight of the two Gaussian items is smaller than the preset weight threshold, determining that each pixel point does not belong to the target detection area;
and if the absolute value of the difference value of the mean values of the two Gaussian terms is greater than a preset mean threshold value and the absolute value of the difference value of the variance of the two Gaussian terms is less than a preset method variance threshold value, determining that the pixel points except the pixel point in the highlight area belong to the target detection area.
The image detection device provided by the embodiment of the invention can be suitable for more images to be processed obtained under the illumination condition and the areas to be detected under the condition that the gray difference between the areas to be detected and the background area is smaller, and accurately detect the interested areas in the images.
Other details of the image detection apparatus according to the embodiment of the present invention are similar to the image detection method according to the embodiment of the present invention described above with reference to fig. 1 and fig. 2, and are not repeated herein.
The image detection method and apparatus according to the embodiments of the present invention described in conjunction with fig. 1 to 4 may be implemented by a computing device that is detachably or fixedly installed on an application server device. Fig. 5 is a block diagram illustrating an exemplary hardware architecture of a computing device capable of implementing the image detection method and apparatus according to embodiments of the present invention. As shown in fig. 5, computing device 500 includes an input device 501, an input interface 502, a central processor 503, a memory 504, an output interface 505, and an output device 506. The input interface 502, the central processing unit 503, the memory 504, and the output interface 505 are connected to each other through a bus 510, and the input device 501 and the output device 506 are connected to the bus 510 through the input interface 502 and the output interface 505, respectively, and further connected to other components of the computing device 500. Specifically, the input device 501 receives input information from the outside (for example, an image pickup device or a digital camera), and transmits the input information to the central processor 503 through the input interface 502; the central processor 503 processes input information based on computer-executable instructions stored in the memory 504 to generate output information, temporarily or permanently stores the output information in the memory 504, and then transmits the output information to the output device 506 through the output interface 505; output device 506 outputs the output information outside of computing device 500 for use by a user.
That is, the computing device shown in fig. 5 may also be implemented to include: a memory storing computer-executable instructions; and a processor which, when executing computer executable instructions, may implement the image detection method and apparatus described in connection with fig. 1-4. Here, the processor may communicate with an image acquisition module such as an image management system or an image sensor mounted on the device to be detected, so as to execute computer-executable instructions based on relevant information from the image management system and/or the image sensor, thereby implementing the image detection method and apparatus described in conjunction with fig. 1-4.
It is to be understood that the invention is not limited to the specific arrangements and instrumentality described above and shown in the drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present invention are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications and additions or change the order between the steps after comprehending the spirit of the present invention.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
It should also be noted that the exemplary embodiments mentioned in this patent describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
As described above, only the specific embodiments of the present invention are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present invention, and these modifications or substitutions should be covered within the scope of the present invention.

Claims (12)

1. An image detection method for detecting water leakage in a tunnel, the image detection method comprising:
taking a region with higher brightness in an image to be detected as a dry region of a tunnel, taking a region with lower brightness in the image to be detected as a leakage water region of the tunnel, and detecting high-brightness region pixel points in the image to be detected through a double-threshold algorithm; wherein the image to be detected is a tunnel image;
counting a gray level histogram of pixel points in a specified neighborhood except for the pixel points in the highlight area in the image to be detected, and constructing a mixed Gaussian model of gray level distribution of the pixel points except for the pixel points in the highlight area according to the gray level histogram;
performing parameter estimation on the Gaussian mixture model of the pixel points except the pixel points in the highlight region by using an expectation maximization algorithm;
determining whether pixel points except the pixel points in the highlight region belong to a target detection region in the image to be detected based on parameter values of the Gaussian mixture model obtained by parameter estimation; wherein, the target detection area is a leakage water area of the tunnel.
2. The image detection method according to claim 1, wherein the detecting the pixels in the highlight region in the image to be detected by the dual-threshold algorithm comprises:
denoising the image to be detected;
and detecting the pixels in the high-brightness area in the image to be detected after the denoising treatment by a double-threshold algorithm.
3. The image detection method according to claim 1, wherein the detecting the pixels in the highlight region in the image to be detected by the dual-threshold algorithm comprises:
respectively using a preset high gray threshold and a preset low gray threshold to perform image segmentation on the image to be detected to obtain a high-threshold segmentation binary image and a low-threshold segmentation binary image, wherein the high gray threshold is larger than the low gray threshold;
acquiring an NxN neighborhood of a first pixel point with a pixel value of 1 in the low-threshold segmentation binary image as a first neighborhood, and acquiring an NxN neighborhood of a pixel point with the same position as the first pixel point in the high-threshold segmentation binary image as a second neighborhood;
if no pixel point with the pixel value of 1 exists in the second neighborhood, setting the pixel value of the first pixel point to be 0;
and marking the pixel point with the pixel value of 1 in the first neighborhood as a pixel point in a highlight area.
4. The image detection method according to claim 1, wherein the performing parameter estimation on the gaussian mixture model of the pixels other than the pixels in the highlight area by using the expectation-maximization algorithm comprises:
performing iterative optimization on the parameter values by using the expectation maximization algorithm according to the preset initial values of the parameter values of the Gaussian mixture model;
and when the iteratively optimized parameter value enables the likelihood function of the Gaussian mixture model to be converged, taking the iteratively optimized parameter value as a parameter value obtained by performing parameter estimation on the Gaussian mixture model.
5. The image detection method according to claim 4, wherein the parameter values of the Gaussian mixture model include a weight, a mean, and a variance of Gaussian terms in the Gaussian mixture model;
the iterative optimization of the parameter values by using the expectation maximization algorithm according to the preset initial values of the parameter values comprises the following steps:
initializing the Gaussian mixture model according to the initial value of the weight, the initial value of the mean value and the initial value of the variance;
using a formula in the expectation-maximization algorithm
Figure FDA0002192186630000021
Estimating a probability that a pixel point in the Gaussian mixture model is generated by each Gaussian term, wherein,
Figure FDA0002192186630000022
is to show toProbability value, x, generated by ith Gaussian item for j pixel pointsjRepresents the jth pixel, pii、μiAnd σiRespectively representing the weight, the mean value and the variance of the ith Gaussian item; p (x)jii) Indicating that in the current iteration step, pixel point xjProbability in the ith gaussian term;
and passing through a formula in the expectation-maximization algorithm
Figure FDA0002192186630000023
Calculating to obtain the updated weight pi of the Gaussian mixture modeliMean value of μiSum variance σiAnd m represents the number of pixel points in the Gaussian mixture model.
6. The image detection method according to claim 1, wherein the Gaussian mixture model comprises two Gaussian terms, and parameter values of the Gaussian terms in the Gaussian mixture model comprise a weight, a mean and a variance;
the method for determining whether pixel points except the pixel points in the highlight region belong to a target detection region in the image to be detected based on the parameter value of the Gaussian mixture model obtained by parameter estimation comprises the following steps:
if the weight of one of the two Gaussian items is smaller than a preset weight threshold, determining that pixel points except the pixel point in the highlight area do not belong to the target detection area;
and if the absolute value of the difference of the mean values of the two Gaussian terms is greater than a preset mean threshold value and the absolute value of the difference of the variance of the two Gaussian terms is less than a preset variance threshold value, determining that the pixel points except the pixel point in the highlight area belong to the target detection area.
7. An image detection apparatus for detecting leakage water in a tunnel, the image detection apparatus comprising:
the high-brightness region detection module is used for taking a region with higher brightness in the image to be detected as a dry region of the tunnel and taking a region with lower brightness in the image to be detected as a leakage water region of the tunnel, and is used for detecting high-brightness region pixel points in the image to be detected through a double-threshold algorithm; wherein the image to be detected is a tunnel image;
the Gaussian mixture model building module is used for counting a gray level histogram of pixel points in a specified neighborhood except for the high-brightness region pixel points in the image to be detected and building a Gaussian mixture model of gray level distribution of the pixel points except for the high-brightness region pixel points according to the gray level histogram;
the parameter value estimation module is used for carrying out parameter estimation on a Gaussian mixture model of the pixel points except the pixel points in the highlight area by utilizing an expectation maximization algorithm;
the target detection area determining module is used for determining whether pixel points except the pixel points of the highlight area belong to a target detection area in the image to be detected based on parameter values of the Gaussian mixture model obtained by parameter estimation; wherein, the target detection area is a leakage water area of the tunnel.
8. The image detection apparatus according to claim 7, further comprising:
the image preprocessing module is used for denoising the image to be detected;
the highlight area detection module is further used for detecting the highlight area pixel points in the image to be detected after the denoising treatment through a double-threshold algorithm.
9. The image detection apparatus according to claim 7, wherein the highlight region detection module includes:
the image segmentation unit is used for performing image segmentation on the detection image by using a preset high gray threshold and a preset low gray threshold respectively to obtain a high-threshold segmentation binary image and a low-threshold segmentation binary image, wherein the high gray threshold is larger than the low gray threshold;
a neighborhood acquiring unit, configured to acquire an nxn neighborhood of a first pixel having a pixel value of 1 in the low-threshold-value-divided binary image as a first neighborhood, and acquire an nxn neighborhood of a pixel having the same position as the first pixel in the high-threshold-value-divided binary image as a second neighborhood;
the pixel value processing unit is used for setting the pixel value of the first pixel point to be 0 if no pixel point with the pixel value of 1 exists in the second neighborhood;
and the highlight region pixel point marking unit is used for marking the pixel point with the pixel value of 1 in the first neighborhood as a highlight region pixel point.
10. The image detection apparatus according to claim 7, wherein the parameter value estimation module includes:
the iterative optimization unit is used for carrying out iterative optimization on the parameter values by utilizing the expectation maximization algorithm according to the preset initial values of the parameter values of the Gaussian mixture model;
and the parameter value selection unit is used for taking the iteratively optimized parameter value as a parameter value obtained by performing parameter estimation on the Gaussian mixture model when the iteratively optimized parameter value enables the likelihood function of the Gaussian mixture model to be converged.
11. The image detection apparatus according to claim 10, wherein the parameter values of the gaussian mixture model include a weight, a mean, and a variance of a gaussian term in the gaussian mixture model;
the iterative optimization unit is specifically configured to:
initializing the Gaussian mixture model according to the initial value of the weight, the initial value of the mean value and the initial value of the variance;
using a formula in the expectation-maximization algorithm
Figure FDA0002192186630000041
Estimating a probability that a pixel point in the Gaussian mixture model is generated by each Gaussian term, wherein,
Figure FDA0002192186630000042
representing the probability value, x, generated by the ith Gaussian item for the jth pixel pointjRepresents the jth pixel, pii、μiAnd σiRespectively representing the weight, the mean value and the variance of the ith Gaussian item; p (x)jii) Indicating that in the current iteration step, pixel point xjProbability in the ith gaussian term;
and passing through a formula in the expectation-maximization algorithm
Figure FDA0002192186630000051
Calculating to obtain the updated weight pi of the Gaussian mixture modeliMean value of μiSum variance σiAnd m represents the number of pixel points in the Gaussian mixture model.
12. The image detection apparatus according to claim 7, wherein the gaussian mixture model includes two gaussian terms, parameter values of the gaussian terms in the gaussian mixture model include a weight, a mean, and a variance, and the target detection region determining module is specifically configured to:
if the weight of one of the two Gaussian items is smaller than a preset weight threshold, determining that pixel points except the pixel point in the highlight area do not belong to the target detection area;
and if the absolute value of the difference of the mean values of the two Gaussian terms is greater than a preset mean threshold value and the absolute value of the difference of the variance of the two Gaussian terms is less than a preset variance threshold value, determining that the pixel points except the pixel point in the highlight area belong to the target detection area.
CN201710227429.8A 2017-04-07 2017-04-07 Image detection method and device Active CN107146217B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710227429.8A CN107146217B (en) 2017-04-07 2017-04-07 Image detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710227429.8A CN107146217B (en) 2017-04-07 2017-04-07 Image detection method and device

Publications (2)

Publication Number Publication Date
CN107146217A CN107146217A (en) 2017-09-08
CN107146217B true CN107146217B (en) 2020-03-06

Family

ID=59774555

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710227429.8A Active CN107146217B (en) 2017-04-07 2017-04-07 Image detection method and device

Country Status (1)

Country Link
CN (1) CN107146217B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110556092A (en) * 2018-05-15 2019-12-10 中兴通讯股份有限公司 Speech synthesis method and device, storage medium and electronic device
CN109268928B (en) * 2018-09-12 2020-10-23 长安大学 Heat supply monitoring system
CN109712146B (en) * 2018-12-14 2023-06-09 广东水利电力职业技术学院(广东省水利电力技工学校) EM multi-threshold image segmentation method and device based on histogram
CN111479070B (en) * 2019-01-24 2022-02-01 杭州海康机器人技术有限公司 Image brightness determination method, device and equipment
CN111081340B (en) * 2019-12-04 2023-11-03 四川骏逸富顿科技有限公司 Method for remotely detecting whether electronic prescription information is complete or not
CN111951222B (en) * 2020-07-15 2024-04-19 广东交通职业技术学院 Bottle cap tooth count detection method, system, device and storage medium
CN113344907B (en) * 2021-06-29 2023-09-08 深圳前海微众银行股份有限公司 Image detection method and device
CN113378820B (en) * 2021-07-02 2022-07-22 深圳市东亿健康服务有限公司 Method and system for identifying digital pathological section target area
CN113935962B (en) * 2021-09-29 2022-10-21 常州市新创智能科技有限公司 Method for detecting wool ball of glass fiber cloth

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101343012B (en) * 2008-08-26 2013-03-27 北京中星微电子有限公司 Control method and system for escalator
CN101427912B (en) * 2008-09-23 2010-09-22 上海理工大学 Drop needle detecting device with handle anastomat punch head and detecting method thereof
CN101763502B (en) * 2008-12-24 2012-07-25 中国科学院自动化研究所 High-efficiency method and system for sensitive image detection
JP4999881B2 (en) * 2009-05-06 2012-08-15 スタンレー電気株式会社 Tunnel lighting system
CN103324921B (en) * 2013-06-28 2016-12-28 华南理工大学 A kind of mobile identification method based on interior finger band and mobile identification equipment thereof
CN105120224A (en) * 2015-09-09 2015-12-02 招商局重庆交通科研设计院有限公司 Tunnel water disaster intelligent monitoring system and method based on video event detection

Also Published As

Publication number Publication date
CN107146217A (en) 2017-09-08

Similar Documents

Publication Publication Date Title
CN107146217B (en) Image detection method and device
Korus et al. Multi-scale analysis strategies in PRNU-based tampering localization
CN107220962B (en) Image detection method and device for tunnel cracks
Kaneko et al. Robust image registration by increment sign correlation
US8553980B2 (en) Method and apparatus extracting feature points and image based localization method using extracted feature points
CN110263920B (en) Convolutional neural network model, training method and device thereof, and routing inspection method and device thereof
CN110782483B (en) Multi-view multi-target tracking method and system based on distributed camera network
WO2012175785A1 (en) Methods, apparatuses and computer program products for performing accurate pose estimation of objects
Canty et al. Visualization and unsupervised classification of changes in multispectral satellite imagery
CN110956615B (en) Image quality evaluation model training method and device, electronic equipment and storage medium
Yavariabdi et al. Change detection in multispectral landsat images using multiobjective evolutionary algorithm
US11670078B2 (en) Method and system for visual based inspection of rotating objects
CN108228684B (en) Method and device for training clustering model, electronic equipment and computer storage medium
CN110084830B (en) Video moving object detection and tracking method
EP3495989A1 (en) Best image crop selection
CN112766218B (en) Cross-domain pedestrian re-recognition method and device based on asymmetric combined teaching network
CN110598684B (en) Method, system, terminal device and storage medium for identifying telephone number in image
Yoo et al. Template matching of occluded object under low PSNR
CN110942090A (en) Model training method, image processing method, device, electronic equipment and storage medium
Zhang et al. A coarse-to-fine leaf detection approach based on leaf skeleton identification and joint segmentation
CN106960443B (en) Unsupervised change detection method and device based on full-polarization time sequence SAR image
CN115083008A (en) Moving object detection method, device, equipment and storage medium
JP2008293172A (en) Disappearing dot estimation device and program
Yang et al. Image segmentation and proto-objects detection based visual tracking
Gupta et al. A novel unsupervised thresholding technique for landsat image change detection

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