| With the rapid development of digital technology,there is higher quality requirements for television program production,images and video editing.Matting plays an important role in many image and video editing applications.It has been receiving extensive attention from researchers in film and television production,computer graphics,and the visual field,and conducting in-depth research.The matting refers to an algorithm that extracts a region of interest from the foreground and fuses it with another background,and generally includes a green screen imaging algorithm and a natural keying algorithm.At present,there are many mature imaging algorithms used in the industry,such as chroma key,chroma key,KNN keying,and so on.However,these algorithms still have problems such as speed and effect.To solve these problems,this paper proposes a real-time green screen matting and a deep portrait matting algorithm based on existing algorithms.The main work of the dissertation is as follows:(1)A real-time green screen matting based on CUD A architecture is proposed.The current green screen matting has hair loss,harder edges,spill,noise and other issues in some details.If there is no professional processing device to support these algorithms,it is difficult to deal with them in real time.In response to the above problems,we have proposed a real-time green screen matting framework that can handle the above problems at the same time and accelerate it with CUDA.First,use soft matte and hard matte methods to preserve the details of the hair;for harder edges,through dilate and excessive erode to deal with;despill is the use of red channels and blue channels to suppress the green channel to complete;to retain details De-noise uses a Gaussian low-pass filter.Finally,use CUDA to accelerate the algorithm in parallel to achieve real-time matching.The evaluation results show that the proposed framework has complete hair details,smooth edges,no background color,and no obvious noise in the composite image.In the GTX 1050Ti environment,the average processing time per frame is about 20ms,which can meet the real-time processing requirements.(2)A portrait matting using a deep neural network is proposed.There is a case where the current portrait matting data set is too small and there is an inaccurate data label.We designed a new model U-NetGANs to solve the two problems of data reinforcement and tag fault tolerance.U-NetGANs uses the GANs framework to train,generators use U-Net networks,and discriminators use AlexNet networks.In addition to solving the problem of small data volume and inaccurate labels,U-NetGANs also has the characteristics of fast network convergence.Experimental results show that compared with other network U-NetGANs,the number of iterations required is greatly reduced.In the MSE and Grad indicators,U-NetGANs has better performance of other networks. |