CN102622602A - Cotton foreign fiber image online dividing method and cotton foreign fiber image online dividing system - Google Patents

Cotton foreign fiber image online dividing method and cotton foreign fiber image online dividing system Download PDF

Info

Publication number
CN102622602A
CN102622602A CN2012100492007A CN201210049200A CN102622602A CN 102622602 A CN102622602 A CN 102622602A CN 2012100492007 A CN2012100492007 A CN 2012100492007A CN 201210049200 A CN201210049200 A CN 201210049200A CN 102622602 A CN102622602 A CN 102622602A
Authority
CN
China
Prior art keywords
image
image block
foreign fiber
block
gray level
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2012100492007A
Other languages
Chinese (zh)
Other versions
CN102622602B (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.)
China Agricultural University
Original Assignee
China Agricultural 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 China Agricultural University filed Critical China Agricultural University
Priority to CN 201210049200 priority Critical patent/CN102622602B/en
Publication of CN102622602A publication Critical patent/CN102622602A/en
Application granted granted Critical
Publication of CN102622602B publication Critical patent/CN102622602B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a cotton foreign fiber image online dividing method and a cotton foreign fiber image online dividing system. The cotton foreign fiber image online dividing method includes the following steps: S1, receiving cotton foreign fiber images, converting the cotton foreign fiber images to gray-level images and negating the gray-level images; S2, processing the negated gray-level images in blocks and judging whether to further process the gray-level images in refining mode; S3, reading image blocks needing refining processing, obtaining revised background gray-level images, leading the background gray-level images to subtract the original gray-level image blocks to obtain image blocks with backgrounds removed, and cutting the images in an OTSU method; and S4, performing expansive operation on the image blocks, comparing corresponding edge pixels of adjacent image blocks, and performing image linking on cracked foreign fiber target images in multiple images or image blocks based on overlap ratio of the corresponding edge pixels. The cotton foreign fiber image online dividing method and the cotton foreign fiber image online dividing system can effectively improve image cutting speed and ensure cutting quality of the images.

Description

Online dividing method of a kind of cotton foreign fiber image and system
Technical field
The present invention relates to image processing system, relate in particular to a kind of cotton foreign fiber image on-line processing method and system.
Background technology
China is Cotton Production and consumption big country, and is wollen fabrics big export country.But in the raw cotton process, can mix into multiple foreign fiber usually owing to o lot of reasons.Foreign fiber is meant to sneak into has non-cotton fiber and the coloured fibre that has a strong impact on to cotton and quality of item thereof in the cotton, like man-made fiber, hair, silk, fiber crops, plastic foil, plastic ties, chromonema (rope, cloth) etc., is commonly called as " three ".
Though the content of foreign fiber in gined cotton is few, and is serious to the quality influence of textile, sneaks into the foreign fiber in the raw cotton, is broken into the ultimate fibre that is scattered easily, in weaving processing, be difficult to remove.During spinning, the ultimate fibre that is scattered makes the cotton yarn broken end easily, reduces production efficiency; When weaving cotton cloth, influence fabric quality; During dyeing,, influence outward appearance, the quality of cotton yarn and cloth cover has been caused very big harm because of painted difference.Therefore, the harm of foreign fiber mainly shows three aspects: the one, directly influence cotton yarn and Products Quality thereof; The 2nd, enterprise brings enormous economic loss to cotton spinning; The 3rd, have influence on the cotton use of state and the outlet of wollen fabrics.Foreign fiber in the raw cotton is the problem that China's textile industry is shown great attention to for a long time always.
In China, owing to reasons such as fund, development degree, adopt artificial method of picking foreign fiber usually, this method is the labor manpower and materials not only, and speed is slow, and degree of accuracy is low, inefficiency.
Along with microelectric technique and fast development of computer technology, the detection that image processing techniques is used for cotton foreign fiber has obtained development fast.As the basis of follow-up works such as the extraction of cotton foreign fiber and identification, research has become the inexorable trend that solves above problems to the method for cotton foreign fiber fast processing.Foreign matter identification based on machine vision is a kind of technology of rising in recent years.Machine vision is exactly the visual performance with computing machine simulation human eye, and information extraction from image or image sequence is carried out the characteristic that various computings come extracting objects to these signals, and then controls on-the-spot device motion according to discrimination result.
Wherein image segmentation is one of link the most basic and important in Flame Image Process and the machine vision, is the prerequisite of pattern-recognition and quantitative analysis.The purpose of image segmentation is that the feature extraction that our interested characteristics of image in the image maybe need be used is come out.Algorithm is simple, calculated amount is little owing to having for threshold method, stable performance, advantage such as clear and intuitive become most widely used cutting techniques in the image segmentation; Wherein the OTSU method is called big Tianjin method or maximum variance between clusters again, is the method that a kind of self-adapting threshold is confirmed, it is the gamma characteristic by image, and image is divided into background and target two parts.Inter-class variance between background and the target is big more, explains that the two-part difference of composing images is big more.Therefore, make maximum the cutting apart of inter-class variance mean that the wrong probability that divides is minimum, have the optimal segmenting threshold on the statistical significance.Use the OTSU method more satisfactory to the segmentation effect that piece image carries out binaryzation, the differentiation of target and background is better.Yet only when target image area during greater than entire image 25%, segmentation performance is near optimum for the threshold value that this algorithm obtains; When the movement destination image area diminished, algorithm performance descended rapidly, caused target image more little, and the threshold deviation value is big more.On the other hand, also there is bigger problem in the OTSU method in or target image gray scale inhomogeneous to background and the less image segmentation of background gray scale difference are handled, can not obtain high-quality split image.And the cotton foreign fiber image just belongs to little target image, and exist target image gray scale and background gray scale difference less with the uneven problem of background image gray scale.In image segmentation is handled, if directly adopt the OTSU rule serious over-segmentation phenomenon can occur.On the other hand; When image is carried out dividing processing; Occupy the necessity that the background image of driftlessness image of the overwhelming majority is not cut apart; Dividing processing is carried out in unification has increased insignificant calculated amount greatly, has seriously reduced the splitting speed that uses the OTSU method, has caused the great wasting of resources.
Summary of the invention
The technical matters that (one) will solve
The technical matters that the present invention will solve is: how online dividing method of a kind of cotton foreign fiber image and system are provided, can effectively improve the speed of image segmentation, guarantee the quality of cutting apart of image.Thereby obtain high-quality foreign fiber split image, satisfy the high-speed requirement of system to the foreign fiber image dividing processing, be image characteristics extraction, follow-up works such as target image pattern-recognition and the measurement of foreign fiber radical provide basis preferably.
(2) technical scheme
For achieving the above object, the present invention provides a kind of cotton foreign fiber image online dividing method, may further comprise the steps:
S1: receiving the cotton foreign fiber image, is gray level image with said image transitions, and with this gray level image negate;
S2: the gray level image piecemeal to negate is handled; And carry out fixed threshold binaryzation dividing processing; The area of target image after the computed segmentation, according to the annexation between this image area size, image block and the neighbour image block, further whether judgement micronization processes;
S3: read the image block that needs micronization processes, obtain revised background gray level image, subtract each other the image block that obtains rejecting background, use the OTSU method to carry out image segmentation with former gray level image piece;
S4: image block is carried out expansive working, the corresponding edge pixel of adjacent image piece is compared, and serve as to carry out image links according to heterosexual fiber target image to multiple image or image block cleaved with its registration.
Preferably; Among the said step S2; The proportionate relationship that occupies entire image according to image size and target image is with image block; According to the histogram analysis gray feature result of step S1 gray level image, select appropriate threshold M that each image block is carried out binaryzation and cut apart, the relation according to target image area in the image block and neighbour image block judges whether further micronization processes then; Comprise among the said step S3 that image block is carried out the image corrosion fills up operation with blank, carries out details and strengthens before carrying out image segmentation.
Preferably, judge that the method for further micronization processes is following: if image area is less than A in the image block 1, then do not need further micronization processes; If image area is greater than A in the image block 2, then need further micronization processes; If image area is between A in the image block 1-A 2Between, then detect four image blocks that are adjacent and whether exist image area greater than A 2Image block, then need further micronization processes if exist, otherwise then do not need further micronization processes; A wherein 1With A 2Be to judge whether image block needs the image area threshold value of further micronization processes;
Said step S2 strengthens the cotton foreign fiber image through following steps:
S21: with the average piecemeal of foreign fiber gray level image;
S22: order reads each image block, and it is done binary conversion treatment with fixed threshold M, and calculates the area of the image block internal object image after the binaryzation;
S23: if the area of the image block internal object image after the binaryzation is greater than A 2, then need further handle and forward to step S26, otherwise change step S24 over to;
S24: if the area of the image block internal object image after the binaryzation is less than A 1, then do not need further to handle and forward step S26 to, otherwise change step S25 over to;
S25: judge whether the image block with this image block contiguous contains the image block of the further micronization processes of needs, need further handle and forward to step S23 if having then, otherwise judge that image does not need further to handle to change step S26 over to;
S26: judge whether untreated image block,, then read next image block and forward step S22 to, otherwise withdraw from if having.
Preferably, among the said step S3,, select for use the image corrosion to fill up the background image that the mode that combines need to obtain further micronization processes image block with blank through analysis to cotton foreign fiber gray level image shape facility and intensity profile; Set up suitable structural element the image block of the further micronization processes of needs is carried out image corrosion operation; To eliminate wire or velvet-like heterosexual fiber target image; The large-area block foreign fiber of filling up through blank then of the mode correction remaining part foreign fiber image in back that is corroded; Thereby obtain revised this image block background gray level image, and make it to subtract each other, obtain rejecting the image block of background with the former gray level image of this image block.
Preferably; The blank complementing method of said corrosion back image block is following: the image after former gray level image corrodes to image block carries out on the gray feature result's that histogram analysis obtained the basis; Set up blank and fill up the gradation conversion model, with gray level in the image block greater than L eThe gray scale of pixel replaces with 0, and rest of pixels point gray scale remains unchanged;
Said step S3, carry out background through following steps to the cotton foreign fiber image block and reject:
S31: order reads the negate gray level image that needs further micronization processes image block;
S32: the circular configuration element that is 3 pixels to said image block use radius corrodes operation;
S33: order reads the gray-scale value of the image block interior pixel point that obtains after the corrosion, if its gray-scale value is greater than L e, then this gray-scale value is replaced with 0, otherwise keeps original gray value constant;
S34: judge whether untreated pixel, if having, then (i j) to next location of pixels, forwards step S33 to, otherwise forwards step S35 to shifting location of pixels;
S35: will subtract each other with the former gray level image of this image block through image corrosion and the blank background image of filling up this image block that operation obtains, and obtain the image block of rejecting background.
Preferably; Among the said step S3; Obtain the gray feature result of cotton foreign fiber gray level image according to the histogram analysis of cotton foreign fiber gray level image; Set up details and strengthen model, said cotton foreign fiber gray level image is carried out image detail strengthen, the gray level that has a maximum between-cluster variance through search then confirms that the optimal segmenting threshold of binaryzation in cutting apart carries out image segmentation.
Preferably, said details strengthens model, and its model formation is following:
GE ( i , j ) = GO ( i , j ) GO ( i , j ) &le; L l 8 * GO ( i , j ) L l < GO ( i , j ) < L h 0.5 L h &le; GO ( i , j )
Wherein (i is that ((i j) is the gray-scale value after the enhancing of cotton foreign fiber gray level image, L to GE to said cotton foreign fiber gray level image for i, the original gray value of j) locating in the position j) to GO lWith L hBe two threshold values that image segmentation is handled.
Preferably; Among the said step S4; At first each is carried out image segmentation image block afterwards and carry out the image expansion operation; Order is got each image block and is compared with the corresponding edge pixel of its contiguous image block then, serves as according to the heterosexual fiber target image of crossing over multiple image or in image block, producing fracture is carried out image links with the registration of neighboring edge pixel.After accomplishing connection, the foreign fiber image that connects is corroded operation.
Preferably, said step S4 connects the cotton foreign fiber image block through following steps:
S41: set up a suitable blank matrix;
S42: read each image block after cutting apart successively, and image block is used radius is that the circular configuration element of 1 pixel carries out the image expansion operation;
S43: extract and detect the pixel value of this image block coboundary pixel, if this coboundary pixel column exist gray scale be the number of 255 pixel greater than Y, then get into step S45.Otherwise forward step S44 to;
S44: with the edge pixel that extracts capable/the row adjacent image block edge pixel rows/columns corresponding with it compare; If the number that two neighboring edge pixel rows/columns gray scales are 255 point to coincide is greater than 1/3 of total number of pixels; Then these two image blocks are connected; Be about to this image block and be placed on the relevant position of the blank matrix of setting up among the S41, and forward step S45 to;
S45: judge the image block that whether connects in addition in this width of cloth foreign fiber gray level image,, next image block position is pointed in the image block position, forward step S42 to, otherwise forward step S46 to if having;
S46: extract and also to detect the pixel value of setting up the lower limb pixel of matrix among the step S41,, forward step S47 to if the capable gray scale that exists of this edge pixel is that the number of 255 pixel is not filled greater than Y and this matrix; Otherwise it is that the circular configuration element of 1 pixel carries out image corrosion back output that the image that has in the matrix of setting up among the step S41 is used radius, then this matrix is changed to blank matrix again, forwards step S49 to;
S47: judge that the coboundary that whether contains one or more image blocks in this width of cloth foreign fiber gray level image is connected with the lower limb of contiguous image block; Then forward step S49 to if exist; To use radius behind the last piece image be that the circular configuration element of 1 pixel carries out image corrosion and output otherwise the image that has in the matrix of setting up among the step S41 picked; Then this matrix is changed to blank matrix again, forwards step S48 to;
Whether S48: judge to exist in the last piece image that is picked and contain heterosexual fiber target image, if exist, the last piece image that then will be picked is put into first width of cloth picture position of this matrix, forwards step S49 to;
S49: judge whether that in addition other width of cloth foreign fiber gray level images are unprocessed, if there be then first that next width of cloth foreign fiber gray level image is pointed in the image block position cut apart image block position, back, and forward step S42 to, otherwise withdraw from.
The present invention also provides a kind of cotton foreign fiber image online segmenting system, and this system comprises:
Image conversion module is used to receive the cotton foreign fiber image, is gray level image with said image transitions, and with this gray level image negate;
The image block module; Be used for the gray level image piecemeal of negate is handled, and carry out fixed threshold binaryzation dividing processing, the area of target image after the computed segmentation; According to the annexation between this image area size, image block and the neighbour image block, further whether judgement micronization processes;
The image segmentation module reads the image block that needs micronization processes, obtains revised background gray level image, subtracts each other the image block that obtains rejecting background with former gray level image piece, uses the OTSU method to carry out image segmentation;
The image link block is used for image block is carried out expansive working, the corresponding edge pixel of adjacent image piece is compared, and serve as to carry out image links according to the heterosexual fiber target image to multiple image or image block cleaved with its registration.
(3) beneficial effect
Compared with prior art, technical scheme of the present invention has following advantage:
The online segmenting system of cotton foreign fiber image of the present invention is handled the image of machine vision collection; At first the image of being gathered being carried out piecemeal handles; The image block that does not contain heterosexual fiber target image is not done refinement to be handled; And adjusted the proportionate relationship between target image and the background, thereby the splitting speed and the segmentation precision of image have been improved greatly.Then through image block is carried out pre-service; Tentatively rejected the image block that contains heterosexual fiber target image of background; To solve the uneven problem of background in the former foreign fiber gray level image, also effectively improve the contrast between heterosexual fiber target image and the background image simultaneously.Improve the contrast between foreign fiber target and the gined cotton background through the figure image intensifying then, thereby further heightened the segmentation precision of image.At last foreign fiber being crossed over reasons such as multiple image or image block makes the image of foreign fiber generation fracture carry out the image connection processing; Finally obtain complete, heterosexual fiber target image accurately; Be next step image characteristics extraction, follow-up works such as target image pattern-recognition and the measurement of foreign fiber radical provide data basis preferably.
Description of drawings
Fig. 1 is the online segmenting system structural representation of a cotton foreign fiber image of the present invention block diagram;
Fig. 2 is the process flow diagram of the online dividing method of cotton foreign fiber image of the present invention;
Fig. 3 is the process flow diagram of image block disposal route of the present invention;
Fig. 4 is the process flow diagram of image segmentation disposal route of the present invention;
Fig. 5 is the process flow diagram of figure image intensifying division processing method of the present invention;
Fig. 6 is the process flow diagram of image connection processing method of the present invention.
Embodiment
Below in conjunction with accompanying drawing and embodiment, specific embodiments of the invention describes in further detail.Following examples are used to explain the present invention, but are not used for limiting scope of the present invention.
As shown in Figure 1, cotton foreign fiber image processing system of the present invention comprises 4 modules altogether: 1. image conversion module; 2. image block module; 3. image segmentation module; 4. image link block.
The online segmenting system of described cotton foreign fiber image is handled the image of machine vision collection; At first the image of being gathered being carried out piecemeal handles; The image block that does not contain heterosexual fiber target image is not done refinement to be handled; And adjusted the proportionate relationship between target image and the background, thereby the splitting speed and the segmentation precision of image have been improved greatly.Improve the contrast between foreign fiber target and the gined cotton background through the figure image intensifying then, thereby further heightened the segmentation precision of image.Make the image of foreign fiber generation fracture carry out the image connection processing to cross over reasons such as multiple image or image block owing to foreign fiber at last; Finally obtain complete, heterosexual fiber target image accurately; Be next step image characteristics extraction, follow-up works such as target image pattern-recognition and the measurement of foreign fiber radical provide data basis preferably.
As shown in Figure 2, overall technical scheme is:
Read in color image of cotton foreign fibers, and convert said coloured image the gray level image of cotton foreign fiber into, and with this gray level image negate; Use the gray level image after the negate of fixed threshold binaryzation then; And it is carried out piecemeal handle; Whether the area size with each image block internal object image is a foundation, need further micronization processes to make a determination to each image block, the image block that does not contain heterosexual fiber target image is not done refinement handle; Thereby improved the splitting speed of image greatly; The heterosexual fiber target image area is less on the other hand, can adjust the proportionate relationship between target image and the background behind the piecemeal, thereby has improved the segmentation precision of image; Through analysis, select for use the image corrosion to fill up the background image that the mode that combines need to obtain further micronization processes image block with blank to cotton foreign fiber gray level image shape facility and intensity profile.Set up suitable structural element the image block of the further micronization processes of needs is carried out image corrosion operation; To eliminate wire or velvet-like heterosexual fiber target image; Some large-area block foreign fibers of mode correction of filling up through blank then remaining part foreign fiber image in back that is corroded; Thereby obtain revised this image block background gray level image, and make it to subtract each other, obtain rejecting the image block of background with the former gray level image of this image block; To solve the uneven problem of background in the former foreign fiber gray level image, also effectively improve the contrast between heterosexual fiber target image and the background image simultaneously; Gray level image to the staple cotton foreign fiber carries out histogram analysis then; According to histogrammic analysis result; The segmented conversion model that set up to be fit to cotton foreign fiber figure image intensifying carries out image detail to the gray level image of cotton foreign fiber and strengthens, thereby obtains the image of high-contrast; Use the OTSU method that image is carried out binaryzation to it again and cut apart, so that the heterosexual fiber target image in the cotton foreign fiber gray level image is separated from background image; At last through the image link block; Pixel registration with the corresponding edge of adjacent image piece is a foundation; To cross over reasons such as multiple image or image block owing to foreign fiber and make the image of foreign fiber generation fracture carry out the image connection processing, finally obtain high-quality, accurate binaryzation heterosexual fiber target image.
1, image conversion module
Image conversion module is used to read in color image of cotton foreign fibers, and converts said color image of cotton foreign fibers into the cotton foreign fiber gray level image, and with this gray level image negate;
2, the image block module of based target image area judgement
Described image block module; Mainly be the original cotton foreign fiber image based on the cotton foreign fiber detection system collection of machine vision to be carried out piecemeal handle; Only further handle containing our image block of interested heterosexual fiber target image; Image block to not containing heterosexual fiber target image is handled, and image block has also been adjusted the proportionate relationship between heterosexual fiber target image and the background simultaneously, thereby effectively improves the splitting speed and the segmentation precision of image.
Whether wherein said image block needs the judgement scheme of further micronization processes following: if image area is less than A in the image block 1, judge that then this image block does not need further micronization processes.If image area is greater than A in the image block 2, judge that then this image block needs further micronization processes.If image area is between A in the image block 1-A 2Between, then detect four image blocks that are adjacent and whether exist image area greater than A 2Image block, judge that then this image block needs further micronization processes if exist, otherwise to judge that then this image block does not need further micronization processes.
Wherein in the analysis to original cotton foreign fiber image; The size of finding entire image is 4000*500; And the area of heterosexual fiber target image only accounts for below 5% of entire image area, the area of most of heterosexual fiber target image only account for image area 0.5% to 3% between, so in order to improve the ratio between heterosexual fiber target image and the background; Original cotton foreign fiber image laterally is equally divided into 8, and each image block size is 500*500.
Wherein in the histogram analysis of original cotton foreign fiber image; Obtain cotton foreign fiber gray distribution of image situation; The gray-scale value of the cotton background of cotton foreign fiber image is generally all within certain scope; Such as at (175-230), and the gray-scale value overwhelming majority of heterosexual fiber target image is all less than 175.Because when carrying out the fixed threshold binaryzation; The negate of cotton foreign fiber image; Effect comparison through test of many times; M elects 72.675 as with fixed threshold, with in the cotton foreign fiber image be not cotton background or cotton background for a certain reason the darker part of institute's Show Color split and calculate its area.
Owing to have pseudo-foreign fibers such as broken cotton seed hulls, cotton leaf in the cotton; The little target image that they produced not is our interested part; And in image, also have the influences such as noise of sneaking in IMAQ and other processes, this also is the influence factor that we need get rid of.Even the parts of images of the less image cotton foreign fiber of area is also little to the segmentation effect influence of integral body in the image block on the other hand.Simultaneously, can know that the imaging area of foreign fiber in image block of the overwhelming majority is all greater than 125 through the data of a large amount of experiments.So, be used to judge the whether image area threshold value A of the further micronization processes of needs of image block the most at last through the data analyses that a large amount of tests obtain 1With A 2Be set at 80 and 125.
Like Fig. 3, through following steps the cotton foreign fiber image is carried out piecemeal and handles:
S21: the foreign fiber gray level image laterally is equally divided into 8, and each image block size is 500*500;
S22: order reads each image block, and it is done binary conversion treatment with fixed threshold M (72.675), and calculates the area of the image block internal object image after the binaryzation;
S23: if the area of the image block internal object image after the binaryzation is greater than A 2(125), judge that then image need further handle and forward to step S26, otherwise change step S24 over to;
S24: if the area of the image block internal object image after the binaryzation is less than in A 1(85), judge that then image does not need further to handle and forward step S26 to, otherwise change step S25 over to;
S25: judge whether the image block with this image block contiguous contains the image block of the further micronization processes of needs, judge that then image need further handle and forward to step S26, otherwise judge and do not need further by image processing changes step S26 over to if having;
S26: judge whether untreated image block,, then read next image block and forward step S22 to, otherwise withdraw from if having.
3, based on image background reject, details strengthens and the image segmentation module of OTSU method
Described image block processing module selects for use the image corrosion to fill up the background image that the mode that combines need to obtain further micronization processes image block with blank.The foundation right structural element that narrows carries out image corrosion operation to the image block of the further micronization processes of needs; To eliminate wire or velvet-like heterosexual fiber target image; Some large-area block foreign fibers of mode correction of filling up through blank then remaining part foreign fiber image in back that is corroded; Thereby obtain revised this image block background gray level image, and make it to subtract each other, obtain rejecting the image block of background with the former gray level image of this image block.The image block that contains heterosexual fiber target image to preliminary rejecting background carries out the figure image intensifying then; Through histogram analysis to image; Obtain its gray distribution features; According to the analysis result of gray feature that said histogram obtains, set up the segmented conversion model original image is carried out the details enhancing.Using after the Image Enhancement Based type strengthens image block, through the OTSU method, i.e. the gray level that search has a maximum between-cluster variance is confirmed the optimal segmenting threshold of binaryzation in cutting apart.
The image background processing section of rejecting wherein; Obtain the shape facility result of cotton foreign fiber gray level image through analysis to the cotton foreign fiber gray level image; The overwhelming majority is the foreign fiber of strip and wire in all heterosexual fiber target images; Heterosexual fiber target image (the black plastic cloth for example that has only few part; Chicken feather etc.) the connection area that occupies is bigger, and that these large-area foreign fibers have color is darker, heterosexual fiber target image gray scale and the bigger characteristics of background gray scale difference.So the employing radius is the circular configuration element of 3 pixels this image block is corroded; And the image after the corrosion is carried out blank fill up operation; To obtain effect background image preferably; And subtract each other with the former gray level image of this image block, tentatively rejected the image block that contains heterosexual fiber target image of background.Thereby the uneven influence of less cotton foreign fiber background image has improved the contrast between heterosexual fiber target image and the background image simultaneously.
As shown in Figure 4, said image segmentation module is carried out image segmentation through following steps:
S31: order reads the former gray level image that needs further micronization processes foreign fiber image piece;
S32: it is that the circular configuration element of 3 pixels corrodes operation that the image block that obtains after the negate is used radius;
S33: order reads the gray-scale value of the image block interior pixel point that obtains after the corrosion, if its gray-scale value is greater than L e(153), then this gray-scale value is replaced with 0, otherwise keep original gray value constant;
S34: judge whether untreated pixel, if having, then (i j) to next location of pixels, forwards step S33 to, otherwise forwards step S35 to shifting location of pixels;
S35: judge whether untreated image block,, then move the image block position, forward step S31 to, otherwise withdraw to next image block position if having.
The processing section that strengthens of image detail wherein; In the histogram analysis to the image block that contains heterosexual fiber target image of preliminary rejecting background; Obtain its intensity profile situation; Can know that the gradation of image value major part in the image block except heterosexual fiber target image all is lower than 18 gray-scale value after carrying out background rejecting operation.And the enhancing of the details of image mainly is little to the gray scale and the cotton background gray scale difference of heterosexual fiber target image, the problem of using the OTSU method perfect not cut apart.In order to solve a problem, the method that we use image detail to strengthen, the details enhancing tonal range [L of image l, L h] be set at [20,26].Can know by histogram analysis, this interval just with the edge tonal range of the less heterosexual fiber target image of background image gray scale difference.Carry out the segmentation details through the image block that contains heterosexual fiber target image and strengthen, can effectively improve the contrast of image, guarantee the segmentation precision of image preliminary rejecting background.
If original image in the position (i, the gray-scale value of j) locating be GO (i, j), the gray-scale value after the enhancing be GE (i, j), three sections linear transformation models are represented as follows:
GE ( i , j ) = GO ( i , j ) GO ( i , j ) L l 8 * GO ( i , j ) L l < GO ( i , j ) < L h 0.5 L h &le; GO ( i , j )
Wherein GO (i, j), L lAnd L hParameter value be known quantity,
As shown in Figure 5, said figure image intensifying with cut apart module and the cotton foreign fiber image strengthened through following steps:
S41: order read need the preliminary image block that contains heterosexual fiber target image of rejecting background location of pixels (i, the original gray value GO that j) locates (i, j);
S42: if GO (i, j) in the gray level of setting, then utilize the piecewise linear transform model strengthen said position (i, image j), otherwise keep original gray value GO (i, j) constant;
S43: judge whether untreated pixel, if having, then (i j) to next location of pixels, forwards step S41 to, otherwise withdraws from shifting location of pixels.
When practical application, generally can be according to the histogram analysis result, confirm the empirical parameter that tallies with the actual situation, also can change the gray scale that image detail strengthens in the model and strengthen ratio and fixed threshold gray-scale value, to adapt to actual conditions, obtain better segmentation effect.
4, based on the image link block of image corresponding edge pixel registration.
Said image link block; Be to carry out image segmentation image block afterwards through each to carry out the image expansion operation; Read each edge pixel capable (row) of this image block then and compare with the corresponding edge pixel of its contiguous image block; With its pixel registration serves as according to carrying out image links to crossing over multiple image or in image block, producing the heterosexual fiber target image that ruptures, thinking that the accurate metering of follow-up foreign fiber facilitates.
Like Fig. 6, said image link block is carried out image through following steps to the cotton foreign fiber image and is connected:
S51: set up the blank matrix of a 4000*4000, can vertically deposit size and be 8 of the view picture foreign fiber gray level images of 4000*500;
S52: read each image block after cutting apart successively, and image block is used radius is that the circular configuration element of 1 pixel carries out the image expansion operation;
S53: extract and detect the pixel value of this image block coboundary pixel, if this coboundary pixel column exist gray scale be the number of 255 pixel greater than Y, wherein Y=6 then gets into step S55, otherwise forwards step S54 to;
S54: with the edge pixel that extracts capable/the row adjacent image block edge pixel rows/columns corresponding with it compare; If the number that two neighboring edge pixel rows/columns gray scales are 255 point to coincide is greater than 1/3 of total number of pixels; Then these two image blocks are connected; Be about to this image block and be placed on the relevant position of the blank matrix of setting up among the S51, and forward step S55 to;
S55: judge the image block that whether connects in addition in this width of cloth foreign fiber gray level image,, next image block position is pointed in the image block position, forward step S52 to, otherwise forward step S56 to if having;
S56: extract and also to detect the pixel value of setting up the lower limb pixel of matrix among the step S51,, forward step S57 to if the capable gray scale that exists of this edge pixel is that the number of 255 pixel is not filled greater than Y and this matrix.Otherwise it is that the circular configuration element of 1 pixel carries out image corrosion back output that the image that has in the matrix of setting up among the step S51 is used radius, then this matrix is changed to blank matrix again, forwards step S59 to;
S57: judge that the coboundary that whether contains one or more image blocks in this width of cloth foreign fiber gray level image is connected with the lower limb of contiguous image block; Then forward step S59 to if exist; To use radius behind the last piece image be that the circular configuration element of 1 pixel carries out image corrosion and output otherwise the image that has in the matrix of setting up among the step S51 picked; Then this matrix is changed to blank matrix again, forwards step S58 to;
Whether S58: judge to exist in the last piece image that is picked and contain heterosexual fiber target image, if exist, the last piece image that then will be picked is put into first width of cloth picture position of this matrix, forwards step S59 to;
S59: judge whether that in addition other width of cloth foreign fiber gray level images are unprocessed, if there be then first that next width of cloth foreign fiber gray level image is pointed in the image block position cut apart image block position, back, and forward step S52 to, otherwise withdraw from.
Adopt online segmenting system of cotton foreign fiber image of the present invention and method, can confirm each parameter according to actual conditions.Through confirming fixed threshold and the area threshold in the image block, can accelerate splitting speed, improve segmentation precision; Through confirming structural element and the blank gray threshold of filling up in the image background rejecting, can effectively improve the contrast of image and keep image detail as far as possible; Through confirming that the gray scale in the figure image intensifying strengthens ratio and gray threshold, can further improve contrast with the little cotton foreign fiber image of background gray scale difference; Through confirming structural element and the contrast decision content in the image connection, can improve the success ratio that image connects, avoid the mistake of image to connect.
Above embodiment only is used to explain the present invention; And be not limitation of the present invention; The those of ordinary skill in relevant technologies field under the situation that does not break away from the spirit and scope of the present invention, can also be made various variations and modification; Therefore all technical schemes that are equal to also belong to category of the present invention, and scope of patent protection of the present invention should be defined by the claims.

Claims (10)

1. the online dividing method of cotton foreign fiber image is characterized in that, may further comprise the steps:
S1: receiving the cotton foreign fiber image, is gray level image with said image transitions, and with this gray level image negate;
S2: the gray level image piecemeal to negate is handled; And carry out fixed threshold binaryzation dividing processing; The area of target image after the computed segmentation, according to the annexation between this image area size, image block and the neighbour image block, further whether judgement micronization processes;
S3: read the image block that needs micronization processes, obtain revised background gray level image, subtract each other the image block that obtains rejecting background, use the OTSU method to carry out image segmentation with former gray level image piece;
S4: image block is carried out expansive working, the corresponding edge pixel of adjacent image piece is compared, and serve as to carry out image links according to heterosexual fiber target image to multiple image or image block cleaved with its registration.
2. the online dividing method of cotton foreign fiber image as claimed in claim 1; It is characterized in that; Among the said step S2, the proportionate relationship that occupies entire image according to image size and target image is with image block, according to the histogram analysis gray feature result of step S1 gray level image; Select appropriate threshold M that each image block is carried out binaryzation and cut apart, the relation according to target image area in the image block and neighbour image block judges whether further micronization processes then; Comprise among the said step S3 that image block is carried out the image corrosion fills up operation with blank, carries out details and strengthens before carrying out image segmentation.
3. the online dividing method of cotton foreign fiber image as claimed in claim 2 is characterized in that, judges that the method for further micronization processes is following: if image area is less than A in the image block 1, then do not need further micronization processes; If image area is greater than A in the image block 2, then need further micronization processes; If image area is between A in the image block 1-A 2Between, then detect four image blocks that are adjacent and whether exist image area greater than A 2Image block, then need further micronization processes if exist, otherwise then do not need further micronization processes; A wherein 1With A 2Be to judge whether image block needs the image area threshold value of further micronization processes;
Said step S2 strengthens the cotton foreign fiber image through following steps:
S21: with the average piecemeal of foreign fiber gray level image;
S22: order reads each image block, and it is done binary conversion treatment with fixed threshold M, and calculates the area of the image block internal object image after the binaryzation;
S23: if the area of the image block internal object image after the binaryzation is greater than A 2, then need further handle and forward to step S26, otherwise change step S24 over to;
S24: if the area of the image block internal object image after the binaryzation is less than A 1, then do not need further to handle and forward step S26 to, otherwise change step S25 over to;
S25: judge whether the image block with this image block contiguous contains the image block of the further micronization processes of needs, need further handle and forward to step S23 if having then, otherwise judge that image does not need further to handle to change step S26 over to;
S26: judge whether untreated image block,, then read next image block and forward step S22 to, otherwise withdraw from if having.
4. the online dividing method of cotton foreign fiber image as claimed in claim 1; It is characterized in that; Among the said step S3; Through analysis, select for use the image corrosion to fill up the background image that the mode that combines need to obtain further micronization processes image block with blank to cotton foreign fiber gray level image shape facility and intensity profile; Set up suitable structural element the image block of the further micronization processes of needs is carried out image corrosion operation; To eliminate wire or velvet-like heterosexual fiber target image; The large-area block foreign fiber of filling up through blank then of the mode correction remaining part foreign fiber image in back that is corroded; Thereby obtain revised this image block background gray level image, and make it to subtract each other, obtain rejecting the image block of background with the former gray level image of this image block.
5. the online dividing method of cotton foreign fiber image as claimed in claim 4; It is characterized in that; The blank complementing method of said corrosion back image block is following: the image after former gray level image corrodes to image block carries out on the gray feature result's that histogram analysis obtained the basis; Set up blank and fill up the gradation conversion model, with gray level in the image block greater than L eThe gray scale of pixel replaces with 0, and rest of pixels point gray scale remains unchanged;
Said step S3, carry out background through following steps to the cotton foreign fiber image block and reject:
S31: order reads the negate gray level image that needs further micronization processes image block;
S32: the circular configuration element that is 3 pixels to said image block use radius corrodes operation;
S33: order reads the gray-scale value of the image block interior pixel point that obtains after the corrosion, if its gray-scale value is greater than L e, then this gray-scale value is replaced with 0, otherwise keeps original gray value constant;
S34: judge whether untreated pixel, if having, then (i j) to next location of pixels, forwards step S33 to, otherwise forwards step S35 to shifting location of pixels;
S35: will subtract each other with the former gray level image of this image block through image corrosion and the blank background image of filling up this image block that operation obtains, and obtain the image block of rejecting background.
6. the online dividing method of cotton foreign fiber image as claimed in claim 1; It is characterized in that; Among the said step S3, obtain the gray feature result of cotton foreign fiber gray level image, set up details and strengthen model according to the histogram analysis of cotton foreign fiber gray level image; Said cotton foreign fiber gray level image is carried out image detail strengthen, the gray level that has a maximum between-cluster variance through search then confirms that the optimal segmenting threshold of binaryzation in cutting apart carries out image segmentation.
7. the online dividing method of cotton foreign fiber image as claimed in claim 6 is characterized in that, said details strengthens model, and its model formation is following:
GE ( i , j ) = GO ( i , j ) GO ( i , j ) &le; L l 8 * GO ( i , j ) L l < GO ( i , j ) < L h 0.5 L h &le; GO ( i , j )
Wherein (i is that ((i j) is the gray-scale value after the enhancing of cotton foreign fiber gray level image, L to GE to said cotton foreign fiber gray level image for i, the original gray value of j) locating in the position j) to GO lWith L hBe two threshold values that image segmentation is handled.
8. the online dividing method of cotton foreign fiber image as claimed in claim 1; It is characterized in that; Among the said step S4; At first each image block that carries out after the image segmentation is carried out the image expansion operation, order is got each image block and is compared with the corresponding edge pixel of its contiguous image block then, serves as according to the heterosexual fiber target image of crossing over multiple image or in image block, producing fracture is carried out image links with the registration of neighboring edge pixel.After accomplishing connection, the foreign fiber image that connects is corroded operation.
9. the online dividing method of cotton foreign fiber image as claimed in claim 8 is characterized in that said step S4 connects the cotton foreign fiber image block through following steps:
S41: set up a suitable blank matrix;
S42: read each image block after cutting apart successively, and image block is used radius is that the circular configuration element of 1 pixel carries out the image expansion operation;
S43: extract and detect the pixel value of this image block coboundary pixel, if this coboundary pixel column exist gray scale be the number of 255 pixel greater than Y, then get into step S45.Otherwise forward step S44 to;
S44: with the edge pixel that extracts capable/the row adjacent image block edge pixel rows/columns corresponding with it compare; If the number that two neighboring edge pixel rows/columns gray scales are 255 point to coincide is greater than 1/3 of total number of pixels; Then these two image blocks are connected; Be about to this image block and be placed on the relevant position of the blank matrix of setting up among the S41, and forward step S45 to;
S45: judge the image block that whether connects in addition in this width of cloth foreign fiber gray level image,, next image block position is pointed in the image block position, forward step S42 to, otherwise forward step S46 to if having;
S46: extract and also to detect the pixel value of setting up the lower limb pixel of matrix among the step S41,, forward step S47 to if the capable gray scale that exists of this edge pixel is that the number of 255 pixel is not filled greater than Y and this matrix; Otherwise it is that the circular configuration element of 1 pixel carries out image corrosion back output that the image that has in the matrix of setting up among the step S41 is used radius, then this matrix is changed to blank matrix again, forwards step S49 to;
S47: judge that the coboundary that whether contains one or more image blocks in this width of cloth foreign fiber gray level image is connected with the lower limb of contiguous image block; Then forward step S49 to if exist; To use radius behind the last piece image be that the circular configuration element of 1 pixel carries out image corrosion and output otherwise the image that has in the matrix of setting up among the step S41 picked; Then this matrix is changed to blank matrix again, forwards step S48 to;
Whether S48: judge to exist in the last piece image that is picked and contain heterosexual fiber target image, if exist, the last piece image that then will be picked is put into first width of cloth picture position of this matrix, forwards step S49 to;
S49: judge whether that in addition other width of cloth foreign fiber gray level images are unprocessed, if there be then first that next width of cloth foreign fiber gray level image is pointed in the image block position cut apart image block position, back, and forward step S42 to, otherwise withdraw from.
10. online segmenting system of cotton foreign fiber image is characterized in that this system comprises:
Image conversion module is used to receive the cotton foreign fiber image, is gray level image with said image transitions, and with this gray level image negate;
The image block module; Be used for the gray level image piecemeal of negate is handled, and carry out fixed threshold binaryzation dividing processing, the area of target image after the computed segmentation; According to the annexation between this image area size, image block and the neighbour image block, further whether judgement micronization processes;
The image segmentation module reads the image block that needs micronization processes, obtains revised background gray level image, subtracts each other the image block that obtains rejecting background with former gray level image piece, uses the OTSU method to carry out image segmentation;
The image link block is used for image block is carried out expansive working, the corresponding edge pixel of adjacent image piece is compared, and serve as to carry out image links according to the heterosexual fiber target image to multiple image or image block cleaved with its registration.
CN 201210049200 2012-02-28 2012-02-28 Cotton foreign fiber image online dividing method and cotton foreign fiber image online dividing system Expired - Fee Related CN102622602B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201210049200 CN102622602B (en) 2012-02-28 2012-02-28 Cotton foreign fiber image online dividing method and cotton foreign fiber image online dividing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201210049200 CN102622602B (en) 2012-02-28 2012-02-28 Cotton foreign fiber image online dividing method and cotton foreign fiber image online dividing system

Publications (2)

Publication Number Publication Date
CN102622602A true CN102622602A (en) 2012-08-01
CN102622602B CN102622602B (en) 2013-10-23

Family

ID=46562512

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201210049200 Expired - Fee Related CN102622602B (en) 2012-02-28 2012-02-28 Cotton foreign fiber image online dividing method and cotton foreign fiber image online dividing system

Country Status (1)

Country Link
CN (1) CN102622602B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103218781A (en) * 2013-04-07 2013-07-24 北京小米科技有限责任公司 Method and device for carrying out spatial filtering processing on images
CN106651860A (en) * 2016-11-02 2017-05-10 帝麦克斯(苏州)医疗科技有限公司 Image segmenting method and apparatus
CN106910200A (en) * 2015-12-23 2017-06-30 中国石油天然气股份有限公司 A kind of moving Object Segmentation method based on phase information
CN109461136A (en) * 2018-09-20 2019-03-12 天津工业大学 The detection method of fiber distribution situation in a kind of blended fibre products
CN109978810A (en) * 2017-12-26 2019-07-05 柴岗 Detection method, system, equipment and the storage medium of mole
CN111882537A (en) * 2020-07-28 2020-11-03 研祥智能科技股份有限公司 Visual inspection method and system
CN112164134A (en) * 2020-09-28 2021-01-01 华南理工大学 Random curve modeling method based on image processing
CN112288754A (en) * 2020-11-09 2021-01-29 珠海市润鼎智能科技有限公司 Real-time binarization threshold value selection method for high-speed image
CN117495829A (en) * 2023-11-15 2024-02-02 广东昭明电子集团股份有限公司 Intelligent watch hardware quality detection method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101739570A (en) * 2009-12-28 2010-06-16 中国农业大学 Cotton foreign fiber online classifying method and system
CN101770645A (en) * 2010-02-10 2010-07-07 中国农业大学 Method and system for quickly segmenting high-resolution color image of cotton foreign fibers

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101739570A (en) * 2009-12-28 2010-06-16 中国农业大学 Cotton foreign fiber online classifying method and system
CN101770645A (en) * 2010-02-10 2010-07-07 中国农业大学 Method and system for quickly segmenting high-resolution color image of cotton foreign fibers

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
张馨等: "高分辨率棉花异性纤维彩色图像的快速分割方法", 《农业机械学报》 *
杨文柱等: "棉花异性纤维图像分割方法", 《农业机械学报》 *
阚道宏: "棉花异性纤维图像在线分割方法", 《农业工程学报》 *

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103218781A (en) * 2013-04-07 2013-07-24 北京小米科技有限责任公司 Method and device for carrying out spatial filtering processing on images
CN106910200A (en) * 2015-12-23 2017-06-30 中国石油天然气股份有限公司 A kind of moving Object Segmentation method based on phase information
CN106910200B (en) * 2015-12-23 2019-11-08 中国石油天然气股份有限公司 A kind of moving Object Segmentation method based on phase information
CN106651860A (en) * 2016-11-02 2017-05-10 帝麦克斯(苏州)医疗科技有限公司 Image segmenting method and apparatus
CN106651860B (en) * 2016-11-02 2019-07-09 帝麦克斯(苏州)医疗科技有限公司 A kind of image partition method and device
CN109978810A (en) * 2017-12-26 2019-07-05 柴岗 Detection method, system, equipment and the storage medium of mole
CN109978810B (en) * 2017-12-26 2024-03-12 南通罗伯特医疗科技有限公司 Method, system, device and storage medium for detecting nevus
CN109461136B (en) * 2018-09-20 2022-09-27 天津工业大学 Method for detecting fiber distribution condition in mixed fiber product
CN109461136A (en) * 2018-09-20 2019-03-12 天津工业大学 The detection method of fiber distribution situation in a kind of blended fibre products
CN111882537B (en) * 2020-07-28 2023-12-15 研祥智能科技股份有限公司 Visual detection method and system
CN111882537A (en) * 2020-07-28 2020-11-03 研祥智能科技股份有限公司 Visual inspection method and system
CN112164134A (en) * 2020-09-28 2021-01-01 华南理工大学 Random curve modeling method based on image processing
CN112164134B (en) * 2020-09-28 2024-03-22 华南理工大学 Random curve modeling method based on image processing
CN112288754A (en) * 2020-11-09 2021-01-29 珠海市润鼎智能科技有限公司 Real-time binarization threshold value selection method for high-speed image
CN112288754B (en) * 2020-11-09 2023-12-05 珠海市润鼎智能科技有限公司 Real-time binarization threshold selection method for high-speed image
CN117495829A (en) * 2023-11-15 2024-02-02 广东昭明电子集团股份有限公司 Intelligent watch hardware quality detection method
CN117495829B (en) * 2023-11-15 2024-04-30 广东昭明电子集团股份有限公司 Intelligent watch hardware quality detection method

Also Published As

Publication number Publication date
CN102622602B (en) 2013-10-23

Similar Documents

Publication Publication Date Title
CN102622602B (en) Cotton foreign fiber image online dividing method and cotton foreign fiber image online dividing system
CN107578409B (en) Method for detecting appearance grid breakage defect of solar cell
CN101739570B (en) Cotton foreign fiber online classifying method and system
CN105427275B (en) Crop field environment wheat head method of counting and device
CN107256406A (en) Overlapping fibers image partition method, device, storage medium and computer equipment
CN102930547A (en) Cotton foreign fiber image online segmentation method and system on the condition of wind power delivery
CN104537651B (en) Proportion detecting method and system for cracks in road surface image
CN107273791A (en) A kind of articles from the storeroom checking method based on unmanned plane image technique
CN106855951A (en) A kind of grain kind quality detecting method based on computer vision
CN103020609B (en) The recognition methods of complicated fibre image
CN103914707B (en) Green channel product auxiliary discriminating method based on support vector machine
CN104268515A (en) Sperm morphology anomaly detection method
CN103413375B (en) Discrimination system and method of old and new paper currency based on image statistical features
CN106157323A (en) The insulator division and extracting method that a kind of dynamic division threshold value and block search combine
CN108038838A (en) A kind of cotton fibriia species automatic testing method and system
CN105046697A (en) Beer bottle opening positioning method based on multi-time random circle detection and fitting degree assessment
CN103456021A (en) Piece goods blemish detecting method based on morphological analysis
CN105095907A (en) Cotton foreign fiber identifying method based on RBF neural network
CN115239715B (en) Method, system, equipment and storage medium for predicting development result of blastocyst
CN101770645A (en) Method and system for quickly segmenting high-resolution color image of cotton foreign fibers
CN104680157A (en) Bundled bar material identification and counting method based on support vector machine
CN109341524A (en) A kind of optical fiber geometric parameter detection method based on machine vision
CN104048966A (en) Big-law-based cloth cover defect detection and classification method
CN115266732A (en) Carbon fiber tow defect detection method based on machine vision
CN117330582A (en) Polymer PE film surface crystal point detecting system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20131023

Termination date: 20180228

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