CN108665512A - A kind of adaptive halftone method for drafting - Google Patents

A kind of adaptive halftone method for drafting Download PDF

Info

Publication number
CN108665512A
CN108665512A CN201810292866.2A CN201810292866A CN108665512A CN 108665512 A CN108665512 A CN 108665512A CN 201810292866 A CN201810292866 A CN 201810292866A CN 108665512 A CN108665512 A CN 108665512A
Authority
CN
China
Prior art keywords
value
pixel
picture
halftoning
drafting
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
CN201810292866.2A
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.)
Shanghai Dianji University
Original Assignee
Shanghai Dianji 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 Shanghai Dianji University filed Critical Shanghai Dianji University
Priority to CN201810292866.2A priority Critical patent/CN108665512A/en
Publication of CN108665512A publication Critical patent/CN108665512A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a kind of adaptive halftone method for drafting, color character based on Target Photo, prepare the halftoning operator of a variety of different sizes and characteristic, it is characterized as that different halftoning operators is adaptive selected in each pixel according to neighborhood of pixels, it is translated into the binarized pixel point with level effect, it is plotted on painting canvas picture, form special halftoning effect, its half-tone picture generated seems to have a sense of hierarchy, it is imbued with transformation, halftoning is interesting, and half tone image has controllability.Method for drafting through the invention can be used for commercial Art Design scheme, advertisement, product introduction etc..

Description

A kind of adaptive halftone method for drafting
Technical field
The present invention relates to a kind of halftoning method for drafting of electronic pictures more particularly to a kind of adaptive halftone drafting sides Method belongs to digital multimedia field.
Background technology
Current halftoning method for drafting is essentially all the specific embodiment party for focusing on each halftoning method for drafting Formula does not account for the variation of the picture color feature of source picture, these methods are when carrying out halftoning drafting, to source picture Halftoning conversion is carried out using unified halftoning operator, the variation of color character abundant on the picture of source can not be adapted to.
Invention content
The technical problem to be solved by the present invention is to:How adaptively according to the selection of color features different switching of source picture Operator.
In order to solve the above-mentioned technical problem, the technical solution of the present invention is to provide a kind of adaptive halftone drafting sides Method, which is characterized in that include the following steps:
1. reading the pixel data of the size of Target Photo, dimensional information and picture;
2. establishing painting canvas picture so that the painting canvas picture is identical as the size of Target Photo, and dimension is identical;
3. selecting a current pixel k from the pixel matrix of Target Photo so that pk=T (x, y), wherein p are colors Coloured silk value, T (x, y) refers to the pixel value of the location of pixels (x, y) obtained from Target Photo;Investigate pixel k location peripheral region Color character, and color character normalized to 0~1 numerical value;
4. according to normalization numerical value, a halftoning operator is selected, which is applied to the neighborhood of k pixels, is calculated To new pixel value pk', and black, white two-value is converted into according to predetermined threshold value;
5. on painting canvas picture so that C (x, y)=pk', C (x, y) refers to the location of pixels obtained from painting canvas picture The pixel value of (x, y);
6. if also have untreated pixel, return to step 3 on Target Photo;Otherwise it arrives in next step;
7. show canvas picture.
Preferably, the Target Photo is color image or gray scale picture.
Preferably, the painting canvas picture of establishing in the step 2 is by replicating Target Photo, you can directly obtains painting canvas Picture.
Preferably, the selection of the pixel in the step 3, it is desirable that be that can traverse all picture pixels points.
Further, the selection method of the pixel in the step 3 is sequential selection, random selection.
Preferably, the color character of the pixel in the step 3:Refer to the numerical characteristic of a certain pixel on picture, packet Gray value, color-values, the statistical value of the neighborhood of pixels, the textural characteristics of pixel are included, the general character of these features is:Number can be used Value description, and the numerical value can be normalized to 0~1;The statistical value of neighborhood of pixels includes that color mean value, the gray scale of neighborhood of pixels are equal Value, color variance, gray variance, COLOR COMPOSITION THROUGH DISTRIBUTION, intensity profile.
Preferably, the selection halftoning operator in the step 4:According to the normalization numerical value of the pixel, select respectively Different halftoning operators;The halftoning operator:There is a series of halftoning operator to supply each pixel selection, selection According to the color character normalized value for being exactly the neighborhood of pixels, there are many various sizes of operator is available for halftoning operator.
Preferably, the predetermined threshold value in the step 4 is empirical value, is set as the intermediate value of gray value.
The present invention is based on the color characters of Target Photo, prepare the halftoning operator of a variety of different sizes and characteristic, according to Neighborhood of pixels is characterized as that different halftoning operators is adaptive selected in each pixel, is translated into level effect Binarized pixel point, be plotted on painting canvas picture, form special halftoning effect, the half-tone picture generated seems to have levels Sense, it is imbued with transformation, halftoning is interesting, and half tone image has controllability.Method for drafting through the invention, can For commercial Art Design scheme, advertisement, product introduction etc..
Description of the drawings
Fig. 1 is a kind of flow chart of adaptive halftone method for drafting.
Specific implementation mode
In order to make the present invention more obvious and understandable, hereby with preferred embodiment, and attached drawing is coordinated to be described in detail below.
The present invention is a kind of adaptive halftone method for drafting, converts Target Photo to halftoning in an adaptive way Picture, and show on the screen.As shown in Figure 1, the method for drafting of the present invention includes the following steps:
1. reading the pixel data of the size of Target Photo T, dimensional information and picture;Target Photo can be it is colored or Person's gray scale picture is gray scale picture in most cases;
In the present embodiment, a gray scale picture T is selected.
2. establishing painting canvas picture C so that the painting canvas picture is identical as Target Photo size, and dimension is identical;
In the present embodiment, Target Photo T is replicated, painting canvas picture C is directly obtained, painting canvas is gradually substituted in subsequent operation Pixel value in picture C.
3. selecting a current pixel k from the pixel matrix of Target Photo T so that pk=T (x, y), wherein p are colors Coloured silk value, T (x, y) refers to the pixel value of the location of pixels (x, y) obtained from Target Photo T.Investigate pixel k location peripheral region Color character, and color character normalized to 0~1 numerical value;
The selection method of pixel:It can be with sequential selection, random selection or other selection methods, it is desirable that be that can traverse institute Some picture pixels points;
The color character of pixel:Refer to the numerical characteristic of a certain pixel on picture, such as the gray value of pixel, color-values Statistical value (the color mean value of its neighborhood, gray average, color variance, the gray scale side of (red, green, blue component value), the neighborhood of pixels Difference, COLOR COMPOSITION THROUGH DISTRIBUTION, intensity profile etc.), textural characteristics etc., the general character of these features is:It can be described with numerical value, and the numerical value It can be normalized to 0~1;
In the present embodiment, pixel is selected successively according to sequence from top to bottom, from left to right, with 3 × 3 neighborhood of pixel Color character of the Variance feature as pixel.
4. according to normalization numerical value, a halftoning operator is selected, which is applied to the neighborhood of k pixels, is calculated To new pixel value pk', and black, white two-value is converted into according to predetermined threshold value;
Select halftoning operator:According to the normalization numerical value of the pixel, different halftoning operators is selected respectively;
Halftoning operator:In the present embodiment, have a series of halftoning operator supply each pixel selection, selection according to According to the color character normalized value for being exactly the neighborhood of pixels, halftoning operator usually has error Propagation Property, and there are many different The operator of size is available;
In the present embodiment, there is 3 halftoning operators are selective to be used for calculating pk’:
Operator a:
In the operator of 2 row 3 row, X indicates that the position overlapped with current pixel k, remaining 5 numerical value of operator correspond to k 5 corresponding positions of surrounding, calculating defer to operator and calculate conventional method:Respective pixel around the coefficient and k of operator each position Value, which is multiplied, to be made and result of calculation pk’.Following computational methods are identical.
Operator b:
Operator c:
Predetermined threshold value:This is empirical value, is traditionally arranged to be the intermediate value of gray value, such as 128;
In the present embodiment, threshold value is set as 128, examines or check the affiliated section of normalization numerical value of pixel neighborhoods feature, for [0,0.333), [and 0.334,0.666), [0.666,1] three different sections have following three different operators corresponding:
Section [0,0.333), selection opertor a
Section [0.333,0.666), selection opertor b
Section [0.666,1], selection opertor c.
5. on painting canvas picture C so that C (x, y)=pk', that is to say, that by value pk' it is assigned to the picture with position with pixel k Pixel on cloth picture C;
6. if also have untreated pixel, return to step 3 on Target Photo T;Otherwise it arrives in next step;
7. show canvas picture.
By above scheme, by Target Photo by adaptive mode, halftoning effect is completed on painting canvas picture, Adaptive mode so that draw effect has impact force and aesthetic feeling very much.
Wherein:
Target Photo:Refer to using computer document as all kinds of electronic pictures of storage mode, including colored or gray scale figure Piece, these pictures are the artworks for being converted into half-tone, and the effect after conversion should be using the diagram as target.
Halftoning is drawn:By each gray-scale pixels of Target Photo, is converted, be converted into black or white pixel with certain Point, the method being plotted on new painting canvas.
Painting canvas picture:Refer to blank electronic image to be drawn, forms the electricity of desired effect after halftoning is completed Sub-pictures.
Drawing:Refer to using various electronic displays or tool as the drafting mode of carrier.Electronic display or tool Including but not limited to following manner:Electronic-paper display screen, cathode-ray imaging display, liquid crystal display, laser projection display mode. It is to transmit vision signal by computer to complete to electronic display that it, which is drawn,.
Halftoning operator:It is the ginseng for referring to be applied in picture color data, implement the mathematical operation of halftoning drafting Number, the detailed process and mode of this mathematical operation depend on each specific implementation method.In halftoning drafting, this meter It calculates and is known as error propagation and calculates, the value for the current pixel being calculated is known as error propagation gray value, according to preset threshold value, Convert current pixel to black, white two-value.
Color character:Refer to the numerical characteristic of picture pixels element, such as the gray value of pixel, color-values (red, green, blue Component value), range statistics value (the color mean value of a certain pixel region, gray average, color variance, gray variance, color point Cloth, intensity profile etc.), texture etc..
The present invention can select some existing operators, be chosen according to the converting characteristic of each operator.In the present invention Various sizes of operator is mainly selected according to the difference of the variance of color.
In step 4 " operator is applied to the neighborhood of k pixels, new pixel value p is calculatedk' ", this is operator reality The canonical algorithm mode applied is exactly that operator is done multiply-add operations by the pixel value of corresponding position in aligned pixel, with picture of X.
Such as:Picture pixels opsition dependent arrangement partial value be:
Using aforementioned operator a, it is assumed that the 3rd pixel of the 2nd row that current processing values are 87, then just by the X of a and 87 weights Folded, the pixel value on corresponding position does multiply-add operation with operator value, obtains the new pixel value pk ' of the pixel, as follows:
Operator a:
Pending pixel:
Operation is as follows:
pk'=0*34+66* (7/16)+7* (3/16)+78* (5/16)+54* (1/16).
Other operators equally calculate.

Claims (8)

1. a kind of adaptive halftone method for drafting, which is characterized in that include the following steps:
1. reading the pixel data of the size of Target Photo, dimensional information and picture;
2. establishing painting canvas picture so that the painting canvas picture is identical as the size of Target Photo, and dimension is identical;
3. selecting a current pixel k from the pixel matrix of Target Photo so that pk=T (x, y), wherein p are color-values, T (x, y) refers to the pixel value of the location of pixels (x, y) obtained from Target Photo;Investigate the color of pixel k location peripheral region Feature, and color character is normalized to 0~1 numerical value;
4. according to normalization numerical value, a halftoning operator is selected, which is applied to the neighborhood of k pixels, is calculated new Pixel value pk', and black, white two-value is converted into according to predetermined threshold value;
5. on painting canvas picture so that C (x, y)=pk', C (x, y) refers to the location of pixels (x, y) obtained from painting canvas picture Pixel value;
6. if also have untreated pixel, return to step 3 on Target Photo;Otherwise it arrives in next step;
7. show canvas picture.
2. a kind of adaptive halftone method for drafting as described in claim 1, which is characterized in that the Target Photo is coloured silk Chromatic graph piece or gray scale picture.
3. a kind of adaptive halftone method for drafting as described in claim 1, which is characterized in that building in the step 2 Vertical painting canvas picture is by replicating Target Photo, you can directly obtains painting canvas picture.
4. a kind of adaptive halftone method for drafting as described in claim 1, which is characterized in that the picture in the step 3 The selection of element, it is desirable that be that can traverse all picture pixels points.
5. a kind of adaptive halftone method for drafting as claimed in claim 4, which is characterized in that the picture in the step 3 The selection method of element is sequential selection, random selection.
6. a kind of adaptive halftone method for drafting as described in claim 1, which is characterized in that the picture in the step 3 The color character of element:Refer to the numerical characteristic of a certain pixel on picture, including the gray value of pixel, color-values, the neighborhood of pixels Statistical value, textural characteristics, the general character of these features is:It can be described with numerical value, and the numerical value can be normalized to 0~1; The statistical value of neighborhood of pixels includes the color mean value of neighborhood of pixels, gray average, color variance, gray variance, COLOR COMPOSITION THROUGH DISTRIBUTION, ash Degree distribution.
7. a kind of adaptive halftone method for drafting as described in claim 1, which is characterized in that the choosing in the step 4 Select halftoning operator:According to the normalization numerical value of the pixel, different halftoning operators is selected respectively;The halftoning is calculated Son:There is a series of halftoning operator to supply each pixel selection, selection gist is exactly that the color character of the neighborhood of pixels is returned One change value, there are many various sizes of operator is available for halftoning operator.
8. a kind of adaptive halftone method for drafting as described in claim 1, which is characterized in that pre- in the step 4 If threshold value is empirical value, it is set as the intermediate value of gray value.
CN201810292866.2A 2018-04-03 2018-04-03 A kind of adaptive halftone method for drafting Pending CN108665512A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810292866.2A CN108665512A (en) 2018-04-03 2018-04-03 A kind of adaptive halftone method for drafting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810292866.2A CN108665512A (en) 2018-04-03 2018-04-03 A kind of adaptive halftone method for drafting

Publications (1)

Publication Number Publication Date
CN108665512A true CN108665512A (en) 2018-10-16

Family

ID=63782771

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810292866.2A Pending CN108665512A (en) 2018-04-03 2018-04-03 A kind of adaptive halftone method for drafting

Country Status (1)

Country Link
CN (1) CN108665512A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110524549A (en) * 2019-08-19 2019-12-03 广东智媒云图科技股份有限公司 A kind of picture-drawing method based on mechanical arm and riveting gun, apparatus and system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103279965A (en) * 2013-04-24 2013-09-04 上海电机学院 Generation method for two-value stipple effect picture and video

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103279965A (en) * 2013-04-24 2013-09-04 上海电机学院 Generation method for two-value stipple effect picture and video

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王晓红等: "一种改进误差扩散系数的半色调算法", 《包装工程》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110524549A (en) * 2019-08-19 2019-12-03 广东智媒云图科技股份有限公司 A kind of picture-drawing method based on mechanical arm and riveting gun, apparatus and system

Similar Documents

Publication Publication Date Title
CN105719608B (en) Image display method and image display
CN100470588C (en) Method of image color enhancement
CN101360250B (en) Immersion method and system, factor dominating method, content analysis method and parameter prediction method
CN106504212A (en) A kind of improved HSI spatial informations low-luminance color algorithm for image enhancement
CN101510299B (en) Image self-adapting method based on vision significance
CN103593830B (en) A kind of low illumination level video image enhancement
CN104376529B (en) A kind of gray level image colorization system and method based on GLCM
JPH04246690A (en) Method of displaying image having high quality by normal resolution
JP2003067758A (en) System for combining graphics forms in digital video pipeline
CN101569193A (en) Method, system and computer program product for video insertion
CN105809643B (en) A kind of image enchancing method based on adaptive block channel extrusion
CN101901475A (en) High dynamic range image tone mapping method based on retina adaptive model
CN105513123A (en) Image processing method
KR20200054299A (en) Color gamut mapping method and color gamut mapping device
CN103268472B (en) Lip detection method based on double-colored color space
CN101600039B (en) Method for converting halftone image, printing method and method for producing halftone shield
CN108665512A (en) A kind of adaptive halftone method for drafting
CN100562893C (en) Dynamic contrast extension circuit and method
WO2022120799A1 (en) Image processing method and apparatus, electronic device, and storage medium
TW499812B (en) Method to determine the semi-S curve tone process of digital image
Meng et al. Proposal of minimization problem based lightness modification method considering visual characteristics of protanopia and deuteranopia
CN103279965B (en) A kind of generation method of two-value stipple effect picture and video
TWI707307B (en) Image adjusting method
CN104835121B (en) Tone mapping method with entropy principle is constrained based on Infinite Norm
CN102254332B (en) Oil painting generating method and system based on mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20181016