CN109883958B - Nondestructive testing method and device for agricultural and livestock products - Google Patents

Nondestructive testing method and device for agricultural and livestock products Download PDF

Info

Publication number
CN109883958B
CN109883958B CN201910139218.8A CN201910139218A CN109883958B CN 109883958 B CN109883958 B CN 109883958B CN 201910139218 A CN201910139218 A CN 201910139218A CN 109883958 B CN109883958 B CN 109883958B
Authority
CN
China
Prior art keywords
movable plate
agricultural
video frame
gear
frame image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910139218.8A
Other languages
Chinese (zh)
Other versions
CN109883958A (en
Inventor
乔俊福
史建伟
郭晋秦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Taiyuan Institute of Technology
Original Assignee
Taiyuan Institute of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Taiyuan Institute of Technology filed Critical Taiyuan Institute of Technology
Publication of CN109883958A publication Critical patent/CN109883958A/en
Application granted granted Critical
Publication of CN109883958B publication Critical patent/CN109883958B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

A non-destructive testing and device for agricultural and animal products, the method shoots the image of agricultural and animal products transmitted on the transmission belt in real time by a camera, comprising: acquiring a video frame image of currently shot video content in real time; identifying articles from the video frame images and extracting main color information; and screening out qualified farm and livestock products according to the main color information. The method and the device for nondestructive testing of the agricultural and livestock products firstly utilize the vision technology to carry out image recognition on the agricultural and livestock products transmitted on the transmission belt, screen out a part of agricultural and livestock products possibly asked for by the appearance color, and then carry out odor reinspection on the screened agricultural and livestock products by utilizing electronic olfaction, thereby ensuring the freshness and health of the agricultural and livestock products after the detection.

Description

Nondestructive testing method and device for agricultural and livestock products
Technical Field
The invention relates to the technical field of food detection devices, in particular to nondestructive detection and a nondestructive detection device for agricultural and livestock products.
Background
The quality of farm and livestock products is the key point of quality control when people eat the feed as days. In order to realize the health detection of the quality of agricultural and livestock products, currently, a nondestructive detection technology is gradually popularized and used for meeting the requirements of large-scale treatment in food production and processing processes, has the characteristics of no damage to samples to be detected, higher detection speed, no pollution or less pollution, is easy to realize automation, and is usually realized by using a computer olfaction technology, a near infrared spectrum analysis technology or a visual analysis technology.
The computer olfaction technology is generally a technology for identifying odor and detecting complex odor and volatile components by using a gas sensor array, is effective for detecting deteriorated farm and livestock products, but is difficult to detect the condition that the farm and livestock products have impurities or are not clean because the detection result can only be judged from the odor.
The near infrared spectrum analysis technology has the advantages of no damage, high detection efficiency, low cost, good reproducibility, no need of pretreatment in sample measurement, suitability for field detection and on-line analysis, and the like. When the near infrared spectrum technology is used for rapidly detecting agricultural and livestock products, a large number of representative samples are selected, a detection model is established by professional technicians on the basis that a reference value is obtained by a standard detection method, and the agricultural and livestock products can be used qualified only through later model optimization and inspection. If a set of detection equipment is established, the same process is needed to realize the detection, the early investment is high, and the time is relatively consumed.
With the progress of image analysis technology, agricultural and animal product quality detection based on visual technology is gradually applied in the years, quality detection and sorting are mainly performed through appearance characteristics such as size, shape, texture, color and surface defects of agricultural and animal products, however, only through judgment of the appearance characteristics, internal conditions cannot be detected frequently, and the accuracy of the existing image detection algorithm is not high.
Disclosure of Invention
Aiming at the defects of the prior art, the application provides the nondestructive testing and the device for the agricultural and livestock products, which can accurately carry out the nondestructive testing on the agricultural and livestock products by using the vision and olfaction technologies.
According to a first aspect, there is provided in one embodiment a method for nondestructive testing of agricultural or animal products by capturing images of agricultural or animal products conveyed on a conveyor belt in real time by a camera, comprising:
acquiring a video frame image of currently shot video content in real time;
identifying articles from the video frame images and extracting main color information;
and screening out qualified farm and livestock products according to the main color information.
In some embodiments, said extracting dominant color information from said video frame image comprises:
calculating a tone average value of the video frame image;
traversing pixels of the video frame image, and calculating the color difference between the tone value of the pixels and the tone average value;
judging whether the color difference is larger than a preset threshold value or not;
and if the color difference is larger than a preset threshold value, adding the pixel into a dominant hue pixel list, and determining the color information according to the dominant hue value of the pixel in the dominant hue pixel list.
In some embodiments, screening for acceptable farm animal products based on the primary color information comprises: traversing pixels of the video frame image, and calculating whether the difference value between the hue value of the pixels and the main hue value is greater than a preset threshold value; and if the difference values are all smaller than a preset threshold value, marking the video frame image as qualified.
In some embodiments, determining a weight value corresponding to each pixel in the video frame image according to a different color of the pixel; and calculating to obtain the tone average value of the video frame image according to the tone value of the pixel and the corresponding weight value.
In some embodiments, the method further comprises: and after the screened qualified farm and animal products are washed by clean water, odor information emitted by the farm and animal products is obtained by using an odor sensor, and whether the farm and animal products are abnormal or not is judged by comparing the odor information with preset reference information, so that odor rechecking is carried out.
According to a second aspect, an agricultural and animal product nondestructive testing apparatus comprises:
the camera is used for shooting images of agricultural and livestock products transmitted on the transmission belt in real time;
the processor is used for acquiring a video frame image of the currently shot video content in real time; extracting dominant color information from the video frame image; screening out qualified farm and livestock products according to the color information;
and the first sorting device is used for sorting the screened qualified farm and livestock products.
In some embodiments, the processor is configured to:
calculating a tone average value of the video frame image;
traversing pixels of the video frame image, and calculating the color difference between the tone value of the pixels and the tone average value;
judging whether the color difference is larger than a preset threshold value or not;
and if the color difference is larger than a preset threshold value, adding the pixel into a dominant hue pixel list, and determining the color information according to the dominant hue value of the pixel in the dominant hue pixel list.
In some embodiments, the detection device further comprises: the odor sensor is used for acquiring odor information emitted by the agricultural and livestock products, and the processor is used for comparing the odor information with preset reference information to judge whether the agricultural and livestock products are abnormal or not; and the second sorting device is used for sorting the agricultural and livestock products which are judged to be normal through the smell rechecking.
According to a third aspect, a computer readable storage medium comprises a program executable by a processor to implement the method according to the first aspect.
According to the method of the embodiment, after the article is identified, the main color information of the video frame image is extracted, whether abnormal pixel points exist is judged according to the difference value between the main color information and the color tone value of the video frame image, and then qualified farm and livestock products and farm and livestock products which are possibly unqualified are distinguished, so that the judgment result of the detection method is accurate.
Drawings
FIG. 1 is a first flow chart of a nondestructive testing method for agricultural and livestock products according to an embodiment of the present invention;
FIG. 2 is a flow chart of a nondestructive testing method for agricultural and livestock products according to an embodiment of the present invention;
FIG. 3 is a flow chart of a nondestructive testing method for agricultural and livestock products according to an embodiment of the present invention;
FIG. 4 is a structural diagram of a nondestructive testing apparatus for agricultural and animal products according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an image acquisition module according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a first mechanical anti-shake device according to an embodiment of the present invention;
fig. 7 is a schematic view of a bottom structure of a first movable plate according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a second mechanical anti-shake device provided in an embodiment of the present invention;
fig. 9 is a schematic bottom view of a second movable plate according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the following detailed description and accompanying drawings. Wherein like elements in different embodiments are numbered with like associated elements. In the following description, numerous details are set forth in order to provide a better understanding of the present application. However, those skilled in the art will readily recognize that some of the features may be omitted or replaced with other elements, materials, methods in different instances. In some instances, certain operations related to the present application have not been shown or described in detail in order to avoid obscuring the core of the present application from excessive description, and it is not necessary for those skilled in the art to describe these operations in detail, so that they may be fully understood from the description in the specification and the general knowledge in the art.
Furthermore, the features, operations, or characteristics described in the specification may be combined in any suitable manner to form various embodiments. Also, the various steps or actions in the method descriptions may be transposed or transposed in order, as will be apparent to one of ordinary skill in the art. Thus, the various sequences in the specification and drawings are for the purpose of describing certain embodiments only and are not intended to imply a required sequence unless otherwise indicated where such sequence must be followed.
The numbering of the components as such, e.g., "first", "second", etc., is used herein only to distinguish the objects as described, and does not have any sequential or technical meaning. The term "connected" and "coupled" when used in this application, unless otherwise indicated, includes both direct and indirect connections (couplings).
Referring to fig. 1 to 3, the present application provides a method for nondestructive testing of agricultural and animal products, which uses a camera to capture images of agricultural and animal products transmitted on a transmission belt in real time, the method comprising:
step S101, acquiring a video frame image of currently shot video content in real time;
step S102, identifying articles from the video frame image and extracting main color information;
and S103, screening qualified farm and livestock products according to the color information.
In some embodiments, the method comprises the sub-steps of:
step S1021, said extracting dominant color information from said video frame image comprises: and calculating the tone average value of the video frame image. Specifically, the weight value corresponding to each pixel in the video frame image may be determined according to the different color of the pixel; and calculating to obtain the tone average value of the video frame image according to the tone value of the pixel and the corresponding weight value.
Step S1022, traversing pixels of the video frame image, and calculating a color difference between a hue value of the pixel and the hue average value;
step S1023, judging whether the color difference is larger than a preset threshold value;
step S1024, if the color difference is larger than a preset threshold value, adding the pixel into a dominant hue pixel list, and determining the color information according to the dominant hue value of the pixel in the dominant hue pixel list.
Specifically, we need to extract the color information of the video frame image, which is the dominant hue that can represent the video frame image most, and the dominant hue does not refer to the color with the most color, but refers to the most striking hue in the video frame image. Alternatively, the hue values may be represented by RGB values, but also by hexadecimal color values, which are now more commonly available. In the present embodiment, each pixel in the video frame image is traversed, and the color difference between the hue value and the average value of the hue of each pixel is calculated. When the color difference between the tone value of a certain pixel and the average value of the tone is larger than a preset threshold value, the pixel is added to the dominant-tone pixel list. After all the pixels are compared with the tone values, an average value of the tone values of the pixels included in the dominant-tone pixel list is calculated, and the average value is determined as the color information of the video frame image.
In step S103, screening out qualified agricultural and livestock products according to the main color information, which specifically comprises the following steps:
step S1030, traversing pixels of the video frame image, and calculating whether the difference value between the hue value of the pixel and the main hue value is greater than a preset threshold value; if the difference values are smaller than a preset threshold value, namely the difference between the pixels of the video frame image and the main tone is not large, marking the video frame image as qualified; on the contrary, if the difference value is greater than the preset threshold value, the difference between the pixels of the video frame image and the main tone is large, namely, abnormal pixel points exist, and the agricultural and livestock products may not be fresh or go bad.
The article identification process of step S102 may identify the target object by using an image identification technology, such as: the image recognition technology is not limited in the embodiment of the invention, and the methods of contour extraction, pattern matching, characteristic comparison of various types of target object images stored in a preset database and the like can be adopted for vegetables, fruits, meat and the like. After the target object is identified, the target object can be extracted from the first picture by performing a matting along the contour of the identified target object, or by using an image matting technique, such as the related matting technique in Photoshop.
Therefore, after the articles are identified, the main color information of the video frame image is extracted, whether abnormal pixel points exist is judged by using the difference value between the main color information and the color tone value of the video frame image, and then qualified farm and livestock products and farm and livestock products which are possibly unqualified are distinguished, so that the judgment result of the visual screening method is accurate.
In some embodiments, the method further comprises a scent review, i.e.:
step S1041, after the qualified farm and animal products are washed by clean water, odor information emitted by the farm and animal products is obtained by using an odor sensor, whether the farm and animal products are abnormal or not is judged by comparing the odor information with preset reference information, and odor rechecking is carried out.
With reference to fig. 4, correspondingly, an agricultural and animal product non-destructive testing apparatus, comprising:
the camera 200 is used for shooting images of agricultural and livestock products transmitted on the transmission belt in real time;
a processor 100, configured to obtain a video frame image of a currently captured video content in real time; extracting dominant color information from the video frame image; screening out qualified farm and livestock products according to the color information;
and the first sorting device 501 is used for sorting the screened qualified farm and livestock products.
In some embodiments, the processor 100 is configured to calculate a tonal average of the video frame image; traversing pixels of the video frame image, and calculating the color difference between the tone value of the pixels and the tone average value; judging whether the color difference is larger than a preset threshold value or not; and if the color difference is larger than a preset threshold value, adding the pixel into a dominant hue pixel list, and determining the color information according to the dominant hue value of the pixel in the dominant hue pixel list.
In some embodiments, the apparatus further comprises: the odor sensor 300 and the second sorting device 502, the odor sensor 300 is used for acquiring odor information emitted by farm and animal products, and the processor 100 is used for judging whether the farm and animal products are abnormal or not by comparing the odor information with preset reference information; the second sorting device 502 is used for sorting the farm and livestock products which are judged to be normal by the smell rechecking.
In the above embodiment, the first sorting device 501 and the second sorting device 502 are respectively electrically connected to the processor 100, and are controlled by the processor 100 to perform corresponding sorting, which may be an existing robot or a gateway control device on a conveyor belt in a specific embodiment.
In summary, the method and the device for nondestructive testing of agricultural and animal products, disclosed by the application, firstly carry out image recognition on the agricultural and animal products transmitted on the transmission belt by using a visual technology, screen out a part of agricultural and animal products possibly asked for by appearance colors, and then carry out odor rechecking on the screened agricultural and animal products by using electronic olfaction, so as to ensure that the detected agricultural and animal products are fresh and healthy.
As shown in fig. 5, the camera 200 of this embodiment includes a lens 1000, an auto-focus voice coil motor 2000, a mechanical anti-shake device 3000, and an image sensor 4000, where the lens 1000 is fixedly mounted on the auto-focus voice coil motor 2000, the lens 1000 is used to acquire an image, the image sensor 4000 transmits the image acquired by the lens 1000 to the identification module, the auto-focus voice coil motor 2000 is mounted on the mechanical anti-shake device 3000, and the processing module drives the mechanical anti-shake device 3000 to perform shake compensation on the lens 1000 according to feedback of shake of the lens 1000 detected by a gyroscope in the lens 1000, so that images of farm and animal products captured by the camera 200 are clearer.
Most of the existing anti-shake devices generate lorentz magnetic force in a magnetic field by an electrified coil to drive the lens 1000 to move, to achieve optical anti-shake, the lens 1000 needs to be driven in at least two directions, which means that a plurality of coils need to be arranged, which poses certain challenges to the miniaturization of the overall structure, and is easily interfered by external magnetic fields, further affecting the anti-shake effect, the chinese patent publication No. CN106131435A provides a micro optical anti-shake camera module, the stretching and shortening of the memory alloy wire are realized through the temperature change, so as to pull the automatic focusing voice coil motor 2000 to move, realize the jitter compensation of the lens 1000, the control chip of the micro memory alloy optical anti-jitter actuator can control the change of the driving signal to change the temperature of the memory alloy wire, thereby controlling the elongation and contraction of the memory alloy wire, and calculating the position and moving distance of the actuator according to the resistance of the memory alloy wire. When the micro memory alloy optical anti-shake actuator moves to a specified position, the resistance of the memory alloy wire at the moment is fed back, and the movement deviation of the micro memory alloy optical anti-shake actuator can be corrected by comparing the deviation of the resistance value with a target value.
However, the applicant finds that due to randomness and uncertainty of jitter, the structure of the above technical solution cannot realize accurate compensation of the lens 1000 when multiple jitters occur, because a certain time is required for both temperature rise and temperature fall of the shape memory alloy, when a jitter occurs in a first direction, the above technical solution can realize compensation of the lens 1000 for the jitter in the first direction, but when a subsequent jitter occurs in a second direction, the memory alloy wire cannot be instantly deformed, so that the compensation is not timely, and the compensation of the jitter of the lens 1000 for multiple jitters and continuous jitter in different directions cannot be accurately realized, so that structural improvement of the lens 1000 is required.
With reference to the accompanying drawings, as shown in fig. 6 to 9, the optical anti-shake device is modified in this embodiment, and is designed as a mechanical anti-shake device 3000, and the specific structure thereof is as follows:
the mechanical anti-shake device 3000 of the present embodiment includes a movable plate 3100, a movable frame 3200, an elastic restoring mechanism 3300, a substrate 3400, and a compensating mechanism 3500; the middle parts of the movable plate 3100 and the substrate 3400 are both provided with through holes for the lens to pass through, the auto-focus voice coil motor is installed on the movable plate 3100, the movable plate 3100 is installed in the movable frame 3200, and as can be seen from the figure, the width of the left and right directions of the movable plate 3100 of the present embodiment is substantially the same as the inner width of the movable frame 3200, so that the opposite sides (left and right sides) of the movable plate 3100 are in sliding fit with the inner walls of the opposite sides (left and right sides) of the movable frame 3200, so that the movable plate 3100 can slide back and forth along a first direction in the movable frame 3200, the first direction of the present embodiment is the up and down direction in the figure.
Specifically, the size of the movable frame 3200 of this embodiment is smaller than the size of the substrate 3400, two opposite sides of the movable frame 3200 are respectively connected to the substrate 3400 through two elastic restoring mechanisms 3300, the elastic restoring mechanism 3300 of this embodiment is a telescopic spring or other elastic member, and it should be noted that the elastic restoring mechanism 3300 of this embodiment only allows the movable frame 3200 to have the capability of stretching and rebounding along the left-right direction (i.e. the second direction described below) in the drawing, and cannot move along the first direction, and the elastic restoring mechanism 3300 is designed to facilitate the movable frame 3200 to drive the movable plate 3100 to restore after the movable frame 3200 is compensated and displaced, and the specific operation process of this embodiment will be described in detail in the following working process.
The compensation mechanism 3500 of this embodiment drives the movable plate 3100 and the lens on the movable plate 3100 to move under the driving of the processing module (which may be a motion command sent by the processing module), so as to implement the shake compensation of the lens.
Specifically, the compensating mechanism 3500 of the present embodiment includes a driving shaft 3510, a gear 3520, a gear track 3530 and a limit track 3540, wherein the driving shaft 3510 is mounted on the base plate 3400, specifically on the upper surface of the base plate 3400, the driving shaft 3510 is in transmission connection with the gear 3520, the driving shaft 3510 can be driven by a micro motor (not shown in the figure) or other structures, and the micro motor is controlled by the processing module; the gear rail 3530 is disposed on the movable plate 3100, the gear 3520 is mounted in the gear rail 3530 and moves along a preset direction of the gear rail 3530, and the gear 3520 enables the movable plate 3100 to generate a displacement in a first direction and a displacement in a second direction through the gear rail 3530 when rotating, wherein the first direction is perpendicular to the second direction; the limit rail 3540 is disposed on the movable plate 3100 or the base plate 3400, and the limit rail 3540 serves to prevent the gear 3520 from being disengaged from the gear rail 3530.
Specifically, the gear track 3530 and the limit track 3540 of the present embodiment have the following two structural forms:
as shown in fig. 5-9, a waist-shaped hole 3550 is disposed at a lower side of the movable plate 3100, the waist-shaped hole 3550 is disposed along a circumferential direction (i.e., a surrounding direction of the waist-shaped hole 3550) thereof with a plurality of teeth 3560 engaged with the gear 3520, the waist-shaped hole 3550 and the plurality of teeth 3560 together form the gear rail 3530, and the gear 3520 is located in the waist-shaped hole 3550 and engaged with the teeth 3560, such that the gear 3520 can drive the gear rail 3530 to move when rotating, and further directly drive the movable plate 3100 to move; in order to ensure that the gear 3520 can be constantly kept meshed with the gear rail 3530 during rotation, the limiting rail 3540 is disposed on the base plate 3400, the bottom of the movable plate 3100 is provided with a limiting member 3570 installed in the limiting rail 3540, and the limiting rail 3540 makes the motion track of the limiting member 3570 in a kidney-shaped manner, that is, the motion track of the limiting member 3570 in the current track is the same as the motion track of the movable plate 3100, specifically, the limiting member 3570 of the present embodiment is a protrusion disposed on the bottom of the movable plate 3100.
As shown in fig. 8 and 9, the gear rail 3530 of the present embodiment may further include a plurality of cylindrical protrusions 3580 disposed on the movable plate 3100, the plurality of cylindrical protrusions 3580 are uniformly spaced along the second direction, and the gear 3520 is engaged with the plurality of protrusions; the limiting rail 3540 is a first arc-shaped limiting member 3590 and a second arc-shaped limiting member 3600 which are arranged on the movable plate 3100, the first arc-shaped limiting member 3590 and the second arc-shaped limiting member 3600 are respectively arranged on two opposite sides of the gear rail 3530 along a first direction, and therefore, when the movable plate 3100 moves to a preset position, the gear 3520 is located on one side of the gear rail 3530, the gear 3520 is easy to disengage from the gear rail 3530 formed by the cylindrical protrusions 3580, and therefore, the first arc-shaped limiting member 3590 or the second arc-shaped limiting member 3600 can play a guiding role, so that the movable plate 3100 can move along the preset direction of the gear rail 3530, that is, the first arc-shaped limiting member 3590, the second arc-shaped limiting member 3600 and the plurality of protrusions cooperate to make the movement trajectory of the movable plate 3100 be waist-shaped.
The operation of the mechanical anti-shake device 3000 of the present embodiment will be described in detail with reference to the above structure, taking the example that the lens 1000 shakes twice, the shaking directions of the two times are opposite, and it is necessary to make the movable plate 3100 motion-compensate once in the first direction and then once in the second direction. When the movable plate 3100 is required to be compensated for motion in the first direction, the gyroscope feeds the detected shaking direction and distance of the lens 1000 back to the processing module in advance, the processing module calculates the motion distance of the movable plate 3100, so that the driving shaft 3510 drives the gear 3520 to rotate, the gear 3520 is matched with the gear rail 3530 and the limiting rail 3540, the processing module wirelessly sends a driving signal, the movable plate 3100 is further driven to move to a compensation position in the first direction, the movable plate 3100 is driven to reset through the driving shaft 3510 after compensation, in the resetting process, the elastic restoring mechanism 3300 also provides resetting force for resetting the movable plate 3100, and the movable plate 3100 is convenient to restore to the initial position. When the movable plate 3100 needs to perform motion compensation in the second direction, the processing method is the same as the compensation step in the first direction, and will not be described herein.
Of course, the above-mentioned two simple shakes are only performed twice, when a plurality of shakes occur, or when the shake direction is not reciprocating, the shake can be compensated by driving a plurality of compensation assemblies, the basic working process is the same as the above-mentioned description principle, which is not described herein in detail, and the detection feedback of the gyroscope, the sending of the control command to the driving shaft 3510 by the processing module, and the like are all the prior art, and are also described herein in many cases.
As can be seen from the above description, the mechanical compensator provided in this embodiment not only does not suffer from interference of an external magnetic field, but also has a good anti-shake effect, and can realize accurate compensation of the lens 1000 under the condition of multiple shakes, and the compensation is timely and accurate. In addition, the mechanical anti-shake device adopting the embodiment is simple in structure, small in installation space required by each component, convenient to integrate of the whole anti-shake device and high in compensation precision.
The present invention has been described in terms of specific examples, which are provided to aid understanding of the invention and are not intended to be limiting. For a person skilled in the art to which the invention pertains, several simple deductions, modifications or substitutions may be made according to the idea of the invention.

Claims (5)

1. A non-destructive testing method for agricultural and animal products, which uses a camera to shoot images of agricultural and animal products transmitted on a transmission belt in real time, is characterized by comprising the following steps:
acquiring a video frame image of currently shot video content in real time;
carrying out article identification from the video frame image and extracting main color information, wherein the method comprises the following steps: calculating a tone average value of the video frame image; traversing pixels of the video frame image, and calculating the color difference between the tone value of the pixels and the tone average value; judging whether the color difference is larger than a preset threshold value or not; if the color difference is larger than a preset threshold value, adding the pixel into a dominant hue pixel list, and determining the dominant color information according to a dominant hue value of the pixel in the dominant hue pixel list;
screening qualified farm and livestock products according to the main color information, comprising the following steps: traversing pixels of the video frame image, and calculating whether the difference value between the hue value of the pixels and the main hue value is greater than a preset threshold value; if the difference values are smaller than a preset threshold value, marking the video frame image as qualified;
the camera comprises a lens, an automatic focusing voice coil motor, a mechanical anti-shake device and an image sensor, wherein the lens is fixedly arranged on the automatic focusing voice coil motor and used for acquiring images, the image sensor transmits the images acquired by the lens to an identification module, the automatic focusing voice coil motor is arranged on the mechanical anti-shake device, and a processing module drives the mechanical anti-shake device to act according to feedback of lens shake detected by a gyroscope in the lens so as to realize shake compensation of the lens;
the mechanical anti-shake device comprises a movable plate, a movable frame, an elastic return mechanism, a substrate and a compensation mechanism; the middle parts of the movable plate and the substrate are respectively provided with a through hole for the lens to pass through, the automatic focusing voice coil motor is arranged on the movable plate, and the movable plate is arranged in the movable frame;
the size of the movable frame is smaller than that of the substrate;
the compensation mechanism is driven by the processing module to drive the movable plate and the lenses on the movable plate to move;
the compensation mechanism comprises a driving shaft, a gear track and a limiting track, wherein the driving shaft is arranged on the substrate and is in transmission connection with the gear, the driving shaft is driven by a micro motor, and the micro motor is controlled by the processing module; the gear rail is arranged on the movable plate, and the gear is installed in the gear rail and moves along the preset direction of the gear rail;
a kidney-shaped hole is formed in the lower side of the movable plate, a plurality of teeth meshed with the gear are arranged in the kidney-shaped hole along the circumferential direction of the kidney-shaped hole, the kidney-shaped hole and the teeth jointly form the gear track, and the gear is located in the kidney-shaped hole and meshed with the teeth; the limiting rail is arranged on the base plate, and a limiting part arranged in the limiting rail is arranged at the bottom of the movable plate.
2. The method of claim 1, wherein the weight value corresponding to each pixel in the video frame image is determined according to a different color of the pixel; and calculating to obtain the tone average value of the video frame image according to the tone value of the pixel and the corresponding weight value.
3. The method of claim 1 or 2, further comprising: and after the screened qualified farm and animal products are washed by clean water, odor information emitted by the farm and animal products is obtained by using an odor sensor, and whether the farm and animal products are abnormal or not is judged by comparing the odor information with preset reference information, so that odor rechecking is carried out.
4. A non-destructive testing device for agricultural and animal products, comprising:
the camera is used for shooting images of agricultural and livestock products transmitted on the transmission belt in real time;
the processor is used for acquiring a video frame image of the currently shot video content in real time;
the processor is further configured to: extracting dominant color information from the video frame image; the method comprises the following steps: calculating a tone average value of the video frame image; traversing pixels of the video frame image, and calculating the color difference between the tone value of the pixels and the tone average value; judging whether the color difference is larger than a preset threshold value or not; if the color difference is larger than a preset threshold value, adding the pixel into a dominant hue pixel list, and determining the color information according to a dominant hue value of the pixel in the dominant hue pixel list;
the processor is further configured to: screening out qualified farm and livestock products according to the main color information; the method comprises the following steps: traversing pixels of the video frame image, and calculating whether the difference value between the hue value of the pixels and the main hue value is greater than a preset threshold value; if the difference values are smaller than a preset threshold value, marking the video frame image as qualified;
the first sorting device is used for sorting the screened qualified farm and livestock products;
the camera comprises a lens, an automatic focusing voice coil motor, a mechanical anti-shake device and an image sensor, wherein the lens is fixedly arranged on the automatic focusing voice coil motor and used for acquiring images, the image sensor transmits the images acquired by the lens to an identification module, the automatic focusing voice coil motor is arranged on the mechanical anti-shake device, and a processing module drives the mechanical anti-shake device to act according to feedback of lens shake detected by a gyroscope in the lens so as to realize shake compensation of the lens;
the mechanical anti-shake device comprises a movable plate, a movable frame, an elastic return mechanism, a substrate and a compensation mechanism; the middle parts of the movable plate and the substrate are respectively provided with a through hole for the lens to pass through, the automatic focusing voice coil motor is arranged on the movable plate, and the movable plate is arranged in the movable frame;
the size of the movable frame is smaller than that of the substrate;
the compensation mechanism is driven by the processing module to drive the movable plate and the lenses on the movable plate to move;
the compensation mechanism comprises a driving shaft, a gear track and a limiting track, wherein the driving shaft is arranged on the substrate and is in transmission connection with the gear, the driving shaft is driven by a micro motor, and the micro motor is controlled by the processing module; the gear rail is arranged on the movable plate, and the gear is installed in the gear rail and moves along the preset direction of the gear rail;
a kidney-shaped hole is formed in the lower side of the movable plate, a plurality of teeth meshed with the gear are arranged in the kidney-shaped hole along the circumferential direction of the kidney-shaped hole, the kidney-shaped hole and the teeth jointly form the gear track, and the gear is located in the kidney-shaped hole and meshed with the teeth; the limiting rail is arranged on the base plate, and a limiting part arranged in the limiting rail is arranged at the bottom of the movable plate.
5. The nondestructive testing apparatus of claim 4, further comprising: the odor sensor is used for acquiring odor information emitted by the agricultural and livestock products, and the processor is used for comparing the odor information with preset reference information to judge whether the agricultural and livestock products are abnormal or not; and the second sorting device is used for sorting the agricultural and livestock products which are judged to be normal through the smell rechecking.
CN201910139218.8A 2018-11-06 2019-02-25 Nondestructive testing method and device for agricultural and livestock products Active CN109883958B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811315729 2018-11-06
CN2018113157292 2018-11-06

Publications (2)

Publication Number Publication Date
CN109883958A CN109883958A (en) 2019-06-14
CN109883958B true CN109883958B (en) 2022-03-11

Family

ID=66929294

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910139218.8A Active CN109883958B (en) 2018-11-06 2019-02-25 Nondestructive testing method and device for agricultural and livestock products

Country Status (1)

Country Link
CN (1) CN109883958B (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102728563A (en) * 2012-05-15 2012-10-17 陈延鹏 Intelligent winter jujube sorting machine
CN105224588A (en) * 2015-06-29 2016-01-06 深圳市美贝壳科技有限公司 According to method and the device of photo dominant hue generation background music
CN106238342B (en) * 2016-09-14 2018-05-15 郑州轻工业学院 Panoramic vision potato sorts and defect detecting device and its sorting detection method
CN107350172B (en) * 2017-07-31 2023-09-05 中国农业科学院兰州畜牧与兽药研究所 Beef acid lipid component monitoring quality control device
CN207057047U (en) * 2017-08-07 2018-03-02 华中农业大学 A kind of Chinese chestnut automatic sorting device

Also Published As

Publication number Publication date
CN109883958A (en) 2019-06-14

Similar Documents

Publication Publication Date Title
DE102009034529B4 (en) Automatic guidance and detection system and method for this
CN108109137A (en) The Machine Vision Inspecting System and method of vehicle part
CN106226157B (en) Concrete structure member crevices automatic detection device and method
CN110770989A (en) Unmanned and maintainable switchgear or control device system and method for operating same
JP2013201714A (en) Moving-object image discrimination device and moving-object image discrimination method
CN109241941A (en) A method of the farm based on deep learning analysis monitors poultry quantity
CN112085089A (en) Intelligent temperature measurement method for transformer substation equipment based on deep learning algorithm
CN107949865B (en) Abnormality detection device and abnormality detection method
CN116630327B (en) Boiler state abnormity monitoring system based on thermodynamic diagram
CN108748149A (en) Based on deep learning without calibration mechanical arm grasping means under a kind of complex environment
CN105981362A (en) Method for obtaining a picture and multi-camera system
CN111476119B (en) Insect behavior identification method and device based on space-time context
CN109883958B (en) Nondestructive testing method and device for agricultural and livestock products
US11521120B2 (en) Inspection apparatus and machine learning method
CN110402456A (en) Abnormality detection system, method for detecting abnormality and program
US11682112B2 (en) Inspection device and machine learning method
CN108122243B (en) Method for robot to detect moving object
CN109286752A (en) Vision inspection apparatus and automatic focusing method
KR20140000821A (en) Method and system for motion detection using elimination of shadow by heat
CN114226262A (en) Flaw detection method, flaw classification method and flaw detection system
Metzner et al. Automated optical inspection of soldering connections in power electronics production using convolutional neural networks
US20100202688A1 (en) Device for segmenting an object in an image, video surveillance system, method and computer program
DE102014219838A1 (en) Smoke detection apparatus and method for detecting smoke of a fire and computer program
JP4095640B2 (en) Inspection method and inspection apparatus for injection molded products.
US20150116552A1 (en) Digital camera system and a method for controlling the digital camera system

Legal Events

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