CN112492293A - Image fuzzy diagnosis method and device and security central control equipment - Google Patents

Image fuzzy diagnosis method and device and security central control equipment Download PDF

Info

Publication number
CN112492293A
CN112492293A CN201910779177.9A CN201910779177A CN112492293A CN 112492293 A CN112492293 A CN 112492293A CN 201910779177 A CN201910779177 A CN 201910779177A CN 112492293 A CN112492293 A CN 112492293A
Authority
CN
China
Prior art keywords
image
sub
target
images
diagnosis
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.)
Pending
Application number
CN201910779177.9A
Other languages
Chinese (zh)
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 Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo 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 Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201910779177.9A priority Critical patent/CN112492293A/en
Publication of CN112492293A publication Critical patent/CN112492293A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/002Diagnosis, testing or measuring for television systems or their details for television cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The embodiment of the invention discloses an image fuzzy diagnosis method and device and security central control equipment, and relates to the technical field of communication. The security central control equipment acquires an image uploaded by the camera and a shooting type of the camera when the camera shoots the image, divides the image to obtain a plurality of sub-images, determines a variance value of each sub-image in the plurality of sub-images, and performs fuzzy diagnosis on the image according to the variance value and the shooting type of each sub-image. Compared with the method for performing fuzzy diagnosis only according to the variance value of the whole image, the method can perform fuzzy diagnosis on the image according to the variance value and the shooting type of each sub-image, not only can avoid the defect of 'one-time cutting' of the fuzzy diagnosis be avoided, but also the shooting type of the camera can be taken into account, and therefore the accuracy and the reliability of the image fuzzy diagnosis are improved.

Description

Image fuzzy diagnosis method and device and security central control equipment
Technical Field
The invention relates to the technical field of communication, in particular to an image fuzzy diagnosis method and device and security and protection central control equipment.
Background
With the development of science and technology, the application of the technology of the internet of things is more and more extensive. Nowadays, more and more families benefit from the technology of internet of things, wherein the intelligent security technology formed based on the internet of things is favored by most families. In the intelligent security technology, the quality of an image shot by a camera plays a crucial role in security detection, and the image quality can have a great influence on the reliability of the security detection. Therefore, it is necessary to perform diagnosis (image blur diagnosis) on image quality so as to maintain and optimize the camera according to the diagnosis result to ensure the reliability of security detection. However, the existing image blur diagnosis method has poor accuracy and low flexibility.
Disclosure of Invention
In view of the above problems, the present invention has been made to provide an image blur diagnosis method, apparatus, and security central control device that overcome or at least partially solve the above problems.
In a first aspect of the present invention, an image blur diagnosis method is provided, which is applied to a security central control device in communication connection with a camera, and the method includes:
acquiring an image uploaded by the camera and a shooting type when the camera shoots the image;
dividing the image to obtain a plurality of sub-images;
determining a variance value for each of the plurality of sub-images;
and carrying out fuzzy diagnosis on the image according to the variance value of each sub-image and the shooting type.
Optionally, the performing blur diagnosis on the image according to the variance value of each sub-image and the shooting type includes:
if the shooting type is local shooting, acquiring a corresponding preset threshold value based on the local shooting;
obtaining a variance value corresponding to a target sub-image in the plurality of sub-images; the target sub-image is an image corresponding to a focusing area of the camera during local shooting;
and carrying out fuzzy diagnosis on the image according to the variance value corresponding to the target sub-image and the preset threshold value.
Optionally, the performing blur diagnosis on the image according to the variance value corresponding to the target sub-image and the preset threshold includes:
if the number of the target sub-images is one, judging whether the variance value corresponding to the target sub-images is smaller than the preset threshold value or not, and obtaining a judgment result;
when the judgment result represents that the variance value corresponding to the target sub-image is smaller than the preset threshold value, judging that the image is fuzzy;
and when the judgment result represents that the variance value corresponding to the target sub-image is greater than or equal to the preset threshold value, judging that the image is clear.
Optionally, the performing blur diagnosis on the image according to the variance value corresponding to the target sub-image and the preset threshold includes:
if the number of the target sub-images is more than two, determining the number of local target variance values from the variance values of all the target sub-images, wherein the local target variance values are smaller than the preset threshold;
judging whether the number of the local target variance values reaches a preset number or not;
if the number of the local target variance values reaches the preset number, judging that the image is fuzzy; otherwise, the image is judged to be clear.
Optionally, the performing blur diagnosis on the image according to the variance value of each sub-image and the shooting type of the camera includes:
if the shooting type of the camera is global shooting, acquiring a corresponding set threshold value based on the global shooting;
determining the quantity of global target variance values from the variance values of all the sub-images, wherein the global target variance values are smaller than the set threshold;
judging whether the number of the global target variance values reaches a set number or not;
if the number of the global target variance values reaches the set number, judging that the image is fuzzy; otherwise, the image is judged to be clear.
Optionally, the determining the variance value of each sub-image includes:
determining the gray difference between every two adjacent pixels in each sub-image;
and determining the variance value of each sub-image according to all the gray differences corresponding to each sub-image.
Optionally, the dividing the image to obtain a plurality of sub-images includes:
dividing the image to obtain a plurality of image areas;
and carrying out Gaussian filtering on each image area to obtain a sub-image corresponding to each image area.
In a second aspect of the present invention, an image blur diagnosis apparatus is provided, which is applied to a security central control device in communication connection with a camera, and the apparatus includes:
the image acquisition module is used for acquiring the image uploaded by the camera and the shooting type when the camera shoots the image;
the image dividing module is used for dividing the image to obtain a plurality of sub-images;
a variance value determining module for determining a variance value of each of the plurality of sub-images;
and the image fuzzy diagnosis module is used for carrying out fuzzy diagnosis on the image according to the variance value of each sub-image and the shooting type.
Optionally, the image blur diagnosis module is configured to:
if the shooting type is local shooting, acquiring a corresponding preset threshold value based on the local shooting;
obtaining a variance value corresponding to a target sub-image in the plurality of sub-images; the target sub-image is an image corresponding to a focusing area of the camera during local shooting;
and carrying out fuzzy diagnosis on the image according to the variance value corresponding to the target sub-image and the preset threshold value.
Optionally, the image blur diagnosis module is configured to:
if the number of the target sub-images is one, judging whether the variance value corresponding to the target sub-images is smaller than the preset threshold value or not, and obtaining a judgment result;
when the judgment result represents that the variance value corresponding to the target sub-image is smaller than the preset threshold value, judging that the image is fuzzy;
and when the judgment result represents that the variance value corresponding to the target sub-image is greater than or equal to the preset threshold value, judging that the image is clear.
Optionally, the image blur diagnosis module is configured to:
if the number of the target sub-images is more than two, determining the number of local target variance values from the variance values of all the target sub-images, wherein the local target variance values are smaller than the preset threshold;
judging whether the number of the local target variance values reaches a preset number or not;
if the number of the local target variance values reaches the preset number, judging that the image is fuzzy; otherwise, the image is judged to be clear.
Optionally, the image blur diagnosis module is configured to:
if the shooting type of the camera is global shooting, acquiring a corresponding set threshold value based on the global shooting;
determining the quantity of global target variance values from the variance values of all the sub-images, wherein the global target variance values are smaller than the set threshold;
judging whether the number of the global target variance values reaches a set number or not;
if the number of the global target variance values reaches the set number, judging that the image is fuzzy; otherwise, the image is judged to be clear.
Optionally, the variance value determining module is configured to:
determining the gray difference between every two adjacent pixels in each sub-image;
and determining the variance value of each sub-image according to all the gray differences corresponding to each sub-image.
Optionally, the image dividing module is configured to:
dividing the image to obtain a plurality of image areas;
and carrying out Gaussian filtering on each image area to obtain a sub-image corresponding to each image area.
In a third aspect of the present invention, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the image blur diagnosis method described above.
In a fourth aspect of the present invention, a security central control device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the program, the steps of the image blur diagnosis method are implemented.
The technical scheme provided in the embodiment of the application at least has the following technical effects or advantages:
in the scheme, the security central control equipment acquires an image uploaded by the camera and a shooting type of the camera when the camera shoots the image, divides the image to obtain a plurality of sub-images, determines a variance value of each sub-image in the plurality of sub-images, and performs fuzzy diagnosis on the image according to the variance value and the shooting type of each sub-image. Therefore, compared with a method for performing fuzzy diagnosis only according to the variance value of the whole image, the technical method provided by the embodiment of the application can perform fuzzy diagnosis on the image according to the variance value and the shooting type of each sub-image, not only can avoid the defect of 'one-step' of fuzzy diagnosis, but also can take the shooting type of the camera into account, thereby improving the accuracy and reliability of the image fuzzy diagnosis.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a block diagram illustrating a configuration of an image blur diagnosis system according to an embodiment of the present invention.
Fig. 2 is a flowchart illustrating an image blur diagnosis method according to an embodiment of the present invention.
Fig. 3 shows a schematic diagram of a customer's home provided in accordance with one embodiment of the present invention.
Fig. 4 illustrates a schematic diagram of dividing an image according to an embodiment of the present invention.
Fig. 5 is a schematic diagram illustrating an image photographed by a camera in a partial photographing type according to an embodiment of the present invention.
Fig. 6 is a schematic diagram illustrating an image captured by a camera in a global capture type according to an embodiment of the present invention.
Fig. 7 illustrates another schematic diagram of an image captured by a camera in a global capture type according to an embodiment of the present invention.
Fig. 8 shows a block diagram of modules of an image blur diagnosis apparatus provided according to an embodiment of the present invention.
Icon:
100-an image blur diagnostic system; 101-security central control equipment; 102-a camera;
200-an image blur diagnosis device; 201-an image acquisition module; 202-an image partitioning module; 203-variance value determination module; 204-image blur diagnosis module.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The embodiment of the invention provides an image fuzzy diagnosis method, an image fuzzy diagnosis device and security and protection central control equipment, which are used for solving the technical problems of poor accuracy and low flexibility of the existing image fuzzy diagnosis method.
As an alternative embodiment, fig. 1 is a block diagram of an image blur diagnosis system 100 according to an embodiment of the present invention.
As shown in fig. 1, the image blur diagnosis system 100 includes a security central control device 101 and a plurality of cameras 102, please refer to fig. 2 in combination, the plurality of cameras 102 are installed around the user's residence, and each camera 102 is connected to the security central control device 101 in a communication manner. In addition, the security central control device 101 can also be in communication connection with a cloud server, an infrared correlation device, an alarm device and a user terminal.
Further, in the embodiment of the application, the security central control device 101 is taken as a core, and the security central control device is an independent control device and has a great difference from the existing desktop/notebook computer, smart phone, tablet computer, server and the like. The intelligent home control method can provide a set of intelligent home safety solution, can provide an image fuzzy diagnosis method for the outside, realizes fuzzy diagnosis on the image shot by the camera 102, further realizes intelligent protection, and can provide an intelligent home control method for the inside, thereby realizing intelligent home control.
With reference to fig. 2, the security central control device 101 may receive the images uploaded by each camera 102, perform fuzzy diagnosis on the images, and obtain image fuzzy diagnosis results, so as to determine whether the cameras 102 corresponding to the images have faults according to the image fuzzy diagnosis results, and notify maintenance personnel to maintain and optimize the cameras 102 in time when the cameras 102 have faults, thereby ensuring the reliability of security detection.
However, the inventors have analyzed and studied that the common image blur diagnosis method has poor accuracy and low flexibility:
the common image blur diagnosis method is to perform blur diagnosis on the whole image, specifically, the common image blur diagnosis method determines whether the image is blurred according to a variance value by solving the variance value of the whole image, and the diagnosis method does not consider the relationship between each region in the image and does not consider a specific shooting scene of a camera, so that the accuracy is poor and the reliability is low.
Based on the above, the embodiment of the invention provides an image blur diagnosis method and device and security and protection central control equipment, which can improve the accuracy and reliability of image blur diagnosis.
Referring to fig. 2, a flowchart of an image blur diagnosis method according to an embodiment of the present invention is provided, where the method is applied to the security central control device 101 of the image blur diagnosis system in fig. 1, and the following steps of the method are described in detail:
and S21, acquiring the images uploaded by the camera and the shooting types when the camera shoots the images.
In this embodiment of the application, the image acquired by the security central control device 101 may be shot and uploaded by the camera 102 in real time, or may be uploaded with a delay after the shooting by the camera 102, which is not limited herein.
In the embodiment of the present application, the shooting types include local shooting and global shooting, the local shooting is targeted shooting for a certain area in a focused image, and the global shooting is shooting for an entire image.
It will be appreciated that each camera 102 mounted around the user's residence corresponds to a respective capture area, e.g., some cameras 102 are used to capture a yard area (e.g., area a in fig. 3) and some cameras 102 are used to capture a front door area (e.g., area B in fig. 3). The shooting types corresponding to the cameras shooting different areas are different. For example, the type of shooting employed by the camera 102 that shoots the area a is global shooting, and more specifically, the focus area of the camera 102 that shoots the area a is a yard area. For another example, the shooting type employed by the camera 102 of the shooting area B is partial shooting, and more specifically, the focus area of the camera 102 of the shooting area B is the front door area.
It is understood that since the camera 102 of the photographing region B is photographed with respect to the front door region, a region other than the focus region of the camera 102 of the photographing region B is blurred. In this case, if a common image blur diagnosis method is used for diagnosis, the image captured by the camera 102 in the capture area B is determined to be blurred for the following reasons:
since the image captured by the camera 102 of the capturing region B is only clear at the focused region, and since the size of the focused region is much smaller than that of the unfocused region, if the variance value is determined for the entire image and then the blur diagnosis is performed according to the variance value, the image captured by the camera 102 of the capturing region B is determined to be blurred with high probability, but since the image captured by the camera 102 of the capturing region B is directed to the front door region, if the image captured by the camera 102 of the capturing region B is clear at the focused region, the blur diagnosis result of the image should be clear, and thus, if the diagnosis is performed by using a common image blur diagnosis method, the diagnosis accuracy and reliability may be reduced.
Therefore, in order to improve the accuracy and reliability of the image blur diagnosis, it is necessary to analyze a plurality of regions of the image one by one and take the shooting type of the camera 102 into consideration. Since the shooting type of the camera 102 is variable, the shooting type of the camera 102 acquired by the security central control apparatus 101 when acquiring the image uploaded by the camera 102 should be the shooting type when the camera 102 captures the image.
For example, the camera 102 captures an image P at 10:00:05, the capturing type is local capturing, further, after 5 seconds, the camera 102 captures an image G at 10:00:10, and the capturing type is global capturing, then the capturing type that the security central control device 101 correspondingly acquires when acquiring the image P should be local capturing, and the capturing type that the security central control device 101 correspondingly acquires when acquiring the image G should be global capturing. In this way, a diagnosis deviation due to a change in the shooting type of the camera 102 can be avoided.
And S22, dividing the image to obtain a plurality of sub-images.
Specifically, the image is divided according to a preset division rule to obtain a plurality of image areas, and then each image area is subjected to gaussian filtering to obtain a sub-image corresponding to each image area.
In the embodiment of the present application, the preset partition rule may be an equal partition or an unequal partition, for example, referring to fig. 4, an image is equally divided as shown in fig. 4a, and an image is unequally divided as shown in fig. 4b, it can be understood that the preset partition rule may be adjusted according to an actual situation, and is not limited herein.
S23, a variance value is determined for each of the number of sub-images.
In the embodiment of the present application, the variance value of each of the plurality of sub-images is specifically determined by: and determining the gray level difference between every two adjacent pixels in each sub-image, and determining the variance value of each sub-image according to all the gray level differences corresponding to each sub-image.
For example, referring to fig. 4a in combination, the sub-image shown in fig. 4a includes 5 × 7 pixels, and two adjacent pixels may be understood as being adjacent to each other up and down or adjacent to each other left and right, so that the number of the gray scale differences between each two adjacent pixels in the 5 × 7 pixels is 52, and further, the variance value of the sub-image is determined based on the 52 gray scale differences corresponding to the sub-image shown in fig. 4 a.
It will be appreciated that the variance values for other sub-images of the several sub-images are also determined according to the above method.
Compared with a common method only determining the variance value of the whole image, the method and the device for determining the variance value of the whole image have the advantages that the number of the determined variance values is large, the disturbance resistance of subsequent image fuzzy diagnosis can be improved, and low accuracy and low reliability brought by a 'one-time cut' image fuzzy diagnosis mode are avoided.
And S4, performing fuzzy diagnosis on the image according to the variance value and the shooting type of each sub-image.
In the embodiment of the present application, the method for performing fuzzy diagnosis on an image may specifically include the following two cases:
in the first case, the shooting type when the camera 102 shoots an image is partial shooting.
In this case, the security central control device 101 obtains a corresponding preset threshold value based on the shooting type of the local shooting, where the preset threshold value is used to determine the variance value of the sub-image. In the embodiment of the present application, the preset threshold may be 0.7.
Further, the security central control device 101 obtains a variance value corresponding to a target sub-image in the plurality of sub-images; the target sub-image is an image corresponding to a focus area of the camera 102 during local shooting.
Referring to fig. 5, the image is divided according to a division rule of 4 × 4, and the number of the obtained sub-images is 16 (z 1-z 16), and it can be understood that the focal region of the camera 102 during local shooting may be z6, z7, z10, and z 11. More specifically, the target sub-images may be understood as z6, z7, z10, and z 11.
Further, the image is subjected to fuzzy diagnosis according to the variance value corresponding to the target sub-image and a preset threshold value. In a specific implementation process, a corresponding blur diagnosis mode may be selected according to the number of target sub-images, and the selection of the corresponding blur diagnosis mode according to the number of target sub-images provided in the embodiment of the present application includes the following two cases:
case1, the number of target sub-images is one.
It can be understood that, if the number of the target sub-images is one, whether the variance value corresponding to the target sub-image is smaller than a preset threshold value is judged, and a judgment result is obtained.
And when the judgment result represents that the variance value corresponding to the target sub-image is smaller than the preset threshold, judging that the image is fuzzy, and when the judgment result represents that the variance value corresponding to the target sub-image is larger than or equal to the preset threshold, judging that the image is clear.
Case 2: the number of target sub-images is two or more.
It can be understood that, if the number of the target sub-images is more than two, the number of the local target variance values is determined from the variance values of all the target sub-images, wherein the local target variance values are smaller than the preset threshold. And judging whether the number of the local target variance values reaches a preset number, if so, judging that the image is fuzzy, otherwise, judging that the image is clear.
Referring to fig. 5, if there are 4 target sub-images, the corresponding variance values are also 4. Further, the number of local target variance values is determined from the 4 variance values, wherein the local target variance values are smaller than a preset threshold value of 0.7.
In the embodiment of the present application, the preset number may be set according to the number of the target sub-images, for example, the preset number may be half of the number of the target sub-images, and when the number of the target sub-images is an odd number, the preset number may be rounded, for example, if the number of the target sub-images is 10, the preset number may be 5, and if the number of the target sub-images is 7, the preset number may be 4. Taking fig. 5 as an example, in the embodiment of the present application, since the number of target sub-images is 4, the preset number may be 2.
Further, whether the number of the local target variance values reaches a preset number 2 or not is judged, if yes, the image is judged to be fuzzy, and if not, the image is judged to be clear. For example, if the 4 variance values are: 0.65, 0.71, 0.84 and 0.9, the number of the local target variance values is 1, the number of the local target variance values does not reach the preset number 2, and the image is judged to be clear. For another example, if the 4 variance values are: 0.65, 0.31, 0.24, and 0.8, the number of local target variance values is 3, the number of local target variance values reaches the preset number 2, and the image is determined to be blurred.
It can be understood that when the image blur diagnosis is performed in the local photographing type, sub-images other than the target sub-image do not need to be considered, so that the accuracy and reliability of the image blur diagnosis are improved. If a common image blur diagnosis method is used for the determination, a picture taken in the local photographing type is determined to be blurred, which is contrary to the actual situation. Further, if a common image blur diagnosis method is used for the determination, it may be determined that the camera 102 has a fault (actually, the camera 102 is shot in the local shooting mode, and does not have a fault), and thus, unnecessary maintenance cost may be increased.
In the second case, the shooting type when the camera 102 shoots an image is global shooting.
In this case, the security center control device 101 acquires a corresponding set threshold value based on the shooting type of the global shooting, wherein the set threshold value is used for determining the variance value of the sub-image.
In the embodiment of the present application, the set threshold is smaller than the preset threshold, because the resolution criteria of the picture taken by the camera 102 in the case of global shooting and the picture taken by the camera 102 in the case of local shooting are different. With reference to fig. 2, the picture taken by the camera 102 in the case of global shooting is taken for the entire picture, and the picture taken by the camera 102 in the case of global shooting is taken for the courtyard area, and the picture taken in the case of local shooting is taken for the front door area, and in order to ensure the definition of the image of the courtyard area, the overall definition of the picture taken by the camera 102 in the case of global shooting is lower than that of the picture taken by the camera 102 in the case of local shooting (the picture in the focus area). Therefore, in the embodiment of the present application, the set threshold is smaller than the preset threshold, for example, the set threshold may be 0.5.
Further, the number of the global target variance values is determined from the variance values of all the sub-images, wherein the global target variance values are smaller than a set threshold value, whether the number of the global target variance values reaches the set number or not is judged, if the number of the global target variance values reaches the set number, the image is judged to be fuzzy, and if not, the image is judged to be clear.
In the embodiment of the present application, the set number may be set according to the number of sub-images, for example, the set number may be half of the number of sub-images, and when the number of sub-images is an odd number, the set number may be rounded, for example, if the number of sub-images is 10, the set number may be 5, and if the number of sub-images is 5, the preset number may be 3. Referring to fig. 6, fig. 6 shows another schematic diagram of the image captured by the camera 102 in the global capture mode, and as can be seen from fig. 6, the number of the sub-images is 25, and therefore the set number may be 13. Further, whether the number of the global target variance values reaches a preset number 13 is judged, if yes, the image is judged to be fuzzy, and if not, the image is judged to be clear.
It can be understood that, in the embodiment of the present application, when performing image blur diagnosis, the variance value of the whole image is not directly calculated, but the image is divided into a plurality of sub-images, and then the variance value of each sub-image is calculated, so that image blur diagnosis is performed according to the variance value of each sub-image. When the image fuzzy diagnosis is carried out, the shooting type of the camera 102 during the image shooting is also taken into consideration, so that the fuzzy judgment of 'one-time cutting' on the image is avoided, and the accuracy, the reliability and the disturbance resistance of the image fuzzy diagnosis are improved.
For example, referring to fig. 7 in combination, for an image captured by the camera 102 in a global capture type at a certain time, the image may be divided into 9 sub-images (the corresponding set number is 5), wherein moving objects (such as passerby, pet, or leaves blown by wind) exist in the sub-images p1, p3, p7, and p8, and therefore, in this case, the sub-images p1, p3, p7, and p8 appear blurred. For example, the variance values of the sub-images p1 to p9 are determined to be 0.1, 0.6, 0.1, 0.51, 0.8, 0.9, 0.1, and 0.6, the threshold value is set to 0.5, and if the determination is made by a common blur diagnosis method, the variance value of the entire image is calculated to be equal to or less than the sum (3.8) of the variance values of the sub-images p1 to p9, and therefore the image is determined to be blurred, and if the image blur diagnosis method according to the embodiment of the present application is used, the number of variance values smaller than 0.5 is determined to be 4(0.1, and 0.1), and the number of variance values smaller than 0.5 is less than the set number 5, and therefore the image is determined to be sharp. According to the example, it can be analyzed that if a (high-speed) moving object exists in an image, a partial region in the image can present a relatively serious blur, if a method of directly determining a variance value of the whole image and then judging is adopted, the image can be diagnosed as a blur at a high probability, but actually, the blur region in the image is caused by the motion of the object (other regions in the image are clear), so that the accuracy, reliability and disturbance resistance of a common image blur diagnosis method are poor, and the image blur diagnosis method can divide the image into sub-images and then carry out blur diagnosis on each sub-image, so that the problems are effectively avoided, and the accuracy, reliability and disturbance resistance of the image blur diagnosis are improved.
Furthermore, the preset number can be set according to the number of the target sub-images, and the set number can be set according to the number of the sub-images, so that the flexibility of the image blur diagnosis is improved.
As an alternative embodiment, fig. 8 shows a block diagram of an image blur diagnosis apparatus 20 according to an embodiment of the present invention, where the image blur diagnosis apparatus 20 includes:
an image obtaining module 201, configured to obtain an image uploaded by the camera and a shooting type of the image shot by the camera.
An image dividing module 202, configured to divide the image to obtain a plurality of sub-images.
A variance value determining module 203, configured to determine a variance value of each of the plurality of sub-images.
And the image blur diagnosis module 204 is configured to perform blur diagnosis on the image according to the variance value of each sub-image and the shooting type.
Further, the image blur diagnosis module 204 is configured to: if the shooting type is local shooting, acquiring a corresponding preset threshold value based on the local shooting; obtaining a variance value corresponding to a target sub-image in the plurality of sub-images; the target sub-image is an image corresponding to a focusing area of the camera during local shooting; and carrying out fuzzy diagnosis on the image according to the variance value corresponding to the target sub-image and the preset threshold value.
Further, the image blur diagnosis module 204 is configured to: if the number of the target sub-images is one, judging whether the variance value corresponding to the target sub-images is smaller than the preset threshold value or not, and obtaining a judgment result; when the judgment result represents that the variance value corresponding to the target sub-image is smaller than the preset threshold value, judging that the image is fuzzy; and when the judgment result represents that the variance value corresponding to the target sub-image is greater than or equal to the preset threshold value, judging that the image is clear.
Further, the image blur diagnosis module 204 is configured to: if the number of the target sub-images is more than two, determining the number of local target variance values from the variance values of all the target sub-images, wherein the local target variance values are smaller than the preset threshold; judging whether the number of the local target variance values reaches a preset number or not; if the number of the local target variance values reaches the preset number, judging that the image is fuzzy; otherwise, the image is judged to be clear.
Further, the image blur diagnosis module 204 is configured to: if the shooting type of the camera is global shooting, acquiring a corresponding set threshold value based on the global shooting; determining the quantity of global target variance values from the variance values of all the sub-images, wherein the global target variance values are smaller than the set threshold; judging whether the number of the global target variance values reaches a set number or not; if the number of the global target variance values reaches the set number, judging that the image is fuzzy; otherwise, the image is judged to be clear.
Further, the variance value determining module 203 is configured to: determining the gray difference between every two adjacent pixels in each sub-image; and determining the variance value of each sub-image according to all the gray differences corresponding to each sub-image.
Further, the image dividing module 202 is configured to: dividing the image to obtain a plurality of image areas; and carrying out Gaussian filtering on each image area to obtain a sub-image corresponding to each image area.
Based on the same inventive concept as in the previous embodiments, embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of any of the methods described above.
Based on the same inventive concept as that in the foregoing embodiment, an embodiment of the present invention further provides a security central control device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of any one of the foregoing methods when executing the program.
The technical scheme provided in the embodiment of the application at least has the following technical effects or advantages:
according to the image fuzzy diagnosis method and device and the security central control device, the security central control device obtains the image uploaded by the camera and the shooting type of the camera when the camera shoots the image, divides the image to obtain a plurality of sub-images, determines the variance value of each sub-image in the plurality of sub-images, and conducts fuzzy diagnosis on the image according to the variance value and the shooting type of each sub-image. Therefore, compared with a method for performing fuzzy diagnosis only according to the variance value of the whole image, the technical method provided by the embodiment of the application can perform fuzzy diagnosis on the image according to the variance value and the shooting type of each sub-image, not only can avoid the defect of 'one-step' of fuzzy diagnosis, but also can take the shooting type of the camera into account, thereby improving the accuracy and reliability of the image fuzzy diagnosis.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components of a gateway, proxy server, system according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The invention discloses:
a1, an image fuzzy diagnosis method, which is applied to security central control equipment in communication connection with a camera, the method comprises:
acquiring an image uploaded by the camera and a shooting type when the camera shoots the image;
dividing the image to obtain a plurality of sub-images;
determining a variance value for each of the plurality of sub-images;
and carrying out fuzzy diagnosis on the image according to the variance value of each sub-image and the shooting type.
A2, the method according to claim a1, wherein the blur diagnosis for the image based on the variance value of each sub-image and the shooting type comprises:
if the shooting type is local shooting, acquiring a corresponding preset threshold value based on the local shooting;
obtaining a variance value corresponding to a target sub-image in the plurality of sub-images; the target sub-image is an image corresponding to a focusing area of the camera during local shooting;
and carrying out fuzzy diagnosis on the image according to the variance value corresponding to the target sub-image and the preset threshold value.
The method of claim a2, as A3, wherein the performing blur diagnosis on the image according to the variance value corresponding to the target sub-image and the preset threshold value includes:
if the number of the target sub-images is one, judging whether the variance value corresponding to the target sub-images is smaller than the preset threshold value or not, and obtaining a judgment result;
when the judgment result represents that the variance value corresponding to the target sub-image is smaller than the preset threshold value, judging that the image is fuzzy;
and when the judgment result represents that the variance value corresponding to the target sub-image is greater than or equal to the preset threshold value, judging that the image is clear.
The method of claim a2, as a4, wherein the performing blur diagnosis on the image according to the variance value corresponding to the target sub-image and the preset threshold value includes:
if the number of the target sub-images is more than two, determining the number of local target variance values from the variance values of all the target sub-images, wherein the local target variance values are smaller than the preset threshold;
judging whether the number of the local target variance values reaches a preset number or not;
if the number of the local target variance values reaches the preset number, judging that the image is fuzzy; otherwise, the image is judged to be clear.
A5, the method according to claim A1, wherein the blur diagnosis for the image according to the variance value of each sub-image and the shooting type of the camera comprises:
if the shooting type of the camera is global shooting, acquiring a corresponding set threshold value based on the global shooting;
determining the quantity of global target variance values from the variance values of all the sub-images, wherein the global target variance values are smaller than the set threshold;
judging whether the number of the global target variance values reaches a set number or not;
if the number of the global target variance values reaches the set number, judging that the image is fuzzy; otherwise, the image is judged to be clear.
A6 the method of claim a1, wherein said determining the variance value of each sub-image comprises:
determining the gray difference between every two adjacent pixels in each sub-image;
and determining the variance value of each sub-image according to all the gray differences corresponding to each sub-image.
A7, the method of claim a1, wherein said dividing the image into a plurality of sub-images, comprises:
dividing the image to obtain a plurality of image areas;
and carrying out Gaussian filtering on each image area to obtain a sub-image corresponding to each image area.
B8, the image fuzzy diagnosis device is characterized in that the device is applied to security central control equipment in communication connection with a camera, and the device comprises:
the image acquisition module is used for acquiring the image uploaded by the camera and the shooting type when the camera shoots the image;
the image dividing module is used for dividing the image to obtain a plurality of sub-images;
a variance value determining module for determining a variance value of each of the plurality of sub-images;
and the image fuzzy diagnosis module is used for carrying out fuzzy diagnosis on the image according to the variance value of each sub-image and the shooting type.
B9, the apparatus of claim B8, wherein the image blur diagnosis module is configured to:
if the shooting type is local shooting, acquiring a corresponding preset threshold value based on the local shooting;
obtaining a variance value corresponding to a target sub-image in the plurality of sub-images; the target sub-image is an image corresponding to a focusing area of the camera during local shooting;
and carrying out fuzzy diagnosis on the image according to the variance value corresponding to the target sub-image and the preset threshold value.
B10, the apparatus of claim B9, wherein the image blur diagnosis module is configured to:
if the number of the target sub-images is one, judging whether the variance value corresponding to the target sub-images is smaller than the preset threshold value or not, and obtaining a judgment result;
when the judgment result represents that the variance value corresponding to the target sub-image is smaller than the preset threshold value, judging that the image is fuzzy;
and when the judgment result represents that the variance value corresponding to the target sub-image is greater than or equal to the preset threshold value, judging that the image is clear.
B11, the apparatus of claim B9, wherein the image blur diagnosis module is configured to:
if the number of the target sub-images is more than two, determining the number of local target variance values from the variance values of all the target sub-images, wherein the local target variance values are smaller than the preset threshold;
judging whether the number of the local target variance values reaches a preset number or not;
if the number of the local target variance values reaches the preset number, judging that the image is fuzzy; otherwise, the image is judged to be clear.
B12, the apparatus of claim B8, wherein the image blur diagnosis module is configured to:
if the shooting type of the camera is global shooting, acquiring a corresponding set threshold value based on the global shooting;
determining the quantity of global target variance values from the variance values of all the sub-images, wherein the global target variance values are smaller than the set threshold;
judging whether the number of the global target variance values reaches a set number or not;
if the number of the global target variance values reaches the set number, judging that the image is fuzzy; otherwise, the image is judged to be clear.
B13, the apparatus of claim B8, wherein the variance value determining module is configured to:
determining the gray difference between every two adjacent pixels in each sub-image;
and determining the variance value of each sub-image according to all the gray differences corresponding to each sub-image.
The apparatus of claim B8, the image partitioning module to:
dividing the image to obtain a plurality of image areas;
and carrying out Gaussian filtering on each image area to obtain a sub-image corresponding to each image area.
C15, a computer-readable storage medium, characterized in that a computer program is stored thereon, which program, when being executed by a processor, carries out the steps of the image blur diagnosis method according to any of the claims a1-a 7.
D16, a security central control device, comprising a memory, a processor and a computer program stored on the memory and operable on the processor, the processor implementing the steps of the image blur diagnosis method according to any one of claims a1-a7 when executing the program.

Claims (10)

1. An image fuzzy diagnosis method is applied to security central control equipment which is in communication connection with a camera, and comprises the following steps:
acquiring an image uploaded by the camera and a shooting type when the camera shoots the image;
dividing the image to obtain a plurality of sub-images;
determining a variance value for each of the plurality of sub-images;
and carrying out fuzzy diagnosis on the image according to the variance value of each sub-image and the shooting type.
2. The method according to claim 1, wherein the performing blur diagnosis on the image based on the variance value of each sub-image and the photographing type includes:
if the shooting type is local shooting, acquiring a corresponding preset threshold value based on the local shooting;
obtaining a variance value corresponding to a target sub-image in the plurality of sub-images; the target sub-image is an image corresponding to a focusing area of the camera during local shooting;
and carrying out fuzzy diagnosis on the image according to the variance value corresponding to the target sub-image and the preset threshold value.
3. The method according to claim 2, wherein the performing blur diagnosis on the image according to the variance value corresponding to the target sub-image and the preset threshold value comprises:
if the number of the target sub-images is one, judging whether the variance value corresponding to the target sub-images is smaller than the preset threshold value or not, and obtaining a judgment result;
when the judgment result represents that the variance value corresponding to the target sub-image is smaller than the preset threshold value, judging that the image is fuzzy;
and when the judgment result represents that the variance value corresponding to the target sub-image is greater than or equal to the preset threshold value, judging that the image is clear.
4. The method according to claim 2, wherein the performing blur diagnosis on the image according to the variance value corresponding to the target sub-image and the preset threshold value comprises:
if the number of the target sub-images is more than two, determining the number of local target variance values from the variance values of all the target sub-images, wherein the local target variance values are smaller than the preset threshold;
judging whether the number of the local target variance values reaches a preset number or not;
if the number of the local target variance values reaches the preset number, judging that the image is fuzzy; otherwise, the image is judged to be clear.
5. The method according to claim 1, wherein the performing blur diagnosis on the image according to the variance value of each sub-image and the shooting type of the camera comprises:
if the shooting type of the camera is global shooting, acquiring a corresponding set threshold value based on the global shooting;
determining the quantity of global target variance values from the variance values of all the sub-images, wherein the global target variance values are smaller than the set threshold;
judging whether the number of the global target variance values reaches a set number or not;
if the number of the global target variance values reaches the set number, judging that the image is fuzzy; otherwise, the image is judged to be clear.
6. The method of claim 1, wherein determining the variance value for each sub-image comprises:
determining the gray difference between every two adjacent pixels in each sub-image;
and determining the variance value of each sub-image according to all the gray differences corresponding to each sub-image.
7. The method of claim 1, wherein said dividing the image into a plurality of sub-images comprises:
dividing the image to obtain a plurality of image areas;
and carrying out Gaussian filtering on each image area to obtain a sub-image corresponding to each image area.
8. An image blurring diagnosis device is applied to security and protection central control equipment in communication connection with a camera, and comprises:
the image acquisition module is used for acquiring the image uploaded by the camera and the shooting type when the camera shoots the image;
the image dividing module is used for dividing the image to obtain a plurality of sub-images;
a variance value determining module for determining a variance value of each of the plurality of sub-images;
and the image fuzzy diagnosis module is used for carrying out fuzzy diagnosis on the image according to the variance value of each sub-image and the shooting type.
9. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the image blur diagnosis method according to any one of claims 1 to 7.
10. A security central control device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the image blur diagnosis method according to any one of claims 1 to 7 when executing the program.
CN201910779177.9A 2019-08-22 2019-08-22 Image fuzzy diagnosis method and device and security central control equipment Pending CN112492293A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910779177.9A CN112492293A (en) 2019-08-22 2019-08-22 Image fuzzy diagnosis method and device and security central control equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910779177.9A CN112492293A (en) 2019-08-22 2019-08-22 Image fuzzy diagnosis method and device and security central control equipment

Publications (1)

Publication Number Publication Date
CN112492293A true CN112492293A (en) 2021-03-12

Family

ID=74919799

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910779177.9A Pending CN112492293A (en) 2019-08-22 2019-08-22 Image fuzzy diagnosis method and device and security central control equipment

Country Status (1)

Country Link
CN (1) CN112492293A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113111888A (en) * 2021-04-15 2021-07-13 广州图匠数据科技有限公司 Picture distinguishing method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113111888A (en) * 2021-04-15 2021-07-13 广州图匠数据科技有限公司 Picture distinguishing method and device
CN113111888B (en) * 2021-04-15 2024-04-26 广州图匠数据科技有限公司 Picture discrimination method and device

Similar Documents

Publication Publication Date Title
CN108541374B (en) Image fusion method and device and terminal equipment
CN109005334B (en) Imaging method, device, terminal and storage medium
CN109727275B (en) Object detection method, device, system and computer readable storage medium
CN108876813B (en) Image processing method, device and equipment for detecting object in video
CN106027931A (en) Video recording method and server
CN110059666B (en) Attention detection method and device
JP2018170003A (en) Detection device and method for event in video, and image processor
CN108133718B (en) Method and device for processing video
CN113255685B (en) Image processing method and device, computer equipment and storage medium
CN112511859B (en) Video processing method, device and storage medium
CN110991385A (en) Method and device for identifying ship driving track and electronic equipment
US20100302394A1 (en) Blinked eye artifact removal for a digital imaging device
CN111105351B (en) Video sequence image splicing method and device
CN112492293A (en) Image fuzzy diagnosis method and device and security central control equipment
CN111192286A (en) Image synthesis method, electronic device and storage medium
CN110223219B (en) 3D image generation method and device
US10404931B2 (en) Method for detecting defective pixels
JP2018160722A (en) Video abnormal stop detection device, video recording device, and video abnormal stop detection method
CN111292331A (en) Image processing method and device
CN113743342B (en) Method, system, terminal and storage medium for detecting assembly flow
CN112329729B (en) Small target ship detection method and device and electronic equipment
CN115829890A (en) Image fusion method, device, equipment, storage medium and product
CN110545373B (en) Spatial environment sensing method and device
CN112150385A (en) Infrared image filtering method and device
CN112037262A (en) Target tracking method and device and electronic equipment

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