CN111339353B - Image processing self-optimization method and device, electronic equipment and storage medium - Google Patents

Image processing self-optimization method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111339353B
CN111339353B CN202010108105.4A CN202010108105A CN111339353B CN 111339353 B CN111339353 B CN 111339353B CN 202010108105 A CN202010108105 A CN 202010108105A CN 111339353 B CN111339353 B CN 111339353B
Authority
CN
China
Prior art keywords
picture
preset condition
fuge
zhang
algorithm
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
CN202010108105.4A
Other languages
Chinese (zh)
Other versions
CN111339353A (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 Ronglian Yitong Information Technology Co ltd
Original Assignee
Beijing Ronglian Yitong Information Technology Co ltd
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 Ronglian Yitong Information Technology Co ltd filed Critical Beijing Ronglian Yitong Information Technology Co ltd
Priority to CN202010108105.4A priority Critical patent/CN111339353B/en
Publication of CN111339353A publication Critical patent/CN111339353A/en
Application granted granted Critical
Publication of CN111339353B publication Critical patent/CN111339353B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • G06F16/68Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/683Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Abstract

The invention provides a method, a device, electronic equipment and a storage medium for self-optimizing image processing, wherein the method comprises the following steps: step 1: detecting and monitoring the snap shot picture by adopting a first algorithm to obtain detection information; step 2: acquiring pictures meeting a first preset condition from the snap shot pictures based on the detection information, and sending the pictures to a user for auditing; step 3: obtaining an audit result of a user; inputting pictures meeting the second preset conditions and detection information in the pictures meeting the first preset conditions into a background algorithm data warehouse based on the auditing result; step 4: extracting pictures in a background algorithm data warehouse, and converting detection information into marked picture data; step 5: and carrying out algorithm training on the first algorithm by adopting the marked picture data to obtain a second algorithm. The image processing self-optimizing method can effectively process the business picture which is correctly identified by the algorithm, and can realize the self-optimization of the algorithm.

Description

Image processing self-optimization method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method and apparatus for self-optimizing image processing, an electronic device, and a storage medium.
Background
At present, an algorithm model is applied under a specific service scene after passing through a special training data set before leaving the factory, and an algorithm is based on probability, so that an algorithm confidence coefficient (can be analogically like a similarity) is generally given after a target is detected, meanwhile, a system can allow a user to set a detection threshold value, if the detection confidence coefficient of a picture is larger than the set threshold value, the picture is considered to be of the detection type, otherwise, the picture is judged to be of the detection type;
however, the number of the existing algorithm training data is limited, a batch of training data is generally collected and then the algorithm training (or algorithm upgrading) is generally carried out, and the service scene pictures in the service application platform of the algorithm are generally only subjected to reflow identification on the pictures with the identification errors, so that the probability of identifying the correct pictures cannot be improved, namely the pictures are identified as correct through the algorithm, but the pictures are identified as errors after repeated identification.
Disclosure of Invention
The invention aims to provide a self-optimizing method for image processing, which can effectively process images with correct algorithm identification, train the algorithm by adopting the images with correct identification, realize self-optimizing, realize that the correct images can not be identified by repeated identification, and improve the identification precision of the algorithm.
The embodiment of the invention provides a self-optimizing method for image processing, which comprises the following steps:
step 1: detecting and monitoring the snap shot picture by adopting a first algorithm to obtain detection information;
step 2: acquiring pictures meeting a first preset condition from the pictures meeting the snapshot based on the detection information, and sending the pictures to a user for verification;
step 3: obtaining an audit result of a user; inputting pictures meeting the second preset conditions and detection information in the pictures meeting the first preset conditions into a background algorithm data warehouse based on the auditing result;
step 4: extracting pictures in a background algorithm data warehouse, and converting detection information into marked picture data;
step 5: and carrying out algorithm training on the first algorithm by adopting the marked picture data to obtain a second algorithm.
Preferably, the detection information includes: detecting the confidence coefficient of the snap-shot picture, and when the confidence coefficient of the snap-shot picture is larger than a preset value, taking the snap-shot picture as an alarm picture;
the first preset condition is that the snap shot picture is judged to be an alarm picture after being detected by a first algorithm.
Preferably, the auditing result includes: and the snap shot picture is detected by the first algorithm and then is judged to be whether the judging result of the alarm picture is correct or not.
Preferably, the second preset condition is that the picture which is checked and confirmed by the user is judged to be the alarm picture after being detected by the first algorithm, and the judgment result is correct.
Preferably, the detecting and monitoring the snap shot picture by adopting the first algorithm specifically comprises the following steps:
step 11: performing boundary detection on the snap-shot picture;
step 12: screening the detected boundary and extracting the closed boundary;
step 13: acquiring a quadrilateral region containing a closed boundary;
step 14: and calculating the confidence coefficient of the quadrilateral region, and judging the quadrilateral region as an alarm picture when the confidence coefficient is larger than a preset value.
Preferably, the detection information further includes: closed boundaries and quadrilateral areas.
Preferably, the acquiring a quadrangular region containing closed boundaries specifically includes:
acquiring a quadrilateral region from the snap shot picture by adopting a preset quadrilateral model by taking the center of a closed boundary as the center; the difference value between the left and right length of the preset quadrilateral model and the left and right length of the closed boundary, and the difference value between the upper and lower length of the preset quadrilateral model and the upper and lower length of the closed boundary are all first preset difference values;
cutting the quadrangular region, extracting sampling blocks along any side of the quadrangular region, and respectively calculating the ratio of the internal image to the external image of the boundary in each sampling block;
When the maximum value in the occupation ratio is larger than a first preset occupation ratio, expanding the quadrilateral area on the snap-shot picture in the direction from the boundary to the edge of the quadrilateral area;
and when the maximum value in the occupancy rate is smaller than a second preset occupancy rate, shrinking the quadrilateral region on the snap-shot picture in the direction from the edge to the boundary of the quadrilateral region.
Preferably, calculating the confidence level of the quadrangular region specifically includes:
converting the color image of the quadrilateral region into a corresponding Gaussian color image by using a first formula; the first formula is:
Figure SMS_1
wherein G is 1 、G 2 、G 3 Respectively representing different color components of the gaussian image; t (T) 1 、T 2 、T 3 Respectively representing different color components of the color image; h represents a conversion parameter matrix of the first algorithm;
calculating a local gradient spectrum in the Gaussian color image by using a second formula; the second formula is:
QG C (i)=(G C (i)*dx) 2 +(G C (i)*dy) 2
wherein c is 1, 2 or 3; QG (quality of service) C (i) A magnitude spectrum representing an i-th pixel; g C (i) A color component value of the gaussian image representing the i-th pixel; dx, dy represent operators in x-direction and y-direction, respectively, x represents convolution;
calculating a local intensity spectrum by using a third formula; the third formula is:
Figure SMS_2
normalizing the local gradient spectrum and the local intensity spectrum to obtain a normalized local gradient spectrum Q of the ith pixel Gui (Chinese angelica) G C (i) And normalized local intensity spectrum Q of the ith pixel Gui S (i) The method comprises the steps of carrying out a first treatment on the surface of the The method comprises the following steps:
Figure SMS_3
wherein a is a preset constant, and GE and GV respectively represent the mean value and standard deviation of the local gradient spectrum; EE. EV represents the mean and standard deviation of the local intensity spectrum, respectively;
normalized local gradient spectrum Q Gui (Chinese angelica) G C (i) And normalized local intensity spectrum Q Gui S (i) Nonlinear linearization is carried out to obtain a nonlinear normalized local gradient spectrum Q of the ith pixel Non-ferrous metal G C (i) And the nonlinear normalized local intensity spectrum Q of the ith pixel Non S (i) The method comprises the steps of carrying out a first treatment on the surface of the The method comprises the following steps:
Figure SMS_4
nonlinear normalized local gradient spectrum Q from the ith pixel Non-ferrous metal G C (i) And the nonlinear normalized local intensity spectrum Q of the ith pixel Non S (i) Calculating the confidence Z (i) of the ith pixel; the method comprises the following steps:
Z(i)=nQ non-ferrous metal G C (i)+mQ Non S (i);
Wherein n and m are preset weighting values respectively;
taking the average value of the confidence coefficient of each pixel as the confidence coefficient of the quadrilateral region.
Preferably, based on the auditing result, inputting the picture meeting the second preset condition in the pictures meeting the first preset condition into a background algorithm data warehouse, wherein the concrete process is as follows:
step 31, extracting data information from all pictures meeting the first preset condition, and recording the extracted data information as Ω, which can be expressed as:
Ω={A k a ,A k b ,A k c },(k=1,2,…,n)
Wherein A is k a For the format and size data set of the kth Zhang Fuge first preset condition picture, A k b A data set for the k Zhang Fuge first preset condition picture content and picture object number, A k c A data set of the shape and the size of the object image and the display color of the kth Zhang Fuge first preset condition picture, wherein the value of k is 1,2, …, n, n is the total number of pictures conforming to the first preset condition;
step 32, screening the pictures meeting the second preset conditions;
Figure SMS_5
wherein when i is a, ω ki A filter value for the format and size of the kth Zhang Fuge first preset condition picture,α k ipq The value of the pq data in the data set of the format and the size of the kth Zhang Fuge first preset condition picture, alpha ipq Is the value of the pq-th data in the data set of the format and the size of the picture in the second preset condition, when i is b, omega ki A screening value of the number of the picture contents and the picture objects of the kth Zhang Fuge first preset condition, alpha k ipq For the value of the pq-th data in the data set of the k Zhang Fuge first preset condition picture content and picture object number, alpha ipq For the value of the pq-th data in the data set of the picture content and the picture object number in the second preset condition, omega when i is c ki The shape and size of the image and the screening value of the display color of the k Zhang Fuge first preset condition picture, alpha k ipq For the value of the pq-th data in the data set of the shape size and display color of the kth Zhang Fuge first preset condition picture object, alpha ipq The value of k is 1,2, …, n and n are the total number of pictures meeting the first preset condition;
step 33, obtaining a screening result according to the screening value;
τ ki =sgnω ki +1
wherein, when i is a, τ ki For the screening result, omega, of the picture meeting the second preset condition in the k Zhang Fuge first preset condition picture format and size ki For the filter value of the format and size of the k Zhang Fuge first preset condition picture, when i is b, τ ki For the screening result, omega, of the number of the picture contents and the picture object images meeting the second preset condition in the k Zhang Fuge first preset condition picture ki For the k Zhang Fuge first preset condition picture content and picture object number, when i is c, τ ki The shape and size of the picture object image conforming to the second preset condition in the k Zhang Fuge first preset condition picture and the screening result of the display color, omega ki A screening value for the shape and size of the image and the display color of the k Zhang Fuge first preset condition picture;
step 34, determining whether the pictures meeting the second preset conditions in the pictures meeting the first preset conditions are input into a background algorithm database or not based on the auditing result;
λ k =τ ka ·τ kb ·τ kc *f
Wherein lambda is k Determining result of whether the k Zhang Fuge picture with the first preset condition is input into a background algorithm database, and tau ka For the screening result, τ, of the k Zhang Fuge first preset condition picture which accords with the second preset condition picture format and size kb For the screening result of the content and the object image number of the picture meeting the second preset condition in the k Zhang Fuge first preset condition picture, tau kc The result of screening the shape and size and display color of the image conforming to the second preset condition in the k Zhang Fuge first preset condition image is f which is the checking result, and,
Figure SMS_6
step 35, when lambda k >When 0, the k Zhang Fuge picture of the first preset condition accords with the second preset condition, and the auditing is passed, and a background algorithm data warehouse is input; otherwise, the picture cannot be input into a background algorithm data warehouse.
The invention also provides a device for self-optimizing image processing, which comprises
The detection module is used for detecting the monitored snap shot picture by adopting a first algorithm to obtain detection information;
the sending module is used for acquiring pictures meeting a first preset condition from the snap shot pictures based on the detection information and sending the pictures to a user for verification;
the picture selecting module is used for acquiring the auditing result of the user; inputting pictures meeting the second preset conditions and detection information in the pictures meeting the first preset conditions into a background algorithm data warehouse based on the auditing result;
The labeling module is used for extracting pictures in the background algorithm data warehouse and converting the detection information into labeled picture data;
and the optimization module is used for carrying out algorithm training on the first algorithm by adopting the marked picture data to obtain a second algorithm.
Preferably, the picture selecting module inputs the pictures meeting the second preset condition in the pictures meeting the first preset condition into a background algorithm data warehouse based on the auditing result, and the specific process is as follows:
step 31, extracting data information from all pictures meeting the first preset condition, and recording the extracted data information as Ω, which can be expressed as:
Ω={A k a ,A k b ,A k c },(k=1,2,…,n)
wherein A is k a For the format and size data set of the kth Zhang Fuge first preset condition picture, A k b A data set for the k Zhang Fuge first preset condition picture content and picture object number, A k c A data set of the shape and the size of the object image and the display color of the kth Zhang Fuge first preset condition picture, wherein the value of k is 1,2, …, n, n is the total number of pictures conforming to the first preset condition;
step 32, screening the pictures meeting the second preset conditions;
Figure SMS_7
wherein when i is a, ω ki A is a screening value of the format and the size of the k Zhang Fuge first preset condition picture k ipq The value of the pq data in the data set of the format and the size of the kth Zhang Fuge first preset condition picture, alpha ipq Is the value of the pq-th data in the data set of the format and the size of the picture in the second preset condition, when i is b, omega ki A screening value of the number of the picture contents and the picture objects of the kth Zhang Fuge first preset condition, alpha k ipq For the value of the pq-th data in the data set of the k Zhang Fuge first preset condition picture content and picture object number, alpha ipq Is the number of the picture contents and the picture object image numbers in the second preset conditionAccording to the value of the pq-th data in the set, omega when i is c ki The shape and size of the image and the screening value of the display color of the k Zhang Fuge first preset condition picture, alpha k ipq For the value of the pq-th data in the data set of the shape size and display color of the kth Zhang Fuge first preset condition picture object, alpha ipq The value of k is 1,2, …, n and n are the total number of pictures meeting the first preset condition;
step 33, obtaining a screening result according to the screening value;
τ ki =sgnω ki +1
wherein, when i is a, τ ki For the screening result, omega, of the picture meeting the second preset condition in the k Zhang Fuge first preset condition picture format and size ki For the filter value of the format and size of the k Zhang Fuge first preset condition picture, when i is b, τ ki For the screening result, omega, of the number of the picture contents and the picture object images meeting the second preset condition in the k Zhang Fuge first preset condition picture ki For the k Zhang Fuge first preset condition picture content and picture object number, when i is c, τ ki The shape and size of the picture object image conforming to the second preset condition in the k Zhang Fuge first preset condition picture and the screening result of the display color, omega ki A screening value for the shape and size of the image and the display color of the k Zhang Fuge first preset condition picture;
step 34, determining whether the pictures meeting the second preset conditions in the pictures meeting the first preset conditions are input into a background algorithm database or not based on the auditing result;
λ k =τ ka ·τ kb ·τ kc *f
wherein lambda is k Determining result of whether the k Zhang Fuge picture with the first preset condition is input into a background algorithm database, and tau ka For the screening result, τ, of the k Zhang Fuge first preset condition picture which accords with the second preset condition picture format and size kb In the picture of the kth Zhang Fuge first preset conditionSelecting result, τ, of picture content and picture object number meeting second preset condition kc The result of screening the shape and size and display color of the image conforming to the second preset condition in the k Zhang Fuge first preset condition image is f which is the checking result, and,
Figure SMS_8
step 35, when lambda k >When 0, the k Zhang Fuge picture of the first preset condition accords with the second preset condition, and the auditing is passed, and a background algorithm data warehouse is input; otherwise, the picture cannot be input into a background algorithm data warehouse.
The present invention also provides an electronic device including: the device comprises a display screen, a processor and a memory;
the processor is electrically connected with the memory and the display screen respectively;
the memory stores instructions that, when executed by the processor, cause the processor to perform any of the image processing self-optimizing methods of the present invention.
The present invention also provides a computer readable storage medium having program code stored therein, the program code being executable by a processor to invoke a method of performing any of the image processing self-optimizations of the present invention.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
The technical scheme of the invention is further described in detail through the drawings and the embodiments.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, serve to explain the invention. In the drawings:
FIG. 1 is a schematic diagram of a method for image processing self-optimization in an embodiment of the present invention;
fig. 2 is a schematic diagram of a first algorithm detecting a picture captured by monitoring in an embodiment of the present invention;
fig. 3 is a schematic diagram of an apparatus for image processing self-optimization in an embodiment of the present invention.
In the figure:
21. a detection module; 22. a transmitting module; 23. a picture selecting module; 24. a labeling module; 25. and (5) an optimization module.
Detailed Description
The preferred embodiments of the present invention will be described below with reference to the accompanying drawings, it being understood that the preferred embodiments described herein are for illustration and explanation of the present invention only, and are not intended to limit the present invention.
The embodiment of the invention provides a self-optimizing method for image processing, which is shown in fig. 1 and comprises the following steps:
step 1: detecting and monitoring the snap shot picture by adopting a first algorithm to obtain detection information;
Step 2: acquiring pictures meeting a first preset condition from the snap shot pictures based on the detection information, and sending the pictures to a user for auditing;
step 3: obtaining an audit result of a user; inputting pictures meeting the second preset conditions and detection information in the pictures meeting the first preset conditions into a background algorithm data warehouse based on the auditing result;
step 4: extracting pictures in a background algorithm data warehouse, and converting detection information into marked picture data;
step 5: and carrying out algorithm training on the first algorithm by adopting the marked picture data to obtain a second algorithm.
The working principle and the beneficial effects of the technical scheme are as follows:
detecting the picture shot by monitoring, transmitting the picture (correct identification) meeting the first preset condition in the detection information to a client for checking (judging whether the identification is correct or not), and classifying the picture meeting the second preset condition and the detection information of the picture into a background algorithm data warehouse which is used for storing and optimizing the data of the first algorithm according to the result of the client checking. Extracting pictures in a background algorithm data warehouse, and converting detection information into marked picture data; and carrying out algorithm training on the first algorithm by adopting the marked picture data to obtain a second algorithm. The obtained second algorithm is an optimized algorithm of the first algorithm; during training, the sizes of all parameters in the first algorithm are mainly adjusted to obtain the optimal parameter values, so that the fact that the correct picture is repeatedly recognized and recognition errors cannot occur is achieved.
The optimization method can effectively process the pictures which are correctly recognized by the algorithm, train the algorithm by adopting the pictures which are correctly recognized, realize self-optimization, realize that the correct pictures cannot be recognized in repeated recognition, and improve the recognition accuracy of the algorithm.
In one embodiment, the detection information includes: detecting the confidence coefficient of the snap-shot picture, and taking the snap-shot picture as an alarm picture when the confidence coefficient of the snap-shot picture is larger than a preset value;
the first preset condition is that the snap shot picture is judged to be an alarm picture after being detected by a first algorithm.
The working principle and the beneficial effects of the technical scheme are as follows:
the detection information comprises: detecting the confidence coefficient of the snap-shot picture, and when the confidence coefficient of the snap-shot picture is larger than a preset value, taking the snap-shot picture as an alarm picture; the first preset condition is that the snap shot picture is judged to be an alarm picture after being detected by a first algorithm. For example, the item to be detected by the first algorithm is whether flame appears in the picture, the confidence level of flame appearing in the picture is detected by the first algorithm, and when the confidence level is larger than a preset value, the picture is judged to appear flame and alarm is needed, so that the picture is an alarm picture.
In one embodiment, the auditing results include: and the snap shot picture is detected by the first algorithm and then is judged to be whether the judging result of the alarm picture is correct or not.
The second preset condition is that the picture which is checked and shot by the user is checked and determined by the first algorithm and then is judged to be the alarm picture, and the judgment result is correct.
The technical scheme has the working principle and beneficial effects that:
and checking the alarm picture through user checking, on one hand, determining the correctness of the first algorithm, and on the other hand, selecting training basic data for the optimization of the first algorithm. The image processing self-optimizing method does not discard the picture which is determined to be the wrong judgment result of the alarm picture after the user checks and determines that the shot picture is detected by the first algorithm; the pictures also need to be collected for training the first algorithm, so that the first algorithm is optimized to generate a second algorithm, and the pictures which are captured after optimization are detected again through the second algorithm and then are judged to be alarm pictures.
In one embodiment, as shown in fig. 2, detecting the monitored snapshot image by using the first algorithm specifically includes the following steps:
step 11: performing boundary detection on the snap-shot picture;
Step 12: screening the detected boundary and extracting the closed boundary;
step 13: acquiring a quadrilateral region containing a closed boundary;
step 14: and calculating the confidence coefficient of the quadrilateral region, and judging the quadrilateral region as an alarm picture when the confidence coefficient is larger than a preset value.
The working principle and the beneficial effects of the technical scheme are as follows:
in order to realize the calculation of the confidence coefficient of the judgment item, the data area for calculating the confidence coefficient is extracted by processing the snap shot picture.
In one embodiment, the detection information further includes: closed boundaries and quadrilateral areas.
The technical scheme has the working principle and beneficial effects that:
marking the closed boundary and the selected quadrilateral region on the picture.
In one embodiment, acquiring a quadrilateral region containing closed boundaries specifically includes:
acquiring a quadrilateral region from the snap shot picture by adopting a preset quadrilateral model by taking the center of a closed boundary as the center; the difference value between the left and right length of the preset quadrilateral model and the left and right length of the closed boundary, and the difference value between the upper and lower length of the preset quadrilateral model and the upper and lower length of the closed boundary are all first preset difference values;
cutting the quadrangular region, extracting sampling blocks along any side of the quadrangular region, and respectively calculating the ratio of the internal image to the external image of the boundary in each sampling block;
When the maximum value in the occupation ratio is larger than a first preset occupation ratio, expanding the quadrilateral area on the snap-shot picture in the direction from the boundary to the edge of the quadrilateral area;
and when the maximum value in the occupancy rate is smaller than a second preset occupancy rate, shrinking the quadrilateral region on the snap-shot picture in the direction from the edge to the boundary of the quadrilateral region.
The working principle and the beneficial effects of the technical scheme are as follows:
the selection of the quadrilateral region is particularly important in order to ensure the accuracy of the confidence calculation, wherein the first preset occupation ratio is larger than the second preset occupation ratio during the selection. By taking the closed boundary as the standard of selecting the quadrilateral region, the extraction of the interference factor component in the data region used for calculating the confidence coefficient can be ensured, so that the accuracy of the confidence coefficient calculation is ensured. When the quadrilateral region is enlarged and the quadrilateral region is reduced, only the sides of the quadrilateral region where the sampling blocks are positioned are moved, and the other three sides of the quadrilateral region are kept unchanged.
In one embodiment, calculating the confidence of the quadrilateral region specifically includes:
converting the color image of the quadrilateral region into a corresponding Gaussian image by using a first formula; the first formula is:
Figure SMS_9
wherein G is 1 、G 2 、G 3 Respectively representing different color components of the gaussian image; t (T) 1 、T 2 、T 3 Respectively representing different color components of the color image; h represents the first calculationA conversion parameter matrix of the method;
calculating a local gradient spectrum in the Gaussian color image by using a second formula; the second formula is:
QG C (i)=(G C (i)*dx) 2 +(G C (i)*dy) 2
wherein c is 1, 2 or 3; QG (quality of service) C (i) A magnitude spectrum representing an i-th pixel; g C (i) A color component value of the gaussian image representing the i-th pixel; dx, dy represent operators in x-direction and y-direction, respectively, x represents convolution;
calculating a local intensity spectrum by using a third formula; the third formula is:
Figure SMS_10
normalizing the local gradient spectrum and the local intensity spectrum to obtain a normalized local gradient spectrum Q of the ith pixel Gui (Chinese angelica) G C (i) And normalized local intensity spectrum Q of the ith pixel Gui S (i) The method comprises the steps of carrying out a first treatment on the surface of the The method comprises the following steps:
Figure SMS_11
wherein a is a preset constant, and GE and GV respectively represent the mean value and standard deviation of the local gradient spectrum; EE. EV represents the mean and standard deviation of the local intensity spectrum, respectively;
normalized local gradient spectrum Q Gui (Chinese angelica) G C (i) And normalized local intensity spectrum Q Gui S (i) Nonlinear linearization is carried out to obtain a nonlinear normalized local gradient spectrum Q of the ith pixel Non-ferrous metal G C (i) And the nonlinear normalized local intensity spectrum Q of the ith pixel Non S (i) The method comprises the steps of carrying out a first treatment on the surface of the The method comprises the following steps:
Figure SMS_12
nonlinear normalized local gradient spectrum Q from the ith pixel Non-ferrous metal G C (i) And the nonlinear normalized local intensity spectrum Q of the ith pixel Non S (i) Calculating the confidence Z (i) of the ith pixel; the method comprises the following steps:
Z(i)=nQ non-ferrous metal G C (i)+mQ Non S (i);
Wherein n and m are preset weighting values respectively;
taking the average value of the confidence coefficient of each pixel as the confidence coefficient of the quadrilateral region.
The working principle and the beneficial effects of the technical scheme are as follows:
and calculating the confidence coefficient of each pixel point in the quadrangular region, and further extending and confirming the confidence coefficient of the quadrangular region. Wherein; h represents a conversion parameter matrix of the first algorithm, and is a parameter set which can be trained and adjusted in the first algorithm.
In one embodiment, based on the auditing result, inputting the picture meeting the second preset condition in the pictures meeting the first preset condition into a background algorithm data warehouse, wherein the specific process is as follows:
step 31, extracting data information from all pictures meeting the first preset condition, and recording the extracted data information as Ω, which can be expressed as:
Ω={A k a ,A k b ,A k c },(k=1,2,…,n)
wherein A is k a For the format and size data set of the kth Zhang Fuge first preset condition picture, A k b A data set for the k Zhang Fuge first preset condition picture content and picture object number, A k c A data set of the shape and the size of the object image and the display color of the kth Zhang Fuge first preset condition picture, wherein the value of k is 1,2, …, n, n is the total number of pictures conforming to the first preset condition;
Step 32, screening the pictures meeting the second preset conditions;
Figure SMS_13
wherein when i is a, ω ki A is a screening value of the format and the size of the k Zhang Fuge first preset condition picture k ipq The value of the pq data in the data set of the format and the size of the kth Zhang Fuge first preset condition picture, alpha ipq Is the value of the pq-th data in the data set of the format and the size of the picture in the second preset condition, when i is b, omega ki A screening value of the number of the picture contents and the picture objects of the kth Zhang Fuge first preset condition, alpha k ipq For the value of the pq-th data in the data set of the k Zhang Fuge first preset condition picture content and picture object number, alpha ipq For the value of the pq-th data in the data set of the picture content and the picture object number in the second preset condition, omega when i is c ki The shape and size of the image and the screening value of the display color of the k Zhang Fuge first preset condition picture, alpha k ipq For the value of the pq-th data in the data set of the shape size and display color of the kth Zhang Fuge first preset condition picture object, alpha ipq The value of k is 1,2, …, n and n are the total number of pictures meeting the first preset condition;
Step 33, obtaining a screening result according to the screening value;
τ ki =sgnω ki +1
wherein, when i is a, τ ki For the screening result, omega, of the picture meeting the second preset condition in the k Zhang Fuge first preset condition picture format and size ki For the filter value of the format and size of the k Zhang Fuge first preset condition picture, when i is b, τ ki For the screening result, omega, of the number of the picture contents and the picture object images meeting the second preset condition in the k Zhang Fuge first preset condition picture ki For the k Zhang Fuge first preset condition picture content and picture object number, when i is c, τ ki The shape and size of the picture object image conforming to the second preset condition in the k Zhang Fuge first preset condition picture and the screening result of the display color, omega ki Shape size and display color of the kth Zhang Fuge first preset condition picture objectColor screening value;
step 34, determining whether the pictures meeting the second preset conditions in the pictures meeting the first preset conditions are input into a background algorithm database or not based on the auditing result;
λ k =τ ka ·τ kb ·τ kc *f
wherein lambda is k Determining result of whether the k Zhang Fuge picture with the first preset condition is input into a background algorithm database, and tau ka For the screening result, τ, of the k Zhang Fuge first preset condition picture which accords with the second preset condition picture format and size kb For the screening result of the content and the object image number of the picture meeting the second preset condition in the k Zhang Fuge first preset condition picture, tau kc The result of screening the shape and size and display color of the image conforming to the second preset condition in the k Zhang Fuge first preset condition image is f which is the checking result, and,
Figure SMS_14
step 35, when lambda k >When 0, the k Zhang Fuge picture of the first preset condition accords with the second preset condition, and the auditing is passed, and a background algorithm data warehouse is input; otherwise, the picture cannot be input into a background algorithm data warehouse.
The beneficial effects are that: in the above technology, firstly, data information extraction is performed on all pictures meeting the first preset condition, then, second preset condition screening is performed, further, screening results are obtained, and finally, whether the pictures can be input into a background data warehouse is determined by combining the screening results and the auditing results. The technology can be used for selecting pictures in batches, so that the time is saved, and the screening is performed by adopting the technical scheme, so that the screening accuracy can be improved.
The invention also provides a device for self-optimizing image processing, as shown in figure 3, comprising
The detection module 21 is configured to detect the monitored snap shot picture by using a first algorithm, and obtain detection information;
The sending module 22 is configured to obtain, based on the detection information, a picture that meets a first preset condition from the captured pictures, and send the picture to a user for auditing;
the picture selecting module 23 is used for acquiring the auditing result of the user; inputting pictures meeting the second preset conditions and detection information in the pictures meeting the first preset conditions into a background algorithm data warehouse based on the auditing result;
the labeling module 24 is used for extracting pictures in the background algorithm data warehouse and converting the detection information into labeled picture data;
and the optimization module 25 is configured to perform algorithm training on the first algorithm by using the labeled picture data to obtain a second algorithm.
The working principle and the beneficial effects of the technical scheme are as follows:
the detection module 21 detects the monitored and snapped pictures, the sending module 22 sends the pictures meeting the first preset condition in the detection results to the client for verification, and the picture selecting module 23 classifies the pictures meeting the second preset condition and the detection information of the pictures into a background algorithm data warehouse which is used as data for storing and optimizing the first algorithm according to the results of the client verification. The labeling module 24 extracts pictures in the background algorithm data warehouse and converts the detection information into labeled picture data; the optimization module 25 performs algorithm training on the first algorithm by using the labeled picture data to obtain a second algorithm. The obtained second algorithm is an optimized algorithm of the first algorithm; the first algorithm is mainly used for adjusting the magnitude of each parameter in the first algorithm to obtain the optimal parameter value.
The optimization method can effectively process the pictures which are correctly recognized by the algorithm, train the algorithm by adopting the pictures which are correctly recognized, realize self-optimization, realize that the correct pictures cannot be recognized in repeated recognition, and improve the recognition accuracy of the algorithm.
In one embodiment, the picture selection module inputs, based on the auditing result, a picture meeting a second preset condition in the pictures meeting the first preset condition into a background algorithm data warehouse, and the specific process is as follows:
step 31, extracting data information from all pictures meeting the first preset condition, and recording the extracted data information as Ω, which can be expressed as:
Ω={A k a ,A k b ,A k c },(k=1,2,…,n)
wherein A is k a For the format and size data set of the kth Zhang Fuge first preset condition picture, A k b A data set for the k Zhang Fuge first preset condition picture content and picture object number, A k c A data set of the shape and the size of the object image and the display color of the kth Zhang Fuge first preset condition picture, wherein the value of k is 1,2, …, n, n is the total number of pictures conforming to the first preset condition;
step 32, screening the pictures meeting the second preset conditions;
Figure SMS_15
wherein when i is a, ω ki A is a screening value of the format and the size of the k Zhang Fuge first preset condition picture k ipq The value of the pq data in the data set of the format and the size of the kth Zhang Fuge first preset condition picture, alpha ipq Is the value of the pq-th data in the data set of the format and the size of the picture in the second preset condition, when i is b, omega ki A screening value of the number of the picture contents and the picture objects of the kth Zhang Fuge first preset condition, alpha k ipq For the value of the pq-th data in the data set of the k Zhang Fuge first preset condition picture content and picture object number, alpha ipq For the value of the pq-th data in the data set of the picture content and the picture object number in the second preset condition, omega when i is c ki The shape and size of the image and the screening value of the display color of the k Zhang Fuge first preset condition picture, alpha k ipq For the value of the pq-th data in the data set of the shape size and display color of the kth Zhang Fuge first preset condition picture object, alpha ipq The value of k is 1,2, …, n and n are the total number of pictures meeting the first preset condition;
step 33, obtaining a screening result according to the screening value;
τ ki =sgnω ki +1
wherein, when i is a, τ ki For the screening result, omega, of the picture meeting the second preset condition in the k Zhang Fuge first preset condition picture format and size ki For the filter value of the format and size of the k Zhang Fuge first preset condition picture, when i is b, τ ki For the screening result, omega, of the number of the picture contents and the picture object images meeting the second preset condition in the k Zhang Fuge first preset condition picture ki For the k Zhang Fuge first preset condition picture content and picture object number, when i is c, τ ki The shape and size of the picture object image conforming to the second preset condition in the k Zhang Fuge first preset condition picture and the screening result of the display color, omega ki A screening value for the shape and size of the image and the display color of the k Zhang Fuge first preset condition picture;
step 34, determining whether the pictures meeting the second preset conditions in the pictures meeting the first preset conditions are input into a background algorithm database or not based on the auditing result;
λ k =τ ka ·τ kb ·τ kc *f
wherein lambda is k Determining result of whether the k Zhang Fuge picture with the first preset condition is input into a background algorithm database, and tau ka For the screening result, τ, of the k Zhang Fuge first preset condition picture which accords with the second preset condition picture format and size kb For the screening result of the content and the object image number of the picture meeting the second preset condition in the k Zhang Fuge first preset condition picture, tau kc The result of screening the shape and size and display color of the image conforming to the second preset condition in the k Zhang Fuge first preset condition image is f which is the checking result, and,
Figure SMS_16
Step 35, when lambda k >When 0, the k Zhang Fuge picture of the first preset condition accords with the second preset condition, and the auditing is passed, and a background algorithm data warehouse is input; otherwise, the picture cannot be input into a background algorithm data warehouse.
The beneficial effects are that: in the above technology, firstly, data information extraction is performed on all pictures meeting the first preset condition, then, second preset condition screening is performed, further, screening results are obtained, and finally, whether the pictures can be input into a background data warehouse is determined by combining the screening results and the auditing results. The technology can be used for selecting pictures in batches, so that the time is saved, and the screening is performed by adopting the technical scheme, so that the screening accuracy can be improved.
In one embodiment, the detection module 21 performs the steps comprising:
step 11: performing boundary detection on the snap-shot picture;
step 12: screening the detected boundary and extracting the closed boundary;
step 13: acquiring a quadrilateral region containing a closed boundary;
step 14: and calculating the confidence coefficient of the quadrilateral region, and judging the quadrilateral region as an alarm picture when the confidence coefficient is larger than a preset value.
In order to realize the calculation of the confidence coefficient of the judgment item, the data area for calculating the confidence coefficient is extracted by processing the picture.
Wherein the detection information includes: closed boundaries and quadrilateral areas.
The acquiring the quadrilateral area containing the closed boundary specifically comprises the following steps:
acquiring a quadrilateral region from the snap shot picture by adopting a preset quadrilateral model by taking the center of a closed boundary as the center; the difference value between the left and right length of the preset quadrilateral model and the left and right length of the closed boundary, and the difference value between the upper and lower length of the preset quadrilateral model and the upper and lower length of the closed boundary are all first preset difference values;
cutting the quadrangular region, extracting sampling blocks along any side of the quadrangular region, and respectively calculating the ratio of the internal image to the external image of the boundary in each sampling block;
when the maximum value in the occupation ratio is larger than a first preset occupation ratio, expanding the quadrilateral area on the snap-shot picture in the direction from the boundary to the edge of the quadrilateral area;
and when the maximum value in the occupancy rate is smaller than a second preset occupancy rate, shrinking the quadrilateral region on the snap-shot picture in the direction from the edge to the boundary of the quadrilateral region.
The selection of the quadrilateral region is particularly important in order to ensure the accuracy of the confidence calculation, wherein the first preset occupation ratio is larger than the second preset occupation ratio during the selection. By taking the closed boundary as the standard of selecting the quadrilateral region, the extraction of the interference factor component in the data region used for calculating the confidence coefficient can be ensured, so that the accuracy of the confidence coefficient calculation is ensured.
The calculating the confidence coefficient of the quadrilateral region specifically comprises the following steps:
converting the color image of the quadrilateral region into a corresponding Gaussian image by using a first formula; the first formula is:
Figure SMS_17
wherein G is 1 、G 2 、G 3 Respectively representing different color components of the gaussian image; t (T) 1 、T 2 、T 3 Respectively representing different color components of the color image; h represents a conversion parameter matrix of the first algorithm;
calculating a local gradient spectrum in the Gaussian color image by using a second formula; the second formula is:
QG C (i)=(G C (i)*dx) 2 +(G C (i)*dy) 2
wherein c is 1, 2 or 3; QG (quality of service) C (i) A magnitude spectrum representing an i-th pixel; g C (i) A color component value of the gaussian image representing the i-th pixel;dx, dy represent operators in x-direction and y-direction, respectively, x represents convolution;
calculating a local intensity spectrum by using a third formula; the third formula is:
Figure SMS_18
normalizing the local gradient spectrum and the local intensity spectrum to obtain a normalized local gradient spectrum Q of the ith pixel Gui (Chinese angelica) Normalized local intensity spectrum Q for GC (i) and ith pixel Gui S (i) The method comprises the steps of carrying out a first treatment on the surface of the The method comprises the following steps:
Figure SMS_19
wherein a is a preset constant, and GE and GV respectively represent the mean value and standard deviation of the local gradient spectrum; EE. EV represents the mean and standard deviation of the local intensity spectrum, respectively;
normalized local gradient spectrum Q Gui (Chinese angelica) G C (i) And normalized local intensity spectrum Q Gui S (i) Nonlinear linearization is carried out to obtain a nonlinear normalized local gradient spectrum Q of the ith pixel Non-ferrous metal Nonlinear normalized local intensity spectrum Q for GC (i) and ith pixel Non S (i) The method comprises the steps of carrying out a first treatment on the surface of the The method comprises the following steps:
Figure SMS_20
nonlinear normalized local gradient spectrum Q from the ith pixel Non-ferrous metal Nonlinear normalized local intensity spectrum Q for GC (i) and ith pixel Non S (i) Calculating the confidence Z (i) of the ith pixel; the method comprises the following steps:
Z(i)=nQ non-ferrous metal G C (i)+mQ Non S (i);
Wherein n and m are preset weighting values respectively;
taking the average value of the confidence coefficient of each pixel as the confidence coefficient of the quadrilateral region.
And calculating the confidence coefficient of each pixel point in the quadrangular region, and further extending and confirming the confidence coefficient of the quadrangular region. Wherein; h represents a conversion parameter matrix of the first algorithm, and is a parameter set which can be trained and adjusted in the first algorithm.
The present invention also provides an electronic device including: the device comprises a display screen, a processor and a memory;
the processor is electrically connected with the memory and the display screen respectively;
the memory stores instructions that, when executed by the processor, cause the processor to perform any of the image processing self-optimizing methods of the present invention.
The present invention also provides a computer readable storage medium having program code stored therein, the program code being executable by a processor to invoke a method of performing any of the image processing self-optimizations of the present invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (9)

1. A method of image processing self-optimization, comprising:
step 1: detecting and monitoring the snap shot picture by adopting a first algorithm to obtain detection information;
step 2: acquiring pictures meeting a first preset condition from the snap shot pictures based on the detection information, and sending the pictures to a user for auditing;
step 3: obtaining an audit result of a user; inputting the pictures meeting the second preset conditions and the detection information in a background algorithm data warehouse based on the auditing result;
step 4: extracting pictures in the background algorithm data warehouse, and converting the detection information into marked picture data;
step 5: carrying out algorithm training on the first algorithm by adopting the marked picture data to obtain a second algorithm;
the method comprises the following specific processes of inputting pictures meeting second preset conditions in pictures meeting first preset conditions into a background algorithm data warehouse based on the auditing result:
Step 31, extracting data information of all pictures meeting the first preset condition, and recording the extracted data information as omega, which is expressed as:
Ω={A k a ,A k b ,A k c },(k=1,2,…,n)
wherein A is k a For the format and size data set of the kth Zhang Fuge first preset condition picture, A k b A data set for the k Zhang Fuge first preset condition picture content and picture object number, A k c A data set of the shape and the size of the object image and the display color of the kth Zhang Fuge first preset condition picture, wherein the value of k is 1,2, …, n, n is the total number of pictures conforming to the first preset condition;
step 32, screening the pictures meeting the second preset conditions;
Figure QLYQS_1
(k=1, 2, …, n; i is a, b, c)
Wherein when i is a, ω ki A is a screening value of the format and the size of the k Zhang Fuge first preset condition picture k ipq The value of the pq data in the data set of the format and the size of the kth Zhang Fuge first preset condition picture, alpha ipq Is the value of the pq-th data in the data set of the format and the size of the picture in the second preset condition, when i is b, omega ki A screening value of the number of the picture contents and the picture objects of the kth Zhang Fuge first preset condition, alpha k ipq For the value of the pq-th data in the data set of the k Zhang Fuge first preset condition picture content and picture object number, alpha ipq For the value of the pq-th data in the data set of the picture content and the picture object number in the second preset condition, omega when i is c ki The shape and size of the image and the screening value of the display color of the k Zhang Fuge first preset condition picture, alpha k ipq For the value of the pq-th data in the data set of the shape size and display color of the kth Zhang Fuge first preset condition picture object, alpha ipq The value of k is 1,2, …, n and n are the total number of pictures meeting the first preset condition;
step 33, obtaining a screening result according to the screening value;
τ ki =sgnω ki +1
wherein, when i is a, τ ki For the screening result, omega, of the picture meeting the second preset condition in the k Zhang Fuge first preset condition picture format and size ki For the filter value of the format and size of the k Zhang Fuge first preset condition picture, when i is b, τ ki For the screening result, omega, of the number of the picture contents and the picture object images meeting the second preset condition in the k Zhang Fuge first preset condition picture ki For the k Zhang Fuge first preset condition picture content and picture object number, when i is c, τ ki The shape and size of the picture object image conforming to the second preset condition in the k Zhang Fuge first preset condition picture and the screening result of the display color, omega ki A screening value for the shape and size of the image and the display color of the k Zhang Fuge first preset condition picture;
step 34, determining whether the pictures meeting the second preset conditions in the pictures meeting the first preset conditions are input into a background algorithm database or not based on the auditing result;
λ k =τ ka ·τ kb ·τ kc *f
wherein lambda is k Determining result of whether the k Zhang Fuge picture with the first preset condition is input into a background algorithm database, and tau ka For the screening result, τ, of the k Zhang Fuge first preset condition picture which accords with the second preset condition picture format and size kb For the screening result of the content and the object image number of the picture meeting the second preset condition in the k Zhang Fuge first preset condition picture, tau kc The result of screening the shape and size and display color of the image conforming to the second preset condition in the k Zhang Fuge first preset condition image is f which is the checking result, and,
Figure QLYQS_2
step 35, when lambda k When the number is more than 0, the k Zhang Fuge picture with the first preset condition accords with the second preset condition, and the auditing is passed, and a background algorithm data warehouse is input; otherwise, the picture cannot be input into a background algorithm data warehouse.
2. The method of image processing self-optimization of claim 1, wherein,
The detection information includes: detecting the confidence coefficient of the snap shot picture, and when the confidence coefficient of the snap shot picture is larger than a preset value, the snap shot picture is an alarm picture;
the first preset condition is that the captured picture is judged to be an alarm picture after being detected by the first algorithm;
the auditing result comprises: the snap-shot picture is detected by the first algorithm and then is judged to be whether the judging result of the alarm picture is correct or not;
and the second preset condition is that the user checks and determines that the judgment result of the captured picture which is judged to be the alarm picture after the first algorithm detects is correct.
3. The method for self-optimizing image processing according to claim 1, wherein the detecting the monitored snapshot image using the first algorithm comprises the steps of:
step 11: performing boundary detection on the snap shot picture;
step 12: screening the detected boundary and extracting the closed boundary;
step 13: acquiring a quadrilateral region containing the closed boundary;
step 14: and calculating the confidence coefficient of the quadrilateral region, and judging the quadrilateral region as an alarm picture when the confidence coefficient is larger than a preset value.
4. The method of image processing self-optimization of claim 3, wherein the detection information further comprises: the closed border and the quadrilateral region.
5. The method of image processing self-optimization according to claim 3, wherein obtaining a quadrilateral region containing the closed boundary comprises:
acquiring a quadrilateral region from the snap-shot picture by adopting a preset quadrilateral model by taking the center of the closed boundary as the center; the difference value between the left and right length of the preset quadrilateral model and the left and right length of the closed boundary, and the difference value between the upper and lower length of the preset quadrilateral model and the upper and lower length of the closed boundary are all first preset difference values;
cutting the quadrangular region, extracting sampling blocks along any side of the quadrangular region, and respectively calculating the ratio of the internal image to the external image of the boundary in each sampling block;
when the maximum value in the occupation ratio is larger than a first preset occupation ratio, expanding the quadrilateral area on the snap-shot picture in the direction from the boundary to the edge of the quadrilateral area;
and when the maximum value in the occupancy rate is smaller than a second preset occupancy rate, shrinking the quadrilateral region on the snap-shot picture in the direction from the edge of the quadrilateral region to the boundary.
6. The method of image processing self-optimization according to claim 3, wherein said calculating the confidence level of the quadrangular region specifically comprises:
converting the color image of the quadrilateral region into a corresponding Gaussian image by using a first formula; the first formula is:
Figure QLYQS_3
wherein G is 1 、G 2 、G 3 Respectively representing different color components of the gaussian image; t (T) 1 、T 2 、T 3 Respectively representing different color components of the color image; h represents a conversion parameter matrix of the first algorithm;
calculating a local gradient spectrum in the Gaussian color image by using a second formula; the second formula is:
QG C (i)=(G C (i)*dx) 2 +(G C (i)*dy) 2
wherein c is 1, 2 or 3; QG (quality of service) C (i) A magnitude spectrum representing an i-th pixel; g C (i) A color component value of the gaussian image representing the i-th pixel; dx, dy represent operators in x-direction and y-direction, respectively, x represents convolution;
calculating a local intensity spectrum by using a third formula; the third formula is:
Figure QLYQS_4
normalizing the local gradient spectrum and the local intensity spectrum to obtain a normalized local gradient spectrum Q of the ith pixel Gui (Chinese angelica) G C (i) And normalized local intensity spectrum Q of the ith pixel Gui S (i) The method comprises the steps of carrying out a first treatment on the surface of the The method comprises the following steps:
Figure QLYQS_5
wherein a is a preset constant, and GE and GV respectively represent the mean value and standard deviation of the local gradient spectrum; EE. EV represents the mean and standard deviation of the local intensity spectrum, respectively;
Normalized local gradient spectrum Q Gui (Chinese angelica) G C (i) And normalized local intensity spectrum Q Gui S (i) Nonlinear linearization is carried out to obtain a nonlinear normalized local gradient spectrum Q of the ith pixel Non-ferrous metal G C (i) And ith (th)Nonlinear normalized local intensity spectrum Q of a pixel Non S (i) The method comprises the steps of carrying out a first treatment on the surface of the The method comprises the following steps:
Figure QLYQS_6
nonlinear normalized local gradient spectrum Q from the ith pixel Non-ferrous metal G C (i) And the nonlinear normalized local intensity spectrum Q of the ith pixel Non S (i) Calculating the confidence Z (i) of the ith pixel; the method comprises the following steps:
Z(i)=nQ non-ferrous metal G C (i)+mQ Non S (i);
Wherein n and m are preset weighting values respectively;
and taking the average value of the confidence coefficient of each pixel as the confidence coefficient of the quadrilateral region.
7. An apparatus for self-optimizing image processing, comprising
The detection module (21) is used for detecting the picture captured by monitoring by adopting a first algorithm to acquire detection information;
the sending module (22) is used for acquiring pictures meeting a first preset condition from the snap shot pictures based on the detection information and sending the pictures to a user for verification;
the picture selecting module (23) is used for acquiring the auditing result of the user; inputting the pictures meeting the second preset conditions and the detection information in a background algorithm data warehouse based on the auditing result;
The labeling module (24) is used for extracting pictures in the background algorithm data warehouse and converting the detection information into labeled picture data;
the optimization module (25) is used for carrying out algorithm training on the first algorithm by adopting the marked picture data to obtain a second algorithm;
the picture selecting module inputs pictures meeting second preset conditions in the pictures meeting first preset conditions into a background algorithm data warehouse based on the auditing result, and the specific process is as follows:
step 31, extracting data information of all pictures meeting the first preset condition, and recording the extracted data information as omega, which is expressed as:
Ω={A k a ,A k b ,A k c },(k=1,2,…,n)
wherein A is k a For the format and size data set of the kth Zhang Fuge first preset condition picture, A k b A data set for the k Zhang Fuge first preset condition picture content and picture object number, A k c A data set of the shape and the size of the object image and the display color of the kth Zhang Fuge first preset condition picture, wherein the value of k is 1,2, …, n, n is the total number of pictures conforming to the first preset condition;
step 32, screening the pictures meeting the second preset conditions;
Figure QLYQS_7
(k=1, 2, …, n; i is a, b, c)
Wherein when i is a, ω ki A is a screening value of the format and the size of the k Zhang Fuge first preset condition picture k ipq The value of the pq data in the data set of the format and the size of the kth Zhang Fuge first preset condition picture, alpha ipq Is the value of the pq-th data in the data set of the format and the size of the picture in the second preset condition, when i is b, omega ki A screening value of the number of the picture contents and the picture objects of the kth Zhang Fuge first preset condition, alpha k ipq For the value of the pq-th data in the data set of the k Zhang Fuge first preset condition picture content and picture object number, alpha ipq For the value of the pq-th data in the data set of the picture content and the picture object number in the second preset condition, omega when i is c ki The shape and size of the image and the screening value of the display color of the k Zhang Fuge first preset condition picture, alpha k ipq Shape size and display color of the kth Zhang Fuge first preset condition picture objectValues of pq data, alpha ipq The value of k is 1,2, …, n and n are the total number of pictures meeting the first preset condition;
step 33, obtaining a screening result according to the screening value;
τ ki =sgnω ki +1
wherein, when i is a, τ ki A screening result, w, of the picture meeting the second preset condition in the k Zhang Fuge first preset condition picture ki For the filter value of the format and size of the k Zhang Fuge first preset condition picture, when i is b, τ ki For the screening result, omega, of the number of the picture contents and the picture object images meeting the second preset condition in the k Zhang Fuge first preset condition picture ki For the k Zhang Fuge first preset condition picture content and picture object number, when i is c, τ ki The shape and size of the picture object image conforming to the second preset condition in the k Zhang Fuge first preset condition picture and the screening result of the display color, omega ki A screening value for the shape and size of the image and the display color of the k Zhang Fuge first preset condition picture;
step 34, determining whether the pictures meeting the second preset conditions in the pictures meeting the first preset conditions are input into a background algorithm database or not based on the auditing result;
λ k =τ ka ·τ kb ·τ kc *f
wherein lambda is k Determining result of whether the k Zhang Fuge picture with the first preset condition is input into a background algorithm database, and tau ka For the screening result, τ, of the k Zhang Fuge first preset condition picture which accords with the second preset condition picture format and size kb For the screening result of the content and the object image number of the picture meeting the second preset condition in the k Zhang Fuge first preset condition picture, tau kc The result of screening the shape and size and display color of the image conforming to the second preset condition in the k Zhang Fuge first preset condition image is f which is the checking result, and,
Figure QLYQS_8
Step 35, when lambda k When the number is more than 0, the k Zhang Fuge picture with the first preset condition accords with the second preset condition, and the auditing is passed, and a background algorithm data warehouse is input; otherwise, the picture cannot be input into a background algorithm data warehouse.
8. An electronic device, comprising: the device comprises a display screen, a processor and a memory;
the processor is electrically connected with the memory and the display screen respectively;
the memory stores instructions that, when executed by the processor, cause the processor to perform the method of any of claims 1 to 6.
9. A computer readable storage medium having stored therein program code which is callable by a processor to perform the method of any one of claims 1 to 6.
CN202010108105.4A 2020-02-21 2020-02-21 Image processing self-optimization method and device, electronic equipment and storage medium Active CN111339353B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010108105.4A CN111339353B (en) 2020-02-21 2020-02-21 Image processing self-optimization method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010108105.4A CN111339353B (en) 2020-02-21 2020-02-21 Image processing self-optimization method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111339353A CN111339353A (en) 2020-06-26
CN111339353B true CN111339353B (en) 2023-06-09

Family

ID=71184211

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010108105.4A Active CN111339353B (en) 2020-02-21 2020-02-21 Image processing self-optimization method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111339353B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005229289A (en) * 2004-02-12 2005-08-25 Kazufusa Noda Image monitoring apparatus and method
CN107194396A (en) * 2017-05-08 2017-09-22 武汉大学 Method for early warning is recognized based on the specific architecture against regulations in land resources video monitoring system
CN108154686A (en) * 2018-02-12 2018-06-12 苏州清研微视电子科技有限公司 A kind of vehicle-mounted act of violating regulations capturing system
CN109190608A (en) * 2018-10-30 2019-01-11 长威信息科技发展股份有限公司 A kind of city intelligent identification Method violating the regulations
CN110245716A (en) * 2019-06-20 2019-09-17 杭州睿琪软件有限公司 Sample labeling auditing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005229289A (en) * 2004-02-12 2005-08-25 Kazufusa Noda Image monitoring apparatus and method
CN107194396A (en) * 2017-05-08 2017-09-22 武汉大学 Method for early warning is recognized based on the specific architecture against regulations in land resources video monitoring system
CN108154686A (en) * 2018-02-12 2018-06-12 苏州清研微视电子科技有限公司 A kind of vehicle-mounted act of violating regulations capturing system
CN109190608A (en) * 2018-10-30 2019-01-11 长威信息科技发展股份有限公司 A kind of city intelligent identification Method violating the regulations
CN110245716A (en) * 2019-06-20 2019-09-17 杭州睿琪软件有限公司 Sample labeling auditing method and device

Also Published As

Publication number Publication date
CN111339353A (en) 2020-06-26

Similar Documents

Publication Publication Date Title
CN109145759B (en) Vehicle attribute identification method, device, server and storage medium
CN109766890B (en) Information identification method, equipment and system
CN108268867B (en) License plate positioning method and device
CN110765795B (en) Two-dimensional code identification method and device and electronic equipment
CN111797821A (en) Text detection method and device, electronic equipment and computer storage medium
CN110443237B (en) Certificate identification method, device, electronic equipment and computer readable storage medium
US10395090B2 (en) Symbol detection for desired image reconstruction
CN111814776B (en) Image processing method, device, server and storage medium
CN110717449A (en) Vehicle annual inspection personnel behavior detection method and device and computer equipment
CN111340041A (en) License plate recognition method and device based on deep learning
CN110599514A (en) Image segmentation method and device, electronic equipment and storage medium
CN111310751A (en) License plate recognition method and device, electronic equipment and storage medium
CN111507957B (en) Identity card picture conversion method and device, computer equipment and storage medium
CN110765940B (en) Target object statistical method and device
CN111339353B (en) Image processing self-optimization method and device, electronic equipment and storage medium
CN115083008A (en) Moving object detection method, device, equipment and storage medium
CN112215222A (en) License plate recognition method, device, equipment and storage medium
CN107330470B (en) Method and device for identifying picture
CN112308062B (en) Medical image access number identification method in complex background image
CN115116119A (en) Face recognition system based on digital image processing technology
CN115311680A (en) Human body image quality detection method and device, electronic equipment and storage medium
CN113627442A (en) Medical information input method, device, equipment and storage medium
CN115082326A (en) Processing method for deblurring video, edge computing equipment and central processor
CN111695404A (en) Pedestrian falling detection method and device, electronic equipment and storage medium
CN115861321B (en) Production environment detection method and system applied to industrial Internet

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