WO2020098325A1 - 一种图像合成方法、电子设备及存储介质 - Google Patents

一种图像合成方法、电子设备及存储介质 Download PDF

Info

Publication number
WO2020098325A1
WO2020098325A1 PCT/CN2019/101436 CN2019101436W WO2020098325A1 WO 2020098325 A1 WO2020098325 A1 WO 2020098325A1 CN 2019101436 W CN2019101436 W CN 2019101436W WO 2020098325 A1 WO2020098325 A1 WO 2020098325A1
Authority
WO
WIPO (PCT)
Prior art keywords
sequence set
image
image sequence
frame
target
Prior art date
Application number
PCT/CN2019/101436
Other languages
English (en)
French (fr)
Inventor
魏祺
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2020098325A1 publication Critical patent/WO2020098325A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30241Trajectory

Definitions

  • the present invention requires the priority of the Chinese patent application filed on November 14, 2018 in the Chinese Patent Office with the application number 201811354312.7 and the invention titled "An Image Synthesis Method, Electronic Equipment, and Storage Media”. The reference is incorporated in the present invention.
  • the embodiments of the present invention relate to the technical field of image processing, and in particular, to an image synthesis method, an electronic device, and a storage medium.
  • multiple frames of original images can be captured by the camera device, image extraction is performed at a fixed number of frames from each of the multiple frames of original images, and then the extracted images are synthesized to obtain a composite image of the moving target, which The image can obtain the trajectory of the moving target.
  • An object of an embodiment of the present invention is to provide an image synthesis method, an electronic device, and a storage medium, so that a complete and trajectory synthesized image of a moving target that meets overlapping requirements can be obtained.
  • embodiments of the present invention provide an image synthesis method including the following steps: filtering out original images containing moving targets from the original image sequence set to obtain a basic frame image sequence set; from the basic frame image sequence set Filter out the original images containing the complete moving target to obtain the effective frame image sequence set; select the original images that meet the target coincidence requirements from the effective frame image sequence set to obtain the preferred image sequence set; obtain the motion of the moving target according to the preferred image sequence set Track synthesis image.
  • Embodiments of the present invention also provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores executable by the at least one processor Instructions, the instructions are executed by the at least one processor, so that the at least one processor can execute the image synthesis method in the embodiments of the present application.
  • Embodiments of the present invention also provide a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, implements the image synthesis method in the embodiments of the present application.
  • FIG. 1 is a flowchart of the image synthesis method in the first embodiment of the present application
  • FIG. 2 is a schematic diagram of determining a target frame area in the first embodiment of the present application
  • FIG. 3 is a schematic diagram of determining the effective frame image sequence set in the first embodiment of the present application.
  • FIG. 5 is a schematic diagram of determining a preferred image sequence set in the second embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of an electronic device in a third embodiment of the present application.
  • the first embodiment of the present invention relates to an image synthesis method.
  • the specific process is shown in Figure 1, including the following steps:
  • Step 101 Filter out original images containing moving targets from the original image sequence set to obtain a basic frame image sequence set.
  • the original image sequence set before filtering out the original image containing the moving target from the original image sequence set, the original image sequence set needs to be obtained first, wherein the original image sequence set includes multiple frames of original images continuously taken at preset intervals .
  • image recognition may be used for detection. Since image detection is not the focus of this application, it will not be described in detail in this embodiment.
  • the target frame area of the original image in the basic frame image sequence set is the minimum value that contains all pixels of the moving target region.
  • FIG. 2 it is a schematic diagram for determining the target frame area.
  • a rectangular frame is used as an example for description.
  • it can also be a round frame or an irregular closed curve frame.
  • the target is not limited in this embodiment. As long as the specific shape of the frame area is the smallest area containing all pixels of the moving target, any shape is within the protection scope of the present application.
  • Step 102 Filter out the original image containing the complete moving target from the basic frame image sequence set to obtain a valid frame image sequence set.
  • the method of obtaining the effective frame image sequence set may be: determining the preview area and boundary margin of the camera device; determining the effective frame area according to the preview area and boundary margin; filtering out the target frame area from the basic frame image sequence set The original image in the effective frame area, to obtain the effective frame image sequence set.
  • FIG. 3 a schematic diagram for determining a set of effective frame image sequences.
  • the preview area of the camera device the upper left corner of the preview area of the camera device is the origin
  • the upper border of the preview area is the x axis
  • the right side of the x axis is the positive direction of the x axis.
  • the left border of the area is the y-axis
  • below the y-axis is the positive direction of the y-axis.
  • the abscissa of the right border of the preview area is subtracted from Dmin to obtain the abscissa of the right border of the effective frame area, and the ordinate of the upper border of the effective frame area and the ordinate of the lower border are greater than 0 and smaller than the ordinate of the lower border of the preview area
  • the vertical coordinate of the upper frame of the effective frame area is smaller than the vertical coordinate of the lower frame of the effective frame area, thereby determining the effective frame area W, deleting the original images in the basic frame image sequence that are not in the effective frame area, and filtering out the effective frames
  • Step 103 Filter out the original images that meet the target coincidence requirement from the effective frame image sequence set to obtain a preferred image sequence set.
  • the effective frame image sequence set ensures that the moving objects in each frame image are complete and there is no incomplete situation, there may be multiple frames of original images overlapping at this time, so .
  • you can filter out the non-overlapping multi-frame original images, and the acquired multi-frame non-overlapping original images constitute the preferred image sequence set, Q ⁇ Q1, Q2, ... , Qs ⁇ , and s ⁇ e.
  • Step 104 Obtain a synthetic image of the movement trajectory of the moving target according to the preferred image sequence set.
  • the moving object in each frame of the preferred image in the preferred image sequence set is extracted, and a motion trajectory composite image is obtained according to each extracted moving object.
  • each frame of the original image in the preferred image sequence set can be image-recognized, so that the moving objects in each frame of the original image are extracted, and each moving object is The extracted sequence is saved in an image in order to obtain a composite image of the motion trajectory of the moving target.
  • the image synthesis method selects the original image containing the moving target from the original image sequence set, and then filters out the original image containing the complete moving target, so as to ensure that the obtained There will be no incomplete motion target in the synthetic picture of the motion track.
  • By filtering out the original image that meets the target coincidence requirement it can further ensure that the composite image meets the user's requirements for the overlapping of the moving target, so as to obtain a complete and satisfactory
  • the image of the trajectory of the moving target required by the overlap is synthesized.
  • the second embodiment of the present invention relates to an image synthesis method.
  • This embodiment is further improved on the basis of the first embodiment, and the specific improvement is that the method for obtaining the preferred image sequence set is specifically described.
  • the flow of the image synthesis method in this embodiment is shown in FIG. 4. Specifically, in this embodiment, steps 201 to 207 are included, where steps 201 to 202 are substantially the same as steps 101 to 102 in the first embodiment, and step 207 is approximately the same as step 104 in the first embodiment The same, no more details here. The following mainly introduces the differences. For the technical details that are not described in detail in this embodiment, please refer to the image synthesis method provided in the first embodiment, which will not be repeated here.
  • step 203 is executed.
  • step 203 the first frame original image in the effective frame image sequence set is used as the first frame preferred image in the preferred image sequence set.
  • the first frame in the set is preferably image Q1.
  • Step 204 Set the pixels of the moving target in the first frame of the preferred image to the selected state.
  • the pixel of the moving target in Q1 can be set to the selected state.
  • the gray value of the pixel of the moving target in Q1 can be set.
  • Transform, through the change of the gray value of the moving target determine that the pixel of the moving target is selected. For example, from a visual point of view of the user's visual effect, the image of the moving target in the selected state is black.
  • Step 205 Remove the first frame of original images from the effective frame image sequence set to filter out the original images that meet the target coincidence requirements.
  • the selection method for the remaining images in the preferred image sequence set is determined according to the target coincidence of each frame of the original image.
  • the specific method may be to determine the effective frame image sequence set except for the first frame of the original image.
  • the target coincidence degree where the target coincidence degree represents the ratio of the number of pixels in the selected state in the target frame area to the total number of pixels; the original image whose target coincidence degree is less than the preset threshold is selected.
  • the filtering out the original image whose target coincidence degree is less than the preset threshold it further includes: setting the pixels of the moving target in the original image whose target coincidence degree is less than the preset threshold to the selected state.
  • the target coincidence in this embodiment can be represented by the letter G
  • the preset threshold is represented by the letter GT
  • GT 0, it means that the moving objects in the original images of adjacent frames are not required to overlap at all.
  • GT is not equal to 0 and the value is relatively small, which means that the moving objects in the original image of the adjacent frame can have a small amount of edge overlap, so the size of the GT can be used to control the degree of overlap between the moving objects in the synthetic image of the moving track , The smaller the GT, the smaller the degree of overlap between moving targets in the synthesized image of the moving track.
  • this embodiment only uses Q2 as an example for description, and the determination method of the remaining images in the preferred image sequence set is similar to that of Q1, and details are not described in this embodiment.
  • step 206 a preferred image sequence set is obtained according to the first frame of the preferred image and the original image that meets the target coincidence requirement.
  • the first frame of the preferred image and the original image that meets the target coincidence requirement are sorted according to the order of acquisition time, and the sorted Of images constitute a preferred set of image sequences.
  • step 207 is executed.
  • the image synthesis method selects the original image containing the moving target from the original image sequence set, and then filters out the original image containing the complete moving target, so as to ensure that the obtained There will be no incomplete motion target in the synthetic picture of the motion track.
  • By filtering out the original image that meets the target coincidence requirement it can further ensure that the composite image meets the user's requirements for the overlapping of the moving target, so that the final complete and satisfactory
  • the image of the trajectory of the moving target required by the overlap is synthesized. And by comparing each frame image in the effective frame image sequence set with a target coincidence degree and a preset threshold, a preferred image sequence set is obtained, thereby further ensuring the accuracy of the images obtained in the preferred image sequence set.
  • a third embodiment of the present invention relates to an electronic device, as shown in FIG. 6, including at least one processor 501; and a memory 502 communicatively connected to the at least one processor 501; wherein the memory 502 stores at least one processor Instructions executed by the processor 501, the instructions are executed by at least one processor 501, so that the at least one processor 501 can execute the image synthesis method in the above embodiment.
  • the processor 501 uses a Central Processing Unit (CPU) as an example, and the memory 502 uses a Random Access Memory (RAM) as an example.
  • the processor 501 and the memory 502 may be connected through a bus or in other ways. In FIG. 5, the connection through a bus is used as an example.
  • the memory 502 is a non-volatile computer-readable storage medium, and can be used to store non-volatile software programs, non-volatile computer executable programs, and modules.
  • the program implementing the image synthesis method in the embodiment of the present application is stored In the memory 502.
  • the processor 501 executes various functional applications and data processing of the device by running non-volatile software programs, instructions, and modules stored in the memory 502, that is, implementing the above-mentioned image synthesis method.
  • the memory 502 may include a storage program area and a storage data area, wherein the storage program area may store an operating system and application programs required by at least one function; the storage data area may store a list of options, and the like.
  • the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
  • the memory 502 may optionally include memories remotely set with respect to the processor 501, and these remote memories may be connected to an external device through a network. Examples of the above network include but are not limited to the Internet, intranet, local area network, mobile communication network, and combinations thereof.
  • One or more program modules are stored in the memory 502, and when executed by one or more processors 501, execute the image synthesis method in any of the above method embodiments.
  • the fourth embodiment of the present application relates to a computer-readable storage medium in which a computer program is stored.
  • the computer program is executed by a processor, the image synthesis method involved in any method embodiment of the present invention can be implemented .
  • the embodiments of the present invention filter out the original images containing the moving target from the original image sequence set, and then filter out the original images containing the complete moving target, so as to ensure the obtained motion track synthesis There will be no incomplete moving target in the picture.
  • By filtering out the original image that meets the target coincidence requirements it can further ensure that the composite image meets the user's requirements for the overlapping of the moving target, so as to finally obtain a complete and meet the overlapping requirements
  • the synthetic image of the moving track of the moving target is compared with the prior art.
  • a storage medium includes several instructions to make a device (may be A single chip microcomputer, a chip, etc.) or a processor (processor) to perform all or part of the steps of the methods described in the embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program code .

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Biophysics (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Genetics & Genomics (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

一种图像合成方法、电子设备及存储介质。包括:从原始图像序列集中筛选出包含运动目标的原始图像,获得基础帧图像序列集;从基础帧图像序列集中筛选出包含完整运动目标的原始图像,获得有效帧图像序列集;从有效帧图像序列集中筛选出满足目标重合度要求的原始图像,获得优选图像序列集;根据优选图像序列集获得运动目标的运动轨迹合成图像。

Description

一种图像合成方法、电子设备及存储介质
交叉引用
本发明要求在2018年11月14日提交中国专利局、申请号为201811354312.7、发明名称为“一种图像合成方法、电子设备及存储介质”的中国专利申请的优先权,该申请的全部内容通过引用结合在本发明中。
技术领域
本发明实施例涉及图像处理技术领域,特别涉及一种图像合成方法、电子设备及存储介质。
背景技术
运动目标活动时可以通过摄像装置拍摄到多帧原始图像,通过从多帧原始图像中每间隔固定帧数进行图像提取,然后将提取出来的图像进行合成,得到运动目标的合成图像,并通过合成图像可以获得运动目标的运动轨迹。
发明人发现现有技术中至少存在如下问题:在运动目标通过恒定长度的摄像装置的预览区域时,由于运动目标的运动速度不同,运动方向也不定,因此所拍摄的多帧原始图像中可能并未包含运动目标,或者存在合成图像中运动目标重叠在一起的情况,从而导致无法看到运动目标清晰的运动轨迹,因此现有技术中的图像合成方法并不能满足用户的需求。
发明内容
本发明实施方式的目的在于提供一种图像合成方法、电子设备及存储介质,使得能够获得完整的且满足重叠性要求的运动目标的运动轨迹合成图像。
为解决上述技术问题,本发明的实施方式提供了一种图像合成方法,包括以下步骤:从原始图像序列集中筛选出包含运动目标的原始图像,获得基 础帧图像序列集;从基础帧图像序列集中筛选出包含完整运动目标的原始图像,获得有效帧图像序列集;从有效帧图像序列集中筛选出满足目标重合度要求的原始图像,获得优选图像序列集;根据优选图像序列集获得运动目标的运动轨迹合成图像。
本发明的实施方式还提供了一种电子设备,包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行本申请实施方式中的图像合成方法。
本发明的实施方式还提供了一种计算机可读存储介质,存储有计算机程序,计算机程序被处理器执行时实现本申请实施方式中的图像合成方法。
附图说明
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。
图1是本申请第一实施例中图像合成方法的流程图;
图2是本申请第一实施例中目标框区域确定示意图;
图3是本申请第一实施例中有效帧图像序列集确定示意图;
图4是本申请第二实施例中图像合成方法的流程图;
图5是本申请第二实施例中优选图像序列集确定示意图;
图6是本申请第三实施例中电子设备的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合附图对本发明的各实施方式进行详细的阐述。然而,本领域的普通技术人员可以理解,在本发明各实施方式中,为了使读者更好地理解本申请而提出了许多 技术细节。但是,即使没有这些技术细节和基于以下各实施方式的种种变化和修改,也可以实现本申请所要求保护的技术方案。
本发明的第一实施方式涉及一种图像合成方法。具体流程如图1所示,包括以下步骤:
步骤101,从原始图像序列集中筛选出包含运动目标的原始图像,获得基础帧图像序列集。
其中,在本实施例中,在从原始图像序列集中筛选出包含运动目标的原始图像之前,需要首先获取原始图像序列集,其中,原始图像序列集中包括按照预设间隔连续拍摄的多帧原始图像。例如,具体获取原始图像序列集的方式可以是保持摄像装置稳定不动,即摄像装置的预览区域维持不变的情况下,点击摄像装置的拍照按键之后,以帧率1/10也就是每间隔0.1秒进行拍摄获得多帧原始图像,从而将按照0.1秒间隔连续拍摄的多帧原始图像构成原始图像序列集A={A1,A2,....,An}。
具体的说,在本实施方式中,所获得的原始图像序列集中可能并不存在运动目标,因此针对原始图像序列集中的每一帧原始图像进行检测,判断是否存在运动目标,当确定原始图像中不存在运动目标时,则将该帧原始图像进行删除,当确定原始图像中存在运动目标时,则将该帧原始图像进行保留,并将所有保留下来的原始图像构成基础帧图像序列集B={B1,B2,....,Bm},并且m≤n,从而保证了基础帧图像序列集中的每一帧图像中都包含运动目标。并且本实施方式中具体可以采用图像识别的方式进行检测,由于图像检测并不是本申请的重点,所以本实施方式不再对其进行赘述。
值得一提的是,在本申请实施方式中,在获得基础帧图像序列集之后,往往需要确定基础帧图像序列集中原始图像的目标框区域,其中,目标框区域为包含运动目标全部像素的最小区域。如图2所示,为目标框区域确定示意图,本实施方式中以矩形框为例进行说明,当然,还可以为圆形框或者为 不规则的封闭曲线框,本实施方式中并不限定目标框区域的具体形状,只要是包含运动目标全部像素的最小区域,任何形状都是在本申请的保护范围内的。
步骤102,从基础帧图像序列集中筛选出包含完整运动目标的原始图像,获得有效帧图像序列集。
具体的说,获得有效帧图像序列集的方式可以为,确定摄像装置的预览区域和边界余量;根据预览区域和边界余量确定有效帧区域;从基础帧图像序列集中筛选出目标框区域位于有效帧区域内的原始图像,获得有效帧图像序列集。从而保证了有效帧图像序列集中每一帧原始图像中的运动目标都是完整的,不存在残缺的情况发生。
在一个具体实现中,如图3所示,为有效帧图像序列集确定示意图。如图中实线框所示为摄像装置的预览区域,以摄像装置的预览区域的左上角为原点,以预览区域的上边框为x轴,并且x轴右侧为x轴正方向,以预览区域的左边框为y轴,并且y轴下方为y轴正方向,确定用户设置的边界余量为Dmin,则将预览区域左边框的横坐标加上Dmin得到有效帧区域左边框的横坐标,将预览区域右边框的横坐标减去Dmin得到有效帧区域右边框的横坐标,而对于有效帧区域上边框的纵坐标和下边框的纵坐标分别是大于0小于预览区域下边框的纵坐标,并且有效帧区域上边框的纵坐标小于有效帧区域下边框的纵坐标,从而确定出有效帧区域W,将基础帧图像序列集中不位于有效帧区域内的原始图像进行删除,筛选出位于有效帧区域W内的原始图像,获得有效帧图像序列集P={P1,P2,....,Pe},并且e≤m。从而实现了有效帧图像序列集中每一帧原始图像中的运动目标都是完整的。
步骤103,从有效帧图像序列集中筛选出满足目标重合度要求的原始图像,获得优选图像序列集。
具体的说,在本实施方式中,有效帧图像序列集中虽然保证了每帧图像 中运动目标都是完整的,不存在残缺的情况,但此时可能会存在多帧原始图像重叠的情况,因此,根据每帧原始图像目标重合度的情况可以筛选出不重叠的多帧原始图像,并将获取的多帧不重叠的原始图像构成优选图像序列集,Q={Q1,Q2,....,Qs},并且s≤e。
步骤104,根据优选图像序列集获得运动目标的运动轨迹合成图像。
具体的说,在本实施方式中,将优选图像序列集合中每一帧优选图像中的运动目标提取出来,根据提取出来的每一个运动目标获得运动轨迹合成图像。
需要说明的是,在获得优选图像序列集后,可以对优选图像序列集中的每一帧原始图像进行图像识别,从而将每一帧原始图像中的运动目标提取出来,并将每一个运动目标按照提取的先后顺序保存在一张图像中,从而获得运动目标的运动轨迹合成图像。
与现有技术相比,本实施方式提供的图像合成方法,从原始图像序列集中筛选出包含运动目标的原始图像,在此基础上再将包含完整运动目标的原始图像筛选出来,从而能够保证获得的运动轨迹合成图片中不会存在运动目标残缺的情况,通过筛选出满足目标重合度要求的原始图像,能够进一步保证合成图像中符合用户对运动目标重叠性的要求,从而最终获得完整的且满足重叠性要求的运动目标的运动轨迹合成图像。
本发明的第二实施方式涉及一种图像合成方法。本实施例在第一实施例的基础上做了进一步改进,具体改进之处为:对获得优选图像序列集的方式进行了具体描述。本实施例中的图像合成方法的流程如图4所示。具体的说,在本实施例中,包括步骤201至步骤207,其中步骤201至步骤202与第一实施方式中的步骤101至步骤102大致相同,步骤207与第一实施方式中的步骤104大致相同,此处不再赘述,下面主要介绍不同之处,未在本实施方式中详尽描述的技术细节,可参见第一实施例所提供的图像合成方法,此处 不再赘述。
在步骤201至步骤202之后,执行步骤203。
步骤203,将有效帧图像序列集中的首帧原始图像,作为优选图像序列集中的首帧优选图像。
具体的说,在本实施方式中,在根据有效图像序列集获得优选图像序列集时,首先确定有效帧图像序列集中的首帧原始图像,因为每一帧原始图像分别是在不同时刻通过拍摄所获得的,所以根据有效帧图像序列集中每一帧原始图像的获取时刻,将其中获取时刻最早的一帧原始图像确定为有效帧图像序列集中的首帧原始图像P1,并将P1作为优选图像序列集中的首帧优选图像Q1。
步骤204,将首帧优选图像中的运动目标的像素设置为选中状态。
其中,在确定了优选图像序列集中的首帧优选图像Q1后,可以将Q1中的运动目标的像素设置为选中状态,例如,在实际应用中,可以将Q1中的运动目标的像素灰度值进行变换,通过运动目标的灰度值的变化,确定将运动目标的像素进行了选中。比如,从用户的视觉效果直观上来看,就是处于选中状态的运动目标的图像呈黑颜色。
步骤205,从有效帧图像序列集中除去首帧原始图像筛选出满足目标重合度要求的原始图像。
具体的说,对于优选图像序列集中其余图像的选择方式则是按照每帧原始图像的目标重合度进行确定,具体方式可以是,确定有效帧图像序列集中除去首帧原始图像外每一帧原始图像的目标重合度,其中,目标重合度表示目标框区域中选中状态的像素个数与总像素个数的比值;筛选出目标重合度小于预设阈值的原始图像。
其中,在筛选出目标重合度小于预设阈值的原始图像之后,还包括:将目标重合度小于预设阈值的原始图像中的运动目标的像素设置为选中状态。
需要说明的是,本实施方式中的目标重合度可以用字母G表示,而预设阈值用字母GT表示,并且GT=0的情况下,表示要求相邻帧原始图像中的运动目标完全不重叠,而GT不等于0并且数值比较小时,表示要求相邻帧原始图像中的运动目标可以有少量边缘的重叠,因此可以通过设置GT的大小可以控制运动轨迹合成图像中运动目标之间的重叠程度,GT越小,表示运动轨迹合成图像中运动目标之间的重叠程度就越小。本实施方式中,以GT=0为例进行说明,即要求运动轨迹合成图像中运动目标之间不存在重叠。
例如,以Q2确定方式为例进行说明,如图5所示为优选图像序列集确定示意图,其中,P1确定为Q1即图中的黑颜色运动目标,P2中的目标重合度G=10%,大于GT,则将P2进行剔除,而P3中的目标重合度G=0,等于GT,则将P3保留,并将P3作为Q2。并且在确定出Q2之后,还需要将Q2中的运动目标的像素设置为选中状态,其具体方式与Q1的设置方式相似,因此本实施方式中不再进行赘述。当然,本实施方式仅是以Q2为例进行说明,对于优选图像序列集中其余图像的确定方式与Q1相似,本实施方式中不再进行赘述。
步骤206,根据首帧优选图像和满足目标重合度要求的原始图像,获得优选图像序列集。
需要说明的是,在确定出首帧优选图像和满足目标重合度要求的原始图像之后,将首帧优选图像和满足目标重合度要求的原始图像按照获取时刻的先后顺序进行排序,并将排序后的图像构成优选图像序列集。
在步骤206后,执行步骤207。
与现有技术相比,本实施方式提供的图像合成方法,从原始图像序列集中筛选出包含运动目标的原始图像,在此基础上再将包含完整运动目标的原始图像筛选出来,从而能够保证获得的运动轨迹合成图片中不会存在运动目标残缺的情况,通过筛选出满足目标重合度要求的原始图像,能够进一步保 证合成图像中符合用户对运动目标重叠性的要求,从而最终获得完整的且满足重叠性要求的运动目标的运动轨迹合成图像。并且通过将有效帧图像序列集中的每帧图像采用目标重合度与预设阈值进行对比的方式,获得优选图像序列集,从而进一步保证优选图像序列集中所获得图像的精确性。
上面各种方法的步骤划分,只是为了描述清楚,实现时可以合并为一个步骤或者对某些步骤进行拆分,分解为多个步骤,只要包括相同的逻辑关系,都在本专利的保护范围内;对算法中或者流程中添加无关紧要的修改或者引入无关紧要的设计,但不改变其算法和流程的核心设计都在该专利的保护范围内。
本发明第三实施方式涉及一种电子设备,如图6所示,包括至少一个处理器501;以及,与至少一个处理器501通信连接的存储器502;其中,存储器502存储有可被至少一个处理器501执行的指令,指令被至少一个处理器501执行,以使至少一个处理器501能够执行上述实施例中的图像合成方法。
本实施例中,处理器501以中央处理器(Central Processing Unit,CPU)为例,存储器502以可读写存储器(Random Access Memory,RAM)为例。处理器501、存储器502可以通过总线或者其他方式连接,图5中以通过总线连接为例。存储器502作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本申请实施例中实现图像合成方法的程序就存储于存储器502中。处理器501通过运行存储在存储器502中的非易失性软件程序、指令以及模块,从而执行设备的各种功能应用以及数据处理,即实现上述图像合成方法。
存储器502可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储选项列表等。此外,存储器可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。 在一些实施例中,存储器502可选包括相对于处理器501远程设置的存储器,这些远程存储器可以通过网络连接至外接设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
一个或者多个程序模块存储在存储器502中,当被一个或者多个处理器501执行时,执行上述任意方法实施例中的图像合成方法。
上述产品可执行本申请实施例所提供的方法,具备执行方法相应的功能模块和有益效果,未在本实施例中详尽描述的技术细节,可参见本申请实施例所提供的方法。
本申请的第四实施方式涉及一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,该计算机程序被处理器执行时能够实现本发明任意方法实施例中涉及的图像合成方法。
本发明实施方式相对于现有技术而言,从原始图像序列集中筛选出包含运动目标的原始图像,在此基础上再将包含完整运动目标的原始图像筛选出来,从而能够保证获得的运动轨迹合成图片中不会存在运动目标残缺的情况,通过筛选出满足目标重合度要求的原始图像,能够进一步保证合成图像中符合用户对运动目标重叠性的要求,从而最终获得完整的且满足重叠性要求的运动目标的运动轨迹合成图像。
本领域技术人员可以理解,实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
本领域的普通技术人员可以理解,上述各实施方式是实现本发明的具体 实施例,而在实际应用中,可以在形式上和细节上对其作各种改变,而不偏离本发明的精神和范围。

Claims (10)

  1. 一种图像合成方法,其特征在于,包括:
    从原始图像序列集中筛选出包含运动目标的原始图像,获得基础帧图像序列集;
    从所述基础帧图像序列集中筛选出包含完整运动目标的原始图像,获得有效帧图像序列集;
    从所述有效帧图像序列集中筛选出满足目标重合度要求的所述原始图像,获得优选图像序列集;
    根据所述优选图像序列集获得所述运动目标的运动轨迹合成图像。
  2. 根据权利要求1所述的图像合成方法,其特征在于,所述从原始图像序列集中筛选出包含运动目标的原始图像,获得基础帧图像序列集之前,还包括:
    获取原始图像序列集,其中,所述原始图像序列集中包括按照预设间隔连续拍摄的多帧原始图像。
  3. 根据权利要求1所述的图像合成方法,其特征在于,所述从所述基础帧图像序列集中筛选出包含完整运动目标的原始图像,获得有效帧图像序列集之前,还包括:
    确定所述基础帧图像序列集中所述原始图像的目标框区域,其中,所述目标框区域为包含所述运动目标全部像素的最小区域。
  4. 根据权利要求3所述的图像合成方法,其特征在于,所述从所述基础帧图像序列集中筛选出包含完整运动目标的原始图像,获得有效帧图像序列集,具体包括:
    确定摄像装置的预览区域和边界余量;
    根据所述预览区域和所述边界余量确定有效帧区域;
    从所述基础帧图像序列集中筛选出所述目标框区域位于所述有效帧区域内的所述原始图像,获得所述有效帧图像序列集。
  5. 根据权利要求4所述的图像合成方法,其特征在于,所述从所述有效帧图像序列集中筛选出满足目标重合度要求的所述原始图像,获得优选图像序列集,具体包括:
    将所述有效帧图像序列集中的首帧原始图像,作为所述优选图像序列集中的首帧优选图像;
    将所述首帧优选图像中的所述运动目标的像素设置为选中状态;
    从所述有效帧图像序列集中除去所述首帧原始图像筛选出满足目标重合度要求的所述原始图像;
    根据所述首帧优选图像和所述满足目标重合度要求的所述原始图像,获得所述优选图像序列集。
  6. 根据权利要求5所述的图像合成方法,其特征在于,所述从所述有效帧图像序列集中除去所述首帧原始图像筛选出满足目标重合度要求的所述原始图像,具体包括:
    确定所述有效帧图像序列集中除去所述首帧原始图像外每一帧所述原始图像的目标重合度,其中,所述目标重合度表示所述目标框区域中选中状态的像素个数与总像素个数的比值;
    筛选出所述目标重合度小于预设阈值的所述原始图像。
  7. 根据权利要求6所述的图像合成方法,其特征在于,所述筛选出所述目标重合度小于预设阈值的所述原始图像之后,还包括:
    将目标重合度小于预设阈值的所述原始图像中的所述运动目标的像素设 置为选中状态。
  8. 根据权利要求1至7任一项所述的图像合成方法,其特征在于,所述根据所述优选图像序列集获得所述运动目标的运动轨迹合成图像,具体包括:
    将所述优选图像序列集合中每一帧所述优选图像中的运动目标提取出来;
    根据提取出来的每一个所述运动目标获得所述运动轨迹合成图像。
  9. 一种电子设备,其特征在于,包括:
    至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如权利要求1至8任一项所述的图像合成方法。
  10. 一种计算机可读存储介质,存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至8任一项所述的图像合成方法。
PCT/CN2019/101436 2018-11-14 2019-08-19 一种图像合成方法、电子设备及存储介质 WO2020098325A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811354312.7A CN111192286A (zh) 2018-11-14 2018-11-14 一种图像合成方法、电子设备及存储介质
CN201811354312.7 2018-11-14

Publications (1)

Publication Number Publication Date
WO2020098325A1 true WO2020098325A1 (zh) 2020-05-22

Family

ID=70710539

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/101436 WO2020098325A1 (zh) 2018-11-14 2019-08-19 一种图像合成方法、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN111192286A (zh)
WO (1) WO2020098325A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111640137A (zh) * 2020-05-31 2020-09-08 石家庄铁道大学 监控视频关键帧评价方法
WO2021243566A1 (zh) * 2020-06-02 2021-12-09 深圳市大疆创新科技有限公司 成像方法、成像装置、计算机可读存储介质
CN114697749A (zh) * 2020-12-28 2022-07-01 北京小米移动软件有限公司 视频剪辑方法、装置,存储介质及电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060092280A1 (en) * 2002-12-20 2006-05-04 The Foundation For The Promotion Of Industrial Science Method and device for tracking moving objects in image
CN102799875A (zh) * 2012-07-25 2012-11-28 华南理工大学 任意手形人手跟踪方法
CN103246922A (zh) * 2013-05-07 2013-08-14 重庆大学 一种视频摘要生成方法
CN107403437A (zh) * 2016-05-19 2017-11-28 上海慧流云计算科技有限公司 机器人跟踪物体的方法、装置及机器人
CN108021848A (zh) * 2016-11-03 2018-05-11 浙江宇视科技有限公司 客流量统计方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060092280A1 (en) * 2002-12-20 2006-05-04 The Foundation For The Promotion Of Industrial Science Method and device for tracking moving objects in image
CN102799875A (zh) * 2012-07-25 2012-11-28 华南理工大学 任意手形人手跟踪方法
CN103246922A (zh) * 2013-05-07 2013-08-14 重庆大学 一种视频摘要生成方法
CN107403437A (zh) * 2016-05-19 2017-11-28 上海慧流云计算科技有限公司 机器人跟踪物体的方法、装置及机器人
CN108021848A (zh) * 2016-11-03 2018-05-11 浙江宇视科技有限公司 客流量统计方法及装置

Also Published As

Publication number Publication date
CN111192286A (zh) 2020-05-22

Similar Documents

Publication Publication Date Title
CN108898567B (zh) 图像降噪方法、装置及系统
US10896493B2 (en) Intelligent identification of replacement regions for mixing and replacing of persons in group portraits
JP6961797B2 (ja) プレビュー写真をぼかすための方法および装置ならびにストレージ媒体
CN110334635B (zh) 主体追踪方法、装置、电子设备和计算机可读存储介质
CN108492287B (zh) 一种视频抖动检测方法、终端设备及存储介质
CN101416219B (zh) 数字图像中的前景/背景分割
US9619696B2 (en) Duplicate reduction for face detection
EP3783564A1 (en) Image processing method, computer readable storage medium, and electronic device
JP7078139B2 (ja) ビデオ安定化方法及び装置、並びに非一時的コンピュータ可読媒体
WO2020098325A1 (zh) 一种图像合成方法、电子设备及存储介质
US11538175B2 (en) Method and apparatus for detecting subject, electronic device, and computer readable storage medium
WO2016127478A1 (zh) 一种图像处理方法、装置和终端
US9412153B2 (en) Using depth for recovering missing information in an image
WO2021082883A1 (zh) 主体检测方法和装置、电子设备、计算机可读存储介质
EP3610453A1 (en) Synthetic long exposure image with optional enhancement using a guide image
US20140153817A1 (en) Patch Size Adaptation for Image Enhancement
WO2021093534A1 (zh) 主体检测方法和装置、电子设备、计算机可读存储介质
CN110796041B (zh) 主体识别方法和装置、电子设备、计算机可读存储介质
WO2020038065A1 (zh) 一种图像处理方法、终端及计算机存储介质
Leal et al. Smartphone camera document detection via Geodesic Object Proposals
WO2015196916A1 (en) Imaging control methods and apparatuses
Patro Design and implementation of novel image segmentation and BLOB detection algorithm for real-time video surveillance using DaVinci processor
CN110223219B (zh) 3d图像的生成方法及装置
CN111126191A (zh) 一种虹膜图像的采集方法、装置及存储介质
JP6661268B2 (ja) 画像処理装置、画像処理方法及びプログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19884492

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 04/10/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19884492

Country of ref document: EP

Kind code of ref document: A1