CN116189038A - Picture abnormality judging method, device, equipment and storage medium - Google Patents

Picture abnormality judging method, device, equipment and storage medium Download PDF

Info

Publication number
CN116189038A
CN116189038A CN202211666129.7A CN202211666129A CN116189038A CN 116189038 A CN116189038 A CN 116189038A CN 202211666129 A CN202211666129 A CN 202211666129A CN 116189038 A CN116189038 A CN 116189038A
Authority
CN
China
Prior art keywords
image
preset
target image
comparison result
value
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
CN202211666129.7A
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.)
Shenzhen Corerain Technologies Co Ltd
Original Assignee
Shenzhen Corerain Technologies 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 Shenzhen Corerain Technologies Co Ltd filed Critical Shenzhen Corerain Technologies Co Ltd
Priority to CN202211666129.7A priority Critical patent/CN116189038A/en
Publication of CN116189038A publication Critical patent/CN116189038A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/41Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06MCOUNTING MECHANISMS; COUNTING OF OBJECTS NOT OTHERWISE PROVIDED FOR
    • G06M11/00Counting of objects distributed at random, e.g. on a surface
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Image Analysis (AREA)
  • Closed-Circuit Television Systems (AREA)

Abstract

The invention relates to a picture abnormality judging method, which relates to the field of image recognition, and comprises the following steps: acquiring a frame image of a preset video object as a first target image; comparing a preset template image with a first target image to obtain a first comparison result; acquiring a next frame image of a first target image in a preset video object as a second target image, and comparing a preset template image with the second target image to obtain a second comparison result; obtaining difference information of a first comparison result and a second comparison result; judging whether the first target image is an abnormal image or not according to the difference information; if the first target image is an abnormal image, increasing a preset count value of a preset counting unit by a preset first value; judging whether the count value is larger than a count value threshold value or not; if the count value is greater than the count value threshold, judging that the video object has picture abnormality. The occurrence frequency of abnormal pictures of the video object which is misjudged by normal movement of the object is effectively reduced.

Description

Picture abnormality judging method, device, equipment and storage medium
Technical Field
The present invention relates to the field of image recognition, and in particular, to a method, apparatus, device, and storage medium for determining an abnormality of a picture.
Background
With the rapid development of deep learning, computer vision has become the most important technology in the field of artificial intelligence, wherein video streaming of a reading camera is the main technology.
When the imaging unit of the camera is damaged or is in the weather of heavy rain, heavy fog (outdoors) and the like, the internal algorithm operates normally, but the acquired picture is abnormal, so that the internal algorithm is frequently identified by mistake. The abnormality of the identification picture, frequent false identification seriously affects the daily screening maintenance work of the staff.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for judging picture abnormality, which are used for solving the problem that picture abnormality cannot be accurately identified.
In a first aspect, the present invention provides a method for determining an abnormality of a picture, the method including:
acquiring a frame image of a preset video object as a first target image;
comparing a preset template image with the first target image to obtain a first comparison result;
acquiring a next frame image of the first target image in the preset video object as a second target image, and comparing the preset template image with the second target image to obtain a second comparison result;
obtaining difference information of the first comparison result and the second comparison result;
judging whether the first target image is an abnormal image or not according to the difference information;
if the first target image is an abnormal image, increasing a preset count value of a preset counting unit by a preset first numerical value;
judging whether the count value of a preset counting unit is larger than a preset count value threshold value or not;
and if the count value of the preset counting unit is larger than the preset count value threshold, judging that the video object has picture abnormality.
In a second aspect, the present invention provides a screen abnormality determination apparatus, including a unit for executing the screen abnormality determination method according to any one of the embodiments of the first aspect.
In a third aspect, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and a processor, configured to implement the steps of the method for determining a frame abnormality according to any one of the embodiments of the first aspect when executing the program stored in the memory.
In a fourth aspect, a computer readable storage medium is provided, on which a computer program is stored, which when being executed by a processor implements the steps of the method for determining a picture abnormality according to any one of the embodiments of the first aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the invention has the following advantages:
according to the method provided by the embodiment of the invention, based on the preset template diagram, the first comparison result and the second comparison result of the two adjacent frames of images and the template diagram are obtained respectively, the first comparison result and the second comparison result are further compared, and the difference information of the first comparison result and the second comparison result is obtained; the method can calculate and judge whether the first target image has an abnormally moving object according to an algorithm preset by the difference information result, if the first target image has the abnormally moving object, the first target image is judged to be the abnormal image, the frequency of the occurrence of the first target image which is the abnormal image is judged through the count value of the counting unit, and the occurrence frequency of the abnormal image of the video object is judged only when the count value is larger than the preset count value threshold value, so that the occurrence frequency of the abnormal image of the video object is effectively reduced due to the fact that the object normally moves.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a flow chart of a method for determining abnormal images according to an embodiment of the present invention;
FIG. 2 is a schematic sub-flowchart of a method for determining abnormal images according to an embodiment of the present invention;
FIG. 3 is a schematic sub-flowchart of a method for determining abnormal images according to an embodiment of the present invention;
FIG. 4 is a schematic sub-flowchart of a method for determining abnormal images according to an embodiment of the present invention;
FIG. 5 is a schematic sub-flowchart of a method for determining abnormal images according to an embodiment of the present invention;
FIG. 6 is a schematic sub-flowchart of a method for determining abnormal images according to an embodiment of the present invention;
FIG. 7 is a schematic sub-flowchart of a method for determining abnormal images according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a device for determining abnormal images according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Examples
Fig. 1 is a flowchart of a method for determining an abnormal frame according to an embodiment of the present invention. The embodiment of the invention provides a picture abnormality determination method, specifically referring to fig. 1, the picture abnormality determination method includes the following steps S101-S108.
S101, acquiring a frame image of a preset video object as a first target image.
In a specific implementation, the video object refers to a video stream or a video file collected by the collection device. And cutting out a frame image from the video object, and taking the cut-out frame image as a first target image.
S102, comparing a preset template image with the first target image to obtain a first comparison result.
In specific implementation, the first comparison result includes difference data of the template image and the first target image, and the difference data can be obtained through a comparison algorithm, a comparison detection algorithm, an exclusive or algorithm and other algorithms.
In an embodiment, referring to fig. 2, fig. 2 is a schematic sub-flowchart of a method for determining an abnormal frame according to an embodiment of the present invention. The above step S102 includes steps S201 to S202:
s201, comparing the preset template image with the first target image based on a preset twin network, and generating a first binary image as the first comparison result.
In specific implementation, the twin network refers to a "conjoined neural network", the "conjoined" of the neural network is realized by sharing weights by two neural networks, and by performing custom characteristic training on a preset conjoined neural network, training on the conjoined neural network after training has the functions of two inputs and one output, namely, a template image and a first target image can be input at the same time, the input template image and the first target image are compared, binarization processing is performed on regions which are identical/different with the first target image according to the input template image, and the image after binarization processing is the first binary image. For example, the input template image and the first target image are compared through the twin network, the same area of the input template image and the first target image is marked as a value 0, the different area of the input template image and the first target image is marked as a value 255, a first binary image only comprising the value 0 and the value 255 is finally obtained, and the first binary image is used as the first comparison result.
The first binary image obtained by comparing the template image with the first target image is obtained through the twin network, so that the difference data of the template image and the first target image are obtained more accurately, and the twin network has convolution operation, so that scenes with different resolutions of the template image and the first target image can be effectively obtained, and the accuracy of obtaining the difference data of the template image and the first target image is further improved.
S202, comparing the preset template image with the second target image based on the preset twin network, and generating a second binary image as the second comparison result.
In specific implementation, the twin network refers to a 'conjoined neural network', the 'conjoined' of the neural network is realized by sharing weights by two neural networks, and the training of the neural network of the conjoined after training has the functions of two inputs and one output by carrying out self-defining characteristic training on the neural network of the conjoined after training, namely, a template image and a first target image can be input simultaneously, the input template image and a second target image are compared, binarization processing is respectively carried out on the same/different areas of the input template image and the second target image according to the input template image, and the image after the binarization processing is a second binary image. For example, the input template image and the second target image are compared through the twin network, the same region of the input template image and the second target image is marked as a value 0, the different region of the input template image and the second target image is marked as a value 255, a second binary image only comprising the value 0 and the value 255 is finally obtained, and the second binary image is used as the second comparison result.
The second binary image obtained after the template image is compared with the second target image is obtained through the twin network, so that difference data of the template image and the second target image are obtained more accurately, and the twin network has convolution operation, so that scenes with different resolutions of the template image and the second target image can be effectively obtained, and the accuracy of obtaining the difference data of the template image and the second target image is further improved.
And S103, acquiring a frame image which is the next frame image of the first target image in the preset video object as a second target image, and comparing the preset template image with the second target image to obtain a second comparison result.
In specific implementation, the second comparison result includes difference data of the template image and the second target image, and the difference data can be obtained through algorithms such as a comparison algorithm, a comparison detection algorithm, an exclusive or algorithm and the like.
S104, obtaining difference information of the first comparison result and the second comparison result.
In a specific implementation, the difference information includes difference data of a first comparison result and a second comparison result, and in an embodiment, when normal movement of a person, a car, an animal, etc. occurs, two adjacent frames of images are compared with the template image respectively (i.e. the first comparison result and the second comparison result), and pixel coordinate positions of the difference data of the first comparison result and the difference data of the second comparison result are approximately the same. Therefore, when normal movement of people, vehicles, animals and the like occurs, the same data in the difference information of the first comparison result and the second comparison result has a large proportion, and the difference data in the difference information has a small proportion; when abnormal fluctuation of the picture, irregular changes such as rain, snow and fog occur, the same data in the difference information of the first comparison result and the second comparison result has small proportion, and the difference data in the difference information has large proportion.
Further, difference information of the first comparison result and the second comparison result is calculated, the same data and the duty ratio of the difference data in the difference information of the first comparison result and the second comparison result can be obtained, whether a picture frame is an abnormal image or not can be further judged, a frame image for efficiently and accurately filtering normal object movement is obtained, and frame images with abnormal picture fluctuation and large variation are identified.
In an embodiment, referring to fig. 3, fig. 3 is a schematic sub-flowchart of a method for determining an abnormal frame according to an embodiment of the present invention. The above step S104 includes steps S301 to S304:
s301, judging whether the pixel values of the first binary image and the second binary image under the same pixel coordinate are the same.
In particular, according to the pixel coordinates of the first binary image and the second binary image being identical, comparing whether the pixel value (i.e. the value 0 or the value 255) of the first binary image and the pixel value (i.e. the value 0 or the value 255) of the second binary image in the pixel coordinates are identical.
S302, if the pixel values of the first binary image and the second binary image under the same pixel coordinate are the same, recording the value corresponding to the pixel coordinate as the preset second numerical value.
In a specific implementation, when the pixel value of the first binary image under the pixel coordinate is the same as the pixel value of the second binary image, the value corresponding to the pixel coordinate is recorded as the second numerical value. The second value may specifically be any natural number of 0, 1, 2, 3, etc.
In an embodiment, under the same pixel coordinate, when the pixel value of the first binary image and the pixel value of the second binary image are both the values 0, or when the pixel value of the first binary image and the pixel value of the second binary image are both the values 255, the value corresponding to the pixel coordinate is recorded as the preset second value.
S303, if the pixel values of the first binary image and the second binary image under the same pixel coordinate are different, recording the value corresponding to the pixel coordinate as the preset third numerical value.
In a specific implementation, when the pixel value of the first binary image and the pixel value of the second binary image under the pixel coordinate are different, the value corresponding to the pixel coordinate is recorded as a third numerical value. The third value may be specifically any natural number of 0, 1, 2, 3, etc., and may not be the same as the second value.
In an embodiment, under the same pixel coordinates, when the pixel value of the first binary image is a value of 0 and the pixel value of the second binary image is a value of 255; or when the pixel value of the first binary image is 255 and the pixel value of the second binary image is 0, recording the value corresponding to the pixel coordinate as the preset third value.
And S304, generating a third binary image based on the values corresponding to all the pixel coordinates as the difference information.
In a specific implementation, the third binary image is generated by using the values (i.e., the second value and the third value) corresponding to all the pixel coordinates, and the third binary image is used as the difference information.
A binary image refers to the fact that there are only two possible values (i.e., a second value or a third value) for each pixel on the image, thereby enabling the magnification of the difference feature.
And obtaining a third binary image obtained by comparing the first binary image with the second binary image, so as to more accurately obtain the moving working condition of the object between two frames of images, and further judge whether the object moves normally or abnormally.
S105, judging whether the first target image is an abnormal image or not according to the difference information.
In a specific implementation, the difference information includes difference data and identical data of the first comparison result and the second comparison result, and based on the difference data and identical data of the first comparison result and the second comparison result, a threshold value preset by a worker is combined to determine whether the first target image is an abnormal image.
In an embodiment, referring to fig. 4, fig. 4 is a schematic sub-flowchart of a method for determining an abnormal frame according to an embodiment of the present invention. The above step S105 includes steps S401 to S402:
s401, acquiring the outline contained in the third binary image.
In a specific implementation, according to the junction between the second value and the third value contained in the third binary image, the contour contained in the third binary image can be obtained.
S402, judging whether the first target image is an abnormal image according to the outline.
In an implementation, the contour data may be further extracted and calculated to determine whether the first target image is an abnormal image.
In an embodiment, referring to fig. 5, fig. 5 is a schematic sub-flowchart of a method for determining an abnormal frame according to an embodiment of the present invention. The above step S402 includes steps S411 to S412:
s411, acquiring the number of the contours, and judging whether the number of the contours is larger than a preset contour number threshold.
In specific implementation, the number of the contours can be obtained, for example, when rainy and snowy weather occurs, the rainy and snowy images in two frames of images are distributed in a scattered mode, the contours are more, and whether the number of the contours is larger than a preset contour number threshold value or not can be judged, so that frame image abnormality caused by rainy and snowy can be effectively judged.
And S412, if the number of the outlines is larger than a preset outline number threshold value, judging that the first target image is an abnormal image.
In a specific implementation, when the number of the outlines is greater than a preset threshold value of the number of the outlines, it is determined that the first target image has an abnormality of a frame image generated in rainy and snowy weather, that is, the first target image is an abnormal image.
In an embodiment, referring to fig. 6, fig. 6 is a schematic sub-flowchart of a method for determining an abnormal frame according to an embodiment of the present invention. The above step S402 includes steps S421 to S422:
s421, obtaining the area surrounded by the outline, and judging whether the area surrounded by the outline is larger than a preset outline area threshold.
In specific implementation, the area surrounded by the outline can be obtained, for example, when a foggy weather occurs, the foggy images in two frames of images are continuous, the area surrounded by the shielding part is large, and the frame image abnormality generated by the foggy weather can be effectively judged by judging whether the area surrounded by the outline is larger than a preset outline area threshold value.
S422, if the area enclosed by the outline is larger than a preset outline area threshold, judging that the first target image is an abnormal image.
In specific implementation, when the area enclosed by the outline is larger than a preset outline area threshold, judging that the frame image generated by fog exists in the first target image, namely the first target image is an abnormal image.
In one embodiment, the step S402 includes: and acquiring the number of the contours and the area surrounded by the contours, and judging that the first target image is a normal image if the number of the contours is not greater than the preset contour number threshold and the area surrounded by the contours is not greater than the preset contour area threshold.
In a specific implementation, only when the number of the contours is not greater than the preset contour number threshold, and the area enclosed by the contours is not greater than the preset contour area threshold, the first target image is judged to be a normal image.
The pictures generated by normal moving objects are strictly filtered, so that the workload of staff investigation burden can be effectively reduced.
And S106, if the first target image is an abnormal image, increasing the count value of a preset counting unit by a preset first value.
In a specific implementation, the count value of the counting unit is used for recording the current abnormal constant, the count value is a variable, and the first value can be, for example, a natural number such as 0, 1, 2, 3 … …, etc. In an embodiment, the first value is 1, the initial value of the count value of the counting unit is 0, if the first target image is an abnormal image, the count value is increased by 1, so as to obtain an updated count value 1, and the updated count value is stored as the count value of the counting unit.
S107, judging whether the count value of the preset counting unit is larger than a preset count value threshold value.
In specific implementation, after step S106, the updated count value is obtained as the count value of the counting unit, and the count value is compared with a preset count value threshold value, so as to determine whether the count value of the preset counting unit is greater than the preset count value threshold value.
S108, if the count value of the preset counting unit is larger than the preset count value threshold, judging that the video object has abnormal images.
In a specific implementation, if the count value of the preset counting unit is greater than the preset count value threshold, that is, the frame image of the video object frequently has abnormal fluctuation of the picture, irregular changes such as rain, snow and fog, the video object is judged to have abnormal picture, and picture abnormal information is output to the monitoring end, so that staff can conveniently check the abnormality. Whether the video object has the picture abnormality is further judged through the count value of the counting unit and the count value threshold value, and the picture abnormality of the video object is directly judged by avoiding accidental picture abnormality fluctuation, irregular changes such as rain, snow, fog and the like, so that the method is more practical.
In an embodiment, referring to fig. 7, fig. 7 is a schematic sub-flowchart of a method for determining an abnormal frame according to an embodiment of the present invention. The method for judging abnormal picture further comprises step S109 and step S110:
and S109, if the first target image is a normal image, reducing the count value of a preset counting unit by a preset fourth value, taking the second target image as a new first target image, and turning to step S103.
In a specific implementation, the count value of the counting unit is used for recording the current abnormal constant, the count value is a variable, and the fourth value can be a natural number such as 1, 2, 3 … …, etc. In an embodiment, the fourth value is 1, the initial value of the count value of the counting unit is 1, if the first target image is a normal image, the count value is reduced by 1, so as to obtain an updated count value 0, and the updated count value is stored as the count value of the counting unit.
In one embodiment, the prevention program performs an upper-and lower-bound addition and subtraction of the count value variable, typically setting the range of the count value variable to (0, count value threshold +10). When the count value variable reaches the boundary of the range, for example, the first value is 1, the count value initial value of the counting unit is 0, and if the first target image is a normal image, the count value is reduced by 1, but the range of the count value variable is (0, count value threshold +10), so that the updated count value is still 0, and the updated count value is stored as the count value of the counting unit. Turning to step S103, repeating steps S101-S110 with updating of the video object until it is determined that the video object has a frame abnormality, or an instruction to stop executing the method is received.
S110, if the count value of the preset counting unit is not greater than the preset count value threshold, taking the second target image as a new first target image, and turning to the step of comparing the preset template image with the first target image to obtain a first comparison result.
In a specific implementation, when the count value of the preset counting unit is not greater than the preset count value threshold, the second target image is directly used as the new first target image, and the step S103 is proceeded to.
Based on a preset template diagram, a first comparison result and a second comparison result of two adjacent frames of images and the template diagram are respectively obtained, the first comparison result is further compared with the second comparison result, and difference information of the first comparison result and the second comparison result is obtained; the method can calculate and judge whether the first target image has an abnormally moving object according to an algorithm preset by the difference information result, if the first target image has the abnormally moving object, the first target image is judged to be the abnormal image, the frequency of the occurrence of the first target image which is the abnormal image is judged through the count value of the counting unit, and the occurrence frequency of the abnormal image of the video object is judged only when the count value is larger than the preset count value threshold value, so that the occurrence frequency of the abnormal image of the video object is effectively reduced due to the fact that the object normally moves.
Referring to fig. 8, the embodiment of the present invention further provides a device 600 for determining abnormal images, where the device for automatically updating a template map includes a first obtaining unit 601, a comparing unit 602, a second obtaining unit 603, a third obtaining unit 604, a first determining unit 605, a calculating unit 606, a second determining unit 607, and a determining unit 608.
The first acquisition unit 601 acquires a frame image of a preset video object as a first target image.
And the comparison unit 602 compares the preset template image with the first target image to obtain a first comparison result.
Comparing the preset template image with the first target image to obtain a first comparison result, wherein the comparing comprises the following steps:
and comparing the preset template image with the first target image based on a preset twin network, and generating a first binary image as the first comparison result.
The second obtaining unit 603 obtains a frame image, which is a next frame image of the first target image, in the preset video object as a second target image, and compares the preset template image with the second target image to obtain a second comparison result.
Comparing the preset template image with the second target image to obtain a second comparison result, wherein the comparing comprises the following steps:
and comparing the preset template image with the second target image based on the preset twin network, and generating a second binary image as the second comparison result.
And a third obtaining unit 604, configured to obtain difference information of the first comparison result and the second comparison result.
The obtaining the difference information of the first comparison result and the second comparison result includes:
judging whether the pixel values of the first binary image and the second binary image under the same pixel coordinate are the same or not;
if the pixel values of the first binary image and the second binary image under the same pixel coordinate are the same, recording the value corresponding to the pixel coordinate as the preset second numerical value;
if the pixel values of the first binary image and the second binary image under the same pixel coordinate are different, recording the value corresponding to the pixel coordinate as the preset third numerical value;
and generating a third binary image based on the values corresponding to all the pixel coordinates as the difference information.
The first judging unit 605 judges whether the first target image is an abnormal image or not based on the difference information.
The judging whether the first target image is an abnormal image according to the difference information includes:
acquiring a contour contained in the third binary image;
and judging whether the first target image is an abnormal image or not according to the outline.
The determining whether the first target image is an abnormal image according to the contour includes:
acquiring the number of the contours, and judging whether the number of the contours is larger than a preset contour number threshold;
and if the number of the outlines is larger than a preset outline number threshold value, judging that the first target image is an abnormal image.
The determining whether the first target image is an abnormal image according to the contour includes:
acquiring the area surrounded by the outline, and judging whether the area surrounded by the outline is larger than a preset outline area threshold value or not;
and if the area enclosed by the outline is larger than a preset outline area threshold value, judging that the first target image is an abnormal image.
Judging whether the first target image is an abnormal image according to the outline, comprising:
and acquiring the number of the contours and the area surrounded by the contours, and judging that the first target image is a normal image if the number of the contours is not greater than the preset contour number threshold and the area surrounded by the contours is not greater than the preset contour area threshold.
After the judging whether the first target image is an abnormal image according to the difference information, the method further includes:
if the first target image is a normal image, reducing the count value of a preset counting unit by a preset fourth value;
and taking the second target image as a new first target image, and turning to the step of comparing the preset template image with the first target image to obtain a first comparison result.
And a calculating unit 606, configured to increase the count value of the preset counting unit by a preset first value if the first target image is an abnormal image.
The second judging unit 607 judges whether the count value of the preset counting unit is greater than a preset count value threshold.
And the judging unit 608 judges that the video object has abnormal images if the count value of the preset counting unit is larger than the preset count value threshold value.
As shown in fig. 9, an embodiment of the present invention provides an electronic device including a processor 111, a communication interface 112, a memory 113, and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 perform communication with each other through the communication bus 114,
a memory 113 for storing a computer program;
in one embodiment of the present invention, the processor 111 is configured to implement the method for determining abnormal images provided in any one of the foregoing method embodiments when executing the program stored in the memory 113.
The embodiment of the present invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the screen abnormality determination method provided in any one of the method embodiments described above.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is only a specific embodiment of the invention to enable those skilled in the art to understand or practice the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (11)

1. A picture abnormality determination method, characterized by comprising:
acquiring a frame image of a preset video object as a first target image;
comparing a preset template image with the first target image to obtain a first comparison result;
acquiring a next frame image of the first target image in the preset video object as a second target image, and comparing the preset template image with the second target image to obtain a second comparison result;
obtaining difference information of the first comparison result and the second comparison result;
judging whether the first target image is an abnormal image or not according to the difference information;
if the first target image is an abnormal image, increasing a preset count value of a preset counting unit by a preset first numerical value;
judging whether the count value of a preset counting unit is larger than a preset count value threshold value or not;
and if the count value of the preset counting unit is larger than the preset count value threshold, judging that the video object has picture abnormality.
2. The method of claim 1, wherein comparing the preset template map with the first target image to obtain a first comparison result comprises:
comparing the preset template image with the first target image based on a preset twin network, and generating a first binary image as the first comparison result;
and comparing the preset template image with the second target image based on the preset twin network, and generating a second binary image as the second comparison result.
3. The method of claim 2, wherein the obtaining the difference information of the first comparison result and the second comparison result comprises:
judging whether the pixel values of the first binary image and the second binary image under the same pixel coordinate are the same or not;
if the pixel values of the first binary image and the second binary image under the same pixel coordinate are the same, recording the value corresponding to the pixel coordinate as the preset second numerical value;
if the pixel values of the first binary image and the second binary image under the same pixel coordinate are different, recording the value corresponding to the pixel coordinate as the preset third numerical value;
and generating a third binary image based on the values corresponding to all the pixel coordinates as the difference information.
4. A method according to claim 3, wherein said determining whether the first target image is an abnormal image based on the difference information comprises:
acquiring a contour contained in the third binary image;
and judging whether the first target image is an abnormal image or not according to the outline.
5. The method of claim 4, wherein said determining whether the first target image is an outlier image based on the contour comprises:
acquiring the number of the contours, and judging whether the number of the contours is larger than a preset contour number threshold;
and if the number of the outlines is larger than a preset outline number threshold value, judging that the first target image is an abnormal image.
6. The method of claim 4, wherein said determining whether the first target image is an outlier image based on the contour comprises:
acquiring the area surrounded by the outline, and judging whether the area surrounded by the outline is larger than a preset outline area threshold value or not;
and if the area enclosed by the outline is larger than a preset outline area threshold value, judging that the first target image is an abnormal image.
7. The method of claim 4, wherein determining whether the first target image is an outlier image based on the contour comprises:
and acquiring the number of the contours and the area surrounded by the contours, and judging that the first target image is a normal image if the number of the contours is not greater than the preset contour number threshold and the area surrounded by the contours is not greater than the preset contour area threshold.
8. The method according to claim 1, wherein the method further comprises:
if the first target image is a normal image, reducing the count value of a preset counting unit by a preset fourth value, taking the second target image as a new first target image, and turning to the step of comparing the preset template image with the first target image to obtain a first comparison result;
and if the count value of the preset counting unit is not greater than the preset count value threshold, taking the second target image as a new first target image, and turning to the step of comparing the preset template image with the first target image to obtain a first comparison result.
9. A screen abnormality determination apparatus comprising means for performing the method of any one of claims 1 to 8.
10. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the steps of the method of any one of claims 1-8 when executing a program stored on a memory.
11. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any of claims 1-8.
CN202211666129.7A 2022-12-23 2022-12-23 Picture abnormality judging method, device, equipment and storage medium Pending CN116189038A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211666129.7A CN116189038A (en) 2022-12-23 2022-12-23 Picture abnormality judging method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211666129.7A CN116189038A (en) 2022-12-23 2022-12-23 Picture abnormality judging method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116189038A true CN116189038A (en) 2023-05-30

Family

ID=86443354

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211666129.7A Pending CN116189038A (en) 2022-12-23 2022-12-23 Picture abnormality judging method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116189038A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116563429A (en) * 2023-06-14 2023-08-08 厦门华厦学院 Animation design processing supervision system and method based on cloud computing

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116563429A (en) * 2023-06-14 2023-08-08 厦门华厦学院 Animation design processing supervision system and method based on cloud computing
CN116563429B (en) * 2023-06-14 2023-10-27 厦门华厦学院 Animation design processing supervision system and method based on cloud computing

Similar Documents

Publication Publication Date Title
JP4528309B2 (en) Object detection method, object detection apparatus, and object detection program
EP1474779B1 (en) Assessing the photo quality of a captured image in a digital still camera
US11145046B2 (en) Detection of near-field occlusions in images
CN111210399B (en) Imaging quality evaluation method, device and equipment
CN107220962B (en) Image detection method and device for tunnel cracks
CN112598922B (en) Parking space detection method, device, equipment and storage medium
US20140056519A1 (en) Method, apparatus and system for segmenting an image in an image sequence
CN116189038A (en) Picture abnormality judging method, device, equipment and storage medium
CN113902740A (en) Construction method of image blurring degree evaluation model
CN117788394A (en) State detection method, device, equipment and storage medium of power equipment
CN114004858A (en) Method and device for identifying aviation cable surface code based on machine vision
CN113688820A (en) Stroboscopic stripe information identification method and device and electronic equipment
CN115083008A (en) Moving object detection method, device, equipment and storage medium
CN112001336A (en) Pedestrian boundary crossing alarm method, device, equipment and system
CN109785343B (en) Definition-based face matting picture optimization method and device
Nasonov et al. Edge width estimation for defocus map from a single image
CN114005036A (en) Bare soil monitoring and early warning method and device, computer equipment and storage medium
CN113673362A (en) Method and device for determining motion state of object, computer equipment and storage medium
TWI695326B (en) Object attribute analyzing method and related object attribute analyzing device
CN112364693A (en) Barrier identification method, device and equipment based on binocular vision and storage medium
CN111275045A (en) Method and device for identifying image subject, electronic equipment and medium
EP4322120A1 (en) Method for photographing object for identifying companion animal, and electronic device
CN110738137A (en) people flow rate statistical method and device
CN118279841B (en) Intelligent expressway inspection escape-proof monitoring system based on data fusion
CN114373196B (en) Effective acquisition area determination method, program product, storage medium and electronic device

Legal Events

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