| Natural matting technology is a technique to accurately extract the specified foreground from an image and has been widely used in image and video editing fields.The quality of trimaps directly affects the quality of matting.It marks the areas with known opacity in the image and directly impacts the foreground extracted by the matting algorithm.However,low-quality trimaps contain fewer known areas and cannot provide enough prior information to help natural image matting algorithms obtain high-quality matting transparency masks.Trimap quality improvement technology improves the quality of trimaps by expanding the known areas of trimaps.However,the current trimap quality improvement technology has the problems of insufficient expansion and expansion errors in different matting scenarios.In view of the above problems,this paper carries out the following research contents:1)for salient opaque foreground images,a coarse trimap expansion algorithm based on one-class classification is proposed to solve the problem of insufficient expansion in existing trimap expansion methods.In order to solve the problem that previous trimap expansion works use low-level image features to measure pixel similarity,causing scene limitations,this algorithm uses category features to improve the reliability of pixel similarity measurement.The one-class classifier trained based on category features can recognize the global context information of the image,breaking through the limitation of local information in previous expansion works,and solving the problem of insufficient trimap expansion.The algorithm can significantly improve the trimap quality of images with salient opaque foreground,but does not apply to translucent foreground image scenes.2)for translucent foreground images,the first work and previous trimap expansion methods have the problem of expansion errors in semi-transparent areas.A two-step coarse trimap expansion algorithm based on feature difference is thus proposed.It uses a clustering algorithm to integrate the semantic features in the known area to separate the foreground area and background area,solving the problem of background blur in the matting mask.The algorithm selects the semi-transparent part of the foreground area based on the similarity of advanced image features in the semi-transparent area and the background area,alleviating the problem of expansion errors in the semi-transparent area.The algorithm can significantly improve the trimap quality of translucent foreground images and make up for the shortcomings of the first work.3)for the above works suitable for different matting scenarios and unable to solve the diversified problems of matting application scenarios,a matting software based on trimap quality improvement that can handle different matting scenarios uniformly is constructed.By integrating the above two trimap expansion works for different foreground categories,a trimap expansion algorithm based on transparency judgement is designed.On the basis of expanding the background area using semantic features,it determines the transparency category of pixels according to the category feature similarity and image feature similarity between pixels,and uniformly solves the trimap expansion problem in different matting scenarios.Practice shows that this software can obtain high-quality matting masks from low-quality trimaps in different matting scenarios. |