Method and device for evaluating the quality of adjustment of a vision inspection system
By quantifying the grayscale information and defect morphology of the target image, a quantitative relationship is established, which solves the consistency and efficiency problems in the assembly and adjustment process of the visual inspection system, and achieves efficient and accurate imaging quality evaluation.
Patent Information
- Application Number
- CN202211708942.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2042-12-29
AI Technical Summary
In existing technologies, the assembly and adjustment process of visual inspection systems consumes a lot of human resources and is difficult to guarantee consistency, resulting in inconsistent presentation of defects in product images.
By establishing a method for evaluating the assembly and adjustment quality of a visual inspection system, the grayscale information and defect morphology of the target image are quantitatively processed using the image features and assembly and adjustment offset relationship of the target image. A quantitative relationship is established, and system parameters are adjusted to improve imaging consistency.
It improves the consistency of imaging and the accuracy of evaluation in visual inspection systems, reduces repetitive debugging processes, and increases assembly and adjustment efficiency.
Smart Images

Figure CN116258674B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of vision system installation and adjustment, and particularly relates to a vision detection system installation and adjustment quality evaluation method and device. BACKGROUND
[0002] In the field of machine vision defect detection, a vision detection system is often used to collect product images to detect defects on products based on the product images. However, in the actual detection process, the installation and adjustment of the vision detection system also affects the presentation of defects in the product images. In related technologies, for large-scale installation and debugging of a series of vision detection system devices, a designed tooling is usually used to install and adjust multiple devices to the same state as much as possible. This method has a higher requirement for the processing precision of the tooling, consumes a large amount of human resources, and is difficult to ensure consistency. SUMMARY
[0003] The present application aims to at least solve one of the technical problems existing in the prior art. To this end, the present application provides a vision detection system installation and adjustment quality evaluation method and device to improve the consistency of appearance defect imaging between multiple vision detection systems.
[0004] In a first aspect, the present application provides a vision detection system installation and adjustment quality evaluation method, which comprises:
[0005] Based on the imaging effect of the product image corresponding to the product to be tested collected by the vision detection system, the system parameters of the vision detection system are adjusted to target parameters, and the target parameters are used to make the imaging effect reach a target range;
[0006] Under the target parameters, a plurality of target images corresponding to a target target collected by the vision detection system under a plurality of different installation and adjustment offsets are obtained, the product to be tested and the target target are located on the same imaging surface, and a plurality of pits of different sizes are arranged on the surface of the target target;
[0007] The image features corresponding to the pits in the target images are extracted, and a correlation between the image features and the installation and adjustment offsets is determined;
[0008] The correlation is quantitatively processed to determine a quantitative relationship between image information of the target image, installation and adjustment quality of the vision detection system, and the installation and adjustment offset; the image information includes grayscale information and defect morphology.
[0009] The quantitative relationship among the image quality, the installation and adjustment quality of the vision detection system and the installation and adjustment offset of the vision system is established, so that the influence of subjective judgment on the installation and adjustment quality is avoided, the accuracy and precision of the evaluation are improved, the consistency of the appearance defect imaging of a single vision detection system over time can be monitored, and the consistency of the appearance defect imaging between multiple vision detection systems can be effectively improved, and the repeated debugging process is avoided, and the installation and adjustment efficiency in the installation and adjustment of a large number of series of vision detection system devices is significantly improved.
[0010] According to an embodiment of the present application, the quantitative relationship among the image information of the target image, the installation and adjustment quality of the vision detection system and the installation and adjustment offset is determined by quantitatively processing the correlation relationship, and the method comprises the following steps:
[0011] The target target image in the plurality of target images is subjected to image processing to determine the average gray scale and the pixel value standard deviation of the target target image.
[0012] Based on the average gray scale and the pixel value standard deviation, the first dark pixel area and the second dark pixel area of the image feature corresponding to the pit point in the target target image are determined respectively.
[0013] Based on the first dark pixel area, the second dark pixel area, the emphasis factor and the installation and adjustment quality, a target quantitative relationship corresponding to the target target image is determined.
[0014] The emphasis factor is used to represent the emphasis degree of the gray scale information and the defect morphology, and the target target image is a target target image acquired by the vision detection system under a target installation and adjustment offset in the plurality of different installation and adjustment offsets.
[0015] According to an embodiment of the present application, the target quantitative relationship corresponding to the target target image is determined based on the first dark pixel area, the second dark pixel area, the emphasis factor and the installation and adjustment quality, and the method comprises the following steps:
[0016] Based on the formula:
[0017]
[0018] The target quantitative relationship corresponding to the target target image is determined, wherein Z is the installation and adjustment quality of the vision detection system under the target installation and adjustment offset, D is the first dark pixel area, L is the second dark pixel area, and λ is the emphasis factor. The average gray scale is determined.
[0019] According to one embodiment of the present application, the first dark pixel area and the second dark pixel area of the image feature corresponding to the pit point in the target image are determined based on the average gray value and the pixel value standard deviation, respectively, including:
[0020] A first threshold is determined based on the difference between the average gray value and the pixel value standard deviation multiplied by a target multiple;
[0021] The first dark pixel area is determined based on the first threshold, the height of the target image, and the width of the target image;
[0022] A second threshold is determined based on the sum of the average gray value and the pixel value standard deviation multiplied by a target multiple;
[0023] The second dark pixel area is determined based on the second threshold, the height of the target image, and the width of the target image.
[0024] According to one embodiment of the present application, the plurality of target images corresponding to the target are acquired under a plurality of different installation and adjustment offsets of the visual inspection system, including:
[0025] A plurality of initial images corresponding to the target are acquired under a target installation and adjustment offset of the visual inspection system among the plurality of different installation and adjustment offsets;
[0026] The plurality of initial images are preprocessed to acquire at least one target image acquired by the visual inspection system under the target installation and adjustment;
[0027] The plurality of target images are acquired based on the plurality of different installation and adjustment offsets.
[0028] According to one embodiment of the present application, after the quantitative relationship between the image information of the target image, the installation and adjustment quality of the visual inspection system, and the installation and adjustment offset is determined by quantitatively processing the correlation relationship, the method further includes:
[0029] An actual installation and adjustment quality corresponding to the to-be-tested visual inspection system is determined based on the quantitative relationship;
[0030] The to-be-tested visual inspection system is adjusted based on the actual installation and adjustment quality.
[0031] In a second aspect, the present application provides an installation and adjustment quality evaluation device of a visual inspection system, which comprises:
[0032] A first processing module is configured to adjust system parameters of the visual inspection system to target parameters based on the imaging effect of the product image corresponding to the to-be-tested product acquired by the visual inspection system, so that the imaging effect is within a target range.
[0033] The second processing module is used to acquire multiple target images corresponding to the target target collected by the visual inspection system under multiple different assembly and adjustment offsets under the target parameters. The product under test and the target target are located on the same imaging plane, and the surface of the target target is provided with multiple pits of different sizes.
[0034] The third processing module is used to extract the image features corresponding to the pits in the target image and determine the correlation between the image features and the assembly offset;
[0035] The fourth processing module is used to quantize the correlation to determine the quantization relationship between the image information of the target image, the assembly quality of the visual inspection system, and the assembly offset; the image information includes grayscale information and defect morphology.
[0036] According to the assembly and adjustment quality evaluation device of the visual inspection system of this application, a quantitative relationship is established between image quality, assembly and adjustment quality of the visual inspection system, and assembly and adjustment offset of the visual system. This not only avoids the influence of subjective judgment on assembly and adjustment quality and improves the accuracy and precision of the evaluation, but also monitors the consistency of appearance defect imaging of a single visual inspection system over time and effectively improves the consistency of appearance defect imaging among multiple visual inspection systems. It also avoids repetitive debugging processes and significantly improves the assembly and adjustment efficiency in scenarios involving the installation and debugging of a large number of visual inspection system devices.
[0037] Thirdly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the assembly quality evaluation method of the visual inspection system as described in the first aspect above.
[0038] Fourthly, this application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the assembly quality evaluation method of the visual inspection system as described in the first aspect above.
[0039] Fifthly, this application provides a chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the assembly quality evaluation method of the visual inspection system as described in the first aspect.
[0040] In a sixth aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the assembly quality evaluation method of the visual inspection system as described in the first aspect above.
[0041] The one or more technical solutions in the embodiments of the present application have at least one of the following technical effects:
[0042] By establishing the quantitative relationship between the image quality, the installation and adjustment quality of the vision detection system, and the installation and adjustment offset of the vision system, the influence of subjective judgment on the installation and adjustment quality is avoided, the accuracy and precision of the evaluation are improved, the consistency of the appearance defect imaging of a single vision detection system over time can be monitored, and the consistency of the appearance defect imaging between multiple vision detection systems can be effectively improved. The repeated debugging process is also avoided, and the installation and adjustment efficiency in the installation and debugging of a large number of vision detection system devices is significantly improved.
[0043] Further, by setting the emphasis factor, the quantitative relationship between the gray scale information, the defect morphology, the installation and adjustment quality, and the installation and adjustment offset is established based on the emphasis factor, the emphasis factor is adjusted based on the emphasis degree of the gray scale information and the defect morphology, and the quantitative relationship is correspondingly adjusted, so that the installation and adjustment quality can be more accurately determined, and the use flexibility is high and the application scenarios are wide.
[0044] Further, the actual installation and adjustment quality of the vision detection system is determined by the quantitative relationship, so that the user can monitor the imaging state of a single device, find the difference between the defect presentation state and the initial state in time, remind the user to calibrate the device or re-install, and realize real-time dynamic monitoring of the defect presentation state in the use process.
[0045] Additional aspects and advantages of the present application will be in part apparent and in part pointed out hereinafter in the description. BRIEF DESCRIPTION OF DRAWINGS
[0046] The above and / or additional aspects and advantages of the present application will become apparent and be readily appreciated from the description of the embodiments, taken in conjunction with the following drawings in which:
[0047] Figure 1 is a flowchart of the installation and adjustment quality evaluation method of the vision detection system provided by the embodiments of the present application;
[0048] Figure 2 is one of the principle diagrams of the installation and adjustment quality evaluation method of the vision detection system provided by the embodiments of the present application;
[0049] Figure 3 is the second effect diagram of the installation and adjustment quality evaluation method of the vision detection system provided by the embodiments of the present application;
[0050] Figure 4 is the third effect diagram of the installation and adjustment quality evaluation method of the vision detection system provided by the embodiments of the present application;
[0051] Figure 5 Figure 4 is a fourth effect schematic diagram of the method for evaluating the installation and adjustment quality of the visual inspection system provided in the embodiments of the present application;
[0052] Figure 6 Figure 5 is a fifth effect schematic diagram of the method for evaluating the installation and adjustment quality of the visual inspection system provided in the embodiments of the present application;
[0053] Figure 7 Figure 2 is a second principle schematic diagram of the method for evaluating the installation and adjustment quality of the visual inspection system provided in the embodiments of the present application;
[0054] Figure 8 Figure 6 is a structural schematic diagram of the device for evaluating the installation and adjustment quality of the visual inspection system provided in the embodiments of the present application;
[0055] Figure 9 Figure 7 is a structural schematic diagram of the electronic device provided in the embodiments of the present application. DETAILED DESCRIPTION
[0056] The technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all of them. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art belong to the scope of protection of the present application.
[0057] The terms "first", "second", and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are usually a category, and are not limited to the number of objects, for example, the first object can be one or more. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / ", generally represents that the front and rear associated objects are in an "or" relationship.
[0058] The method for evaluating the installation and adjustment quality of the visual inspection system, the device for evaluating the installation and adjustment quality of the visual inspection system, the electronic device, and the readable storage medium provided in the embodiments of the present application will be described in detail below with reference to the drawings, through specific embodiments and their application scenarios.
[0059] The method for evaluating the installation and adjustment quality of the visual inspection system provided in the embodiments of the present application, the execution subject of the method for evaluating the installation and adjustment quality of the visual inspection system can be a device for evaluating the installation and adjustment quality of the visual inspection system, or can be a server, or can also be a user terminal, including but not limited to a mobile phone, a tablet computer, a computer, and the like.
[0060] AsFigure 1 As shown, the adjustment quality evaluation method of the visual inspection system includes steps 110, 120, 130, and 140.
[0061] Step 110, based on the imaging effect of the acquired product image of the product to be tested collected by the visual inspection system, the system parameters of the visual inspection system are adjusted to the target parameters, and the target parameters are used to make the imaging effect within the target range;
[0062] In this step, the imaging effect includes imaging brightness, etc.
[0063] The target parameters are used to make the brightness of the product image of the product to be tested within the target range.
[0064] As shown Figure 2 The product to be tested and the target target are located on the same imaging surface.
[0065] In actual execution, the target target and the product to be tested can be placed on the same imaging surface. Under different adjustment offsets, the parameters of the visual inspection system are adjusted to the target parameters to adjust the brightness of the product image of the product to be tested to the target range, so that the image gray scale can be kept within a reasonable range after field adjustment, and then the target image of the target target and the product image of the product to be tested are collected, as shown Figures 3-5
[0066] Step 120, under the target parameters, a plurality of target images corresponding to the target target collected by the visual inspection system under a plurality of different adjustment offsets are acquired, the product to be tested and the target target are located on the same imaging surface, and the target target has a plurality of pit points of different sizes on the surface;
[0067] In this step, the target target is a user-defined target.
[0068] The target target has a plurality of pit points of different sizes on the surface.
[0069] In actual execution, the target target can be a film target, as shown Figure 7 The film target can be inserted from the middle position, and different sizes of pit points are pressed on the film target as defects by pressing the tool.
[0070] The visual inspection system includes an image sensor and a light source, and different adjustment offsets include but are not limited to the installation angle offset of the image sensor and the installation angle offset of the light source.
[0071] In the image acquisition process, the target target is placed under the field of view of the visual inspection system, and the adjustment offset of the visual system is changed to collect the target image of the target target under each adjustment offset.
[0072] In this step, the random deviation for simulating the field adjustment is changed by changing the adjustment offset.
[0073] In some embodiments, step 120 can include:
[0074] acquiring a plurality of initial images corresponding to the target target of the vision detection system under the target adjustment offset in a plurality of different adjustment offsets;
[0075] preprocessing the plurality of initial images to acquire at least one target image collected by the vision detection system under the target adjustment;
[0076] acquiring a plurality of target images based on a plurality of different adjustment offsets.
[0077] In this embodiment, the target adjustment offset is any adjustment offset in the plurality of different adjustment offsets.
[0078] The adjustment offsets corresponding to the plurality of initial images are the same, and the corresponding target targets are also the same.
[0079] After acquiring the plurality of initial images, the plurality of initial images can be preprocessed to remove images with large errors, acquire at least one initial image, and use the initial image as a target image, so as to avoid the interference of random errors and improve the accuracy of subsequent evaluation results.
[0080] Then, the adjustment offset is changed, a plurality of initial images under each adjustment offset are acquired and preprocessed to screen at least one target image under each adjustment offset.
[0081] For example, in actual execution, the target target and the product to be tested can be placed on the same imaging surface, the parameters of the vision detection system are adjusted under different adjustment offsets to adjust the brightness of the product image of the product to be tested to a preset range, so that the image gray scale can be kept within a reasonable range after field adjustment, and then the target image of the target target and the product image of the product to be tested are collected, as shown in Figures 3-5 .
[0082] Among them, Figure 3 (a) is a plurality of target images corresponding to the target target under the adjustment offset of 0.0 mm, Figure 3 (b) is a plurality of product images corresponding to the product to be tested under the adjustment offset of 0.0 mm.
[0083] Figure 4 (a) is a plurality of target images corresponding to the target target under the adjustment offset of 0.5 mm, Figure 4 (b) is a plurality of product images corresponding to the product to be tested under the adjustment offset of 0.5 mm.
[0084] Figure 5(a) is a plurality of target images corresponding to the target target under the adjustment offset of 1.0mm, Figure 5 (b) is a plurality of product images corresponding to the product to be tested under the adjustment offset of 1.0mm.
[0085] Step 130, extracting the image features corresponding to the pit points in the target image, and determining the correlation between the image features and the adjustment offset;
[0086] In this step, the image features corresponding to the pit points include area, gray scale, and shadow range around the features.
[0087] As shown in Figure 6 , wherein Figure 6 (a) is a target image corresponding to the target target under the adjustment offset of 0mm, Figure 6 (b) is a target image corresponding to the target target under the adjustment offset of 0.5mm, Figure 6 (c) is a target image corresponding to the target target under the adjustment offset of 1mm, Figure 6 (d) is a target image corresponding to the target target under the adjustment offset of 1.5mm.
[0088] It should be noted that the area of the black point in the target image is used to reflect the area of the pit defect. As the adjustment offset increases, a shadow appears around the pit defect, and the defect pixels are divided into black and white parts, which brings false judgment to the image algorithm processing.
[0089] Continuing to refer to Figure 6 , as the adjustment offset increases, the change of the pit point in the target image also shows a trend, and based on the change trend between them, the correlation between the image features and the adjustment offset can be determined.
[0090] After obtaining the correlation, the correlation is further converted into a quantitative relationship through step 140, so that the quantitative evaluation of the adjustment result can be realized.
[0091] Step 140, quantitatively processing the correlation to determine the quantitative relationship between the image information of the target image, the adjustment quality of the vision detection system and the adjustment offset; the image information includes gray scale information and defect morphology.
[0092] In this step, the image information of the target image includes gray scale information and defect morphology.
[0093] Among them, the defect morphology is embodied in the morphology of the pit point.
[0094] The quantitative relationship is used to represent the quantitative relationship between the image quality, the adjustment quality of the vision detection system and the adjustment offset of the vision system.
[0095] The adjustment quality of the vision detection system can be reflected in the image quality of the target image, that is, in the gray information and defect morphology of the target image.
[0096] The higher the adjustment quality of the vision detection system is, the better the adjustment effect is, and the better the corresponding imaging effect is.
[0097] It can be understood that, in actual execution, different emphases on the gray information and the defect morphology will affect the determination of the imaging quality of the target image, thereby affecting the determination of the adjustment quality.
[0098] In this step, by analyzing the change trend of the target background gray and the target three-dimensional defect defect contrast and morphology when the adjustment offset gradually increases, a quantitative index is designed to evaluate the adjustment quality.
[0099] By establishing the quantitative relationship among the gray information, the defect morphology adjustment quality and the adjustment offset, the quantitative relationship can be adjusted based on the emphasis on the gray information and the defect morphology, so as to more accurately determine the adjustment quality.
[0100] The inventors found in the research and development process that in the related art, there is a method of setting a target to collect a target image, and adjusting the setting angle of the camera based on the sharpness of the target image, but this method needs to detect the sharpness of the image by the subjective judgment of the detection personnel, and then manually adjust the setting angle based on the sharpness until the detection personnel considers that the sharpness meets the requirements. The large amount of manual operation and subjective judgment involved in this method will affect the final debugging effect, and it is difficult to ensure the consistency of the adjustment when a large number of vision detection system devices are installed and debugged.
[0101] In the present application, by establishing the quantitative relationship among the image quality, the adjustment quality of the vision detection system and the adjustment offset of the vision system, the adjustment quality of the vision detection system obtained by the quantitative relationship can be used to quantitatively and objectively evaluate the adjustment quality without subjective judgment of the detection personnel, thereby avoiding the influence of subjective judgment on the adjustment quality, improving the accuracy and precision of the evaluation, and effectively ensuring the consistency of the adjustment. In addition, by establishing the quantitative relationship, the repeated debugging process is also avoided, the debugging steps are reduced, and the adjustment efficiency is improved.
[0102] In addition, without changing the existing adjustment process, only the target imaging of the target point of the target is performed after the adjustment is completed, which is simple and convenient to operate.
[0103] According to the method for evaluating the installation and adjustment quality of the visual inspection system provided in the embodiments of the present application, the quantitative relationship among the image quality, the installation and adjustment quality of the visual inspection system, and the installation and adjustment offset of the visual system is established, so that the influence of subjective judgment on the installation and adjustment quality is avoided, the accuracy and precision of the evaluation are improved, the consistency of the appearance defect imaging of a single visual inspection system over time can be monitored, and the consistency of the appearance defect imaging among a plurality of visual inspection systems can be effectively improved, and the repeated debugging process is avoided, and the installation and adjustment efficiency in the installation and debugging of a large number of visual inspection system devices is significantly improved.
[0104] The implementation of step 140 is described below through specific embodiments.
[0105] In some embodiments, step 140 can include:
[0106] performing image processing on the target target image in the plurality of target images to determine the average gray scale and the pixel value standard deviation of the target target image;
[0107] determining the first dark pixel area and the second dark pixel area of the image feature corresponding to the pit point in the target target image based on the average gray scale and the pixel value standard deviation;
[0108] determining the target quantitative relationship corresponding to the target target image based on the first dark pixel area, the second dark pixel area, the emphasis factor, and the installation and adjustment quality;
[0109] The emphasis factor is used to represent the emphasis degree of the gray scale information and the defect morphology, and the target target image is a target target image acquired by the visual inspection system under a target installation and adjustment offset in a plurality of different installation and adjustment offsets.
[0110] In this embodiment, the target target image is a target target image acquired under a target installation and adjustment offset.
[0111] The target quantitative relationship is a quantitative relationship corresponding to the target installation and adjustment offset.
[0112] The emphasis factor is used to represent the emphasis degree of the gray scale information and the defect morphology, and can be customized based on actual conditions.
[0113] For example, in the case of paying more attention to the defect morphology, the emphasis ratio corresponding to the defect morphology can be appropriately increased, and in the case of paying more attention to the image gray scale, the emphasis ratio corresponding to the gray scale information can be appropriately increased.
[0114] For example, the emphasis factor can be set as λ, and the value of λ is 0-100.
[0115] In the actual execution process, the average gray scale of the target target image can be determined through the following formula:
[0116]
[0117] wherein, is the average gray scale of the target image; X(i,j) is the pixel value of the pixel point at the (i,j) position; W is the width of the target image; H is the height of the target image.
[0118] The pixel value standard deviation of the target image can be determined by the following formula:
[0119]
[0120] wherein, Var is the pixel value standard deviation of the target image; X(i,j) is the pixel value of the pixel point at the (i,j) position; is the average gray scale of the target image; W is the width of the target image; H is the height of the target image.
[0121] After the average gray scale and the pixel value standard deviation of the target image are determined, the target quantization relationship corresponding to the target image can be determined based on the average gray scale and the pixel value standard deviation.
[0122] In some embodiments, based on the average gray scale and the pixel value standard deviation, determining the first dark pixel area and the second dark pixel area of the image feature corresponding to the pit point in the target image can include:
[0123] determining a first threshold based on the difference between the average gray scale and the pixel value standard deviation of the target multiple;
[0124] determining the first dark pixel area based on the first threshold, the height of the target image and the width of the target image;
[0125] determining a second threshold based on the sum of the average gray scale and the pixel value standard deviation of the target multiple;
[0126] determining the second dark pixel area based on the second threshold, the height of the target image and the width of the target image.
[0127] In this embodiment, the target multiple can be based on user customization, such as being set to three times or four times, etc., which is not limited by the present application.
[0128] In actual execution process, taking the target multiple as three times as an example, the average gray scale minus three times the pixel value standard deviation can be used as the first threshold to calculate the dark pixel area of the pit point defect in the target image, as the first dark pixel area;
[0129] The average gray scale plus three times the pixel value standard deviation can be used as the second threshold to calculate the dark pixel area of the pit point defect in the target image, as the second dark pixel area.
[0130] For example, the first dark pixel area can be determined by the formula:
[0131]
[0132] wherein D is the first dark pixel area; X(i,j) is the pixel value of the pixel point at the (i,j) position; is the average gray scale of the target image; Var is the standard deviation of the pixel value of the target image.
[0133] The second dark pixel area can be determined by the formula:
[0134]
[0135] wherein L is the second dark pixel area; X(i,j) is the pixel value of the pixel point at the (i,j) position; is the average gray scale of the target image; Var is the standard deviation of the pixel value of the target image.
[0136] After obtaining the first dark pixel area and the second dark pixel area, the target quantization relationship corresponding to the target image can be determined based on the first dark pixel area, the second dark pixel area, the emphasis factor and the adjustment quality.
[0137] In some embodiments, determining the target quantization relationship corresponding to the target image based on the first dark pixel area, the second dark pixel area, the emphasis factor and the adjustment quality can include:
[0138] based on the formula:
[0139]
[0140] determining the target quantization relationship corresponding to the target image, wherein Z is the adjustment quality of the vision detection system under the target adjustment offset; D is the first dark pixel area; L is the second dark pixel area; λ is the emphasis factor; is the average gray scale.
[0141] In this embodiment, the value of λ is 0-100, which is used to represent the emphasis on the image gray scale or the defect morphology.
[0142] For example, when λ is 50, the adjustment quality evaluation of the target images under the adjustment offsets of 0 mm, 0.5 mm, 1 mm and 1.5 mm as shown in FIG. 8 is performed, and the evaluation results are 88, 70, 51 and 27, respectively; it can be seen that as the adjustment offset increases, the corresponding adjustment quality score gradually decreases, and the adjustment effect becomes worse. Figure 6
[0143] According to the method for evaluating the installation and adjustment quality of the visual inspection system provided in the embodiment, the quantization relationship among the gray information, the defect morphology, the installation and adjustment quality, and the installation and adjustment offset is established based on the emphasis factor, so that the quantization relationship can be adjusted according to the emphasis on the gray information and the defect morphology, and the installation and adjustment quality can be determined more accurately, which has high flexibility and a wide range of application scenarios.
[0144] In some embodiments, after step 140, the method can further include:
[0145] Based on the quantization relationship, determining the actual installation and adjustment quality of the to-be-tested visual inspection system;
[0146] Based on the actual installation and adjustment quality, adjusting the to-be-tested visual inspection system.
[0147] In this embodiment, the to-be-tested visual inspection system is a visual inspection system that needs to be tested for installation and adjustment offset in an actual detection process.
[0148] In actual application, by imaging the to-be-tested product and the target target on the same imaging surface, the actual installation and adjustment offset of the to-be-tested visual inspection system and the actual installation and adjustment quality under the actual installation and adjustment offset can be determined based on the target image of the target target, the quantization relationship, and the target image under the ideal installation and adjustment. In the case where the actual installation and adjustment quality is greatly different from the target installation and adjustment quality, it indicates that the actual installation and adjustment quality of the to-be-tested visual inspection system is poor, and the to-be-tested visual inspection system can be further adjusted based on the actual installation and adjustment offset to improve the installation and adjustment quality.
[0149] According to the method for evaluating the installation and adjustment quality of the visual inspection system provided in the embodiment, the actual installation and adjustment quality of the visual inspection system is determined through the quantization relationship, which is convenient for users to monitor the imaging state of a single device and find the difference between the defect presentation state and the initial state in time, reminding the user to calibrate the device or re-install and adjust, and realizing real-time dynamic monitoring of the defect presentation state in the use process.
[0150] The method for evaluating the installation and adjustment quality of the visual inspection system provided in the embodiment can be executed by the installation and adjustment quality evaluation device of the visual inspection system. In the embodiment, the method for evaluating the installation and adjustment quality of the visual inspection system is executed by the installation and adjustment quality evaluation device of the visual inspection system, which is used to illustrate the installation and adjustment quality evaluation device of the visual inspection system provided in the embodiment.
[0151] The embodiment of the present application also provides a device for evaluating the installation and adjustment quality of a visual inspection system.
[0152] As Figure 8As shown, the installation and adjustment quality evaluation device of the visual inspection system includes a first processing module 810, a second processing module 820, a third processing module 830, and a fourth processing module 840.
[0153] The first processing module 810 is configured to adjust system parameters of the visual inspection system to target parameters based on an imaging effect of a product image corresponding to the product to be detected acquired by the visual inspection system, so that the imaging effect is within a target range.
[0154] The second processing module 820 is configured to acquire a plurality of target images corresponding to a target target acquired by the visual inspection system under a plurality of different installation and adjustment offsets, the product to be detected and the target target being located on the same imaging surface, and the target target having a plurality of pits of different sizes on the surface thereof.
[0155] The third processing module 830 is configured to extract image features corresponding to the pits in the target images and determine a correlation between the image features and the installation and adjustment offsets.
[0156] The fourth processing module 840 is configured to quantitatively process the correlation to determine a quantitative relationship among image information of the target images, installation and adjustment quality of the visual inspection system, and the installation and adjustment offsets. The image information includes grayscale information and defect morphology.
[0157] According to the installation and adjustment quality evaluation device of the visual inspection system provided in the embodiments of the present application, the quantitative relationship among the image quality, the installation and adjustment quality of the visual inspection system, and the installation and adjustment offsets of the visual system is established, which avoids the influence of subjective judgment on the installation and adjustment quality, improves the accuracy and precision of the evaluation, can monitor the consistency of appearance defect imaging of a single visual inspection system over time, and can effectively improve the consistency of appearance defect imaging among a plurality of visual inspection systems. In addition, the repeated debugging process is avoided, and the installation and adjustment efficiency is significantly improved in the installation and debugging of a large number of visual inspection system devices.
[0158] In some embodiments, the fourth processing module 840 can be further configured to:
[0159] perform image processing on the target target images in the plurality of target images to determine average grayscale and pixel value standard deviation of the target target images;
[0160] determine first and second dark pixel areas of the image features corresponding to the pits in the target target images based on the average grayscale and the pixel value standard deviation;
[0161] determine a target quantitative relationship corresponding to the target target images based on the first and second dark pixel areas, the emphasis factor, and the installation and adjustment quality;
[0162] The emphasis factor is used to represent the emphasis degree of the gray information and the defect morphology, and the target target image is a target image acquired by the vision detection system under a target adjustment offset in multiple different adjustment offsets.
[0163] The adjustment quality evaluation device of the vision detection system provided by the embodiment of the application establishes a quantitative relationship between the gray information, the defect morphology, the adjustment quality and the adjustment offset based on the emphasis factor, so as to adjust the quantitative relationship based on the emphasis degree of the gray information and the defect morphology, thereby more accurately determining the adjustment quality and having higher use flexibility and a wider application scenario.
[0164] In some embodiments, the fourth processing module 840 can be further configured to:
[0165] Based on the formula:
[0166]
[0167] determine a target quantitative relationship corresponding to the target target image, wherein Z is the adjustment quality of the vision detection system under the target adjustment offset; D is the first dark pixel area; L is the second dark pixel area; and λ is the emphasis factor. The average gray level is the average gray level of the target target image.
[0168] In some embodiments, the fourth processing module 840 can be further configured to:
[0169] determine a first threshold based on the difference between the average gray level and the pixel value standard deviation of the target multiple;
[0170] determine the first dark pixel area based on the first threshold, the height of the target target image and the width of the target target image;
[0171] determine a second threshold based on the sum of the average gray level and the pixel value standard deviation of the target multiple;
[0172] determine the second dark pixel area based on the second threshold, the height of the target target image and the width of the target target image.
[0173] In some embodiments, the second processing module 820 can be further configured to:
[0174] acquire multiple initial images of a target target corresponding to the target target under the target adjustment offset in multiple different adjustment offsets of the vision detection system;
[0175] preprocess the multiple initial images to acquire at least one target image acquired by the vision detection system under the target adjustment;
[0176] acquire multiple target images based on the multiple different adjustment offsets.
[0177] In some embodiments, the apparatus can further include:
[0178] a fifth processing module, configured to determine the quantitative relationship between the image information of the target image, the installation and adjustment quality of the visual inspection system and the installation and adjustment offset after quantitatively processing the association relationship, and determine the actual installation and adjustment quality corresponding to the to-be-tested visual inspection system based on the quantitative relationship;
[0179] a sixth processing module, configured to adjust the to-be-tested visual inspection system based on the actual installation and adjustment quality.
[0180] According to the installation and adjustment quality evaluation apparatus of the visual inspection system provided in the embodiments of the present application, the actual installation and adjustment quality of the visual inspection system is determined through the quantitative relationship, which is convenient for a user to monitor the imaging state of a single device, to find the difference between the defect presentation state and the initial state in time, to remind the user to calibrate the device or to re-install and adjust, and to realize real-time dynamic monitoring of the defect presentation state in the use process.
[0181] The installation and adjustment quality evaluation apparatus of the visual inspection system in the embodiments of the present application can be an electronic device, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than the terminal. Illustratively, the electronic device can be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc., and can also be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., and the embodiments of the present application are not limited in this regard.
[0182] The installation and adjustment quality evaluation apparatus of the visual inspection system in the embodiments of the present application can be a device with an operating system. The operating system can be an Android operating system, an IOS operating system, or other possible operating systems, and the embodiments of the present application are not limited in this regard.
[0183] The installation and adjustment quality evaluation apparatus of the visual inspection system provided in the embodiments of the present application can achieve the following advantages: Figures 1 to 7The various processes implemented by the method embodiments of the visual inspection system quality evaluation method are not repeated here to avoid repetition.
[0184] In some embodiments, as shown in Figure 9 The electronic device 900 includes a processor 901, a memory 902, and a computer program stored in the memory 902 and executable on the processor 901. When the processor 901 executes the computer program, the various processes of the above-mentioned visual inspection system quality evaluation method are implemented, and the same technical effects are achieved. To avoid repetition, the details are not repeated here.
[0185] It should be noted that the electronic device in the embodiments of the present application includes the mobile electronic device and the non-mobile electronic device described above.
[0186] The embodiments of the present application also provide a non-transitory computer readable storage medium, which stores a computer program. When the computer program is executed by a processor, the various processes of the above-mentioned visual inspection system quality evaluation method are implemented, and the same technical effects are achieved. To avoid repetition, the details are not repeated here.
[0187] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes a computer readable storage medium, such as a computer readable memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0188] The embodiments of the present application also provide a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned visual inspection system quality evaluation method is implemented.
[0189] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes a computer readable storage medium, such as a computer readable memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0190] The embodiments of the present application also provide a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is configured to run a program or an instruction to implement the various processes of the above-mentioned visual inspection system quality evaluation method, and achieve the same technical effects. To avoid repetition, the details are not repeated here.
[0191] It should be understood that the chip mentioned in the embodiments of the present application can also be referred to as a system-level chip, a system chip, a chip system, or a system-on-chip chip, etc.
[0192] It should be noted that, in the present document, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises a", "comprising", or "comprises" does not, without more constraints, preclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element. Additionally, it should be noted that the terms "one embodiment", "some embodiments", "certain embodiments", "certain examples", or "some examples" as used in the present document are intended to refer to one or more embodiments or examples that do not necessarily have to cover all embodiments or examples of the present application. In other words, use of the above terms does not necessarily refer to the same embodiment or example. Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0193] From the above description of the embodiments, it is apparent that the above-described method of the embodiments can be realized by means of software and general-purpose hardware platforms, of course, but in many cases, the former is a better embodiment. Based on such an understanding, the technical solutions of the present application can be embodied in the form of a computer software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk) and includes a plurality of instructions for causing a terminal (which can be a mobile phone, a computer, a server, or a network device) to perform the methods described in the various embodiments of the present application.
[0194] The embodiments of the present application are described above with reference to the accompanying drawings, but the present application is not limited to the above-described specific embodiments, which are merely illustrative rather than restrictive, and a person of ordinary skill in the art can make many forms without departing from the scope of the present application and the scope of protection of the claims.
[0195] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "certain embodiments", "an example", "a specific example", or "some examples" means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described can be combined in any suitable manner in any one or more embodiments or examples.
[0196] While the embodiments of the application have been shown and described, it is to be understood that the embodiments can be varied, modified, substituted and changed by those skilled in the art without departing from the principles and spirit of the application, the scope of which is defined by the claims and their equivalents.
Claims
1. A method of evaluating the adjustment quality of a vision inspection system, characterized by, The method comprises the following steps: Based on the imaging effect of the product image corresponding to the product to be tested collected by the acquired visual inspection system, the system parameters of the visual inspection system are adjusted to target parameters, and the target parameters are used to make the imaging effect to the target range; Under the target parameters, a plurality of target images corresponding to a target target are acquired by the visual inspection system under a plurality of different installation and adjustment offsets, the product to be tested and the target target are located on the same imaging surface, and a plurality of pits with different sizes are provided on the surface of the target target; Extracting the image features corresponding to the pits in the target image, and determining the correlation between the image features and the installation and adjustment offset; Quantitative processing of the correlation relationship is carried out to determine the quantitative relationship between the image information of the target image, the installation and adjustment quality of the visual inspection system and the installation and adjustment offset; the image information includes gray information and defect morphology; The quantitative processing of the correlation relationship and the determination of the quantitative relationship between the image information of the target image, the installation and adjustment quality of the visual inspection system and the installation and adjustment offset include: Image processing is performed on the target target image in the plurality of target images to determine the average gray scale and pixel value standard deviation of the target target image; Based on the average gray scale and the pixel value standard deviation, the first dark pixel area and the second dark pixel area of the image features corresponding to the pits in the target target image are determined respectively; Based on the first dark pixel area, the second dark pixel area, the emphasis factor and the installation and adjustment quality, a target quantitative relationship corresponding to the target target image is determined; Wherein, the emphasis factor is used to represent the emphasis degree of the gray information and the defect morphology, and the target target image is the target image collected by the visual inspection system under the target installation and adjustment offset in the plurality of different installation and adjustment offsets; The determination of the target quantitative relationship corresponding to the target target image based on the first dark pixel area, the second dark pixel area, the emphasis factor and the installation and adjustment quality includes: Based on the formula: determining a target quantification relationship corresponding to the target target image, wherein Z is a mounting quality of the vision detection system under the target mounting deviation; D is the first dark pixel area; L is the second dark pixel area; and λ is the emphasis factor; is the average gray level.
2. The method of claim 1, wherein The determination of the first dark pixel area and the second dark pixel area of the image features corresponding to the pits in the target target image based on the average gray scale and the pixel value standard deviation includes: Determine a first threshold based on the difference between the average gray scale and the pixel value standard deviation of the target multiple; Determine the first dark pixel area based on the first threshold, the height of the target target image and the width of the target target image; Determine a second threshold based on the sum of the average gray scale and the pixel value standard deviation of the target multiple; Determine the second dark pixel area based on the second threshold, the height of the target target image and the width of the target target image.
3. The adjustment quality evaluation method of a vision inspection system according to claim 1 or 2, characterized in that, The acquisition of the plurality of target images corresponding to the target target by the visual inspection system under a plurality of different installation and adjustment offsets includes: Acquire a plurality of initial images corresponding to the target target collected by the visual inspection system under the target installation and adjustment offset in the plurality of different installation and adjustment offsets; Preprocess the plurality of initial images to obtain at least one target image captured by the vision detection system under the target adjustment; Based on the plurality of different adjustment offsets, obtain the plurality of target images.
4. The method of evaluating the adjustment quality of the vision inspection system according to claim 1 or 2, characterized in that, After the quantitative relationship between the image information of the target image, the adjustment quality of the vision detection system and the adjustment offset is determined by quantitatively processing the correlation, the method further comprises: Based on the quantitative relationship, determine the actual adjustment quality corresponding to the to-be-tested vision detection system; Based on the actual adjustment quality, adjust the to-be-tested vision detection system.
5. An apparatus for evaluating the adjustment quality of a vision inspection system, characterized by Comprise: The first processing module is used for adjusting the system parameters of the vision detection system to target parameters based on the imaging effect of the product image corresponding to the to-be-tested product captured by the vision detection system, the target parameters being used to make the imaging effect reach a target range; The second processing module is used for obtaining a plurality of target images corresponding to a target target captured by the vision detection system under a plurality of different adjustment offsets, respectively, the to-be-tested product and the target target being located on the same imaging surface, and a plurality of pits of different sizes being provided on the surface of the target target; The third processing module is used for extracting image features corresponding to the pits in the target images to determine the correlation between the image features and the adjustment offsets; The fourth processing module is used for quantitatively processing the correlation to determine a quantitative relationship between the image information of the target image, the adjustment quality of the vision detection system and the adjustment offset; the image information comprising grayscale information and defect morphology; The fourth processing module is used for: Image processing a target target image in the plurality of target images to determine the average grayscale and the pixel value standard deviation of the target target image; Based on the average grayscale and the pixel value standard deviation, respectively determine the first dark pixel area and the second dark pixel area of the image features corresponding to the pits in the target target image; Based on the first dark pixel area, the second dark pixel area, the emphasis factor and the adjustment quality, determine a target quantitative relationship corresponding to the target target image; The emphasis factor is used to represent the emphasis degree of the grayscale information and the defect morphology, and the target target image is a target image captured by the vision detection system under a target adjustment offset in the plurality of different adjustment offsets; The fourth processing module is used for: Based on the formula: determining a target quantification relationship corresponding to the target target image, wherein Z is a mounting quality of the vision detection system under the target mounting deviation; D is the first dark pixel area; L is the second dark pixel area; and λ is the emphasis factor; is the average gray level.
6. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to realize the adjustment quality evaluation method of the vision detection system according to any one of claims 1-4.
7. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the adjustment quality evaluation method of the vision detection system according to any one of claims 1-4.
8. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to realize the adjustment quality evaluation method of the vision detection system according to any one of claims 1-4.
Citation Information
Patent Citations
Multi-mode integrated test platform and test method of air-based photoelectric system
CN109612512A
Photographing method and apparatus, and electronic device
WO2022042753A1