A biscuit detection device and biscuit detection method based on machine vision

Through the machine vision-based biscuit detection device, the visual detection mechanism and image processing algorithm are used to solve the problems of low efficiency and poor accuracy of traditional manual detection, realize automatic detection of biscuits and rapid removal of unqualified products, and improve production efficiency. and detection accuracy.

CN112213320BActive Publication Date: 2024-09-13YINWEI FOOD MACHINERY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011210466.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-03
Publication Date
2024-09-13
Estimated Expiration
2040-11-03

AI Technical Summary

Technical Problem

Traditional biscuit inspection mainly relies on artificial naked eyes, which has problems such as high labor intensity, low production efficiency, high missed detection rate and high false detection rate, and it is difficult to effectively detect the integrity and scorch of biscuits.

Method used

A biscuit detection device based on machine vision is designed, including a visual detection mechanism and a lighting mechanism. Biscuit images are captured and processed through the visual detection mechanism, the integrity and scorch of the biscuits are detected using image processing algorithms, and the removal mechanism is used to automatically remove inappropriate items. Qualified product.

Benefits of technology

It realizes automated detection of biscuits, improves detection accuracy and production efficiency, reduces manual labor intensity, and can quickly and accurately identify and remove incomplete and burnt biscuits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112213320B
    Figure CN112213320B
Patent Text Reader

Abstract

The present invention discloses a biscuit detection device and a biscuit detection method based on machine vision. The biscuit detection device includes a frame, a visual detection mechanism and a lighting mechanism. The visual detection mechanism is arranged at the middle position of the top of the frame and shoots biscuits downward; the lighting mechanism is arranged at both sides of the top of the frame and projects light downward. When using the biscuit detection method of the biscuit detection device, the biscuit detection device is arranged above the biscuit production line during detection, the lighting mechanism illuminates the biscuit products on the production line below, and the visual detection mechanism shoots the biscuit products on the biscuit production line below. The present invention is used for biscuit detection, and can realize biscuit integrity and coking detection through visual detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of biscuit processing and production, and in particular to a biscuit detection device and a biscuit detection method based on machine vision. Background Art

[0002] The biscuit production process usually includes dough mixing, molding, baking, oil spraying and cooling. Improper control of process parameters can easily make the biscuits fragile and coke, which in turn affects the quality of biscuit products. As consumers' requirements for product quality continue to increase, it is necessary to test the integrity and coke of biscuits. Traditional biscuit testing mainly uses manual visual inspection, which has the disadvantages of high labor intensity, low production efficiency, and high missed detection and false detection rates. Summary of the invention

[0003] The technical problem solved by the present invention is to provide a biscuit detection device and a biscuit detection method based on machine vision which can solve the problems existing in the manual detection of biscuit integrity and coking in the prior art.

[0004] In order to solve the above technical problems, the technical solution of the present invention is: a biscuit detection device based on machine vision, including a frame, a visual detection mechanism and a lighting mechanism, the visual detection mechanism is arranged in the middle position of the top of the frame, and shoots the biscuits downward; the lighting mechanism is arranged on both sides of the top of the frame, and projects light downward.

[0005] Furthermore, the visual detection mechanism includes a mounting rod, a mounting frame and a camera assembly, the mounting rod is arranged on the top of the frame, the mounting frame includes a coarse adjustment assembly and a fine adjustment assembly, the coarse adjustment assembly is slidably arranged on the mounting rod, the fine adjustment assembly is arranged on the coarse adjustment assembly, and the camera assembly is arranged on the fine adjustment assembly.

[0006] Furthermore, the coarse adjustment assembly includes a locking member, a fixing block and a mounting shaft, the locking member is slidably arranged on the mounting rod, the fixing block is arranged on the locking member, and the mounting shaft is fixed on the fixing block.

[0007] Furthermore, the fine adjustment component includes a slider and an adjusting screw, the slider is slidably set on the mounting shaft, the camera assembly is slidably set on the slider through a slide rail, the adjusting screw is threaded on the slider, and the adjusting screw can adjust the position of the camera assembly on the slider.

[0008] Furthermore, the lighting mechanism includes a light source and a light shield, the light source is arranged on both sides of the visual detection mechanism and is at an angle of 45° to the horizontal direction; the light shield is arranged on the top of the frame and is located outside the light source and the visual detection mechanism.

[0009] Furthermore, it also includes a processing component, which includes an image acquisition module, a defective product detection module, a rejection information processing module and a real-time position monitoring module.

[0010] A biscuit detection method using the above biscuit detection device, during detection, the biscuit detection device is arranged above the biscuit production line, the lighting mechanism illuminates the biscuit products on the production line below, and the visual detection mechanism photographs the biscuit products on the biscuit production line below; the biscuit detection method comprises the following steps:

[0011] S1, standard product learning, placing multiple qualified biscuit products on the production line below the visual inspection mechanism and taking photos, calculating the area and grayscale value of the standard biscuit products through the processing component, and creating templates and shape areas of standard biscuit products;

[0012] S2, the visual inspection mechanism takes an image of the biscuit product to be tested on the biscuit production line once at a set distance, and the set distance is smaller than the field of view of the visual inspection mechanism;

[0013] S3. After the visual inspection agency obtains the image of the biscuit product to be tested, it first performs mean filtering on the image through the processing component, and then uses the dynamic threshold method to extract the biscuit ROI (region of interest);

[0014] S4, using the standard biscuit product template learned in step S1 to perform template matching, screen out complete biscuits, and use affine transformation to form a template matching area for the shape area learned from the product, perform a difference operation between the template matching area and the extracted biscuit shape ROI area, and perform an open operation. If there is a difference area, it is regarded as an incomplete biscuit product area, and the biscuit area coordinates are calculated and recorded as the unqualified biscuit product coordinates;

[0015] S5. The processing component separates the acquired complete biscuit area into multiple separate areas, each of which corresponds to a biscuit; calculates the average grayscale value of the single biscuit area, and compares the average grayscale value with the grayscale value of the standard product obtained by learning. If the absolute value of the difference between the two exceeds the set percentage of the grayscale value of the standard biscuit product, the biscuit is considered to be burnt and added to the unqualified biscuit product coordinate set; in order to avoid interference from the biscuit edge, the single biscuit area is reduced by corrosion operation;

[0016] S6. Calculate the coordinates of the unqualified biscuit products, and arrange the unqualified biscuit products in ascending order according to the coordinates;

[0017] S7. Calculate the pulse coordinates of the rejection position based on the camera position of the visual inspection mechanism (2), the position of the camera distance to the rejection mechanism, and the pixel accuracy. Once the encoder pulse count reaches this coordinate, the rejection mechanism is triggered to reject the unqualified biscuits. The coordinate calculation method of the rejection position is as follows:

[0018] The pulse coordinate of the camera's photo position is m O , the pixel coordinates of the unqualified cookies are m P , the image height is m H , the physical distance between the camera and the rejection mechanism is ΔK, the distance the production line moves per encoder rotation is ΔP, and the pixel accuracy is m ACU , then remove position m T :

[0019] m T =m O +(ΔK+(m P -m H / 2)·m ACU ) / ΔP.

[0020] Furthermore, the step S1 also includes a pixel accuracy calibration step. The visual inspection mechanism is an industrial camera. The industrial camera is used to collect the position of the positioning block multiple times, and the average value of the physical coordinate difference of the positioning block is calculated. At the same time, the average value of the pixel coordinate difference of the positioning block in the image is calculated, and the pixel accuracy is obtained by the ratio of the physical coordinate difference and the pixel coordinate difference.

[0021] Furthermore, the specific method of extracting the biscuit ROI area in step S3 is: the gray value of the image of the biscuit product to be tested is g o , the gray value of the image after mean filtering is g t , offest is the grayscale bias value set by the user. If g o <g t -offset, it is regarded as a cookie ROI area; then the complete ROI area is extracted using methods such as closing operation, opening operation and area filling.

[0022] Furthermore, after step S2, the method further includes screening out overlapping biscuit areas in the image captured in step S2 according to the area of ​​the standard biscuit product learned in step S1; and screening out biscuits at the edge of the field of view of the image captured in step S2.

[0023] The beneficial effects achieved by the present invention are mainly as follows: the biscuit detection device includes a visual detection mechanism and a lighting mechanism. The lighting mechanism illuminates the biscuits on the production line, and the visual detection mechanism performs visual detection, so that the integrity and coking of the biscuits can be detected, and mechanical automatic detection of biscuits can be achieved. The production efficiency is high, the detection is accurate, and the detection consistency is good. The use of manual labor can also be reduced, and the labor intensity of manual labor can be reduced. The biscuit detection method can automatically detect incomplete biscuits and coked biscuits through visual detection and calculation processing through the above-mentioned biscuit detection device, and the defective biscuits can be removed, thereby realizing high-speed automatic detection of biscuit integrity and coking. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 This is a schematic diagram of the appearance structure of a biscuit detection device based on machine vision in Embodiment 1 of the present invention;

[0025] Figure 2 Schematic diagram of the structure of the visual detection mechanism of the biscuit detection device based on machine vision in the first embodiment of the present invention.

[0026] The drawings are only used for illustrative purposes and should not be construed as limitations on this patent. In order to better illustrate this embodiment, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of the actual product. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted. The same or similar numbers correspond to the same or similar parts. The terms describing the positional relationship in the drawings are only used for illustrative purposes and should not be construed as limitations on this patent. DETAILED DESCRIPTION

[0027] To facilitate understanding by those skilled in the art, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.

[0028] Embodiment 1

[0029] See also Figure 1 and Figure 2A biscuit detection device based on machine vision is used for biscuit detection, and can realize the integrity and coking detection of biscuits through visual detection. The biscuit detection device includes a frame 1, a visual detection mechanism 2 and a lighting mechanism 3. The frame 1 is a mounting and fixing structure of the detection device. The biscuit detection device can be installed on the outside of the biscuit production line through the frame. A fixing plate 11 is provided on the frame 1, and the fixing plate 11 is screwed and fixed on the outside of the biscuit production line. At the same time, the visual detection mechanism 2 and the lighting mechanism 3 are also arranged on the frame. The visual detection mechanism 2 is arranged at the middle position of the top of the frame 1, and the camera component 21 of the visual detection mechanism 2 is arranged downward, and the biscuits on the biscuit production line can be photographed downward; the camera component 21 includes an industrial camera and a lens, and the industrial camera can adopt a commonly used CCD camera. The lighting mechanism 3 is arranged on both sides of the top of the frame 1, and the light-emitting part is arranged downward to project light to the biscuit production line below, illuminate the biscuits, and facilitate the visual detection mechanism 2 to take pictures and detect.

[0030] See also Figure 2 The visual inspection mechanism 2 can adopt the following specific structure, including a mounting rod 21, a mounting frame 22 and a camera assembly 23. The mounting rod 21 is horizontally arranged at the middle position of the top of the frame 1. The mounting frame 22 is installed on the mounting rod 21 and can be slidably arranged, so that the position of the camera assembly 23 is adjustable, which is convenient for adjustment and detection; the mounting rod 21 is preferably a square rod, so that the mounting frame 22 is installed on it more stably, and the visual inspection mechanism 2 is prevented from rotating when it is installed on the mounting frame 22, which affects the accuracy of biscuit detection. The mounting frame 22 includes a coarse adjustment component 221 and a fine adjustment component 222. The coarse adjustment component 221 is slidably arranged on the mounting rod 21, the fine adjustment component 222 is arranged on the coarse adjustment component 221, and the camera assembly 23 is arranged on the fine adjustment component 222; the coarse adjustment component 221 and the fine adjustment component 222 are arranged to make the position adjustment of the camera assembly 23 more accurate, thereby improving the accuracy of biscuit detection.

[0031] See also Figure 2The coarse adjustment component 221 may adopt the following structure: comprising a locking member 2211, a fixing block 2212 and a mounting shaft 2213, wherein the locking member 2211 is slidably arranged on the mounting rod 21, and the locking member 2211 comprises two parts screwed together by screws, and the two parts clamp the mounting rod 21, thereby fixing the mounting rod 21, and when the position needs to be adjusted, the screws can be loosened to adjust the position of the locking member 2211 on the mounting rod 21. The fixing block 2212 is arranged on the locking member 2211, and the mounting shaft 2213 is fixed on the fixing block 2212, and the fine adjustment component 222 is vertically slidably arranged on the mounting shaft 2213, so that the position of the fine adjustment component 222 on the mounting shaft 2213 can be adjusted to achieve the coarse adjustment of the position of the camera component 23; the sliding mounting structure of adjusting the fine adjustment component 222 on the mounting shaft 2213 can refer to the mounting structure of the locking member 2211 and the mounting rod 21.

[0032] See also Figure 2 The fine-tuning component 222 can adopt the following structure: it includes a slider 2221 and an adjusting screw 2222, the slider 2221 is slidably set on the installation shaft 2213, the camera component 23 is vertically slidably set on the slider 2221 through a slide rail, the slider 2221 is set to an L-shaped structure, the adjusting screw 2222 is screwed on one side of the slider 2221, and the front end of the adjusting screw 2222 is rotatably connected to the camera component 23, so that when the adjusting screw 2222 rotates on one side of the slider 2221, the camera component 23 can be driven to move vertically on the other side of the slider 2221, that is, the position of the camera component 23 on the slider 2221 can be adjusted by adjusting the screw 2222, so as to realize the fine adjustment of the position of the camera component 23.

[0033] See also Figure 1 The lighting mechanism 3 includes a light source 31 and a light shield 32. The light source 31 is arranged on both sides of the visual detection mechanism 2 and is at an angle of 45° to the horizontal direction, so that the light emitted by the light source can be irradiated just below the camera assembly 23, better illuminating the position photographed by the camera assembly 23, making the image taken by the camera assembly 23 clearer and the detection more accurate; the light source 31 can be a common light source such as a fluorescent tube, an LED tube, etc. The light shield 32 is arranged on the top of the frame 1 and is located outside the light source 31 and the visual detection mechanism 2 to prevent the light source 31 from leaking from the upper side and to prevent other light sources on the upper side from affecting the shooting of the visual detection mechanism 2.

[0034] See also Figure 1 A processing component 4 is also provided, and the processing component 4 can be a computer. The processing component 4 includes an image acquisition module, a defective product detection module, a rejection information processing module and a real-time position monitoring module.

[0035] The image acquisition module uses an encoder to calculate the position of the production line in real time and acquires an image at a certain distance.

[0036] The defective product detection module processes the image, identifies incomplete and burnt biscuits in the field of view, calculates their pixel coordinates, converts them into physical coordinates, and divides the biscuits into four areas based on the coordinates for elimination.

[0037] The rejection information processing module calculates the pixel coordinates of unqualified cookies, converts them into physical coordinates, and divides the cookies into four areas for rejection based on the coordinates.

[0038] The real-time position monitoring module is used to obtain the position of the production line in real time. When unqualified biscuits move to the position of the rejection mechanism, the signal is fed back to the processor. A rejection mechanism module can be added, and the processor controls the rejection mechanism to reject them.

[0039] Embodiment 2

[0040] A biscuit detection method using the biscuit detection device in Example 1, during detection, the biscuit detection device is set above the biscuit production line, the lighting mechanism 3 illuminates the biscuit products on the production line below, and the visual detection mechanism 2 photographs the biscuit products on the biscuit production line below. The biscuit detection method includes the following steps:

[0041] S1. Pixel accuracy calibration. The visual inspection mechanism 2 is an industrial camera. A positioning block is placed on the biscuit production line below the visual inspection mechanism 2. The industrial camera is used to capture the position information of the positioning block by taking multiple photos. The processing component calculates the average value of the physical coordinate difference of the positioning block. At the same time, the average value of the pixel coordinate difference of the positioning block in the image is calculated. The pixel accuracy is obtained by the ratio of the physical coordinate difference to the pixel coordinate difference.

[0042] S2, standard product learning, placing multiple qualified biscuit products on the production line below the visual inspection mechanism 2 and taking photos, obtaining the standard product image of the biscuit product to be tested, identifying the shape and appearance parameters of the standard product, calculating the area and grayscale value of the standard biscuit product through the processing component 4, and creating a template and shape area of ​​the standard biscuit product, and storing it in the processing component 4.

[0043] S3. When the biscuit production line is transporting biscuit products, the visual inspection mechanism 2 captures images of the biscuit products to be tested on the biscuit production line at a set distance. The set distance is smaller than the field of view of the visual inspection mechanism 2, so that all biscuits on the biscuit production line can be captured by the visual inspection mechanism 2 to obtain images, thereby avoiding missed inspections caused by missing biscuits on the production line.

[0044] S4, the visual inspection mechanism 2 obtains the image of the biscuit product to be tested and transmits it to the processing component 4. First, the image is mean filtered by the processing component, and then the biscuit ROI area is extracted using a dynamic threshold method. The specific method is: the gray value of the image of the biscuit product to be tested is g o , the gray value of the image after mean filtering is g t , offest is the grayscale bias value set by the user. If g o <g t -offset, it is regarded as a cookie ROI area; then the complete ROI area is extracted using methods such as closing operation, opening operation and area filling.

[0045] S5. The processing component removes the biscuit area in the image captured in step S3 that overlaps with the images captured before and after according to the area of ​​the standard biscuit product learned in step S2, so as to avoid misjudgment when detecting disorderly arranged biscuits. And according to the standard biscuit product learned in step S2, the biscuits at the edge of the image field of view captured in step S3 are removed to avoid misjudgment caused by biscuits at the edge of the image field of view; in this embodiment, the biscuit area obtained by image processing is deselected by the processing component, and the deselected area is filled. The biscuits at the edge of the image field of view are not filled due to the incompleteness in the image, so the biscuits at the edge of the image field of view can be excluded.

[0046] S6. The processing component uses the standard biscuit product template learned in step S2 to perform template matching, screens out complete biscuits in the captured image, and forms a template matching area through affine transformation of the shape area learned from the product. The template matching area is differenced with the extracted biscuit shape ROI area, and an open operation is performed. If there is a difference area, it is regarded as an incomplete biscuit product area, and the biscuit area coordinates are calculated and recorded as the unqualified biscuit product coordinates.

[0047] S7. Except for the incomplete biscuit product areas located in steps S6 and S7, the areas in the biscuit images acquired by other visual inspection mechanisms 2 are complete biscuit areas. The processing component separates the acquired complete biscuit area into multiple separate areas, each corresponding to a biscuit; calculates the average grayscale value of a single biscuit area, and compares the average grayscale value with the grayscale value of the standard product obtained by learning. If the absolute value of the difference between the two exceeds the set percentage of the grayscale value of the standard biscuit product, the biscuit is considered to be burnt and added to the unqualified biscuit product coordinate set; wherein, in order to avoid interference from the edges of the biscuits, the single biscuit area is reduced by corrosion operation. In this embodiment, if the average grayscale value exceeds 20% of the grayscale value of the standard product obtained by learning, it is considered to be a burnt biscuit; in practice, it can also be determined according to different products.

[0048] S8, the processing component calculates the coordinates of the unqualified biscuit products, and arranges the unqualified biscuit products in ascending order according to the coordinates;

[0049] S9. The processing component calculates the pulse coordinates of the rejection position according to the camera position of the visual inspection mechanism 2, the position of the camera distance to the rejection mechanism and the pixel accuracy. Once the encoder pulse count reaches the coordinate, the rejection mechanism is triggered to reject the unqualified biscuits. The coordinate calculation method of the rejection position is as follows:

[0050] The pulse coordinate of the camera's photo position is m O , the pixel coordinates of the unqualified cookies are m P , the image height is m H , the physical distance between the camera and the rejection mechanism is ΔK, the distance the production line moves per encoder rotation is ΔP, and the pixel accuracy is m ACU , then remove position m T ;

[0051] m T =m O +(ΔK+(m P -mH / 2) •m ACU ) / ΔP.

[0052] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.

Claims

1. A cookie detection method, characterized in that: During detection, the biscuit detection device is arranged above the biscuit production line, the lighting mechanism (3) illuminates the biscuit products on the production line below, and the visual detection mechanism (2) photographs the biscuit products on the biscuit production line below; the biscuit detection method comprises the following steps: S1, standard product learning, placing a plurality of qualified biscuit products on the production line below the visual inspection mechanism (2) and taking photos, calculating the area and grayscale value of the standard biscuit products through the processing component (4), and creating a template and shape area of ​​the standard biscuit products; S2, the visual inspection mechanism (2) captures an image of the biscuit product to be inspected on the biscuit production line at a set distance, wherein the set distance is smaller than the field of view of the visual inspection mechanism (2); S3, after the visual inspection unit (2) obtains the image of the biscuit product to be tested, it first performs mean filtering on the image through the processing component, and then extracts the biscuit ROI area using a dynamic threshold method; S4, using the standard biscuit product template learned in step S1 to perform template matching, screen out complete biscuits, and use affine transformation to form a template matching area for the shape area learned from the product, perform a difference operation between the template matching area and the extracted biscuit shape ROI area, and perform an open operation. If there is a difference area, it is regarded as an incomplete biscuit product area, and the biscuit area coordinates are calculated and recorded as the unqualified biscuit product coordinates; S5. The processing component separates the acquired complete biscuit area into multiple separate areas, each of which corresponds to a biscuit; calculates the average grayscale value of the single biscuit area, and compares the average grayscale value with the grayscale value of the standard product obtained by learning. If the absolute value of the difference between the two exceeds the set percentage of the grayscale value of the standard biscuit product, the biscuit is considered to be burnt and added to the unqualified biscuit product coordinate set; in order to avoid interference from the biscuit edge, the single biscuit area is reduced by corrosion operation; S6. Calculate the coordinates of the unqualified biscuit products, and arrange the unqualified biscuit products in ascending order according to the coordinates; S7. Calculate the pulse coordinates of the rejection position based on the camera position of the visual inspection mechanism (2), the position of the camera distance to the rejection mechanism, and the pixel accuracy. Once the encoder pulse count reaches this coordinate, the rejection mechanism is triggered to reject the unqualified biscuits. The coordinate calculation method of the rejection position is as follows: Let the pulse coordinate of the camera position be mO, the pixel coordinate of the unqualified biscuit be mP, the image height be mH, the physical distance between the camera and the rejection mechanism be ΔK, the distance the production line moves per encoder rotation be ΔP, and the pixel accuracy be mACU, then the rejection position is mT: mT=mO+(ΔK+(mP-mH / 2) ·mACU) / ΔP.

2. The biscuit detection method according to claim 1, characterized in that: The step S1 also includes a pixel accuracy calibration step, wherein the visual detection mechanism (2) is an industrial camera, and the position of the positioning block is collected multiple times by using the industrial camera, and the average value of the physical coordinate difference of the positioning block is calculated, and the average value of the pixel coordinate difference of the positioning block in the image is calculated at the same time, and the pixel accuracy is obtained by the ratio of the physical coordinate difference to the pixel coordinate difference.

3. The biscuit detection method according to claim 1, characterized in that: The specific method for extracting the ROI area of the biscuit in step S3 is as follows: Denote the gray value of the image of the biscuit product to be measured as go, the gray value of the image after mean filtering as gt, and the gray offset value set by the user as offset. If go < gt - offset, it is regarded as the ROI area of the biscuit; then use methods such as closing operation, opening operation, and region filling to extract the complete ROI area.

4. The biscuit detection method according to claim 1, characterized in that: After step S2, it further includes screening out the overlapping biscuit areas in the image captured in step S2 according to the area of the standard biscuit product learned in step S1; And screening out the biscuits at the edge of the field of view of the image captured in step S2.

5. A biscuit detection device based on machine vision using the biscuit detection method of claim 1, characterized in that: It includes a frame (1), a vision detection mechanism (2), and a lighting mechanism (3). The vision detection mechanism (2) is set at the middle position on the top of the frame (1) and shoots the biscuits downward; the lighting mechanism (3) is set at both sides on the top of the frame (1) and projects light downward; It further includes a processing component (4). The processing component (4) includes an image acquisition module, a defective product detection module, a rejection information processing module, and a real-time position monitoring module.

6. The biscuit detection device based on machine vision according to claim 5, characterized in that: The vision detection mechanism (2) includes a mounting rod (21), a mounting frame (22), and a camera assembly (23). The mounting rod (21) is set on the top of the frame (1). The mounting frame (22) includes a coarse adjustment component (221) and a fine adjustment component (222). The coarse adjustment component (221) is slidably set on the mounting rod (21). The fine adjustment component (222) is set on the coarse adjustment component (221). The camera assembly (23) is set on the fine adjustment component (222).

7. The biscuit detection device based on machine vision according to claim 6, characterized in that: The coarse adjustment component (221) includes a locking part (2211), a fixed block (2212), and a mounting shaft (2213). The locking part (2211) is slidably set on the mounting rod (21). The fixed block (2212) is set on the locking part (2211). The mounting shaft (2213) is fixed on the fixed block (2212).

8. The biscuit detection device based on machine vision according to claim 7, characterized in that: The fine adjustment component (222) includes a slider (2221) and an adjustment screw (2222). The slider (2221) is slidably set on the mounting shaft (2213). The camera assembly (23) is slidably set on the slider (2221) through a slide rail. The adjustment screw (2222) is screwed on the slider (2221), and the adjustment screw (2222) can adjust the position of the camera assembly (23) on the slider (2221).

9. The biscuit detection device based on machine vision according to claim 5, characterized in that: The lighting mechanism (3) includes a light source (31) and a light shield (32). The light source (31) is set on both sides of the vision detection mechanism (2) and forms a 45° angle with the horizontal direction; the light shield (32) is set on the top of the frame (1) and is located outside the light source (31) and the vision detection mechanism (2).