CPC G06F 16/7867 (2019.01) [G06F 16/784 (2019.01); G06V 10/507 (2022.01); G06V 10/761 (2022.01); G06V 20/46 (2022.01); G06V 40/10 (2022.01); G06V 40/20 (2022.01)] | 13 Claims |
1. 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.
|