CN112085097A - Image processing method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN112085097A
CN112085097A CN202010942059.8A CN202010942059A CN112085097A CN 112085097 A CN112085097 A CN 112085097A CN 202010942059 A CN202010942059 A CN 202010942059A CN 112085097 A CN112085097 A CN 112085097A
Authority
CN
China
Prior art keywords
video frame
video
similarity
target
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
CN202010942059.8A
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 Sensetime Technology Development Co Ltd
Original Assignee
Beijing Sensetime Technology Development 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 Sensetime Technology Development Co Ltd filed Critical Beijing Sensetime Technology Development Co Ltd
Priority to CN202010942059.8A priority Critical patent/CN112085097A/en
Publication of CN112085097A publication Critical patent/CN112085097A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/73Querying
    • G06F16/732Query formulation
    • G06F16/7328Query by example, e.g. a complete video frame or video sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/78Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/783Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • G06F16/7847Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using low-level visual features of the video content

Abstract

The present disclosure relates to an image processing method and apparatus, an electronic device, and a storage medium, wherein the method includes: extracting video frames of a target video to obtain a first video frame; determining the similarity of the first video frame and the second video frame according to the image characteristics of the first video frame and the image characteristics of the second video frame; the second video frame is a video frame to be processed before the first video frame in the target video; processing the first video frame if the similarity is less than a similarity threshold. The embodiment of the disclosure can reduce the processing amount of video frames.

Description

Image processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to an image processing method and apparatus, an electronic device, and a storage medium.
Background
With the development of computer vision technology, deep learning technology is used in more and more applications, such as smart cities, smart driving, and the like. Deep learning relies on a large amount of data and its corresponding annotations. Data required in the deep learning process is usually returned in the form of video, for example, data collected at a certain frame rate in automatic driving. In this case, a video usually includes a large number of picture frames, and by labeling each picture frame, training for implementing a deep learning model can be achieved.
However, the model training is performed after all the picture frames are labeled, which consumes a lot of manpower and material resources.
Disclosure of Invention
The present disclosure proposes an image processing technical solution.
According to an aspect of the present disclosure, there is provided an image processing method including:
extracting video frames of a target video to obtain a first video frame;
determining the similarity of the first video frame and the second video frame according to the image characteristics of the first video frame and the image characteristics of the second video frame; the second video frame is a video frame to be processed before the first video frame in the target video;
processing the first video frame if the similarity is less than a similarity threshold.
In one or more optional embodiments, the performing video frame extraction on the target video to obtain a first video frame includes: and extracting a video frame which is separated from the second video by a preset time interval in the target video to serve as the first video frame.
In one or more optional embodiments, the determining the similarity between the first video frame and the second video frame according to the image feature of the first video frame and the image feature of the second video frame includes: determining a first feature vector of the first video frame according to the image feature of the first video frame; determining a second feature vector of the second video frame according to the image feature of the second video frame; and determining the similarity of the first video frame and the second video frame according to the distance between the first feature vector and the second feature vector.
In one or more optional embodiments, the method further comprises: not processing the first video frame if the similarity is greater than or equal to the similarity threshold.
In one or more optional embodiments, the method further comprises: and under the condition that the similarity is greater than or equal to the similarity threshold, extracting a video frame which is after the first video frame in the target video and is separated from the first video frame by a preset time interval, and obtaining the first video frame again.
In one or more optional embodiments, the method further comprises: taking the first video frame as the second video frame if the similarity is smaller than a similarity threshold; and extracting video frames which are arranged behind the second video frame in the target video and separated from the second video frame by a preset time interval, and obtaining the first video frame again.
According to an aspect of the present disclosure, there is provided an image processing apparatus including:
the extraction module is used for extracting video frames of the target video to obtain a first video frame;
the determining module is used for determining the similarity of the first video frame and the second video frame according to the image characteristics of the first video frame and the image characteristics of the second video frame; the second video frame is a video frame to be processed before the first video frame in the target video;
and the processing module is used for processing the first video frame under the condition that the similarity is smaller than a similarity threshold value.
In one or more optional embodiments, when the extraction module is configured to perform video frame extraction on the target video to obtain a first video frame, the method includes: and extracting a video frame which is separated from the second video by a preset time interval in the target video to serve as the first video frame.
In one or more optional embodiments, the determining module comprises: the first determining submodule is used for determining a first feature vector of the first video frame according to the image feature of the first video frame; the second determining submodule is used for determining a second feature vector of the second video frame according to the image feature of the second video frame; and the third determining submodule is used for determining the similarity of the first video frame and the second video frame according to the distance between the first feature vector and the second feature vector.
In one or more optional embodiments, the processing module is further configured to not process the first video frame if the similarity is greater than or equal to the similarity threshold.
In one or more optional embodiments, the extracting module is further configured to, when the similarity is greater than or equal to the similarity threshold, extract a video frame that is subsequent to the first video frame in the target video and is separated from the first video frame by a preset time interval, and retrieve the first video frame.
In one or more optional embodiments, the decimation module is further configured to, in a case that the similarity is smaller than a similarity threshold, regard the first video frame as the second video frame; and extracting video frames which are arranged behind the second video frame in the target video and separated from the second video frame by a preset time interval, and obtaining the first video frame again.
According to another aspect of the present disclosure, there is provided an electronic device including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to: the above-described image processing method is performed.
According to another aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the above-described image processing method.
In the embodiment of the disclosure, video frames of a target video may be extracted to obtain a first video frame, and then, according to image features of the first video frame and image features of a second video frame, similarity between the first video frame and the second video frame is determined, and the first video frame is processed under the condition that the similarity is smaller than a similarity threshold, where the second video frame is a video frame to be processed before the first video frame, so that the video frames in the target video may be extracted and deduplicated by using the similarity between the video frames, thereby reducing processing amount of the video frames and saving manpower and material resources.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure.
Fig. 1 shows a flowchart of an image processing method according to an embodiment of the present disclosure.
Fig. 2 illustrates a block diagram of an example of determining whether a first video frame is a pending video frame according to an embodiment of the present disclosure.
Fig. 3 shows a flow diagram of an example of image processing according to an embodiment of the present disclosure.
Fig. 4 illustrates a block diagram of an image processing apparatus according to an embodiment of the present disclosure.
Fig. 5 shows a block diagram of an example of an electronic device according to an embodiment of the present disclosure.
Fig. 6 shows a block diagram of an example of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
According to the image processing scheme provided by the embodiment of the disclosure, video frames of a target video can be extracted to obtain a first video frame, then the similarity between the first video frame and a second video frame is determined according to the image characteristics of the first video frame and the image characteristics of the second video frame, and the first video frame can be processed under the condition that the similarity is smaller than a similarity threshold value. Here, the second video frame is a video frame to be processed before the first video frame, and only the first video frame whose similarity with the second video frame is smaller than the similarity threshold is processed through the similarity between the first video frame and the previously determined video frame to be processed, so that the video frames extracted from the target video can be further screened, and the data processing amount is reduced.
In the related art, after the extracted video frames of the captured video are extracted, the extracted video frames are still similar in image scenes, for example, when the video in the situation that a vehicle runs slowly or waits for a red light is captured, hundreds of consecutive video frames in the captured video may have almost the same image scenes, and the almost same video frames in the image scenes have a smaller gain for acquiring new information in the deep learning process but correspond to a huge annotation cost. In addition, for video frames with similar image scenes, even though the same annotator annotates the video frames, a certain degree of deviation exists, and the deviation of annotation performed by different annotators may be larger. This may interfere with the deep learning process, resulting in a reduction in learning efficiency and performance. The image processing scheme provided by the embodiment of the disclosure can reduce the label amount of the video frames and can screen out the video frames with relatively similar image scenes, thereby providing more accurate and effective information for deep learning.
The following describes an image processing scheme provided by an embodiment of the present disclosure.
Fig. 1 shows a flowchart of an image processing method according to an embodiment of the present disclosure. The image processing method may be performed by a terminal device, a server, or other types of electronic devices, where the terminal device may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, or the like. In some possible implementations, the image processing method may be implemented by a processor calling computer readable instructions stored in a memory. The following describes an image processing method according to an embodiment of the present disclosure, taking an electronic device as an execution subject.
Step S11, performing video frame extraction on the target video to obtain a first video frame.
In the embodiment of the present disclosure, the electronic device may acquire a target video, where the target video may be obtained by shooting a scene by the electronic device, or may be obtained by other electronic devices. The target video may include a plurality of video frames. After the target video is acquired, video frame extraction may be performed on the target video, for example, video frames of the target video may be extracted at fixed video frame intervals, or video frames of the target video may be extracted at certain time intervals to obtain an extracted first video frame. Here, the first video frame may be one video frame currently extracted.
In a possible implementation manner, in the case that the first video frame is obtained by extracting the target video frame, a video frame that is separated from the second video frame by a preset time interval in the target video frame may be extracted as the first video frame.
In this implementation, the preset time interval may be set according to an actual application scenario, for example, the preset time interval may be set to be 5 seconds, 10 seconds, or the like. One video frame can be extracted from the target video at preset time intervals to obtain a second video frame and a first video frame. The second video frame may be a video frame extracted before the first video frame, that is, a video frame extracted in the target video after the second video frame is extracted in the target video and spaced apart from the second video frame by a preset time interval, may be the first video frame. The video frame extraction is carried out on the target video at the preset time interval, so that the influence of the frame rate of the target video is avoided, even if the frame rates corresponding to different target videos are different, the video frames can be extracted at the same time interval, and the influence of the frame rate of the video on the video frame extraction is reduced.
Here, the preset time interval may be set according to a capture scene of the target video. For example, if the capture scene of the target video is a capture scene in which the vehicle is slowly traveling or waiting for a red light, the preset time interval may be set to a larger value, for example, to 10s, which may reduce the situation in which the extracted video frames have the same image scene. For another example, if the capture scene of the target video is a capture scene in which the vehicle is traveling quickly, the preset time interval may be set to a small value, for example, to 5s, so that the situation that effective video frames are missed due to an excessively large set time interval may be reduced.
Step S12, determining the similarity of the first video frame and the second video frame according to the image characteristics of the first video frame and the image characteristics of the second video frame; and the second video frame is a video frame to be processed before the first video frame in the target video frame.
In the embodiment of the present disclosure, after the first video frame is obtained, feature extraction may be performed on the first video frame to obtain an image feature of the first video frame. Then, the image characteristics of the first video frame can be compared with the image characteristics of the second video frame, and the similarity between the first video frame and the second video frame is determined. Here, the second video frame may be a newly determined video frame to be processed, i.e. may be understood as a video frame processed one before the first video frame.
In one possible implementation manner, a first feature vector of a first video frame may be determined according to an image feature of the first video frame, a second feature vector of a second video frame may be determined according to an image feature of the second video frame, and then a similarity between the first video frame and the second video frame may be determined according to a distance between the first feature vector and the second feature vector.
In this implementation manner, the neural network model may be used to extract image features of the first video frame to obtain a first feature vector of the first video frame, and accordingly, the neural network model may be used to extract image features of the second video frame to obtain a second feature vector of the second video frame. The distance between the first feature vector and the second feature vector is then calculated, which may be taken as the similarity of the first video frame and the second video frame. The distance here may be a euclidean distance or a cosine distance. The network structure of the neural network model is not particularly limited, and for example, the neural network model such as a convolutional neural network or a residual error network may be used to extract the image features of the first video frame and/or the second video frame, for example, the resnet50 neural network may be used to extract the image features of the first video frame and/or the second video frame.
Here, in determining the similarity of the first video frame and the second video frame, the calculation may be performed using the following formula (1):
Figure BDA0002673968040000061
wherein the content of the first and second substances,
Figure BDA0002673968040000062
may be a first feature vector corresponding to the first video frame;
Figure BDA0002673968040000063
may be a second feature vector corresponding to a second video frame; cos θ may be the similarity of the first video frame and the second video frame.
And S13, processing the first video frame when the similarity is smaller than a similarity threshold value.
In the embodiment of the present disclosure, whether a first video frame is a video frame to be processed may be determined according to a similarity between the first video frame and a second video frame, and then the similarity between the first video frame and the second video frame may be compared with a similarity threshold, and when the similarity between the first video frame and the second video frame is smaller than the similarity threshold, it indicates that the similarity between the first video frame and the second video frame is lower and the image scenes of the two video frames are greatly different, the first video frame may provide effective information, so that the first video frame may be determined as the video frame to be processed, and further may be processed, for example, the first video frame may be subjected to processes such as labeling, target detection, face recognition, and the like, so that the video frame to be processed may be screened out from a plurality of video frames of a target video, and screening and processing effective video frames in the target video are realized.
In one possible implementation manner, the similarity of the first video frame and the second video frame may be compared with a set similarity threshold, and in the case that the similarity is greater than or equal to the similarity threshold, the first video frame is not processed.
In this implementation manner, the similarity threshold may be set according to an actual application scenario, for example, may be set to 70%, 80%, and the like. The similarity of the first video frame and the second video frame is compared with a set similarity threshold, the first video frame can be judged, if the similarity is larger than or equal to the set similarity threshold, the similarity of the first video frame and the second video frame is high, similar image scenes can be obtained, and the image scenes of the first video frame and the second video frame are repeated, the first video frame can not be processed, and therefore the processing amount of the video frames is reduced. In some implementations, in the case that the similarity between the first video frame and the second video frame is greater than or equal to the similarity threshold, the first video frame may be discarded, and the video frames having the same image scene may be filtered out.
In one example, in a case that the similarity between the first video frame and the second video frame is greater than or equal to the similarity threshold, a video frame that is after the first video frame and is separated from the first video frame by a preset time interval in the target video may be extracted, and the first video frame may be retrieved.
In this example, if the similarity between a first video frame and a second video frame is greater than or equal to the similarity threshold, the first video frame may be considered to be more similar to the second video frame, and the first video frame is not a video frame to be processed, then the next first video frame may continue to be extracted at a preset time interval, that is, a video frame after the first video frame is extracted from the target video and separated from the first video frame by the preset time interval may be extracted, and the newly extracted video frame may be taken as the first video frame. Then, the above steps S12 and S13 may be repeatedly executed, and it is determined whether the first video frame is a video frame to be processed for the re-extracted first video frame until the extraction of a plurality of video frames in the target video is completed. In this way, whether the first video frame extracted from the target video is processed or not can be sequentially judged, so that the number of processed video frames is reduced.
In one possible implementation manner, in a case that the similarity between the first video frame and the second video frame is smaller than the similarity threshold, the first video frame may be taken as the second video frame, and then video frames that are after the second video frame in the target video and separated from the second video frame by a preset time interval are extracted, so as to obtain the first video frame again. .
In this implementation manner, in a case that the similarity between the first video frame and the second video frame is smaller than the similarity threshold, the first video frame may be a newly determined video frame to be processed, and further, the second video frame may be updated by using the first video frame, that is, the first video frame is taken as a new second video frame. Then, the next first video frame may be continuously extracted from the target video at a preset time interval, that is, a video frame after the new second video frame is extracted from the target video and separated from the new second video frame by the preset time interval may be extracted, and the newly extracted video frame may be used as a new first video frame. Then, the steps S12 and S13 are repeated, and it is determined whether to process the new first video frame and the new second video frame until the extraction of the plurality of video frames in the target video is completed. By the method, whether the first video frames extracted from the target video are processed or not can be sequentially judged, so that effective video frames can be extracted from the target video. In some implementation manners, the first video frame with the similarity smaller than the similarity threshold may also be saved, so that batch subsequent processing, such as labeling, face recognition, target detection, and the like, may be further performed on the saved first video frame.
In one possible implementation, in the case of processing the first video frame, the first video frame may be annotated.
In this implementation, the first video frame may be annotated when it is determined that the similarity between the first video frame and the second video frame is less than the similarity threshold. Further, the annotated first video frame can then be utilized for training of the deep learning model. For example, in a target recognition scene, the labeling information labeling the first video frame may be an image position and a type of a target object, then the labeled first video frame may be input into the deep learning model to obtain an output result, then the output result may be compared with the labeling information, model parameters of the deep learning model may be adjusted by using the comparison result obtained after the comparison, training of the deep learning model is achieved, and after the deep learning model is trained, a target detection model for target detection may be obtained.
By the image processing scheme, the video frames in the target video can be screened to obtain the video frames to be processed, so that the effective video frames in the target video can be processed, and the processing amount of the video frames is reduced.
Fig. 2 illustrates a block diagram of an example of determining whether a first video frame is a pending video frame according to an embodiment of the present disclosure. In one example, a first video frame (current video frame) and a second video frame (previous video frame) may be extracted from the target video at a preset time interval, where the time interval may be set to 5 to 10s, and then image feature extraction may be performed on the first video frame and the second video frame by using a resnet50 neural network, so as to obtain a first feature vector of the first video frame and a second feature vector of the second video frame, respectively. And then calculating the cosine distance between the first characteristic vector and the second characteristic vector, discarding the first video frame under the condition that the cosine distance is greater than or equal to the similarity threshold, and taking the next video frame extracted at a preset time interval as the first video frame. And when the cosine distance is smaller than the similarity threshold, reserving the first video frame, taking the first video frame as a second video frame, and extracting the next video frame at a preset time interval to be taken as the first video frame.
Fig. 3 shows a flow diagram of an example of image processing according to an embodiment of the present disclosure, which may include the following steps:
step S301, extracting video frames in a target video at a preset time interval to obtain an extracted current video frame (first video frame) cur _ img;
step S302, determining the similarity between the image characteristics of cur _ img and the image characteristics of base _ img of the second video frame;
step S303, judging whether the determined similarity is smaller than a similarity threshold value;
in step S304, when the determined similarity is greater than or equal to the similarity threshold, cur _ img is discarded, and the process returns to step S301 until the video frames in the target video are extracted.
Step S305, under the condition that the determined similarity is smaller than the similarity threshold, storing cur _ img, setting cur _ img as base _ img, and returning to step S301 until the extraction of the video frames in the target video is finished.
By the image processing scheme provided by the embodiment of the disclosure, the video frames in the target video can be screened, some repeated data frames can be screened out, and the video frames with effective information in the target video can be reserved, so that the processing amount of the video frames can be reduced.
It is understood that the above-mentioned method embodiments of the present disclosure can be combined with each other to form a combined embodiment without departing from the logic of the principle, which is limited by the space, and the detailed description of the present disclosure is omitted.
In addition, the present disclosure also provides an apparatus, an electronic device, a computer-readable storage medium, and a program, which can be used to implement any image processing method provided by the present disclosure, and the corresponding technical solutions and descriptions and corresponding descriptions in the method sections are not repeated.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
Fig. 4 shows a block diagram of an image processing apparatus according to an embodiment of the present disclosure, which includes, as shown in fig. 4:
an extraction module 41, configured to perform video frame extraction on a target video to obtain a first video frame;
a determining module 42, configured to determine a similarity between the first video frame and the second video frame according to an image feature of the first video frame and an image feature of the second video frame; the second video frame is a video frame to be processed before the first video frame in the target video;
a processing module 43, configured to process the first video frame if the similarity is smaller than a similarity threshold.
In one or more implementations, when the extracting module 41 is configured to extract a video frame of a target video to obtain a first video frame, the extracting module includes: and extracting a video frame which is separated from the second video frame by a preset time interval in the target video to be used as the first video frame.
In one or more implementations, the determining module 42 includes:
the first determining submodule is used for determining a first feature vector of the first video frame according to the image feature of the first video frame;
the second determining submodule is used for determining a second feature vector of the second video frame according to the image feature of the second video frame;
and the third determining submodule is used for determining the similarity of the first video frame and the second video frame according to the distance between the first feature vector and the second feature vector.
In one or more implementations, the processing module 43 is further configured to not process the first video frame if the similarity is greater than or equal to the similarity threshold.
In one or more implementations, the extracting module 41 is further configured to, when the similarity is greater than or equal to the similarity threshold, extract a video frame that is after the first video frame in the target video and is separated from the first video frame by a preset time interval, and obtain the first video frame again.
In one or more implementations, the extracting module 41 is further configured to, in a case that the similarity is smaller than a similarity threshold, take the first video frame as the second video frame; and extracting video frames which are arranged behind the second video frame in the target video and separated from the second video frame by a preset time interval, and obtaining the first video frame again.
In some embodiments, functions of or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the method described in the above method embodiments, and specific implementation thereof may refer to the description of the above method embodiments, and for brevity, will not be described again here.
An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured as the above method.
The electronic device may be provided as a terminal, server, or other form of device.
Fig. 5 illustrates a block diagram of an electronic device 800 in accordance with an embodiment of the disclosure. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like terminal.
Referring to fig. 5, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 800 is in an operation mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the electronic device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a Complementary Metal Oxide Semiconductor (CMOS) or Charge Coupled Device (CCD) image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as a wireless network (WiFi), a second generation mobile communication technology (2G) or a third generation mobile communication technology (3G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium, such as the memory 804, is also provided that includes computer program instructions executable by the processor 820 of the electronic device 800 to perform the above-described methods.
Fig. 6 illustrates a block diagram of an electronic device 1900 in accordance with an embodiment of the disclosure. For example, the electronic device 1900 may be provided as a server. Referring to fig. 6, electronic device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
The electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input/output (I/O) interface 1958. The electronic device 1900 may operate based on an operating system, such as the Microsoft Server operating system (Windows Server), stored in the memory 1932TM) Apple Inc. of the present application based on the graphic user interface operating System (Mac OS X)TM) Multi-user, multi-process computer operating system (Unix)TM) Free and open native code Unix-like operating System (Linux)TM) Open native code Unix-like operating System (FreeBSD)TM) Or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium, such as the memory 1932, is also provided that includes computer program instructions executable by the processing component 1922 of the electronic device 1900 to perform the above-described methods.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: 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), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The computer program product may be embodied in hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (14)

1. An image processing method, comprising:
extracting video frames of a target video to obtain a first video frame;
determining the similarity of the first video frame and the second video frame according to the image characteristics of the first video frame and the image characteristics of the second video frame; the second video frame is a video frame to be processed before the first video frame in the target video;
processing the first video frame if the similarity is less than a similarity threshold.
2. The method of claim 1, wherein the performing video frame extraction on the target video to obtain a first video frame comprises:
and extracting a video frame which is separated from the second video frame by a preset time interval in the target video to be used as the first video frame.
3. The method according to claim 1 or 2, wherein determining the similarity between the first video frame and the second video frame according to the image feature of the first video frame and the image feature of the second video frame comprises:
determining a first feature vector of the first video frame according to the image feature of the first video frame;
determining a second feature vector of the second video frame according to the image feature of the second video frame;
and determining the similarity of the first video frame and the second video frame according to the distance between the first feature vector and the second feature vector.
4. A method according to any one of claims 1 to 3, characterized in that the method further comprises:
not processing the first video frame if the similarity is greater than or equal to the similarity threshold.
5. The method of claim 4, further comprising:
and under the condition that the similarity is greater than or equal to the similarity threshold, extracting a video frame which is after the first video frame in the target video and is separated from the first video frame by a preset time interval, and obtaining the first video frame again.
6. The method of claim 1, further comprising:
taking the first video frame as the second video frame if the similarity is smaller than a similarity threshold;
and extracting video frames which are arranged behind the second video frame in the target video and separated from the second video frame by a preset time interval, and obtaining the first video frame again.
7. An image processing apparatus characterized by comprising:
the extraction module is used for extracting video frames of the target video to obtain a first video frame;
the determining module is used for determining the similarity of the first video frame and the second video frame according to the image characteristics of the first video frame and the image characteristics of the second video frame; the second video frame is a video frame to be processed before the first video frame in the target video;
and the processing module is used for processing the first video frame under the condition that the similarity is smaller than a similarity threshold value.
8. The apparatus of claim 7, wherein the extracting module, when configured to perform video frame extraction on the target video to obtain the first video frame, comprises:
and extracting a video frame which is separated from the second video frame by a preset time interval in the target video to be used as the first video frame.
9. The apparatus of claim 7 or 8, wherein the determining module comprises:
the first determining submodule is used for determining a first feature vector of the first video frame according to the image feature of the first video frame;
the second determining submodule is used for determining a second feature vector of the second video frame according to the image feature of the second video frame;
and the third determining submodule is used for determining the similarity of the first video frame and the second video frame according to the distance between the first feature vector and the second feature vector.
10. The apparatus of any of claims 7 to 9, wherein the processing module is further configured to not process the first video frame if the similarity is greater than or equal to the similarity threshold.
11. The apparatus according to claim 10, wherein the extracting module is further configured to extract, if the similarity is greater than or equal to the similarity threshold, a video frame that is separated from the first video frame by a preset time interval after the first video frame in the target video, and retrieve the first video frame.
12. The apparatus of claim 7, wherein the decimation module is further configured to treat the first video frame as the second video frame if the similarity is smaller than a similarity threshold; and extracting video frames which are arranged behind the second video frame in the target video and separated from the second video frame by a preset time interval, and obtaining the first video frame again.
13. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to invoke the memory-stored instructions to perform the method of any of claims 1 to 6.
14. A computer readable storage medium having computer program instructions stored thereon, which when executed by a processor implement the method of any one of claims 1 to 6.
CN202010942059.8A 2020-09-09 2020-09-09 Image processing method and device, electronic equipment and storage medium Pending CN112085097A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010942059.8A CN112085097A (en) 2020-09-09 2020-09-09 Image processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010942059.8A CN112085097A (en) 2020-09-09 2020-09-09 Image processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112085097A true CN112085097A (en) 2020-12-15

Family

ID=73732189

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010942059.8A Pending CN112085097A (en) 2020-09-09 2020-09-09 Image processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112085097A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112911239A (en) * 2021-01-28 2021-06-04 北京市商汤科技开发有限公司 Video processing method and device, electronic equipment and storage medium
CN113923514A (en) * 2021-09-23 2022-01-11 青岛信芯微电子科技股份有限公司 Display device and MEMC (motion estimation and motion estimation) repeated frame discarding method
CN114390330A (en) * 2022-01-12 2022-04-22 中国电信股份有限公司 Image processing method and device, storage medium and electronic equipment
CN115361584A (en) * 2022-08-22 2022-11-18 广东电网有限责任公司 Video data processing method and device, electronic equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109756746A (en) * 2018-12-28 2019-05-14 广州华多网络科技有限公司 Video reviewing method, device, server and storage medium
US20190266409A1 (en) * 2017-12-13 2019-08-29 Beijing Sensetime Technology Development Co., Ltd Methods and apparatuses for recognizing video and training, electronic device and medium
CN110267101A (en) * 2019-07-19 2019-09-20 西安因诺航空科技有限公司 A kind of unmanned plane video based on quick three-dimensional picture mosaic takes out frame method automatically
CN110853033A (en) * 2019-11-22 2020-02-28 腾讯科技(深圳)有限公司 Video detection method and device based on inter-frame similarity
CN111325096A (en) * 2020-01-19 2020-06-23 北京字节跳动网络技术有限公司 Live stream sampling method and device and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190266409A1 (en) * 2017-12-13 2019-08-29 Beijing Sensetime Technology Development Co., Ltd Methods and apparatuses for recognizing video and training, electronic device and medium
CN109756746A (en) * 2018-12-28 2019-05-14 广州华多网络科技有限公司 Video reviewing method, device, server and storage medium
CN110267101A (en) * 2019-07-19 2019-09-20 西安因诺航空科技有限公司 A kind of unmanned plane video based on quick three-dimensional picture mosaic takes out frame method automatically
CN110853033A (en) * 2019-11-22 2020-02-28 腾讯科技(深圳)有限公司 Video detection method and device based on inter-frame similarity
CN111325096A (en) * 2020-01-19 2020-06-23 北京字节跳动网络技术有限公司 Live stream sampling method and device and electronic equipment

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112911239A (en) * 2021-01-28 2021-06-04 北京市商汤科技开发有限公司 Video processing method and device, electronic equipment and storage medium
CN112911239B (en) * 2021-01-28 2022-11-11 北京市商汤科技开发有限公司 Video processing method and device, electronic equipment and storage medium
CN113923514A (en) * 2021-09-23 2022-01-11 青岛信芯微电子科技股份有限公司 Display device and MEMC (motion estimation and motion estimation) repeated frame discarding method
CN113923514B (en) * 2021-09-23 2024-03-01 青岛信芯微电子科技股份有限公司 Display device and MEMC repeated frame discarding method
CN114390330A (en) * 2022-01-12 2022-04-22 中国电信股份有限公司 Image processing method and device, storage medium and electronic equipment
CN115361584A (en) * 2022-08-22 2022-11-18 广东电网有限责任公司 Video data processing method and device, electronic equipment and readable storage medium
CN115361584B (en) * 2022-08-22 2023-10-03 广东电网有限责任公司 Video data processing method and device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN107692997B (en) Heart rate detection method and device
CN111753822A (en) Text recognition method and device, electronic equipment and storage medium
CN110569777B (en) Image processing method and device, electronic device and storage medium
CN112085097A (en) Image processing method and device, electronic equipment and storage medium
CN112465843A (en) Image segmentation method and device, electronic equipment and storage medium
CN110990801B (en) Information verification method and device, electronic equipment and storage medium
CN110781957A (en) Image processing method and device, electronic equipment and storage medium
CN114078118A (en) Defect detection method and device, electronic equipment and storage medium
CN112911239B (en) Video processing method and device, electronic equipment and storage medium
CN111523346B (en) Image recognition method and device, electronic equipment and storage medium
US20210326649A1 (en) Configuration method and apparatus for detector, storage medium
CN109934240B (en) Feature updating method and device, electronic equipment and storage medium
CN109685041B (en) Image analysis method and device, electronic equipment and storage medium
CN109344703B (en) Object detection method and device, electronic equipment and storage medium
CN110633715B (en) Image processing method, network training method and device and electronic equipment
CN112598676B (en) Image segmentation method and device, electronic equipment and storage medium
CN110955800A (en) Video retrieval method and device
CN110929545A (en) Human face image sorting method and device
CN112102300A (en) Counting method and device, electronic equipment and storage medium
CN113506324B (en) Image processing method and device, electronic equipment and storage medium
CN113506325B (en) Image processing method and device, electronic equipment and storage medium
CN110121115B (en) Method and device for determining wonderful video clip
CN110858921A (en) Program video processing method and device
CN114445753A (en) Face tracking recognition method and device, electronic equipment and storage medium
CN111650554A (en) Positioning method and device, electronic equipment and storage medium

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