CPC G06V 20/41 (2022.01) [G06F 18/23 (2023.01); G06V 10/255 (2022.01); G06V 10/462 (2022.01); G06V 20/49 (2022.01); H04N 21/44008 (2013.01); H04N 21/812 (2013.01); H04N 21/8456 (2013.01)] | 20 Claims |
1. A method for detecting an information insertion region, the method comprising:
obtaining a video;
segmenting the video to obtain video fragments, each of the video fragments including a subset of image frames in the video;
obtaining a target frame in the video fragments;
identifying and segmenting objects in the target frame, to obtain labeling information corresponding to the objects;
determining a target object according to the labeling information;
performing clustering on the target object, to obtain a plurality of candidate to-be-inserted regions in the target object;
determining whether each of the plurality of candidate to-be-inserted regions includes at least one non-target object;
obtaining a subset of the plurality of candidate to-be-inserted regions that is determined not to include the at least one non-target object from the plurality of candidate to-be-inserted regions;
calculating areas of the subset of the plurality of candidate to-be-inserted regions;
determining, by processing circuitry, a target candidate to-be-inserted region in the target object from the subset of the plurality of candidate to-be-inserted regions in the target object based on the calculated areas of the subset of the plurality of candidate to-be-inserted regions; and
performing maximum rectangle searching in the target candidate to-be-inserted region in the target object to obtain a target to-be-inserted sub-region of the target object in which an image is to be inserted.
|