Metering detection method and device for agricultural product production
1. A method for measuring production of agricultural products, comprising the steps of:
step S1: adjusting the shutter of the camera (3) to 1/520s, and collecting 66 clear background images by using a frame rate of 22FPS connection under the illumination environment of a CCFL light source;
step S2: carrying out gray level processing on the acquired background image;
step S3: evaluating the quality of gray level image processing by adopting an adaptive value function, wherein the larger the adaptive value is, the better the image enhancement effect is;
step S4: selecting a proper filtering window, calculating the median value of pixels in the window, and detecting edges;
step S5: fusing images by adopting a wavelet transform method;
step S6: and detecting cracks according to the characteristic detection of the angular points.
2. The method for measuring production of agricultural products according to claim 1, wherein the step S2 is specifically as follows:
step S21: firstly, modeling a gray level histogram of an input image by using a Gaussian mixture model;
step S22: then, a foot pad with Gaussian components in a Gaussian mixture model is adopted to segment the gray level histogram;
step S23: and converting the gray value of each interval into a proper output interval according to the parameters obtained by the input image histogram extraction through particle swarm optimization, thereby generating an enhanced gray image.
3. The agricultural product production metering detection method according to claim 2, wherein the step S5 is specifically as follows:
step S51: by utilizing the directionality of wavelet decomposition, the visual characteristic of continuous resolution ratio on high-frequency components in different directions is achieved, and a fused image with better visual effect is obtained;
step S52: using a high-frequency filter to filter all data of a low-frequency part, and keeping information of a high-frequency part unchanged; and finally, obtaining an image of a high-frequency component part through wavelet transformation.
4. The agricultural product production metering detection method according to claim 3, wherein the S4 is specifically:
step S41: firstly, selecting a proper filtering window, and calculating the median value of pixels in the window;
step S42: then, the median search operation is performed after the central pixel is weighted.
5. The agricultural product production metering detection method of claim 4, wherein in step S6, the detection of the characteristic of the corner points, Harris corner detection Harris corner operator, generates gray scale changes in all directions through image window translation.
6. The metering detection method and device for agricultural product production according to claim 5, wherein the metering detection device for agricultural product production comprises:
the image acquisition module is used for adjusting the shutter of the camera (3) to 1/520s, and acquiring 66 clear background images by using a frame rate of 22FPS connection under the illumination environment of a CCFL light source;
the gray level image processing module is used for modeling a gray level histogram of an input image by using a Gaussian mixture model, segmenting the gray level histogram by using a foot pad of a Gaussian component in the Gaussian mixture model, and finally converting the gray level value of each interval into a proper output interval according to the parameters obtained by the input image histogram extraction through particle swarm optimization so as to generate an enhanced gray level image;
the image quality evaluation module is used for evaluating the quality of gray level image processing by adopting an adaptive value function, and the larger the adaptive value is, the better the image enhancement effect is;
the edge detection module selects a proper filtering window, calculates the median value of pixels in the window and detects edges;
the image fusion module is used for fusing images by adopting a wavelet transform method, obtaining a fused image with better visual effect by utilizing the directivity of wavelet decomposition and having the visual characteristic of incessant resolution ratio on high-frequency components in different directions, filtering all data of a low-frequency part by using a high-frequency filter, keeping the information of the high-frequency part unchanged, and finally obtaining the image of the high-frequency component part by adopting the wavelet transform;
and the crack detection module is used for detecting cracks according to the characteristic of the angular points.
7. The measuring and detecting device for agricultural product production comprises a workbench (1) and is characterized in that a supporting frame (2) is fixedly connected onto the workbench (1), a camera (3) is arranged at the bottom of the supporting frame (2), an object platform (6) is further connected to the position, corresponding to the camera (3), of the top of the workbench (1) in a sliding mode, the bottom of the object platform (6) is fixedly connected with the top of a smoothing component (9) through a sliding connecting seat (11), a light supplementing lamp (7) is further connected to the position, corresponding to the periphery of the object platform (6), of the top of the object platform (6) in a sliding mode, a lifting component (10) is clamped to the top of the light supplementing lamp (7), the bottom of the lifting component (10) is further clamped to the top of the workbench (1), and a limiting component (8) is further clamped to the top of the light supplementing lamp (7), the bottom fixed connection of spacing subassembly (8) is at the top of workstation (1), the front side of workstation (1) is provided with computer (5), the side position of computer (5) still is provided with image acquisition card (4).
8. The agricultural product production metering detection device of claim 7, wherein the limiting component (8) comprises a first sliding connection sleeve (801), the first sliding connection sleeve (801) is clamped at the top of the light supplement lamp (7), a first sliding connection shaft (802) is sleeved in the first sliding connection sleeve (801), and the bottom end of the first sliding connection shaft (802) is fixedly connected to the top of the workbench (1).
9. The agricultural product production metering and detecting device of claim 8, wherein the sliding connecting seat (11) is arranged in a sliding connecting groove (12) formed in the top of the workbench (1), the smoothing component (9) comprises a second sliding connecting shaft (901), one end of the second sliding connecting shaft (901) is fixedly connected with the inner side end face of the workbench (1) through a supporting spring (904), the other end of the second sliding connecting shaft (901) is fixedly connected with a driven raised head (903), a second sliding connecting sleeve (902) is further sleeved on the surface of the second sliding connecting shaft (901), and the second sliding connecting sleeve (902) is clamped on the side end face of the workbench (1).
10. The agricultural product production metering and detecting device according to claim 9, wherein the lifting assembly (10) comprises a threaded barrel (101), a positioning screw (104) is connected to the threaded barrel (101) in a threaded manner, a first transfer shaft (102) is fixedly connected to the bottom end of the positioning screw (104), a first bearing (103) is sleeved on the surface of the first transfer shaft (102), the first bearing (103) is clamped on the top of the workbench (1), a knocking assembly (13) is arranged on the front side of the passive raised head (903), the knocking assembly (13) comprises an active raised head (131), one surface of the active raised head (131) departing from the passive raised head (903) is fixedly connected with one end of a lever (132), the other end of the lever (132) is provided with an anti-slip thread (133), and a convex connecting seat (134) is fixedly connected to the side end surface of the lever (132), the convex connecting seat (134) is located the inboard of fixing base (136), fixedly connected with lives second switching axle (135) on the inside wall of fixing base (136), second bearing (138) have been cup jointed on the surface of second switching axle (135), second bearing (138) joint is in switching groove (137) that set up on convex connecting seat (134) terminal surface, torsion spring (139) have been cup jointed on the surface of second switching axle (135), torsion spring's (139) one end fixed connection is on the surface of second switching axle (135), the other end fixed connection of second switching axle (135) is on the terminal surface of switching groove (137) inboard.
Background
The technical problem solved by the patent is that seeds are essential production data for agricultural production, the quality of the seeds is directly related to the development of agricultural production and economy, the quality of the seeds also determines the germination rate and other problems, in order to ensure the standard reaching of the seed quality and the continuous improvement of the seed quality, the germination rate is ensured in the planting process of farmers, the seeds need to be sampled and detected, and the existing detection mode is observed by naked eyes; in the process of observing by naked eyes, because the seed volume is small, whether the weight of the seed is too light cannot be judged by naked eyes alone, or whether the volume is too small, and the quality of some seeds with hollow or not completely dried inside can not be judged by naked eyes alone, the patent realizes that a batch of seeds with abnormal bad seeds are conveniently detected one by one while batch detection is carried out to judge the quality of the seeds, thereby conveniently calculating the yield of the seeds and finding the abnormal bad seeds, the patent still has some defects, whether the surface of the seed is damaged or not can not be directly judged, and the influence of the fill-in light can not be considered when the image is acquired, the shadow in the acquired source image is difficult to eliminate, moreover, the robustness is poor, which results in high requirements on the placement position of the seeds, and therefore, a method and a device for measuring and detecting the production of agricultural products are urgently needed to solve the above problems.
Disclosure of Invention
The invention aims to: the metering detection method and device for agricultural product production are provided for solving the problems that whether the surface of a seed is damaged or not can not be directly judged, the influence of light supplement light can not be considered when an image is obtained, shadow in the obtained source image is difficult to eliminate, robustness is poor, and the requirement on the placement position of the seed is high.
In order to achieve the purpose, the invention adopts the following technical scheme:
a metering detection method for agricultural product production, comprising the following steps:
step S1: adjusting the shutter of the camera to 1/520s, and collecting 66 clear background images by using a frame rate of 22FPS connection under the illumination environment of a CCFL light source;
step S2: carrying out gray level processing on the acquired background image;
step S3: evaluating the quality of gray level image processing by adopting an adaptive value function, wherein the larger the adaptive value is, the better the image enhancement effect is;
step S4: selecting a proper filtering window, calculating the median value of pixels in the window, and detecting edges;
step S5: fusing images by adopting a wavelet transform method;
step S6: and detecting cracks according to the characteristic detection of the angular points.
As a further description of the above technical solution:
the step S2 specifically includes:
step S21: firstly, modeling a gray level histogram of an input image by using a Gaussian mixture model;
step S22: then, a foot pad with Gaussian components in a Gaussian mixture model is adopted to segment the gray level histogram;
step S23: and converting the gray value of each interval into a proper output interval according to the parameters obtained by the input image histogram extraction through particle swarm optimization, thereby generating an enhanced gray image.
As a further description of the above technical solution:
the step S5 specifically includes:
step S51: by utilizing the directionality of wavelet decomposition, the visual characteristic of continuous resolution ratio on high-frequency components in different directions is achieved, and a fused image with better visual effect is obtained;
step S52: using a high-frequency filter to filter all data of a low-frequency part, and keeping information of a high-frequency part unchanged; and finally, obtaining an image of a high-frequency component part through wavelet transformation.
As a further description of the above technical solution:
the S4 specifically includes:
step S41: firstly, selecting a proper filtering window, and calculating the median value of pixels in the window;
step S42: then, the median search operation is performed after the central pixel is weighted.
As a further description of the above technical solution:
in step S6, detecting the characteristic of the corner, and Harris corner detection Harris corner operator generate gray scale changes in each direction by image window translation.
As a further description of the above technical solution:
the agricultural product production metering and detecting device comprises:
the image acquisition module is used for adjusting the shutter of the camera to 1/520s, and acquiring 66 clear background images by using a frame rate of 22FPS in a connected manner under the illumination environment of a CCFL light source;
the gray level image processing module is used for modeling a gray level histogram of an input image by using a Gaussian mixture model, segmenting the gray level histogram by using a foot pad of a Gaussian component in the Gaussian mixture model, and finally converting the gray level value of each interval into a proper output interval according to the parameters obtained by the input image histogram extraction through particle swarm optimization so as to generate an enhanced gray level image;
the image quality evaluation module is used for evaluating the quality of gray level image processing by adopting an adaptive value function, and the larger the adaptive value is, the better the image enhancement effect is;
the edge detection module selects a proper filtering window, calculates the median value of pixels in the window and detects edges;
the image fusion module is used for fusing images by adopting a wavelet transform method, obtaining a fused image with better visual effect by utilizing the directivity of wavelet decomposition and having the visual characteristic of incessant resolution ratio on high-frequency components in different directions, filtering all data of a low-frequency part by using a high-frequency filter, keeping the information of the high-frequency part unchanged, and finally obtaining the image of the high-frequency component part by adopting the wavelet transform;
and the crack detection module is used for detecting cracks according to the characteristic of the angular points.
As a further description of the above technical solution:
the utility model provides a metering detection device for agricultural product production still includes the workstation, fixedly connected with support frame on the workstation, the bottom of support frame is provided with the camera to the position department that the workstation top corresponds the camera still sliding connection has cargo platform, cargo platform's bottom is through the top fixed connection who slides connecting seat and smooth subassembly, cargo platform top corresponds the outlying position department of cargo platform and still sliding connection has the light filling lamp, the top joint of light filling lamp has lifting unit, lifting unit's bottom is still the joint at the top of workstation, the top of light filling lamp is still the joint has spacing subassembly, the bottom fixed connection of spacing subassembly is at the top of workstation, the front side of workstation is provided with the computer, the side position of computer still is provided with image acquisition card.
As a further description of the above technical solution:
the limiting assembly comprises a first sliding connecting sleeve, the first sliding connecting sleeve is connected to the top of the light supplementing lamp in a clamped mode, a first sliding connecting shaft is sleeved in the first sliding connecting sleeve, and the bottom end of the first sliding connecting shaft is fixedly connected to the top of the workbench.
As a further description of the above technical solution:
the sliding connecting seat is arranged in a sliding connecting groove formed in the top of the workbench, the smoothing component comprises a second sliding connecting shaft, one end of the second sliding connecting shaft is fixedly connected with the inner side end face of the workbench through a supporting spring, the other end of the second sliding connecting shaft is fixedly connected with a driven raised head, a second sliding connecting sleeve is further sleeved on the surface of the second sliding connecting shaft, and the second sliding connecting sleeve is clamped on the side end face of the workbench.
As a further description of the above technical solution:
the lifting assembly comprises a threaded barrel, a positioning screw rod is connected with the threaded barrel in a threaded manner, a first adapter shaft is fixedly connected to the bottom end of the positioning screw rod, a first bearing is sleeved on the surface of the first adapter shaft and clamped at the top of the workbench, a knocking assembly is arranged on the front side of a driven raised head and comprises an active raised head, one surface of the active raised head, which is far away from the driven raised head, is fixedly connected with one end of a lever, anti-slip threads are arranged at the other end of the lever, a convex connecting seat is fixedly connected to the side end face of the lever and positioned on the inner side of a fixed seat, a second adapter shaft is fixedly connected to the inner side wall of the fixed seat, a second bearing is sleeved on the surface of the second adapter shaft and clamped in an adapter groove formed in the end face of the convex connecting seat, and a torsion spring is sleeved on the surface of the second adapter shaft, one end of the torsion spring is fixedly connected to the surface of the second transfer shaft, and the other end of the second transfer shaft is fixedly connected to the end face of the inner side of the transfer groove.
In summary, due to the adoption of the technical scheme, the invention has the beneficial effects that:
1. in the invention, the shutter of the camera is firstly adjusted to 1/520s, 66 clear background images are connected and collected by using 22FPS under the illumination environment of a CCFL light source, the CCFL light source has the advantages of low price, low heat productivity, high luminous efficiency, good color reducibility and the like, the influence degree caused by shadow in the image can be reduced, the robustness of the background images is good, the requirement on the placement position of seeds is low, then, a Gaussian mixture model is used for modeling the gray histogram of the input image, the gray histogram is divided by adopting a foot pad of Gaussian components in the Gaussian mixture model, the gray value of each interval is converted into a proper output interval according to the parameters obtained by the input image histogram through particle swarm optimization, so that the enhanced gray image is generated, and the parameters optimized by the particle swarm can ensure that each area of the input image is properly processed, the quality of gray level image processing is evaluated by adopting an adaptive value function, the larger the adaptive value is, the better the image enhancement effect is, an image with better enhancement effect is screened out, a proper filtering window is selected, the median of pixels in the window is calculated, the edge detection is carried out, the edge detection accuracy is effectively improved, the calculated amount is greatly reduced, the better effect is obtained, the directionality of wavelet decomposition is utilized, the visual characteristic of incessantly resolving capability is provided for high-frequency components in different directions, a fused image with better visual effect is obtained, a high-frequency filter is used for filtering all data of a low-frequency part, the information of the high-frequency part is kept unchanged, finally, the image of the high-frequency component part is obtained through wavelet transformation, and finally, high-precision crack detection is carried out, in the production of agricultural products, by obtaining the proportion of seeds containing cracks in the sample, redundant points existing in the damage characteristic detection of the conventional multi-scale corner algorithm are removed, the positioning accuracy of the seed damage characteristic under the multi-scale is effectively improved, the time complexity of iterative computation is reduced, and the germination rate of the sample seeds can be determined through effective measurement detection.
2. According to the invention, through the designed camera, the light supplement lamp, the limiting component, the smoothing component and the lifting component, according to the surface reflection degree of the seeds and the size of the seeds, the positioning screw rod is stirred to rotate in the first bearing through the first rotating shaft, under the combined action effect of the torsion force and the thread biting force, the screw thread cylinder is utilized to drive the light supplement lamp to perform corresponding lifting action in the first sliding connecting sleeve through the first sliding connecting shaft, then the sample to be detected is placed on the object carrying platform, the elastic effect of the supporting spring is assisted, then the second sliding connecting shaft is pulled through the passive raised head to perform corresponding telescopic action in the second sliding connecting sleeve, so that the seeds can be flatly restored on the object carrying platform, and the effective area of the seed images obtained by the camera is effectively ensured.
2. In the invention, the lever is stirred through the designed knocking component and the smooth component to rotate on the surface of the second transfer shaft through the second bearing in the transfer groove, in the rotating process, the second adapting shaft applies force to the torsion spring and enables the torsion spring to deform, the acting force acting on the lever is quickly removed, the force conversion can be realized through the knocking action of the driving raised head corresponding to the driven raised head by utilizing the reset elasticity of the torsion spring, and the elasticity effect of the supporting spring is assisted, then, the driven raised head pulls the second sliding connecting shaft to perform corresponding telescopic action in the second sliding connecting sleeve, further, the seeds can be flatly restored on the loading platform, the effective area of the seed image obtained by the camera is effectively ensured, before the detection, the seeds can be tiled through vibration without manual tiling, so that the detection efficiency and the detection precision are improved.
Drawings
FIG. 1 is a flow chart of a method and apparatus for measuring agricultural product production according to the present invention;
FIG. 2 is a schematic perspective view of a method and an apparatus for measuring agricultural product production according to the present invention;
FIG. 3 is an exploded view of a smoothing component of the method and apparatus for metering and inspecting agricultural product production according to the present invention;
FIG. 4 is an exploded view of a position-limiting component of the method and apparatus for measuring and detecting agricultural product production according to the present invention;
FIG. 5 is an exploded view of a lifting assembly of the method and apparatus for measuring and detecting agricultural product production in accordance with the present invention;
FIG. 6 is a flow chart of the determination of the maximum adaptive value of the function of the lifting element in the method and apparatus for measuring and detecting agricultural product production according to the present invention;
FIG. 7 is an enlarged schematic structural view of the A position in the method and apparatus for measuring and detecting agricultural product production according to the present invention;
fig. 8 is an exploded view of a knocking component in the agricultural product production metering and detecting method and device provided by the invention.
Illustration of the drawings:
1. a work table; 2. a support frame; 3. a camera; 4. an image acquisition card; 5. a computer; 6. a carrier platform; 7. a light supplement lamp; 8. a limiting component; 801. a first sliding connecting sleeve; 802. a first sliding connecting shaft; 9. a smoothing component; 901. a second sliding connecting shaft; 902. a second sliding connecting sleeve; 903. a passive raised head; 904. a support spring; 10. a lifting assembly; 101. a threaded barrel; 102. a first transfer shaft; 103. a first bearing; 104. positioning a screw rod; 11. a sliding connection seat; 12. sliding connecting grooves; 13. a knocking component; 131. a driving raised head; 132. a lever; 133. anti-skid lines; 134. a male connection seat; 135. a second transfer shaft; 136. a fixed seat; 137. a transfer groove; 138. a second bearing; 139. a torsion spring.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1-5, the present invention provides a technical solution: a metering detection method for agricultural product production comprises the following steps:
step S1: adjusting the shutter of the camera 3 to 1/520s, and collecting 66 clear background images by using a frame rate of 22FPS connection under the illumination environment of a CCFL light source;
step S2: carrying out gray level processing on the acquired background image;
step S3: evaluating the quality of gray level image processing by adopting an adaptive value function, wherein the larger the adaptive value is, the better the image enhancement effect is;
step S4: selecting a proper filtering window, calculating the median value of pixels in the window, and detecting edges;
step S5: fusing images by adopting a wavelet transform method;
step S6: and detecting cracks according to the characteristic detection of the angular points.
Specifically, as shown in fig. 1, step S2 specifically includes:
step S21: firstly, modeling a gray level histogram of an input image by using a Gaussian mixture model;
step S22: then, a foot pad with Gaussian components in a Gaussian mixture model is adopted to segment the gray level histogram;
step S23: and converting the gray value of each interval into a proper output interval according to the parameters obtained by the input image histogram extraction through particle swarm optimization, thereby generating an enhanced gray image.
The embodiment specifically includes: detecting angular point characteristics, and generating gray level change E (u, v) in each direction by Harris angular point operator through image window translation:
E(u,v)=[u,v]Mu;
in the formula, u and v are local tiny variable quantities, and M is a Harris angular point detection second-order matrix;
harris angular point detection is carried out by calculating a response value R of an image, setting a R threshold value, carrying out non-maximum suppression in the field and calculating a local maximum point so as to determine an angular point on a position space;
the image scale space expression is L (x, y) ═ G (x, y) I (x, y);
in the formula: g (x, y) — 122e- (x2+ y2)22, where I (x, y) is the input image.
Specifically, as shown in fig. 1, step S5 specifically includes:
step S51: by utilizing the directionality of wavelet decomposition, the visual characteristic of continuous resolution ratio on high-frequency components in different directions is achieved, and a fused image with better visual effect is obtained;
step S52: using a high-frequency filter to filter all data of a low-frequency part, and keeping information of a high-frequency part unchanged; and finally, obtaining an image of a high-frequency component part through wavelet transformation.
Specifically, as shown in fig. 1, S4 specifically includes:
step S41: firstly, selecting a proper filtering window, and calculating the median value of pixels in the window;
step S42: then, the median search operation is performed after the central pixel is weighted.
Specifically, as shown in fig. 1, in step S6, a corner feature detection and Harris corner detection Harris corner operator generates a gray scale change in each direction by image window translation.
Specifically, as shown in fig. 1, the agricultural product production measurement detection apparatus includes:
the image acquisition module is used for adjusting the shutter of the camera 3 to 1/520s, and acquiring 66 clear background images by using a frame rate of 22FPS connection under the illumination environment of a CCFL light source;
the gray level image processing module is used for modeling a gray level histogram of an input image by using a Gaussian mixture model, segmenting the gray level histogram by using a foot pad of a Gaussian component in the Gaussian mixture model, and finally converting the gray level value of each interval into a proper output interval according to the parameters obtained by the input image histogram extraction through particle swarm optimization so as to generate an enhanced gray level image;
the embodiment specifically includes: each particle has an adaptive value determined by the function to be optimized and an appropriate speed quantity expressing the moving direction and distance of the particle;
thus, let particle i have a position vector:
Xi={Xi1,Xi2…Xin};
velocity vector:
Vi={Vi1,Vi2…Vin};
according to the current position of the particle and the found optimal position Z, the global optimal position Y found by the particle swarm is found, and the optimal solution of the particle is found through an iterative algorithm:
Vi(t+1)=αVi(t)+c1β1[Z-Xi(t)]+c2β2[Y-Xi(t)];
Xi(t+1)=Xi(t)+Vi(t+1);
where i is the number of iteration steps, α ∈ [0, 1 ]]Is an inertia factor representing the influence of the flight velocity of the previous step on the velocity of the current step, c1、c2Is an acceleration factor used to adjust the speed of the particle toward the local optimum position and the global optimum flight, and takes an appropriate value to make the particle accelerate convergence and not easy to enter the local optimum first, usually go c1=c2=2,β1And beta2Is a random number between 0 and 1.
The image quality evaluation module is used for evaluating the quality of gray level image processing by adopting an adaptive value function, and the larger the adaptive value is, the better the image enhancement effect is;
the embodiment specifically includes: the fitness function, fitness, is:
fitness=EIθ[Fρ+3C]+Fδ;
wherein the variance F of the parameter image affecting the adaptation valueρInformation defect E, pixel difference FδSignal to noise variation IθAnd compactness C.
The edge detection module selects a proper filtering window, calculates the median value of pixels in the window and detects edges;
the embodiment specifically includes: firstly, selecting a proper filtering window, calculating the median of pixels in the window, weighting the central pixel, and then carrying out median searching operation:
m∈=median{x1,x2…wx1…xn};
x1is the gray level of the pixel in the filtering window, n is the number of pixels in the window, and w is the weight of the center pixel.
The image fusion module is used for fusing images by adopting a wavelet transform method, obtaining a fused image with better visual effect by utilizing the directivity of wavelet decomposition and having the visual characteristic of incessant resolution ratio on high-frequency components in different directions, filtering all data of a low-frequency part by using a high-frequency filter, keeping the information of the high-frequency part unchanged, and finally obtaining the image of the high-frequency component part by adopting the wavelet transform;
and the crack detection module is used for detecting cracks according to the characteristic of the angular points.
The embodiment specifically includes: under the illumination environment of a CCFL light source, a frame rate of 22FPS is used for connecting and collecting 66 clear background images, the CCFL light source has the advantages of low price, low heat productivity, high luminous efficiency, good color reducibility and the like, the influence degree caused by shadow in the images can be reduced, the robustness of the background images is good, the requirement on the placement position of seeds is low, then a Gaussian mixture model is used for modeling a gray histogram of an input image, the gray histogram is divided by adopting a foot pad of Gaussian components in the Gaussian mixture model, the gray value of each interval is converted into a proper output interval according to the parameters obtained by taking the input image histogram through particle swarm optimization, so that an enhanced gray image is generated, the parameters optimized by the particle swarm can ensure that each area of the input image is properly processed, and the quality of gray image processing is evaluated by adopting an adaptive value function fitness, the larger the adaptive value is, the better the image enhancement effect is, the image with better enhancement effect is screened out, a proper filtering window is selected, the median value of pixels in the window is calculated, the edge detection is carried out, the edge detection accuracy is effectively improved, the calculated amount is greatly reduced, the better effect is obtained, the visual characteristic of continuous resolution ratio of high-frequency components in different directions is realized by utilizing the directionality of wavelet decomposition, a fused image with better visual effect is obtained, a high-frequency filter is used for filtering all data of a low-frequency part, the information of the high-frequency part is kept unchanged, finally, the image of the high-frequency component part is obtained through wavelet transformation, and finally, the high-precision crack detection is carried out, and in the production of agricultural products, the occupation ratio of seeds containing cracks in the sample is obtained.
Specifically, as shown in fig. 2, the measuring and detecting device for agricultural product production further comprises a workbench 1, a support frame 2 is fixedly connected to the workbench 1, a camera 3 is arranged at the bottom of the support frame 2, and the position department that the top of workstation 1 corresponds camera 3 still sliding connection has objective platform 6, the bottom of objective platform 6 is through the top fixed connection who slides connecting seat 11 and smooth subassembly 9, objective platform 6 top corresponds the position department of objective platform 6 outlying still sliding connection has light filling lamp 7, the top joint of light filling lamp 7 has elevating module 10, the bottom of elevating module 10 still the joint is at the top of workstation 1, the top of light filling lamp 7 still the joint has spacing subassembly 8, the bottom fixed connection of spacing subassembly 8 is at the top of workstation 1, the front side of workstation 1 is provided with computer 5, the side position of computer 5 still is provided with image acquisition card 4.
Specifically, as shown in fig. 4, the limiting component 8 includes a first sliding connection sleeve 801, the first sliding connection sleeve 801 is clamped at the top of the light supplement lamp 7, a first sliding connection shaft 802 is sleeved in the first sliding connection sleeve 801, and the bottom end of the first sliding connection shaft 802 is fixedly connected to the top of the workbench 1.
Specifically, as shown in fig. 2, the sliding connection seat 11 is provided in a sliding connection groove 12 provided at the top of the workbench 1, the smoothing component 9 includes a second sliding connection shaft 901, one end of the second sliding connection shaft 901 is fixedly connected to an end surface of the inner side of the workbench 1 through a support spring 904, the other end of the second sliding connection shaft 901 is fixedly connected to a passive raised head 903, a second sliding connection sleeve 902 is further sleeved on the surface of the second sliding connection shaft 901, and the second sliding connection sleeve 902 is clamped on a side end surface of the workbench 1.
Specifically, as shown in fig. 5, the lifting assembly 10 includes a threaded cylinder 101, a positioning screw 104 is connected to the threaded cylinder 101 through an internal thread, a first transfer shaft 102 is fixedly connected to a bottom end of the positioning screw 104, a first bearing 103 is sleeved on a surface of the first transfer shaft 102, and the first bearing 103 is clamped to the top of the workbench 1.
The embodiment specifically includes: according to the surface reflection degree of the seeds and the size of the seeds, the positioning screw 104 is shifted to rotate in the first bearing 103 through the first adapting shaft 102, under the combined action effect of the torsion and the thread engagement force, the threaded cylinder 101 can be utilized to drive the light filling lamp 7 to perform corresponding lifting action in the first sliding connecting sleeve 801 through the first sliding connecting shaft 802, then a sample to be detected is placed on the loading platform 6, the elastic effect of the supporting spring 904 is assisted, then the second sliding connecting shaft 901 is pulled through the passive raised head 903 to perform corresponding telescopic action in the second sliding connecting sleeve 902, further the seeds can be flatly restored on the loading platform 6, and the effective area of the seed images obtained by the camera 3 is effectively ensured.
Specifically, as shown in fig. 7, the lifting assembly 10 includes a threaded barrel 101, a positioning screw 104 is connected to the threaded barrel 101 through an internal thread, a first transfer shaft 102 is fixedly connected to a bottom end of the positioning screw 104, a first bearing 103 is sleeved on a surface of the first transfer shaft 102, the first bearing 103 is clamped to the top of the workbench 1, a knocking assembly 13 is disposed on a front side of the driven nose 903, the knocking assembly 13 includes a driving nose 131, a surface of the driving nose 131 departing from the driven nose 903 is fixedly connected to one end of the lever 132, an anti-slip thread 133 is disposed at the other end of the lever 132, a convex connecting seat 134 is fixedly connected to a side end surface of the lever 132, the convex connecting seat 134 is located on an inner side of a fixing seat 136, a second transfer shaft 135 is fixedly connected to an inner side wall of the fixing seat 136, a second bearing 138 is sleeved on a surface of the second transfer shaft 135, the second bearing 138 is clamped in a transfer groove 137 formed in an end surface of the convex connecting seat 134, a torsion spring 139 is sleeved on the surface of the second transfer shaft 135, one end of the torsion spring 139 is fixedly connected to the surface of the second transfer shaft 135, and the other end of the second transfer shaft 135 is fixedly connected to the end surface of the inner side of the transfer groove 137.
The working principle is as follows: when the device is used, according to the surface reflection degree of the seeds and the size of the seeds, the positioning screw 104 is shifted to rotate in the first bearing 103 through the first adapting shaft 102, under the combined effect of the torsion force and the thread engagement force, the thread cylinder 101 is utilized to drive the light filling lamp 7 to correspondingly lift in the first sliding connecting sleeve 801 through the first sliding connecting shaft 802, then a sample to be detected is placed on the object carrying platform 6, the elastic effect of the supporting spring 904 is assisted, then the second sliding connecting shaft 901 is pulled through the passive raised head 903 to correspondingly stretch in the second sliding connecting sleeve 902, further the seeds can be flatly restored on the object carrying platform 6, the effective area of the seed images obtained by the camera 3 is effectively ensured, under the illumination environment of the CCFL light source, the clear background images of 66 frames are collected by using the frame speed of 22FPS in a connecting manner, and the CCFL light source has low price, The method has the advantages of low heat productivity, high luminous efficiency, good color reducibility and the like, can reduce the influence degree caused by shadow in the image, enables the robustness of the background image to be good and the requirement on the placement position of the seeds to be low, then, models the gray histogram of the input image by using a Gaussian mixture model, divides the gray histogram by using a foot pad of a Gaussian component in the Gaussian mixture model, converts the gray value of each interval into a proper output interval according to the parameters obtained by the input image histogram extraction part through particle swarm optimization, thereby generating the enhanced gray image, ensures that each area of the input image is properly processed by the parameters optimized by the particle swarm, evaluates the quality of gray image processing by using an adaptive value function fitness, indicates that the image enhancement effect is better if the adaptive value is larger, screens out the image with better enhancement effect, selects a proper filtering window, calculating the median of pixels in a window, detecting edges, effectively improving the accuracy of edge detection, greatly reducing the calculated amount, obtaining better effect, utilizing the directionality of wavelet decomposition to have the visual characteristic of incessant resolution ratio on high-frequency components in different directions, obtaining a fused image with better visual effect, completely filtering the data of a low-frequency part by using a high-frequency filter, keeping the information of the high-frequency part unchanged, finally obtaining the image of the high-frequency component part through wavelet transformation, and finally performing high-precision crack detection, wherein in the production of agricultural products, redundant points existing in the conventional multi-scale angular point algorithm detection damage features are removed by obtaining the proportion of seeds containing cracks in the sample, the positioning accuracy of the seed damage features under multi-scale is effectively improved, the time complexity of iterative calculation is reduced, and through effective measurement and detection, the germination rate of the sample seeds can be determined.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be able to cover the technical scope of the present invention and the equivalent alternatives or modifications according to the technical solution and the inventive concept of the present invention within the technical scope of the present invention.
- 上一篇:石墨接头机器人自动装卡簧、装栓机
- 下一篇:图像质量检测方法、装置、设备及介质