CN107730508A - Color documents images multichannel binary processing method - Google Patents

Color documents images multichannel binary processing method Download PDF

Info

Publication number
CN107730508A
CN107730508A CN201710780085.3A CN201710780085A CN107730508A CN 107730508 A CN107730508 A CN 107730508A CN 201710780085 A CN201710780085 A CN 201710780085A CN 107730508 A CN107730508 A CN 107730508A
Authority
CN
China
Prior art keywords
images
gray
width
color documents
image
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
CN201710780085.3A
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 Infinitesimal Computer System Integration Co Ltd
Original Assignee
Shanghai Infinitesimal Computer System Integration 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 Shanghai Infinitesimal Computer System Integration Co Ltd filed Critical Shanghai Infinitesimal Computer System Integration Co Ltd
Priority to CN201710780085.3A priority Critical patent/CN107730508A/en
Publication of CN107730508A publication Critical patent/CN107730508A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics

Abstract

Present invention is disclosed a kind of color documents images multichannel binary processing method, extracts the gray value of color documents images triple channel respectively, obtains three width gray level images of the coloured image;Partitioned binarization is carried out respectively to three width gray level images, obtains three width binary images;Three width binary images are merged into a width binary image.Color documents images multichannel binary processing method proposed by the present invention, gray level image is obtained by extracting the gray value of color documents images triple channel respectively, remain whole colouring informations of color documents images, the shortcomings that losing a large amount of color informations during prior art coloured image gray processing is overcome, improves the accuracy that gray-scale map turns binary picture.The present invention synthesizes a width bianry image, is effectively utilized triple channel all colours information so that binaryzation result of the present invention is more accurate, and has certain anti-noise ability by carrying out threshold determination to each pixel of the respective binary image of triple channel.

Description

Color documents images multichannel binary processing method
Technical field
The invention belongs to technical field of image processing, is related to a kind of image processing method, more particularly to a kind of in colored text This image multichannel binary processing method.
Background technology
Binaryzation is the basic operation of image procossing, and only two kinds of colors of black and white are included for pending image to be converted to Bianry image, reduce image data amount, to highlight the profile of target interested.With digital image processing techniques Fast development, binaryzation application is also more and more extensive, also more and more important.For example, in OCR (Optical Character Recognition, optical character identification) in system, the quality of binary conversion treatment effect has a strong impact on the accuracy rate of OCR identifications.
At present, common binarization method is:First by coloured image gray processing, conventional gray processing method is by cromogram Triple channel gray scale as in is averaging to obtain a gray value;A global threshold is set to gray level image again, with the global threshold The data of gray level image are divided into two parts by value:Pixel group more than global threshold and the pixel group less than global threshold;Will be big It is set as white (or black) in the pixel value of the pixel group of global threshold, less than the pixel value setting of the pixel group of global threshold For black (or white).However, the method being averaging to the triple channel gray scale of coloured image can lose great amount of images useful information, And when the luminance background color or uneven foreground color of pending image, target image is entered using a global threshold The poor effect of row binaryzation.
In view of this, nowadays there is an urgent need to design a kind of new image processing method, to overcome conventional images processing side Drawbacks described above existing for method.
The content of the invention
The technical problems to be solved by the invention are:A kind of color documents images multichannel binary processing method is provided, Gray-scale map can be improved and turn binary picture accuracy.
In order to solve the above technical problems, the present invention adopts the following technical scheme that:
A kind of color documents images multichannel binary processing method, the gray scale of color documents images triple channel is extracted respectively Value, obtains three width gray level images of the coloured image;Partitioned binarization is carried out respectively to three width gray level images, obtains three width two-values Change image;Three width binary images are merged into a width binary image;
Methods described comprises the following steps:
Step S1, color documents images are read in;
The color documents images for treating binaryzation are read in, its size is M × N × 3, and M, N represent color documents images respectively Line number and columns, 3 represent three Color Channels of color documents images, are respectively red, green, blueness;
Step S2, gray-scale map is obtained;
The gray value of color documents images triple channel is extracted respectively;Obtain the width gray-scale map of gray_r, gray_g, gray_b tri- Picture;
Step S3, gray-scale map partitioned binarization;
Step S4, binary image is obtained;
- step S41, define a size and color documents images identical null matrix D;
- step S42, according to the following formula, to matrix D assignment
Wherein, (p, q) be matrix D in element coordinate, p=1,2 ... M, q=1,2 ... N, R (p, q), G (p, q), B (p, q) represents binary image R, G, B element coordinate respectively;
In step S3, described gray-scale map partitioned binarization comprises the following steps that:
Step S31, it is 16 × 16 elements to set window size, since first pixel of gray level image, to gray level image Adding window;
Step S32, the average gray value T in calculation window, the threshold value using T as pixel binaryzation in window;
Step S33, to each pixel binaryzation in window, when pixel value is more than or equal to T, then it is 255 to change pixel value, When pixel value is less than T, then it is 0 to change pixel value;
Step S34, window is step-length with 16, travels through view picture gray level image, until all pixels are binarized, obtains three width Binary image, respectively R, G, B.
A kind of color documents images multichannel binary processing method, the gray scale of color documents images triple channel is extracted respectively Value, obtains three width gray level images of the coloured image;Partitioned binarization is carried out respectively to three width gray level images, obtains three width two-values Change image;Three width binary images are merged into a width binary image.
As a preferred embodiment of the present invention, methods described comprises the following steps:
Step S1, color documents images are read in;
The color documents images for treating binaryzation are read in, its size is M × N × 3, and M, N represent color documents images respectively Line number and columns, 3 represent three Color Channels of color documents images, are respectively red, green, blueness;
Step S2, gray-scale map is obtained;
The gray value of color documents images triple channel is extracted respectively;Obtain the width gray-scale map of gray_r, gray_g, gray_b tri- Picture;
Step S3, gray-scale map partitioned binarization;
Step S4, binary image is obtained;
- step S41, define a size and color documents images identical null matrix D;
- step S42, according to the following formula, to matrix D assignment
Wherein, (p, q) be matrix D in element coordinate, p=1,2 ... M, q=1,2 ... N, R (p, q), G (p, q), B (p, q) represents binary image R, G, B element coordinate respectively.
As a preferred embodiment of the present invention, in step S3, the specific steps of described gray-scale map partitioned binarization are such as Under:
Step S31, it is 16 × 16 elements to set window size, since first pixel of gray level image, to gray level image Adding window;
Step S32, the average gray value T in calculation window, the threshold value using T as pixel binaryzation in window;
Step S33, to each pixel binaryzation in window, when pixel value is more than or equal to T, then it is 255 to change pixel value, When pixel value is less than T, then it is 0 to change pixel value;
Step S34, window is step-length with 16, travels through view picture gray level image, until all pixels are binarized, obtains three width Binary image, respectively R, G, B.
The beneficial effects of the present invention are:Color documents images multichannel binary processing method proposed by the present invention, lead to Undue you can well imagine takes the gray value of color documents images triple channel to obtain gray level image, remains whole face of color documents images Color information, overcome the shortcomings that lost a large amount of color informations during prior art coloured image gray processing so that the present invention Turn the advantages of binary picture accuracy is high with gray-scale map.
The present invention synthesizes a width two-value by carrying out threshold determination to each pixel of the respective binary image of triple channel Image, it is effectively utilized triple channel all colours information so that binaryzation result of the present invention is more accurate, and has certain anti-noise Ability.
Brief description of the drawings
Fig. 1 is the flow chart of color documents images multichannel binary processing method of the present invention.
Embodiment
The preferred embodiment that the invention will now be described in detail with reference to the accompanying drawings.
Embodiment one
Present invention is disclosed a kind of color documents images multichannel binary processing method, color documents images are extracted respectively The gray value of triple channel, obtain three width gray level images of the coloured image;Partitioned binarization is carried out respectively to three width gray level images, Obtain three width binary images;Three width binary images are merged into a width binary image.Due to the three of color documents images Passage gray value is obtained for sufficient utilization, therefore binaryzation result is more accurate.
Referring to Fig. 1, methods described specifically comprises the following steps:
【Step S1】Read in color documents images;
The color documents images for treating binaryzation are read in, its size is M × N × 3, and M, N represent color documents images respectively Line number and columns, 3 represent three Color Channels of color documents images, are respectively red, green, blueness;
【Step S2】Obtain gray-scale map;
The gray value of color documents images triple channel is extracted respectively;Obtain the width gray-scale map of gray_r, gray_g, gray_b tri- Picture;
【Step S3】Gray-scale map partitioned binarization;Comprise the following steps that:
Step S31, it is 16 × 16 elements to set window size, since first pixel of gray level image, to gray level image Adding window;
Step S32, the average gray value T in calculation window, the threshold value using T as pixel binaryzation in window;
Step S33, to each pixel binaryzation in window, when pixel value is more than or equal to T, then it is 255 to change pixel value, When pixel value is less than T, then it is 0 to change pixel value;
Step S34, window is step-length with 16, travels through view picture gray level image, until all pixels are binarized, obtains three width Binary image, respectively R, G, B.
【Step S4】Obtain binary image;
- step S41, define a size and color documents images identical null matrix D;
- step S42, according to the following formula, to matrix D assignment
Wherein, (p, q) be matrix D in element coordinate, p=1,2 ... M, q=1,2 ... N, R (p, q), G (p, q), B (p, q) represents binary image R, G, B element coordinate respectively.
In summary, color documents images multichannel binary processing method proposed by the present invention, by extracting coloured silk respectively The gray value of color text image triple channel obtains gray level image, remains whole colouring informations of color documents images, overcomes The shortcomings that a large amount of color informations being lost during prior art coloured image gray processing so that the present invention turns with gray-scale map The advantages of binary picture accuracy is high.
The present invention synthesizes a width two-value by carrying out threshold determination to each pixel of the respective binary image of triple channel Image, it is effectively utilized triple channel all colours information so that binaryzation result of the present invention is more accurate, and has certain anti-noise Ability.
Here description of the invention and application are illustrative, are not wishing to limit the scope of the invention to above-described embodiment In.The deformation and change of embodiments disclosed herein are possible, real for those skilled in the art The replacement and equivalent various parts for applying example are known.It should be appreciated by the person skilled in the art that the present invention is not being departed from Spirit or essential characteristics in the case of, the present invention can in other forms, structure, arrangement, ratio, and with other components, Material and part are realized.In the case where not departing from scope and spirit of the present invention, embodiments disclosed herein can be entered The other deformations of row and change.

Claims (3)

1. a kind of color documents images multichannel binary processing method, it is characterised in that extract color documents images three respectively The gray value of passage, obtain three width gray level images of the coloured image;Partitioned binarization is carried out respectively to three width gray level images, obtained To three width binary images;Three width binary images are merged into a width binary image;
Methods described comprises the following steps:
Step S1, color documents images are read in;
The color documents images for treating binaryzation are read in, its size is M × N × 3, and M, N represent the line number of color documents images respectively Three Color Channels of color documents images are represented with columns, 3, are respectively red, green, blueness;
Step S2, gray-scale map is obtained;
The gray value of color documents images triple channel is extracted respectively;Obtain the width gray level image of gray_r, gray_g, gray_b tri-;
Step S3, gray-scale map partitioned binarization;
Step S4, binary image is obtained;
- step S41, define a size and color documents images identical null matrix D;
- step S42, according to the following formula, to matrix D assignment
Wherein, (p, q) be matrix D in element coordinate, p=1,2 ... M, q=1,2 ... N, R (p, q), G (p, q), B (p, q) Binary image R, G, B element coordinate are represented respectively;
In step S3, described gray-scale map partitioned binarization comprises the following steps that:
Step S31, it is 16 × 16 elements to set window size, since first pixel of gray level image, to gray level image adding window;
Step S32, the average gray value T in calculation window, the threshold value using T as pixel binaryzation in window;
Step S33, to each pixel binaryzation in window, when pixel value is more than or equal to T, then it is 255 to change pixel value, works as picture Element value is less than T, then it is 0 to change pixel value;
Step S34, window is step-length with 16, travels through view picture gray level image, until all pixels are binarized, obtains three width two-values Change image, respectively R, G, B.
2. a kind of color documents images multichannel binary processing method, it is characterised in that extract color documents images three respectively The gray value of passage, obtain three width gray level images of the coloured image;Partitioned binarization is carried out respectively to three width gray level images, obtained To three width binary images;Three width binary images are merged into a width binary image.
3. color documents images multichannel binary processing method according to claim 2, it is characterised in that:
Methods described comprises the following steps:
Step S1, color documents images are read in;
The color documents images for treating binaryzation are read in, its size is M × N × 3, and M, N represent the line number of color documents images respectively Three Color Channels of color documents images are represented with columns, 3, are respectively red, green, blueness;
Step S2, gray-scale map is obtained;
The gray value of color documents images triple channel is extracted respectively;Obtain the width gray level image of gray_r, gray_g, gray_b tri-;
Step S3, gray-scale map partitioned binarization;
Step S4, binary image is obtained;
- step S41, define a size and color documents images identical null matrix D;
- step S42, according to the following formula, to matrix D assignment
Wherein, (p, q) be matrix D in element coordinate, p=1,2 ... M, q=1,2 ... N, R (p, q), G (p, q), B (p, q) Binary image R, G, B element coordinate are represented respectively.
CN201710780085.3A 2017-09-01 2017-09-01 Color documents images multichannel binary processing method Pending CN107730508A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710780085.3A CN107730508A (en) 2017-09-01 2017-09-01 Color documents images multichannel binary processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710780085.3A CN107730508A (en) 2017-09-01 2017-09-01 Color documents images multichannel binary processing method

Publications (1)

Publication Number Publication Date
CN107730508A true CN107730508A (en) 2018-02-23

Family

ID=61205405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710780085.3A Pending CN107730508A (en) 2017-09-01 2017-09-01 Color documents images multichannel binary processing method

Country Status (1)

Country Link
CN (1) CN107730508A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108229436A (en) * 2018-02-02 2018-06-29 杭州清本科技有限公司 Coloured image gray processing method and device, storage medium for certificate identification
CN109949210A (en) * 2019-03-07 2019-06-28 北京麦哲科技有限公司 A kind of removing method and device of scan image background
CN110763682A (en) * 2019-09-19 2020-02-07 湖北三江航天万峰科技发展有限公司 Method and system for detecting surface glaze shortage of ceramic tile
CN112508038A (en) * 2020-12-03 2021-03-16 江苏科技大学 Cross-channel local binary pattern color texture classification method
CN116303909A (en) * 2023-04-26 2023-06-23 山东齐鲁电子招标采购服务有限公司 Matching method, equipment and medium for electronic bidding documents and clauses

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130121575A1 (en) * 2011-11-11 2013-05-16 Seoul National University R&B Foundation Image analysis apparatus using main color and method of controlling the same
CN103914687A (en) * 2014-03-14 2014-07-09 常州大学 Rectangular-target identification method based on multiple channels and multiple threshold values
CN104504662A (en) * 2014-12-26 2015-04-08 北京慧眼智行科技有限公司 Homomorphic filtering based image processing method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130121575A1 (en) * 2011-11-11 2013-05-16 Seoul National University R&B Foundation Image analysis apparatus using main color and method of controlling the same
CN103914687A (en) * 2014-03-14 2014-07-09 常州大学 Rectangular-target identification method based on multiple channels and multiple threshold values
CN104504662A (en) * 2014-12-26 2015-04-08 北京慧眼智行科技有限公司 Homomorphic filtering based image processing method and system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108229436A (en) * 2018-02-02 2018-06-29 杭州清本科技有限公司 Coloured image gray processing method and device, storage medium for certificate identification
CN109949210A (en) * 2019-03-07 2019-06-28 北京麦哲科技有限公司 A kind of removing method and device of scan image background
CN110763682A (en) * 2019-09-19 2020-02-07 湖北三江航天万峰科技发展有限公司 Method and system for detecting surface glaze shortage of ceramic tile
CN112508038A (en) * 2020-12-03 2021-03-16 江苏科技大学 Cross-channel local binary pattern color texture classification method
CN112508038B (en) * 2020-12-03 2022-11-08 江苏科技大学 Cross-channel local binary pattern color texture classification method
CN116303909A (en) * 2023-04-26 2023-06-23 山东齐鲁电子招标采购服务有限公司 Matching method, equipment and medium for electronic bidding documents and clauses
CN116303909B (en) * 2023-04-26 2023-08-22 山东齐鲁电子招标采购服务有限公司 Matching method, equipment and medium for electronic bidding documents and clauses

Similar Documents

Publication Publication Date Title
CN107730508A (en) Color documents images multichannel binary processing method
CN106682629B (en) Identification algorithm for identity card number under complex background
CN105740860A (en) Automatic detection method for Chinese character area of shop sign in natural scene
CN103020917B (en) Method for restoring ancient Chinese calligraphy and painting images on basis of conspicuousness detection
CN1312625C (en) Character extracting method from complecate background color image based on run-length adjacent map
CN103093203A (en) Human body re-recognition method and human body re-recognition system
CN106096610A (en) A kind of file and picture binary coding method based on support vector machine
CN108921120B (en) Cigarette identification method suitable for wide retail scene
CN101295359A (en) Image processing program and image processing apparatus
CN105005766A (en) Vehicle body color identification method
CN109740572A (en) A kind of human face in-vivo detection method based on partial color textural characteristics
CN108711160B (en) Target segmentation method based on HSI (high speed input/output) enhanced model
CN106446885A (en) Paper-based Braille recognition method and system
CN116468640B (en) Video image enhancement method for Internet teaching
CN104751446A (en) Digital pattern feature based tie-dyeing process prediction method
CN111260645A (en) Method and system for detecting tampered image based on block classification deep learning
CN112215781B (en) Improved local binarization method
CN110400320B (en) Segmentation method of electrowetting defective pixels
CN106815580A (en) A kind of license plate locating method
CN116189194B (en) Drawing enhancement segmentation method for engineering modeling
CN116109933B (en) Dynamic identification method for ecological restoration of abandoned mine
CN105574837A (en) Image similarity matching method and device
CN111241916A (en) Method for establishing traffic sign recognition model
CN111414960A (en) Artificial intelligence image feature extraction system and feature identification method thereof
CN110619331A (en) Color distance-based color image field positioning method

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180223

RJ01 Rejection of invention patent application after publication