{'fraction_non_alphanumeric': 0.022537562604340568, 'fraction_numerical': 0.0008347245409015025, 'mean_word_length': 4.65566037735849, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Method and equipment for segmenting foreground and background

The embodiment of the invention provides a method for segmenting foreground and background, and the method comprises the steps: employing a block matching method based on the foreground region of a (t-1)-th image frame, and determining a first region of a t-th image frame, wherein t is a positive integer greater than one; and determining a foreground region of the t-th image frame according to pixels, meeting a first condition, in the first region of the t-th image frame. In the embodiment of the invention, the method is based on a learning strategy, employs a block matching method and a color histogram, can determine a foreground region of each image frame of a video, and achieves the segmentation of the foreground and background of each image frame of the video. Moreover, an algorithm for the segmentation of the foreground and background is relatively simple, is short in operation time, and can be carried out in real time in a video process. Meanwhile, the method not only can be suitable for the video process during the fixing of a camera, but also can be used for all video processes during the moving of the camera.