CN113686876A - Poultry egg crack detection method and device - Google Patents

Poultry egg crack detection method and device Download PDF

Info

Publication number
CN113686876A
CN113686876A CN202110972002.7A CN202110972002A CN113686876A CN 113686876 A CN113686876 A CN 113686876A CN 202110972002 A CN202110972002 A CN 202110972002A CN 113686876 A CN113686876 A CN 113686876A
Authority
CN
China
Prior art keywords
egg
area
image
connected domain
poultry
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
CN202110972002.7A
Other languages
Chinese (zh)
Other versions
CN113686876B (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.)
South China Agricultural University
Original Assignee
South 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 South China Agricultural University filed Critical South China Agricultural University
Priority to CN202110972002.7A priority Critical patent/CN113686876B/en
Publication of CN113686876A publication Critical patent/CN113686876A/en
Application granted granted Critical
Publication of CN113686876B publication Critical patent/CN113686876B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8806Specially adapted optical and illumination features
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B07SEPARATING SOLIDS FROM SOLIDS; SORTING
    • B07CPOSTAL SORTING; SORTING INDIVIDUAL ARTICLES, OR BULK MATERIAL FIT TO BE SORTED PIECE-MEAL, e.g. BY PICKING
    • B07C5/00Sorting according to a characteristic or feature of the articles or material being sorted, e.g. by control effected by devices which detect or measure such characteristic or feature; Sorting by manually actuated devices, e.g. switches
    • B07C5/34Sorting according to other particular properties
    • B07C5/342Sorting according to other particular properties according to optical properties, e.g. colour
    • B07C5/3422Sorting according to other particular properties according to optical properties, e.g. colour using video scanning devices, e.g. TV-cameras
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration by the use of local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/155Segmentation; Edge detection involving morphological operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20048Transform domain processing
    • G06T2207/20061Hough transform

Abstract

The application relates to a method and a device for detecting cracks of poultry eggs. The method comprises the following steps: obtaining a plurality of poultry egg images of the same poultry egg; carrying out binarization processing on a plurality of poultry egg images, and carrying out ellipse detection to obtain poultry egg area images; performing expansion operation based on the image of the poultry egg area to obtain a connected domain to be evaluated in the image of the poultry egg area; calculating the area of each connected domain to be evaluated and the area of a circumscribed rectangle of the connected domain to be evaluated, and calculating the ratio of the area of the connected domain to be evaluated and the area of the circumscribed rectangle; and when the ratio corresponding to the connected domain to be evaluated in the image of the egg area is smaller than a preset value, judging that the egg has cracks. By adopting the method, the poultry egg crack detection cost can be reduced, and the crack detection efficiency can be improved.

Description

Poultry egg crack detection method and device
Technical Field
The invention relates to the technical field of poultry egg processing, in particular to a method and a device for detecting cracks of poultry eggs.
Background
The eggs have rich nutritional value and are food which can not be obtained in daily life. The shells of the eggs are fragile and fragile, and the eggs are deteriorated and smelled in a short time due to cracks generated after the shells are broken. Therefore, it is necessary to detect surface cracks of eggs and sort out the cracked eggs when packaging.
With the development of poultry egg processing technology, a device and a method for detecting and sorting cracks of poultry eggs are provided, the crack detection and sorting of the poultry eggs can be divided into a manual mode and an automatic mode, the manual crack detection and sorting efficiency is low, and errors are easy to occur in long-time operation. Therefore, enterprises often use automated methods to detect and sort cracked eggs. In an automatic mode, a knocking vibration technology and a machine vision technology are usually adopted for crack detection, and a mechanical arm is adopted for picking crack eggs. The knocking vibration technology is generally in a contact type for detecting cracks, so that the eggs without the cracks are easily damaged, and the detection result is easily influenced by the appearance of the eggs. The crack detection by the machine vision technology generally adopts a single camera, so that the whole egg surface image is difficult to obtain by shooting, and the crack detection omission can be caused. After detection is completed, the mechanical arm has high technical difficulty in grabbing cracked eggs, and multi-sensor fusion is needed, so that the mechanical arm grabbing scheme is difficult to implement. In addition, the speed of grabbing cracked eggs by the mechanical arm is difficult to meet the production requirement.
Disclosure of Invention
Therefore, the egg crack detection method and device based on the visual sensor are high in sorting reliability and easy to implement.
A method of poultry egg crack detection, the method comprising:
obtaining a plurality of poultry egg images of the same poultry egg;
carrying out binarization processing on a plurality of poultry egg images, and carrying out ellipse detection to obtain poultry egg area images;
performing expansion operation based on the image of the poultry egg area to obtain a connected domain to be evaluated in the image of the poultry egg area;
calculating the area of each connected domain to be evaluated and the area of a circumscribed rectangle of the connected domain to be evaluated, and calculating the ratio of the area of the connected domain to be evaluated and the area of the circumscribed rectangle;
and when the ratio corresponding to the connected domain to be evaluated in the image of the egg area is smaller than a preset value, judging that the egg has cracks.
In one embodiment, the method for detecting egg cracks further comprises: when the ratio corresponding to the connected domain to be evaluated in the egg image is not smaller than a preset value, calculating the average gray value of the connected domain to be evaluated in the egg image; judging whether the average gray value is larger than a gray threshold value; and if the average gray value is larger than the gray threshold value, judging that the poultry egg has cracks.
In one embodiment, the binarizing processing on a plurality of egg images and performing ellipse detection to obtain an egg area image includes: filtering a plurality of poultry egg images, and then performing binarization processing to obtain a binarization image; and detecting an ellipse in the image of the binary image through Hough transform to obtain an image of the poultry egg area.
In one embodiment, the performing an expansion operation based on the image of the egg area to obtain a connected domain to be evaluated in the image of the egg area includes: acquiring the area of each connected domain in the image of the poultry egg area, and filtering the connected domains with the areas smaller than an area threshold value to obtain initial connected domains; and performing expansion operation on the initial connected domain to obtain a connected domain to be evaluated in the image of the poultry egg area.
An egg crack detection device, comprising: the hidden channel is positioned between the tail end of the front conveyor belt and the front end of the rear conveyor belt and comprises a glass partition plate, a light source, a plurality of industrial cameras and a photoelectric switch, the photoelectric switch is arranged at the inlet of the hidden channel, the glass partition plate is positioned in the middle of the hidden channel and is obliquely arranged, the light source is arranged below the glass partition plate, and the plurality of industrial cameras are arranged at the top of the hidden channel and are used for shooting images of eggs rolled off by the glass partition plate; wherein, a plurality of industrial cameras are used for shooting the egg images.
In one embodiment, the dark channel comprises an inclined section and a horizontal section, the glass partition plate, the light source and the plurality of industrial cameras are located in the inclined section, and the inclination angle of the inclined section is 5 degrees.
In one embodiment, the inclined section has a length of 0.8 meters and the horizontal section has a length of 0.2 meters.
In one of them embodiment, the dark passageway still includes the letter sorting subassembly, the letter sorting subassembly includes step motor, letter sorting pivot, baffle, step motor installs in the outside of dark passageway, and letter sorting pivot, baffle set up and are close to the exit in dark passageway, and the baffle will hide the passageway and fall into two passageways, and step motor drives the letter sorting pivot through the belt and rotates, letter sorting pivot upper end fixed stop, and the baffle drives through the letter sorting pivot and is predetermineeing the within range internal recycle and rotate.
In one embodiment, the egg crack detection device further comprises: and the controller is electrically connected with the stepping motor, and sends a rotation signal to the stepping motor to control the partition plate to rotate to open the corresponding channel when the current egg crack condition is different from the previous egg crack condition.
In one embodiment, sponge cushions are arranged on two sides of the dark channel.
According to the method and the device for detecting the cracks of the poultry eggs, the characteristics that most cracks on the surfaces of the poultry eggs have slender lines are utilized, the traditional image processing scheme is adopted, the cracks are quickly detected according to the ratio S of the area of a crack communication domain to the area of an external rectangle of the crack communication domain, the principle is simple, and the calculated amount is small; the reliability of the algorithm is improved by adopting a multi-sensor system; the implementation difficulty of the crack egg detection device is effectively reduced by using a basic common mechanical and electrical device; the sorting is realized by adopting a channel-dividing mode of a motor, so that the sorting speed is greatly improved; in addition, the method can be carried out by a plurality of groups of devices simultaneously, and the sorting speed is further improved under the condition of multi-channel detection.
Drawings
FIG. 1 is a schematic flow diagram of a method for detecting an egg crack in one embodiment;
FIG. 2 is a block diagram of an egg crack detection device according to one embodiment;
FIG. 3 is a diagram of the internal structure of a sorting assembly channel of the egg crack detection device in one embodiment;
FIG. 4 is a schematic diagram of the structure of the dark channel segments in one embodiment;
fig. 5 is a schematic view of a detailed operation flow of the egg crack detection in one embodiment.
1-front conveying belt; 2-an automatic splitter; 3-poultry eggs; 4-a photoelectric switch; 5, a singlechip; 6-an industrial camera; 7-a light source; 8-a computer; 9-a stepper motor; 10-sorting rotating shaft and partition board; 11-dark channel; 12-cracked egg collection box; 13-rear conveyor belt.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In one embodiment, as shown in fig. 1, there is provided an egg crack detection method, comprising the steps of:
and S110, obtaining a plurality of egg images of the same egg.
Wherein, the number of the poultry egg images can be two, and the poultry egg images can be collected by an industrial camera, and a plurality of poultry egg images are images of different surfaces of the same poultry egg. The fowl egg may be egg, duck egg, goose egg, etc. Specifically, the number of the poultry egg images is 3, and each poultry egg image is acquired by a different industrial camera.
S120, performing binarization processing on a plurality of egg images, and performing ellipse detection to obtain an egg area image
Specifically, binarization processing is carried out on a plurality of poultry egg images, and ellipse detection is carried out to obtain poultry egg area images; wherein the image can be filtered before the binarization processing. The ellipse detection adopts a Hough transform detection method.
And S130, performing expansion operation based on the image of the egg area to obtain a connected domain to be evaluated in the image of the egg area.
Specifically, performing expansion operation based on the image of the egg area to obtain a connected domain to be evaluated in the image of the egg area; for the image of the poultry egg area, the small connected domain can be filtered before the expansion operation, because the small connected domain may be noise or insignificant small crack, etc. Therefore, the calculation amount of the algorithm is reduced, the filtering capability of the algorithm is enhanced, and the reliability is enhanced.
S140, calculating the area of each connected domain to be evaluated and the area of the circumscribed rectangle of the connected domain to be evaluated, and calculating the ratio of the area of the connected domain to be evaluated and the area of the circumscribed rectangle.
The external rectangle of the connected domain to be evaluated is a rectangle surrounded by boundaries of a maximum abscissa, a minimum abscissa, a maximum ordinate and a minimum ordinate of all the pixel points of the connected domain.
For example, the area S1 of the connected component to be evaluated, the area S2 of the circumscribed rectangle of the connected component to be evaluated, and the ratio S of the area of the connected component to be evaluated to the area of the circumscribed rectangle is S1/S2.
S150, judging that the egg has cracks when the ratio corresponding to the connected domain to be evaluated in the image of the egg area is smaller than a preset value. The preset value can be adjusted, the adjustability of the algorithm is reserved, and the method accords with the specific actual situation. Because the cracks are basically in a long, thin and zigzag linear shape, if the area corresponding to the connected domain to be evaluated is the cracks, the area of the connected domain to be evaluated is much smaller than that of the circumscribed rectangle of the connected domain to be evaluated, and therefore a preset value is set; if the areas of the connected domain to be evaluated and the external rectangle are larger than the preset value, the connected domain to be evaluated and the external rectangle are likely to be block-shaped dirt or broken holes, the connected domain to be evaluated is distinguished through the average gray value of the region to be evaluated in the corresponding region of the gray image, if the average value is larger than 100, the connected domain to be evaluated is a broken opening, and the modified poultry egg is also considered to have cracks.
According to the method for detecting the cracks of the eggs, the complete surfaces of the eggs can be extracted by obtaining the images of the surfaces of the same eggs, the egg area is obtained after ellipse detection, then the connected domain to be evaluated is obtained through expansion operation, whether the cracks exist in the eggs is judged according to the comparison between the ratio of the area of the connected domain to be evaluated and the area of the external rectangle of the connected domain to be evaluated and a preset value, and the detection cost is low and the detection efficiency is high.
In one embodiment, after step S150, the method includes: and when the ratio corresponding to the connected domain to be evaluated does not exist in the image of the poultry egg area is smaller than a preset value, judging that the poultry egg has no crack. When the poultry egg is judged to be a non-cracked egg, the poultry egg is sent to a subsequent processing conveyor belt through a non-cracked channel.
In one embodiment, the method for detecting egg cracks further comprises: when the ratio corresponding to the connected domain to be evaluated in the egg image is not smaller than a preset value, calculating the average gray value of the connected domain to be evaluated in the egg image; judging whether the average gray value is larger than a gray threshold value; and if the average gray value is larger than the gray threshold value, judging that the poultry egg has cracks.
Wherein, the images of a plurality of poultry eggs of the same poultry egg are all gray level images. The ratio of the area of the connected domain to be evaluated to the external rectangle of the region to be evaluated is larger than a preset value, the connected domain to be evaluated may be dirty or a break with a dirty shape, and the dirty part in the gray image of the poultry egg is dark black, but the break is different in color. Therefore, the average gray value of the corresponding area of the connected domain to be evaluated in the gray image is calculated, if the average gray value of the connected domain to be evaluated is larger than the gray threshold, the connected domain is a break, and the egg is considered to have a crack. Wherein the grayscale threshold may be set to 100.
In one embodiment, after step S150, the method includes: and when the ratio S corresponding to the connected domain to be evaluated does not exist in the image of the egg area is smaller than a preset value, and the average gray value of the connected domain to be evaluated in the area of the image of the egg is not larger than a gray threshold, judging that the egg does not have cracks. When the poultry egg is judged to be a non-cracked egg, the poultry egg is sent to a subsequent processing conveyor belt through a non-cracked channel.
In one embodiment, the binarizing processing on a plurality of egg images and performing ellipse detection to obtain an egg area image includes: filtering a plurality of poultry egg images, and then performing binarization processing to obtain a binarization image; and detecting an ellipse in the image of the binary image through Hough transform to obtain an image of the poultry egg area.
The poultry egg image is a color image, and is subjected to filtering processing to remove image noise and then binarization.
In one embodiment, the performing an expansion operation based on the image of the egg area to obtain a connected domain to be evaluated in the image of the egg area includes: acquiring the area of each connected domain in the image of the poultry egg area, and filtering the connected domains with the areas smaller than an area threshold value to obtain initial connected domains; and performing expansion operation on the initial connected domain to obtain a connected domain to be evaluated in the image of the poultry egg area.
The connected domain with the filtering area smaller than the area threshold can remove the small connected domain to perform expansion operation; connected domains having too small an area may be noise or insignificant small cracks, etc., so when the area of the connected domain is less than the area threshold, the connected domain is removed. The area threshold may be set by a manual preset. The connected domains with the closer distance in the binary image may belong to the same crack, so that the expansion operation needs to be performed on the image to change the connected domains with the closer distance into the same connected domain.
The invention will now be described in further detail with reference to the accompanying figures 2-3 and specific examples.
As shown in fig. 2 and 3, an egg crack detection sorting apparatus and method based on vision are provided, in which fig. 2 is a structural diagram of the entire apparatus, and fig. 3 is a structural diagram of a sorting assembly for sorting. In fig. 2, the left end is the starting point of the device and the right end is the ending point of the device. According to the division of labor, the device can be divided into a conveying and dividing assembly, a poultry egg crack detection assembly and a sorting assembly. The conveying and column dividing assembly comprises a front conveying belt 1 and an automatic column divider 2, wherein the automatic column divider 2 is positioned above the front conveying belt 1 and close to one end of the inlet of the dark channel 11. The egg crack detection component comprises a photoelectric switch 4, a singlechip 5, an industrial camera 6, a light source 7, a computer 8 and a dark channel 11, wherein the dark channel 11 is a cuboid, the inlet of the dark channel is butted with the tail end of the front conveyer belt 1, and the outlet of the dark channel is butted with the front end of the rear conveyer belt 13 and a crack egg collecting box; the photoelectric switch 4 is positioned on the side wall of the inlet of the dark channel 11 and is connected with the singlechip 5 through a data line, and the singlechip is connected with the computer 8 through a data line; behind the photoelectric switch 4, the top of the dark channel 11 near the inlet direction is provided with 3 industrial cameras 6, the middle part is provided with a glass partition, 3 light sources 7 are arranged below the glass partition, and the light sources 7 and the industrial cameras 6 irradiate oppositely. The sorting assembly comprises a stepping motor 9, a sorting rotating shaft and partition plate 10, a dark channel 11, a cracked egg collecting box 12 and a rear conveying belt 13, wherein the stepping motor 9 is installed outside the dark channel and drives the sorting rotating shaft and partition plate 10 through a belt; the sorting rotating shaft and the separating plate 10 are positioned at the position, close to the outlet, of the dark channel 11 and are used for sorting eggs, the dark channel 11 at the rear part of the sorting rotating shaft is changed from a single channel into two channels, namely a cracked egg channel and a non-cracked egg channel, as shown in figure 2, the cracked egg channel is in butt joint with the cracked egg collecting box 12, and the non-cracked egg channel is in butt joint with the rear conveying belt 13.
On the basis of the device structure, the device of the invention has the following working procedures: the poultry eggs are conveyed to an automatic arraying device 2 by a front conveying belt 1 and are arrayed by the automatic arraying device 2. After the separation, the eggs 3 are arranged in a row and enter the dark channel 11 one by one for crack detection and sorting. After entering the dark channel 11, the eggs 3 go out of the industrial camera 6 through the photoelectric switch 4 to collect the images of the eggs. The egg image is transmitted to the computer 8 to detect whether the surface of the egg has cracks by using the egg crack detection method in the above embodiment. Due to the irradiation of the light source, the edges of the eggs and the background in the egg image are obvious, and cracks on the surfaces of the eggs are more obvious. As shown in fig. 5, the specific operations in detecting the egg cracks are as follows:
a.3, respectively collecting 1 egg image by each industrial camera; the purpose of adopting 3 industrial cameras to successively collect egg images is mainly to shoot the complete egg surface.
b.3, preprocessing the poultry egg image to obtain a binary image; in the preprocessing, filtering processing is firstly carried out on a gray level image collected by an industrial camera to remove image noise, and then binarization is carried out to obtain a binary image.
c. Ellipse detection is carried out, and an egg image is cut according to a detection result; since the edge of the egg is an ellipse, the ellipse in the image is detected by hough transform. And (4) regarding the detected ellipse as the edge of the egg, and then cutting the image to the left egg according to the ellipse detection result.
d. Removing the small connected domain, and performing expansion operation; connected domains having too small an area may be noise or insignificant small cracks, etc., so when the area of the connected domain is less than the area threshold, the connected domain is removed. The area threshold may be set by a manual preset. The connected domains with the closer distance in the binary image may belong to the same crack, so that the expansion operation needs to be performed on the image to change the connected domains with the closer distance into the same connected domain.
e. Searching external rectangles of the residual connected domains; and finding out the external rectangle of each connected domain in the elliptical area, and recording the position and the size of the rectangle.
f. And calculating the ratio S of the area of each connected domain in the elliptical area to the area of the circumscribed rectangle.
g. And comparing the ratio S of the connected domains calculated in the previous step with a preset area threshold, regarding the connected domains as cracks if the ratio S is smaller than the preset area threshold, calculating the average gray value of the corresponding region of the region to be evaluated in the gray image if the ratio S is larger than or equal to the area threshold, regarding the connected domains to be evaluated as breaks if the average gray value is larger than 100, and regarding the changed eggs as cracks. If the above 2 cases do not exist, no crack is formed.
h. And (6) ending.
For the eggs with cracks, the computer 8 sends an electric pulse signal to control the stepping motor 9 to close the non-cracked egg channel, and at the moment, the eggs enter the cracked egg channel and reach the cracked egg collecting box 12; for poultry eggs without cracks, the computer 8 sends an electric pulse signal to control the stepping motor 9 to close the crack egg channel, and at the moment, the poultry eggs enter the non-crack egg channel and reach the rear conveying belt 13.
It should be understood that although the steps in the flowcharts of fig. 1 and 5 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1 and 5 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
In one embodiment, as shown in fig. 2, there is provided an egg crack detection apparatus including: the device comprises a dark channel 11 positioned between the tail end of a front conveying belt 1 and the front end of a rear conveying belt 13, wherein the dark channel 11 comprises a glass partition plate, a light source 7, a plurality of industrial cameras 6 and a photoelectric switch 4, the photoelectric switch 4 is arranged at the inlet of the dark channel 11, the glass partition plate is positioned in the middle of the dark channel 11 and is obliquely arranged, the light source 7 is arranged below the glass partition plate, and the plurality of industrial cameras 6 are arranged at the top of the dark channel 11 and are used for shooting images of eggs 3 rolled off by the glass partition plate; the plurality of industrial cameras 6 are used for shooting the egg images in the above embodiment.
The dark channel is a channel with the periphery closed, and a light source and a camera are arranged in the dark channel, so that the influence of the surrounding environment on the shot image can be avoided. The glass partition plate is obliquely arranged in the dark channel, eggs can roll down conveniently, the glass partition plate can transmit light, the light source illuminates the dark channel through the glass partition plate, and the camera can shoot clear images of the eggs. The photoelectric switch 4 is positioned at the entrance of the dark channel, and when eggs enter the dark channel, the photoelectric switch detects the entering signals of the eggs, and then controls the light source to be turned on and the industrial camera to take pictures.
Before eggs are conveyed into the dark channel through the front conveying belt 1, the front conveying belt 1 conveys disordered eggs to the automatic sorting device 2, the eggs are sorted by the automatic sorting device 2, the sorted eggs 3 are arranged into 1 row, one egg enters the dark channel every time, and the eggs enter the dark channel one by one to be convenient for an industrial camera to photograph the same egg. The eggs 3 after being arranged enter the dark channel 11 one by one and naturally roll down along the inclined dark channel 11.
Specifically, the photoelectric switch 4 is mounted on the side wall of the front end of the dark channel 11 and is connected with the single chip microcomputer 5 through a data line. Behind the photoelectric switch 4, the top of the dark channel 11 is provided with 3 industrial cameras 6, the middle of the dark channel is provided with a glass partition plate, and 3 light sources 7 are arranged below the glass partition plate. When the eggs 3 roll off from the upper part of the glass clapboard, the light source 7 is always in an open state. The photoelectric switch 4 is triggered by rolling of the eggs 3, electric signals are transmitted to the single chip microcomputer 5, then the 3 industrial cameras 6 are controlled by the computer 8 to sequentially collect an egg image, then the image is transmitted to the computer 8 to be processed according to a pre-programmed program, and whether cracks exist on the surfaces of the eggs is detected.
It will be appreciated that, due to illumination by the light source, the egg and background edges in the image of the egg are evident, and the cracks on the surface of the egg are more evident.
In one embodiment, as shown in fig. 4, the dark channel 11 comprises an inclined section and a horizontal section, the glass partition, the light source and the plurality of industrial cameras are located in the inclined section, and the inclination angle of the inclined section is 5 °.
Wherein the length of the inclined section is 0.8 meter, and the length of the horizontal section is 0.2 meter. In this embodiment, the inclination angle can be convenient for birds eggs to roll off, and can not lead to birds eggs to break very fast, and the horizontal segment is as the buffer area that birds eggs slowed down, is convenient for back conveyer belt 13 to carry out subsequent processing to birds eggs, and the transport surface of back conveyer belt is the same level as the horizontal segment of dark passageway. The structure of the dark channel can enable eggs to enter the rear input belt at a linear speed as close as possible to that of the rear conveying belt, and meanwhile, the eggs are prevented from colliding and breaking due to too high speed.
In one of the embodiments, as shown in fig. 2 and 3, the hidden channel 11 further includes a sorting assembly, the sorting assembly includes a stepping motor 9, a sorting rotating shaft and a partition plate (10), the stepping motor 9 is installed outside the hidden channel 11, the sorting rotating shaft and the partition plate (10) are arranged at a position close to an outlet of the hidden channel, the partition plate divides the hidden channel 11 into two channels, the stepping motor drives the sorting rotating shaft to rotate through a belt, the partition plate is fixed at the upper end of the sorting rotating shaft, and the partition plate is driven to rotate in a circulating manner within a preset range through the sorting rotating shaft.
As shown in fig. 3, the dark channel 11 is divided into a non-cracked egg channel and a cracked egg channel by the partition plate, when a crack is detected in an egg, the partition plate rotates to the left to open the cracked egg channel, and when no crack is detected in the egg, the partition plate rotates to the right to open the non-cracked egg channel.
Specifically, the rear end of the dark channel 11 is provided with a stepping motor 9, a sorting rotating shaft and a partition plate (10), and the stepping motor (9) drives the sorting rotating shaft and the partition plate (10) to swing through a belt. In addition, the lower end of the dark channel 11 is changed from a single channel to a double channel and is divided into a cracked egg channel and a non-cracked egg channel. After the detection result of the cracks of the poultry eggs is calculated by the computer 8, an electric pulse signal is sent to the stepping motor 9, and the stepping motor 9 is controlled to drive the sorting rotating shaft and the partition plate 10 to swing and sort. After sorting, eggs with cracks on the surfaces enter the crack egg collecting box through the crack egg channel, and the rest eggs enter the rear conveying belt 13 through the non-crack egg channel for subsequent processing operation.
In one embodiment, the egg crack detection device further comprises: and the controller is electrically connected with the stepping motor 9, and sends a rotation signal to the stepping motor to control the partition plate to rotate to open the corresponding channel when the current egg crack condition is different from the previous egg crack condition.
Herein, the term egg cracking refers to both cracking and non-cracking.
In one embodiment, sponge cushions are arranged on two sides of the dark channel.
For specific limitations of the egg crack detection apparatus, reference may be made to the above limitations of the egg crack detection method, which are not described herein again. The modules in the egg crack detection device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for detecting cracks of poultry eggs, which is characterized by comprising the following steps:
obtaining a plurality of poultry egg images of the same poultry egg;
carrying out binarization processing on a plurality of poultry egg images, and carrying out ellipse detection to obtain poultry egg area images;
performing expansion operation based on the image of the poultry egg area to obtain a connected domain to be evaluated in the image of the poultry egg area;
calculating the area of each connected domain to be evaluated and the area of a circumscribed rectangle of the connected domain to be evaluated, and calculating the ratio of the area of the connected domain to be evaluated and the area of the circumscribed rectangle;
and when the ratio corresponding to the connected domain to be evaluated in the image of the egg area is smaller than a preset value, judging that the egg has cracks.
2. An egg crack detection method according to claim 1, further comprising:
when the ratio corresponding to the connected domain to be evaluated in the egg image is not smaller than a preset value, calculating the average gray value of the connected domain to be evaluated in the egg image;
judging whether the average gray value is larger than a gray threshold value;
and if the average gray value is larger than the gray threshold value, judging that the poultry egg has cracks.
3. An egg crack detection method according to claim 1, wherein the binarizing process is performed on a plurality of egg images and ellipse detection is performed to obtain an egg area image, comprising:
filtering a plurality of poultry egg images, and then performing binarization processing to obtain a binarization image;
and detecting an ellipse in the image of the binary image through Hough transform to obtain an image of the poultry egg area.
4. The egg crack detection method according to claim 1, wherein performing an expansion operation based on the egg area image to obtain a connected domain to be evaluated in the egg area image comprises:
acquiring the area of each connected domain in the image of the poultry egg area, and filtering the connected domains with the areas smaller than an area threshold value to obtain initial connected domains;
and performing expansion operation on the initial connected domain to obtain a connected domain to be evaluated in the image of the poultry egg area.
5. An egg crack detection device, comprising: the hidden channel is positioned between the tail end of the front conveyor belt and the front end of the rear conveyor belt and comprises a glass partition plate, a light source, a plurality of industrial cameras and a photoelectric switch, the photoelectric switch is arranged at the inlet of the hidden channel, the glass partition plate is positioned in the middle of the hidden channel and is obliquely arranged, the light source is arranged below the glass partition plate, and the plurality of industrial cameras are arranged at the top of the hidden channel and are used for shooting images of eggs rolled off by the glass partition plate; wherein a plurality of industrial cameras are used to capture images of poultry eggs according to any one of claims 1 to 4.
6. An egg crack detection device according to claim 5, wherein the dark channel comprises an inclined section and a horizontal section, the glass partition, the light source and the plurality of industrial cameras are located in the inclined section, and the inclination angle of the inclined section is 5 °.
7. An egg crack detection device as claimed in claim 6 wherein the inclined section has a length of 0.8 m and the horizontal section has a length of 0.2 m.
8. An egg crack detection device according to claim 5, wherein the hidden channel further comprises a sorting assembly, the sorting assembly comprises a stepping motor, a sorting rotating shaft and a partition plate, the stepping motor is mounted outside the hidden channel, the sorting rotating shaft and the partition plate are arranged at a position, close to an outlet, of the hidden channel, the partition plate divides the hidden channel into two channels, the stepping motor drives the sorting rotating shaft to rotate through a belt, the partition plate is fixed at the upper end of the sorting rotating shaft, and the partition plate is driven by the sorting rotating shaft to rotate circularly within a preset range.
9. An egg crack detection device according to claim 8, further comprising: and the controller is electrically connected with the stepping motor, and sends a rotation signal to the stepping motor to control the partition plate to rotate to open the corresponding channel when the current egg crack condition is different from the previous egg crack condition.
10. An egg crack detection device as claimed in claim 5, wherein sponge cushions are provided on both sides of the dark channel.
CN202110972002.7A 2021-08-24 2021-08-24 Poultry egg crack detection method and device Active CN113686876B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110972002.7A CN113686876B (en) 2021-08-24 2021-08-24 Poultry egg crack detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110972002.7A CN113686876B (en) 2021-08-24 2021-08-24 Poultry egg crack detection method and device

Publications (2)

Publication Number Publication Date
CN113686876A true CN113686876A (en) 2021-11-23
CN113686876B CN113686876B (en) 2022-10-04

Family

ID=78581730

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110972002.7A Active CN113686876B (en) 2021-08-24 2021-08-24 Poultry egg crack detection method and device

Country Status (1)

Country Link
CN (1) CN113686876B (en)

Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103528515A (en) * 2013-10-15 2014-01-22 北京交通大学长三角研究院 Dynamic detection method for crack of bridge bottom surface
CN104749190A (en) * 2015-04-02 2015-07-01 华中农业大学 Online visual inspection device and online visual inspection method for cracks on surface of poultry eggs
CN105151430A (en) * 2015-08-25 2015-12-16 石忠 Bird egg sorting device
CN105334219A (en) * 2015-09-16 2016-02-17 湖南大学 Bottleneck defect detection method adopting residual analysis and dynamic threshold segmentation
CA3006240A1 (en) * 2015-04-27 2016-11-03 Wuhan Wuda Zoyon Science And Technology Co., Ltd. A stepwise refinement detection method for pavement cracks
CN107330478A (en) * 2017-07-24 2017-11-07 广东工业大学 A kind of cherry tomato sorting technique, system and cherry tomato on-line sorting system
WO2018086299A1 (en) * 2016-11-11 2018-05-17 广东电网有限责任公司清远供电局 Image processing-based insulator defect detection method and system
CN108051449A (en) * 2018-01-30 2018-05-18 华中农业大学 The online visible detection method of Salted duck egg face crack based on morphologic edge detection
CN109084957A (en) * 2018-08-31 2018-12-25 华南理工大学 The defects detection and color sorting process and its system of photovoltaic solar crystal-silicon battery slice
CN109156383A (en) * 2018-11-02 2019-01-08 陕西科技大学 A kind of open country convolvulate asiabell root automatic sorting device and method
CN109187581A (en) * 2018-07-12 2019-01-11 中国科学院自动化研究所 The bearing finished products plate defects detection method of view-based access control model
CN109187553A (en) * 2018-09-11 2019-01-11 湖北工业大学 A kind of rotten egg online intelligent recognition method based on machine vision
CN109856144A (en) * 2019-03-13 2019-06-07 西北农林科技大学 A kind of Kiwi berry based on mobile phone expands fruit detection method and device
CN110296997A (en) * 2019-07-03 2019-10-01 三峡大学 The defect inspection method and device of ceramic tile based on machine vision
CN110648325A (en) * 2019-09-29 2020-01-03 北部湾大学 Nixing pottery big data analysis genuine product checking system
CN110992329A (en) * 2019-11-28 2020-04-10 上海微创医疗器械(集团)有限公司 Product surface defect detection method, electronic device and readable storage medium
CN111257339A (en) * 2020-02-25 2020-06-09 华中农业大学 Preserved egg crack online detection method and detection device based on machine vision
CN111642420A (en) * 2019-03-04 2020-09-11 湘潭大学 Egg nondestructive testing sorting device and egg acoustic signal acquisition unit thereof
CN112881432A (en) * 2021-01-12 2021-06-01 成都泓睿科技有限责任公司 Method for detecting bottle mouth cracks of liquid glass bottle
CN112967243A (en) * 2021-02-26 2021-06-15 清华大学深圳国际研究生院 Deep learning chip packaging crack defect detection method based on YOLO
CN113183625A (en) * 2021-04-23 2021-07-30 广州诚鼎机器人有限公司 Stock detection device and oval calico printing machine

Patent Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103528515A (en) * 2013-10-15 2014-01-22 北京交通大学长三角研究院 Dynamic detection method for crack of bridge bottom surface
CN104749190A (en) * 2015-04-02 2015-07-01 华中农业大学 Online visual inspection device and online visual inspection method for cracks on surface of poultry eggs
CA3006240A1 (en) * 2015-04-27 2016-11-03 Wuhan Wuda Zoyon Science And Technology Co., Ltd. A stepwise refinement detection method for pavement cracks
CN105151430A (en) * 2015-08-25 2015-12-16 石忠 Bird egg sorting device
CN105334219A (en) * 2015-09-16 2016-02-17 湖南大学 Bottleneck defect detection method adopting residual analysis and dynamic threshold segmentation
WO2018086299A1 (en) * 2016-11-11 2018-05-17 广东电网有限责任公司清远供电局 Image processing-based insulator defect detection method and system
CN107330478A (en) * 2017-07-24 2017-11-07 广东工业大学 A kind of cherry tomato sorting technique, system and cherry tomato on-line sorting system
CN108051449A (en) * 2018-01-30 2018-05-18 华中农业大学 The online visible detection method of Salted duck egg face crack based on morphologic edge detection
CN109187581A (en) * 2018-07-12 2019-01-11 中国科学院自动化研究所 The bearing finished products plate defects detection method of view-based access control model
CN109084957A (en) * 2018-08-31 2018-12-25 华南理工大学 The defects detection and color sorting process and its system of photovoltaic solar crystal-silicon battery slice
CN109187553A (en) * 2018-09-11 2019-01-11 湖北工业大学 A kind of rotten egg online intelligent recognition method based on machine vision
CN109156383A (en) * 2018-11-02 2019-01-08 陕西科技大学 A kind of open country convolvulate asiabell root automatic sorting device and method
CN111642420A (en) * 2019-03-04 2020-09-11 湘潭大学 Egg nondestructive testing sorting device and egg acoustic signal acquisition unit thereof
CN109856144A (en) * 2019-03-13 2019-06-07 西北农林科技大学 A kind of Kiwi berry based on mobile phone expands fruit detection method and device
CN110296997A (en) * 2019-07-03 2019-10-01 三峡大学 The defect inspection method and device of ceramic tile based on machine vision
CN110648325A (en) * 2019-09-29 2020-01-03 北部湾大学 Nixing pottery big data analysis genuine product checking system
CN110992329A (en) * 2019-11-28 2020-04-10 上海微创医疗器械(集团)有限公司 Product surface defect detection method, electronic device and readable storage medium
CN111257339A (en) * 2020-02-25 2020-06-09 华中农业大学 Preserved egg crack online detection method and detection device based on machine vision
CN112881432A (en) * 2021-01-12 2021-06-01 成都泓睿科技有限责任公司 Method for detecting bottle mouth cracks of liquid glass bottle
CN112967243A (en) * 2021-02-26 2021-06-15 清华大学深圳国际研究生院 Deep learning chip packaging crack defect detection method based on YOLO
CN113183625A (en) * 2021-04-23 2021-07-30 广州诚鼎机器人有限公司 Stock detection device and oval calico printing machine

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
SONG JIANG ET AL.: "Method for extracting crack area on structure surface based on digital image processing technology", 《JOURNAL OF PHYSICS: CONFERENCE SERIES》 *
厉荣宣等: "工件表面裂纹机器视觉检测研究", 《自动化仪表》 *
杨群等: "基于RANSAC的鸡蛋凹陷检测", 《软件导刊》 *
段宇飞: "鸡蛋多品质高通量在线快速无损检测研究", 《中国博士学位论文全文数据库 工程科技Ⅰ辑》 *
辛永信等: "基于机器视觉的禽蛋脏污及裂纹检测系统设计", 《机电信息》 *
陈羽立: "《基于机器视觉的鸡蛋分拣系统的研究》", 《中国优秀硕士学位论文全文数据库 农业科技辑》 *

Also Published As

Publication number Publication date
CN113686876B (en) 2022-10-04

Similar Documents

Publication Publication Date Title
US20220217951A1 (en) Method and system for monitoring egg-laying performance of caged laying-hens at laying-hen positions
CN109377485A (en) A kind of instant noodles packaging defect machine vision detection method
CN104749190B (en) The online vision inspection apparatus and its method of a kind of birds, beasts and eggs face crack
JPH05277990A (en) Slicing machine
CN101976350A (en) Grain storage pest detection and identification method based on video analytics and system thereof
CN110490043A (en) A kind of forest rocket detection method based on region division and feature extraction
CN110599470B (en) Magnetic shoe surface defect detection system and method
CN111239142A (en) Paste appearance defect detection device and method
Liu et al. A computer vision system for automatic steel surface inspection
CN111223129A (en) Detection method, detection device, monitoring equipment and computer readable storage medium
US20070071284A1 (en) Method of detecting bunched-together poster items by analyzing images of their edges
CN113894055A (en) Hardware surface defect detection and classification system and method based on machine vision
CN111127448A (en) Model and method for detecting air spring fault based on isolated forest
CN116441190A (en) Longan detection system, method, equipment and storage medium
CN113686876B (en) Poultry egg crack detection method and device
JP6059957B2 (en) Wildlife identification device, wildlife identification method, and program
CN110355458B (en) Automatic gasket arranging device and method
CN203069148U (en) Finished magnetic ring image automatic detection system
CN106991667A (en) A kind of prawn integrality method of discrimination for building characteristics of image spectrum
CN115953627A (en) Image recognition system capable of classifying grades of peppers
CN111257339B (en) Preserved egg crack online detection method and detection device based on machine vision
Ghezelbash et al. Design and implementation of a low cost computer vision system for sorting of closed-shell pistachio nuts
CN112058701B (en) Coal and coal gangue sorting system and method based on polarization imaging
CN117102078A (en) Dried shrimp defect detection device and method based on deep learning
CN112784769B (en) Double-yolk egg online identification system and method based on raspberry pie and machine vision

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant