CN106096713B - A kind of coarse-fine second level paper counting method based on space and gray feature - Google Patents

A kind of coarse-fine second level paper counting method based on space and gray feature Download PDF

Info

Publication number
CN106096713B
CN106096713B CN201610425062.6A CN201610425062A CN106096713B CN 106096713 B CN106096713 B CN 106096713B CN 201610425062 A CN201610425062 A CN 201610425062A CN 106096713 B CN106096713 B CN 106096713B
Authority
CN
China
Prior art keywords
paper
trough
gray
wave crest
drop shadow
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.)
Active
Application number
CN201610425062.6A
Other languages
Chinese (zh)
Other versions
CN106096713A (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.)
Qinhe New Material Co.,Ltd.
Original Assignee
Hunan University of Technology
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 Hunan University of Technology filed Critical Hunan University of Technology
Priority to CN201610425062.6A priority Critical patent/CN106096713B/en
Publication of CN106096713A publication Critical patent/CN106096713A/en
Application granted granted Critical
Publication of CN106096713B publication Critical patent/CN106096713B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06MCOUNTING MECHANISMS; COUNTING OF OBJECTS NOT OTHERWISE PROVIDED FOR
    • G06M7/00Counting of objects carried by a conveyor
    • G06M7/02Counting of objects carried by a conveyor wherein objects ahead of the sensing element are separated to produce a distinct gap between successive objects
    • G06M7/06Counting of flat articles, e.g. of sheets of paper

Abstract

A kind of second level paper counting method based on space and gray feature, by by collected one folded paper image, first by image gray processing, then slant correction is carried out to image with the method that Hough changes, then drop shadow curve's figure is obtained after carrying out longitudinal projection to paper image, drop shadow curve's figure is handled using the method for Fuzzy Threshold, and determine preferable one group of property in wave crest and trough feature, paper is counted according to treated the wave crest of curve or the quantity of trough, obtains the preliminary quantity of this stacker.For paper, when arranging placement, there are paper adhesions, and can not detect number of paper with thick method of counting, according to the characteristic Design classification method of gray scale at paper adhesion and width anomalous variation.The gray scale difference of paper width and drop shadow curve trough point and drop shadow curve's mean value is calculated separately, drop shadow curve's average gray difference and paper mean breadth are then calculated, constitutes two-dimensional feature vector with paper width and gray scale difference;Classification finally is carried out to feature vector with K-means clustering procedure and judges paper adhesion quantity.

Description

A kind of coarse-fine second level paper counting method based on space and gray feature
Technical field
The present invention relates to a kind of method counted using paper space and gray feature paper, main application fields are Printing and packaging and paper industry.
Background technique
In printing and packaging industry, in order to accurately hold the paper inventory amounts and Quantity Shipped of our company, often It needs to carry out quantity to paper to check.Due in modern times printing and paper industry, number of paper is in large scale and modern life In work people to environmentally protective theory advocate and to the high request of printing paper quality, and to production and print in present society The mode that is counted of paper of brush packaging mostly all using manually checking by the way of or use mechanical equipment to paper into Row counts, although the method accuracy rate manually counted to paper or banknote is guaranteed to a certain extent, paper The speed counted especially when number of paper is more than 200 or more, will not only devote a tremendous amount of time, but also people also can slowly It generates and counts fatigue, people can also become tired while causing to count accuracy rate decline, generate paper counting fatigue.And it uses Although mechanical paper counting method counting efficiency is improved, due to connecing between paper and mechanical equipment Touching, will lead to paper contact between mechanical equipment when being checked in this way causes paper that can be worn, especially current Under conditions of people are more demanding to paper quality, mechanical equipment, which counts paper, can not meet the high standard of people and want It asks, simultaneously because mechanical equipment is counted, mechanical equipment will necessarily issue noise in the process of running, to environment and one Kind pollution, is not able to satisfy the life requirement of modern mans high standard, additionally due to be that mechanical equipment counts, necessarily one One is checked paper, and when number of paper is larger, paper counting is also required to for a long time, and counting efficiency is not To guarantee.Therefore, new a kind of just show based on efficient, noiseless, to the substantially harmless paper counting method of paper is developed Must be particularly important, this also has great importance for the automated enumeration of printing industry.
Summary of the invention
The purpose of the present invention is to provide a kind of paper counting method based on space and gray feature, this method by pair Image capture device is acquired the imaging effect figure of paper, after obtaining the image of paper, first to paper image feature into Row analysis and pretreatment, the quantity of paper is calculated using Fuzzy Threshold and detection curve peak valley point algorithm, is fundamentally solved Generated when it is slow and the shortcomings that cannot carry out for a long time manually to check speed, while solving mechanical equipment counting noise and The shortcomings that being taken a long time in the case that number of paper is more.
A kind of paper second level method of counting based on space and gray feature provided by the invention inclines paper to be detected Oblique being placed on scanner is scanned to obtain image, is then handled by the following method paper imaging effect figure.
A) image preprocessing: paper image is detected by acquired image gray processing, and using the method for Hough transform In straight line image is subjected to rotation and does slant correction according to the tilt angle of the slope meter nomogram picture of straight line;Label paper exists Start-stop point in image: in the acquired images according to feature of image, mainly according to the gray scale in image whether there is or not paper areas It is worth the feature of significant change, with algorithm recording paper starting and ending position.
B) image projection: the pixels tall that image chooses 1-500 is projected to obtain drop shadow curve's figure, by paper image Two dimensional character variation be one-dimensional characteristic, the direction and paper parallel stripes for projecting selection are consistent.
C) paper slightly counts:
The step of paper slightly counts is as follows:
(1) drop shadow curve obtained by projection finds out wave crest and trough all in curve, first root first with algorithm Calculating wave crest point average gray according to all wave crest points found out ispeak, the average gray for calculating all trough points isvallery, step S101;
(2) gap length between two adjacent peaks or trough is then found out respectively, then to all peak to peak separations Either paddy paddy interval is counted, and the higher gap length of the frequency of occurrences is found out, tentatively the thickness as a piece of paperlen.Together When according to all wave crests and trough in drop shadow curve, be one since paper image can be initially believed that between wave crest and wave crest Paper, step S102;
(3) use the function of Gaussian distributed as fuzzy subordinating degree function, with the thickness for the paper that primary Calculation obtains Degree is used as window width.It is moved in the region of entire drop shadow curve, all wave crests and all troughs is weighted respectively Summation, is worth biggish one group after finding out weighted sum, judges as preferable one group of property number of paper, step S103;
(4) judge since first point of the good wave crest of property (trough), if [len-wid,len+wid] range it It is interior, whereinwidBe in order to reduce the customized constant of counting error, value range be [0,len], if in range Next step judgement is carried out, otherwise step S104 gives up the point, step S105;
(5) judge whether the crest value is greater than (peak+valley)/2(is preferable if it is trough property, then judges trough Value whether be less than (peak+valley)/2), if meeting condition, the point is marked with box, otherwise step S106 gives up The point is abandoned, the wave crest or trough at next place are judged, step S105;
(6) paper slightly counts: being marked according to the obtained wave crest quantity of statistics or trough quantity and with box As a result paper is counted, the selection of wave crest quantity herein or the selection of trough quantity depend in step (d) to wave crest Preferable one group of the property judged with trough property is as last counting foundation, step S107.
D) paper essence counts:
Paper width is obtained with statistical pixel method to image binaryzation with region-growing method, while calculating drop shadow curve's wave The gray scale difference of valley point and drop shadow curve's mean value;Then drop shadow curve's average gray difference and paper mean breadth are calculated, it is wide with paper Degree and gray scale difference constitute two-dimensional feature vector;Classification finally is carried out to feature vector with K-means clustering procedure and judges paper adhesion Quantity.It completes to count the essence of paper, step S108.
Detailed description of the invention
Fig. 1 is the flow chart that the Algorithm of Paper Counting based on gray scale and space characteristics counts paper.
Fig. 2 is the flow chart that entire counting algorithm counts paper.
Fig. 3 is that the collected paper original graph of equipment is adopted using image.
Fig. 4 is the pilot process figure obtained using Algorithm of Paper Counting.
Fig. 5 is the paper effect picture finally detected, and black billet line is the paper position detected.
Fig. 6 is entire software system interface display schematic diagram.
Specific embodiment
Below in conjunction with attached drawing to the present invention to detailed description.
The present invention, which carries out processing to the paper image collected, to be completed by entire counting algorithm, main processes It is as follows.
A) image preprocessing: by image gray processing, slant correction;The start-stop point of paper in the picture is marked simultaneously: design The start-stop position of paper in algorithm automatic identification image.
B) image projection: to image longitudinal projection, drop shadow curve is obtained.
C) Fuzzy Threshold is handled: being handled drop shadow curve, is obtained Fuzzy Threshold treated curve.
D) paper slightly counts: being counted according to the quantity of curve medium wave peak (trough) to paper.
E) paper essence counts: thick the problem of counting identification can not be used mainly for number of paper at adhesion, it is special using extracting Sign cluster mode specifically identifies number of paper at adhesion.
Final paper counting of the invention as a result, and other parameter settings and detection effect etc. in software systems Interface on show, see Fig. 6, so that operator is understood the working condition of system in time and adjust in time, it is entire soft Part system interface includes three big modules, first is that image acquisition parameter adjusts module, including the storage to resolution ratio and acquisition image The setting of type;Second is that image display, is mainly used for the collected paper image and display number of paper of display load Detection effect figure;Third is that acquisition image and counting module, the operation such as paper counting and display paper count results.
Following performance indicator may be implemented in paper counting method of the invention substantially:
(1) processing time < 2s of every stacker;
(2) count accuracy rate: disposable detection number of paper counts 99.7% or more accuracy rate less than 500;
(3) thickness of individual paper for being counted is in 0.07mm or more.
Illustrate the work of method of counting of the invention with folded 200 examples counted with a thickness of the paper of 0.09mm Make process, Fig. 3 is the part effect picture of collected 200 paper images.
S201: into gray processing operation is carried out then slant correction is carried out to image first, mainly utilizes Hough transform The straight line that paper striped is formed is detected, is then taken up an official post the two o'clock taken on different location in the straight line detected, according to being calculated The slope of two o'clock obtains the tilt angle of image, which, which is not necessarily to slant correction, very high precision, as long as guaranteeing Image inclination angle controls within the scope of -0.5-0.5 degree.
S202: image is projected to obtain projection histogram.Projection chooses the certain altitude of paper image to image In in the region grey scale pixel value carry out longitudinal addition, obtain an one-dimensional vector, it is available with the data of this one-dimensional vector The perspective view of image.
S203: the start-stop position of paper in algorithm for design automatic identification image.After image preprocessing, in order to obtain in image The starting point and ending point of paper in the picture, according to the gray scale difference of paper areas in image and non-paper region, i.e. non-paper Region can have the process of Gray Level Jump to paper areas, find out the initial position of paper areas and knot in image according to this feature Beam position.
S204: the drop shadow curve obtained by Gray Projection finds out wave crest and trough all in curve first with algorithm, Then the gap length between two adjacent peaks or trough is found out respectively, then between all peak to peak separations either paddy paddy Every being counted, the higher gap length of the frequency of occurrences is found out, tentatively the thickness as a piece of paperlen.It is bent according to projection simultaneously All wave crests and trough in line, are a piece of papers since paper image can be initially believed that between wave crest and wave crest, high with obeying Function of this distribution is as the subordinating degree function obscured, and the thickness of the paper obtained using primary Calculation is as window width.Entirely throwing The region of shadow curve is moved, and summation is weighted to all wave crests and all troughs respectively, after finding out weighted sum It is worth biggish one group, number of paper is judged as preferable one group of property, Fig. 4 is to collected original image i.e. Fig. 3 Carry out Fuzzy Threshold treated the effect picture that curve graph shows in original image.
S205: paper slightly counts.According to Fuzzy Threshold treated drop shadow curve figure, according to the wave crest and trough found The preferable one group of curve of matter finds out the quantity number of the wave crest or trough in the preferable one group of curve of the property, obtains paper Quantity.Fig. 5 is that the effect picture of detection effect is counted and shown to this stacker Zhang Jinhang, and the billet line of black indicates the paper of detection The position opened, i.e., by the position of the step S204 wave crest determined or trough, by carrying out statistical counting just to black billet line The quantity of available paper.
S206: paper essence counts: with region-growing method to image binaryzation, obtaining paper width with statistical pixel method, together When calculate drop shadow curve's trough point and drop shadow curve's mean value gray scale difference;Then it calculates drop shadow curve's average gray difference and paper is flat Equal width constitutes two-dimensional feature vector with paper width and gray scale difference;Finally feature vector is divided with K-means clustering procedure Class judges paper adhesion quantity.It completes to count the essence of paper.

Claims (5)

1. a kind of paper counting method based on space and gray feature, it is characterised in that:
1) paper counting method is the two of a kind of thick counting based on space and gray feature and the essence counting based on gray feature The mode of level structure;Peak valley feature is had in spatial domain intensity profile according to paper image first, designs peak valley detection algorithm pair Number of paper is slightly counted;Then counted according to the paper essence of gray feature: for paper, there are adhesions, according to grey at adhesion Degree variation characteristic algorithm for design judges paper at adhesion to paper is there are adhesion and there is no the regions of adhesion to classify Quantity;
2) Fuzzy Threshold processing is carried out to the histogram after Gray Projection, protrudes the wave crest and trough feature of drop shadow curve, then Width according to the sheet-fed equispaced being calculated as a piece of paper;
3) thickness for the paper that the selection of Fuzzy Threshold parameter is mainly obtained by algorithm determines, then with fuzzy binary images to throwing Shadow curve weighted average;
4) quantity for calculating paper is calculated according to the quantity of obtained wave crest or trough, and wave crest is specifically chosen Or trough, judges according to gray moment;
5) for paper, when arranging placement, there are paper adhesions, are judged according to the characteristic Design classification method at paper adhesion Number of paper at adhesion.
2. the method as described in claim 1, which is characterized in that Fuzzy Threshold processing is carried out to the histogram after Gray Projection, The wave crest and trough feature of prominent drop shadow curve, then according to the sheet-fed equispaced being calculated tentatively as a piece of paper Width, comprising:
1) pixels tall for choosing 1-500 to image is projected to obtain drop shadow curve's figure, and the two dimensional character of paper image is become One-dimensional characteristic is turned to, the direction and paper parallel stripes for projecting selection are consistent;
2) drop shadow curve obtained by projection finds out wave crest and trough all in curve first with algorithm, and basis is looked for first All wave crest points out calculate wave crest point average graypeak, the average gray for calculating all trough points isvallery
The gap length between two adjacent peaks or trough is found out respectively, then between all peak to peak separations either paddy paddy Every being counted, the higher gap length of the frequency of occurrences is found out, tentatively the thickness as a piece of paperlen
3. method as described in claim 1, which is characterized in that the paper that the selection of Fuzzy Threshold parameter is mainly obtained by algorithm What the thickness opened determined, then drop shadow curve is weighted and averaged, comprising: the function of Gaussian distributed is used to be subordinate to as fuzzy Function is spent, the thickness of the paper obtained using primary Calculation is moved as window width in the region of entire drop shadow curve, right respectively Drop shadow curve's gray value is weighted and averaged in window width region.
4. method as described in claim 1, which is characterized in that the quantity for calculating paper is according to obtained wave crest or wave What the quantity of paddy was calculated, it is specifically chosen wave crest or trough, is judged according to gray moment, comprising:
1) summation is weighted to all wave crests and all troughs respectively, is worth biggish one group after finding out weighted sum, makees Number of paper is judged for preferable one group of property;
2) judge since the good wave crest of property or first point of trough, if [len-wid,len+wid] within the scope of, WhereinwidBe in order to reduce the customized constant of counting error, value range be [0,len], if in range into Row judges in next step, otherwise gives up the point;
3) preferable if it is wave crest property, judge whether the crest value is greater than (peak+valley)/2, if it is trough property compared with It is good, then judge whether valley value is less than (peak+valley)/2 are marked the point with box, otherwise if meeting condition Give up the point, the wave crest or trough at next place are judged;
4) the wave crest quantity or trough quantity that are obtained according to statistics and the result being marked with box carry out paper thick It counts, what the selection of the selection of wave crest quantity herein or trough quantity depended on judging wave crest and trough property The preferable one group of foundation slightly counted as last paper of property.
5. method as described in claim 1, which is characterized in that complete to glue paper by the way of machine learning classification The Classification and Identification of quantity at even, comprising:
1) paper width is obtained with statistical pixel method to image binaryzation with region-growing method, while calculates drop shadow curve's trough The gray scale difference of point and drop shadow curve mean value;
2) drop shadow curve's average gray difference and paper mean breadth are calculated, with paper width and gray scale difference constitute two dimensional character to Amount;
3) number of paper judged at paper adhesion of classifying is carried out to feature vector with K-means clustering procedure.
CN201610425062.6A 2016-06-16 2016-06-16 A kind of coarse-fine second level paper counting method based on space and gray feature Active CN106096713B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610425062.6A CN106096713B (en) 2016-06-16 2016-06-16 A kind of coarse-fine second level paper counting method based on space and gray feature

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610425062.6A CN106096713B (en) 2016-06-16 2016-06-16 A kind of coarse-fine second level paper counting method based on space and gray feature

Publications (2)

Publication Number Publication Date
CN106096713A CN106096713A (en) 2016-11-09
CN106096713B true CN106096713B (en) 2019-06-28

Family

ID=57235207

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610425062.6A Active CN106096713B (en) 2016-06-16 2016-06-16 A kind of coarse-fine second level paper counting method based on space and gray feature

Country Status (1)

Country Link
CN (1) CN106096713B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108230385B (en) * 2017-12-20 2022-01-14 湖南大学 Method and device for detecting number of ultra-high laminated and ultra-thin cigarette labels by single-camera motion
CN108564627B (en) * 2018-04-02 2021-11-02 成都精工华耀科技有限公司 Linear array image sleeper positioning and counting method based on multi-region gray projection
CN111462151B (en) * 2020-03-27 2023-05-02 广东交通职业技术学院 Thread counting method, system, device and storage medium
CN112208966B (en) * 2020-10-28 2022-11-04 北京小米移动软件有限公司 Garbage can, garbage bag allowance detection method and garbage bag allowance detection device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103353950A (en) * 2013-06-08 2013-10-16 汕头东风印刷股份有限公司 Paper counting method
CN105590318A (en) * 2015-12-16 2016-05-18 中科院广州电子技术有限公司 Laminated paper counting method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103353950A (en) * 2013-06-08 2013-10-16 汕头东风印刷股份有限公司 Paper counting method
CN105590318A (en) * 2015-12-16 2016-05-18 中科院广州电子技术有限公司 Laminated paper counting method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《基于灰度值差分的纸张计数算法设计》;石伟等;《包装学报》;20151031;第7卷(第4期);第47-51页

Also Published As

Publication number Publication date
CN106096713A (en) 2016-11-09

Similar Documents

Publication Publication Date Title
RU2708422C1 (en) Atm management system and method
CN106096713B (en) A kind of coarse-fine second level paper counting method based on space and gray feature
CN108921865B (en) Anti-interference sub-pixel straight line fitting method
CN116611748B (en) Titanium alloy furniture production quality monitoring system
CN110210477B (en) Digital instrument reading identification method
CN103530590B (en) DPM Quick Response Code recognition system
CN115018828A (en) Defect detection method for electronic component
CN102043959B (en) License plate character segmentation method
CN110517265B (en) Method and device for detecting surface defects of product and storage medium
US7756295B2 (en) Change region detection device and change region detecting method
CN109447067B (en) Bill direction detection and correction method and automatic bill checking system
CN105447512A (en) Coarse-fine optical surface defect detection method and coarse-fine optical surface defect detection device
CN112801111B (en) Image straight line edge point classification method and device based on gradient direction
CN115359053A (en) Intelligent detection method and system for defects of metal plate
CN111986222A (en) Intelligent electric meter chip image binarization processing method based on self-adaptive mixed threshold value
CN111476804A (en) Method, device and equipment for efficiently segmenting carrier roller image and storage medium
CN104487966A (en) Document classification
CN114495098A (en) Diaxing algae cell statistical method and system based on microscope image
CN110807354B (en) Industrial assembly line product counting method
CN116309577A (en) Intelligent detection method and system for high-strength conveyor belt materials
CN115082776A (en) Electric energy meter automatic detection system and method based on image recognition
CN107909573B (en) Method and device for detecting knife lines on annular surface of metal workpiece
CN105354575A (en) Image binarization threshold determination method in sea-sky-line detection
Lin et al. Surface defect detection of machined parts based on machining texture direction
CN114140416A (en) Glass edge detection method and system based on machine vision

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
TR01 Transfer of patent right

Effective date of registration: 20201112

Address after: Unit 2414-2416, main building, no.371, Wushan Road, Tianhe District, Guangzhou City, Guangdong Province

Patentee after: GUANGDONG GAOHANG INTELLECTUAL PROPERTY OPERATION Co.,Ltd.

Address before: 412007 Zhuzhou Research Institute, Hunan University of Technology, 88 West Taishan Road, Tianyuan District, Hunan

Patentee before: HUNAN University OF TECHNOLOGY

Effective date of registration: 20201112

Address after: 221351 nianzhuang Hardware Machinery Industrial Park, Pizhou City, Xuzhou City, Jiangsu Province

Patentee after: Qinhe New Material Co.,Ltd.

Address before: Unit 2414-2416, main building, no.371, Wushan Road, Tianhe District, Guangzhou City, Guangdong Province

Patentee before: GUANGDONG GAOHANG INTELLECTUAL PROPERTY OPERATION Co.,Ltd.

TR01 Transfer of patent right