CN115457448B - Intelligent extraction system for video key frames - Google Patents
Intelligent extraction system for video key frames Download PDFInfo
- Publication number
- CN115457448B CN115457448B CN202211394689.1A CN202211394689A CN115457448B CN 115457448 B CN115457448 B CN 115457448B CN 202211394689 A CN202211394689 A CN 202211394689A CN 115457448 B CN115457448 B CN 115457448B
- Authority
- CN
- China
- Prior art keywords
- contour
- frame
- contours
- image
- sequence
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/40—Scenes; Scene-specific elements in video content
- G06V20/46—Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/28—Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/44—Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
Abstract
Description
技术领域technical field
本发明涉及动漫视频处理技术领域,更具体地说,它涉及一种视频关键帧智能提取系统。The invention relates to the technical field of animation video processing, and more specifically, it relates to an intelligent video key frame extraction system.
背景技术Background technique
动漫视频与普通拍摄的视频在制作方式和素材来源存在较大的差异,动漫视频所包含的内容更加富有想象力,更加超越现实,因此应用于一般视频的基于内容的关键帧提取方法应用于动漫视频的关键帧提取的效果不佳。There is a big difference between animation video and ordinary video in the production method and material source. The content contained in animation video is more imaginative and more beyond reality. Therefore, the content-based key frame extraction method applied to general video is applied to animation Video keyframe extraction doesn't work well.
发明内容Contents of the invention
本发明提供一种视频关键帧智能提取系统,解决相关技术中一般视频的基于内容的关键帧提取方法应用于动漫视频的关键帧效果不佳的技术问题。The invention provides a video key frame intelligent extraction system, which solves the technical problem in the related art that the content-based key frame extraction method of general video is applied to the key frame of animation video and has poor effect.
根据本发明的一个方面,提供了一种视频关键帧智能提取系统,包括:According to one aspect of the present invention, a kind of video key frame intelligent extraction system is provided, comprising:
帧提取模块,其用于从动漫视频中提取帧单元;Frame extraction module, it is used for extracting frame unit from animation video;
预处理模块,其对帧单元的图像进行二值化处理获得二值图像;A preprocessing module, which performs binarization processing on the image of the frame unit to obtain a binary image;
轮廓处理模块,其基于预处理模块获得的二值图像处理获得帧单元的图像的轮廓,一个二值化图像包括一个以上的轮廓,两个轮廓之间不存在相交的像素点;A contour processing module, which obtains the contour of the image of the frame unit based on the binary image processing obtained by the preprocessing module, a binary image includes more than one contour, and there is no intersecting pixel between the two contours;
序列生成模块,其基于帧单元的图像的轮廓将其映射到序列集合;a sequence generation module that maps frame-unit images to sequence collections based on their contours;
第一筛选模块,其用于计算帧单元的图像的轮廓与帧单元的图像边框轮廓之间的距离,删除距离小于第一阈值的帧单元的图像的轮廓,生成第一轮廓集;The first screening module, which is used to calculate the distance between the outline of the image of the frame unit and the outline of the image border of the frame unit, deletes the outline of the image of the frame unit whose distance is less than the first threshold, and generates the first outline set;
第二筛选模块,其用于计算第一轮廓集内的轮廓的距离;a second screening module for calculating distances of contours within the first contour set;
通过以下步骤对第一轮廓集进行整理生成第二轮廓集:The first contour set is sorted to generate the second contour set through the following steps:
步骤S101,从第一轮廓集中生成第一中间集,第一中间集中的轮廓与同一个第一中间集中的一个以上的轮廓的距离小于第二阈值;Step S101, generating a first intermediate set from the first contour set, the distance between the contours in the first intermediate set and more than one contour in the same first intermediate set is less than a second threshold;
步骤S102,对第一中间集进行处理,第一中间集中属于一个动漫剧集的同一集,并且时间值的差值小于第三阈值的轮廓只保留其中一个,所有第一中间集保留的轮廓的集合即为第二轮廓集;Step S102, the first intermediate set is processed, the first intermediate set belongs to the same episode of an animation drama series, and only one of the contours whose time value difference is smaller than the third threshold value is retained, and all the contours retained in the first intermediate set are The set is the second contour set;
第三筛选模块,其基于第二轮廓集生成内层轮廓集和外层轮廓集,内层轮廓集的轮廓所要满足的条件是:The third screening module generates an inner contour set and an outer contour set based on the second contour set, and the conditions to be satisfied by the contour of the inner contour set are:
对于内层轮廓集的一个A轮廓,A轮廓关联的帧单元的图像内存在两个以上的轮廓,并且在该图像内A轮廓的外部存在一个以上的轮廓;For an A contour of the inner contour set, there are more than two contours in the image of the frame unit associated with the A contour, and there are more than one contours outside the A contour in the image;
外层轮廓集的轮廓所要满足的条件是:The conditions to be met by the contours of the outer contour set are:
对于外层轮廓集的一个B轮廓,B轮廓关联的帧单元的图像内存在两个以上的轮廓,并且在该图像内B轮廓的外部不存在轮廓;For a B contour of the outer contour set, there are more than two contours in the image of the frame unit associated with the B contour, and there is no contour outside the B contour in the image;
第一帧单元处理模块,其提取与第二轮廓集关联的帧单元之后生成第一帧集;The first frame unit processing module generates the first frame set after extracting the frame unit associated with the second contour set;
从第一帧集中提取不包含外层轮廓集和内层轮廓集的轮廓的帧单元生成第二帧集;Extracting frame units that do not contain contours of the outer contour set and the inner contour set from the first frame set to generate a second frame set;
从第一帧集中提取不属于第二帧集的帧单元生成第三帧集;Extracting frame units that do not belong to the second frame set from the first frame set to generate a third frame set;
从外层轮廓集中提取满足以下条件的轮廓生成第三轮廓集:Extract the contours satisfying the following conditions from the outer contour set to generate the third contour set:
外层轮廓集中与提取的轮廓的距离小于第六阈值的轮廓的数量大于第五阈值;The number of contours whose distance to the extracted contour is smaller than the sixth threshold in the outer contour set is greater than the fifth threshold;
从内层轮廓集中提取与第三轮廓集的轮廓属于相同的帧单元的图像的轮廓生成第四轮廓集;Extract the outline of the image belonging to the same frame unit as the outline of the third outline set from the inner layer outline set to generate a fourth outline set;
从第四轮廓集中生成小集合,小集合中的轮廓与同一小集合的其他一个以上的轮廓的距离小于第七阈值,且小集合中的轮廓与小集合之外的轮廓的距离大于或等于第七阈值;A small set is generated from the fourth contour set, the distance between the contours in the small set and more than one other contours of the same small set is less than the seventh threshold, and the distance between the contours in the small set and the contours outside the small set is greater than or equal to the first seven thresholds;
第四轮廓集中的每个小集合中随机选择一个轮廓生成第五轮廓集;A profile is randomly selected from each small set in the fourth profile set to generate a fifth profile set;
从第三帧集中提取关联第五轮廓集的轮廓的帧单元生成第四帧集;Extracting frame units associated with contours of the fifth contour set from the third frame set to generate a fourth frame set;
关键帧生成模块,其将第二帧集和第四帧集取并集得到关键帧集,关键帧集中的帧单元即是所提取的关键帧。A key frame generation module, which combines the second frame set and the fourth frame set to obtain a key frame set, and the frame unit in the key frame set is the extracted key frame.
进一步地,轮廓处理模块生成帧单元的图像的轮廓时删除与帧单元的图像边框轮廓的距离小于基准阈值的轮廓,基准阈值小于第一阈值。Further, when the contour processing module generates the contour of the image of the frame unit, the contour whose distance from the border contour of the frame unit of the image is smaller than a reference threshold is deleted, and the reference threshold is smaller than the first threshold.
进一步地,序列生成模块预先将帧单元的图像边框轮廓映射到一个序列集合。Further, the sequence generation module maps the outline of the image frame of the frame unit to a sequence set in advance.
进一步地,一个轮廓的序列集合为A={a1,a2...an};an表示轮廓的一个像素。Further, a sequence set of a contour is A={a 1 ,a 2 ... a n }; a n represents a pixel of the contour.
进一步地,外层轮廓集与内层轮廓集之间不存在交集,外层轮廓集与内层轮廓集的并集小于或等于第二轮廓集。Further, there is no intersection between the outer contour set and the inner contour set, and the union of the outer contour set and the inner contour set is less than or equal to the second contour set.
进一步地,第二筛选模块对第二轮廓集进行进一步处理,包括以下步骤:Further, the second screening module further processes the second contour set, including the following steps:
步骤S201,从第二轮廓集中生成第二中间集,第二中间集中的轮廓与同一个第二中间集中的一个以上的轮廓的距离小于第二阈值;Step S201, generating a second intermediate set from the second contour set, the distance between the contours in the second intermediate set and more than one contour in the same second intermediate set is less than a second threshold;
步骤S202,对第二中间集进行处理,一个第二中间集中只保留一个轮廓;Step S202, process the second intermediate set, and only keep one contour in a second intermediate set;
所有第二中间集中保留的轮廓的集合作为新的第二轮廓集。The set of all the remaining contours in the second intermediate set is used as the new second contour set.
进一步地,步骤S102中的时间值的差值小于1s。Further, the difference between the time values in step S102 is less than 1s.
进一步地,第一筛选模块和第二筛选模块计算轮廓的距离的方法包括:Further, the method for calculating the distance between the first screening module and the second screening module includes:
计算两个轮廓序列集合的序列单元之间的距离获得第一距离矩阵;Calculate the distance between the sequence units of the two contour sequence sets to obtain the first distance matrix;
第一距离矩阵的元素uij表示一个轮廓的序列集合的第i个序列单元与另一个轮廓的序列集合的第j个序列单元的距离;The element u ij of the first distance matrix represents the distance between the i-th sequence unit of a profile sequence set and the j-th sequence unit of another profile sequence set;
计算轮廓的距离的公式如下:The formula for calculating the distance of a contour is as follows:
其中,n和m分别表示两个轮廓的序列集合的序列单元的总数,dnm表示第一距离矩阵的第n行第m列的元素的值。Among them, n and m respectively represent the total number of sequence units of the sequence sets of the two profiles, and d nm represents the value of the element in the nth row and mth column of the first distance matrix.
进一步地,一个轮廓的序列集合的第i个序列单元与另一个轮廓的序列集合的第j个序列单元的距离的计算公式如下:Further, the calculation formula for the distance between the i-th sequence unit of a profile sequence set and the j-th sequence unit of another profile sequence set is as follows:
其中xi和yi为第i个序列单元的两个坐标,xj和yj为第j个序列单元的两个坐标;Where x i and y i are the two coordinates of the i-th sequence unit, x j and y j are the two coordinates of the j-th sequence unit;
dij即为第一距离矩阵的元素uij的值。d ij is the value of element u ij of the first distance matrix.
进一步地,还包括核心帧提取模块,其用于执行以下步骤生成核心帧集:Further, a core frame extraction module is also included, which is used to perform the following steps to generate a core frame set:
步骤S301,建立一个N*N矩阵,,其中R为关键帧集的关键帧的数量;Step S301, establishing an N*N matrix, , where R is the number of keyframes in the keyframe set;
步骤S302,从关键帧集中随机选择N*N个关键帧作为矩阵的元素;Step S302, randomly selecting N*N key frames from the key frame set as elements of the matrix;
步骤S303,从关键帧集中随机选择一个不属于矩阵的元素的关键帧,然后计算该关键帧与矩阵元素之间的相似度,选择与其相似度最大的矩阵元素作为中心元素;Step S303, randomly select a key frame that does not belong to an element of the matrix from the key frame set, then calculate the similarity between the key frame and the matrix element, and select the matrix element with the largest similarity as the central element;
标记中心元素以及矩阵中与中心元素距离小于2的元素为标记元素;Mark the central element and the elements in the matrix whose distance from the central element is less than 2 as the marked element;
矩阵的元素的距离的计算公式如下:The calculation formula for the distance of the elements of the matrix is as follows:
其中为uH1和uH2分别为两个矩阵元素的行值,uL1和uL2分别为两个矩阵元素的列值;Among them, u H1 and u H2 are row values of two matrix elements respectively, u L1 and u L2 are column values of two matrix elements respectively;
步骤S304,依次更新标记元素的属性值,更新的公式如下:Step S304, updating the attribute values of the tag elements in sequence, the updating formula is as follows:
其中t表示更新标记元素的次数,表示更新之后的标记元素的第k项属性的值,表示更新之前的标记元素的第k项属性的值,表示步骤S303中提取的关键帧的第k项属性的值;where t represents the number of times the tagged element is updated, Indicates the value of the kth attribute of the tag element after the update, Indicates the value of the kth attribute of the tag element before updating, Represent the value of the kth item attribute of the key frame extracted in step S303;
k≤3,关键帧的三项属性分别为第一属性、第二属性和第三属性;第一属性的取值为关键帧包含的轮廓的数量;第二属性的取值为关键帧包含的内轮廓的数量;第三属性的取值为关键帧的播放时间值;k≤3, the three attributes of the key frame are the first attribute, the second attribute and the third attribute; the value of the first attribute is the number of contours contained in the key frame; the value of the second attribute is the number of contours contained in the key frame The number of inner contours; the value of the third attribute is the playback time value of the key frame;
步骤S305,迭代执行步骤S303和步骤S304,迭代执行的次数为,R为关键帧集的关键帧的数量;Step S305, iteratively execute step S303 and step S304, the number of iterative execution is , R is the number of keyframes in the keyframe set;
步骤S306,提取与矩阵的元素相似度大于第八阈值的关键帧集中的关键帧作为核心帧,生成核心帧集。Step S306 , extracting key frames in the key frame set whose element similarity with the matrix is greater than the eighth threshold as core frames, and generating a core frame set.
本发明的有益效果在于:The beneficial effects of the present invention are:
本发明基于动漫视频的制作特点设计基于图像轮廓的关键帧提取系统,针对于动漫视频能够获得优于基于内容的关键帧提取方法提取关键帧的效果。The present invention designs a key frame extraction system based on image contours based on the production characteristics of animation videos, and can obtain key frame extraction effects better than content-based key frame extraction methods for animation videos.
附图说明Description of drawings
图1是本发明的一种视频关键帧智能提取系统的模块示意图一;Fig. 1 is a module schematic diagram one of a kind of video key frame intelligent extraction system of the present invention;
图2是本发明的对第一轮廓集进行整理生成第二轮廓集的流程图;Fig. 2 is the flow chart that arranges the first outline set and generates the second outline set according to the present invention;
图3是本发明的第二筛选模块对第二轮廓集进行进一步处理的流程图;Fig. 3 is the flow chart that the second screening module of the present invention further processes the second contour set;
图4是本发明的一种视频关键帧智能提取系统的模块示意图二;Fig. 4 is the module schematic diagram two of a kind of video key frame intelligent extraction system of the present invention;
图5是本发明的核心帧提取模块生成核心帧集的流程图。Fig. 5 is a flowchart of generating a core frame set by the core frame extraction module of the present invention.
图中:帧提取模块101,预处理模块102,轮廓处理模块103,序列生成模块104,第一筛选模块105,第二筛选模块106,第三筛选模块107,第一帧单元处理模块108,关键帧生成模块109,核心帧提取模块110。In the figure:
具体实施方式Detailed ways
现在将参考示例实施方式讨论本文描述的主题。应该理解,讨论这些实施方式只是为了使得本领域技术人员能够更好地理解从而实现本文描述的主题,并非是对权利要求书中所阐述的保护范围、适用性或者示例的限制。可以在不脱离本说明书内容的保护范围的情况下,对所讨论的元素的功能和排列进行改变。各个示例可以根据需要,省略、替代或者添加各种过程或组件。另外,相对一些示例所描述的特征在其他例子中也可以进行组合。The subject matter described herein will now be discussed with reference to example implementations. It should be understood that the discussion of these implementations is only to enable those skilled in the art to better understand and realize the subject matter described herein, and is not intended to limit the protection scope, applicability or examples set forth in the claims. Changes may be made in the function and arrangement of elements discussed without departing from the scope of the disclosure. Various examples may omit, substitute, or add various procedures or components as needed. Additionally, features described with respect to some examples may also be combined in other examples.
实施例一Embodiment one
如图1-图3所示,一种视频关键帧智能提取系统,包括:As shown in Figures 1-3, a video key frame intelligent extraction system includes:
帧提取模块101,其用于从动漫视频中提取帧单元;
预处理模块102,其对帧单元的图像进行二值化处理获得二值图像;A
轮廓处理模块103,其基于预处理模块102获得的二值图像处理获得帧单元的图像的轮廓,一个二值化图像包括一个以上的轮廓,两个轮廓之间不存在相交的像素点;
序列生成模块104,其基于帧单元的图像的轮廓将其映射到序列集合;a
例如一个轮廓的序列集合为A={a1,a2...an};an表示轮廓的一个像素;For example, the sequence set of a contour is A={a 1 ,a 2 ... a n }; a n represents a pixel of the contour;
第一筛选模块105,其用于计算帧单元的图像的轮廓与帧单元的图像边框轮廓之间的距离,删除距离小于第一阈值的帧单元的图像的轮廓,生成第一轮廓集;The
第二筛选模块106,其用于计算第一轮廓集内的轮廓的距离;A
通过以下步骤对第一轮廓集进行整理生成第二轮廓集:The first contour set is sorted to generate the second contour set through the following steps:
步骤S101,从第一轮廓集中生成第一中间集,第一中间集中的轮廓与同一个第一中间集中的一个以上的轮廓的距离小于第二阈值;Step S101, generating a first intermediate set from the first contour set, the distance between the contours in the first intermediate set and more than one contour in the same first intermediate set is less than a second threshold;
步骤S102,对第一中间集进行处理,第一中间集中属于一个动漫剧集的同一集,并且时间值的差值小于第三阈值的轮廓只保留其中一个,所有第一中间集保留的轮廓的集合即为第二轮廓集;Step S102, the first intermediate set is processed, the first intermediate set belongs to the same episode of an animation drama series, and only one of the contours whose time value difference is smaller than the third threshold value is retained, and all the contours retained in the first intermediate set are The set is the second contour set;
在本发明的一个实施例中,第二筛选模块106对第二轮廓集进行进一步处理,包括以下步骤:In one embodiment of the present invention, the
步骤S201,从第二轮廓集中生成第二中间集,第二中间集中的轮廓与同一个第二中间集中的一个以上的轮廓的距离小于第二阈值;Step S201, generating a second intermediate set from the second contour set, the distance between the contours in the second intermediate set and more than one contour in the same second intermediate set is less than a second threshold;
步骤S202,对第二中间集进行处理,一个第二中间集中只保留一个轮廓;Step S202, process the second intermediate set, and only keep one contour in a second intermediate set;
所有第二中间集中保留的轮廓的集合作为新的第二轮廓集。The set of all the remaining contours in the second intermediate set is used as the new second contour set.
针对于动漫剧集原画复用的特性,来通过以上策略删除基于复用原画生成的帧单元,但是仍保留了比较相似的轮廓;在此对时间值进行规范,例如某一集的10分23秒的第3帧,则其时间值为623.03,某一集的10分22秒的第20帧,则其时间值为622.20,步骤S102中的时间值的差值一般选择为小于1,一般第二阈值设置的较小,这一条件是清理为了满足24帧影像的格式而进行的重复插帧。Aiming at the characteristics of reusing the original paintings of animation series, the above strategy is used to delete the frame units generated based on the reuse of the original paintings, but still retain a relatively similar outline; here, the time value is standardized, for example, 10 minutes 23 of a certain episode second, then its time value is 623.03, and the 20th frame of 10 minutes and 22 seconds of a certain episode, then its time value is 622.20, the difference between the time values in step S102 is generally selected to be less than 1, generally the first The second threshold is set to be small, and this condition is to clean up the repeated frame insertion to meet the format of the 24-frame image.
第三筛选模块107,其基于第二轮廓集生成内层轮廓集和外层轮廓集,内层轮廓集的轮廓所要满足的条件是:The
对于内层轮廓集的一个A轮廓,A轮廓关联的帧单元的图像内存在两个以上的轮廓,并且在该图像内A轮廓的外部存在一个以上的轮廓;For an A contour of the inner contour set, there are more than two contours in the image of the frame unit associated with the A contour, and there are more than one contours outside the A contour in the image;
外层轮廓集的轮廓所要满足的条件是:The conditions to be met by the contours of the outer contour set are:
对于外层轮廓集的一个B轮廓,B轮廓关联的帧单元的图像内存在两个以上的轮廓,并且在该图像内B轮廓的外部不存在轮廓;For a B contour of the outer contour set, there are more than two contours in the image of the frame unit associated with the B contour, and there is no contour outside the B contour in the image;
外层轮廓集与内层轮廓集之间不存在交集,外层轮廓集与内层轮廓集的并集小于或等于第二轮廓集。There is no intersection between the outer contour set and the inner contour set, and the union of the outer contour set and the inner contour set is less than or equal to the second contour set.
第一帧单元处理模块108,其提取与第二轮廓集关联的帧单元之后生成第一帧集;The first frame
从第一帧集中提取不包含外层轮廓集和内层轮廓集的轮廓的帧单元生成第二帧集;Extracting frame units that do not contain contours of the outer contour set and the inner contour set from the first frame set to generate a second frame set;
从第一帧集中提取不属于第二帧集的帧单元生成第三帧集;Extracting frame units that do not belong to the second frame set from the first frame set to generate a third frame set;
从外层轮廓集中提取满足以下条件的轮廓生成第三轮廓集:Extract the contours satisfying the following conditions from the outer contour set to generate the third contour set:
外层轮廓集中与提取的轮廓的距离小于第六阈值的轮廓的数量大于第五阈值;The number of contours whose distance to the extracted contour is smaller than the sixth threshold in the outer contour set is greater than the fifth threshold;
从内层轮廓集中提取与第三轮廓集的轮廓属于相同的帧单元的图像的轮廓生成第四轮廓集;Extract the outline of the image belonging to the same frame unit as the outline of the third outline set from the inner layer outline set to generate a fourth outline set;
从第四轮廓集中生成小集合,小集合中的轮廓与同一小集合的其他一个以上的轮廓的距离小于第七阈值,且小集合中的轮廓与小集合之外的轮廓的距离大于或等于第七阈值;A small set is generated from the fourth contour set, the distance between the contours in the small set and more than one other contours of the same small set is less than the seventh threshold, and the distance between the contours in the small set and the contours outside the small set is greater than or equal to the first seven thresholds;
第四轮廓集中的每个小集合中随机选择一个轮廓生成第五轮廓集;A profile is randomly selected from each small set in the fourth profile set to generate a fifth profile set;
从第三帧集中提取关联第五轮廓集的轮廓的帧单元生成第四帧集;Extracting frame units associated with contours of the fifth contour set from the third frame set to generate a fourth frame set;
关键帧生成模块109,其将第二帧集和第四帧集取并集得到关键帧集,关键帧集中的帧单元即是所提取的关键帧;A key
第一筛选模块105和第二筛选模块106计算轮廓的距离的方法包括:The method for calculating the distance between the
计算两个轮廓序列集合的序列单元之间的距离获得第一距离矩阵;Calculate the distance between the sequence units of the two contour sequence sets to obtain the first distance matrix;
第一距离矩阵的元素uij表示一个轮廓的序列集合的第i个序列单元与另一个轮廓的序列集合的第j个序列单元的距离;The element u ij of the first distance matrix represents the distance between the i-th sequence unit of a profile sequence set and the j-th sequence unit of another profile sequence set;
计算轮廓的距离的公式如下:The formula for calculating the distance of a contour is as follows:
其中,n和m分别表示两个轮廓的序列集合的序列单元的总数,dnm表示第一距离矩阵的第n行第m列的元素的值;Among them, n and m respectively represent the total number of sequence units of the sequence sets of the two profiles, and d nm represents the value of the element of the nth row and mth column of the first distance matrix;
其中D(n-1,m)、D(n,m-1)、D(n-1,m-1)的值参考上述公式迭代计算;The values of D(n-1, m), D(n, m-1), and D(n-1, m-1) are iteratively calculated with reference to the above formula;
对于动漫中常用的放大镜头也能够良好的进行轮廓相似的计算;For the magnification lens commonly used in animation, it can also calculate the similarity of the outline well;
在本发明的一个实施例中,一个轮廓的序列集合的第i个序列单元与另一个轮廓的序列集合的第j个序列单元的距离的计算公式如下:In one embodiment of the present invention, the formula for calculating the distance between the i-th sequence unit of one profile sequence set and the j-th sequence unit of another profile sequence set is as follows:
其中xi和yi为第i个序列单元的两个坐标,xj和yj为第j个序列单元的两个坐标;Where x i and y i are the two coordinates of the i-th sequence unit, x j and y j are the two coordinates of the j-th sequence unit;
dij即为第一距离矩阵的元素uij的值;d ij is the value of element u ij of the first distance matrix;
在本发明的一个实施例中,序列生成模块104预先将帧单元的图像边框轮廓同样映射到一个序列集合,在提取帧单元的图像的轮廓时是不包含图像边框轮廓的,所有帧单元的图像边框轮廓应该是相同的,因此可以单独的预先生成帧单元的图像边框轮廓。In one embodiment of the present invention, the
在本发明的一个实施例中,轮廓处理模块103生成帧单元的图像的轮廓时删除与帧单元的图像边框轮廓的距离小于基准阈值的轮廓,基准阈值小于第一阈值,属于图像边框轮廓的像素点分布于帧单元的图像的边界;In one embodiment of the present invention, when the
在本发明的一个实施例中,轮廓以链码的方式存储。In one embodiment of the present invention, the profile is stored in the form of chain code.
如图4、图5所示,在本发明的一个实施例中,一种视频关键帧智能提取系统还包括核心帧提取模块110,其用于执行以下步骤生成核心帧集:As shown in Fig. 4 and Fig. 5, in one embodiment of the present invention, a kind of video key frame intelligent extraction system also comprises core
步骤S301,建立一个N*N矩阵,,其中R为关键帧集的关键帧的数量;Step S301, establishing an N*N matrix, , where R is the number of keyframes in the keyframe set;
步骤S302,从关键帧集中随机选择N*N个关键帧作为矩阵的元素;Step S302, randomly selecting N*N key frames from the key frame set as elements of the matrix;
步骤S303,从关键帧集中随机选择一个不属于矩阵的元素的关键帧,然后计算该关键帧与矩阵元素之间的相似度,选择与其相似度最大的矩阵元素作为中心元素;Step S303, randomly select a key frame that does not belong to an element of the matrix from the key frame set, then calculate the similarity between the key frame and the matrix element, and select the matrix element with the largest similarity as the central element;
标记中心元素以及矩阵中与中心元素距离小于2的元素为标记元素;Mark the central element and the elements in the matrix whose distance from the central element is less than 2 as the marked element;
矩阵的元素的距离的计算公式如下:The calculation formula for the distance of the elements of the matrix is as follows:
其中为uH1和uH2分别为两个矩阵元素的行值,uL1和uL2分别为两个矩阵元素的列值;Among them, u H1 and u H2 are row values of two matrix elements respectively, u L1 and u L2 are column values of two matrix elements respectively;
步骤S304,依次更新标记元素的属性值,更新的公式如下:Step S304, updating the attribute values of the tag elements in sequence, the updating formula is as follows:
其中t表示更新标记元素的次数,表示更新之后的标记元素的第k项属性的值,表示更新之前的标记元素的第k项属性的值,表示步骤S303中提取的关键帧的第k项属性的值;where t represents the number of times the tagged element is updated, Indicates the value of the kth attribute of the tag element after the update, Indicates the value of the kth attribute of the tag element before updating, Represent the value of the kth item attribute of the key frame extracted in step S303;
k≤3,关键帧的三项属性分别为第一属性、第二属性和第三属性;第一属性的取值为关键帧包含的轮廓的数量;第二属性的取值为关键帧包含的内轮廓的数量;第三属性的取值为关键帧的播放时间值;k≤3, the three attributes of the key frame are the first attribute, the second attribute and the third attribute; the value of the first attribute is the number of contours contained in the key frame; the value of the second attribute is the number of contours contained in the key frame The number of inner contours; the value of the third attribute is the playback time value of the key frame;
步骤S305,迭代执行步骤S303和步骤S304,迭代执行的次数为,R为关键帧集的关键帧的数量;Step S305, iteratively execute step S303 and step S304, the number of iterative execution is , R is the number of keyframes in the keyframe set;
步骤S306,提取与矩阵的元素相似度大于第八阈值的关键帧集中的关键帧作为核心帧,生成核心帧集;Step S306, extracting the key frames in the key frame set whose element similarity with the matrix is greater than the eighth threshold as core frames to generate a core frame set;
需要说明的是步骤S303选择关键帧应该是未在前面的迭代执行步骤中被选择的;It should be noted that the key frame selected in step S303 should not be selected in the previous iterative execution steps;
步骤S306中所述的矩阵元素是指步骤S305迭代之后被更新的矩阵;The matrix element described in step S306 refers to the updated matrix after step S305 iteration;
其中,计算关键帧与矩阵元素之间的相似度的公式如下:Among them, the formula for calculating the similarity between keyframes and matrix elements is as follows:
其中u11、u12、u13分别为矩阵元素的第一属性、第二属性和第三属性的值,u21、u22、u23分别为关键帧的第一属性、第二属性和第三属性的值;Among them, u 11 , u 12 , and u 13 are respectively the values of the first attribute, the second attribute, and the third attribute of the matrix elements, and u 21 , u 22 , and u 23 are respectively the values of the first attribute, the second attribute, and the third attribute of the key frame. The value of the three attributes;
关键帧生成模块109所生成的关键帧集对于一个总帧数较大的视频来说仍然具有较大的数据量,核心帧提取模块110基于关键帧生成模块所生成关键帧集的特性进行进一步处理缩小规模获得数量更少的核心帧。The key frame set generated by the key
上面对本实施例的实施例进行了描述,但是本实施例并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本实施例的启示下,在不脱离本实施例宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本实施例的保护之内。The embodiment of this embodiment has been described above, but this embodiment is not limited to the above-mentioned specific implementation, the above-mentioned specific implementation is only illustrative, not restrictive, those of ordinary skill in the art Inspired by the embodiment, without departing from the gist of the embodiment and the protection scope of the claims, many forms can be made, all of which are within the protection of the embodiment.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211394689.1A CN115457448B (en) | 2022-11-09 | 2022-11-09 | Intelligent extraction system for video key frames |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211394689.1A CN115457448B (en) | 2022-11-09 | 2022-11-09 | Intelligent extraction system for video key frames |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN115457448A CN115457448A (en) | 2022-12-09 |
| CN115457448B true CN115457448B (en) | 2023-01-31 |
Family
ID=84310958
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211394689.1A Active CN115457448B (en) | 2022-11-09 | 2022-11-09 | Intelligent extraction system for video key frames |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115457448B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115797851B (en) * | 2023-02-09 | 2023-05-05 | 安徽米娱科技有限公司 | An animation video processing method and system |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102799857A (en) * | 2012-06-19 | 2012-11-28 | 东南大学 | Video multi-vehicle outline detection method |
| CN113516738A (en) * | 2020-04-09 | 2021-10-19 | 上海米哈游天命科技有限公司 | Animation processing method and device, storage medium and electronic equipment |
| CN114445751A (en) * | 2022-01-29 | 2022-05-06 | 中国建设银行股份有限公司 | Method and device for extracting outline feature of video key frame image |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102402536A (en) * | 2010-09-13 | 2012-04-04 | 索尼公司 | Method and equipment for extracting key frame from video |
| JP4784709B1 (en) * | 2011-03-10 | 2011-10-05 | オムロン株式会社 | Object tracking device, object tracking method, and control program |
-
2022
- 2022-11-09 CN CN202211394689.1A patent/CN115457448B/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102799857A (en) * | 2012-06-19 | 2012-11-28 | 东南大学 | Video multi-vehicle outline detection method |
| CN113516738A (en) * | 2020-04-09 | 2021-10-19 | 上海米哈游天命科技有限公司 | Animation processing method and device, storage medium and electronic equipment |
| CN114445751A (en) * | 2022-01-29 | 2022-05-06 | 中国建设银行股份有限公司 | Method and device for extracting outline feature of video key frame image |
Non-Patent Citations (3)
| Title |
|---|
| 先验模型约束的抗干扰轮廓跟踪;刘大千等;《中国图象图形学报》;20170416(第04期);第92-105页 * |
| 基于自动编码器与概率神经网络的人体运动行为识别方法;李兴等;《软件导刊》;20180115(第01期);第15-17页 * |
| 基于轮廓特征的模板匹配方法及其应用;孔金生等;《计算机工程与应用》;20080801(第22期);第205-207页 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115457448A (en) | 2022-12-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Frühstück et al. | Tilegan: synthesis of large-scale non-homogeneous textures | |
| CN102334118B (en) | Promoting method and system for personalized advertisement based on interested learning of user | |
| CN113706372B (en) | Automatic matting model building method and system | |
| CN109903236B (en) | Face image restoration method and device based on VAE-GAN and similar block search | |
| JP4370387B2 (en) | Apparatus and method for generating label object image of video sequence | |
| CN111429341B (en) | A video processing method, device and computer-readable storage medium | |
| Zhao et al. | Cartoon image processing: A survey | |
| US11657598B1 (en) | Composite car image generator | |
| Chen et al. | Towards Deep Style Transfer: A Content-Aware Perspective. | |
| CN112101364B (en) | Semantic segmentation method based on parameter importance increment learning | |
| CN113689434A (en) | An Image Semantic Segmentation Method Based on Slice Pooling | |
| CN115457448B (en) | Intelligent extraction system for video key frames | |
| CN114692733B (en) | End-to-end video style transfer method, system and storage medium for suppressing temporal noise amplification | |
| US6937760B2 (en) | Interactive frame segmentation with dynamic programming | |
| Chen et al. | Scribblebox: Interactive annotation framework for video object segmentation | |
| CN102831239A (en) | Method and system for building image database | |
| CN112614149A (en) | Semantic synthesis method based on instance segmentation | |
| CN118570064A (en) | Super-division method, device and storage medium for using priori knowledge in diffusion model without training | |
| CN117350910A (en) | Image watermark protection method based on diffusion image editing model | |
| US20010025298A1 (en) | Object region data generating method, object region data generating apparatus, approximation polygon generating method, and approximation polygon generating apparatus | |
| CN114092827A (en) | An image dataset generation method | |
| CN119496964B (en) | A relatively controllable video generation system based on AIGC large model | |
| CN102005061A (en) | Method for reusing cartoons based on layering/hole-filling | |
| CN117037009A (en) | Video identification method, device, computer equipment and storage medium | |
| CN111064905B (en) | Video scene conversion method for automatic driving |
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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CP03 | Change of name, title or address | ||
| CP03 | Change of name, title or address |
Address after: Room 1610, Building C, Tuoji City Plaza, No. 683 Changjiang West Road, High tech Zone, Hefei City, Anhui Province, 230000 Patentee after: Anhui Miyu Technology Co.,Ltd. Country or region after: China Address before: Room 1210-1211, Tower C, Tuoji City Plaza, No. 683, Changjiang West Road, High tech Zone, Hefei City, Anhui Province, 230000 Patentee before: Anhui Miyu Technology Co.,Ltd. Country or region before: China |
|
| TR01 | Transfer of patent right | ||
| TR01 | Transfer of patent right |
Effective date of registration: 20250711 Address after: 230000 Anhui Province Hefei City High-tech Development Zone Changjiang West Road No. 683 Tuoji City Plaza Golden Tower C Building 2306 Room Patentee after: Hefei Mishi Technology Co.,Ltd. Country or region after: China Address before: Room 1610, Building C, Tuoji City Plaza, No. 683 Changjiang West Road, High tech Zone, Hefei City, Anhui Province, 230000 Patentee before: Anhui Miyu Technology Co.,Ltd. Country or region before: China |