US 11,810,333 B2
Method and apparatus for generating image of webpage content
Yang Jiao, Beijing (CN); Yi Yang, Beijing (CN); Jianguo Wang, Beijing (CN); Yi Li, Beijing (CN); Xiaodong Chen, Beijing (CN); Lin Liu, Beijing (CN); Xiang He, Beijing (CN); and Yanfeng Zhu, Beijing (CN)
Assigned to Baidu Online Network Technology (Beijing) Co., Ltd., Beijing (CN)
Filed by Baidu Online Network Technology (Beijing) Co., Ltd., Beijing (CN)
Filed on Mar. 19, 2021, as Appl. No. 17/207,564.
Claims priority of application No. 202010315358.9 (CN), filed on Apr. 21, 2020.
Prior Publication US 2021/0264614 A1, Aug. 26, 2021
Int. Cl. G06V 20/62 (2022.01); G06T 7/187 (2017.01); G06T 7/11 (2017.01); G06F 16/951 (2019.01); G06T 11/20 (2006.01); G06V 30/148 (2022.01); G06V 30/18 (2022.01); G06V 30/10 (2022.01)
CPC G06V 20/62 (2022.01) [G06F 16/951 (2019.01); G06T 7/11 (2017.01); G06T 7/187 (2017.01); G06T 11/203 (2013.01); G06V 30/15 (2022.01); G06V 30/18076 (2022.01); G06V 30/10 (2022.01)] 15 Claims
OG exemplary drawing
 
1. A method for generating an image of webpage content, the method comprising:
acquiring a screenshot of a webpage preloaded by a terminal as a source image;
recognizing connection areas in the source image, and generating first circumscribed rectangular frames outside outlines of the connection areas;
combining, in response determining that a distance between the connection areas is smaller than a preset distance threshold, the connection areas, and generating a second circumscribed rectangular frame outside outlines of the combined connection areas; and
generating, based on a nested relationship between the first circumscribed rectangular frames and the second circumscribed rectangular frame and pictures in the first circumscribed rectangular frames, a target image, wherein the generating, based on a nested relationship between the first circumscribed rectangular frames and the second circumscribed rectangular frame and pictures in the first circumscribed rectangular frames, a target image comprises:
obtaining an initial target image by combining, based on the nested relationship between the first circumscribed rectangular frames and the second circumscribed rectangular frame, the pictures in the first circumscribed rectangular frames;
determining a core area in the initial target image, wherein the core area in the initial target image is an area comprising a preset target in the initial target image;
segmenting, based on a preset clipping ratio and size, the initial target image to obtain segmented core area pictures; and
aggregating, based on feature information of the segmented core area pictures, the segmented core area pictures to obtain the target image, wherein the feature information comprises at least one of a size, an aspect ratio or a composition attribute of the pictures.