CN101477695A - Method for fast painting image and video - Google Patents

Method for fast painting image and video Download PDF

Info

Publication number
CN101477695A
CN101477695A CNA2009100280162A CN200910028016A CN101477695A CN 101477695 A CN101477695 A CN 101477695A CN A2009100280162 A CNA2009100280162 A CN A2009100280162A CN 200910028016 A CN200910028016 A CN 200910028016A CN 101477695 A CN101477695 A CN 101477695A
Authority
CN
China
Prior art keywords
color
image
video
painted
coloring
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA2009100280162A
Other languages
Chinese (zh)
Inventor
姚莉
吉逸
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southeast University
Original Assignee
Southeast University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southeast University filed Critical Southeast University
Priority to CNA2009100280162A priority Critical patent/CN101477695A/en
Publication of CN101477695A publication Critical patent/CN101477695A/en
Pending legal-status Critical Current

Links

Images

Abstract

A method for rapid coloring images and videos relates to a method for coloring a gray image and a gray video into a colored image and a colored video, as well as re-coloring a colored image and a colored video. The method comprises the following steps: a small amount of color information is sketched by a user on the gray image; the local connection energy of a pixel is defined on the basis of the edge analysis and the analysis of texture pattern; the two-dimensional dynamic programming algorithm is adopted for calculating the minimum distance from the pixel to all known color points; and the distance is taken as a weight by which colors are mixed. The coloring method provided by the invention is rapid, and can enable the user to obtain a coloring effect picture in a real-time manner, thereby realizing interactive editing of the coloring effect picture. Due to a changing gradient of a color on a time axis, coloring is extended to the video. The re-coloring of the colored image can be realized by comprehensive constraint of color and brightness.

Description

The method of a kind of image and video fast colorizing
Technical field
The present invention relates to image and video fast colorizing method, what relate in particular to gray level image and video is colored as coloured image and screen and the method for restaining of coloured image and video.Belong to the Image Information Processing field.
Background technology
Can improve visual attraction greatly for interpolation colouring informations such as black-and-white photograph, classic black film, science data figure, also be video display worker's active demand for existing coloured image and restaining of video in addition.Painted (Colorization) is that Wilson Markle proposed in 1970, be used at first film industry, now making a general reference colouring information is added on still image and the dynamic video, is the process that a colouring information with three-dimensional adds the image or the video (being continuous a series of images) of the monochrome information of having only one dimension to.Therefore because different colors may show same brightness, the process of extrapolating value of color by gray level image is an ill-conditioning problem (ill-posed problem), the correct scheme that neither one is absolute.
Colorize method mainly is divided into two big classes: semi-automatic (Semi-automatic) is painted and user's guiding (User-guided) is painted.Relation between semi-automatic painted colouring information by the existing image library of analytic learning and brightness, the texture, with this relationship map to new gray level image, realization gray-scale map painted.The benefit of this class colorize method is exactly the participation that does not need the people, can carry out painted to image, video in batches, but semi-automatic colorize method is quite high for the requirement of image library, and need carry out analytic learning to various situations, and often the result of Shi Xianing can not be satisfactory.The user guides the artificial interpolation part colouring information of painted needs, by computing machine other parts is carried out color again and fills.Because visual effect itself just has subjectivity, because people's participation strengthens painted constraint, can be more near expected effect.The painted main flow research direction that become of user's guiding.
Painted the biggest problem is exactly the big problem of calculated amount at present.Usually for computing time of the still image of a secondary 320*240 all more than 10 seconds, the user is difficult to the mutual painted result to image and makes amendment.Painted speed for video is slow especially.And the border color of existing colouring algorithm to obscure (color confusion) phenomenon very serious.
Summary of the invention
Technical matters: the objective of the invention is to the deficiency at existing dye technology: problems such as speed is slow, border color is obscured, interactivity difference provide a kind of real-time, interactive, brightness and texture pattern analysis-by-synthesis, add border and a kind of image of gradient constraint and the method for video fast colorizing.
Technical scheme: the present invention at first is mapped to three-dimensional color space with gray level image, and coloring problem is extrapolated unknown colouring information just by known brightness value in the image,
Following three hypothesis are at first proposed:
◆ the color of pixel correlativity of same area is big, and the color correlation of zones of different is little,
◆ the color of pixel of the similar brightness of the same area is also similar,
◆ change color is level and smooth;
As follows for the painted step of still image:
Steps A is added a little colouring information alternately with paintbrush tool on gray level image;
The Luminance Distribution of step B analysis-by-synthesis gray level image, texture distribute and edge of image distributes, and calculate the influence degree that is subjected to known color of the gray-scale pixels in the image;
Step C generates colour picture by color is carried out hybrid rending;
Step D user is as dissatisfied to partial result, can add again or revises colouring information by paintbrush tool, gets back to steps A, until obtaining satisfactory result.
Carry out painted for video (being continuous a series of images), continuous fragment at Same Scene, consider that brightness is similar in the variation of time shaft with color component, by a frame is wherein carried out mutual painted after, according to the variation of color at time shaft, with colouring information to adding other successive frames to.
Coloured image is carried out painted, only use and the Luminance Distribution among the step B is replaced known color distribution get final product.
Carrying out painted, traditional method for video (being continuous a series of images) is to utilize light stream to calculate, and inefficiency can't reach real-time.The present invention is directed to the continuous fragment of Same Scene, consider brightness and color component variation similarity at time shaft, by a frame is wherein carried out mutual painted after, according to the brightness intensity of variation colouring information is added to other successive frames, improved the painted efficient of video greatly.
Dissatisfied as the user to the color in coloured image or the video, its color is carried out part or whole process of replacing, be called restaining of coloured image.Only use the brightness analysis among the above-mentioned steps B is replaced with known color analysis, just painted calculation method can be applied on the restaining of coloured image.
Beneficial effect: compared with prior art, it is painted and restain method to the present invention proposes a kind of image of real-time, interactive and video.Solved that the classic method color is obscured, coloring process complexity, problem that calculated amount is big.For film industry, particularly the editor of cartoon is painted has very important significance.
Description of drawings
Fig. 1 is the entire block diagram of the colorize method of image of the present invention and video;
Embodiment
As shown in Figure 1, the input of colouring algorithm of the present invention can be a gray level image, coloured image or video data, need carry out scene earlier for video data cuts apart, and then the painted processing that the first two field picture of the continuous fragment of Same Scene is carried out, the user can interactivity the interpolation color pencil be drawn on the image, painted module jointing edge constraint and texture pattern analysis, there emerged a the shortest path of pixel by energy definition calculating to color dot, carry out the color value that blend of colors calculates each pixel then, and show in real time, as dissatisfied, can delineate or revise color again, till drawing result to local result.Also to utilize brightness to extrapolate color gradient for video is painted, carry out painted residue frame in the gradient of time shaft.
For ease of profound understanding technology contents of the present invention, the present invention is described in detail below in conjunction with accompanying drawing.
1. to the video data of input, carry out the successive frame contrast, think that when difference value surpasses threshold value scene changes.Continuous fragment for Same Scene is carried out painted respectively.At first extracting first two field picture carries out painted.
2. the user delineates out a little colored lines (seeing the intermediate data figure of Fig. 2) by paintbrush on gray-scale map.Painted target is exactly Luminance Distribution and the texture pattern by the analysis gray-scale map, and a little colouring information that utilizes the user to provide is extrapolated the color of entire image.Just find out one or several colour element that influences the gray-scale pixels maximum, carry out blend of colors again.We with its abstract be a shortest path minimum energy problem.The key problem of shortest path is a local link energy problem definition.We define: and J (p, q)=w GJ G(q)+w TJ T(p, q),
Wherein J is neighbor pixel p, the energy of q, J TBe texture pattern component, w EBe edge component weight, w GBe gradient component weight, w TBe texture pattern component weight.
3. edge extracting and analysis.In order to solve the problem that traditional stains method color is obscured, particularly to cartoon image, in local energy definition, we have added edge component, and adjust by weighted value the proportion of edge component: J ' (p, q)=w EJ E(p, q)+J ' (p, q)=w EJ E(p, q)+w GJ G(q)+w TJ T(p, q), J wherein EBe edge component, J GBe the gradient component.By edge extracting operator extraction edge pixel, and edge strength analyzed, passing through of color played attenuation.Can effectively prevent the generation of the phenomenon that color is obscured.
4. texture pattern analysis.Often exist a large amount of repetition textures in the image, extract, color is filled fracture and inaccurate occurs if be used as the edge merely.By the texture pattern analysis, find out the texture continuum, reduce this regional texture pattern component J T,, strengthen texture pattern component J in the part of texture variations TSimultaneously can strengthen texture pattern component weight w for the more image of repetition textures such as cartoon image T
5. according to the definition of above energy, the pixel of the connection energy that calculates constitutes a figure as node, obtains the bee-line of the pixel that each pixel delineates to the user.
6. blend of colors, the color that the user delineates is a kind of incessantly, and so every kind of color all can exert an influence to other pixels, and we mix then according to the bee-line to pixel of the every kind of color value that calculates:
C = Σw ( d c ) c Σw ( d c ) ,
Wherein C represents color of pixel value to be asked, d cFor the user of color c delineates pixel to the bee-line of waiting to ask pixel.W (.) hybrid weight, we define w ( r ) = e - τ 2 / 2 . In order to accelerate blend of colors speed, we only mix with the shortest front three of computed range.
7. the painted time shaft analysis of screen.When scene identical, and motion consecutive hours, our hypothesis color on time shaft also has continuity, adds the colouring information of painted first two field picture to other frame:
∂ Y ∂ t = ∂ U ∂ t = ∂ V ∂ t ,
Wherein t is the time, and Y, U, V are three components of YUV color space, and Y represents brightness, and U represents the first dimension colourity, and V represents the second dimension colourity, and the difference between Y and the V becomes aberration.
8. coloured image is restained.The user delineates a little colored lines in all the other of hope change color.Coloured image not only provides monochrome information, and colouring information also is provided.Colouring algorithm is added the color constraint, make and restain algorithm more fast with effective.Energy definition, shortest path and blend of colors are constant.

Claims (2)

1. the method for image and video fast colorizing is characterized in that at first gray level image is mapped to three-dimensional color space, coloring problem just becomes by known brightness value, extrapolates color component,
Following three hypothesis are at first proposed:
◆ the color of pixel correlativity of same area is big, and the color correlation of zones of different is little,
◆ the color of pixel of the similar brightness of the same area is also similar,
◆ change color is level and smooth;
As follows for the painted step of still image:
Steps A is added a little colouring information alternately with paintbrush tool on gray level image;
The Luminance Distribution of step B analysis-by-synthesis gray level image, texture distribute and edge of image distributes, and calculate the influence degree that is subjected to known color of the gray-scale pixels in the image;
Step C generates colour picture by color is carried out hybrid rending;
Step D user is as dissatisfied to partial result, can add again or revises colouring information by paintbrush tool, gets back to steps A, until obtaining satisfactory result.
Carry out painted for video, at the continuous fragment of Same Scene, consider that brightness is similar in the variation of time shaft with color component, by a frame is wherein carried out mutual painted after, according to the variation of color at time shaft, with colouring information to adding other successive frames to.
Dissatisfied as the user to the color in coloured image or the video, its color is carried out part or whole process of replacing, be called restaining of coloured image.Only use the brightness analysis among the above-mentioned steps B is replaced with known color analysis, just painted calculation method can be applied on the restaining of coloured image.
2. the method for image according to claim 1 and video fast colorizing is characterized in that, coloured image is carried out painted, only uses and the Luminance Distribution among the step B is replaced known color distribution gets final product.
CNA2009100280162A 2009-01-05 2009-01-05 Method for fast painting image and video Pending CN101477695A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2009100280162A CN101477695A (en) 2009-01-05 2009-01-05 Method for fast painting image and video

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2009100280162A CN101477695A (en) 2009-01-05 2009-01-05 Method for fast painting image and video

Publications (1)

Publication Number Publication Date
CN101477695A true CN101477695A (en) 2009-07-08

Family

ID=40838403

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2009100280162A Pending CN101477695A (en) 2009-01-05 2009-01-05 Method for fast painting image and video

Country Status (1)

Country Link
CN (1) CN101477695A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102542526A (en) * 2011-11-10 2012-07-04 浙江大学 Image decolorizing method
WO2015013908A1 (en) * 2013-07-31 2015-02-05 Microsoft Corporation Geodesic saliency using background priors
CN104978760A (en) * 2014-04-03 2015-10-14 英特尔公司 Mapping Multi-Rate Shading to Monolithic Program
CN105761292A (en) * 2016-02-29 2016-07-13 南京邮电大学 Image rendering method based on color shift and correction
TWI596572B (en) * 2016-07-06 2017-08-21 Method of automatically coloring image blocks
CN107301669A (en) * 2016-04-14 2017-10-27 北京大学 The processing method and processing unit of video image
CN108830912A (en) * 2018-05-04 2018-11-16 北京航空航天大学 A kind of interactive grayscale image color method of depth characteristic confrontation type study
WO2019153741A1 (en) * 2018-02-07 2019-08-15 京东方科技集团股份有限公司 Image coloring method and apparatus
CN111815733A (en) * 2020-08-07 2020-10-23 深兰科技(上海)有限公司 Video coloring method and system
CN112652023A (en) * 2020-11-30 2021-04-13 杭州缔特信息技术有限公司 Power grid commutation failure line range division algorithm based on color interpolation
CN112884866A (en) * 2021-01-08 2021-06-01 北京奇艺世纪科技有限公司 Coloring method, device, equipment and storage medium for black and white video
CN113228111A (en) * 2018-12-28 2021-08-06 Cy游戏公司 Image processing method, image processing system, and program

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102542526B (en) * 2011-11-10 2014-04-16 浙江大学 Image decolorizing method
CN102542526A (en) * 2011-11-10 2012-07-04 浙江大学 Image decolorizing method
US9697612B2 (en) 2013-07-31 2017-07-04 Microsoft Technology Licensing, Llc Geodesic saliency using background priors
WO2015013908A1 (en) * 2013-07-31 2015-02-05 Microsoft Corporation Geodesic saliency using background priors
CN104978760A (en) * 2014-04-03 2015-10-14 英特尔公司 Mapping Multi-Rate Shading to Monolithic Program
CN105761292B (en) * 2016-02-29 2018-06-12 南京邮电大学 One kind is based on color transfer and modified image rendering methods
CN105761292A (en) * 2016-02-29 2016-07-13 南京邮电大学 Image rendering method based on color shift and correction
CN107301669A (en) * 2016-04-14 2017-10-27 北京大学 The processing method and processing unit of video image
CN107301669B (en) * 2016-04-14 2020-07-14 北京大学 Video image processing method and processing device
TWI596572B (en) * 2016-07-06 2017-08-21 Method of automatically coloring image blocks
WO2019153741A1 (en) * 2018-02-07 2019-08-15 京东方科技集团股份有限公司 Image coloring method and apparatus
US11334973B2 (en) 2018-02-07 2022-05-17 Boe Technology Group Co., Ltd. Image colorizing method and device
CN108830912A (en) * 2018-05-04 2018-11-16 北京航空航天大学 A kind of interactive grayscale image color method of depth characteristic confrontation type study
CN113228111A (en) * 2018-12-28 2021-08-06 Cy游戏公司 Image processing method, image processing system, and program
CN111815733A (en) * 2020-08-07 2020-10-23 深兰科技(上海)有限公司 Video coloring method and system
CN112652023A (en) * 2020-11-30 2021-04-13 杭州缔特信息技术有限公司 Power grid commutation failure line range division algorithm based on color interpolation
CN112652023B (en) * 2020-11-30 2023-04-14 杭州缔特信息技术有限公司 Power grid commutation failure line range division algorithm based on color interpolation
CN112884866A (en) * 2021-01-08 2021-06-01 北京奇艺世纪科技有限公司 Coloring method, device, equipment and storage medium for black and white video
CN112884866B (en) * 2021-01-08 2023-06-06 北京奇艺世纪科技有限公司 Coloring method, device, equipment and storage medium for black-and-white video

Similar Documents

Publication Publication Date Title
CN101477695A (en) Method for fast painting image and video
CN102761766B (en) Method for depth map generation
US7035451B2 (en) Image conversion and encoding techniques
TWI524734B (en) Method and device for generating a depth map
CN100571335C (en) Image syncretizing effect real-time estimating method and device based on pixel space relativity
US8477135B2 (en) Method and apparatus for volume rendering using depth weighted colorization
CN104766071B (en) A kind of traffic lights fast algorithm of detecting applied to pilotless automobile
CN101635859A (en) Method and device for converting plane video to three-dimensional video
CN103093437A (en) Method and device for generating pencil drawing style image
CN106709901A (en) Simulation fog image generation method based on depth priori
US20170193644A1 (en) Background removal
CN110866882A (en) Layered joint bilateral filtering depth map restoration algorithm based on depth confidence
Jacob et al. Colorization of grayscale images and videos using a semiautomatic approach
CN102223545B (en) Rapid multi-view video color correction method
Konushin et al. Interactive image colorization and recoloring based on coupled map lattices
CN104680518A (en) Blue screen image matting method based on chroma overflowing processing
CN102289795B (en) Method for enhancing video in spatio-temporal mode based on fusion idea
CN1466737A (en) Image conversion and encoding techniques
Gong et al. Impacts of appearance parameters on perceived image quality for mobile-phone displays
CN107122715A (en) It is a kind of based on frequency when conspicuousness combine moving target detecting method
CN103514593B (en) Image processing method and device
CN113077533B (en) Image fusion method and device and computer storage medium
CN104408749A (en) Quick infrared colorful night vision realization method based on color mixing
CA2674104A1 (en) Method and graphical user interface for modifying depth maps
US8295539B2 (en) Method and system of immersive sensation enhancement for video sequence displaying

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Open date: 20090708