Detection method and device of imaging system
By automatically processing the deviation of the target image feature recognition imaging system, the low accuracy and high cost problems caused by manual detection are solved, and efficient imaging system detection is achieved.
Patent Information
- Application Number
- CN202510197974.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-21
- Publication Date
- 2025-07-11
AI Technical Summary
The detection method of imaging systems in the prior art relies on manual judgment, resulting in low detection accuracy, consuming a lot of labor costs, and low detection efficiency.
By collecting target images and processing image features, identifying imaging deviations of the imaging system, outputting target execution strategy adjustment abnormal components, realizing automated spot inspection.
It improves the accuracy of the imaging system's point detection, saves labor costs, and improves detection efficiency.
Smart Images

Figure CN120298296A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of industrial inspection, and particularly relates to a method and device for inspecting an imaging system. Background Art
[0002] When performing industrial inspection on workpieces, such as defect detection, it is necessary to use an optical subsystem to image or identify defects. The debugging state of the imaging system directly determines the quality of defect imaging, thereby affecting the accuracy of defect identification. In related technologies, there is a method of manually checking the imaging system, but personnel with different levels of proficiency often have judgment deviations, resulting in a low detection accuracy rate, a large amount of labor costs, and low detection efficiency. Summary of the Invention
[0003] This application aims to at least solve one of the technical problems existing in the related technologies. For this purpose, this application provides a method and device for inspecting an imaging system, which improves the accuracy rate of checking the imaging system, saves a large amount of labor costs, and improves the detection efficiency.
[0004] In a first aspect, this application provides a method for inspecting an imaging system, the method including:
[0005] Obtaining at least one target image corresponding to a target collected by the imaging system; the target is placed within the field of view of the imaging system, and the target includes a plurality of detection regions;
[0006] Processing image features corresponding to the detection regions in the target image to obtain detection result information corresponding to the detection regions;
[0007] In the case where at least one of the detection result information is abnormal, outputting a target execution strategy based on the abnormal detection result information; the target execution strategy is used to indicate adjusting a component corresponding to the abnormal detection result information in the imaging system;
[0008] In the case where all the detection result information is normal, determining that the imaging system is normal.
[0009] According to the method for inspecting an imaging system provided by the embodiments of this application, by collecting target images of a target and based on the image features of each detection region on the target image, it is identified whether there is an imaging deviation of the target, and then based on the detection result information of each detection region, it is mapped whether there is an imaging deviation of the imaging system, so as to realize the inspection operation of the imaging system according to target imaging, improve the accuracy rate of checking the imaging system, save a large amount of labor costs, and improve the detection efficiency.
[0010] A detection method for an imaging system according to an embodiment of the present application, processing the image features corresponding to the detection area in the target image, and obtaining the detection result information corresponding to the detection area, including:
[0011] Processing the image features corresponding to the detection area, and obtaining at least one of the clarity, pixel accuracy, gray value, and shape information corresponding to the image features;
[0012] Based on at least one of the clarity, pixel accuracy, gray value, and shape information corresponding to the image features, obtaining the detection result information corresponding to the detection area.
[0013] A detection method for an imaging system according to an embodiment of the present application, obtaining the detection result information corresponding to the detection area based on at least one of the clarity, pixel accuracy, gray value, and shape information corresponding to the image features, including:
[0014] When the first target value among the clarity, the pixel accuracy, the gray value, and the shape information is qualified, determining that the component corresponding to the first target value is normal;
[0015] When the first target value among the clarity, the pixel accuracy, the gray value, and the shape information is unqualified, determining that the component corresponding to the first target value is abnormal, and detecting the second target value among the clarity, the pixel accuracy, the gray value, and the shape information;
[0016] Based on the detection result of the second target value, determining the abnormal component category corresponding to the first target value.
[0017] A detection method for an imaging system according to an embodiment of the present application, processing the image features corresponding to the detection area in the target image, and obtaining the detection result information corresponding to the detection area, including:
[0018] Based on the component categories corresponding to the respective detection areas, determining the target detection order;
[0019] Based on the target detection order, processing the image features corresponding to the detection area, and obtaining the detection result information corresponding to the detection area.
[0020] A detection method for an imaging system according to an embodiment of the present application, obtaining at least one target image corresponding to a target collected by the imaging system, including:
[0021] Based on the light source lighting sequence corresponding to at least one preset lighting condition, at least one target image corresponding to the target collected by the imaging system under the at least one preset lighting condition is obtained; different preset lighting conditions are formed based on different stroboscopic light sources.
[0022] In a detection method of an imaging system according to an embodiment of the present application, the processing of the image features corresponding to the detection area in the target image to obtain the detection result information corresponding to the detection area includes:
[0023] Based on the image features corresponding to the detection area, obtaining the illumination conditions to be measured corresponding to each of the target images;
[0024] The detection result information is obtained based on the lighting conditions to be measured corresponding to each of the target images and the lighting order of the light sources corresponding to the at least one preset lighting condition; the detection result information includes that the lighting order of at least one of the stroboscopic light sources is correct, or that the lighting order of at least one of the stroboscopic light sources is incorrect.
[0025] In a second aspect, the present application provides a detection device of an imaging system, comprising:
[0026] A first processing module is used to obtain at least one target image corresponding to the target collected by the imaging system; the target is placed within the field of view of the imaging system, and the target includes multiple detection areas;
[0027] A second processing module is used to process the image features corresponding to the detection area in the target image to obtain the detection result information corresponding to the detection area;
[0028] A third processing module is used to output a target execution strategy based on the abnormal detection result information when at least one of the detection result information is abnormal; the target execution strategy is used to instruct to adjust the component corresponding to the abnormal detection result information in the imaging system;
[0029] The fourth processing module is used to determine that the imaging system is normal when all the detection result information is normal.
[0030] According to the detection device of the imaging system provided in the embodiment of the present application, by acquiring the target image of the target and identifying whether the target has imaging deviation based on the image features of each detection area on the target image, and then mapping whether the imaging system has imaging deviation based on the detection result information of each detection area, the imaging system can be inspected according to the target imaging, thereby improving the inspection accuracy of the imaging system, saving a lot of labor costs, and improving the detection efficiency.
[0031] In a third aspect, the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the detection method of the imaging system as described in the first aspect above is implemented.
[0032] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the detection method of the imaging system as described in the first aspect above is implemented.
[0033] In a fifth aspect, the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, the detection method of the imaging system as described in the first aspect above is implemented.
[0034] One or more of the above technical solutions in the embodiments of the present application have at least one of the following technical effects:
[0035] By collecting the target image of the target and identifying whether there is an imaging deviation of the target based on the image features of each detection area on the target image, and then mapping whether there is an imaging deviation of the imaging system based on the detection result information of each detection area, so as to realize the spot inspection operation of the imaging system according to the target imaging, improve the spot inspection accuracy of the imaging system, save a large amount of labor costs, and improve the detection efficiency.
[0036] Furthermore, based on the first target value, it is first determined whether the components in the imaging system are normal, and in the case of determining that a component is abnormal, the type of the abnormal component is further determined according to the second target value, which improves the detection accuracy and detection efficiency, and reduces the maintenance cost.
[0037] Even further, by determining the target detection order according to the component type corresponding to each detection area and processing the image features corresponding to the detection area based on the target detection order, computing resources can be saved, the detection efficiency can be improved, and the situation of misdetection can be reduced, thereby improving the detection accuracy.
[0038] The additional aspects and advantages of the present application will be partly given in the following description, partly will become obvious from the following description, or will be understood through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The above and / or additional aspects and advantages of the present application will become obvious and easy to understand from the description of the embodiments in conjunction with the following drawings, where:
[0040] Figure 1 is one of the flow schematic diagrams of the detection method of the imaging system provided by the embodiments of the present application;
[0041] Figure 2It is one of the schematic diagrams of the principle of the detection method of the imaging system provided by the embodiments of the present application;
[0042] Figure 3 It is another schematic diagram of the principle of the detection method of the imaging system provided by the embodiments of the present application;
[0043] Figure 4 It is another schematic diagram of the process of the detection method of the imaging system provided by the embodiments of the present application;
[0044] Figure 5 It is a schematic diagram of the structure of the detection device of the imaging system provided by the embodiments of the present application;
[0045] Figure 6 It is a schematic diagram of the structure of the electronic device provided by the embodiments of the present application. Detailed Embodiments
[0046] Next, the technical solutions in the embodiments of the present application will be clearly described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application belong to the scope of protection of the present application.
[0047] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such data may 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. generally belong to the same category, and the number of objects is not limited. For example, the first object may 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 an "or" relationship between the associated objects before and after.
[0048] Next, in conjunction with the accompanying drawings, the detection method of the imaging system, the detection device of the imaging system, the electronic device, and the readable storage medium provided by the embodiments of the present application will be described in detail through specific embodiments and their application scenarios.
[0049] Among them, the detection method of the imaging system can be applied to a terminal, and can be specifically executed by hardware or software in the terminal.
[0050] The terminal includes, but is not limited to, portable communication devices such as mobile phones or tablet computers having a touch-sensitive surface (for example, a touch screen display and / or a touchpad). It should also be understood that in some embodiments, the terminal may not be a portable communication device, but a desktop computer having a touch-sensitive surface (for example, a touch screen display and / or a touchpad).
[0051] In each of the following embodiments, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, a mouse, and a joystick.
[0052] The detection method of the imaging system provided in the embodiments of the present application may be executed by an electronic device or a functional module or functional entity in the electronic device that can implement the detection method of the imaging system. The electronic devices mentioned in the embodiments of the present application include, but are not limited to, mobile phones, tablet computers, computers, cameras, and wearable devices, etc. Hereinafter, the detection method of the imaging system provided in the embodiments of the present application will be described by taking an electronic device as the execution subject.
[0053] As Figure 1 shown, the detection method of the imaging system includes: step 110, step 120, step 130, and step 140.
[0054] It should be noted that, as Figure 2 shown, the imaging system may include a light source device and a camera. Among them, the camera may be a black-and-white camera, and the image formed by the black-and-white camera is a grayscale image.
[0055] For example, the imaging system may include one camera and multiple light source devices. The light emission directions of the light source devices may hit the same place of the object to be measured, and then the reflected light is reflected back to the camera and received and imaged by the camera.
[0056] Step 110: Obtain at least one target image corresponding to the target collected by the imaging system;
[0057] In this step, the target is placed within the field of view of the imaging system, and the imaging system may collect a grayscale image of the target.
[0058] The target includes multiple detection regions, and the detection regions may include specific geometric shapes, patterns, or marks. For example, the target may include a checkerboard target, a dot array target, or other geometric figures with different shapes and different grayscales.
[0059] The imaging system may collect at least one target image corresponding to the target. For example, the target may be imaged multiple times under the same illumination condition, or the target may be imaged multiple times under different illumination conditions to obtain multiple target images.
[0060] The target image may be a grayscale image, and the grayscale values of the detection regions in the target image may be the same or different.
[0061] During the actual execution process, the target can be placed within the field of view of the imaging system, and the placement position information and orientation information of the target can be user-defined. For example, the target can be placed directly below the imaging system.
[0062] The parameters of the imaging system, such as focal length, exposure time, and white balance, can be adjusted according to the type and placement position of the target to ensure that high-quality target images can be captured.
[0063] The image of the target can be obtained through a camera or other image acquisition device. The acquired target image can be saved to a computer or other storage device, and the image quality can be checked to see if it meets the requirements.
[0064] In some embodiments, as Figure 3 shown, the target includes multiple different detection regions, and each detection region can include multiple geometric figures with different shapes and gray values.
[0065] The target can include gray scale bars with alternating different RGB colors. The color difference between adjacent gray blocks is relatively large, and the contrast between adjacent gray blocks is relatively high. The gray scale bars can be arranged vertically or horizontally, or can be user-defined. As Figure 3 shown, the gray scale bar can be set at the leftmost side of the target, and this detection region can be used to detect the contrast of the imaging system.
[0066] The target can include multiple triangles and multiple small square regions. Continuing to refer to Figure 3 , multiple small squares can be set at the vertices of the triangles, and multiple small squares are on the same straight line. This detection region can be used to determine whether the relative tilt angle between the imaging system and the target is qualified. For example, the characteristics of multiple small squares can be used to correct the relative tilt angle between the camera and the target in the static image acquisition state. When the target is not tilted or tilted slightly relative to the camera, 9 small square blocks can be seen in the target image; it can also be judged whether the target is tilted relative to the camera during dynamic image acquisition by calculating the angle between the connection line of the topmost and bottommost small square blocks and the vertical direction. For example, when the target is tilted relative to the camera during dynamic image acquisition, the connection line of the topmost and bottommost small square blocks cannot connect all the small square blocks.
[0067] Multiple large square blocks can be set at the topmost and right side of the target. For example, 5 horizontally arranged large square blocks can be set at the topmost of the target, and 5 vertically arranged large square blocks can be set on the right side of the target. Multiple large square blocks can be used to judge whether there are pixel accuracy changes in the movement direction and sensor direction of the imaging system.
[0068] For example, when the frequency of acquiring images by the imaging system in the moving direction exceeds the set acquisition frequency, the large square block in the imaging of the target will be compressed.
[0069] The target may further include a trapezoidal black block for judging the focusing state of the imaging system.
[0070] The target may further include gray scale bars. For example, they can be set on the rightmost side of the target, and can be used to judge the imaging uniformity of the imaging system in the sensor direction and calculate the imaging gray scale value.
[0071] A central cross detection area and a surrounding edge black frame can also be set at the center of the target, which can be used for the imaging system to focus and locate.
[0072] In some embodiments, the color of the gray scale bars of the target can be adjusted based on the material of the sample to be measured, so that the imaging gray scale value of the target is basically the same as that of the sample to be measured.
[0073] The target can also be scaled proportionally based on the size of the sample to be measured, so that the range covered by the target is basically the same as the imaging range of the sample to be measured.
[0074] A QR code can be paired with the target for the imaging system to identify the target and the target image corresponding to the target.
[0075] The QR code can have the unique identifier, size, gray scale bar information, etc. of the target.
[0076] When the imaging system recognizes the QR code, it can automatically send the target image of the target to the inspection algorithm process to detect the imaging system based on the target image.
[0077] Step 120: Process the image features corresponding to the detection area in the target image to obtain the detection result information corresponding to the detection area;
[0078] In this step, after acquiring the target image by image acquisition of the target, image feature extraction can be performed on the target image to obtain the image features corresponding to the detection area in the target image.
[0079] The image features can include color features, texture features, shape features, key points and local features, global features, and deep learning features, etc.
[0080] By processing the image features corresponding to the detection area, the detection result information corresponding to the detection area can be obtained.
[0081] The detection result information can include that the components in the imaging system are normal, or the components in the imaging system are abnormal. And when the detection result information includes that the components in the imaging system are abnormal, the detection result information can also include the abnormal component category information, etc.
[0082] Step 130, when at least one piece of detection result information is abnormal, output a target execution policy based on the abnormal detection result information;
[0083] In this step, based on the abnormal detection result information, it is possible to determine which component or components in the imaging system are abnormal, so as to output the corresponding target execution policy.
[0084] The target execution policy is used to indicate adjusting the component corresponding to the abnormal detection result information in the imaging system, and the target execution policy is used to indicate how to adjust or repair the abnormal component.
[0085] In some embodiments, after step 130, the detection method of the imaging system may further include:
[0086] Based on the target execution policy, adjust the component corresponding to the abnormal detection result information in the imaging system, and obtain a new target image corresponding to the target;
[0087] Process the image features corresponding to the detection area in the new target image, and obtain the detection result information corresponding to the detection area.
[0088] In this embodiment, the abnormal component can be adjusted correspondingly according to the target execution policy, and return to execute steps 110 to 130 until all the detection result information is normal.
[0089] Step 140, when all the detection result information is normal, determine that the imaging system is normal.
[0090] In this step, when the detection result information corresponding to all the detection areas is normal, it can be determined that the imaging system is normal.
[0091] When the imaging system is normal, the imaging system can perform industrial inspections on the workpiece to be measured, such as defect detection.
[0092] According to the detection method of the imaging system provided by the embodiments of the present application, by collecting the target image of the target, and based on the image features of each detection area on the target image, it is recognized whether there is an imaging deviation of the target, and then based on the detection result information of each detection area, it is mapped whether there is an imaging deviation of the imaging system, so as to realize the spot inspection operation of the imaging system according to the target imaging, improve the spot inspection accuracy of the imaging system, save a large amount of labor costs, and improve the detection efficiency.
[0093] In some embodiments, step 120 may include:
[0094] Process the image features corresponding to the detection area, and obtain at least one of the clarity, pixel accuracy, gray value, and shape information corresponding to the image features;
[0095] Obtain the detection result information corresponding to the detection area based on at least one of the clarity, pixel accuracy, gray value, and shape information corresponding to the image features.
[0096] In this embodiment, the clarity of the image can be evaluated by calculating the edge sharpness and high-frequency components of the image, etc.
[0097] Evaluate the accuracy at the pixel level by analyzing the resolution of the image and the spatial relationship between pixels.
[0098] The gray level of the pixels in the image can be measured by histogram analysis or gray-level co-occurrence matrix, etc.
[0099] The shape information may include the relative position relationship between specific gray blocks in the detection area. For example, the angle between the line connecting two gray blocks and the vertical or horizontal direction; the shape information may also include the imaging shape of specific gray blocks in the detection area. For example, the shape features corresponding to the detection area can be obtained by algorithms such as contour extraction or shape matching.
[0100] In some embodiments, obtaining the detection result information corresponding to the detection area based on at least one of the clarity, pixel accuracy, gray value, and shape information corresponding to the image features may include:
[0101] When the first target value among the clarity, pixel accuracy, gray value, and shape information is qualified, determine that the component corresponding to the first target value is normal;
[0102] When the first target value among the clarity, pixel accuracy, gray value, and shape information is unqualified, determine that the component corresponding to the first target value is abnormal, and detect the second target value among the clarity, pixel accuracy, gray value, and shape information;
[0103] Based on the detection result of the second target value, determine the abnormal component category corresponding to the first target value.
[0104] In this embodiment, the first target value can be any value among the clarity, pixel accuracy, gray value, and shape information.
[0105] It is possible to judge whether the first target value is qualified according to a preset standard or threshold, and different values correspond to different standards or thresholds.
[0106] When the first target value is qualified, determine that the component corresponding to the first target value is normal; when the first target value is unqualified, determine that the component corresponding to the first target value may be abnormal.
[0107] When the first target value is unqualified, the second target value can be detected, where the second target value can be any one of clarity, pixel accuracy, grayscale value, and shape information.
[0108] When the second target value is the same as the first target value, further judgment can be made based on other features of the characteristic value to determine the abnormal component category corresponding to the first target value.
[0109] Combining the detection results of the first target value and the second target value, as well as the structure and working principle of the imaging system, possible abnormal component categories can be analyzed, such as the angle of the light source device being unqualified, the camera being tilted, the parameters of the camera being unqualified, the lens being contaminated, the sensor failing, and problems with other mechanisms.
[0110] According to the detection method of the imaging system provided by the embodiments of the present application, first, it is determined whether the components in the imaging system are normal based on the first target value, and when it is determined that the components are abnormal, the abnormal component category is further determined according to the second target value, which improves the detection accuracy and efficiency, and reduces the maintenance cost.
[0111] As Figure 4 shown, in some embodiments, when the first target value includes clarity, the clarity is unqualified, and the second target value includes pixel accuracy, based on the detection result of the second target value, determining the abnormal component category corresponding to the first target value may include:
[0112] When it is determined that the pixel accuracy corresponding to the image feature is qualified, it is determined that the abnormal component category corresponding to the first target value is that the focusing ring rotates;
[0113] When it is determined that the pixel accuracy corresponding to the image feature is unqualified, it is determined that the abnormal component category corresponding to the first target value is that the camera is tilted, the stage pitches, the target is displaced, or the imaging component package is displaced.
[0114] In this embodiment, an image processing algorithm can be used to extract the clarity feature of the detection area and compare the clarity feature with a preset clarity standard or threshold. If the clarity is qualified, it is determined that the components of the imaging system are normal;
[0115] When the clarity is unqualified, an image processing algorithm is used to extract the pixel accuracy feature of the detection area and compare the pixel accuracy feature with a preset pixel accuracy standard or threshold. As Figure 3 shown, the pixel accuracy of the large square block set on the right side of the target can be extracted, and it can be determined whether the pixel accuracy of the large square block is qualified;
[0116] When the pixel accuracy is qualified, it can be determined that the abnormal component category is that the focusing ring rotates. Then, the state of the focusing ring can be manually checked, and the focusing ring can be rotated to the qualified range.
[0117] When the pixel accuracy is unqualified, it can be first detected whether the abnormal component category is camera tilt or stage pitch. For example, it can be manually checked whether the camera or the stage is horizontal. When it is determined that the camera or the stage is not in a horizontal state, it can be determined that the abnormal component category corresponding to the first target value is camera tilt or stage pitch. Then, the camera or the stage can be manually adjusted to a horizontal state.
[0118] When it is determined that both the camera and the stage are in a horizontal state, it can be checked whether the imaging component package or the target has been displaced. For example, it can be manually checked whether the front and rear adjustment handles are tightened, or whether the target has shifted. When it is determined that the abnormal component category corresponding to the first target value is that the target has been displaced or the imaging component package has been displaced, the target can be manually moved to the appropriate position, or the front and rear adjustment handles can be tightened.
[0119] In some embodiments, when the clarity is determined to be qualified, it can be detected whether the stage tilts left and right or whether the gripper tilts based on the shape information of the detection area.
[0120] In this embodiment, it can be determined whether the stage tilts left and right or whether the gripper tilts based on the triangular area in the target and the small square areas set at the vertices of the triangular area.
[0121] As Figure 3 shown, it can be determined whether the stage tilts left and right or whether the gripper tilts by calculating the angle between the line connecting the uppermost and lowermost small square blocks set at the vertices of the triangular area and the vertical direction;
[0122] For example, when the line connecting the uppermost and lowermost small square blocks passes through all the small square blocks set at the vertices of the triangular area, that is, when the angle between the line and the vertical direction is within the qualified range (e.g., the angle is 0), it can be determined that the stage does not tilt left and right, and the gripper does not tilt;
[0123] When the angle between the line connecting the uppermost and lowermost small square blocks and the vertical direction is not within the qualified range, it can be determined that the stage tilts left and right or the gripper tilts, and it can be manually adjusted.
[0124] In some embodiments, when it is determined that the angle between the line connecting the uppermost and lowermost small square blocks set at the vertices of the triangular area and the vertical direction is within the qualified range, it can be determined whether the state of the next component is qualified.
[0125] In this embodiment, based on the pixel accuracy of the large square block set above the target, it can be determined whether the camera has an overclocking phenomenon.
[0126] For example, in the case where the pixel accuracy of the large square block is unqualified, it can be determined that the camera has an overclocking phenomenon.
[0127] The camera can perform image acquisition based on the working frequency corresponding to the received external encoder signal. When the working frequency of the camera exceeds the set frequency, the large square block in the target image will be compressed, that is, the pixel accuracy of the large square block is unqualified.
[0128] In the case where the pixel accuracy of the large square block is qualified, it can be determined that the camera does not have an overclocking phenomenon. Based on the gray-scale information corresponding to the image features, it can be determined whether the aperture of the camera is qualified and whether the configuration of the light source device is qualified.
[0129] Continue to refer to Figure 4 , in some embodiments, when the first target value includes gray-scale information, the gray-scale information is unqualified, and the second target value includes gray-scale information, based on the detection result of the second target value, determining the abnormal component category corresponding to the first target value may include:
[0130] When the gray-scale information corresponding to the image features is less than the first threshold range and the degree of difference between the gray-scale information corresponding to the image features and the target mean value is within the second threshold range, it is determined that the abnormal component category corresponding to the first target value is that the aperture of the camera is not locked or the light-emitting intensity of the light source device is less than the target threshold;
[0131] When the gray-scale information corresponding to the image features is greater than the first threshold range and the degree of difference between the gray-scale information corresponding to the image features and the target mean value is within the second threshold range, it is determined that the abnormal component category corresponding to the first target value is that the light-emitting intensity of the light source device is greater than the target threshold;
[0132] When the degree of difference between the gray-scale information corresponding to the image features and the target mean value is not within the second threshold range, it is determined that the abnormal component category corresponding to the first target value is that the light-emitting angle of the light source device deviates from the set angle.
[0133] In this embodiment, as Figure 3 shown, the gray-scale values on the gray-scale bar on the right can be read, and the gray-scale values at each position can be fitted into a gray-scale curve;
[0134] When the gray-scale curve fluctuates within the first threshold range, it can be determined that there is no problem with the imaging of the target, and it can be determined that there is no problem with the imaging system.
[0135] In the case where the gray curve does not fluctuate within the first threshold range, the component category with an anomaly can be further determined based on the gray information.
[0136] The first threshold range can be user-defined, and the present application does not make any limitations.
[0137] In the case where the gray information is less than the first threshold range and the degree of difference between the gray information and the target mean value is within the second threshold range, that is, the imaging gray information of the detection area is relatively uniform, it can be determined that the anomaly component category corresponding to the first target value is that the aperture of the camera is not locked, or the luminous intensity of the light source device is less than the target threshold.
[0138] For example, it can be manually checked whether the aperture of the camera is locked. If it is determined that the aperture of the camera is not locked, the aperture can be adjusted to F4 and locked.
[0139] In the case where it is determined that the aperture of the camera is locked, it can be determined that the anomaly component category is that the luminous intensity of the light source device decreases. For example, the luminous time of the light source device can be decreased or the light source decays, and the luminous time of the light source device can be increased.
[0140] In the case where the gray information is greater than the first threshold range and the imaging gray information of the detection area is relatively uniform, it can be determined that the anomaly component category is that the luminous intensity of the light source device is greater than the target threshold. For example, the luminous time of the light source device can be increased, and the luminous time of the light source device can be decreased.
[0141] In the case where the degree of difference between the gray information and the target mean value is not within the second threshold range, that is, the imaging gray information of the detection area is not uniform, it can be determined that the anomaly component category is that the luminous angle of the light source device deviates from the set angle, and the luminous angle of the light source device can be manually adjusted.
[0142] In some embodiments, step 120 may include:
[0143] Determine the target detection order based on the component category corresponding to each detection area;
[0144] Process the image features corresponding to the detection area based on the target detection order to obtain the detection result information corresponding to the detection area.
[0145] In this embodiment, the component categories corresponding to each detection area may be different. The component categories may include the camera, light source device, stage, gripper, and other components in the imaging system.
[0146] The target detection order can be determined according to the component category corresponding to each detection area. The target detection order is used to determine the processing order of the detection area in the target image according to the detection priority of each component.
[0147] The image features corresponding to the detection regions can be processed according to the target detection order, and then the detection result information corresponding to the detection regions can be obtained. In the case where a component abnormality is detected, the abnormality can be resolved in a timely manner, and detection can be performed again based on the target detection order until the detection is qualified.
[0148] According to the detection method of the imaging system provided by the embodiments of the present application, the target detection order is determined based on the component categories corresponding to the detection regions, and the image features corresponding to the detection regions are processed based on the target detection order, which can save computing resources, improve the detection efficiency, and can reduce the situation of false detection, thereby improving the detection accuracy.
[0149] In some embodiments, step 110 may include:
[0150] Based on the lighting sequence of the light sources corresponding to at least one preset lighting condition, at least one target image corresponding to the target collected by the imaging system under at least one preset lighting condition is obtained.
[0151] In this embodiment, different preset lighting conditions are formed based on different stroboscopic light sources.
[0152] A plurality of stroboscopic light sources may be provided in the imaging system, and the plurality of stroboscopic light sources are lit in sequence. When the light source is lit, the imaging system collects the target image.
[0153] The plurality of stroboscopic light sources may include two white light sources and one infrared light source, and the lighting sequence of the infrared light source may be set between the two white light sources.
[0154] For example, the white light source 1 can be controlled to be lit first, and the white light source 2 and the infrared light source are controlled to be turned off. During the lighting of the white light source 1, the imaging system can be controlled to collect the target image;
[0155] Then the infrared light source can be controlled to be lit, and the white light source 1 and the white light source 2 are controlled to be turned off. During the lighting of the infrared light source, the imaging system can be controlled to collect the target image;
[0156] Finally, the white light source 2 can be controlled to be lit, and the white light source 1 and the infrared light source are controlled to be turned off. During the lighting of the white light source 2, the imaging system can be controlled to collect the target image.
[0157] During the industrial inspection process, the imaging of the white light source is used to present the three-dimensional information of the workpiece to be measured, and the imaging of the red light source can penetrate the blue film wrapped on the surface of the workpiece to be measured to obtain the information below the blue film.
[0158] In some embodiments, step 120 may include:
[0159] Based on the image features corresponding to the detection area, obtain the illumination conditions to be measured corresponding to each target image;
[0160] Based on the illumination conditions to be measured corresponding to each target image and the lighting sequence corresponding to at least one preset illumination condition, obtain the detection result information.
[0161] In this embodiment, by processing the image features corresponding to the detection area, the illumination conditions to be measured corresponding to the target image can be obtained.
[0162] Such as Figure 3 shown, the image features corresponding to the background gray area of the target can be obtained, and the illumination conditions to be measured corresponding to the target image can be obtained.
[0163] When the illumination conditions to be measured corresponding to the target images collected in sequence are white light, red light, and white light respectively, it can be determined that the lighting sequence of at least one stroboscopic light source is correct; otherwise, it can be determined that the lighting sequence of at least one stroboscopic light source is incorrect.
[0164] In this application, after the spot inspection starts, it is possible to first confirm whether the order of the light field is correct. When the order of the light field is correct, based on the defect determination of the light field, the correct light source can be corresponding, so as to ensure that the subsequent detection results are meaningful.
[0165] Next, the detection device of the imaging system provided in this application will be described. The detection device of the imaging system described below can be mutually corresponding and referenced with the detection method of the imaging system described above.
[0166] For the detection method of the imaging system provided in the embodiments of this application, the execution subject can be the detection device of the imaging system. In the embodiments of this application, taking the detection device of the imaging system executing the detection method of the imaging system as an example, the detection device of the imaging system provided in the embodiments of this application is described.
[0167] The embodiments of this application also provide a detection device for an imaging system.
[0168] Such as Figure 5 shown, the detection device of this imaging system includes: a first processing module 510, a second processing module 520, a third processing module 530, and a fourth processing module 540.
[0169] The first processing module 510 is configured to obtain at least one target image corresponding to the target collected by the imaging system; the target is placed within the field of view of the imaging system, and the target includes multiple detection areas;
[0170] The second processing module 520 is configured to process the image features corresponding to the detection area in the target image to obtain the detection result information corresponding to the detection area;
[0171] A third processing module 530, configured to output a target execution policy based on at least one abnormal detection result information; the target execution policy is used to indicate adjusting a component corresponding to the abnormal detection result information in the imaging system.
[0172] A fourth processing module 540, configured to determine that the imaging system is normal when all the detection result information is normal.
[0173] According to the detection device of the imaging system provided by the embodiments of the present application, by collecting a target image of a target and based on the image features of each detection area on the target image, it is identified whether there is an imaging deviation of the target, and then based on the detection result information of each detection area, it is mapped whether there is an imaging deviation of the imaging system, so as to realize the spot inspection operation of the imaging system according to the target imaging, improve the spot inspection accuracy of the imaging system, save a large amount of labor costs, and improve the detection efficiency.
[0174] In some embodiments, the second processing module 520 may further be configured to:
[0175] Process the image features corresponding to the detection area to obtain at least one of the clarity, pixel accuracy, gray value, and shape information corresponding to the image features;
[0176] Based on at least one of the clarity, pixel accuracy, gray value, and shape information corresponding to the image features, obtain the detection result information corresponding to the detection area.
[0177] In some embodiments, the second processing module 520 may further be configured to:
[0178] Determine that the component corresponding to the first target value is normal when the first target value among the clarity, pixel accuracy, gray value, and shape information is qualified;
[0179] Determine that the component corresponding to the first target value is abnormal when the first target value among the clarity, pixel accuracy, gray value, and shape information is unqualified, and detect the second target value among the clarity, pixel accuracy, gray value, and shape information;
[0180] Based on the detection result of the second target value, determine the abnormal component category corresponding to the first target value.
[0181] In some embodiments, the second processing module 520 may further be configured to:
[0182] Determine a target detection order based on the component categories corresponding to each detection area;
[0183] Process the image features corresponding to the detection area based on the target detection order to obtain the detection result information corresponding to the detection area.
[0184] In some embodiments, the first processing module 510 may also be used to:
[0185] Based on the light source lighting sequence corresponding to at least one preset lighting condition, at least one target image corresponding to the target collected by the imaging system under at least one preset lighting condition is acquired; different preset lighting conditions are formed based on different stroboscopic light sources.
[0186] In some embodiments, the second processing module 520 may also be used to:
[0187] Based on the image features corresponding to the detection area, the illumination conditions to be measured corresponding to each target image are obtained;
[0188] Based on the illumination conditions to be measured corresponding to each target image and the lighting order of the light sources corresponding to at least one preset illumination condition, the detection result information is obtained; the detection result information includes that the lighting order of at least one stroboscopic light source is correct, or the lighting order of at least one stroboscopic light source is incorrect.
[0189] The detection device of the imaging system in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than the terminal. Exemplary, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a palmtop computer, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) equipment, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobilepersonal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application is not specifically limited.
[0190] The detection device of the imaging system in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0191] The detection device of the imaging system provided in the embodiment of the present application can achieve Figures 1 to 4For the sake of brevity, the processes implemented in the method embodiments will not be described again here to avoid repetition.
[0192] In some embodiments, such as Figure 6 As shown, embodiments of the present application further provide an electronic device 600, including a processor 601, a memory 602, and a computer program stored on the memory 602 and executable on the processor 601. When the program is executed by the processor 601, it implements the processes of the detection method embodiments of the above imaging system and can achieve the same technical effects. For the sake of brevity, they will not be described again here.
[0193] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
[0194] On the other hand, the present application also provides a computer program product. The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the processes of the detection method embodiments of the above imaging system and can achieve the same technical effects. For the sake of brevity, they will not be described again here.
[0195] On yet another aspect, the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the processes of the detection method embodiments of the above imaging system and can achieve the same technical effects. For the sake of brevity, they will not be described again here.
[0196] On yet another aspect, embodiments of the present application further provide a chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the processes of the detection method embodiments of the above imaging system and can achieve the same technical effects. For the sake of brevity, they will not be described again here.
[0197] It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, system chip, chip system, or system-on-chip, etc.
[0198] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative effort.
[0199] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the related technology, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0200] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A detection method for an imaging system, characterized in that, include: Acquire at least one target image corresponding to the target acquired by the imaging system; The target is placed within the field of view of the imaging system, and the target includes a plurality of detection areas; Processing the image features corresponding to the detection area in the target image to obtain detection result information corresponding to the detection area; In the event that at least one of the detection result information is abnormal, outputting a target execution strategy based on the abnormal detection result information; The target execution strategy is used to instruct adjustment of the component corresponding to the abnormal detection result information in the imaging system; When all the detection result information is normal, it is determined that the imaging system is normal.
2. The detection method of the imaging system according to claim 1, wherein The processing of the image features corresponding to the detection area in the target image to obtain the detection result information corresponding to the detection area includes: Processing the image features corresponding to the detection area to obtain at least one of clarity, pixel accuracy, grayscale value and shape information corresponding to the image features; Based on at least one of the clarity, pixel accuracy, grayscale value and shape information corresponding to the image feature, the detection result information corresponding to the detection area is obtained.
3. The detection method of the imaging system according to claim 2, wherein The acquiring the detection result information corresponding to the detection area based on at least one of the clarity, pixel accuracy, grayscale value and shape information corresponding to the image feature includes: If the definition, the pixel accuracy, the grayscale value, and the first target value in the shape information are qualified, determining that the component corresponding to the first target value is normal; In the case where the clarity, the pixel accuracy, the grayscale value, and the first target value in the shape information are unqualified, determining that the component corresponding to the first target value is abnormal, and detecting the clarity, the pixel accuracy, the grayscale value, and the second target value in the shape information; Based on the detection result of the second target value, the abnormal component category corresponding to the first target value is determined.
4. The detection method of the imaging system according to any one of claims 1-3, characterized in that, The processing of the image features corresponding to the detection area in the target image to obtain the detection result information corresponding to the detection area includes: Determining a target detection order based on the component categories corresponding to the detection areas; The image features corresponding to the detection area are processed based on the target detection order to obtain detection result information corresponding to the detection area.
5. The detection method of the imaging system according to any one of claims 1-3, characterized in that, The acquiring at least one target image corresponding to the target acquired by the imaging system comprises: Based on the light source lighting sequence corresponding to at least one preset lighting condition, at least one target image corresponding to the target collected by the imaging system under the at least one preset lighting condition is obtained; different preset lighting conditions are formed based on different stroboscopic light sources.
6. The detection method of the imaging system according to claim 5, characterized in that, The processing of the image features corresponding to the detection area in the target image to obtain the detection result information corresponding to the detection area includes: Based on the image features corresponding to the detection area, obtaining the illumination conditions to be measured corresponding to each of the target images; Obtain the detection result information based on the illumination conditions to be measured corresponding to each of the target images and the lighting sequence of the light source corresponding to the at least one preset illumination condition; the detection result information includes that the lighting sequence of at least one of the stroboscopic light sources is correct, or the lighting sequence of at least one of the stroboscopic light sources is incorrect.
7. A detection device for an imaging system, characterized in that, Comprising: A first processing module, configured to obtain at least one target image corresponding to a target collected by the imaging system; The target is placed within the field of view of the imaging system, and the target includes a plurality of detection regions; A second processing module, configured to process the image features corresponding to the detection regions in the target image to obtain the detection result information corresponding to the detection regions; A third processing module, configured to output a target execution strategy based on the abnormal detection result information in the case where at least one of the detection result information is abnormal; The target execution strategy is used to indicate adjusting the component corresponding to the abnormal detection result information in the imaging system; A fourth processing module, configured to determine that the imaging system is normal when all the detection result information is normal.
8. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the detection method of the imaging system according to any one of claims 1-6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the detection method of the imaging system according to any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the detection method of the imaging system according to any one of claims 1-6.