Eggshell surface properties nondestructive testing device and method
Through the non-destructive detection device and method of eggshell surface traits, multi-angle rotation and adaptive exposure algorithms are used to achieve efficient and accurate detection of the color, spots, sand skin and dark spots of the eggshells of poultry eggshells, solving the problem of incomplete detection in the prior art.
Patent Information
- Application Number
- CN202510783370.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-06-12
AI Technical Summary
The prior art lacks systematic methods and integrated devices to comprehensively and comprehensively detect the color, spots, sand skin and dark spots of egg shells, and the detection results are not accurate.
The non-destructive detection device for surface traits of eggshells is adopted, including detection concealing box, rotating gimbal, transmission platform, image acquisition instrument and annular reflective light source. The transmission platform is driven to rotate by rotating gimbal, and combined with adaptive exposure algorithms and multiple detection models, the acquisition and analysis of transmitted and reflected images are realized.
It improves the accuracy and efficiency of detection, avoids the incompleteness and inaccuracy of detection caused by single-sided images, and realizes a comprehensive and comprehensive inspection of different varieties, shell colors and large eggs.
Smart Images

Figure CN120275338B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of agricultural product detection, and in particular to a device and method for non-destructive detection of eggshell surface properties. Background Art
[0002] Eggshell quality testing plays a key role in enhancing the commercial value of poultry eggs and ensuring their safety. It effectively selects high-quality eggs and meets consumer demand for premium eggs. For example, egg color requirements vary across regions, with consumers preferring eggs with uniform color. However, eggshell speckling, sandy skin, and dark spots can significantly influence consumer purchasing decisions.
[0003] Spotted eggs primarily manifest as unusually colored spots (brown or white, etc.) on the eggshell surface. These spots are caused by abnormal calcium deposition in the uterus of the laying hen, such as salpingitis or dietary imbalances that lead to abnormal eggshell pigmentation. Shar-pee eggs primarily manifest as small, raised calcium lumps on the eggshell surface, such as abnormal calcium deposits secreted from the uterus. These spots are caused by nutritional deficiencies, calcium overdose, salpingitis, or infectious bronchitis. Dark-spotted eggs primarily manifest as uneven eggshell thickness and uneven distribution of organic matter, resulting in distinct spots visible under light. These spots are caused by insufficient shell membrane protein secretion, mycotoxins, environmental stress, or prolonged storage. Therefore, non-destructive detection of these eggshell abnormalities is crucial.
[0004] Currently, eggshell surface characteristics are primarily measured by manual measurement and visual inspection. Qualitative analysis of eggshell color involves direct observation of the eggshell color with the human eye and visual comparison with a standard color chart. Surface spots and dark spots are typically identified using sensory methods, with graded levels defined by manually defined parameters for spot, sandy, and dark spot grading. Egg shape index is also typically measured using a vernier caliper.
[0005] There are many studies on the use of visual technology to detect egg shell surface characteristics. However, there is no systematic method or integrated device that can achieve comprehensive and integrated detection of egg shape index, egg shell color, spots, sand skin and dark spots, and the accuracy of the test results is not high. Summary of the Invention
[0006] In view of the problems existing in the prior art, the present invention provides a device and method for non-destructive detection of eggshell surface properties.
[0007] The present invention provides a nondestructive detection device for eggshell surface properties, comprising: a processing module and a detection device body; the detection device body comprises a detection darkroom, a rotating platform arranged at the bottom of the detection darkroom, a transmission platform arranged on the rotating platform, an image acquisition instrument arranged on the inner side of the detection darkroom and flush with the detection egg, and an annular reflective light source surrounding the image acquisition instrument; the transmission platform is provided with an opening on the top for placing the detection egg, and is provided with a transmission light source inside for emitting a light beam toward the detection egg through the opening, and is driven by the rotating platform to perform uniform rotation four times a week; the processing module acquires transmission images at four rotation angles acquired when the transmission light source is turned on through the image acquisition instrument, and determines the detection result of eggshell transmission type detection based on the transmission images; and acquires reflection images at four rotation angles when the annular reflective light source is turned on through the image acquisition instrument, and determines the detection result of reflection type detection based on the reflection images.
[0008] According to a non-destructive testing device for eggshell surface properties provided by the present invention, the transmission type detection includes dark spot detection, and the reflection type detection includes one or more of spot detection, sand skin detection, color detection and egg shape index detection.
[0009] According to the present invention, a nondestructive testing device for eggshell surface properties further includes an exposure processing module for continuously adjusting the exposure value using an adaptive exposure algorithm until an exposure value adjustment termination condition is reached, and using the adjusted exposure value for the image acquisition device to acquire a transmission image or a reflection image, wherein the adaptive exposure algorithm includes:
[0010] Obtain a sample image of the egg product to be tested, extract the central rectangular area of the egg area in the sample image as the region of interest (ROI); use the Sobel operator to calculate the gradient of the region of interest, and determine the gradient mean based on the gradient of the ROI; calculate the brightness of the ROI, and calculate the brightness error based on the brightness of the ROI; and adjust the exposure value based on the gradient mean and the brightness error;
[0011] Among them, the exposure value adjustment termination conditions include: when the absolute value of the brightness error of multiple consecutive frames of images is less than or equal to a first preset threshold, and the multiple-frame fluctuation rate of the ROI gradient mean is less than a second preset threshold, the exposure value adjustment is terminated; or, the exposure value has reached the boundary of the hardware supported range and the exposure value adjustment is terminated when the number of exposure value adjustments in a single adjustment cycle is greater than the preset number.
[0012] According to the eggshell surface property nondestructive testing device provided by the present invention, determining the gradient mean value based on the gradient of the ROI includes:
[0013] ;
[0014] Among them, I(x,y) is the grayscale value of the image at the coordinate (x,y), and are the gradients in the horizontal or vertical direction, respectively, and N is the total number of ROI pixels;
[0015] Calculating the brightness error according to the brightness of the ROI includes:
[0016] ;
[0017] in, is the brightness error, is the normalized brightness of the i-th pixel in the ROI, is the target brightness;
[0018] The step of adjusting the exposure value according to the gradient mean and the brightness error includes:
[0019] Set the initial exposure value to 0 and calculate the exposure increment to be applied according to the following formula:
[0020] ;
[0021] in, is the normalized gradient mean of ROI, α is the maximum single-step adjustment amplitude, k is the gradient sensitivity coefficient, and β is the brightness error suppression factor.
[0022] According to the present invention, a non-destructive testing device for eggshell surface properties also includes a control module for controlling the different rotation angles of the pan-tilt head, controlling the opening and closing of the transmitted light source and the annular reflection light source according to different detection types, and controlling the image acquisition device to respectively capture images of the current angle when the transmitted light source or the annular reflection light source is turned on, so as to obtain corresponding transmitted images and reflected images; wherein, when capturing the transmitted image, the transmitted light source is turned on and the annular reflection light source is turned off, and when capturing the reflected image, the annular reflection light source is turned on and the transmitted light source is turned off.
[0023] According to a non-destructive detection device for eggshell surface properties provided by the present invention, the processing module includes: a first property detection unit, used to input four reflection images into a trained first detection model respectively, output spot detection and sharp skin detection results corresponding to each reflection image, and determine the comprehensive spot sharp skin type based on the detection results of the four images; a second property detection unit, used to input four transmission images into a trained second detection model respectively, output dark spot detection results corresponding to each image, and determine the comprehensive dark spot type based on the dark spot detection results of the four images; a third property detection unit, used to input four reflection images into a trained third detection model respectively, output the eggshell color corresponding to each reflection image, and comprehensively determine the eggshell color based on the color detection results of the four images; wherein, the first detection model is obtained after training based on the properties of multiple normal, spotted and sharp skin eggs as labels and the corresponding reflection images as input data, the second detection model is obtained after training based on the properties of multiple normal and dark spot eggs as labels and the transmission images as input data, and the third detection model is obtained after training based on reflection images of multiple different shell colors as input data.
[0024] According to a non-destructive detection device for eggshell surface properties provided by the present invention, the processing module also includes a spot grade detection unit, which is used to: when the spotted Sharpei trait type is spot, input four reflected images into a trained fourth detection model respectively, and output the spot area of each reflected image; determine the comprehensive spot score grade according to the ratio of the spot area of the four reflected images to the area of the egg product area.
[0025] According to a non-destructive detection device for eggshell surface properties provided by the present invention, the processing module also includes an egg shape index detection unit, which is used to: obtain the average value of the number of long-axis pixel points of the detected egg based on the front image and the back image in the four reflected images, and obtain the average value of the number of short-axis pixel points of the detected egg based on the large head image and the small head image in the reflected image; according to the average value of the number of long and short axis pixel points, the linear fitting models of the long axis and the short axis of the egg are respectively input to obtain the corresponding long and short axis sizes, and the egg shape index is determined based on the long and short axis sizes.
[0026] According to the present invention, a nondestructive testing device for eggshell surface properties further includes a display screen for displaying property detection results, and an interactive module for receiving user-input selection results of eggshell transmission type detection and / or reflection type detection.
[0027] The present invention also provides a non-destructive detection method for eggshell surface properties based on the above-mentioned device, comprising: after receiving a start instruction, controlling the rotating pan-tilt head to perform four equal-step rotations in a week, and before each rotation, turning on and off the annular reflection light source and the transmission light source according to the current execution requirements of the reflection type detection and the transmission type detection, and controlling the image acquisition instrument to capture the corresponding transmission image and reflection image after turning on the corresponding light source; determining the detection result of the eggshell transmission type detection based on the transmission image, and determining the detection result of the reflection type detection based on the reflection image; wherein, when collecting the transmission image, the transmission light source is turned on and the annular reflection light source is turned off, and when collecting the reflection image, the annular reflection light source is turned on and the transmission light source is turned off.
[0028] The present invention provides a device and method for nondestructive testing of eggshell surface properties. Through the interaction between a rotating pan-tilt platform and a transmission platform, an image acquisition instrument can simultaneously capture reflection or transmission images of the tested egg at multiple rotation angles. These reflection and transmission images at multiple rotation angles comprehensively reflect the overall surface characteristics of the tested egg. These images can conveniently capture a variety of eggshell surface characteristics, improving detection accuracy without incurring additional space and time costs. This avoids the incomplete, incomplete, and inaccurate detection problems associated with current machine vision technology for eggshell surface property testing due to unilateral images. Furthermore, by switching between a transmitted light source and an annular reflected light source, the device can simultaneously perform transmission and reflection testing without incurring additional space and time costs, further improving detection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0030] Figure 1 This is a front view of the overall structure of the eggshell surface property nondestructive testing device provided by the present invention;
[0031] Figure 2 1. It is a schematic oblique view of the device for nondestructive testing of eggshell surface properties provided by the present invention;
[0032] Figure 3 1 is a side cross-sectional schematic diagram of the main body of the eggshell surface property nondestructive testing device provided by the present invention;
[0033] Figure 4a This is one of the shooting effect diagrams of the adaptive exposure algorithm provided by the present invention;
[0034] Figure 4b This is the second picture of the shooting effect of the adaptive exposure algorithm provided by the present invention;
[0035] Figure 4c This is the third picture of the shooting effect of the adaptive exposure algorithm provided by the present invention;
[0036] Figure 4d This is the fourth picture of the shooting effect of the adaptive exposure algorithm provided by the present invention;
[0037] Figure 5a Schematic diagram of the fitting curve of the short axis provided by the present invention;
[0038] Figure 5b Schematic diagram of the fitting curve of the major axis provided by the present invention;
[0039] Figure 6 Schematic diagram of the fitting effect of the final egg-shaped index provided by the present invention;
[0040] Figure 7 This is the quantitative measurement diagram of eggshell spots provided by the present invention;
[0041] Figure 8 This is a quantitative measurement diagram of dark spots on eggshells provided by the present invention.
[0042] Explanation of the accompanying symbols: 1-detection darkroom; 2-transmission platform; 3-rotating pan-tilt head; 4-control box; 5-annular reflective light source; 6-image acquisition device; 7-display screen; 8-transmission platform cover; 9-transmission light source; 10-transmission platform box; 11-transmission light source support; 12-rotating pan-tilt head connecting plate one inner ring; 13-rotating pan-tilt head connecting plate two inner ring; 14-motor coupling; 15-42 stepper motor; 16-rotating pan-tilt head base; 17-pan-tilt head support column; 18-rotating pan-tilt head connecting plate three; 19-rotating pan-tilt head connecting plate two; 20-rotating bearing; 21-rotating pan-tilt head connecting plate one; 22-annular buffer pad; 23-rotating pan-tilt head top plate, 24-display screen support. DETAILED DESCRIPTION
[0043] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0044] The following combination Figures 1-8 The present invention describes an eggshell surface property non-destructive detection device and method. Figure 1 This is a front view of the overall structure of the eggshell surface property nondestructive testing device provided by the present invention. Figure 2 Schematic diagram of the eggshell surface property nondestructive testing device provided by the present invention. Figure 3 FIG. 1 is a side cross-sectional schematic diagram of the main body of the nondestructive testing device for eggshell surface properties provided by the present invention. As shown in the figure, the present invention provides a nondestructive testing device for eggshell surface properties, comprising:
[0045] The processing module and the detection device body; the detection device body includes a detection dark box 1, a rotating platform 3 arranged at the bottom of the detection dark box 1, a transmission platform 2 arranged on the rotating platform 3, an image acquisition device 6 arranged on the inner side of the detection dark box 1 and flush with the detection egg, and an annular reflection light source 5 surrounding the image acquisition device 6; the transmission platform 2 is provided with an opening on the top for placing the detection egg, and a transmission light source is provided inside for emitting a light beam to the detection egg through the opening, and is driven by the rotating platform 3 to rotate evenly four times a week; the processing module obtains transmission images of four rotation angles collected when the transmission light source 9 is turned on through the image acquisition device 6, and determines the detection result of the eggshell transmission type detection based on the transmission images, and obtains reflection images of four rotation angles when the annular reflection light source 5 is turned on through the image acquisition device 6, and determines the detection result of the reflection type detection based on the reflection images.
[0046] The rotating platform 3, which is driven by a motor bracket and a 42-stepping motor, is secured to the bottom of the test chamber 1 by bolts and nuts. Driven by the rotating platform 3, the transmission platform 2 rotates four times in 90-degree steps, completing a complete 360-degree rotation. The transmission chamber is provided with a small hole, not only for placing the test eggs but also for forming a transmission channel. A remotely controlled transmission light source 9, located within the transmission platform 2, emits a light beam toward the test eggs. This light source 9 is activated remotely when a transmission-type test is required.
[0047] An image acquisition device 6 is mounted on the side of the dark box 1, flush with the egg under test. It captures images of the egg at four rotational angles as it rotates along the transmission platform 2. These images include the front, upper end, lower end, and lower end of the egg under test. These images are then sent to the processing module. A ring-shaped reflective light source 5, also mounted on the side of the dark box 1, illuminates the surface of the egg under test.
[0048] Since there are individual differences and anisotropy in the detected eggs themselves, there are differences in the eggshell thickness and eggshell color between different detected eggs, so a suitable adaptive exposure algorithm can be used to solve the image overexposure and darkening problems caused by the egg differences. After receiving the start command, the image acquisition instrument 6 can first call the adaptive exposure algorithm to determine the image acquisition parameters. After confirming that the parameters are used to shoot the image of the egg product front at 0 °, then the control motor drives the transmission platform 2 to rotate 90 °, shoot the image of the egg product head at 90 ° again, rotate 90 ° again, shoot the egg product back image at 180 °, rotate 90 ° again, shoot the egg product small end image at 270 °, and finally rotate 90 ° to complete a 360 ° rotation. An egg product detection ends.
[0049] During the image capture process, when the transmission light source 9 is turned off and the annular reflection light source 5 is turned on, the egg reflection image is captured; when the transmission light source 9 is turned on and the annular reflection light source 5 is turned off, the egg transmission image is captured.
[0050] The annular reflective light source 5 and the transmissive light source 9 are both LED light sources. After the annular reflective light source 5 is turned on, the egg to be tested is placed in a preset position and can be rotated in the center of the field of view of the image acquisition device 6.
[0051] An image acquisition device 6, located on the left side of the detection darkroom 1, can capture real-time reflected or transmitted images. Furthermore, the device captures and captures reflected or transmitted images of the egg at different times, each reflecting different angles of the egg. Based on these images from different angles, comprehensive morphological characteristic parameters of the egg's entire surface can be accurately extracted.
[0052] The processing module is used to process and detect images of eggs at different angles under transmission and reflection light, respectively. Each angle corresponds to an area, and performs transmission type detection and reflection type detection.
[0053] In some embodiments, the transmission-type detection includes dark spot detection, and the reflection-type detection includes one or more of spot detection, scaly skin detection, egg shape index, and eggshell color detection. For example, to complete the egg shape index detection, four angled images of the egg to be tested are first captured. The front and back images can be used to obtain the major axis information of the egg to be tested, while the large and small end images can be used to obtain the minor axis information of the egg to be tested. The egg shape index is then determined based on the major and minor axis information.
[0054] The eggshell surface property nondestructive testing device of the present invention, through the interaction between the rotating platform 3 and the transmission platform, enables the image acquisition instrument to simultaneously capture reflection or transmission images of the tested egg at multiple rotation angles. The reflection and transmission images at multiple rotation angles can comprehensively reflect the overall surface characteristics of the tested egg. Through these images, a variety of eggshell surface property characteristics can be conveniently obtained, improving the accuracy of detection without incurring additional space and time costs, and avoiding the problem of incomplete, incomplete, and inaccurate detection caused by unilateral images when detecting eggshell surface properties using current machine vision technology. On the other hand, by switching between a transmitted light source and an annular reflected light source, the device can simultaneously perform transmission detection and reflection detection without incurring additional space and time costs, further improving detection efficiency.
[0055] The device can realize the portability of egg shell surface property detection equipment, and can realize comprehensive and integrated detection of eggs of different varieties, different shell colors and different sizes.
[0056] Optionally, the transmission platform 2 includes a transmission platform cover 8, a transmission light source 9, a transmission platform box 10 and a transmission light source support 11; the rotating pan-tilt head 3 includes a motor coupling 14, a 42 stepper motor 15, a rotating pan-tilt head base 16, a rotating pan-tilt head top plate 23, an annular buffer pad 22, a rotating pan-tilt head connecting plate 1 21, a rotating bearing 20, a rotating pan-tilt head connecting plate 2 19, a rotating pan-tilt head connecting plate 3 18, a pan-tilt head support column 17, a rotating pan-tilt head connecting plate 1 inner ring 12 and a rotating pan-tilt head connecting plate 2 inner ring 13.
[0057] The transmission platform 2 is fixed on the rotating pan-tilt platform top plate 23, and the annular buffer pad 22 is placed between the rotating pan-tilt platform top plate 23 and the rotating pan-tilt platform connecting plate 1 21 to reduce the friction of rotation; the rotating bearing 20 is placed between the rotating pan-tilt platform connecting plate 1 inner ring 12 and the rotating pan-tilt platform connecting plate 2 inner ring 13; the rotating pan-tilt platform connecting plate 1 inner ring 12 and the rotating pan-tilt platform connecting plate 2 inner ring 13 are respectively placed between the rotating pan-tilt platform connecting plate 1 21 and the rotating pan-tilt platform connecting plate 2 19, one end of the motor coupling 14 is fixed to the rotating pan-tilt platform connecting plate 2 inner ring 13, and the other end is connected to the 42 stepping motor 15; the rotating pan-tilt platform connecting plate 3 18 is fixed on the 42 stepping motor 15, and the rotating pan-tilt platform base 16 is fixed to the bottom of the detection darkroom 1.
[0058] The 42 stepper motor 15 drives the second inner ring 13 of the rotating pan-tilt platform connecting plate to rotate due to the action of the motor coupling 14, thereby driving the rotating bearing 20 to rotate, and then driving the first inner ring 12 of the rotating pan-tilt platform connecting plate and the rotating pan-tilt platform top plate 23 to realize the overall rotation.
[0059] In some embodiments, an exposure processing module is further included, which is used to continuously adjust the exposure value using an adaptive exposure algorithm until the exposure value adjustment termination condition is reached, and the adjusted exposure value is used for the image acquisition device to obtain a transmission image or a reflection image. The adaptive exposure algorithm includes: obtaining a sample pattern of egg products for detection, extracting the central rectangular area of the egg area in the sample pattern as a region of interest (ROI); using a Sobel operator to calculate the gradient of the ROI, and determining a gradient mean based on the gradient of the ROI; calculating the brightness of the ROI, and calculating a brightness error based on the brightness of the ROI; adjusting the exposure value based on the gradient mean and the brightness error; the exposure value adjustment termination condition includes: terminating the exposure value adjustment when the absolute value of the brightness error of multiple consecutive frames of images is less than or equal to a first preset threshold, and the continuous multi-frame fluctuation rate of the ROI gradient mean is less than a second preset threshold; or terminating the exposure value adjustment when the exposure value has reached the boundary of the hardware supported range, and terminating the exposure value adjustment when the exposure value adjustment in a single adjustment cycle exceeds a preset number of times.
[0060] The continuous multiple frames can be set to 3 frames, the first preset threshold can be set to 5%, the second preset threshold can be set to 8%, and the preset number of times can be set to 8. The exposure value can be limited to the hardware supported range of [-8, 8], and the optimal exposure parameters can be applied to the image acquisition device.
[0061] During trait testing, the image acquisition device (which can be an industrial camera) and light source are located relatively close to the sample. While common, low-cost industrial cameras currently have automatic exposure capabilities, for the application scenario of this invention, the egg area captured by the image acquisition device only occupies a small, central portion of the entire image. Furthermore, the industrial camera and light source used during trait testing are located relatively close to the sample. Therefore, the automatic exposure algorithm of a typical industrial camera adjusts based on the brightness of the entire image. In the captured image, only the egg area is illuminated, while other areas (such as the black absorbent paper on the inner wall of the darkroom) are almost entirely filled with near-black pixels. Consequently, the automatic exposure function of a typical camera often results in overexposure or underexposure of the egg area during experiments.
[0062] To ensure clear reflected and projected images, this device utilizes an adaptive exposure method before capturing images. This method takes into account that overexposure of the egg area often occurs in the center of the egg. Therefore, a central rectangular area within the egg area in the image is selected as the region of interest (ROI), and exposure parameters are adjusted based on the brightness and gradient mean within this area. This adaptive exposure algorithm, through dual-dimensional adjustments in brightness and gradient, ensures that the image is neither too dark nor too exposed, while preserving image detail to the greatest extent possible. This adaptive exposure algorithm effectively addresses the issues of overexposure and darkening caused by varying eggshell color and thickness. Furthermore, the algorithm eliminates the need for re-adjustment of parameters for each new sample. Reflected image acquisition is particularly affected by eggshell color. Therefore, for eggs of the same color, adaptive exposure adjustment only needs to be performed once after the camera is turned on, and subsequent batches of eggs of the same color can use these same exposure parameters. For transmission image acquisition, while both eggshell color and thickness affect image quality, experiments have shown that thickness has a greater impact only when individual eggshells are too thick or too thin. Even so, the color of the eggshell is still the dominant factor, so when collecting eggs of the same color, the same exposure parameters can be used to avoid readjustment each time.
[0063] In some embodiments, determining the gradient mean according to the gradient of the ROI includes:
[0064] ;
[0065] Among them, I(x,y) is the grayscale value of the image at the coordinate (x,y), and are the gradients in the horizontal or vertical direction, respectively, and N is the total number of ROI pixels;
[0066] Calculating the brightness error according to the brightness of the ROI includes:
[0067] ;
[0068] in, is the brightness error, is the normalized brightness of the i-th pixel in the ROI, is the target brightness (can be set to 0.5, corresponding to 128 gray levels);
[0069] The step of adjusting the exposure value according to the gradient mean and the brightness error includes:
[0070] Set the initial exposure value to 0 and calculate the exposure increment to be applied according to the following formula:
[0071] ;
[0072] in, is the normalized gradient mean of ROI, α is the maximum single-step adjustment amplitude, which can be taken as 3.0, k is the gradient sensitivity coefficient, which can be taken as 8.0; β is the brightness error suppression factor, which can be taken as 30.0.
[0073] In some embodiments, the device further includes a display screen for displaying the property detection results. The display screen can be a display screen, and the processing module analyzes the reflected image or the transmitted image and displays the results on the display screen 7, thereby achieving intuitive output of the egg shell surface property detection results.
[0074] In some embodiments, a control module is further included for controlling different rotation angles of the pan-tilt head 3, controlling the opening and closing of the transmitted light source 9 and the annular reflection light source 5 according to different detection types, and controlling the image acquisition device 6 to respectively acquire images of the current angle when the transmitted light source 9 or the annular reflection light source 5 is turned on, so as to obtain corresponding transmitted images and reflected images; wherein the detection type includes transmitted type detection and / or reflected type detection, and when acquiring the transmitted image, the transmitted light source 9 is turned on and the annular reflection light source is turned off, and when acquiring the reflected image, the annular reflection light source 5 is turned on and the transmitted light source 9 is turned off.
[0075] like Figure 1-3 As shown, the control module is housed in a control box 4. The detection device comprises a detection darkroom 1, a transmission platform 2, a pan / tilt head 3, a control box 4, an annular reflective light source 5, an image acquisition device 6, and a display screen 7. The control box 4 is fixedly connected to the detection darkroom 1. The processing module in the control box 4 is connected to the display screen 7, which is fixed to a display screen support 24.
[0076] A control module can be provided to control the rotation of the stepper motor, such as a Raspberry Pi 4B. Alternatively, while controlling the rotation of the stepper motor, the control module can also control the opening and closing of the annular reflective light source and the transmissive light source 9, and control the image acquisition device 6 to capture images. Specifically, the control module controls the stepper motor to rotate 90° each time. If both reflection type detection and transmissive type detection are performed simultaneously, after each rotation, the annular reflective light source is turned on and the transmissive light source 9 is turned off, and the image acquisition device 6 is controlled to capture a reflected image. The annular reflective light source is then turned off and the transmissive light source 9 is turned on, and the image acquisition device 6 is controlled to capture a transmissive image. The next rotation then proceeds to capture an image at the current angle.
[0077] Specifically, a certain starting moment is 0°, and an image of the front of the egg is taken at 0°. Then, the motor is controlled to drive the transmission platform 2 to rotate 90°, and an image of the big end of the egg is taken again at 90°. Then, the transmission platform 2 is rotated 90° again to take an image of the back of the egg at 180°. Then, the transmission platform 2 is rotated 90° again to take an image of the small end of the egg at 270°. Finally, the transmission platform 2 is rotated 90° to complete a 360° rotation. The detection of one egg is completed, and the overall image of the egg at four angles is finally obtained.
[0078] In some embodiments, an interactive module is further included, configured to receive user input of a selection result for eggshell transmission type detection and / or reflection type detection. The interactive module can be implemented via a keypad or a touch-sensitive display screen, such as the aforementioned display screen 7, which utilizes a touch-sensitive display screen. The user can select eggshell transmission type detection, reflection type detection, or both transmission type detection and reflection type detection through the interactive module.
[0079] In some embodiments, the processing module includes: a first property detection unit, which is used to input the four reflected images into a trained first detection model respectively, output the spot detection and sharp skin detection results corresponding to each reflected image, and determine the comprehensive spot sharp skin type based on the detection results of the four images; a second property detection unit, which is used to input the four transmitted images into a trained second detection model respectively, output the dark spot detection result corresponding to each image, and determine the comprehensive dark spot type based on the dark spot detection results of the four images; a third property detection unit, which is used to input the four reflected images into a trained third detection model respectively, output the eggshell color corresponding to each reflected image, and comprehensively determine the eggshell color based on the color detection results of the four images; wherein, the first detection model is obtained after training based on the properties of multiple normal, spotted and sharp skin eggs as labels and the corresponding reflected images as input data, the second detection model is obtained after training based on the properties of multiple normal and dark spot eggs as labels and the transmitted images as input data, and the third detection model is obtained after training based on reflective images of multiple different shell colors as input data.
[0080] Among them, the first detection model, the second detection model, and the third detection model can adopt the current classification model based on the lightweight convolutional neural network, but the training data is different, so as to perform different classification detection tasks. The present invention collects images from four angles. For transmission detection or reflection detection, the images from the four angles can be input into the corresponding detection model to obtain four detection results. The comprehensive detection result is determined based on the four detection results. For example, if the images from two angles are confirmed to be dark-spotted eggs, the comprehensive dark spot type is determined to be dark-spotted eggs, or as long as the images from one angle are confirmed to be dark-spotted eggs, the comprehensive dark spot type is determined to be dark-spotted eggs.
[0081] In some embodiments, the processing module also includes a spot grade detection unit, which is used to: when the spotted Shar Pei trait type is a spotted egg product, input the four reflected images into the trained fourth detection model respectively, and output the spot area of each reflected image; determine the comprehensive spot score grade according to the ratio of the spot area of the four reflected images to the egg area.
[0082] When it is necessary to complete the detection of eggshell shavings, the area of the spots and the area ratio of the entire egg are extracted based on the reflection images of four different areas to obtain the comprehensive score of the eggshell spots. The fourth detection model can use the current target recognition network based on convolutional neural networks, such as YOLO and SSD networks. After identifying multiple spot frames, the spot area and the area of the entire egg are calculated based on pixels. Finally, the ratio of the spot area to the egg area is calculated to determine the comprehensive score of the spots. For more convenient and rapid calculations, the fourth detection model can also use image processing segmentation algorithms, such as the K-Means image segmentation algorithm. Since the spots and dark spots in the collected images are significantly different from other areas of the egg, defining a suitable K value can achieve the segmentation of the foreground and background. The spot area and the area of the entire egg are calculated based on the spot pixels in the segmented image. Finally, the ratio of the spot area to the egg area is calculated to determine the comprehensive score of the spots.
[0083] In some embodiments, the processing module further includes an egg shape index detection unit, which is configured to: obtain an average value of the number of pixels on the major axis of the egg detected based on the front and back images of the four reflected images, and obtain an average value of the number of pixels on the minor axis of the egg detected based on the large and small end images of the reflected images; input the average value of the number of pixels on the major and minor axes into a linear fitting model of the major and minor axes of the egg, respectively, to obtain the corresponding major and minor axis sizes, and determine the egg shape index based on the major and minor axis sizes. When the egg is identified as a spotted egg, the ratio of the area of the eggshell spots in the image to the area of the entire egg image is further calculated to obtain a comprehensive score for the eggshell spots.
[0084] Among them, the processing module can adopt the Raspberry Pi 4b development board, using the ARM Cortex-A72 processor and 8GB of memory, which is suitable for the operation and control of stepper motors and cameras. At the same time, it has a good system to facilitate the development and design of the control interface and connect to the display 5 to complete the control of the host computer. It has a small size, is easy to install and carry, and has functions such as power on and detection keys.
[0085] The detection dark box 1 can be made of aluminum alloy, and a large amount of black light-absorbing paper is laid on the inner wall to prevent reflection from the dark box wall, providing a good dark environment for detection. The left inner surface is fixedly connected to the image acquisition device 6 body and the annular reflective light source 5, and the upper outer surface is fixed with a display screen bracket for easy placement of the display screen 7.
[0086] The image acquisition device 6 can be a USB industrial camera with a wide-angle, low-focal-length, distortion-free design, capable of capturing clear images of eggs at close range. The annular reflective light source 5 is a white LED lamp with an inner diameter of 61 mm, which fits snugly over the image acquisition device 6. The transmitted light source 9 uses a 3W white light source and can be switched on and off remotely.
[0087] The specific operation process can be:
[0088] Press the power button of the Raspberry Pi 4b development board to initialize the system, open the host computer software interface on the display screen 7, and turn on the ring reflective light source 5 at the same time.
[0089] After placing the eggs to be tested on the platform cover, close the dark box door, click the detection button on the host computer software interface, and control the motor to rotate while taking images of the eggs. Every time the motor rotates 90°, there is a short delay of 1s for the image acquisition device 6 to take pictures. Finally, a total of four egg reflection images at different angles are taken.
[0090] The processing module processes the four acquired original reflection images to complete the detection of egg shape index, eggshell spots, and eggshell scurf. Each trait detection includes: first, obtaining the average number of pixels on the major axis of the tested egg based on the front and back of the egg, obtaining the average number of pixels on the minor axis of the tested egg based on the large and small ends of the egg, performing a linear fit with the actual measured major and minor axes of the egg to obtain a linear fitting model of the major and minor axes of the egg, dividing the minor axis by the calculated major axis to finally obtain the egg shape index, and completing the egg size classification based on the egg shape index; using a trained classification model to distinguish eggshell color from images taken from four different areas; using the trained classification model to distinguish normal eggs, spotted eggs, and scurf eggs from images taken from four different areas, and calculating the ratio of the area of the eggshell spots in the images identified as spotted eggs to the area of the entire egg, obtaining a comprehensive score for the eggshell spots, and finally displaying the test results on the host computer software interface.
[0091] It should be noted that eggshell dark spot detection is carried out, and the detection process is the same as above, but it is necessary to turn off the annular reflection light source 5 and turn on the transmission light source 9 by remote control at the same time. The processing module completes the detection of eggshell dark spots for the four original transmission images obtained. According to the transmission images of four different areas, the area of the dark spots and the area ratio of the whole egg product are extracted to obtain a comprehensive scoring grade of the eggshell dark spots.
[0092] To further describe the solution of the present invention, an example is given below:
[0093] The experimental eggs were 349 in total, including white, pink, brown, and green shells. During the test, the image information of the eggs was first collected in the designed test device. Figure 4a-4d The comparison between the pictures of different colors and thicknesses taken without the adaptive exposure algorithm and the pictures taken with it is shown. Figure 4a and Figure 4b is a reflection contrast diagram, Figure 4c and Figure 4dThis is a transmission contrast image. From the clarity and presentation of the image, it can be seen that the adaptive exposure algorithm can effectively solve the problems of overexposure and darkening caused by differences in eggshell color and thickness in a small darkroom.
[0094] Figure 5a and Figure 5b The present invention provides fitting curves for the short axis and long axis of eggs. Since four pictures of each egg are taken at different angles, the short axis pixel points of the images of the large head and small head of the egg are extracted and the average value is taken as the average short axis pixel point. The long axis pixel points of the front and back of the egg are obtained and the average value is taken as the average long axis pixel point. Experiments have found that the fitting effects of the long and short axis average pixel points are better than the fitting effect of a single picture. Figure 6 To determine the final egg shape index, eggs were categorized as round (egg shape index < 1.3), normal (1.3 < egg shape index < 1.35), and flat (egg shape index > 1.3). The egg shape index was calculated as the major axis / minor axis.
[0095] Figure 7 This is the quantitative measurement diagram of eggshell spots in the present invention. The trained classification model is used to distinguish normal eggs, spotted eggs, and Shar-Peel eggs from four images in different areas, and the ratio of the area of the eggshell spots in the image identified as spotted eggs to the area of the entire egg is calculated. Finally, the overall spot rate of the egg is calculated by combining the results of the four images.
[0096] Figure 8 This is the quantitative measurement diagram of eggshell dark spots of the present invention. The area ratio of the eggshell dark spots in each picture to the area ratio of the entire egg can be calculated, and finally the results of the four pictures are combined to calculate the overall dark spot rate of the egg.
[0097] The following describes the non-destructive detection method for eggshell surface properties provided by the present invention. The non-destructive detection method for eggshell surface properties described below and the non-destructive detection device for eggshell surface properties described above can be referenced to each other.
[0098] The present invention also provides a method for non-destructive detection of eggshell surface properties, which comprises:
[0099] After receiving the start command, the PTZ is controlled to rotate evenly four times a week. After each rotation, the ring-shaped reflective light source and the transmissive light source are turned on and off according to the execution requirements of the current reflection type detection and transmission type detection. After turning on the corresponding light source, the image acquisition device is controlled to collect the corresponding transmission image and reflection image.
[0100] Determining a test result of an eggshell transmission type test based on the transmission image, and determining a test result of a reflection type test based on the reflection image;
[0101] When collecting the transmission image, the transmission light source is turned on and the annular reflection light source is turned off; when collecting the reflection image, the annular reflection light source is turned on and the transmission light source is turned off.
[0102] The method embodiments provided in the embodiments of the present invention are implemented based on the above-mentioned device embodiments. For specific processes and detailed contents, please refer to the above-mentioned device embodiments, which will not be repeated here.
[0103] The non-destructive method for eggshell surface properties provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned embodiment of the non-destructive detection device for eggshell surface properties. For the sake of brief description, any matters not mentioned in the embodiment of the non-destructive method for eggshell surface properties may be referred to the corresponding contents in the aforementioned embodiment of the non-destructive detection device for eggshell surface properties.
[0104] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. That is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0105] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods of each embodiment or certain portions of the embodiments.
[0106] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A nondestructive testing device for eggshell surface properties, characterized in that: include: Processing module and detection device body; The detection device body includes a detection dark box, a rotating platform arranged at the bottom of the detection dark box, a transmission platform arranged on the rotating platform, an image acquisition instrument arranged on the inner side of the detection dark box and flush with the detection egg, and an annular reflective light source surrounding the image acquisition instrument; The transmission platform has an opening on the top for placing the test eggs, and a transmission light source inside for emitting a light beam through the opening to the test eggs. Driven by the rotating pan-tilt platform, the platform rotates evenly four times a week. The processing module acquires, through the image acquisition instrument, transmission images at four rotation angles acquired when the transmission light source is turned on, and determines a detection result of the eggshell transmission type detection based on the transmission images, and acquires, through the image acquisition instrument, reflection images at four rotation angles acquired when the annular reflection light source is turned on, and determines a detection result of the reflection type detection based on the reflection images; An exposure processing module is configured to continuously adjust the exposure value using an adaptive exposure algorithm until an exposure value adjustment termination condition is reached, and use the adjusted exposure value to obtain a transmission image or a reflection image by the image acquisition device. The adaptive exposure algorithm includes: Obtain a sample image of the egg to be tested, and extract the central rectangular area of the egg area in the sample image as a region of interest (ROI); Use the Sobel operator to calculate the gradient of the ROI and determine the gradient mean based on the gradient of the ROI; Calculate the brightness of the ROI and calculate the brightness error based on the brightness of the ROI; Adjust the exposure value according to the gradient mean and brightness error; The exposure value adjustment termination condition includes: When the absolute value of the brightness error of the continuous multi-frame image is less than or equal to the first preset threshold, and the continuous multi-frame fluctuation rate of the ROI gradient mean is less than the second preset threshold, the exposure value adjustment is terminated; Alternatively, the exposure value adjustment is terminated when the exposure value has reached the boundary of the hardware supported range, or the exposure value adjustment is terminated when the number of times the exposure value is adjusted exceeds a preset number within a single adjustment cycle; Determining the gradient mean according to the gradient of the ROI includes: ; in, is the gradient mean, I(x,y) is the grayscale value of the image at the coordinate (x,y), and are the gradients in the horizontal or vertical direction, respectively, and N is the total number of ROI pixels; Calculating the brightness error according to the brightness of the ROI includes: ; in, is the brightness error, is the normalized brightness of the i-th pixel in the ROI, is the target brightness; The step of adjusting the exposure value according to the gradient mean and the brightness error includes setting the initial exposure value to 0 and calculating the exposure value increment to be applied according to the following formula: ; in, is the normalized gradient mean of ROI, α is the maximum single-step adjustment amplitude, k is the gradient sensitivity coefficient, and β is the brightness error suppression factor.
2. The eggshell surface property nondestructive testing device according to claim 1, characterized in that: The transmission type detection includes dark spot detection, and the reflection type detection includes one or more of spot detection, sand skin detection, color detection and egg-shaped index detection.
3. The eggshell surface property nondestructive testing device according to claim 1, characterized in that: The apparatus further includes a control module for controlling different rotation angles of the pan / tilt platform, controlling the on / off of the transmitted light source and the annular reflective light source according to different detection types, and controlling the image acquisition device to respectively acquire images at the current angle when the transmitted light source or the annular reflective light source is turned on, so as to obtain the corresponding transmitted image and reflected image; When collecting the transmission image, the transmission light source is turned on and the annular reflection light source is turned off; when collecting the reflection image, the annular reflection light source is turned on and the transmission light source is turned off.
4. The eggshell surface property nondestructive testing device according to claim 2, characterized in that: The processing module includes: The first property detection unit is used to input the four reflection images into the trained first detection model respectively, output the spot detection and sharp skin detection results corresponding to each reflection image, and determine the comprehensive spot sharp skin type based on the detection results of the four images; A second property detection unit is used to input the four transmission images into the trained second detection model respectively, output the dark spot detection result corresponding to each image, and determine the comprehensive dark spot type based on the dark spot detection results of the four images; a third property detection unit, configured to input the four reflection images into a trained third detection model, output the eggshell color corresponding to each sample reflection image, and comprehensively determine the eggshell color based on the color detection results of the four images; Among them, the first detection model is obtained after training based on the characteristics of multiple normal, spotted and sand-peeled eggs as labels and the corresponding reflection images as input data; the second detection model is obtained after training based on the characteristics of multiple normal and dark-spotted eggs as labels and the transmission images as input data; the third detection model is obtained after training based on the reflection images of multiple different shell colors as input data.
5. The eggshell surface property nondestructive testing device according to claim 4, characterized in that: The processing module further includes a spot level detection unit, which is configured to: When the spotted Sharp type is spotted, the four reflection images are respectively input into the trained fourth detection model, and the spot area of each reflection image is output; The comprehensive score of the spots is determined based on the ratio of the spot area of the four reflection images to the egg area.
6. The eggshell surface property nondestructive testing device according to claim 2, characterized in that: The processing module further includes an egg-shaped index detection unit, which is used to: Obtain an average value of the number of long-axis pixels of the detected eggs based on the front image and the back image in the four reflected images, and obtain an average value of the number of short-axis pixels of the detected eggs based on the large-head image and the small-head image in the reflected images; According to the average number of pixels on the major and minor axes, the linear fitting models of the major and minor axes of the egg were input respectively to obtain the corresponding major and minor axis sizes, and the egg shape index was determined based on the major and minor axis sizes.
7. The eggshell surface property nondestructive testing device according to claim 1, characterized in that: Also includes: An interactive module, configured to receive a selection result of an eggshell transmission type detection and / or a reflection type detection input by a user; A display screen is used to display the result of the property test.
8. A method for nondestructive testing of eggshell surface properties based on the device for nondestructive testing of eggshell surface properties according to claims 1-7, characterized in that: include: After receiving the start command, the PTZ is controlled to rotate evenly four times a week. After each rotation, the annular reflective light source and the transmissive light source are turned on and off according to the current reflection type detection and transmission type detection execution requirements. After turning on the corresponding light source, the image acquisition instrument is controlled to collect the corresponding transmission image and reflection image. Determining a test result of an eggshell transmission type test based on the transmission image, and determining a test result of a reflection type test based on the reflection image; When collecting the transmission image, the transmission light source is turned on and the annular reflection light source is turned off; when collecting the reflection image, the annular reflection light source is turned on and the transmission light source is turned off.
Citation Information
Patent Citations
Adaptive exposure adjustment method based on anchor point area estimation
CN115604586A
Device and method for measuring multiple qualities of hatching eggs
CN119245745A