Summary of the invention
The embodiment of the invention provides a kind of video capture error correction method and Related product, may be implemented to realize to shooting view
The place of frequency mistake carries out error correction, has the advantages that improve user experience.
In a first aspect, the embodiment of the present invention provides a kind of video capture error correction method, described method includes following steps:
Mobile terminal receives the short video capture request of user, executes short video capture and obtains the first video file;
Mobile terminal extracts the background music of the first video file, determine in background music identical paragraph it is corresponding first when
Between section and second time period;
Mobile terminal by the second video of first time period in the first video file and the third video of second time period,
Second video is compared to the different piece for determining the second video and third video with third video, to first video file
The different piece obtains the 4th video file after error correction after carrying out correction process.
Optionally, the identical paragraph specifically includes:
The identical part of the music file lyrics.
Optionally, described that second video is compared to the different portions for determining the second video and third video with third video
Divide and specifically include:
Second video is divided into a part according to each stroke of the lyrics of identical paragraph and obtains n part, by third
Video is divided into a part according to each stroke of the lyrics of identical paragraph and obtains n part, by two parts of same word
Video frame, which is compared, to be determined whether unanimously, such as consistent, is determined as same section, such as inconsistent, is determined as not same section.
Optionally, described pair of the first video file different piece obtains the 4th view after error correction after carrying out correction process
Frequency file specifically includes:
The 4th video after the video of the different piece corresponding period of first video file to be deleted to obtain error correction
File;
Or the second video of video selection or third of the first time period of the first video file and second time period are regarded
Frequently.
Second aspect, provides a kind of terminal, and the terminal includes: camera, processor, memory and display screen,
The camera executes short video capture and obtains when the short video capture for collecting user in display screen is requested
To the first video file;
The processor determines that identical paragraph is corresponding in background music for extracting the background music of the first video file
First time period and second time period;
The processor is also used to the second video of first time period in the first video file and second time period
The different piece for determining the second video and third video is compared with third video in second video by third video, to this
The one video file different piece obtains the 4th video file after error correction after carrying out correction process.
Optionally, the identical paragraph specifically includes: the identical part of the music file lyrics.
Optionally, the processor is divided into specifically for each stroke by the second video according to the lyrics of identical paragraph
One part obtains n part, and third video is divided into a part according to each stroke of the lyrics of identical paragraph and obtains n
The video frame of two parts of same word is compared and determines whether unanimously by part, such as consistent, is determined as same section, such as
It is inconsistent, it is determined as not same section.
Optionally, the processor, specifically for by the view of the different piece corresponding period of the first video file
Frequency is deleted and obtains the 4th video file after error correction;Or by the first time period of the first video file and the view of second time period
Frequency the second video of selection or third video.
Optionally, the terminal are as follows: tablet computer or smart mobile phone.
The third aspect provides a kind of computer readable storage medium, and storage is used for the program of electronic data interchange,
In, described program makes terminal execute the method that first aspect provides.
The implementation of the embodiments of the present invention has the following beneficial effects:
As can be seen that after technical solution provided by the present application determines the first video file shot, to the first video text
Determining different piece is compared in the second video and third video of identical paragraph in part, then entangles to different piece
Mistake, this makes it possible to the mistake progress correction process realized to video.
Description and claims of this specification and term " first ", " second ", " third " and " in the attached drawing
Four " etc. are not use to describe a particular order for distinguishing different objects.In addition, term " includes " and " having " and it
Any deformation, it is intended that cover and non-exclusive include.Such as it contains the process, method of a series of steps or units, be
System, product or equipment are not limited to listed step or unit, but optionally further comprising the step of not listing or list
Member, or optionally further comprising other step or units intrinsic for these process, methods, product or equipment.
Referenced herein " embodiment " is it is meant that the special characteristic, result or the characteristic that describe can wrap in conjunction with the embodiments
Containing at least one embodiment of the present invention.Each position in the description occur the phrase might not each mean it is identical
Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and
Implicitly understand, embodiment described herein can be combined with other embodiments.
Refering to fig. 1, Fig. 1 provides a kind of mobile terminal, which is specifically as follows smart phone, the smart phone
It can specifically include for the mobile terminal of the systems such as IOS, Android, above-mentioned mobile terminal: processor, memory, camera
And display screen, above-mentioned component can be connected by bus, can also be connected by other means, the application is not intended to limit above-mentioned company
The concrete mode connect.
Referring to Fig.2, Fig. 2 provides a kind of video capture error correction method, this method is as shown in Fig. 2, by shifting as shown in Figure 1
Dynamic terminal executes, and this method comprises the following steps:
Step S201, mobile terminal receives the short video capture request of user, executes short video capture and obtains the first video
File;
Step S202, mobile terminal extracts the background music of the first video file, determines identical paragraph pair in background music
The first time period and second time period answered;
Above-mentioned background music can be conventional music, for identical paragraph, i.e., the identical paragraph of the lyrics, example inside music
If " learning mewing " " we learn mewing together, together mew mew mew mew mew " belongs to identical paragraph, have for most of music
There is identical paragraph.
Step S203, in the first video file of mobile terminal the second video of first time period and second time period
The different piece for determining the second video and third video is compared with third video in second video by three videos, to this first
The video file different piece obtains the 4th video file after error correction after carrying out correction process.
After technical solution provided by the present application determines the first video file of shooting, to identical in the first video file
Determining different piece is compared in the second video and third video of paragraph, then carries out error correction to different piece, thus
It can be realized and correction process is carried out to the mistake of video.
The principle of the application is, for shooting video, the basis for capableing of directly error correction is, movement view having the same
Frequently, it is found by the analysis of big data, is identical with the movement of identical paragraph, therefore by the corresponding view of two identical paragraphs
Frequency, which compares, determines different piece, then can realize to different piece progress correction process and obtain to the correction process of video file
The 4th video file after to error correction, so that the Experience Degree that user handles video is improved, without re-shooting.
Above-mentioned second video is compared with third video determines that the different piece of the second video and third video is specific
May include:
By the second video according to each stroke of the lyrics of identical paragraph be divided into a part obtain n part (n be it is identical
The lyrics number of words or number of letters of paragraph), third video is divided into a part according to each stroke of the lyrics of identical paragraph
N part is obtained, the video frame of two parts of same word is compared and is determined whether unanimously, it is such as consistent, it is determined as identical
Part, it is such as inconsistent, it is determined as not same section.
The video frame of above-mentioned two parts by same word is compared that determine whether unanimously can be by existing video
Comparison method determines.
Optionally, the text of the 4th video after error correction is obtained after carrying out correction process to the first video file different piece
Part can specifically include:
The 4th video after the video of the different piece corresponding period of first video file to be deleted to obtain error correction
File;
Or the second video of video selection or third of the first time period of the first video file and second time period are regarded
Frequently.
First way is directly to delete different piece, in this way without judging which different piece is to belong to mistake
Place, the disadvantage is that video effect will receive influence, the second way is that the period of identical paragraph is selected identical view
Frequently, because for same time period, video actions are also identical, therefore such selection can improve the effect of video.
The mode of above-mentioned the second video of selection or third video is specifically as follows, and determines the second video and third video
Fluency, the third video for selecting the higher second video replacement fluency of fluency low.
The determination method of above-mentioned fluency is specifically as follows, the consecutive frame of the second video is compared determine whether it is adjacent
Frame is the first quantity of consistent picture frame, is compared to the consecutive frame to third video and determines whether that consecutive frame is consistent
Second quantity of picture frame, such as the first quantity determine that the fluency of the second video is greater than third video less than the second quantity.
Its based on principle be, for video capture, act it is more coherent, then the consistent probability of consecutive frame is smaller, conversely,
If having mistake, in malfunction, personage has certain pause, thus has the identical situation of consecutive frame and goes out
Existing, such case is more, then its fluency is poorer.
Optionally, the above method can also include:
To in the 4th video file there is jowled video frame to carry out smooth processing.
It is above-mentioned that there is the smooth processing of jowled video frame progress can specifically include:
The pth video frame of the 4th video file is extracted, pth video frame lines line is obtained, by adjacent 2 lines lines and 2
The region that the distance of lines line is less than set distance is determined as region to be determined, by region to be determined construct λ lines line etc.
Away from line, extracts the picture comparison between equal space line and determine whether consistent, such as consistent (for example non-double chin region, picture one
Cause, the mode that picture compares can be realized by existing alignments), determine that the region to be determined is non-double chin area
Domain such as inconsistent (double chin is unevenly distributed due to meat, the picture different from each region) determines that this is to be determined
Region is double chin region, and the upper area in double chin region constructs upper equal space line, in extractions equal space line and upper lines line it
Between γ picture, which is extended downwardly into λ -1 (i.e. each equal space line locals with γ picture replace) and is replaced afterwards
Complete smooth processing in double chin region.
Above-mentioned acquisition pth video frame lines line can specifically include:
The rgb value of all pixels point of pth video frame is marked as different colours, determines the different colours in same color
Line segment obtains the distance between different colours line segment if the different colours line segment quantity in same color is more than 2, such as should be away from
From set distance threshold value is less than, determine that different colours line segment is lines line.
For lines line, skin is divided into multiple regions, the rgb value of multiple regions because being all skin,
Rgb value is identical, then the color of skin is all identical color when with color mark, but for lines line, due to
The reason of its folding and light, cause the lines line different from the rgb value of skin, due to marking different colors, the line
The color of route and the color of skin area are inconsistent, and it is line segment, in addition, having double chin at least to have 2
Above lines line, therefore quantity is also 2 or more.Lines line can be distinguished by the method.
A kind of terminal is provided refering to Fig. 3, Fig. 3, the terminal includes: camera, processor and display screen,
The camera executes short video capture and obtains when the short video capture for collecting user in display screen is requested
To the first video file;
The processor determines that identical paragraph is corresponding in background music for extracting the background music of the first video file
First time period and second time period;
The processor is also used to the second video of first time period in the first video file and second time period
The different piece for determining the second video and third video is compared with third video in second video by third video, to this
The one video file different piece obtains the 4th video file after error correction after carrying out correction process.
The embodiment of the present invention also provides a kind of computer storage medium, wherein computer storage medium storage is for electricity
The computer program of subdata exchange, it is as any in recorded in above method embodiment which execute computer
A kind of some or all of video capture error correction method step.
The embodiment of the present invention also provides a kind of computer program product, and the computer program product includes storing calculating
The non-transient computer readable storage medium of machine program, the computer program are operable to that computer is made to execute such as above-mentioned side
Some or all of any video capture error correction method recorded in method embodiment step.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of
Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because
According to the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know
It knows, embodiment described in this description belongs to alternative embodiment, and related actions and modules is not necessarily of the invention
It is necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment
Point, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed device, it can be by another way
It realizes.For example, the apparatus embodiments described above are merely exemplary, such as the division of the unit, it is only a kind of
Logical function partition, there may be another division manner in actual implementation, such as multiple units or components can combine or can
To be integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual
Coupling, direct-coupling or communication connection can be through some interfaces, the indirect coupling or communication connection of device or unit,
It can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also be realized in the form of software program module.
If the integrated unit is realized in the form of software program module and sells or use as independent product
When, it can store in a computer-readable access to memory.Based on this understanding, technical solution of the present invention substantially or
Person says that all or part of the part that contributes to existing technology or the technical solution can body in the form of software products
Reveal and, which is stored in a memory, including some instructions are used so that a computer equipment
(can be personal computer, server or network equipment etc.) executes all or part of each embodiment the method for the present invention
Step.And memory above-mentioned includes: USB flash disk, read-only memory (ROM, Read-Only Memory), random access memory
The various media that can store program code such as (RAM, Random Access Memory), mobile hard disk, magnetic or disk.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can
It is completed with instructing relevant hardware by program, which can store in a computer-readable memory, memory
May include: flash disk, read-only memory (English: Read-Only Memory, referred to as: ROM), random access device (English:
Random Access Memory, referred to as: RAM), disk or CD etc..
The embodiment of the present invention has been described in detail above, specific case used herein to the principle of the present invention and
Embodiment is expounded, and the above description of the embodiment is only used to help understand the method for the present invention and its core ideas;
At the same time, for those skilled in the art can in specific embodiments and applications according to the thought of the present invention
There is change place, in conclusion the contents of this specification are not to be construed as limiting the invention.