CN112580634A - Air tightness detection light source adjusting method and system based on computer vision - Google Patents
Air tightness detection light source adjusting method and system based on computer vision Download PDFInfo
- Publication number
- CN112580634A CN112580634A CN202011567722.7A CN202011567722A CN112580634A CN 112580634 A CN112580634 A CN 112580634A CN 202011567722 A CN202011567722 A CN 202011567722A CN 112580634 A CN112580634 A CN 112580634A
- Authority
- CN
- China
- Prior art keywords
- water body
- image
- definition
- shaking
- light source
- 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.)
- Withdrawn
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 50
- 238000000034 method Methods 0.000 title claims abstract description 45
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims abstract description 194
- 238000004458 analytical method Methods 0.000 claims abstract description 64
- 238000012937 correction Methods 0.000 claims abstract description 34
- 210000000746 body region Anatomy 0.000 claims abstract description 6
- 238000011156 evaluation Methods 0.000 claims abstract description 5
- 238000005286 illumination Methods 0.000 claims description 12
- 230000008859 change Effects 0.000 claims description 9
- 238000000605 extraction Methods 0.000 claims description 8
- 238000005070 sampling Methods 0.000 claims description 8
- 238000012935 Averaging Methods 0.000 claims description 6
- 238000004364 calculation method Methods 0.000 claims description 5
- 230000000875 corresponding effect Effects 0.000 description 16
- 230000008569 process Effects 0.000 description 12
- 239000011435 rock Substances 0.000 description 12
- 230000006870 function Effects 0.000 description 10
- 230000033228 biological regulation Effects 0.000 description 3
- 230000008447 perception Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000012360 testing method Methods 0.000 description 3
- 238000012549 training Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 238000002474 experimental method Methods 0.000 description 2
- 238000013178 mathematical model Methods 0.000 description 2
- 238000012805 post-processing Methods 0.000 description 2
- 230000000750 progressive effect Effects 0.000 description 2
- 230000011218 segmentation Effects 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000000725 suspension Substances 0.000 description 1
- 230000003827 upregulation Effects 0.000 description 1
- 239000013598 vector Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/25—Determination of region of interest [ROI] or a volume of interest [VOI]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/26—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
- G06V10/267—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/60—Extraction of image or video features relating to illumination properties, e.g. using a reflectance or lighting model
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20024—Filtering details
- G06T2207/20032—Median filtering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20092—Interactive image processing based on input by user
- G06T2207/20104—Interactive definition of region of interest [ROI]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Data Mining & Analysis (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Computation (AREA)
- Evolutionary Biology (AREA)
- General Engineering & Computer Science (AREA)
- Bioinformatics & Computational Biology (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Software Systems (AREA)
- Quality & Reliability (AREA)
- Examining Or Testing Airtightness (AREA)
Abstract
The invention relates to the technical field of computer vision, in particular to an air tightness detection light source adjusting method and system based on computer vision. The method comprises the following steps: acquiring an image of the detection pool, and acquiring a water body region of interest of the denoised image; performing definition evaluation on the region of interest to obtain the definition of the water body; acquiring the shaking degree of the water body, and dividing the shaking degree into shaking grades according to the size of the shaking degree of the water body; correcting the current water body definition by applying a corresponding correction model according to the current shaking grade; extracting image brightness of the image to obtain an image brightness analysis value of the image; and acquiring the magnification of light source adjustment according to the corrected water body definition and the image brightness analysis value. The embodiment of the invention can make the bubble characteristics more prominent, more accurately detect the air tightness of the equipment and improve the precision of air tightness detection.
Description
Technical Field
The invention relates to the technical field of computer vision, in particular to an air tightness detection light source adjusting method and system based on computer vision.
Background
The lighting system is one of the most critical parts of the machine vision system, and the machine vision light source directly affects the quality of images and further affects the performance of the system. The requirement on image quality is high in the equipment air tightness detection process, bubble characteristics are more obvious for obtaining high-quality images, a light source of an equipment air tightness detection system needs to be adjusted, and the stability of the images is guaranteed.
In practice, the inventors found that the above prior art has the following disadvantages:
in the air tightness detection process of the equipment, due to the influence of the illumination intensity of the light source, the characteristics of the bubbles acquired by the image are not obvious, small bubbles are difficult to detect in the air tightness detection process, and the phenomenon of false air tightness detection of the equipment can be caused.
Disclosure of Invention
In order to solve the above technical problems, an object of the present invention is to provide a method and a system for adjusting an air-tightness detection light source based on computer vision, wherein the adopted technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for adjusting a light source for air tightness detection based on computer vision, the method including the following steps:
acquiring an image of the detection pool, and acquiring a water body region of interest of the denoised image;
performing definition evaluation on the region of interest to obtain the definition of the water body;
acquiring the shaking degree of the water body, and dividing the water body into N +1 shaking grades of 0-N in total according to the shaking degree of the water body;
correcting the current water body definition by applying a corresponding correction model according to the current shaking grade;
extracting image brightness of the image to obtain an image brightness analysis value of the image;
and acquiring the magnification of light source adjustment according to the corrected water body definition and image brightness analysis value, wherein the weighted sum of the water body definition and the image brightness analysis value is in a negative correlation with the magnification.
Preferably, the method for acquiring the definition of the water body comprises the following steps:
and carrying out similarity comparison on the interested area image of the water body to be detected and the interested area image of the clear water body to obtain the water body definition of the water body to be detected.
Preferably, the step of correcting the clarity of the water body comprises:
and uniformly dividing all the shaking grades with the shaking grades of 1-N-1 into three intervals, wherein each interval corresponds to a corresponding correction model, and the correction models and the shaking grades are in positive correlation.
Preferably, the step of obtaining the image brightness analysis value includes:
uniformly extracting image brightness values of pixels in the image according to a preset sampling interval;
and averaging all the extracted image brightness values to obtain an image brightness analysis value of the image.
Preferably, the light source adjustment model is:
wherein, ω represents the multiplying power required to be adjusted according to the illumination intensity of the current light source, S' represents the water body definition after correction, and P represents the image brightness analysis value; a. the1Weight representing the corrected water clarity, A2Weight representing the value of the luminance analysis of the image, A1+A2=1。
Preferably, the weight of the water body definition is obtained by combining the water body definition at the current moment, the image brightness analysis value, the historical average water body definition change value and the historical average image brightness analysis change value.
In a second aspect, another embodiment of the present invention provides a computer vision-based air tightness detection light source adjusting system, which includes the following modules:
the interesting region acquisition module is used for acquiring the image of the detection pool and acquiring the water body interesting region of the denoised image;
the water body definition acquisition module is used for evaluating the definition of the region of interest to acquire the water body definition;
the shaking grade division module is used for acquiring the shaking degree of the water body and dividing the water body into N +1 shaking grades of 0-N in total according to the shaking degree of the water body;
the water body definition correction module is used for correcting the current water body definition by applying a corresponding correction model according to the current shaking grade;
the image brightness analysis value acquisition module is used for extracting the image brightness of the image and acquiring the image brightness analysis value of the image;
and the light source adjusting module is used for acquiring the multiplying power of light source adjustment according to the corrected water body definition and the image brightness analysis value, and the weighted sum of the water body definition and the image brightness analysis value is in a negative correlation with the multiplying power.
Preferably, the water body definition obtaining module further comprises a similarity comparison module, which is used for comparing the similarity of the image of the region of interest of the water body to be detected with the image of the region of interest of the clear water body, so as to obtain the water body definition of the water body to be detected.
Preferably, the water body definition correction module includes:
and the corresponding correction module is used for uniformly dividing all the shaking grades with the shaking grades of 1-N-1 into three intervals, each interval corresponds to a corresponding correction model, and the correction models and the shaking grades are in positive correlation.
Preferably, the image brightness analysis value acquisition module further includes:
the brightness extraction module is used for uniformly extracting the brightness value of the image for the pixels in the image according to the preset sampling interval;
and the image brightness analysis value calculation module is used for averaging all the extracted image brightness values to obtain an image brightness analysis value of the image.
The embodiment of the invention has the following beneficial effects:
1. through water definition and image brightness analysis value, adjust the illumination intensity multiplying power of the light source in the gas tightness testing process to make the bubble characteristic more obvious, outstanding, be convenient for accurate check out test set gas tightness, improve and detect the precision.
2. The brightness information of the image interesting region is obtained by uniformly extracting the image brightness value according to the preset sampling interval, the brightness analysis value of the image is obtained, the image brightness information can be effectively analyzed and detected, and the calculation amount is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a method for adjusting a light source for air tightness detection based on computer vision according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating steps of a method for adjusting a light source for air tightness detection based on computer vision according to an embodiment of the present invention;
FIG. 3 is a functional image of different modified models corresponding to different shake levels;
fig. 4 is a block diagram of a system for adjusting a light source for air tightness detection based on computer vision according to an embodiment of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention adopted to achieve the predetermined objects, the following detailed description will be given to a method and a system for adjusting a light source for air tightness detection based on computer vision according to the present invention, with reference to the accompanying drawings and preferred embodiments, and the detailed description thereof will be made below. In the following description, different "one embodiment" or "another embodiment" refers to not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The following describes a specific scheme of the air tightness detection light source adjusting method and system based on computer vision in detail with reference to the accompanying drawings.
Referring to fig. 1 and fig. 2, fig. 1 is a flowchart illustrating a method for adjusting a light source for air tightness detection based on computer vision according to an embodiment of the present invention, and fig. 2 is a flowchart illustrating steps of a method for adjusting a light source for air tightness detection based on computer vision according to an embodiment of the present invention. The method comprises the following steps:
and S001, acquiring an image of the detection pool, and acquiring a water body region of interest of the denoised image.
Specifically, the camera is fixed and the illumination intensity of the light source of the system is set. The camera keeps a stable state in the process of collecting images to prevent the influence of camera shake on image quality, and the camera shoots the detection pool from the side.
Noise in the image has great influence on the definition degree of a water body and the brightness characteristics of the image, and the image acquired by the camera is subjected to denoising operation by considering that a plurality of noise points exist in the image due to various external factors in the image acquisition process.
Preferably, in the embodiment of the present invention, an adaptive median filtering algorithm is adopted to perform denoising processing on an image. In other embodiments, other denoising processing methods capable of achieving the same function may also be used.
After the image is denoised, a rectangular region of interest (ROI) is set for the image, and a water body region in the image is used as the ROI region.
Through setting up the ROI region, reduce the influence of waiting to examine equipment and detection pond glass board to predict the water definition through predicting the network, reduce system processing time, increase the precision.
And S002, evaluating the definition of the region of interest to obtain the definition of the water body.
The method comprises the following specific steps:
1) and (4) detecting the definition of the water body by adopting a twin network.
After ROI area extraction is carried out on the image, the image is sent into a definition prediction network for training, and water definition prediction identification is carried out on the ROI area of the image through the network.
The embodiment of the invention adopts the twin network to carry out prediction estimation on the water body definition of the detection pool, and can fully extract the water body definition characteristics.
The training process of the definition prediction network comprises the following steps:
the twin network has a left sub-network structure and a right sub-network structure, the images are divided into images of clear water bodies and images of various water bodies with different definitions, each image with different definitions and the image of the clear water body form a group, each group of preprocessed images is used as the input of a model, the ROI area of the input image is subjected to feature extraction, feature vectors of the two images are obtained through a water body feature extraction Encoder Encoder and a full connection layer FC, then the Euclidean distance between the features is calculated, and finally the similarity value S of the two images which are the same target is output.
The loss function of the network adopts a contrast loss function, and the function can well express the matching degree of paired samples and better train a network model. The mathematical formula is as follows:
wherein d | | | an-bn||2Representing two image sample features anAnd bnN is the number of samples, y is a label indicating whether two samples match, y equals to 1, which represents that two samples are similar or match, y equals to 0, which represents not match, and margin is a set threshold.
It should be noted that the parameters of the two feature extraction sub-networks are shared.
2) The similarity S of the water body in the image to be detected and the image of the clear water body is obtained through the trained water body definition prediction network, the water body definition in the image to be detected is evaluated according to the similarity of the water body definition and the image of the clear water body, and the larger the similarity value is, the higher the water body definition is.
And S003, acquiring the shaking degree of the water body, and dividing the water body into N +1 shaking grades of 0-N in total according to the shaking degree of the water body.
When the water body shaking degree is detected, in order to clearly reflect the water body shaking degree and enable the water body shaking degree to be more visible, the embodiment of the invention puts a block-shaped suspended matter into the detection pool.
The method comprises the following specific steps:
1) and sensing the suspended matters through a semantic segmentation network.
The semantic perception network label manufacturing process comprises the following steps:
and marking the suspended pixel as 1 and marking the pixels of other areas in the image as 0 so as to facilitate the network to perform segmentation identification. The network adopts a cross entropy loss function to carry out iterative training.
2) And dividing the shaking grade according to the variable quantity of the vertical coordinate of the suspended matter.
And obtaining a semantic perception effect picture of the suspended matter through a semantic perception network, and then obtaining the central coordinates (x, y) of the suspended matter through post-processing.
Post-processing methods in embodiments of the present invention include pixel statistics, calculations with software, and the like.
In the embodiment of the invention, the water body shaking degree is analyzed through the change of the vertical coordinate of the central point of the suspended matter between the adjacent frames, and the variable quantity delta y of the vertical movement of the vertical coordinate of the central point of the suspended matter in the two adjacent frames of images is expressed as follows:
Δy=yi-yi-1
wherein, yiThe greater the | Δ y | is, the more serious the water body shaking is, the smaller the similarity value of twin network detection is caused. Therefore, the water body shaking condition is graded according to the suspension vertical coordinate variable quantity, and the water body shaking condition is graded into N +1 grades of 0-N.
And step S004, correcting the current water body definition by applying a corresponding correction model according to the current shaking grade.
In order to obtain more accurate water body definition, improve the light source adjustment precision of a follow-up system and reduce the influence of water body shaking on light source adjustment, a water body definition adjustment method is arranged, so that the water body definition network output result is more accurate, and the adjustment precision of the air tightness experiment light source adjustment system is further ensured.
The purpose of this step is that the water definition under the different water rock degree is accurately obtained, and to different water rock grades, the influence to the water definition that the system acquireed is different, consequently, sets up adjustment method, adjusts the water definition under the different rock grades, and concrete adjustment method is as follows:
1) when the shaking grade is 0 or N, the definition of the water body does not need to be corrected.
When the system detects that the water body rocks the grade and is 0, detect that the pond water body does not appear rocking the condition, the similarity of network output is accurate, and the corresponding water body definition is relatively accurate this moment: s', no correction is required; the water body is rocked to cause the change of the definition of the water body, so that the output of the water body definition detection network model is inaccurate, and the precision of a light source adjusting system is influenced when the water body is too seriously rocked.
2) And uniformly dividing all the shaking grades with the shaking grades of 1-N-1 into three intervals, wherein each interval corresponds to a corresponding correction model, and the correction models are positively correlated with the shaking grades. As shown in fig. 3, the abscissa is | Δ y |, the ordinate is S', and different shake levels correspond to different correction models.
As one example, the shake level is divided into 5 levels in the embodiment of the present invention.
In the embodiment of the invention, the shaking grades of 1-3 are uniformly divided into 3 intervals.
a) When the degree of rocking of water was 1, the degree of rocking of water was less, set up water clarity similarity regulation model 1 to obtain the water clarity under the condition that the water rocks the grade and is 1, model 1 function expression is:
S′=S((e|Δy|-1)/e|Δy|+1)
b) when the degree is rocked to the water and is 2, the water rocks great, and it is 1 time big to rock the grade to water definition result influence, consequently, founds the compensation model that advances more to rock the water definition when the grade is 2 to the water and revise, so set up regulation model 2, reduce the water and rock the influence to the water definition:
S′=S[ln(4|Δy|+e)]
c) when the water rock level is 3, think that the water rock degree is comparatively serious, compare preceding water rock level, the influence degree is judged bigger to the water definition to this level, founds water definition compensation model 3, further increases the compensation value of model to revise the water definition of network output, model 3 function expression is:
S′=S(e0.5|Δy|+0.5)
wherein S' is the similarity value after adjustment, and delta y is the variation of the vertical coordinate of the center point of the suspended matter.
Compared with the method for adjusting the water body definition by adopting a unified adjustment rule, the embodiment of the invention compensates the water body definition to different degrees according to different water body shaking levels, a progressive adjustment model is established along with the increase of the water body shaking levels, the water body definition can be progressively corrected, the water body definition under different water body shaking levels can be obtained according to the corresponding adjustment model, more accurate water body definition can be obtained, and the illumination intensity of a light source in an air tightness experiment can be accurately adjusted based on the water body definition in the follow-up process.
Step S005 is to extract the image brightness of the image, and acquire an image brightness analysis value of the image.
The method comprises the following specific steps:
1) and uniformly extracting the brightness value of the image for the pixels in the image according to a preset sampling interval.
The embodiment of the invention presets the sampling interval to be 3 times of the line interval.
Specifically, the image brightness elements are extracted for the pixels in the image in a mode of separating two rows and two columns, and the step can effectively analyze and detect the image brightness information and reduce the system detection time.
2) And averaging all the extracted image brightness values to obtain an image brightness analysis value of the image.
A brightness analysis value model is constructed, the brightness characteristics of the image are analyzed, and the expression of a brightness analysis value function is as follows:
wherein P is an image luminance analysis value, P (x)i,yj) Is a pixel point P (x)i,yj) Image brightness value of xrIs the abscissa, x, of the right edge of the imagelIs the abscissa of the left edge of the image, ytOrdinate, y, representing the edge on the imagedA ordinate representing the lower edge of the image, [ 2 ]]Indicating that the rounding is performed on the expression inside the brackets.
The larger the model luminance analysis value is, the higher the image luminance is.
And S006, acquiring the magnification of light source adjustment according to the corrected water body definition and the image brightness analysis value, wherein the weighted summation of the water body definition and the image brightness analysis value is in a negative correlation with the magnification.
The method comprises the following specific steps:
1) and (4) constructing a mathematical model by combining the water body definition and the image brightness analysis value so as to calculate the multiplying power of the illumination intensity of the system light source to be adjusted. The mathematical model expression is:
wherein, the omega tableShowing the multiplying power required to be adjusted according to the illumination intensity of the current light source, and showing the definition of the corrected water body by S'; a. the1Weight representing the corrected water clarity, A2Weight representing the value of the luminance analysis of the image, A1+A2=1。
The larger the model similarity value and the image brightness analysis value are, the smaller the corresponding function value omega is, that is, the smaller the illumination intensity multiplying power of the light source to be adjusted is.
It should be noted that, in the air tightness test process, the external illumination intensity needs to be kept unchanged, so as to avoid the influence of the external light intensity on the light source adjustment in the air tightness detection process.
2) And setting a weight distribution model by combining the water body definition, the image brightness analysis value, the historical average water body definition change value and the historical average image brightness analysis change value at the current moment.
The weight distribution model function expression is as follows:
wherein,showing the change value of the historical average water body definition,Representing the historical average image luminance analysis variation value. Meanwhile, calculating the influence weight of the image brightness analysis value according to a weight distribution model: a. the2=1-A1。
The model is used for updating and predicting the illumination intensity adjustment model weight of the light source when the next frame of camera is collected in real time, response time is provided for system hardware, so that the system can adjust the illumination intensity of the light source in time according to the updated weight, clearer image data can be further obtained when the next frame of image is collected, the bubble characteristics in the image are more prominent, the air tightness of the equipment is more accurately detected, and the precision in the air tightness detection process is further improved.
In summary, in the embodiment of the present invention, an image of a detection pool is collected first, and a water body region of interest of the denoised image is obtained; then, evaluating the definition of the region of interest to obtain the definition of the water body; further acquiring the shaking degree of the water body, and classifying the shaking degree into shaking grades according to the size of the shaking degree of the water body; correcting the current water body definition by applying a corresponding correction model according to the current shaking grade; extracting image brightness of the image to obtain an image brightness analysis value of the image; and finally, acquiring the magnification of light source adjustment according to the corrected water body definition and the image brightness analysis value. According to the embodiment of the invention, the multiplying power of the light source can be adjusted according to the brightness characteristic, the water body definition and the water body shaking degree of the collected image, so that the bubble characteristic is more prominent, the air tightness of the equipment is more accurately detected, and the air tightness detection precision is improved.
Based on the same inventive concept as the above method, another embodiment of the present invention provides a system for adjusting a light source for air tightness detection based on computer vision, referring to fig. 4, the system comprises the following modules: the system comprises a region-of-interest obtaining module 1001, a water body definition obtaining module 1002, a shaking grade dividing module 1003, a water body definition correcting module 1004, an image brightness analysis value obtaining module 1005 and a light source adjusting module 1006.
Specifically, the region-of-interest obtaining module 1001 is configured to collect an image of the detection pool, and obtain a water body region-of-interest of the denoised image; the water body definition obtaining module 1002 is configured to perform definition evaluation on the region of interest to obtain water body definition; the shaking grade dividing module 1003 is used for acquiring the shaking degree of the water body and dividing the water body into N +1 shaking grades of 0-N in total according to the shaking degree of the water body; the water body definition correction module 1004 is used for correcting the current water body definition by applying a corresponding correction model according to the current shaking grade; the image brightness analysis value obtaining module 1005 is configured to perform image brightness extraction on an image to obtain an image brightness analysis value of the image; the light source adjusting module 1006 is configured to obtain a magnification of light source adjustment according to the corrected water body definition and the image brightness analysis value, and a weighted sum of the water body definition and the image brightness analysis value is in a negative correlation with the magnification.
Preferably, the water body definition obtaining module further comprises a similarity comparison module, which is used for comparing the similarity of the image of the region of interest of the water body to be detected with the image of the region of interest of the clear water body, so as to obtain the water body definition of the water body to be detected.
Preferably, the water body definition correction module includes:
and the corresponding correction module is used for uniformly dividing all the shaking grades with the shaking grades of 1-N-1 into three intervals, each interval corresponds to a corresponding correction model, and the correction models and the shaking grades are in positive correlation.
Preferably, the image brightness analysis value acquisition module further includes:
the brightness extraction module is used for uniformly extracting the brightness value of the image for the pixels in the image according to the preset sampling interval;
and the image brightness analysis value calculation module is used for averaging all the extracted image brightness values to obtain an image brightness analysis value of the image.
In summary, in the embodiment of the present invention, an image of a detection pool is collected by an interesting region obtaining module, and a water body interesting region of a denoised image is obtained; then, carrying out definition evaluation on the region of interest through a water body definition acquisition module to obtain the water body definition; the water body shaking degree is further acquired through the shaking grade dividing module, and the water body shaking degree is divided into shaking grades according to the size of the water body shaking degree; correcting the current water body definition by using a corresponding correction model according to the current shaking grade through a water body definition correction module; extracting image brightness of the image through an image brightness analysis value acquisition module to acquire an image brightness analysis value of the image; and finally, acquiring the multiplying power of light source regulation according to the corrected water body definition and the image brightness analysis value through a light source regulation module. The embodiment of the invention can make the bubble characteristics more prominent, more accurately detect the air tightness of the equipment and improve the precision of air tightness detection.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And specific embodiments thereof have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (10)
1. A computer vision-based air tightness detection light source adjusting method is characterized by comprising the following steps:
acquiring an image of a detection pool, and acquiring the water body region of interest of the denoised image;
performing definition evaluation on the region of interest to obtain the definition of a water body;
acquiring the water body shaking degree, and dividing the water body shaking degree into N +1 shaking grades of 0-N in total according to the water body shaking degree;
correcting the current water body definition by applying a corresponding correction model according to the current shaking grade;
extracting image brightness of the image to obtain an image brightness analysis value of the image;
and acquiring the magnification of light source adjustment according to the corrected water body definition and the image brightness analysis value, wherein the weighted sum of the water body definition and the image brightness analysis value is in a negative correlation with the magnification.
2. The method for adjusting the air tightness detection light source based on the computer vision as claimed in claim 1, wherein the method for obtaining the definition of the water body is as follows:
and carrying out similarity comparison on the interested area image of the water body to be detected and the interested area image of the clear water body to obtain the water body definition of the water body to be detected.
3. The method for adjusting the air tightness detection light source based on the computer vision as claimed in claim 1, wherein the step of correcting the definition of the water body comprises:
and uniformly dividing all the shaking grades with the shaking grades of 1-N-1 into three intervals, wherein each interval corresponds to a corresponding correction model, and the correction models and the shaking grades are in positive correlation.
4. The method for adjusting the air tightness detection light source based on the computer vision as claimed in claim 1, wherein the step of obtaining the image brightness analysis value comprises:
uniformly extracting image brightness values of pixels in the image according to a preset sampling interval;
and averaging all the extracted image brightness values to obtain an image brightness analysis value of the image.
5. The method for adjusting the air tightness detection light source based on the computer vision as claimed in claim 1, wherein the light source adjustment model is:
where ω represents the magnification of the adjustment required for the illumination intensity of the current light source, and S' represents the corrected waterThe volume definition, P, represents the image brightness analysis value; a. the1A weight representing the corrected water body clarity, A2Weight representing the value of the luminance analysis of the image, A1+A2=1。
6. The method for adjusting the air tightness detection light source based on the computer vision as claimed in claim 5, wherein the weight of the water body definition is obtained by combining the water body definition at the current moment, the image brightness analysis value, and the historical average water body definition change value and the historical average image brightness analysis change value.
7. A computer vision-based air tightness detection light source adjusting system is characterized by comprising the following modules:
the interesting region acquisition module is used for acquiring an image of the detection pool and acquiring a water body interesting region of the denoised image;
the water body definition acquisition module is used for evaluating the definition of the region of interest to acquire the water body definition;
the shaking grade division module is used for acquiring the shaking degree of the water body and dividing the water body into N +1 shaking grades of 0-N in total according to the shaking degree of the water body;
the water body definition correction module is used for correcting the current water body definition by applying a corresponding correction model according to the current shaking grade;
the image brightness analysis value acquisition module is used for extracting the image brightness of the image to acquire an image brightness analysis value of the image;
and the light source adjusting module is used for acquiring the multiplying power of light source adjustment according to the corrected water body definition and the image brightness analysis value, and the weighted sum of the water body definition and the image brightness analysis value is in a negative correlation with the multiplying power.
8. The system for adjusting an air tightness detection light source based on computer vision of claim 7, wherein the water body definition obtaining module further comprises a similarity contrast module for performing similarity contrast between the image of the region of interest of the water body to be detected and the image of the region of interest of the clear water body to obtain the water body definition of the water body to be detected.
9. The system for adjusting a gas tightness detection light source based on computer vision according to claim 7, wherein the water body definition correction module comprises:
and the corresponding correction module is used for uniformly dividing all the shaking grades with the shaking grades of 1-N-1 into three intervals, each interval corresponds to a corresponding correction model, and the correction models and the shaking grades are in positive correlation.
10. The system of claim 7, wherein the image brightness analysis value obtaining module further comprises:
the brightness extraction module is used for uniformly extracting the brightness value of the image for the pixels in the image according to a preset sampling interval;
and the image brightness analysis value calculation module is used for averaging all the extracted image brightness values to obtain an image brightness analysis value of the image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011567722.7A CN112580634A (en) | 2020-12-25 | 2020-12-25 | Air tightness detection light source adjusting method and system based on computer vision |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011567722.7A CN112580634A (en) | 2020-12-25 | 2020-12-25 | Air tightness detection light source adjusting method and system based on computer vision |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112580634A true CN112580634A (en) | 2021-03-30 |
Family
ID=75139844
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011567722.7A Withdrawn CN112580634A (en) | 2020-12-25 | 2020-12-25 | Air tightness detection light source adjusting method and system based on computer vision |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112580634A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113567058A (en) * | 2021-09-22 | 2021-10-29 | 南通中煌工具有限公司 | Light source parameter adjusting method based on artificial intelligence and visual perception |
CN117129481A (en) * | 2023-10-27 | 2023-11-28 | 南京华视智能科技股份有限公司 | Method for improving light source in detection system of lithium battery industry |
-
2020
- 2020-12-25 CN CN202011567722.7A patent/CN112580634A/en not_active Withdrawn
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113567058A (en) * | 2021-09-22 | 2021-10-29 | 南通中煌工具有限公司 | Light source parameter adjusting method based on artificial intelligence and visual perception |
CN117129481A (en) * | 2023-10-27 | 2023-11-28 | 南京华视智能科技股份有限公司 | Method for improving light source in detection system of lithium battery industry |
CN117129481B (en) * | 2023-10-27 | 2023-12-29 | 南京华视智能科技股份有限公司 | Method for improving light source in detection system of lithium battery industry |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106875381B (en) | Mobile phone shell defect detection method based on deep learning | |
CN107507173B (en) | No-reference definition evaluation method and system for full-slice image | |
CN107845087A (en) | The detection method and system of the uneven defect of liquid crystal panel lightness | |
CN108876797B (en) | Image segmentation system and method based on Spiking-SOM neural network clustering | |
CN109215053B (en) | Method for detecting moving vehicle with pause state in aerial video shot by unmanned aerial vehicle | |
CN109544592B (en) | Moving object detection algorithm for camera movement | |
CN105279772B (en) | A kind of trackability method of discrimination of infrared sequence image | |
CN104408707A (en) | Rapid digital imaging fuzzy identification and restored image quality assessment method | |
CN113298023B (en) | Insect dynamic behavior identification method based on deep learning and image technology | |
CN112580634A (en) | Air tightness detection light source adjusting method and system based on computer vision | |
CN112990392A (en) | New material floor defect target detection system based on improved YOLOv5 algorithm | |
CN111062974A (en) | Method and system for extracting foreground target by removing ghost | |
CN112862744B (en) | Intelligent detection method for internal defects of capacitor based on ultrasonic image | |
CN105678245A (en) | Target position identification method based on Haar features | |
CN110147816B (en) | Method and device for acquiring color depth image and computer storage medium | |
CN109166137A (en) | For shake Moving Object in Video Sequences detection algorithm | |
CN102314591B (en) | Method and equipment for detecting static foreground object | |
CN114463843A (en) | Multi-feature fusion fish abnormal behavior detection method based on deep learning | |
CN111833347A (en) | Transmission line damper defect detection method and related device | |
CN109840498B (en) | Real-time pedestrian detection method, neural network and target detection layer | |
CN116935496B (en) | Electronic cigarette smoke visual detection method | |
CN106600615A (en) | Image edge detection algorithm evaluation system and method | |
CN115830514B (en) | Whole river reach surface flow velocity calculation method and system suitable for curved river channel | |
CN116109840B (en) | Cherry spore identification method based on machine vision | |
CN115690100B (en) | Semi-supervised signal point detection model training method, signal point detection method and device |
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 | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20210330 |