The invention discloses a pure-color
background image matting synthesis method based on real-time inhibition of
background color overflow, and relates to the technical field of
video image processing,and the method comprises the steps: extracting an alpha channel graph alpha of an input
video image Input through employing an image matting
algorithm; according to the alpha channel graph alpha andan input
video image Inputimg, calculating and obtaining a foregroundimg; identifying a foreground pixel subjected to
background color overflow in the foregroundimage, changing a
background color channel value of the foreground pixel subjected to background color overflow by utilizing a three-
primary color forming principle, and recovering a pixel value of the foreground pixel to obtain a recovered foreground image foreimg; combining a classical synthesis
algorithm with the
recovery foreground image foreimg, the to-be-synthesized
background image backgroundimg and the alpha channel image alphato complete preliminary synthesis, thereby obtaining a preliminary synthesis image Cinit; carrying out foreground and background edge
processing on the restored foreground image foreimg to obtain a synthesized edge image edgeimg; and combining the synthesized edge image edgeimg and the preliminary synthesized image Cinit by using a restoration formula to obtain a final synthesized image Cfinal. The method has the advantages that background color overflow can be better removed, and meanwhile, the transition of the front background edge is more natural during synthesis.