CN101075350A - Assembly for converting two-dimensional cartoon into three-dimensional cartoon by dynamic outline technology - Google Patents
Assembly for converting two-dimensional cartoon into three-dimensional cartoon by dynamic outline technology Download PDFInfo
- Publication number
- CN101075350A CN101075350A CNA2007100557848A CN200710055784A CN101075350A CN 101075350 A CN101075350 A CN 101075350A CN A2007100557848 A CNA2007100557848 A CN A2007100557848A CN 200710055784 A CN200710055784 A CN 200710055784A CN 101075350 A CN101075350 A CN 101075350A
- Authority
- CN
- China
- Prior art keywords
- animation
- image
- images
- dimensional animation
- dimensional
- 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
Links
Images
Landscapes
- Image Analysis (AREA)
Abstract
本发明属于图像信号处理技术领域,涉及一种利用动态轮廓技术实现二维动画到三维动画转换的组件,其采用将原有动画影片逐帧采集到计算机内存中,利用数学算子对整体图像进行分析的方法,根据图像闭合边缘信息将整体图像分为几个不同区域,并根据连续的多帧图像中每个区域的变化情况,将整体图像相应的分为若干幅图像并将其存储于不同文件。在播放动画片时,存储各区域图像的这些文件同时播放,并且不同文件播放的图像映射在不同层的屏幕上,从而实现了二维动画到三维动画的转换。本发明解决了三维动画电影的片源问题,降低了三维动画影片的价格。The invention belongs to the technical field of image signal processing, and relates to a component for realizing conversion from two-dimensional animation to three-dimensional animation by using dynamic contour technology. The original animation film is collected into the computer memory frame by frame, and the overall image is processed by mathematical operators. The analysis method divides the overall image into several different regions according to the closed edge information of the image, and according to the change of each region in the continuous multi-frame images, the overall image is correspondingly divided into several images and stored in different document. When the animation is played, these files storing the images of each area are played simultaneously, and the images played by different files are mapped on screens of different layers, thereby realizing the conversion from two-dimensional animation to three-dimensional animation. The invention solves the film source problem of the three-dimensional animation film and reduces the price of the three-dimensional animation film.
Description
技术领域:Technical field:
本发明属于图像信号处理技术领域,涉及一种利用动态轮廓技术实现二维动画到三维动画转换的组件。The invention belongs to the technical field of image signal processing, and relates to a component for realizing conversion from two-dimensional animation to three-dimensional animation by using dynamic contour technology.
背景技术:Background technique:
三维动画电影技术在博物馆、电影城及游乐场等场所中应用十分广泛,但我国的三维动画电影设备大多依赖进口,三维动画电影的影片仅能从国外公司购买,渠道有限,且价格高昂。3D animation film technology is widely used in museums, movie theaters and amusement parks, etc. However, most of the 3D animation film equipment in my country relies on imports, and 3D animation film films can only be purchased from foreign companies, with limited channels and high prices.
发明内容:Invention content:
针对我国的三维动画电影设备大多依赖进口,三维动画电影的影片仅能从国外公司购买,渠道有限,且价格高昂的问题,本发明提供一种利用动态轮廓技术实现二维动画到三维动画转换的组件,针对二维动画片画面简单、轮廓清晰、形态变化规律,并且图像背景与前景易于区分等特点,将原有动画影片逐帧采集到计算机内存中,借助图像处理方法,提取二维图像中的轮廓信息,进行区域分割,并将各区域进行前景与背景的层次划分,将我国原有二维动画片转换为三维动画片,解决了三维动画电影的片源问题,降低了三维动画影片的价格。Aiming at the problem that most of the 3D animation film equipment in our country relies on imports, and the films of 3D animation films can only be purchased from foreign companies, the channels are limited, and the price is high. Aiming at the characteristics of 2D cartoons such as simple picture, clear outline, regular shape changes, and easy distinction between image background and foreground, the original animation film is collected into the computer memory frame by frame, and the two-dimensional image is extracted by means of image processing methods. Outline information of 3D animation films can be divided into regions, and each region is divided into foreground and background levels, and the original 2D cartoons in China are converted into 3D cartoons, which solves the source problem of 3D animation films and reduces the cost of 3D animation films. price.
本发明包括:The present invention includes:
利用数学算子对整体图像进行分析,搜索出图像边缘的装置;A device that uses mathematical operators to analyze the overall image and search for the edge of the image;
按照图像闭合边缘信息将整体图像分为几个不同区域的装置;A device for dividing the overall image into several different regions according to the closed edge information of the image;
根据连续的多帧图像中每个区域的变化情况,将整体图像相应的分为若干幅图像并将其存储于不同文件的装置。According to the change of each area in the continuous multi-frame images, the overall image is correspondingly divided into several images and stored in different files.
在播放动画片时,存储各区域图像的这些文件同时播放,并且不同文件播放的图像映射在不同层的屏幕上。通常,与形态变化很小的区域对应的文件图像作为背景区域映射在最后一层屏幕上,变化最剧烈的区域对应的文件图像作为的第一前景区域映射在最前面一层屏幕上,从而达到二维动画到三维动画的转换。When the animation is played, these files storing the images of each region are played simultaneously, and the images played by different files are mapped on screens of different layers. Usually, the document image corresponding to the area with little morphological change is mapped on the last layer of screen as the background area, and the document image corresponding to the area with the most drastic change is mapped on the front layer of the screen as the first foreground area, so as to achieve 2D animation to 3D animation conversion.
有益效果:本发明利用动态轮廓技术,针对二维动画片画面简单、轮廓清晰、形态变化规律,并且图像背景与前景易于区分等特点,将原有动画影片逐帧采集到计算机内存中,借助图像处理方法,提取二维图像中的轮廓信息,进行区域分割,并将各区域进行前景与背景的层次划分,将我国原有二维动画片转换为三维动画片,解决了三维电影影片片源的问题,降低了三维动画影片的价格。Beneficial effects: the present invention utilizes the dynamic outline technology to capture the original animation film into the computer memory frame by frame, aiming at the characteristics of simple two-dimensional cartoon picture, clear outline, regular shape change, and easy distinction between the image background and the foreground. The processing method extracts the contour information in the two-dimensional image, performs region segmentation, and divides each region into foreground and background layers, converts the original two-dimensional animation in my country into a three-dimensional animation, and solves the problem of the source of the three-dimensional film problem, reducing the price of 3D animation films.
附图说明Description of drawings
图1为本发明程序流程图。Fig. 1 is the procedure flow chart of the present invention.
图2为本发明二维动画图像分层原理示意图。Fig. 2 is a schematic diagram of the layering principle of the two-dimensional animation image of the present invention.
图3为本发明扇区标号示意图。FIG. 3 is a schematic diagram of sector numbers in the present invention.
图4为本发明3×3邻域示意图。FIG. 4 is a schematic diagram of a 3×3 neighborhood in the present invention.
具体实施方式Detailed ways
本发明采用VC++6.0编程,运行环境为PIII500以上,内存大于256MB,硬盘大于40GB的计算机。The present invention adopts VC++6.0 programming, and the operating environment is a computer with PIII500 or above, a memory greater than 256MB, and a hard disk greater than 40GB.
本发明具体实现方法如下:The concrete realization method of the present invention is as follows:
将原有动画影片逐帧采集到计算机内存中;Capture the original animation film frame by frame into the computer memory;
采用canny算子对整体图像进行分析,搜索出图像边缘;canny算子具有良好的定位精度和单边缘响应,边缘检测精度高。The canny operator is used to analyze the overall image and search for the edge of the image; the canny operator has good positioning accuracy and single edge response, and the edge detection accuracy is high.
按照图像闭合边缘信息将整体图像分为几个不同区域(如图1所示,分为4个区域,其中区域4为背景);According to the closed edge information of the image, the overall image is divided into several different regions (as shown in Figure 1, it is divided into 4 regions, wherein
根据连续的多帧图像中每个区域的变化情况,将整体图像相应的分为4幅图像并将其分别存储于4个文件。在播放动画片时,4个文件同时播放。通常,与形态变化很小的区域(区域4)对应的文件图像作为背景映射在最后一层屏幕上,变化最剧烈的区域(区域1)对应的文件图像作为的第一前景映射在最前面一层屏幕上。变化较为剧烈的区域(区域2)对应的文件图像作为第二前景映射在第二层屏幕上,变化较为缓慢的区域(区域3)对应的文件图像作为第三前景映射在第三层屏幕上。According to the change of each region in the continuous multi-frame images, the overall image is correspondingly divided into 4 images and stored in 4 files respectively. When playing animation, 4 files are played at the same time. Usually, the file image corresponding to the region with little morphological change (region 4) is mapped on the last layer of screen as the background, and the file image corresponding to the region with the most drastic change (region 1) is mapped on the front as the first foreground layer on the screen. The file image corresponding to the area with relatively sharp change (area 2) is mapped on the second-layer screen as the second foreground, and the file image corresponding to the area with relatively slow change (area 3) is mapped on the third-layer screen as the third foreground.
Canny边缘检测算法步骤:Canny edge detection algorithm steps:
步骤1:用高斯滤波器平滑图像;Step 1: Smooth the image with a Gaussian filter;
步骤2:以图像上某一点作为基点,用一阶偏导的有限差分来计算检测点梯度的幅值和方向;Step 2: Taking a certain point on the image as the base point, use the finite difference of the first-order partial derivative to calculate the magnitude and direction of the gradient of the detection point;
步骤3:对梯度幅值进行非极大值抑制;Step 3: Perform non-maximum suppression on the gradient magnitude;
步骤4:用双阈值算法检测和连接边缘。Step 4: Detect and connect edges with a dual-threshold algorithm.
高斯平滑函数:Gaussian smoothing function:
G(x,y)=f(x,y)*H(x,y)G(x,y)=f(x,y)*H(x,y)
其中f(x,y)为某一图像像素点的灰度值或彩色值;H(x,y)为系数;G(x,y)为平滑后的灰度值或彩色值;a、b、σ是为了达到理想的平滑效果而通过计算机输入的参数。Where f(x, y) is the gray value or color value of an image pixel; H(x, y) is the coefficient; G(x, y) is the smoothed gray value or color value; a, b , σ are parameters input by the computer in order to achieve the ideal smoothing effect.
一阶差分卷积模版:First-order difference convolution template:
1(m,n)=f(m,n)*H1(x,y) 1 (m, n) = f(m, n)*H 1 (x, y)
2(m,n)=f(m,n)*H1(m,n) 2 (m, n)=f(m, n)*H 1 (m, n)
其中H1、H2为系数;f(m,n)为某一图像像素点的灰度值或彩色值;1(m,n)、2(m,n)是卷积结果;(m,n)是坐标为(m,n)的像素点梯度的幅值;θ是该像素点的方向角。Among them, H1 and H2 are coefficients; f(m, n) is the gray value or color value of a certain image pixel; 1 (m, n), 2 (m, n) are convolution results; (m , n) is the magnitude of the gradient of the pixel point whose coordinates are (m, n); θ is the orientation angle of the pixel point.
非极大值抑制的方法:Methods for non-maximum suppression:
仅仅得到全局的梯度并不足以确定边缘,因此为确定边缘,必须保留局部梯度最大的点,抑制非极大值。解决方法:利用梯度的方向。如图3和图4所示,四个扇区的标号为0到3,对应3*3邻域的四种可能组合0-1、1-2、2-3、3-0。Only obtaining the global gradient is not enough to determine the edge, so in order to determine the edge, the point with the largest local gradient must be retained and non-maximum values must be suppressed. Solution: Use the direction of the gradient. As shown in Figure 3 and Figure 4, the four sectors are labeled 0 to 3, corresponding to four possible combinations 0-1, 1-2, 2-3, 3-0 of the 3*3 neighborhood.
在每一点上,中心像素M与沿着梯度线的邻域两个像素相比。如果M的梯度值不比沿梯度线的两个相邻像素梯度值大,则令M的梯度值等于0,否则M的梯度值等于相邻像素的梯度值。即:N[i,j]=NMS(M[i,j],ξ[i,j]),其中N[i,j]为进行非极大值抑制后的梯度值,M[i,j]为中心像素M的梯度值,ξ[i,j]为相邻像素的梯度值。At each point, the center pixel M is compared to the neighbor two pixels along the gradient line. If the gradient value of M is not greater than the gradient values of two adjacent pixels along the gradient line, then the gradient value of M is equal to 0, otherwise the gradient value of M is equal to the gradient value of adjacent pixels. That is: N[i, j]=NMS(M[i, j], ξ[i, j]), where N[i, j] is the gradient value after non-maximum suppression, M[i, j ] is the gradient value of the central pixel M, and ξ[i, j] is the gradient value of adjacent pixels.
用双阈值算法检测和连接边缘的具体方法:The specific method of detecting and connecting edges with the double threshold algorithm:
减少假边缘段数量的典型方法是对N[i,j]使用一个阈值。将低于阈值的所有值赋零值。但问题是如何选取阈值?A typical way to reduce the number of false edge segments is to use a threshold on N[i,j]. Assign a value of zero to all values below the threshold. But the question is how to choose the threshold?
解决方法:双阈值算法。双阈值算法对非极大值抑制图像作用的两个阈值T1和T2,且2T1≈T2,从而可以得到两个阈值边缘图像N1[i,j]和N2[i,j]。由于N2[i,j]使用高阈值得到,因而含有很少的假边缘,但有间断(不闭合)。双阈值法要在N2[i,j]中把边缘连接成轮廓,当到达轮廓的端点时,该算法就在N1[i,j]的8邻点位置寻找可以连接到轮廓上的边缘,这样,算法不断地在N1[i,j]中收集边缘,直到将N2[i,j]连接起来为止。Solution: double threshold algorithm. The double-threshold algorithm has two thresholds T1 and T2 for non-maximum suppression images, and 2T1≈T2, so that two threshold edge images N1[i, j] and N2[i, j] can be obtained. Since N2[i, j] is obtained using a high threshold, it contains few false edges, but there are discontinuities (not closed). The double-threshold method needs to connect the edges into a contour in N2[i, j]. When the end point of the contour is reached, the algorithm searches for edges that can be connected to the contour at the 8 adjacent points of N1[i, j]. In this way, The algorithm keeps collecting edges in N1[i,j] until N2[i,j] is connected.
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2007100557848A CN101075350A (en) | 2007-06-20 | 2007-06-20 | Assembly for converting two-dimensional cartoon into three-dimensional cartoon by dynamic outline technology |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNA2007100557848A CN101075350A (en) | 2007-06-20 | 2007-06-20 | Assembly for converting two-dimensional cartoon into three-dimensional cartoon by dynamic outline technology |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101075350A true CN101075350A (en) | 2007-11-21 |
Family
ID=38976384
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNA2007100557848A Pending CN101075350A (en) | 2007-06-20 | 2007-06-20 | Assembly for converting two-dimensional cartoon into three-dimensional cartoon by dynamic outline technology |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101075350A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102426693A (en) * | 2011-10-28 | 2012-04-25 | 彩虹集团公司 | Method for converting 2D (two-dimensional) to 3D (three-dimensional) by gradient edge detection algorithm |
CN102507565A (en) * | 2011-11-30 | 2012-06-20 | 刘江 | Method for searching reaction color development area of immunochromatographic strip |
CN104268918A (en) * | 2014-10-09 | 2015-01-07 | 佛山精鹰传媒股份有限公司 | Method for blending two-dimensional animation and three-dimensional animation |
CN104711784A (en) * | 2015-04-01 | 2015-06-17 | 华中科技大学 | Method for obtaining sewing path of cut pieces |
CN105530505A (en) * | 2016-01-15 | 2016-04-27 | 传线网络科技(上海)有限公司 | Three-dimensional image conversion method and device |
CN107392930A (en) * | 2017-08-07 | 2017-11-24 | 重庆邮电大学 | A kind of quantum Canny edge detection methods |
CN114222181A (en) * | 2021-11-11 | 2022-03-22 | 北京达佳互联信息技术有限公司 | Image processing method, device, equipment and medium |
-
2007
- 2007-06-20 CN CNA2007100557848A patent/CN101075350A/en active Pending
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102426693A (en) * | 2011-10-28 | 2012-04-25 | 彩虹集团公司 | Method for converting 2D (two-dimensional) to 3D (three-dimensional) by gradient edge detection algorithm |
CN102426693B (en) * | 2011-10-28 | 2013-09-11 | 彩虹集团公司 | Method for converting 2D into 3D based on gradient edge detection algorithm |
CN102507565A (en) * | 2011-11-30 | 2012-06-20 | 刘江 | Method for searching reaction color development area of immunochromatographic strip |
CN102507565B (en) * | 2011-11-30 | 2013-10-16 | 刘江 | Method for searching reaction color development area of immunochromatographic strip |
CN104268918A (en) * | 2014-10-09 | 2015-01-07 | 佛山精鹰传媒股份有限公司 | Method for blending two-dimensional animation and three-dimensional animation |
CN104268918B (en) * | 2014-10-09 | 2015-06-10 | 佛山精鹰传媒股份有限公司 | Method for blending two-dimensional animation and three-dimensional animation |
CN104711784A (en) * | 2015-04-01 | 2015-06-17 | 华中科技大学 | Method for obtaining sewing path of cut pieces |
CN104711784B (en) * | 2015-04-01 | 2019-01-29 | 华中科技大学 | A method of obtaining pattern sewing path |
CN105530505A (en) * | 2016-01-15 | 2016-04-27 | 传线网络科技(上海)有限公司 | Three-dimensional image conversion method and device |
CN107392930A (en) * | 2017-08-07 | 2017-11-24 | 重庆邮电大学 | A kind of quantum Canny edge detection methods |
CN107392930B (en) * | 2017-08-07 | 2020-09-01 | 重庆邮电大学 | Quantum Canny edge detection method |
CN114222181A (en) * | 2021-11-11 | 2022-03-22 | 北京达佳互联信息技术有限公司 | Image processing method, device, equipment and medium |
CN114222181B (en) * | 2021-11-11 | 2024-03-12 | 北京达佳互联信息技术有限公司 | Image processing method, device, equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113052210B (en) | Rapid low-light target detection method based on convolutional neural network | |
US11398037B2 (en) | Method and apparatus for performing segmentation of an image | |
CN112308832B (en) | Bearing quality detection method based on machine vision | |
US8983178B2 (en) | Apparatus and method for performing segment-based disparity decomposition | |
CN101075350A (en) | Assembly for converting two-dimensional cartoon into three-dimensional cartoon by dynamic outline technology | |
CN113610778B (en) | Bridge surface crack detection method and system based on semantic segmentation | |
CN111429403A (en) | A defect detection method for automobile gear finished products based on machine vision | |
CN107038683B (en) | Panoramic imaging method of moving target | |
CN1545064A (en) | Infrared and visible light image fusion method | |
Sharma et al. | Edge detection using Moore neighborhood | |
CN111986170A (en) | Defect detection algorithm based on Mask R-CNN (deep neural network) | |
CN111798359A (en) | A deep learning-based image dewatermarking method | |
CN108805056A (en) | A kind of monitoring camera-shooting face sample extending method based on 3D faceforms | |
WO2017020393A1 (en) | Motion estimation method and motion estimation system based on block matching, and application thereof | |
Xu et al. | Fast and accurate object detection using image cropping/resizing in multi-view 4K sports videos | |
CN110910497A (en) | Method and system for realizing augmented reality map | |
CN119693823A (en) | Processing method and system for full scene object segmentation based on large visual model | |
CN112101440A (en) | Coronage substance ejection detection method based on improved U-Net network | |
CN100337472C (en) | Video composing method with motion prospect | |
CN110738625B (en) | Image resampling method, device, terminal and computer readable storage medium | |
KR20140138046A (en) | Method and device for processing a picture | |
CN118212511A (en) | Underwater scene simultaneous positioning and mapping method with uneven illumination | |
CN117036235A (en) | Relay protection cabinet terminal wire arrangement sequence detection method | |
CN117173205A (en) | Image rapid segmentation method based on multi-scale transducer | |
CN106780559B (en) | A moving target detection method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Open date: 20071121 |