CN102254332A - Oil painting generating method and system based on mobile terminal - Google Patents

Oil painting generating method and system based on mobile terminal Download PDF

Info

Publication number
CN102254332A
CN102254332A CN2011102085617A CN201110208561A CN102254332A CN 102254332 A CN102254332 A CN 102254332A CN 2011102085617 A CN2011102085617 A CN 2011102085617A CN 201110208561 A CN201110208561 A CN 201110208561A CN 102254332 A CN102254332 A CN 102254332A
Authority
CN
China
Prior art keywords
oil painting
pixel
color range
color
maker
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.)
Granted
Application number
CN2011102085617A
Other languages
Chinese (zh)
Other versions
CN102254332B (en
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.)
Shenzhen Konka Telecommunications Technology Co Ltd
Original Assignee
Konka Group Co Ltd
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 Konka Group Co Ltd filed Critical Konka Group Co Ltd
Priority to CN201110208561.7A priority Critical patent/CN102254332B/en
Publication of CN102254332A publication Critical patent/CN102254332A/en
Application granted granted Critical
Publication of CN102254332B publication Critical patent/CN102254332B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides an oil painting generating method based on a mobile terminal. The oil painting generating method comprises the following steps: a. an input unit inputs images to an oil painting generator; b. the oil painting generator is used for initializing the input images; c. the images undergo blocking, gradation and statistics; and d. the processing results of all the images are drawn to an oil painting layer, and the images of the oil painting are stored. In the oil painting generating method, the oil painting generator creates the oil painting layer and obtains two control parameters of a paint brush and color gradation, the images undergo blocking, gradation and statistics, and then the processing results of all the pixels are drawn to the oil painting layer, and finally the images of the oil painting are stored so as to generate an oil painting which is extremely similar to a real oil painting. The oil painting generating method disclosed by the invention has the advantages of simpleness and feasibility, low cost, good effect and the like.

Description

Based on the method and system that generate oil painting on the portable terminal
Technical field
The present invention relates to communication technique field, relate in particular to a kind of based on the method and system that generate oil painting on the portable terminal.
Background technology
At present, oil painting has the branch of own handwriting oil painting and digital oil painting, oil painting is the works by the pure manual drawing of artist in one's own handwriting, and digital oil painting, have another name called digital colored drawing and coding oil painting, be by special process paintings to be processed into lines and numeric character, drafting person is as long as fill out the corresponding pigment that indicates number, the Freehandhand-drawing product that just can finish in indicating the district that colors in of number.
Oil painting is representing of the superb art of oil painter in one's own handwriting, has only the oil painter to draw out, and the amateur is difficult to realize; Though the numeral oil painting can be made by common drafting person, cost is than higher, and except corresponding starting material, filling hundreds and thousands of kinds of colors is very time-consuming procedure; In one's own handwriting oil painting and digital oil painting all are difficult to realize that it is unlikely especially to make the oil painting film on portable terminal (such as PDA, mobile phone, digital camera) equipment.
Summary of the invention
The object of the present invention is to provide a kind of method and system, arbitrary image can be transformed into oil painting based on generation oil painting on the portable terminal.
The objective of the invention is to be achieved through the following technical solutions.
A kind of based on the method that generates oil painting on the portable terminal, comprising: following steps:
A: the input block input picture is to the oil painting maker;
B: the oil painting maker carries out initialization process to input picture;
C: image is carried out piecemeal, sublevel, statistical treatment;
D: each treatment of picture result is plotted to oil painting figure layer, and preserves the oil painting image.
Preferably, initialization process comprises described in the step b: create an oil painting figure layer, and the control module controlled variable that gets parms.
Preferably, piecemeal described in the step c is handled and is specially: to each pixel of input picture, be that a square is set up at the center with this pixel, the oil painting pixel value of this pixel will be calculated by the pixel distribution in the square of place, and the length of side of square is controlled by the paintbrush parameter; The computing formula of the length of side of square is:
w=b*2+1
Wherein w is the length of side of square; B is the paintbrush size parameter.
Preferably, sublevel described in the step c is handled and is specially: the monochrome information according to color is carried out sublevel to color, and the brightness span of color is [0,255], evenly divide according to the color range size parameter,
The computing formula that color range is divided is:
s=(R*0.299+G*0.587+B*0.114)*n/256
Wherein s is the color range at pixel place; N is the color range size parameter; R, G, B are respectively red, green, blue three color components of pixel.
Preferably, statistical treatment is specially described in the step c:
1) which color range calculating pixel belongs to,
2) frequency with corresponding color range increases 1,
3) this color of pixel value is added in three statistical values of R, G, B of corresponding color range,
4) the three-component mean value of R, G, B of obtaining the maximum color range of frequency is as the oil painting pixel value, and the computing formula of oil painting pixel value is:
O = Σ i = - b i = b Σ j = - b j = b P ( i , j ) * s t
Wherein O is the oil painting pixel value of piecemeal central point; (i j) is the original pixel value of the capable j row point of i in the segmented areas to P; S gets 1 when the color range at the pixel place of the capable j of an i row point is the color range of frequency maximum, otherwise s gets 0; T is the maximum frequency value of color range.
A kind of based on the system that generates oil painting on the portable terminal, comprising: oil painting maker and the input block, output unit and the parameter control unit that link to each other with the oil painting maker respectively;
Input block is used for input color image and gives the oil painting maker;
The oil painting maker is used to create an oil painting figure layer, and the control module controlled variable that gets parms, so that image is carried out piecemeal, sublevel, statistical treatment; And the image rendering after will handling is on oil painting figure layer;
Parameter control unit is used to control oil painting maker controlled variable;
Output unit is used to preserve the image that is plotted on the oil painting figure layer.
Preferably, described parameter control unit comprises: paintbrush parameter and color range parameter.
Preferably, described oil painting maker comprises: divide module unit, sublevel unit and statistic unit.
The embodiment of the invention compared with prior art, the oil painting maker is created an oil painting figure layer among the present invention, and obtain paintbrush and two controlled variable of color range, by image being carried out after piecemeal, sublevel, the statistical treatment that the result of each pixel is plotted to oil painting figure layer, preserve the oil painting image at last, to produce and the real very approaching oil of oil painting.Have simple, advantage such as cost is low, and is effective.
Description of drawings
Fig. 1 is a system principle diagram of the present invention;
Fig. 2 is the inventive method process flow diagram.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with drawings and Examples.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
See also shown in Figure 1ly, system principle diagram of the present invention comprises: oil painting maker and the input block, output unit and the parameter control unit that link to each other with the oil painting maker respectively;
Input block is used for input color image and gives the oil painting maker;
The oil painting maker is used to create an oil painting figure layer, and the control module controlled variable that gets parms, so that image is carried out piecemeal, sublevel, statistical treatment; And the image rendering after will handling is on oil painting figure layer;
Parameter control unit is used to control oil painting maker controlled variable, comprising: paintbrush parameter and color range parameter;
The oil painting maker comprises: divide module unit, sublevel unit and statistic unit.
Output unit is used to preserve the image that is plotted on the oil painting figure layer.
See also shown in Figure 2ly, process flow diagram of the present invention may further comprise the steps:
Step 201: the input block input picture is to the oil painting maker;
Step 202: the oil painting maker carries out initialization process to input picture;
Initialization process comprises: create an oil painting figure layer, and the control module controlled variable that gets parms;
Step 203: image is carried out piecemeal, sublevel, statistical treatment;
A: piecemeal is handled
Each pixel for input color image, need be that a square is set up at the center all with this pixel, the oil painting pixel value of this pixel will be calculated by the pixel distribution in the square of place, the length of side of square is controlled by the paintbrush parameter, this parameter is equivalent to the paintbrush width that oil painting drafting person uses when drawing oil painting, paintbrush is wide more, and oil painting is just rough more, paintbrush is narrow more, and oil painting is just fine and smooth more.
The computing formula of the square length of side is:
w=b*2+1
Wherein w is the length of side of square; B is the paintbrush size parameter; Be equivalent to when piecemeal with center pixel up and down, left and right four direction expands a paintbrush size unit.
B: sublevel is handled
A pixel is made up of R, G, three components of B, the span of each component is [0,255], three-component can be formed 16777216 rank colors, therefore the color of coloured image is very rich and varied, it is block that but the characteristics color of oil painting becomes, oil painting drafting person is when drawing oil painting, each pen all is a kind of color, so need to reduce the exponent number of color, the color range number is by the control of color range parameter, and what of color category that oil painting drafting person uses are this parameter be equivalent to, the color category that uses is many more, and oil painting is just bright-coloured more.Among the present invention, come color is carried out sublevel according to the monochrome information of color, the brightness span of color is [0,255], evenly divides according to the color range size parameter.
The computing formula that color range is divided is:
s=(R*0.299+G*0.587+B*0.114)*n/256
Wherein s is the color range at pixel place; N is the color range size parameter; R, G, B are respectively red, green, blue three color components of pixel.
C: statistical treatment
After a pixel of coloured image carried out piecemeal, sublevel, just can add up the colouring information of this pixel place square, and then try to achieve the oil painting pixel value of this point.Statistic processes to each pixel in the square is as follows:
1) which color range calculating pixel belongs to
2) frequency with corresponding color range increases 1
3) this color of pixel value is added in three statistical values of R, G, B of corresponding color range
4) the three-component mean value of R, G, B of obtaining the maximum color range of frequency as the computing formula of oil painting pixel value oil painting pixel value is:
O = Σ i = - b i = b Σ j = - b j = b P ( i , j ) * s t
Wherein O is the oil painting pixel value of piecemeal central point; (i j) is the original pixel value of the capable j row point of i in the segmented areas to P; S gets 1 when the color range at the pixel place of the capable j of an i row point is the color range of frequency maximum, otherwise s gets 0; T is the maximum frequency value of color range.
Step 204~step 205: each treatment of picture result is plotted to oil painting figure layer, and preserves the oil painting image.
The present invention can be used for producing the oil painting scene, makes the oil painting film, and the oil painting cartoon is for digital oil painting technology merchant provides a kind of new method by digital picture revolution word oil painting.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (8)

1. the method based on generation oil painting on the portable terminal is characterized in that, comprising: following steps:
A: the input block input picture is to the oil painting maker;
B: the oil painting maker carries out initialization process to input picture;
C: image is carried out piecemeal, sublevel, statistical treatment;
D: each treatment of picture result is plotted to oil painting figure layer, and preserves the oil painting image.
2. as claimed in claim 1 based on the method that generates oil painting on the portable terminal, it is characterized in that initialization process comprises described in the step b: create an oil painting figure layer, and the control module controlled variable that gets parms.
3. as claimed in claim 1 based on the method that generates oil painting on the portable terminal, it is characterized in that, piecemeal described in the step c is handled and is specially: to each pixel of input picture, with this pixel is that a square is set up at the center, the oil painting pixel value of this pixel will be calculated by the pixel distribution in the square of place, and the length of side of square is controlled by the paintbrush parameter; The computing formula of the length of side of square is:
w=b*2+1
Wherein w is the length of side of square; B is the paintbrush size parameter.
4. as claimed in claim 3 based on the method that generates oil painting on the portable terminal, it is characterized in that, sublevel described in the step c is handled and is specially: the monochrome information according to color is carried out sublevel to color, the brightness span of color is [0,255], evenly divide according to the color range size parameter, the computing formula that color range is divided is:
s=(R*0.299+G*0.587+B*0.114)*n/256
Wherein s is the color range at pixel place; N is the color range size parameter; R, G, B are respectively red, green, blue three color components of pixel.
5. as claimed in claim 4 based on the method that generates oil painting on the portable terminal, it is characterized in that statistical treatment described in the step c is specially:
1) which color range calculating pixel belongs to,
2) frequency with corresponding color range increases 1,
3) this color of pixel value is added in three statistical values of R, G, B of corresponding color range,
4) the three-component mean value of R, G, B of obtaining the maximum color range of frequency is as the oil painting pixel value, and the computing formula of oil painting pixel value is:
O = Σ i = - b i = b Σ j = - b j = b P ( i , j ) * s t
Wherein O is the oil painting pixel value of piecemeal central point; (i j) is the original pixel value of the capable j row point of i in the segmented areas to P; S gets 1 when the color range at the pixel place of the capable j of an i row point is the color range of frequency maximum, otherwise s gets 0; T is the maximum frequency value of color range.
6. the system based on generation oil painting on the portable terminal is characterized in that, comprising: oil painting maker and the input block, output unit and the parameter control unit that link to each other with the oil painting maker respectively;
Input block is used for input color image and gives the oil painting maker;
The oil painting maker is used to create an oil painting figure layer, and the control module controlled variable that gets parms, so that image is carried out piecemeal, sublevel, statistical treatment; And the image rendering after will handling is on oil painting figure layer;
Parameter control unit is used to control oil painting maker controlled variable;
Output unit is used to preserve the image that is plotted on the oil painting figure layer.
7. as claimed in claim 6 based on the system that generates oil painting on the portable terminal, it is characterized in that described parameter control unit comprises: paintbrush parameter and color range parameter.
8. as claimed in claim 6 based on the system that generates oil painting on the portable terminal, it is characterized in that described oil painting maker comprises: divide module unit, sublevel unit and statistic unit.
CN201110208561.7A 2011-07-25 2011-07-25 Oil painting generating method and system based on mobile terminal Expired - Fee Related CN102254332B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110208561.7A CN102254332B (en) 2011-07-25 2011-07-25 Oil painting generating method and system based on mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110208561.7A CN102254332B (en) 2011-07-25 2011-07-25 Oil painting generating method and system based on mobile terminal

Publications (2)

Publication Number Publication Date
CN102254332A true CN102254332A (en) 2011-11-23
CN102254332B CN102254332B (en) 2015-06-17

Family

ID=44981573

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110208561.7A Expired - Fee Related CN102254332B (en) 2011-07-25 2011-07-25 Oil painting generating method and system based on mobile terminal

Country Status (1)

Country Link
CN (1) CN102254332B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102496139A (en) * 2011-11-28 2012-06-13 江南大学 Image processing-based method for transforming photo to digital oil painting
CN104766355A (en) * 2015-04-22 2015-07-08 哈尔滨工业大学 Splash-color painting interactive system based on handwriting analysis and method for generating digital splash-color painting in real time through system
CN110264419A (en) * 2019-06-11 2019-09-20 山东师范大学 Realize image style conversion method, system, equipment and the medium of oil paint effect
CN114283211A (en) * 2021-12-30 2022-04-05 西安纽扣软件科技有限公司 Pixel color filling game system and processing method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101794454A (en) * 2010-04-08 2010-08-04 西安交通大学 Oil painting stylizing method based on image
CN101853517A (en) * 2010-05-26 2010-10-06 西安交通大学 Real image oil painting automatic generation method based on stroke limit and texture

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101794454A (en) * 2010-04-08 2010-08-04 西安交通大学 Oil painting stylizing method based on image
CN101853517A (en) * 2010-05-26 2010-10-06 西安交通大学 Real image oil painting automatic generation method based on stroke limit and texture

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
AARON HERTZMANN: "Painterly Rendering with Curved Brush Strokes of Multiple Sizes", 《SIGGRAPH 98 FLORIDA USA》 *
熊蔡明: "数字艺术画的计算机绘制", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102496139A (en) * 2011-11-28 2012-06-13 江南大学 Image processing-based method for transforming photo to digital oil painting
CN104766355A (en) * 2015-04-22 2015-07-08 哈尔滨工业大学 Splash-color painting interactive system based on handwriting analysis and method for generating digital splash-color painting in real time through system
CN104766355B (en) * 2015-04-22 2018-04-10 哈尔滨工业大学 Bold and vigorous colour painting interactive system based on graphology analysis and generate the method that colour painting is sprinkled in digitlization in real time using the system
CN110264419A (en) * 2019-06-11 2019-09-20 山东师范大学 Realize image style conversion method, system, equipment and the medium of oil paint effect
CN110264419B (en) * 2019-06-11 2021-10-01 山东师范大学 Image style conversion method, system, equipment and medium for realizing oil painting effect
CN114283211A (en) * 2021-12-30 2022-04-05 西安纽扣软件科技有限公司 Pixel color filling game system and processing method

Also Published As

Publication number Publication date
CN102254332B (en) 2015-06-17

Similar Documents

Publication Publication Date Title
CN107609587B (en) Multi-class multi-view data generation method for generating countermeasure network based on deep convolution
CN105118027B (en) A kind of defogging method of image
CN105374007A (en) Generation method and generation device of pencil drawing fusing skeleton strokes and textural features
CN109829868B (en) Lightweight deep learning model image defogging method, electronic equipment and medium
CN102254332B (en) Oil painting generating method and system based on mobile terminal
CN103793888B (en) Image enhancing method based on main colors of reference image
CN110149507A (en) Method for processing video frequency, data processing equipment and storage medium
WO2018045769A1 (en) Method and device for implementing tone variation animation on basis of attribute animation
CN104966320A (en) Method for automatically generating camouflage pattern based on three-order Bezier curve
CN111179370B (en) Picture generation method and device, electronic equipment and storage medium
CN104915975A (en) Image processing method and system for simulating crayon colored drawing
AU2018226403B2 (en) Brush stroke generation with deep neural networks
CN109600605A (en) Detection method, electronic equipment and the computer program product of 4K ultra high-definition video
CN104091366A (en) Three-dimensional intelligent digitalization generation method and system based on two-dimensional shadow information
CN105763768A (en) Image processing method, device and system
CN105955754B (en) A kind of user interface character displaying method and device
CN102750671A (en) Image colorful noise removal method
CN112819096A (en) Method for constructing fossil image classification model based on composite convolutional neural network
CN103957343B (en) A kind of colour errors method of diffusion
CN105488769A (en) Real time video defogging method
CN104077794A (en) Picture staining method and device
CN104732495A (en) Automatic-toning image processing method and system based on fuzzing
CN105551011B (en) A kind of setting method and device of dominant hue
Jing Design and realization of animation composition and tone space conversion algorithm
CN105654017B (en) Two-dimentional decoding transmission method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20170322

Address after: 518053 Nanshan District, Guangdong overseas Chinese town, Shantou street, No. 7, No.

Patentee after: Shenzhen KONKA Telecommunications Technology Co., Ltd.

Address before: 518000 Nanshan District, Guangdong overseas Chinese town Shennan Road, No. 9008, No.

Patentee before: Konka Group Co., Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150617

Termination date: 20200725