Video processing method, video searching method, terminal device, and computer-readable storage medium
AssigneeShenzhen Tcl New Technology Co., Ltd.
InventorsKaiwen Xue, Cheungming Lai, Yongze Xu
Life of this patent
Estimating the term…
Abstract
A video processing method, including: according to scenes, editing a video to be edited, and obtaining a target video; acquiring feature parameters of the target video; generating, according to the feature parameters, keywords of the target video; and storing the keywords and the target video associatively.
Claims13
A video processing method, wherein the video processing method comprises following steps:
- editing a video to be edited, according to scenes in the video to be edited, into a plurality of segments as a plurality of target videos respectively corresponding to the plurality of scenes, wherein each of the target videos is a video where a corresponding one of the plurality of scenes is located;
- acquiring feature parameters of each of the target videos;
- generating keywords of each of the target videos according to the feature parameters of the target video;
- and
- storing each of the target videos and the keywords of the target video associatively,
- wherein the step of editing the video to be edited, according to the scenes in the video to be edited, into a plurality of segments as a plurality of target videos respectively corresponding to the plurality of scenes comprises:
- extracting a plurality of image frames of the video to be edited in sequence at a preset frame rate;
- converting the image frames into corresponding grayscale images;
- determining whether there is a scene change in adjacent ones of the image frames according to the grayscale images of the adjacent ones of the image frames;
- taking the adjacent ones of the image frames with the scene change as division frames when there is the scene change in the adjacent ones of the image frames;
- and
- editing the video to be edited according to the division frames to acquire the target video, and
- wherein the step of determining whether there is the scene change in the adjacent ones of the image frames according to the grayscale images of the adjacent ones of the image frames comprises:
- extracting image blocks from the grayscale images corresponding to the adjacent ones of the image frames, respectively;
- acquiring a number of pixels in each image block within each of preset grayscale ranges, to obtain numbers of pixels respectively in the adjacent ones of the image frames within each of the preset grayscale ranges;
- acquiring an absolute value of a difference between the numbers of the pixels in the adjacent ones of the image frames within each of the preset grayscale ranges, to obtain absolute values of differences respectively within respective ones of the preset grayscale ranges;
- summing the absolute values of the differences to acquire a sum;
- and
- determining whether the sum is greater than a preset threshold, wherein it is determined that there is the scene change in the adjacent ones of the image frames when the sum is greater than the preset threshold.
A video searching method, wherein the video searching method comprises following steps:
- acquiring target keywords entered in a search interface;
- and
- searching a target video in a preset database according to the target keywords and displaying the target video associated with the target keywords;
- wherein the target video is acquired according to a video processing method,
- wherein the video processing method comprises:
- editing a video to be edited, according to scenes in the video to be edited, into a plurality of segments as a plurality of target videos respectively corresponding to the plurality of scenes, wherein each of the target video is a video where a corresponding one of the plurality of scenes is located;
- acquiring feature parameters of each of the target videos;
- generating keywords of each of the target videos according to the feature parameters of the target video;
- and
- storing each of the target videos and the keywords of the target video associatively,
- wherein the step of editing the video to be edited, according to the scenes in the video to be edited, into a plurality of segments as a plurality of target videos respectively corresponding to the plurality of scenes comprises:
- extracting a plurality of image frames of the video to be edited in sequence at a preset frame rate;
- converting the image frames into corresponding grayscale images;
- determining whether there is a scene change in adjacent ones of the image frames according to the grayscale images of the adjacent ones of the image frames;
- taking the adjacent ones of the image frames with the scene change as division frames when there is the scene change in the adjacent ones of the image frames;
- and
- editing the video to be edited according to the division frames to acquire the target video, and
- wherein the step of determining whether there is the scene change in the adjacent ones of the image frames according to the grayscale images of the adjacent ones of the image frames comprises:
- extracting image blocks from the grayscale images corresponding to the adjacent ones of the image frames, respectively;
- acquiring a number of pixels in each image block within each of preset grayscale ranges, to obtain numbers of pixels respectively in the adjacent ones of the image frames within each of the preset grayscale ranges;
- acquiring an absolute value of a difference between the numbers of the pixels in the adjacent ones of the image frames within each of the preset grayscale ranges, to obtain absolute values of differences respectively within respective ones of the preset grayscale ranges;
- summing the absolute values of the differences to acquire a sum;
- and
- determining whether the sum is greater than a preset threshold, wherein determining that there is the scene change in the adjacent ones of the image frames when the sum is greater than the preset threshold.
A terminal device, wherein the terminal device comprises a processor, a memory, and a video processing program or a video searching program stored in the memory and executable on the processor;
- the video processing program is executed by the processor to implement operations of a video processing method,
- wherein the video processing method comprises:
- editing a video to be edited, according to scenes in the video to be edited, into a plurality of segments as a plurality of target videos respectively corresponding to the plurality of scenes, wherein each of the target video is a video where a corresponding one of the plurality of scenes is located;
- acquiring feature parameters of each of the target videos;
- generating keywords of each of the target videos according to the feature parameters of the target video;
- and
- storing each of the target videos and the keywords of the target video associatively,
- wherein the step of editing the video to be edited, according to the scenes in the video to be edited, into a plurality of segments as a plurality of target videos respectively corresponding to the plurality of scenes comprises:
- extracting a plurality of image frames of the video to be edited in sequence at a preset frame rate;
- converting the image frames into corresponding grayscale images;
- determining whether there is a scene change in adjacent ones of the image frames according to the grayscale images of the adjacent ones of the image frames;
- taking the adjacent ones of the image frames with the scene change as division frames when there is the scene change in the adjacent ones of the image frames;
- and
- editing the video to be edited according to the division frames to acquire the target video, and
- wherein the step of determining whether there is the scene change in the adjacent ones of the image frames according to the grayscale images of the adjacent ones of the image frames comprises:
- extracting image blocks from the grayscale images corresponding to the adjacent ones of the image frames, respectively;
- acquiring a number of pixels in each image block within each of preset grayscale ranges, to obtain numbers of pixels respectively in the adjacent ones of the image frames within each of the preset grayscale ranges;
- acquiring an absolute value of a difference between the numbers of the pixels in the adjacent ones of the image frames within each of the preset grayscale ranges, to obtain absolute values of differences respectively within respective ones of the preset grayscale ranges;
- summing the absolute values of the differences to acquire a sum;
- and
- determining whether the sum is greater than a preset threshold, wherein determining that there is the scene change in the adjacent ones of the image frames when the sum is greater than the preset threshold.
A computer-readable storage medium, wherein the computer-readable storage medium stores a video processing program or a video searching program;
- the video processing program is executed by a processor to implement operations of a video processing method,
- wherein the video processing method comprises:
- editing a video to be edited, according to scenes in the video to be edited, into a plurality of segments as a plurality of target videos respectively corresponding to the plurality of scenes, wherein each of the target video is a video where a corresponding one of the plurality of scenes is located;
- acquiring feature parameters of each of the target videos;
- generating keywords of each of the target videos according to the feature parameters of the target video;
- and
- storing each of the target videos and the keywords of the target video associatively,
- wherein the step of editing the video to be edited, according to the scenes in the video to be edited, into a plurality of segments as a plurality of target videos respectively corresponding to the plurality of scenes comprises:
- extracting a plurality of image frames of the video to be edited in sequence at a preset frame rate;
- converting the image frames into corresponding grayscale images;
- determining whether there is a scene change in adjacent ones of the image frames according to the grayscale images of the adjacent ones of the image frames;
- taking the adjacent ones of the image frames with the scene change as division frames when there is the scene change in the adjacent ones of the image frames;
- and
- editing the video to be edited according to the division frames to acquire the target video, and
- wherein the step of determining whether there is the scene change in the adjacent ones of the image frames according to the grayscale images of the adjacent ones of the image frames comprises:
- extracting image blocks from the grayscale images corresponding to the adjacent ones of the image frames, respectively;
- acquiring a number of pixels in each image block within each of preset grayscale ranges, to obtain numbers of pixels respectively in the adjacent ones of the image frames within each of the preset grayscale ranges;
- acquiring an absolute value of a difference between the numbers of the pixels in the adjacent ones of the image frames within each of the preset grayscale ranges, to obtain absolute values of differences respectively within respective ones of the preset grayscale ranges;
- summing the absolute values of the differences to acquire a sum;
- and
- determining whether the sum is greater than a preset threshold, wherein determining that there is the scene change in the adjacent ones of the image frames when the sum is greater than the preset threshold.
Dependencies are inferred from the claim text.