CN117392583A - Video repetition determination method, device, equipment and storage medium - Google Patents

Video repetition determination method, device, equipment and storage medium Download PDF

Info

Publication number
CN117392583A
CN117392583A CN202311348437.XA CN202311348437A CN117392583A CN 117392583 A CN117392583 A CN 117392583A CN 202311348437 A CN202311348437 A CN 202311348437A CN 117392583 A CN117392583 A CN 117392583A
Authority
CN
China
Prior art keywords
image
frame
video
detected
determining
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
CN202311348437.XA
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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202311348437.XA priority Critical patent/CN117392583A/en
Publication of CN117392583A publication Critical patent/CN117392583A/en
Pending legal-status Critical Current

Links

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
    • 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/761Proximity, similarity or dissimilarity measures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (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)

Abstract

The disclosure provides a method, a device, equipment and a storage medium for determining video repetition, relates to the technical field of computers, in particular to the technical fields of video processing, data processing and the like, and can be applied to the scenes of determining video repetition, detecting video repetition frames and the like. The specific implementation scheme comprises the following steps: acquiring a video to be detected; detecting whether each frame of image in the video to be detected has a similar image before the frame of image in sequence; and when at least N continuous images exist in the video to be detected, determining that the video to be detected is repeated when each frame of image in the N continuous images has a similar image before the frame of image. The method and the device can improve the efficiency and the accuracy of determining the repetition of the video.

Description

Video repetition determination method, device, equipment and storage medium
Technical Field
The disclosure relates to the technical field of computers, in particular to the technical fields of video processing, data processing and the like, and can be applied to determining video repetition, detecting video repetition frames and other scenes, in particular to a video repetition determination method, a device, equipment and a storage medium.
Background
In the process of editing, editing and the like, a video creator easily causes the problem of repeated playing of partial pictures in the video. Thus, the video creator may determine whether the video is repeatedly played before the video is released, so as to edit again when the video is repeatedly played, thereby avoiding problems.
Currently, in order to determine whether or not playback content in a video is repeated, it is necessary to manually watch the video and judge.
But this way of determining whether video is duplicated is currently inefficient and not accurate.
Disclosure of Invention
The invention provides a video repetition determination method, a device, equipment and a storage medium, which can improve the efficiency and accuracy of determining video repetition.
According to a first aspect of the present disclosure, there is provided a video repetition determination method, including:
acquiring a video to be detected; detecting whether each frame of image in the video to be detected has a similar image before the frame of image in sequence; when at least N continuous images exist in the video to be detected, and each frame of image in the N continuous images is similar to the other frame of image before the frame of image, determining that the video to be detected is repeated, wherein N is a positive integer greater than 1.
According to a second aspect of the present disclosure, there is provided a video repetition determination device, the device comprising: the device comprises an acquisition module, a detection module and a processing module.
And the acquisition module is used for acquiring the video to be detected.
The detection module is used for sequentially detecting whether each frame of image in the video to be detected has a similar image before the frame of image.
And the processing module is used for determining that the video to be detected is repeated when at least N continuous images exist in the video to be detected, and each frame of image in the N continuous images has a similar image before the frame of image, wherein N is a positive integer greater than 1.
According to a third aspect of the present disclosure, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method as in the first aspect.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method according to the first aspect.
According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method according to the first aspect.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a flowchart of a video repetition determination method according to an embodiment of the present disclosure;
fig. 2 is another flow chart of a video duplication determination method according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of a video repetition determination method according to an embodiment of the disclosure;
fig. 4 is a schematic flowchart of a video repetition determination method according to an embodiment of the disclosure;
fig. 5 is a schematic flowchart of a video repetition determination method according to an embodiment of the disclosure;
fig. 6 is a schematic diagram of the composition of a video duplication determination device according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram of the composition of an electronic device according to an embodiment of the disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be appreciated that in embodiments of the present disclosure, the character "/" generally indicates that the context associated object is an "or" relationship. The terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
In the process of editing, editing and the like, a video creator easily causes the problem of repeated playing of partial pictures in the video. Thus, the video creator may determine whether the video is repeatedly played before the video is released, so as to edit again when the video is repeatedly played, thereby avoiding problems.
Currently, in order to determine whether or not playback content in a video is repeated, it is necessary to manually watch the video and judge.
But this way of determining whether video is duplicated is currently inefficient and not accurate.
Under the background technology, the video repetition determination method can improve the efficiency and accuracy of determining video repetition.
The execution subject of the video repetition determination method provided by the embodiment of the disclosure may be a computer or a server, or may also be other electronic devices with data processing capability; alternatively, the execution subject of the method may be a processor (e.g., a central processing unit (central processing unit, CPU)) in the above-described electronic device; still alternatively, the execution subject of the method may be an Application (APP) installed in the electronic device and capable of implementing the function of the method; alternatively, the execution subject of the method may be a functional module, a unit, or the like having the function of the method in the electronic device. The subject of execution of the method is not limited herein.
The video repetition determination method is exemplarily described below with reference to the accompanying drawings.
Fig. 1 is a flowchart illustrating a video repetition determination method according to an embodiment of the present disclosure. As shown in fig. 1, the method may include:
s101, acquiring a video to be detected.
The electronic device may directly receive the video to be detected sent by the user, or may acquire the video to be detected from the server through the network, which is not limited in the manner of acquiring the video to be detected.
For example, the user may transmit the video to be detected to the electronic device through a storage medium (such as a hard disk, a usb disk, etc.), or the user may send the video to be detected to a server, and the server forwards the video to the electronic device, so as to achieve the acquisition of the video to be detected by the electronic device.
S102, sequentially detecting whether each frame of image in the video to be detected has a similar image before the frame of image.
For example, after the video to be detected is obtained, all the images of each frame of the video to be detected can be extracted and stored in a frame list, and then each frame of image is detected in sequence; or detecting once every time a frame image is extracted, and then storing the extracted frame image in a frame list.
For example, the electronic device may determine the detection order according to the play time sequence of all frames of the video to be detected, so as to implement detection of each frame of image in the video to be detected.
For example, the electronic device may first extract a first frame image of the video to be detected, and detect whether the first frame image has a similar image before the first frame image; extracting a second frame image of the video to be detected, and detecting whether a similar image of the second frame image exists in a first frame image before the second frame image; and then extracting a third frame image of the video to be detected, and detecting whether similar images of the third frame image exist in the first frame image and the second frame image before the third frame image. And so on until the last frame of image of the video to be detected, the detection of whether each frame of image in the video to be detected has a similar image before the frame of image is realized.
For example, when detecting whether a similar image of the q-th frame image exists in the first frame image to the q-1-th frame image before the q-th frame image in the video to be detected, the first frame image to the q-th frame image may be respectively converted into feature vectors, cosine similarity of the feature vectors corresponding to the q-th frame image and the feature vectors corresponding to other frame images is calculated, and a frame image with cosine similarity greater than a set value is used as the similar image of the q-th frame image.
For example, in detecting the 5 th frame image in the video to be detected, the 1 st frame image to the 5 th frame image may be converted into feature vectors d, respectively 1 To d 5 Respectively calculate d 5 And d 1 Cosine similarity of 0.85, d 5 And d 2 Cosine similarity of 0.88, d 5 And d 3 Cosine similarity of 0.96, d 5 And d 4 The cosine similarity of the frame is 0.92, and the 3 rd frame image corresponding to the cosine similarity being greater than 0.95 is taken as the similar image of the 5 th frame image.
For example, each frame of image may or may not have a corresponding similar image; the similar images corresponding to the different frame images may be the same or different, and are not limited in this regard.
And S103, when at least N continuous images exist in the video to be detected, determining that the video to be detected is repeated when each frame of image in the N continuous images has a similar image before the frame of image.
Wherein N is a positive integer greater than 1.
Illustratively, N may be any positive integer greater than 1, such as 2, 3, without limitation.
Taking an example that the video to be detected includes 20 frames of images as an example, when detecting that an 11 th frame image in the video to be detected has a similar image (5 th frame image) before the 11 th frame image, a 12 th frame image in the video to be detected has a similar image (6 th frame image) before the 12 th frame image, and a 13 th frame image in the video to be detected has a similar image (7 th frame image) before the 13 th frame image, the 11 th frame image to the 13 th frame image of the video to be detected and the 5 th frame image to the 7 th frame image are repeated, it may be determined that the video to be detected is repeated.
According to the embodiment of the disclosure, by acquiring the video to be detected, whether each frame of image in the video to be detected has a similar image before the frame of image is sequentially detected, and when at least N frames of continuous images exist in the video to be detected, when each frame of image in the N frames of continuous images has a similar image before the frame of image, the repetition of the video to be detected can be rapidly and accurately determined, and the efficiency and the accuracy for determining the repetition of the video to be detected are improved.
Fig. 2 is another flow chart of a video repetition determination method according to an embodiment of the disclosure. As shown in fig. 2, when at least N consecutive images exist in the video to be detected, and each of the N consecutive images has a similar image before the frame image, determining that the video to be detected is repeated may include:
s201, when at least N continuous images exist in the video to be detected, and each frame of image in the N continuous images is similar to the corresponding similar image before the frame of image, the interval frame number between each frame of image in the N continuous images and the corresponding similar image is respectively determined.
Illustratively, taking an example that the video to be detected includes 20 frames of images, 3 consecutive images such as an 11 th frame image, a 12 th frame image and a 13 th frame image are detected to have similar images, and the similar images are respectively a 3 rd frame image, a 5 th frame image and a 5 th frame image, the number of interval frames between the 11 th frame image and the corresponding similar image (i.e. the 3 rd frame image) is 7 frames, the number of interval frames between the 12 th frame image and the corresponding similar image (i.e. the 5 th frame image) is 6 frames, and the number of interval frames between the 13 th frame image and the corresponding similar image (i.e. the 5 th frame image) is 7 frames.
S202, determining an average value of interval frame numbers between the previous N-1 frame image and the corresponding similar image in the N continuous images.
Illustratively, continuing with the above example, the average value of the number of interval frames between the previous N-1 frame image and the corresponding similar image in the N continuous images is the average value of the number of interval frames between the 11 th frame image and the corresponding similar image (i.e., the 3 rd frame image) and the number of interval frames between the 12 th frame image and the corresponding similar image (i.e., the 5 th frame image), and the average value is (7+6)/2=6.5.
For example, when N is 2, the average value of the interval frames between the previous N-1 frame image and the corresponding similar image in the N continuous images is the interval frames between the previous N-1 frame image and the corresponding similar image in the N continuous images.
S203, determining the difference value between the interval frame number corresponding to the N-th frame image in the N-frame continuous images and the average value.
Illustratively, continuing with the above example, the number of interval frames corresponding to the nth frame image in the N continuous images is the number of interval frames between the 13 th frame image and the corresponding similar image (i.e., the 5 th frame image), the difference between the number of interval frames corresponding to the nth frame image in the N continuous images and the average value is the difference between the number of interval frames between the 13 th frame image and the corresponding similar image (i.e., the 5 th frame image) and the average value between the 11 th frame image and the corresponding similar image (i.e., the 3 rd frame image) and the number of interval frames between the 12 th frame image and the corresponding similar image (i.e., the 5 th frame image), and the difference is 7-6.5=0.5.
And S204, when the absolute value of the difference value is smaller than a first threshold value, determining that the video to be detected is repeated.
The first threshold may be any positive integer, such as 2 and 3, and the magnitude of the first threshold is not limited.
Illustratively, continuing with the above example, the first threshold is 2, the absolute value of the difference is 0.5 less than the first threshold, and it is determined that the video to be detected is repeated.
According to the embodiment, the average value of the interval frame numbers between the previous N-1 frame image and the corresponding similar image in the N continuous images is determined by determining the interval frame number between each frame image of the N continuous images and the corresponding similar image, the difference value between the interval frame number corresponding to the N frame image and the average value in the N continuous images is determined, when the absolute value of the difference value is smaller than a first threshold value, the fact that the N frame image in the N continuous images and the similar image corresponding to the previous N-1 frame image in the N continuous images are close can be determined, the repetition of the video to be detected can be more accurately determined, and the accuracy of determining the repetition of the video is improved.
In some possible implementations, when the absolute value of the difference is smaller than the first threshold, determining that the video to be detected is repeated may include:
And when the absolute value of the difference value is smaller than the first threshold value and N is larger than the second threshold value, determining that the video to be detected is repeated.
The second threshold may be any positive integer, such as 2 and 3, and the magnitude of the first threshold is not limited.
According to the embodiment, when the absolute value of the difference value is smaller than the first threshold value and N is larger than the second threshold value, the video to be detected is determined to be repeated, and when more continuous frame images all have similar images, the video to be detected is determined to be repeated, the video to be detected can be determined to be repeated more accurately, and the accuracy of determining the video to be repeated is improved.
Fig. 3 is a schematic flowchart of a video repetition determination method according to an embodiment of the disclosure. As shown in fig. 3, before sequentially detecting whether each frame image in the video to be detected has a similar image before the frame image, the method may further include:
s301, determining a subtitle region and an icon region of each frame of image in the video to be detected.
For example, each frame of image may be respectively input into a pre-trained neural network model, and the neural network model outputs the positions of the subtitles and icons of each frame of image in the image, thereby determining the subtitle region and the icon region of each frame of image.
S302, determining a main area of each frame image in the video to be detected according to the subtitle area and the icon area of each frame image in the video to be detected.
For example, the images of the caption area and the icon area in each frame image may be removed, and the remaining area may be taken as the main area of each frame image.
The sequentially detecting whether each frame image in the video to be detected has a similar image before the frame image may include:
and according to the main area of each frame of image in the video to be detected, detecting whether each frame of image in the video to be detected has a similar image before the frame of image in sequence.
For example, when detecting whether a similar image of the q-th frame image exists in the first frame image to the q-1-th frame image before the q-th frame image in the video to be detected, the images of the main areas in the first frame image to the q-th frame image can be respectively converted into feature vectors, cosine similarity of the feature vectors corresponding to the images of the main areas of the q-th frame image and the feature vectors corresponding to the images of the main areas of other frame images is calculated, and the frame image with the cosine similarity larger than a set value is used as the similar image of the q-th frame image.
According to the method and the device, the caption area and the icon area of each frame of image in the video to be detected are determined, and the main area of each frame of image in the video to be detected is determined according to the caption area and the icon area of each frame of image in the video to be detected, so that the interference of captions and icons in the images on determining similar images can be removed, and the accuracy of detecting whether the similar images exist before the frame of image in each frame of image in the video to be detected is improved.
In some possible implementations, before sequentially detecting whether each frame image in the video to be detected has a similar image before the frame image, the method may further include:
a central region of each frame of image in the video to be detected is determined.
For example, according to the image size of the video to be detected, a region whose center region is a certain length from the image boundary may be determined as the center region, and the shape of the center region is not limited.
For example, the image size of the video to be detected is 200 long and 100 wide, and a rectangular area from the upper boundary 50, the lower boundary 50, the left boundary 50, and the right boundary 50 of the video image may be used as the center area.
The sequentially detecting whether each frame image in the video to be detected has a similar image before the frame image may include:
and according to the central area of each frame of image in the video to be detected, detecting whether each frame of image in the video to be detected has a similar image before the frame of image in sequence.
For example, when detecting whether a similar image of the q-th frame image exists in the first frame image to the q-1-th frame image before the q-th frame image in the video to be detected, the images of the central area in the first frame image to the q-th frame image can be respectively converted into feature vectors, cosine similarity of the feature vectors corresponding to the images of the central area of the q-th frame image and the feature vectors corresponding to the images of the central areas of other frame images is calculated, and the frame image with the cosine similarity larger than a set value is used as the similar image of the q-th frame image.
According to the method and the device for detecting the similar images, the central area of each frame image in the video to be detected is determined, so that the interference of the less relevant content in the video image on the determination of the similar images can be removed, and the accuracy of detecting whether the similar images exist before the frame image in each frame image in the video to be detected is improved.
In some implementations, a main area of each frame of image in the video to be detected can be determined first, then a central area of the main area is determined according to an image size of the main area, then whether a similar image exists before each frame of image in the video to be detected is detected sequentially according to the central area of the main area of each frame of image in the video to be detected, and whether the similar image exists before the frame of image in the video to be detected is determined more accurately.
Fig. 4 is a schematic flowchart of a video repetition determination method according to an embodiment of the disclosure. As shown in fig. 4, sequentially detecting whether each frame image in the video to be detected has a similar image before the frame image may include:
s401, determining pixel difference values between pixel points of an ith frame image and corresponding pixel points of an ith frame previous image in the video to be detected.
Wherein i is a positive integer.
For example, the shape and the size of the ith frame image and the other frame images in the video to be detected are the same, and the pixel points of the ith frame image and the pixel points of the other frame images are in one-to-one correspondence.
For example, the pixel points of the first row and the first column in the ith frame image correspond to the pixel points of the first row and the first column in the other frame images.
For example, taking the image size of the video to be detected as 2×2, the i-th frame image is a 3 rd frame image in the video to be detected, and the pixel difference between the pixel point of the 3 rd frame image and the corresponding pixel point of the 2 nd frame image includes a difference between the value of the pixel point of the 3 rd frame image first row and the value of the pixel point of the 2 nd frame image first row and the value of the pixel point of the 3 rd frame image first column and the value of the pixel point of the 2 nd frame image first row and the value of the pixel point of the 3 rd frame image second column and the value of the pixel point of the 2 nd frame image second row and the second column.
S402, determining a first number corresponding to the image before the ith frame, wherein the first number is the number of pixel points with pixel difference values larger than a third threshold value.
Illustratively, continuing with the above example, the difference between the value of the pixel point of the first row and the first column of the 3 rd frame image and the value of the pixel point of the first row and the first column of the 2 nd frame image is 10, the difference between the value of the pixel point of the first row and the second column of the 3 rd frame image and the value of the pixel point of the second row and the second column of the 2 nd frame image is 15, the difference between the value of the pixel point of the first row and the value of the first column of the 3 rd frame image and the value of the pixel point of the second row and the first column of the 2 nd frame image is 20, the difference between the value of the pixel point of the second row and the value of the second column of the 3 rd frame image and the value of the pixel point of the second row and the second column of the 2 nd frame image is 30, and the first threshold value is 12, and the first number corresponding to the 2 nd frame image is 3.
S403, determining whether the ith frame image in the video to be detected has a similar image before the ith frame image according to the first number corresponding to the image before the ith frame and the number of pixel points corresponding to the image before the ith frame.
For example, a difference between a first number of pixels corresponding to an image before the i-th frame and a number of pixels corresponding to the image before the i-th frame may be calculated, and an image having a difference smaller than a preset threshold may be used as a similar image of the i-th frame image.
For example, continuing to take the above example as an example, the first number corresponding to the 2 nd frame image is 3, the number of pixels corresponding to the 2 nd frame image is 4, and the preset threshold is 2, then the difference between the first number corresponding to the 2 nd frame image and the number of pixels corresponding to the 2 nd frame image is 1, and is smaller than the preset threshold, then the 2 nd frame image may be a similar image of the 3 rd frame image, and then it is determined that the 3 rd frame image in the video to be detected has a similar image before the 3 rd frame image.
According to the method and the device, the pixel difference value between the pixel point of the ith frame image and the corresponding pixel point of the ith frame image in the video to be detected is determined, the first quantity corresponding to the ith frame image is determined, the first quantity is the quantity of the pixel points with the pixel difference value larger than the third threshold value, and according to the first quantity corresponding to the ith frame image and the quantity of the pixel points corresponding to the ith frame image, whether the ith frame image in the video to be detected has a similar image before the ith frame image or not is determined, so that the similar image corresponding to each frame image in the video to be detected can be accurately determined.
Fig. 5 is a schematic flowchart of a video repetition determination method according to an embodiment of the disclosure. As shown in fig. 5, determining whether an i-th frame image in a video to be detected has a similar image before the i-th frame image according to a first number corresponding to the i-th frame previous image and a number of pixels corresponding to the i-th frame previous image may include:
S501, determining a ratio of a first number corresponding to an image before an ith frame to the number of pixels corresponding to the image before the ith frame.
Illustratively, continuing with the previous example, the first number of pixels corresponding to the 2 nd frame image is 3, and the number of pixels corresponding to the 2 nd frame image is 4, and then the ratio of the first number of pixels corresponding to the 2 nd frame image to the number of pixels corresponding to the 2 nd frame image is 3/4.
S502, determining whether a similar image exists before an ith frame image in the video to be detected according to the ratio.
For example, an image having a ratio greater than a preset threshold value may be regarded as a similar image to the i-th frame image.
For example, continuing to take the above example as an example, the preset threshold is 1/2, the ratio of the first number of pixels corresponding to the 2 nd frame image to the number of pixels corresponding to the 2 nd frame image is 3/4, if the ratio is greater than the preset threshold, the 2 nd frame image may be a similar image of the 3 rd frame image, and if it is determined that the 3 rd frame image in the video to be detected has a similar image before the 3 rd frame image.
According to the embodiment, by determining the ratio of the first number corresponding to the image before the ith frame to the number of pixels corresponding to the image before the ith frame, whether the image before the ith frame exists in the video to be detected or not is determined according to the ratio, and the similar image corresponding to each frame of image in the video to be detected can be determined more accurately.
The foregoing description of the embodiments of the present disclosure has been presented primarily in terms of methods. To achieve the above functions, it includes corresponding hardware structures and/or software modules that perform the respective functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. The technical aim may be to use different methods to implement the described functions for each particular application, but such implementation should not be considered beyond the scope of the present disclosure.
In an exemplary embodiment, the embodiment of the present disclosure further provides a video duplication determination device, which may be used to implement the video duplication determination method as in the foregoing embodiment.
Fig. 6 is a schematic diagram of the composition of a video repetition determination device according to an embodiment of the disclosure. As shown in fig. 6, the apparatus may include: an acquisition module 601, a detection module 604 and a processing module 605.
The acquiring module 601 is configured to acquire a video to be detected.
The detecting module 604 is configured to detect whether each frame image in the video to be detected has a similar image before the frame image.
The processing module 605 is configured to determine that the video to be detected is repeated when at least N consecutive images exist in the video to be detected, where N is a positive integer greater than 1, and each of the N consecutive images has a similar image before the frame image.
In some possible embodiments, the processing module 605 is specifically configured to:
when at least N continuous images exist in the video to be detected, determining the interval frame number between each frame image of the N continuous images and the corresponding similar image respectively when each frame image of the N continuous images exists before the frame image; determining an average value of the interval frame numbers between the previous N-1 frame images and the corresponding similar images in the N continuous images; determining the difference value between the interval frame number corresponding to the N frame image and the average value in the N frame continuous images; and when the absolute value of the difference value is smaller than a first threshold value, determining that the video to be detected is repeated.
In some possible embodiments, the processing module 605 is specifically configured to:
and when the absolute value of the difference value is smaller than the first threshold value and N is larger than the second threshold value, determining that the video to be detected is repeated.
In some possible embodiments, the apparatus further comprises:
a first region determining module 602, configured to determine a subtitle region and an icon region of each frame image in the video to be detected before sequentially detecting whether the similar image exists before the frame image; and determining a main area of each frame image in the video to be detected according to the subtitle area and the icon area of each frame image in the video to be detected.
The detection module 604 is specifically configured to:
and according to the main area of each frame of image in the video to be detected, detecting whether each frame of image in the video to be detected has a similar image before the frame of image in sequence.
In some possible embodiments, the apparatus further comprises:
the second area determining module 603 is configured to determine a central area of each frame image in the video to be detected before sequentially detecting whether the similar image exists before the frame image.
The detection module 604 is specifically configured to:
and according to the central area of each frame of image in the video to be detected, detecting whether each frame of image in the video to be detected has a similar image before the frame of image in sequence.
In some possible embodiments, the detection module 604 is specifically configured to:
determining pixel difference values between pixel points of an ith frame image and corresponding pixel points of an image before the ith frame in a video to be detected, wherein i is a positive integer; determining a first number corresponding to the image before the ith frame, wherein the first number is the number of pixel points with pixel difference values larger than a third threshold value; and determining whether the ith frame image in the video to be detected has a similar image before the ith frame image according to the first number corresponding to the image before the ith frame and the number of pixel points corresponding to the image before the ith frame.
In some possible embodiments, the detection module 604 is specifically configured to:
determining a ratio of a first number corresponding to an image before an ith frame to a number of pixels corresponding to the image before the ith frame; and determining whether the ith frame image in the video to be detected has a similar image before the ith frame image according to the ratio.
It should be noted that the division of the modules in fig. 6 is schematic, and is merely a logic function division, and other division manners may be implemented in practice. For example, two or more functions may also be integrated in one processing module. The embodiments of the present disclosure are not limited in this regard. The integrated modules may be implemented in hardware or in software functional modules.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the related user personal information all conform to the regulations of related laws and regulations, and the public sequence is not violated.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
In an exemplary embodiment, an electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method as described in the above embodiments. The electronic device may be the computer or server described above.
In an exemplary embodiment, the readable storage medium may be a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method according to the above embodiment.
In an exemplary embodiment, the computer program product comprises a computer program which, when executed by a processor, implements the method according to the above embodiments.
Fig. 7 illustrates a schematic block diagram of an example electronic device 700 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 7, the electronic device 700 includes a computing unit 701 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 702 or a computer program loaded from a storage unit 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 may also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Various components in the electronic device 700 are connected to the I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, etc.; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, an optical disk, or the like; and a communication unit 709 such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows the electronic device 700 to exchange information/data with other devices through a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 701 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The calculation unit 701 performs the respective methods and processes described above, for example, a video repetition determination method. For example, in some embodiments, the video repetition determination method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 708. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 700 via the ROM 702 and/or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the video repetition determination method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the video repetition determination method by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above can be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server) or that includes a middleware component (e.g., an application server) or that includes a front-end component through which a user can interact with an implementation of the systems and techniques described here, or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (17)

1. A method of video repeat determination, the method comprising:
acquiring a video to be detected;
sequentially detecting whether each frame of image in the video to be detected has a similar image before the frame of image;
and when at least N continuous images exist in the video to be detected, and each frame of image in the N continuous images has a similar image before the frame of image, determining that the video to be detected is repeated, wherein N is a positive integer greater than 1.
2. The method of claim 1, wherein determining that the video to be detected is repeated when there are at least N consecutive images in the video to be detected, each of the N consecutive images having a similar image before the frame image, comprises:
when at least N continuous images exist in the video to be detected, each frame of image in the N continuous images has a similar image before the frame of image, determining the interval frame number between each frame of image in the N continuous images and the corresponding similar image respectively;
determining an average value of the interval frame numbers between the previous N-1 frame images and the corresponding similar images in the N continuous images;
determining a difference value between the interval frame number corresponding to the Nth frame image in the N continuous images and the average value;
and when the absolute value of the difference value is smaller than a first threshold value, determining that the video to be detected is repeated.
3. The method of claim 2, the determining that the video to be detected is repeated when the absolute value of the difference is less than a first threshold, comprising:
and when the absolute value of the difference value is smaller than a first threshold value and N is larger than a second threshold value, determining that the video to be detected is repeated.
4. A method according to any one of claims 1-3, further comprising, prior to said sequentially detecting whether each frame of image in the video to be detected has a similar image before the frame of image:
determining a subtitle region and an icon region of each frame of image in the video to be detected;
determining a main area of each frame of image in the video to be detected according to the subtitle area and the icon area of each frame of image in the video to be detected;
the step of sequentially detecting whether each frame of image in the video to be detected has a similar image before the frame of image comprises the following steps:
and according to the main area of each frame of image in the video to be detected, detecting whether each frame of image in the video to be detected has a similar image before the frame of image in sequence.
5. The method of any of claims 1-4, further comprising, prior to said sequentially detecting whether each frame of image in the video to be detected has a similar image before the frame of image:
determining a central area of each frame of image in the video to be detected;
the step of sequentially detecting whether each frame of image in the video to be detected has a similar image before the frame of image comprises the following steps:
And sequentially detecting whether each frame of image in the video to be detected has a similar image before the frame of image according to the central area of each frame of image in the video to be detected.
6. The method according to any one of claims 1-5, wherein sequentially detecting whether each frame image in the video to be detected has a similar image before the frame image, comprises:
determining pixel difference values between pixel points of an ith frame image and corresponding pixel points of an ith frame previous image in the video to be detected, wherein i is a positive integer;
determining a first number corresponding to the image before the ith frame, wherein the first number is the number of pixel points with pixel difference values larger than a third threshold value;
and determining whether a similar image exists in the ith frame image in the video to be detected before the ith frame image according to the first number corresponding to the image before the ith frame and the number of pixel points corresponding to the image before the ith frame.
7. The method according to claim 6, wherein determining whether the ith frame image in the video to be detected has a similar image before the ith frame image according to the first number corresponding to the ith frame image and the number of pixels corresponding to the ith frame image comprises:
Determining a ratio of a first number corresponding to the image before the ith frame to a number of pixels corresponding to the image before the ith frame;
and determining whether a similar image exists before the ith frame image in the video to be detected according to the ratio.
8. A video repetition determination device, the device comprising:
the acquisition module is used for acquiring the video to be detected;
the detection module is used for sequentially detecting whether each frame of image in the video to be detected has a similar image before the frame of image;
and the processing module is used for determining that the video to be detected is repeated when at least N continuous images exist in the video to be detected, and each frame of image in the N continuous images has a similar image before the frame of image, wherein N is a positive integer greater than 1.
9. The apparatus of claim 8, the processing module being specifically configured to:
when at least N continuous images exist in the video to be detected, each frame of image in the N continuous images has a similar image before the frame of image, determining the interval frame number between each frame of image in the N continuous images and the corresponding similar image respectively;
Determining an average value of the interval frame numbers between the previous N-1 frame images and the corresponding similar images in the N continuous images;
determining a difference value between the interval frame number corresponding to the Nth frame image in the N continuous images and the average value;
and when the absolute value of the difference value is smaller than a first threshold value, determining that the video to be detected is repeated.
10. The apparatus of claim 9, the processing module being specifically configured to:
and when the absolute value of the difference value is smaller than a first threshold value and N is larger than a second threshold value, determining that the video to be detected is repeated.
11. The apparatus according to any one of claims 8-10, further comprising:
the first region determining module is used for determining a subtitle region and an icon region of each frame image in the video to be detected before the frame image is detected whether the similar image exists before the frame image in sequence;
determining a main area of each frame of image in the video to be detected according to the subtitle area and the icon area of each frame of image in the video to be detected;
the detection module is specifically configured to:
and according to the main area of each frame of image in the video to be detected, detecting whether each frame of image in the video to be detected has a similar image before the frame of image in sequence.
12. The apparatus according to any one of claims 8-11, further comprising:
the second area determining module is used for determining the central area of each frame image in the video to be detected before the frame image is detected whether the similar image exists before the frame image;
the detection module is specifically configured to:
and sequentially detecting whether each frame of image in the video to be detected has a similar image before the frame of image according to the central area of each frame of image in the video to be detected.
13. The apparatus according to any of claims 8-12, the detection module being specifically configured to:
determining pixel difference values between pixel points of an ith frame image and corresponding pixel points of an ith frame previous image in the video to be detected, wherein i is a positive integer;
determining a first number corresponding to the image before the ith frame, wherein the first number is the number of pixel points with pixel difference values larger than a third threshold value;
and determining whether a similar image exists in the ith frame image in the video to be detected before the ith frame image according to the first number corresponding to the image before the ith frame and the number of pixel points corresponding to the image before the ith frame.
14. The apparatus of claim 13, the detection module being specifically configured to:
determining a ratio of a first number corresponding to the image before the ith frame to a number of pixels corresponding to the image before the ith frame;
and determining whether a similar image exists before the ith frame image in the video to be detected according to the ratio.
15. An electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
16. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1-7.
17. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any of claims 1-7.
CN202311348437.XA 2023-10-17 2023-10-17 Video repetition determination method, device, equipment and storage medium Pending CN117392583A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311348437.XA CN117392583A (en) 2023-10-17 2023-10-17 Video repetition determination method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311348437.XA CN117392583A (en) 2023-10-17 2023-10-17 Video repetition determination method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117392583A true CN117392583A (en) 2024-01-12

Family

ID=89435456

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311348437.XA Pending CN117392583A (en) 2023-10-17 2023-10-17 Video repetition determination method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117392583A (en)

Similar Documents

Publication Publication Date Title
US20190197703A1 (en) Method and apparatus for tracking target profile in video
CN112559800B (en) Method, apparatus, electronic device, medium and product for processing video
CN113691733B (en) Video jitter detection method and device, electronic equipment and storage medium
CN113436100B (en) Method, apparatus, device, medium, and article for repairing video
CN112861885B (en) Image recognition method, device, electronic equipment and storage medium
CN112995535B (en) Method, apparatus, device and storage medium for processing video
CN112488060B (en) Target detection method, device, equipment and medium
CN114449343A (en) Video processing method, device, equipment and storage medium
CN113378958A (en) Automatic labeling method, device, equipment, storage medium and computer program product
CN114125498A (en) Video data processing method, device, equipment and storage medium
CN112258541A (en) Video boundary detection method, system, device and storage medium
CN116761020A (en) Video processing method, device, equipment and medium
CN117392583A (en) Video repetition determination method, device, equipment and storage medium
CN113628192B (en) Image blur detection method, apparatus, device, storage medium, and program product
CN115499707A (en) Method and device for determining video similarity
CN113361519B (en) Target processing method, training method of target processing model and device thereof
CN115205163A (en) Method, device and equipment for processing identification image and storage medium
CN112507957B (en) Vehicle association method and device, road side equipment and cloud control platform
CN115131315A (en) Image change detection method, device, equipment and storage medium
CN114549904A (en) Visual processing and model training method, apparatus, storage medium, and program product
CN113850757A (en) Mosaic detection method, mosaic detection device, electronic equipment and readable storage medium
CN114093006A (en) Training method, device and equipment of living human face detection model and storage medium
CN112925942A (en) Data searching method, device, equipment and storage medium
CN114051110B (en) Video generation method, device, electronic equipment and storage medium
CN112465859A (en) Method, device, equipment and storage medium for detecting fast moving object

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