CN113329175A - Snapshot method, device, electronic device and storage medium - Google Patents

Snapshot method, device, electronic device and storage medium Download PDF

Info

Publication number
CN113329175A
CN113329175A CN202110559272.5A CN202110559272A CN113329175A CN 113329175 A CN113329175 A CN 113329175A CN 202110559272 A CN202110559272 A CN 202110559272A CN 113329175 A CN113329175 A CN 113329175A
Authority
CN
China
Prior art keywords
moving object
image frame
image
quality
frame
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
CN202110559272.5A
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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202110559272.5A priority Critical patent/CN113329175A/en
Publication of CN113329175A publication Critical patent/CN113329175A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • 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/46Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

The application relates to a snapshot method, a snapshot device, an electronic device and a storage medium. The snapshot method comprises the following steps: acquiring an image sequence; carrying out target detection on a moving object in an image sequence to obtain related data of the moving object in each image frame of the image sequence; determining the image quality of the image of the moving object in each image frame of the image sequence according to the related data, and caching the image frame with the optimal image quality in the image of the moving object in each image frame of the image sequence; in case a moving object triggers a preset snap-in condition, the moving object is snapped in an image frame with an optimal image quality. Through the method and the device, the problem of low video snapshot accuracy in the related technology is solved, and the video snapshot accuracy is improved.

Description

Snapshot method, device, electronic device and storage medium
Technical Field
The present application relates to the field of video processing, and in particular, to a snapshot method, apparatus, electronic apparatus, and storage medium.
Background
The video snapshot technology is a relatively common technology in cameras in the industry at present. The current snapshot technology is generally to capture a current picture as an image and store the image when a certain specific trigger condition is met.
In the related technology, the target is captured by a camera for multiple times in a mode of firstly amplifying a certain coefficient, then identifying, then storing the obtained identification result into a storage queue, and finally finding the identification result with the highest confidence score from the queue as a final output result. In the research process, the problems that multiple times of capturing and identification are needed in the mode in the related technology, a large amount of performance is wasted under the condition that the identification function is complex, and the obtained optimal identification result is possibly locally optimal, so that the video capturing accuracy is low are found.
Aiming at the problem of low accuracy of video snapshot in the related technology, no effective solution is provided at present.
Disclosure of Invention
The embodiment provides a snapshot method, a snapshot device, an electronic device and a storage medium, so as to solve the problem of low accuracy of video snapshot in the related art.
In a first aspect, there is provided in this embodiment a snapshot method comprising:
acquiring an image sequence;
carrying out target detection on the moving object in the image sequence to obtain related data of the moving object in each image frame of the image sequence;
determining the image quality of the image of the moving object in each image frame of the image sequence according to the related data, and caching the image frame with the optimal image quality in the image of the moving object in each image frame of the image sequence;
capturing the moving object in an image frame having an optimal image quality in a case where the moving object triggers a preset capturing condition.
In some of these embodiments, determining, from the correlation data, an image quality of the image of the moving object within each image frame of the sequence of images comprises:
acquiring tracking state information of the moving object in a current image frame;
judging whether the moving object exists in the current image frame or not according to the tracking state information;
under the condition that the moving object is judged to be in the current image frame, acquiring the motion state information of the moving object in the current image frame;
judging whether the moving object is in a moving state in the current image frame or not according to the moving state information;
under the condition that the moving object is judged to be in a moving state in the current image frame, acquiring quality evaluation information of the moving object in the current image frame;
determining an image quality of the image of the moving object within the current image frame according to the quality evaluation information, wherein the related data comprises: the tracking state information, the motion state information, and the quality evaluation information.
In some of these embodiments, determining the image quality of the image of the moving object within the current image frame from the quality-assessment information comprises:
acquiring feature point information of the moving object in the current image frame;
determining the integrity of the moving object in the current image frame according to the characteristic point information;
judging whether the integrity of the moving object in the current image frame is greater than a preset integrity;
under the condition that the integrity of the moving object in the current image frame is judged to be greater than the preset integrity, acquiring the characteristic confidence coefficient of the moving object in the current image frame;
determining a quality evaluation score of the moving object in the current image frame according to the characteristic confidence;
determining the image quality of the image of the moving object in the current image frame according to the quality evaluation score, wherein the quality evaluation information comprises: the integrity, the quality assessment score.
In some of these embodiments, buffering an image frame of the moving object's images within each image frame of the image sequence having an optimal image quality comprises:
judging whether the current image frame is the first image frame of the image sequence;
under the condition that the current image frame is judged not to be the first image frame of the image sequence, acquiring the tracking ID of the moving object, and searching out a target image frame from a cache according to the tracking ID;
judging whether the image quality of the moving object in the current image frame is higher than that of the moving object in the target image frame;
and under the condition that the image quality of the moving object in the current image frame is judged to be higher than that of the moving object in the target image frame, caching the current image frame by taking the tracking ID as an index, and releasing the memory of the target image frame.
In some embodiments, in the case that the current image frame is determined to be the first image frame of the image sequence, the method further includes:
and caching the current image frame and the related data of the moving object in the current image frame by taking the tracking ID of the moving object as an index, and adding 1 to the reference count of the current image frame.
In some embodiments, after buffering the current image frame and the data related to the moving object in the current image frame with the tracking ID of the moving object as an index and adding 1 to the reference count of the current image frame, the method further includes:
and releasing the memory of the image frame with the reference count of 0 in the cache.
In some of these embodiments, in the event that the moving object triggers a preset snap-in condition, snapping the moving object in an image frame with optimal image quality comprises:
judging whether the central point of the coordinate position of the detection frame of the moving object reaches a preset central point or not;
and under the condition that the central point of the coordinate position of the detection frame of the moving object reaches a preset central point, judging that the moving object meets the snapshot condition, and snapshotting the moving object in the image frame with the optimal image quality.
In a second aspect, there is provided in the present embodiment a snapshot apparatus including:
the acquisition module is used for acquiring an image sequence;
the detection module is used for carrying out target detection on the moving object in the image sequence to obtain related data of the moving object in each image frame of the image sequence;
a determining module, configured to determine, according to the related data, image quality of the image of the moving object in each image frame of the image sequence, and cache an image frame with optimal image quality in the images of the moving object in each image frame of the image sequence;
and the snapshot module is used for snapping the moving object in the image frame with the optimal image quality under the condition that the moving object triggers the preset snapshot condition.
In a third aspect, in the present embodiment, there is provided an electronic apparatus, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the snapshot method of the first aspect when executing the computer program.
In a fourth aspect, in the present embodiment, there is provided a storage medium having stored thereon a computer program which, when executed by a processor, implements the snap-shot method of the first aspect described above.
Compared with the related art, the snapshot method, the device, the electronic device and the storage medium provided in the embodiment are realized by acquiring an image sequence; carrying out target detection on a moving object in an image sequence to obtain related data of the moving object in each image frame of the image sequence; determining the image quality of the image of the moving object in each image frame of the image sequence according to the related data, and caching the image frame with the optimal image quality in the image of the moving object in each image frame of the image sequence; under the condition that the moving object triggers the preset capturing condition, the moving object is captured in the image frame with the optimal image quality, the problem of low video capturing accuracy in the related technology is solved, and the video capturing accuracy is improved.
The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below to provide a more thorough understanding of the application.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a terminal of the snapshot method of the present embodiment;
fig. 2 is a flowchart of the snapshot method of the present embodiment;
FIG. 3 is a flowchart of the snapshot method of the present preferred embodiment;
fig. 4 is a block diagram of the configuration of the capturing apparatus of the present embodiment.
Detailed Description
For a clearer understanding of the objects, aspects and advantages of the present application, reference is made to the following description and accompanying drawings.
Unless defined otherwise, technical or scientific terms used herein shall have the same general meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The use of the terms "a" and "an" and "the" and similar referents in the context of this application do not denote a limitation of quantity, either in the singular or the plural. The terms "comprises," "comprising," "has," "having," and any variations thereof, as referred to in this application, are intended to cover non-exclusive inclusions; for example, a process, method, and system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or modules, but may include other steps or modules (elements) not listed or inherent to such process, method, article, or apparatus. Reference throughout this application to "connected," "coupled," and the like is not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. Reference to "a plurality" in this application means two or more. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. In general, the character "/" indicates a relationship in which the objects associated before and after are an "or". The terms "first," "second," "third," and the like in this application are used for distinguishing between similar items and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the present embodiment may be executed in a terminal, a computer, or a similar computing device. For example, the method is executed on a terminal, and fig. 1 is a block diagram of a hardware structure of the terminal in the snapshot method of this embodiment. As shown in fig. 1, the terminal may include one or more processors 102 (only one shown in fig. 1) and a memory 104 for storing data, wherein the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA. The terminal may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those of ordinary skill in the art that the structure shown in fig. 1 is merely an illustration and is not intended to limit the structure of the terminal described above. For example, the terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 can be used for storing computer programs, for example, software programs and modules of application software, such as a computer program corresponding to the snapshot method in the present embodiment, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the above-mentioned method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. The network described above includes a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
In the present embodiment, a snapshot method is provided, and fig. 2 is a flowchart of the snapshot method of the present embodiment, as shown in fig. 2, the flowchart includes the following steps:
step S201, an image sequence is acquired.
In this step, the image sequence may be acquired in real time by the imaging apparatus, or may be acquired from a database in which the image sequence is stored.
It should be noted that the image sequence may refer to an image sequence in which a certain moving object is captured by an imaging apparatus within a certain period of time.
Step S202, performing target detection on the moving object in the image sequence, and obtaining related data of the moving object in each image frame of the image sequence.
In this step, target detection of the moving object in the image sequence may be implemented by some target detection methods, so as to obtain related data of the moving object in each image frame of the image sequence.
It should be noted that the moving object may be a person, a car, an animal, or the like. The method for detecting the moving object can realize detection through a deep learning model which is trained in advance and has certain accuracy, so that the accuracy of the acquired related data is improved.
Step S203 determines the image quality of the image of the moving object in each image frame of the image sequence according to the correlation data, and buffers the image frame having the optimal image quality among the images of the moving object in each image frame of the image sequence.
In this step, based on the correlation data detected in step S202, the image quality of the image of the moving object in each image frame of the image sequence is determined, and the image frame with the optimal image quality in the image of the moving object in each image frame of the image sequence is buffered, so that the image frame with the optimal image quality is buffered, so that the snapshot is performed according to the image frame with the optimal image quality in step S204, and the effect of reducing the number of times of snapshot is achieved.
And step S204, capturing the moving object in the image frame with the optimal image quality under the condition that the moving object triggers the preset capturing condition.
In this step, when the moving object triggers the preset capturing condition, the capturing area corresponding to the image frame with the optimal image quality can be identified in an image identification mode for capturing.
In order to further improve the image quality, the image after being captured may be subjected to image enhancement and structured information identification.
Based on the above steps S201 to S204, when the moving object triggers the preset capturing condition, the problem of low video capturing accuracy due to the existence of an optimal result after multiple capturing in the related art is solved by selecting the moving object from the image frame with the optimal image quality in a manner of capturing the moving object in the image sequence, and the video capturing accuracy is improved.
In the embodiment, the image capturing quality of the moving object is improved and the times of image capturing and identification are reduced by selecting the image frame with the optimal image quality from the image sequence to capture the moving object.
In some of these embodiments, determining, from the correlation data, an image quality of an image of the moving object within each image frame of the sequence of images comprises: acquiring tracking state information of a moving object in a current image frame; judging whether the moving object exists in the current image frame or not according to the tracking state information; under the condition that the moving object is judged to be in the current image frame, acquiring the motion state information of the moving object in the current image frame; judging whether the moving object is in a moving state in the current image frame or not according to the moving state information; under the condition that the moving object is judged to be in a moving state in the current image frame, acquiring quality evaluation information of the moving object in the current image frame; determining the image quality of the image of the moving object in the current image frame according to the quality evaluation information, wherein the related data comprises: tracking state information, motion state information, quality evaluation information.
In this embodiment, the tracking status information may be used to determine the tracking status of the moving object, for example, may be used to indicate that the moving object disappears or is lost, or may indicate that the moving object appears or is updated. The motion state may be used to indicate whether a moving object is stationary or moving. The quality assessment information may be used to represent a quality assessment score for the moving object. The image quality of the moving object can be more accurately determined through the tracking state information, the moving state information and the quality evaluation information, and the image quality of the moving object which is captured subsequently can be improved conveniently.
In some embodiments, in the case that it is determined that the moving object is not present in the current image frame, or in the case that it is determined that the moving object is not in a moving state in the current image frame, the memory of the image frame may also be released, so as to reduce the occupation of the buffer resource by the image frame.
In some of these embodiments, determining the image quality of the image of the moving object within the current image frame from the quality-assessment information comprises: acquiring feature point information of a moving object in a current image frame; determining the integrity of the moving object in the current image frame according to the characteristic point information; judging whether the integrity of the moving object in the current image frame is greater than a preset integrity; under the condition that the integrity of the moving object in the current image frame is judged to be greater than the preset integrity, acquiring the characteristic confidence of the moving object in the current image frame; determining the quality evaluation score of the moving object in the current image frame according to the characteristic confidence coefficient; determining the image quality of the image of the moving object in the current image frame according to the quality evaluation score, wherein the quality evaluation information comprises: integrity and quality evaluation score.
In this embodiment, the quality evaluation score of the moving object in the current image frame is determined by the integrity and the quality evaluation score of the moving object in the current image frame, so that the image frames with high quality can be further screened, and the beneficial effect of improving the quality of the snapshot image is achieved.
It should be noted that, according to the feature confidence, the quality evaluation score of the moving object in the current image frame may be determined in such a manner that the higher the feature confidence is, the higher the corresponding quality evaluation score is.
In some of these embodiments, buffering an image frame of the image having the best image quality of the images of the moving object within each image frame of the image sequence comprises: judging whether the current image frame is the first image frame of the image sequence; under the condition that the current image frame is judged not to be the first image frame of the image sequence, acquiring the tracking ID of the moving object, and searching out the target image frame from the cache according to the tracking ID; judging whether the image quality of the moving object in the current image frame is higher than that of the moving object in the target image frame; and under the condition that the image quality of the moving object in the current image frame is judged to be higher than that of the moving object in the target image frame, caching the current image frame by taking the tracking ID as an index, and releasing the memory of the target image frame.
In the embodiment, in the case that the current image frame is judged not to be the first image frame of the image sequence and in the case that the image quality of the moving object in the current image frame is judged to be higher than that of the moving object in the target image frame, the current image frame is cached by using the tracking ID as an index, and the memory of the target image frame is released, so that the caching of the image frame with the optimal quality and the true release of the image with the non-optimal quality are realized.
In some embodiments, in the case that the current image frame is determined to be the first image frame of the image sequence, the tracking ID of the moving object may be used as an index to buffer the current image frame and the related data of the moving object in the current image frame, and the reference count of the current image frame may be increased by 1.
In this embodiment, when it is determined that the current image frame is the first image frame of the image sequence, the reference count of the current image frame is increased by 1, so that the subsequent deletion of the corresponding image frame according to the reference count can be avoided, and the effect of reducing the occupation of the buffer resources is achieved.
In some embodiments, after the tracking ID of the moving object is used as an index to buffer the current image frame and the data related to the moving object in the current image frame, and the reference count of the current image frame is increased by 1, the memory of the image frame with the reference count of 0 in the buffer may also be released.
In this embodiment, the occupation of cache resources can be reduced by releasing the memory referencing the image with the count of 0.
In some of these embodiments, in the event that the moving object triggers the preset snap-in condition, snapping the moving object in the image frame with the optimal image quality comprises: judging whether the central point of the coordinate position of the detection frame of the moving object reaches a preset central point or not; and under the condition that the central point of the coordinate position of the detection frame of the moving object reaches the preset central point, judging that the moving object meets the snapshot condition, and snapshotting the moving object in the image frame with the optimal image quality.
In this embodiment, the preset central point can be set according to the actual needs of the user, or set according to the camera device, and by this means, the capturing condition of the moving object is provided, and the quality of video capturing is further improved.
The present embodiment is described and illustrated below by means of preferred embodiments.
Fig. 3 is a flowchart of the snapshot method of the present preferred embodiment. As shown in fig. 3, the process includes:
in step S301, based on the deep learning model for detection, data related to a moving object in a current image frame of an image sequence is acquired.
In this step, the deep learning model may be for presetting. The related data comprises tracking state information, motion state information and quality evaluation information. The quality evaluation information includes: integrity and quality evaluation score.
In this step, the index and the parameter information of the moving object are in a one-to-one correspondence relationship. In addition, in this embodiment, the reference count of the first target frame may be increased by 1. The target motion state information S is divided into a motion state and a static state, and the quality evaluation information P comprises a target quality score and a target integrity.
Step S302, determining whether the moving object exists in the current target frame according to the tracking state information, if so, executing step S303, and if not, executing step S301.
Step S303, determining whether the moving object is in a static state in the current target frame according to the moving state information, if yes, performing step S301, and if no, performing step S304.
Based on steps S302 and S303, determining the state of target tracking, and if the target is in a non-existing (lost) state, indicating that the current frame of the moving object has no detection result or disappears, waiting for the arrival of the target of the next frame; conversely, the target state is the present (or update) state.
If the target appears for the first time, inserting the target into an information queue Q, and adding 1 to the reference count of the current frame; if the index of the tracking ID corresponding to the moving object is found from the information queue Q, judging whether the moving object moves and is complete, if the target is static or incomplete, waiting for the arrival of the moving object of the next frame, and otherwise, judging the target evaluation score and the target evaluation score in the queue Q.
Step S304, determining whether the integrity of the moving object in the current target frame is greater than a preset integrity, if so, performing step S305, and if not. Step S301 is executed.
Step S305, determining whether the current image frame is the first image frame of the image sequence, if not, executing step S306, and if so, executing step S310.
It should be noted that the first image frame may represent the first frame of the image sequence. The determination method may be that whether there is an image frame with the same tracking ID is searched from the cache by using the tracking ID of the moving object, and if so, the image frame is not the first image frame.
Step S306, determining whether the image quality of the moving object in the current image frame is higher than the image quality of the moving object in the target image frame, if so, executing step S307, and if not, executing step S301.
It should be noted that the target image frame may be an image frame that is buffered in the buffer and has the same tracking ID as the current image frame.
Step S307, the image quality of the target image frame in the buffer is updated based on the current image frame, and the reference count of the current image frame is increased by 1 and the reference count of the target image frame is decreased by 1.
Step S308, determining whether the moving object meets the snapshot condition, if yes, executing step S309, and if no, executing step 301.
And step S309, according to the tracking ID of the moving object triggering snapshot, searching the tracking ID index from the cache and outputting the moving object in the image frame with the optimal quality for snapshot.
Step S310, the current image frame and the corresponding related data are buffered, and the reference count of the current image frame is increased by 1 in the buffer.
Based on steps S307 and S310, it is determined whether the moving object meets the snapshot condition, if the moving object meets the snapshot condition, corresponding target information is indexed in the cache according to the tracking ID of the snapshot moving object, where the target information includes position information of the moving object in the current image frame and frame information of the current image frame, and then the optimal snapshot target information is output. And if the target does not meet the snapshot condition, waiting for the arrival of the target of the next frame. When the reference count of the frame is 0, the frame memory information is released. The snapshot condition may be triggered by whether a central point of the coordinate position of the target detection frame reaches a set virtual snapshot area.
Through the steps, the embodiment provides a snapshot method, and when the snapshot condition is met, the optimal snapshot frame corresponding to the moving object from appearance to disappearance is output. The method comprises the steps of acquiring a target information frame of which the state of each frame of cache moving object is moving and the quality evaluation information is highest by utilizing the detection, tracking ID and the quality evaluation information of each frame of target, outputting the target information frame from a cache when snapshot is triggered, wherein the target position corresponding to the cache frame is an optimal region, and then performing image enhancement and structural information identification acquisition on the target region, so that the times of snapshot and identification can be effectively reduced, and an optimal identification result can be obtained.
In this embodiment, a snapshot apparatus is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, which have already been described and are not described again. The terms "module," "unit," "subunit," and the like as used below may implement a combination of software and/or hardware for a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 4 is a block diagram of the configuration of the capturing apparatus of the present embodiment, and as shown in fig. 4, the apparatus includes:
an acquisition module 41 for acquiring a sequence of images;
a detection module 42, coupled to the acquisition module 41, configured to perform target detection on a moving object in the image sequence, and obtain related data of the moving object in each image frame of the image sequence;
a determining module 43, coupled to the detecting module 42, for determining an image quality of the image of the moving object within each image frame of the image sequence according to the related data, and buffering an image frame with an optimal image quality among the images of the moving object within each image frame of the image sequence;
a capturing module 44, coupled to the determining module 43, for capturing the moving object in the image frame with the optimal image quality in case the moving object triggers a preset capturing condition.
In some of these embodiments, the determining module 43 includes: the first acquisition unit is used for acquiring tracking state information of a moving object in a current image frame; a first judgment unit for judging whether the moving object exists in the current image frame according to the tracking state information; the second acquisition unit is used for acquiring the motion state information of the motion object in the current image frame under the condition that the motion object is judged to be in the current image frame; the second judging unit is used for judging whether the moving object is in a moving state in the current image frame according to the moving state information; the third acquisition unit is used for acquiring the quality evaluation information of the moving object in the current image frame under the condition that the moving object is judged to be in a moving state in the current image frame; the determination unit determines image quality of an image of a moving object within a current image frame based on the quality evaluation information, wherein the related data includes: tracking state information, motion state information, quality evaluation information.
In some of these embodiments, the determining unit comprises: the first acquisition subunit is used for acquiring the characteristic point information of the moving object in the current image frame; the first determining subunit is used for determining the integrity of the moving object in the current image frame according to the characteristic point information; the judging subunit is used for judging whether the integrity of the moving object in the current image frame is greater than the preset integrity; the second obtaining subunit is configured to obtain a feature confidence of the moving object in the current image frame when it is determined that the integrity of the moving object in the current image frame is greater than the preset integrity; the second determining subunit is used for determining the quality evaluation score of the moving object in the current image frame according to the characteristic confidence coefficient; a third determining subunit, configured to determine, according to the quality evaluation score, image quality of an image of the moving object within the current image frame, where the quality evaluation information includes: integrity and quality evaluation score.
In some of these embodiments, the determining module 43 further includes: the third judging unit is used for judging whether the current image frame is the first image frame of the image sequence; the fourth acquisition unit is used for acquiring the tracking ID of the moving object under the condition that the current image frame is judged not to be the first image frame of the image sequence, and searching the target image frame from the cache according to the tracking ID; the fourth judging unit is used for judging whether the image quality of the moving object in the current image frame is higher than that of the moving object in the target image frame; and the buffer unit is used for buffering the current image frame by taking the tracking ID as an index and releasing the memory of the target image frame under the condition that the image quality of the moving object in the current image frame is judged to be higher than that of the moving object in the target image frame.
In some of these embodiments, the apparatus further comprises: and the buffer module is used for buffering the current image frame and the related data of the moving object in the current image frame by taking the tracking ID of the moving object as an index, and adding 1 to the reference count of the current image frame.
In some of these embodiments, the apparatus further comprises: and the releasing module is used for releasing the memory of the image frame with the reference count of 0 in the cache.
In some of these embodiments, the snapshot module 44 includes: the fifth judging unit is used for judging whether the central point of the coordinate position of the detection frame of the moving object reaches the preset central point or not; and the snapshot unit is used for judging that the moving object meets the snapshot condition under the condition that the central point of the coordinate position of the detection frame of the moving object reaches the preset central point, and snappingthe moving object in the image frame with the optimal image quality.
The above modules may be functional modules or program modules, and may be implemented by software or hardware. For a module implemented by hardware, the modules may be located in the same processor; or the modules can be respectively positioned in different processors in any combination.
There is also provided in this embodiment an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
step S201, an image sequence is acquired.
Step S202, performing target detection on the moving object in the image sequence, and obtaining related data of the moving object in each image frame of the image sequence.
Step S203 determines the image quality of the image of the moving object in each image frame of the image sequence according to the correlation data, and buffers the image frame having the optimal image quality among the images of the moving object in each image frame of the image sequence.
And step S204, capturing the moving object in the image frame with the optimal image quality under the condition that the moving object triggers the preset capturing condition.
It should be noted that, for specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments and optional implementations, and details are not described again in this embodiment.
In addition, in combination with the snapshot method provided in the above embodiment, a storage medium may also be provided to implement in this embodiment. The storage medium having stored thereon a computer program; the computer program, when executed by a processor, implements any of the snap-taking methods of the above embodiments.
It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to be limiting. All other embodiments, which can be derived by a person skilled in the art from the examples provided herein without any inventive step, shall fall within the scope of protection of the present application.
It is obvious that the drawings are only examples or embodiments of the present application, and it is obvious to those skilled in the art that the present application can be applied to other similar cases according to the drawings without creative efforts. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
The term "embodiment" is used herein to mean that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is to be expressly or implicitly understood by one of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the patent protection. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A snapshot method, comprising:
acquiring an image sequence;
carrying out target detection on the moving object in the image sequence to obtain related data of the moving object in each image frame of the image sequence;
determining the image quality of the image of the moving object in each image frame of the image sequence according to the related data, and caching the image frame with the optimal image quality in the image of the moving object in each image frame of the image sequence;
capturing the moving object in an image frame having an optimal image quality in a case where the moving object triggers a preset capturing condition.
2. The snap-shot method according to claim 1, characterized in that determining, from said correlation data, the image quality of the image of said moving object within each image frame of said image sequence comprises:
acquiring tracking state information of the moving object in a current image frame;
judging whether the moving object exists in the current image frame or not according to the tracking state information;
under the condition that the moving object is judged to be in the current image frame, acquiring the motion state information of the moving object in the current image frame;
judging whether the moving object is in a moving state in the current image frame or not according to the moving state information;
under the condition that the moving object is judged to be in a moving state in the current image frame, acquiring quality evaluation information of the moving object in the current image frame;
determining an image quality of the image of the moving object within the current image frame according to the quality evaluation information, wherein the related data comprises: the tracking state information, the motion state information, and the quality evaluation information.
3. The snap-shot method according to claim 2, wherein determining, from the quality evaluation information, an image quality of the image of the moving object within the current image frame comprises:
acquiring feature point information of the moving object in the current image frame;
determining the integrity of the moving object in the current image frame according to the characteristic point information;
judging whether the integrity of the moving object in the current image frame is greater than a preset integrity;
under the condition that the integrity of the moving object in the current image frame is judged to be greater than the preset integrity, acquiring the characteristic confidence coefficient of the moving object in the current image frame;
determining a quality evaluation score of the moving object in the current image frame according to the characteristic confidence;
determining the image quality of the image of the moving object in the current image frame according to the quality evaluation score, wherein the quality evaluation information comprises: the integrity, the quality assessment score.
4. The snap-shot method according to claim 1, wherein buffering an image frame with the best image quality among the images of the moving object within each image frame of the image sequence comprises:
judging whether the current image frame is the first image frame of the image sequence;
under the condition that the current image frame is judged not to be the first image frame of the image sequence, acquiring the tracking ID of the moving object, and searching out a target image frame from a cache according to the tracking ID;
judging whether the image quality of the moving object in the current image frame is higher than that of the moving object in the target image frame;
and under the condition that the image quality of the moving object in the current image frame is judged to be higher than that of the moving object in the target image frame, caching the current image frame by taking the tracking ID as an index, and releasing the memory of the target image frame.
5. The capturing method according to claim 4, wherein in a case where it is determined that the current image frame is the first image frame of the image sequence, the method further comprises:
and caching the current image frame and the related data of the moving object in the current image frame by taking the tracking ID of the moving object as an index, and adding 1 to the reference count of the current image frame.
6. The capturing method according to claim 5, wherein after buffering the current image frame and the data related to the moving object in the current image frame with the tracking ID of the moving object as an index and adding 1 to the reference count of the current image frame, the method further comprises:
and releasing the memory of the image frame with the reference count of 0 in the cache.
7. The capturing method according to claim 5, wherein capturing the moving object in an image frame having an optimal image quality in a case where the moving object triggers a preset capturing condition includes:
judging whether the central point of the coordinate position of the detection frame of the moving object reaches a preset central point or not;
and under the condition that the central point of the coordinate position of the detection frame of the moving object reaches a preset central point, judging that the moving object meets the snapshot condition, and snapshotting the moving object in the image frame with the optimal image quality.
8. A snapshot apparatus, comprising:
the acquisition module is used for acquiring an image sequence;
the detection module is used for carrying out target detection on the moving object in the image sequence to obtain related data of the moving object in each image frame of the image sequence;
a determining module, configured to determine, according to the related data, image quality of the image of the moving object in each image frame of the image sequence, and cache an image frame with optimal image quality in the images of the moving object in each image frame of the image sequence;
and the snapshot module is used for snapping the moving object in the image frame with the optimal image quality under the condition that the moving object triggers the preset snapshot condition.
9. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and the processor is configured to execute the computer program to perform the snap-shot method of any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the snap-shot method according to any one of claims 1 to 7.
CN202110559272.5A 2021-05-21 2021-05-21 Snapshot method, device, electronic device and storage medium Pending CN113329175A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110559272.5A CN113329175A (en) 2021-05-21 2021-05-21 Snapshot method, device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110559272.5A CN113329175A (en) 2021-05-21 2021-05-21 Snapshot method, device, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN113329175A true CN113329175A (en) 2021-08-31

Family

ID=77416236

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110559272.5A Pending CN113329175A (en) 2021-05-21 2021-05-21 Snapshot method, device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN113329175A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114359875A (en) * 2022-03-17 2022-04-15 成都考拉悠然科技有限公司 Vehicle effective snapshot method and system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160292865A1 (en) * 2015-04-02 2016-10-06 Sportvision, Inc. Automated framing and selective discard of parts of high resolution videos of large event space
US20170289144A1 (en) * 2016-04-04 2017-10-05 Mircea Ionita Methods and systems for authenticating users
CN109040605A (en) * 2018-11-05 2018-12-18 北京达佳互联信息技术有限公司 Shoot bootstrap technique, device and mobile terminal and storage medium
CN111161206A (en) * 2018-11-07 2020-05-15 杭州海康威视数字技术股份有限公司 Image capturing method, monitoring camera and monitoring system
CN111163259A (en) * 2018-11-07 2020-05-15 杭州海康威视数字技术股份有限公司 Image capturing method, monitoring camera and monitoring system
CN111968378A (en) * 2020-07-07 2020-11-20 浙江大华技术股份有限公司 Motor vehicle red light running snapshot method and device, computer equipment and storage medium
CN112215156A (en) * 2020-10-13 2021-01-12 北京中电兴发科技有限公司 Face snapshot method and system in video monitoring
CN112767711A (en) * 2021-01-27 2021-05-07 湖南优美科技发展有限公司 Multi-class multi-scale multi-target snapshot method and system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160292865A1 (en) * 2015-04-02 2016-10-06 Sportvision, Inc. Automated framing and selective discard of parts of high resolution videos of large event space
US20170289144A1 (en) * 2016-04-04 2017-10-05 Mircea Ionita Methods and systems for authenticating users
CN109040605A (en) * 2018-11-05 2018-12-18 北京达佳互联信息技术有限公司 Shoot bootstrap technique, device and mobile terminal and storage medium
CN111161206A (en) * 2018-11-07 2020-05-15 杭州海康威视数字技术股份有限公司 Image capturing method, monitoring camera and monitoring system
CN111163259A (en) * 2018-11-07 2020-05-15 杭州海康威视数字技术股份有限公司 Image capturing method, monitoring camera and monitoring system
CN111968378A (en) * 2020-07-07 2020-11-20 浙江大华技术股份有限公司 Motor vehicle red light running snapshot method and device, computer equipment and storage medium
CN112215156A (en) * 2020-10-13 2021-01-12 北京中电兴发科技有限公司 Face snapshot method and system in video monitoring
CN112767711A (en) * 2021-01-27 2021-05-07 湖南优美科技发展有限公司 Multi-class multi-scale multi-target snapshot method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
王俊友: "《智能交通系统及应用》", 哈尔滨工业大学出版社, pages: 116 - 119 *
陈芳烈,崔金泰,周日新: "《中国少年儿童科学阅读 中国科普精品书系 交通》", 31 August 2012, pages: 1 - 3 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114359875A (en) * 2022-03-17 2022-04-15 成都考拉悠然科技有限公司 Vehicle effective snapshot method and system
CN114359875B (en) * 2022-03-17 2022-05-17 成都考拉悠然科技有限公司 Vehicle effective snapshot method and system

Similar Documents

Publication Publication Date Title
CN108200134B (en) Request message management method and device, and storage medium
US11030802B2 (en) Dynamic map update device, dynamic map update method, and non-transitory computer readable medium recording dynamic map update program
CN106407984B (en) Target object identification method and device
CN112154669B (en) Correlation of video stream frame timestamps based on system clock
EP3461136B1 (en) Video playing method and device
CN110009004B (en) Image data processing method, computer device, and storage medium
CN110263680B (en) Image processing method, device and system and storage medium
CN109726678B (en) License plate recognition method and related device
CN109151216B (en) Application starting method, mobile terminal, server and computer readable storage medium
CN109729061B (en) Message processing method, device, equipment and readable storage medium
CN105338564B (en) A kind of client adaptation method, client, server and system
EP3416130B1 (en) Method, device and nonvolatile computer-readable medium for image composition
US10853829B2 (en) Association method, and non-transitory computer-readable storage medium
CN111065044B (en) Big data based data association analysis method and device and computer storage medium
CN111047622B (en) Method and device for matching objects in video, storage medium and electronic device
CN113329175A (en) Snapshot method, device, electronic device and storage medium
CN111126159A (en) Method, apparatus, electronic device, and medium for tracking pedestrian in real time
CN112819683B (en) Image processing method, device, computer equipment and storage medium
CN109726726B (en) Event detection method and device in video
WO2014176746A1 (en) Method and system for automatically capturing an object using a mobile terminal
CN111263118A (en) Image acquisition method and device, storage medium and electronic device
CN113271228B (en) Bandwidth resource scheduling method, device, equipment and computer readable storage medium
CN109413592B (en) Broadcasting method and mobile terminal
US11120251B2 (en) Face capturing method and related apparatus
CN108256541B (en) License plate identification recognition method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210831

RJ01 Rejection of invention patent application after publication