CN105430218B - Image color recognition methods and device - Google Patents

Image color recognition methods and device Download PDF

Info

Publication number
CN105430218B
CN105430218B CN201510846646.6A CN201510846646A CN105430218B CN 105430218 B CN105430218 B CN 105430218B CN 201510846646 A CN201510846646 A CN 201510846646A CN 105430218 B CN105430218 B CN 105430218B
Authority
CN
China
Prior art keywords
color
area
pixel number
image
kinds
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.)
Expired - Fee Related
Application number
CN201510846646.6A
Other languages
Chinese (zh)
Other versions
CN105430218A (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.)
Excellent Business (shanghai) Co Ltd
Original Assignee
Excellent Business (shanghai) 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 Excellent Business (shanghai) Co Ltd filed Critical Excellent Business (shanghai) Co Ltd
Priority to CN201510846646.6A priority Critical patent/CN105430218B/en
Publication of CN105430218A publication Critical patent/CN105430218A/en
Application granted granted Critical
Publication of CN105430218B publication Critical patent/CN105430218B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/00002Diagnosis, testing or measuring; Detecting, analysing or monitoring not otherwise provided for
    • H04N1/00005Diagnosis, testing or measuring; Detecting, analysing or monitoring not otherwise provided for relating to image data
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J29/00Details of, or accessories for, typewriters or selective printing mechanisms not otherwise provided for
    • B41J29/38Drives, motors, controls or automatic cut-off devices for the entire printing mechanism
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/56Processing of colour picture signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/56Processing of colour picture signals
    • H04N1/60Colour correction or control
    • H04N1/603Colour correction or control controlled by characteristics of the picture signal generator or the picture reproducer
    • H04N1/6033Colour correction or control controlled by characteristics of the picture signal generator or the picture reproducer using test pattern analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Image Analysis (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)

Abstract

The present embodiments relate to a kind of image color recognition methods and device, the method includes:Edge detection is carried out to pretreatment image, obtains edge pixel point;First area is determined according to the edge pixel point;Calculate the distance of the color value of arbitrary two kinds of colors in the first area;Two kinds of colors that the distance is less than to preset first threshold are determined as one group of Similar color;The more color of pixel number in every group of Similar color is identified as color of object;Set the sum of the pixel number of every group of Similar color to the pixel number of the color of object.Image color recognition methods provided in an embodiment of the present invention and device, method realize that simply, color recognition precision is high, disclosure satisfy that the needs that printing cost is calculated.

Description

Image color recognition methods and device
Technical field
The present invention relates to technical field of image processing more particularly to a kind of image color recognition methods and devices.
Background technology
Porous printing is collectively known as four big printing processes with flat stamping, convex print, gravure.Porous printing includes stencil, engraves Hole flower stencil, spraying decoration and silk-screen printing etc..The principle of porous printing is:(being produced in paper membrane version or other editions version bases can for printing plate Pass through the eyelet of ink) printing when, by certain pressure make the eyelet of ink through hole version be transferred to stock (paper, Ceramics etc.) on, form image or word.By the extruding of scraper plate when printing, the mesh that ink passes through areas is made to be transferred to On stock, the picture and text as original copy are formed.
In porous printing, screen printing apparatus is simple and convenient to operate, and is printed, simple and of low cost, adaptability of making a plate By force.Silk-screen printing has a wide range of application, and common print includes:Colored oil painting, pictorial poster, business card, binding and layout cover, commodity Label and printed textile etc..When carrying out silk-screen printing, the factor for influencing silk-screen printing cost is the number of colours of pattern.Cause This needs the number of colours for identifying printed pattern, to according to the color identified when carrying out silk-screen printing cost accounting Number calculates printing cost.
In the prior art, not high for the precision of pattern color identification, it cannot achieve accurately calculating for printing cost.
Invention content
The object of the present invention is to provide a kind of image color recognition methods and devices, to solve the precision of pattern color identification It is not high, it cannot achieve the problem of accurately calculating of printing cost.
To achieve the above object, the present invention provides a kind of image color recognition methods, the method includes:
Edge detection is carried out to pretreatment image, obtains edge pixel point;
First area is determined according to the edge pixel point;
Calculate the distance of the color value of arbitrary two kinds of colors in the first area;
Two kinds of colors that the distance is less than to preset first threshold are determined as one group of Similar color;
The more color of pixel number in every group of Similar color is identified as color of object;
Set the sum of the pixel number of every group of Similar color to the pixel number of the color of object.
On the other hand, the present invention provides a kind of image color identification device, described device includes:
Detection unit obtains edge pixel point for carrying out edge detection to pretreatment image;
First determination unit, for determining first area according to the edge pixel point;
Computing unit, the distance for calculating the color value of arbitrary two kinds of colors in the first area;
Second determination unit, for by the distance be less than preset first threshold two kinds of colors be determined as one group it is similar Color;
Recognition unit, for the more color of pixel number in every group of Similar color to be identified as color of object;
Setting unit, the pixel number for setting the sum of the pixel number of every group of Similar color to the color of object.
Image color recognition methods provided in an embodiment of the present invention and device, method realize simple, color recognition precision height, It disclosure satisfy that the needs that printing cost is calculated.
Description of the drawings
Fig. 1 is the flow chart of image color recognition methods provided in an embodiment of the present invention;
Fig. 2 is the schematic diagram of image color identification device provided in an embodiment of the present invention.
Specific implementation mode
Below by drawings and examples, technical scheme of the present invention will be described in further detail.
The color that technical solution of the present invention is suitable for identification is the color that human eye can be discovered.Technical solution of the present invention Image suitable for identification is clear-cut image, and only clear-cut image just supports silk-screen printing, and cost and face Form and aspect are closed.
Fig. 1 is the flow chart of image color recognition methods provided in an embodiment of the present invention.As shown in Figure 1, the present invention is implemented Example image color recognition methods include:
Step 101, edge detection is carried out to pretreatment image, obtains edge pixel point.
For the imperceptible color of human eye, most of marginal portion for being all present in image, it is therefore desirable to detect figure The edge pixel point of picture is to carry out subsequent processing.Image Edge-Detection is the prior art, is not described in detail herein.
Before step 101, the method further includes:
Images to be recognized is subjected to denoising, obtains pretreatment image.
Furthermore it is possible to which the image after denoising to be converted to the image of rgb space.For images to be recognized is converted to The image of rgb space is converted front and back image and is not different completely at this time from the point of view of the identification degree of human eye, the purpose of conversion It is the difficulty that can reduce computer identification color, algorithm is allow to identify color in the less space of color.
Step 102, first area is determined according to the edge pixel point.
Specifically, by centered on edge pixel point, the region other than surrounding presetted pixel number is determined as first area.
For example, after detecting edge pixel point, centered on edge pixel point, it is 3 to take presetted pixel number, then by edge picture The region of 3 × 3 pixels is considered as edge pixel point region around vegetarian refreshments, and the region other than edge pixel point region is determined as first Region, that is, non-edge pixels point region.Can set the RGB color value in edge pixel point region to (255,255, 255), it is convenient for subsequent processing non-edge pixels point.
After determining first area according to edge pixel point, the method further includes:
Count the color value of all pixels point and corresponding pixel number in non-edge pixels point region, and according to pixel number by It is more to few that color value is ranked up, by taking four kinds of colors of rgb color space as an example, as shown in table 1.
Color value Pixel number
RGB (255,123,44) 198
RGB (4,113,54) 122
RGB (34,223,144) 34
RGB (67,123,87) 33
Table 1
Step 103, the distance of the color value of arbitrary two kinds of colors in the first area is calculated.
For example, the color value of all colours of rgb space can be converted to the color value in the spaces LAB, then calculate again The Euclidean distance of arbitrary two kinds of color values.The pixel number of each color is constant after conversion.LAB color spaces are than rgb color sky Between closer to human vision.It is calculated on rgb color space, the premise of color identification can be met to greatest extent, i.e., Identify the number of colours for meeting eye recognition.
In non-edge pixels point region, arbitrary two kinds of face in the spaces LAB is calculated according to the sequence of color value from more to less The distance of the color value of color.According to formulaAccording to color value by more LAB values (the L of arbitrary two kinds of colors in first area is calculated to few sequence1 *, a1 *, b1 *) and (L2 *, a2 *, b2 *) distance, In, L1 *, a1 *, b1 *And L1 *, a1 *, b1 *The value in three channels of the LAB color spaces of respectively two kinds colors.
It should be noted that the color spaces such as LAB, HSB, YUV are all the color spaces that human eye can perceive, therefore at this Distance is calculated to weigh the close degree of color in a little spaces, is to be not regarded as a departure from this within the scope of the present invention The technological thought of invention.
Step 104, two kinds of colors for the distance being less than to preset first threshold are determined as one group of Similar color.
It should be noted that the color value using different color space calculates distance, the default of color similarity degree is weighed Threshold value is different.
Step 105, the more color of pixel number in every group of Similar color is identified as color of object.
For example, the LAB values of one group of Similar color are respectively (L1 *, a1 *, b1 *) and (L2 *, a2 *, b2 *), corresponding pixel number point It Wei not c1 *And c2 *(c1 *﹥ c2 *), then the color of object finally identified is that LAB values are (L1 *, a1 *, b1 *) color.
Step 106, the sum of the pixel number of every group of Similar color is set to the pixel number of the color of object.
Such as the example in step 105, the LAB values of the color of object finally identified are (L1 *, a1 *, b1 *), pixel number c1 * +c2 *
Image color recognition methods provided in an embodiment of the present invention realizes that simply, color recognition precision is high, disclosure satisfy that print The needs of brush cost accounting.
Fig. 2 is the schematic diagram of image color identification device provided in an embodiment of the present invention.As shown in Fig. 2, the present invention is implemented Example image color identification device include:Detection unit 201, the first determination unit 202, computing unit 203, the second determination unit 204, recognition unit 205 and setting unit 206.
Detection unit 201 obtains edge pixel point for carrying out edge detection to pretreatment image;
First determination unit 202, for determining first area according to the edge pixel point;
Computing unit 203, the distance for calculating the color value of arbitrary two kinds of colors in the first area;
Second determination unit 204, two kinds of colors for the distance to be less than to preset first threshold are determined as one group Similar color;
Recognition unit 205, for the more color of pixel number in every group of Similar color to be identified as color of object;
Setting unit 206, the pixel number for setting the sum of the pixel number of every group of Similar color to the color of object.
Optionally, described device further includes:
Pretreatment unit 207 obtains the pretreatment image for being pre-processed to images to be recognized.
Optionally, the first determination unit 202 is specifically used for:
Centered on the edge pixel point, the region other than surrounding presetted pixel number is determined as first area.
Optionally, described device further includes:
Statistic unit 208, for counting the color value of all pixels point and corresponding pixel number in the first area, and Color value is ranked up from more to less according to pixel number.
Optionally, the computing unit 203 is specifically used for:
Calculate the Euclidean distance of the color value of arbitrary two kinds of colors in the first area.
The method that the device that the embodiment of the present application two provides implants the offer of the embodiment of the present application one, therefore, the application carries The specific work process of the device of confession, does not repeat again herein.
Image color identification device provided in an embodiment of the present invention realizes that simply, color recognition precision is high, disclosure satisfy that print The needs of brush cost accounting.
Professional should further appreciate that, described in conjunction with the examples disclosed in the embodiments of the present disclosure Unit and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, hard in order to clearly demonstrate The interchangeability of part and software generally describes each exemplary composition and step according to function in the above description. These functions are implemented in hardware or software actually, depend on the specific application and design constraint of technical solution. Professional technician can use different methods to achieve the described function each specific application, but this realization It should not be considered as beyond the scope of the present invention.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can use hardware, processor to execute The combination of software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field In any other form of storage medium well known to interior.
Above-described specific implementation mode has carried out further the purpose of the present invention, technical solution and advantageous effect It is described in detail, it should be understood that the foregoing is merely the specific implementation mode of the present invention, is not intended to limit the present invention Protection domain, all within the spirits and principles of the present invention, any modification, equivalent substitution, improvement and etc. done should all include Within protection scope of the present invention.

Claims (6)

1. a kind of image color recognition methods, which is characterized in that the method includes:
Edge detection is carried out to pretreatment image, obtains edge pixel point;
First area is determined according to the edge pixel point;
Calculate the distance of the color value of arbitrary two kinds of colors in the first area;
Two kinds of colors that the distance is less than to preset first threshold are determined as one group of Similar color;
The more color of pixel number in every group of Similar color is identified as color of object;
Set the sum of the pixel number of every group of Similar color to the pixel number of the color of object;
Wherein, described to determine that first area specifically includes according to the edge pixel point:
Centered on edge pixel point, the region other than surrounding presetted pixel number is determined as first area;
The distance for calculating the color value of arbitrary two kinds of colors in the first area specifically includes:
The color value of all colours of rgb space is converted to the color value in the spaces LAB, is then calculated again arbitrary in first area The Euclidean distance of two kinds of color values.
2. image color recognition methods according to claim 1, which is characterized in that carrying out edge inspection to pretreatment image It surveys, before obtaining edge pixel point, the method further includes:
Images to be recognized is pre-processed, the pretreatment image is obtained.
3. image color recognition methods according to claim 1, which is characterized in that determined according to the edge pixel point After first area, the method further includes:
The color value of all pixels point and corresponding pixel number in the first area are counted, and right from more to less according to pixel number Color value is ranked up.
4. a kind of image color identification device, which is characterized in that described device includes:
Detection unit obtains edge pixel point for carrying out edge detection to pretreatment image;
First determination unit, for determining first area according to the edge pixel point;
Computing unit, the distance for calculating the color value of arbitrary two kinds of colors in the first area;
Second determination unit, two kinds of colors for the distance to be less than to preset first threshold are determined as one group of similar face Color;
Recognition unit, for the more color of pixel number in every group of Similar color to be identified as color of object;
Setting unit, the pixel number for setting the sum of the pixel number of every group of Similar color to the color of object;
Wherein, first determination unit is specifically used for:
Centered on edge pixel point, the region other than surrounding presetted pixel number is determined as first area;
The computing unit is specifically used for:
The color value of all colours of rgb space is converted to the color value in the spaces LAB, is then calculated again arbitrary in first area The Euclidean distance of two kinds of color values.
5. image color identification device according to claim 4, which is characterized in that described device further includes that pretreatment is single Member obtains the pretreatment image for being pre-processed to images to be recognized.
6. image color identification device according to claim 4, which is characterized in that described device further includes statistic unit, For counting the color value of all pixels point and corresponding pixel number in the first area, and it is right from more to less according to pixel number Color value is ranked up.
CN201510846646.6A 2015-11-27 2015-11-27 Image color recognition methods and device Expired - Fee Related CN105430218B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510846646.6A CN105430218B (en) 2015-11-27 2015-11-27 Image color recognition methods and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510846646.6A CN105430218B (en) 2015-11-27 2015-11-27 Image color recognition methods and device

Publications (2)

Publication Number Publication Date
CN105430218A CN105430218A (en) 2016-03-23
CN105430218B true CN105430218B (en) 2018-07-24

Family

ID=55508143

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510846646.6A Expired - Fee Related CN105430218B (en) 2015-11-27 2015-11-27 Image color recognition methods and device

Country Status (1)

Country Link
CN (1) CN105430218B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106057167B (en) * 2016-07-21 2019-04-05 京东方科技集团股份有限公司 A kind of method and device of pair of edge darkening processing of text
CN108460806A (en) * 2018-02-09 2018-08-28 西京学院 A kind of metal parts surface color visible detection method
CN109800772A (en) * 2019-01-30 2019-05-24 广州市载道信息科技有限公司 A kind of data identification method
CN109856051A (en) * 2019-01-30 2019-06-07 广州市载道信息科技有限公司 A kind of image color acquisition device
CN110335257A (en) * 2019-06-20 2019-10-15 东莞理工学院 A kind of image color detection method and mobile terminal
CN110458173A (en) * 2019-08-16 2019-11-15 京东数字科技控股有限公司 Method and apparatus for generating article color value

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1234569A (en) * 1998-02-06 1999-11-10 富士通株式会社 Apparatus of treating colour pictures and pattern extracting device
CN102096822A (en) * 2010-12-24 2011-06-15 华为终端有限公司 Color discrimination method and device
CN102473278A (en) * 2009-07-01 2012-05-23 佳能株式会社 Image processing apparatus, image processing method, and storage medium
CN104091353A (en) * 2014-06-20 2014-10-08 浙江大学 Method for extracting image color labels

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1234569A (en) * 1998-02-06 1999-11-10 富士通株式会社 Apparatus of treating colour pictures and pattern extracting device
CN102473278A (en) * 2009-07-01 2012-05-23 佳能株式会社 Image processing apparatus, image processing method, and storage medium
CN102096822A (en) * 2010-12-24 2011-06-15 华为终端有限公司 Color discrimination method and device
CN104091353A (en) * 2014-06-20 2014-10-08 浙江大学 Method for extracting image color labels

Also Published As

Publication number Publication date
CN105430218A (en) 2016-03-23

Similar Documents

Publication Publication Date Title
CN105430218B (en) Image color recognition methods and device
CN106096610B (en) A kind of file and picture binary coding method based on support vector machines
US9235126B1 (en) Flexographic surface patterns
CN112308063B (en) Character recognition device, translation pen, image translation method, and image translation device
CN109460762A (en) A kind of answering card methods of marking based on image recognition
JP6631000B2 (en) Information recording medium
CN110738119B (en) Bill identification method, device and equipment and readable medium
WO2017002475A1 (en) Individual identifier extraction device
CN107358184A (en) The extracting method and extraction element of document word
CN112446864A (en) Flaw detection method, flaw detection device, flaw detection equipment and storage medium
CN111259891B (en) Method, device, equipment and medium for identifying identity card in natural scene
CN109886914B (en) Paper defect detection method based on local brightness invariance prior
CN107944252A (en) A kind of method of information seal impression uniqueness characteristic extraction
CN110263616A (en) A kind of character recognition method, device, electronic equipment and storage medium
CN106156691B (en) method and device for processing complex background image
CN112085707B (en) Printed matter color detection method, device, equipment and medium
CN108965646B (en) Image processing apparatus, image processing method, and program
WO2018140001A1 (en) Print quality diagnosis
CN107451987B (en) System and method for detection and removal of thin lines in a graphical image
CN107094219A (en) Image processing apparatus and image processing method
JPWO2018173756A1 (en) Information recording medium
Pfeifer et al. Detection of commercial offset printing in counterfeited banknotes
CN108819492B (en) Digital sample printing color correcting method and device before environment protecting paper process color color printing
CN107766014A (en) Word information process method and device
CN109766063A (en) A kind of nail beauty machine printing calibration method, device, nail beauty machine and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
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: 20180724

Termination date: 20181127