Batch image data processing method and system for intelligent manufacturing production line
By matching and identifying the image to be recognized on the intelligent manufacturing production line with the template matching and recognition of the sliding window and moving step size, and dynamically adjusting the image processing parameters, the problems of low image processing efficiency and lack of dynamic optimization capabilities in the prior art are solved, and more efficient image processing effects are achieved.
Patent Information
- Application Number
- CN202510672593.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2045-05-23
AI Technical Summary
In the prior art, image processing efficiency is low and the ability to dynamically optimize batch image processing tasks is lacking.
By acquiring the images to be identified in the current detection batch, template matching recognition based on the sliding window and the moving step size is performed, and image processing parameters are dynamically adjusted, including using a smaller sliding window and moving step size in the defect area, and using a larger sliding window and moving step size in the defect-free area.
It improves image processing efficiency and effect, can adapt to the dynamic changes of batch images, and significantly improves image processing capabilities on the production line.
Smart Images

Figure CN120198858A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of data processing, and in particular, to a method and system for batch image data processing for an intelligent manufacturing production line. Background Art
[0002] With the development of the digital economy and artificial intelligence technologies, intelligent vision inspection systems have gradually become a key supporting technology in the field of industrial quality inspection. Through automated and high-precision image data processing technologies, defect detection can be performed on each product image collected in the production line, quickly identifying defect information such as defect types, defect contours, defect positions, and defect sizes on the product surface, thereby ensuring product quality consistency. Compared with traditional manual quality inspection, this technology significantly solves inherent defects such as subjective judgment deviations in manual inspection, fluctuations in missed inspection rates caused by visual fatigue, and attenuation of inspection efficiency in night production scenarios, improving production efficiency.
[0003] In related technologies, most image data processing methods process single images or batch images using pre-set image recognition processing methods. The image processing efficiency of this method is low, and it lacks the ability to dynamically optimize batch image processing tasks. Summary of the Invention
[0004] Embodiments of the present application provide a method and system for batch image data processing for an intelligent manufacturing production line, which solve the problems of low image processing efficiency and lack of dynamic optimization ability for batch image processing tasks in the prior art, and can adaptively adjust image processing parameters for batch images, improving image processing efficiency and effect.
[0005] In a first aspect, embodiments of the present application provide a method for batch image data processing for an intelligent manufacturing production line, the method including: Obtain a first image to be recognized among multiple images to be recognized included in the current detection batch; Perform template matching recognition on the first image to be recognized based on a first sliding window and a first moving step length to obtain a defect detection result of the first image to be recognized; In the case where the defect detection result indicates the existence of a defect, determine the position area of the defect, and perform corresponding area range calibration based on the position area; For the remaining images to be recognized in the current detection batch, perform first template matching recognition of the first sliding window and the first moving step length in the area where the area range calibration is located, and second template matching recognition of a second sliding window and a second moving step length in the area outside the area range calibration to obtain corresponding defect detection results, where the size of the second sliding window is larger than the size of the first sliding window, and the second moving step length is larger than the first moving step length.
[0006] Optionally, after obtaining the defect detection result of the first image to be recognized, the method further includes: When the defect detection result of the first image to be recognized indicates no defect, perform third template matching recognition on the remaining images to be recognized in the current detection batch based on a third sliding window and a third moving step length, so as to obtain the defect detection result corresponding to each image to be recognized, where the size of the third sliding window is larger than that of the first sliding window, and the third moving step length is larger than the first moving step length.
[0007] Optionally, determining the position area of the defect and performing corresponding area range calibration based on the position area includes: Determine the position area and defect type of the defect; Obtain a pre-set dilation range template according to the defect type, and perform area range calibration on the position area based on the position area and the dilation range template.
[0008] Optionally, before obtaining the pre-set dilation range template according to the defect type, the method further includes: Set different dilation range templates corresponding to different defect types of the pipeline products, where the dilation ranges of different dilation range templates are different.
[0009] Optionally, before performing second template matching recognition with a second sliding window and a second moving step length in an area other than the area range calibration, the method further includes: Determine the corresponding defect level according to the defect detection result, and obtain the image attribute parameters of the image to be recognized; Determine the second sliding window and the second moving step length according to the defect level and the image attribute parameters.
[0010] Optionally, after obtaining the corresponding defect detection result, the method further includes: Determine the number of images in the batch according to the defect detection result, as well as the corresponding initial sliding window and initial moving step length, so that when the number of images stored in the next batch reaches the number of images in the batch, defect recognition of the images to be recognized is performed based on the initial sliding window and the initial moving step length.
[0011] Optionally, before performing template matching recognition on the first image to be recognized based on a first sliding window and a first moving step length, the method further includes: Determine the target object area in the first image to be recognized; Correspondingly, performing template matching recognition on the first image to be recognized based on a first sliding window and a first moving step length includes: Perform template matching recognition on the target object area based on the first sliding window and the first moving step, and perform template matching recognition on the area outside the target object area based on the fourth sliding window and the fourth moving step, where the size of the fourth sliding window is larger than the size of the first sliding window, and the fourth moving step is larger than the first moving step.
[0012] In a second aspect, an embodiment of the present application further provides a batch image data processing system for an intelligent manufacturing production line. The system includes: An acquisition module, configured to acquire a first image to be recognized from multiple images to be recognized included in the current detection batch; An identification module, configured to perform template matching recognition on the first image to be recognized based on the first sliding window and the first moving step to obtain a defect detection result of the first image to be recognized; A calibration module, configured to determine the position area of the defect and perform corresponding area range calibration based on the position area when the defect detection result indicates the existence of a defect; The identification module is further configured to perform first template matching recognition of the first sliding window and the first moving step on the area where the area range calibration is located, and second template matching recognition of the second sliding window and the second moving step on the area outside the area range calibration for the remaining images to be recognized in the current detection batch, to obtain corresponding defect detection results, where the size of the second sliding window is larger than the size of the first sliding window, and the second moving step is larger than the first moving step.
[0013] In a third aspect, an embodiment of the present application further provides a batch image data processing device for an intelligent manufacturing production line. The device includes: One or more processors; A storage device configured to store one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the batch image data processing method for an intelligent manufacturing production line described in the embodiments of the present application.
[0014] In a fourth aspect, an embodiment of the present application further provides a non-volatile storage medium storing computer-executable instructions. The computer-executable instructions are configured to execute the batch image data processing method for an intelligent manufacturing production line described in the embodiments of the present application when executed by a computer processor.
[0015] Fifth aspect, an embodiment of the present application further provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor of the device reads and executes the computer program, so that the device executes the batch image data processing method for an intelligent manufacturing production line described in the embodiments of the present application.
[0016] In the embodiments of the present application, by obtaining a first image to be recognized among a plurality of images to be recognized included in the current detection batch; performing template matching recognition on the first image to be recognized based on a first sliding window and a first moving step to obtain a defect detection result of the first image to be recognized; in the case that the defect detection result indicates the existence of a defect, determining the position area of the defect and performing corresponding area range calibration based on the position area; for the remaining images to be recognized in the current detection batch, performing first template matching recognition of the first sliding window and the first moving step in the area where the area range calibration is located, and second template matching recognition of a second sliding window and a second moving step in the area outside the area range calibration to obtain corresponding defect detection results, where the size of the second sliding window is larger than the size of the first sliding window, and the second moving step is larger than the first moving step, the problems in the prior art of low image processing efficiency and lack of dynamic optimization ability for batch image processing tasks are solved, the image processing parameters of batch images can be adaptively adjusted, and the image processing efficiency and effect are improved. Description of the Drawings
[0017] Figure 1 It is a flowchart of a batch image data processing method for an intelligent manufacturing production line provided by an embodiment of the present application; Figure 2 It is a flowchart of a method for performing area range calibration of a defect position area provided by an embodiment of the present application; Figure 3 It is a flowchart of another batch image data processing method for an intelligent manufacturing production line provided by an embodiment of the present application; Figure 4 It is a structural block diagram of a batch image data processing system for an intelligent manufacturing production line provided by an embodiment of the present application; Figure 5 It is a structural schematic diagram of a batch image data processing device for an intelligent manufacturing production line provided by an embodiment of the present application. Detailed Embodiments
[0018] The following further elaborates on the embodiments of the present application in conjunction with the accompanying drawings and examples. It can be understood that the specific embodiments described herein are merely for explaining the embodiments of the present application, rather than limiting the embodiments of the present application. Additionally, it should be noted that for ease of description, only parts related to the embodiments of the present application are shown in the accompanying drawings, rather than all structures.
[0019] 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 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 generally of the same category, and do not limit the number of objects. For example, the first object can be one or multiple. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally indicates an "or" relationship between the associated objects before and after.
[0020] The batch image data processing method for an intelligent manufacturing production line provided by the embodiments of the present application can be used for product defect detection in an intelligent manufacturing production line. For the batch image data processing method for an intelligent manufacturing production line provided by the embodiments of the present application, the execution entity of each step can be a computer device, which refers to any electronic device with data calculation, processing, and storage capabilities, such as terminal devices like a PC (Personal Computer) or a tablet computer. The embodiments of the present application do not limit this.
[0021] Figure 1 It is a flowchart of a batch image data processing method for an intelligent manufacturing production line provided by the embodiments of the present application. As Figure 1 shown, it includes the following steps: Step S101: Obtain the first image to be recognized among multiple images to be recognized included in the current detection batch.
[0022] Among them, for the products on the production line, each batch is used as an object for batch image data processing. Optionally, each batch can be divided by a fixed number of images. For example, every 50 images are used as a batch. The current batch is the current batch that needs to perform batch image data processing. Among them, the images to be recognized are all the images that need to perform image data processing in the current batch, and the first image to be recognized is one of them. Optionally, the first image to be recognized can be the first image among the images in the current batch.
[0023] For the acquisition of images of the current detection batch, images of products on the assembly line can be captured by a fixedly installed camera and transmitted back to the platform center for storage. After that, the images can be retrieved from the storage location. Taking 20 images as a batch as an example, the camera captures images of products on each production line at the same position in sequence to obtain corresponding images, that is, the images to be recognized. After storage, when starting to detect the current batch, the 20 images are retrieved from the storage unit. And the first image to be recognized is obtained from them, and subsequent recognition processing is started.
[0024] Step S102: Perform template matching recognition on the first image to be recognized based on the first sliding window and the first moving step length to obtain the defect detection result of the first image to be recognized.
[0025] Among them, when performing defect detection on the first image to be recognized based on image processing, the method of template matching recognition is adopted. The principle of template matching recognition is: using the standard product image as a template and performing pixel-level comparison with the image to be inspected. For this application, a standard product image that meets the requirements and has no defects can be pre-shot as a template, such as a standard product image without defects such as missing labels, production dates, missing components, and dimensional problems, for defect detection of the image to be recognized.
[0026] Among them, when performing defect detection by the method of template matching recognition, a standard product image is prepared in advance. Optionally, it can be a high-definition image of a defect-free product, and the template image obtained after denoising, edge enhancement, etc. For the image to be recognized, the lighting conditions, viewing angle, and resolution of the image it captures are the same as those of the standard product. Specifically, during recognition, a set sliding window is moved on the image to be recognized according to the set step length. For the position where the window is located, the corresponding standard product image at that position is intercepted, and the similarity between the two is compared. Finally, based on the comparison result, it is determined whether there are defects. For example, if the production date or label is printed in the middle of the product in the standard product image, and it is recognized by the template recognition method that the production date or label is missing in the first image to be recognized, the corresponding defect detection result is that there are defects. Optionally, a defect detection result including the defect type and defect location can also be generated according to the specific defect detection situation.
[0027] In one embodiment, the sliding window and the moving step length used for template matching recognition are denoted as the first sliding window and the first moving step length.
[0028] Step S103: In the case where the defect detection result is that there are defects, determine the position area of the defect, and perform corresponding area range calibration based on the position area.
[0029] In one embodiment, when the defect detection result of the first image to be recognized is detected as having a defect by means of template recognition, the position area of the defect is correspondingly determined, and the corresponding area range calibration is performed based on the position area.
[0030] Figure 2 The flowchart of a method for calibrating the area range of the defect position area provided by the embodiment of the present application is as Figure 2 shown, and a specific area range calibration method is given, including: Step S1031: Determine the position area and defect type of the defect.
[0031] In one embodiment, when defect detection is performed by means of a template matching recognition algorithm, the position area of the defect determined may be the different part between the first image to be recognized and the standard product image. Correspondingly, when determining the defect type, the corresponding defect type may be recognized according to the specific difference situation. For example, if it is recognized that the product in the first image to be recognized lacks a label, the defect type is correspondingly determined as the missing type; if it is recognized that the product size in the first image to be recognized does not conform, the defect type is correspondingly determined as the size type. That is, the position area where the specific defect is located is determined by means of template matching, and the corresponding defect type is recognized. Optionally, the defect type can be judged by a pre-set defect detection template, where different defect detection templates correspond to different defect types. The defect detection template may be the recorded pixel difference situation. When the standard product image and the first image to be recognized are matched, the result is the similarity of the corresponding positions of the standard product image and the first image to be recognized determined based on each sliding window. For example, the result is normalized to the interval [-1, 1], and the closer the value from -1 to 1 is to 1, the higher the matching degree, that is, the similarity, and vice versa. Correspondingly, for the above calculation method, a similarity score is generated for each window position, and finally a response map with the same size as the first image to be recognized is obtained. The corresponding defect detection template is a map template with the same size as the first image to be recognized and containing the scores of each window position. Each template corresponds to a defect type. The response map of the first image to be recognized obtained by the foregoing recognition comparison is matched with each defect detection template, and the defect type corresponding to the defect detection template with the most consistent or closest match is determined as the defect type recognized in the current first image to be recognized.
[0032] Step S1032: Obtain a pre-set dilation range template according to the defect type, and perform area range calibration of the position area based on the position area and the dilation range template.
[0033] In one embodiment, corresponding expansion range templates are pre-set for different defect types, and the expansion ranges of different expansion range templates are different. The expansion range refers to a new range area obtained by expanding the position area where the defect is detected to cover the position area of the defect. Specifically, range expansion is performed according to the position area where the defect is located and the corresponding expansion range template to calibrate the area range of this position area.
[0034] Optionally, the expansion range template can be the specific number of expanded pixels. The process of calibrating the area range of the position area based on the position area and the expansion range template can be: taking each pixel point on each contour in the position area as the center and expanding the number of expanded pixels recorded in the expansion range template outward. After obtaining the new contour boundary, the composed range result is determined as the area range calibration. Exemplarily, taking the defect type as the missing type as an example, the corresponding number of expanded pixels can be 200 pixels; taking the defect type as the size type as an example, the corresponding number of expanded pixels can be 500 pixels.
[0035] Step S104: Perform first template matching recognition of the first sliding window with the first moving step in the area where the area range calibration is located and second template matching recognition of the second sliding window with the second moving step in the area outside the area range calibration for the remaining images to be recognized in the current detection batch, to obtain corresponding defect detection results, where the size of the second sliding window is larger than the size of the first sliding window, and the second moving step is larger than the first moving step.
[0036] In one embodiment, after calibrating the area range of the defect position of the first image to be recognized, correspondingly, for other remaining images to be recognized, different sliding windows and moving steps can be used for template matching recognition. Specifically, perform first template matching recognition of the first sliding window with the first moving step in the area where the area range calibration is located, that is, the size of the sliding window and the size of the moving step in this area are the same as those when performing template matching recognition on the first image to be recognized, while perform second template matching recognition of the second sliding window with the second moving step in the area outside the area range calibration, where the size of the second sliding window is larger than the size of the first sliding window, and the second moving step is larger than the first moving step. Thus, continuous relatively high-precision recognition of potential defect areas is achieved, while areas with a high probability of no defects are recognized in a relatively low-precision manner, so as to significantly improve the recognition efficiency and reduce the data calculation complexity. Exemplarily, the size of the first sliding window can be 30*30 pixels, and the first moving step can be 1; the size of the second sliding window can be 60*60 pixels, and the first moving step can be 2.
[0037] As can be seen from the above, by obtaining a first image to be recognized among multiple images to be recognized included in the current detection batch; performing template matching recognition on the first image to be recognized based on a first sliding window and a first moving step to obtain a defect detection result of the first image to be recognized; in the case where the defect detection result indicates the existence of a defect, determining the position area of the defect and performing corresponding area range calibration based on the position area; for the remaining images to be recognized in the current detection batch, performing first template matching recognition of the first sliding window and the first moving step in the area where the area range calibration is located, and second template matching recognition of a second sliding window and a second moving step in the area outside the area range calibration to obtain corresponding defect detection results, where the size of the second sliding window is larger than the size of the first sliding window, and the second moving step is larger than the first moving step, the problems in the prior art of low image processing efficiency and lack of dynamic optimization ability for batch image processing tasks are solved, and the image processing parameters for batch images can be adaptively adjusted to improve the image processing efficiency and effect.
[0038] In one embodiment, after obtaining the defect detection result of the first image to be recognized, it further includes: in the case where the defect detection result of the first image to be recognized indicates the non-existence of a defect, performing third template matching recognition on the remaining images to be recognized in the current detection batch based on a third sliding window and a third moving step to obtain defect detection results corresponding to each image to be recognized, where the size of the third sliding window is larger than the size of the first sliding window, and the third moving step is larger than the first moving step. Among them, if no defect is detected for the first image to be recognized, then third template matching recognition based on the third sliding window and the third moving step is performed on the remaining images in this batch, and the specific sizes of the third sliding window and the third moving step can be the same as the specific sizes of the second sliding window and the second moving step. Thus, efficient and computationally-saving defect detection can be achieved.
[0039] In one embodiment, the second sliding window and the second moving step can also be determined in a dynamic mode, that is, without using preset fixed values. Optionally, it can be: determining the corresponding defect level according to the defect detection result, obtaining the image attribute parameters of the image to be recognized, and determining the second sliding window and the second moving step according to the defect level and the image attribute parameters. Among them, different defect detection results correspond to different defect levels. An exemplary determination method can be to query a preset table according to the size of the defective area in the defect detection result to obtain the corresponding defect level. Correspondingly, when determining the specific sizes of the second sliding window and the second moving step, the determined defect level and the obtained image attribute parameters of the image to be recognized are jointly determined. Among them, the image attribute parameters can be, for example, the image resolution. An optional method for determining the second sliding window and the second moving step according to the defect level and the image attribute parameters can be: obtaining the second sliding window and the second moving step corresponding to the corresponding defect level and image attribute parameters through a pre-established mapping relationship table of the defect level, image attribute parameters, the second sliding window, and the second moving step as the finally dynamically determined values.
[0040] Figure 3 The flowchart of another batch image data processing method for an intelligent manufacturing production line provided by an embodiment of the present application is as Figure 3 shown, including: Step S301, obtaining a first image to be recognized in a plurality of images to be recognized included in the current detection batch.
[0041] Step S302, performing template matching recognition on the first image to be recognized based on a first sliding window and a first moving step to obtain a defect detection result of the first image to be recognized.
[0042] Step S303, when the defect detection result is that there is a defect, determining the position area of the defect and performing corresponding area range calibration based on the position area.
[0043] Step S304, for the remaining images to be recognized in the current detection batch, performing first template matching recognition of the first sliding window and the first moving step in the area where the area range calibration is located, and second template matching recognition of the second sliding window and the second moving step in the area outside the area range calibration, to obtain corresponding defect detection results, where the size of the second sliding window is larger than the size of the first sliding window, and the second moving step is larger than the first moving step.
[0044] Step S305: Determine the number of batch images, as well as the corresponding initial sliding window and initial moving step based on the defect detection result, for defect recognition of the image to be recognized based on the initial sliding window and the initial moving step when the number of images stored in the next batch reaches the number of batch images.
[0045] In one embodiment, after obtaining the defect detection result of the products in the current batch, the number of batch images is determined accordingly based on the defect detection result, and the number of batch images is used to determine the number of images processed simultaneously in one batch during subsequent batch processing. Optionally, the number of batch images can be determined according to the ratio of the defective products in the defect detection result of the current batch to the total number of products detected in this batch. For example, when the ratio is less than 5%, the corresponding number of batch images is a; when it is not less than 5%, the corresponding number of batch images is b, where the value of a is greater than b, and the specific values can be set according to requirements.
[0046] Correspondingly, the defect detection result of the products in this batch can also be used to determine the initial sliding window and initial moving step for template matching recognition of the first image to be recognized selected in the next batch based on this. An optional determination method can be, taking the ratio of the defective products to the total number of products detected in this batch in the defect detection result as an example, when the ratio is less than 5%, the corresponding initial sliding window and initial moving step are 60*60 pixels and 2; when it is not less than 5%, the corresponding initial sliding window and initial moving step are 30*30 pixels and 1.
[0047] As can be seen from the above, by obtaining the first image to be recognized among the multiple images to be recognized included in the current detection batch; performing template matching recognition on the first image to be recognized based on the first sliding window and the first moving step to obtain the defect detection result of the first image to be recognized; in the case where the defect detection result is that there is a defect, determining the position area of the defect and performing corresponding area range calibration based on the position area; for the remaining images to be recognized in the current detection batch, performing the first template matching recognition of the first sliding window and the first moving step in the area where the area range calibration is located, and the second template matching recognition of the second sliding window and the second moving step in the area outside the area range calibration to obtain the corresponding defect detection result, where the size of the second sliding window is larger than the size of the first sliding window, and the second moving step is larger than the first moving step, the problems in the prior art of low image processing efficiency and lack of dynamic optimization ability for batch image processing tasks are solved, and the image processing parameters of batch images can be adaptively adjusted to improve the image processing efficiency and effect.
[0048] In one embodiment, before performing template matching recognition on the first image to be recognized based on the first sliding window and the first moving step, it further includes: determining the target object region in the first image to be recognized; correspondingly, performing template matching recognition on the first image to be recognized based on the first sliding window and the first moving step includes: performing template matching recognition on the target object region based on the first sliding window and the first moving step, and performing template matching recognition on the region outside the target object region with a fourth sliding window and a fourth moving step, where the size of the fourth sliding window is larger than the size of the first sliding window, and the fourth moving step is larger than the first moving step. Exemplarily, the size of the fourth sliding window may be 60*60 pixels, and the fourth moving step may be 2. Among them, the target object region may be the region where the recognized product object is located, and the region outside the target region is the region in the image that does not contain the product object.
[0049] Figure 4 FIG. is a structural block diagram of a batch image data processing system for an intelligent manufacturing production line provided by an embodiment of the present application. The system is configured to execute the batch image data processing method for an intelligent manufacturing production line provided in the above embodiment, and has corresponding functional modules and beneficial effects for executing the method. As Figure 4 shown, the system includes: An acquisition module 101, configured to acquire a first image to be recognized from among a plurality of images to be recognized included in the current detection batch; A recognition module 102, configured to perform template matching recognition on the first image to be recognized based on the first sliding window and the first moving step to obtain a defect detection result of the first image to be recognized; A calibration module 103, configured to determine the position region of the defect and perform corresponding region range calibration based on the position region when the defect detection result indicates the existence of a defect; The recognition module 102 is further configured to perform first template matching recognition of the first sliding window and the first moving step on the region where the region range calibration is located, and second template matching recognition of a second sliding window and a second moving step on the region outside the region range calibration for the remaining images to be recognized in the current detection batch, to obtain corresponding defect detection results, where the size of the second sliding window is larger than the size of the first sliding window, and the second moving step is larger than the first moving step.
[0050] As described above, by obtaining a first image to be recognized among a plurality of images to be recognized included in the current detection batch; performing template matching recognition on the first image to be recognized based on a first sliding window and a first moving step length to obtain a defect detection result of the first image to be recognized; in the case that the defect detection result indicates the existence of a defect, determining a position area of the defect and performing corresponding area range calibration based on the position area; for the remaining images to be recognized in the current detection batch, performing first template matching recognition of the first sliding window and the first moving step length in the area where the area range calibration is located, and second template matching recognition of a second sliding window and a second moving step length in an area outside the area range calibration to obtain corresponding defect detection results, wherein the size of the second sliding window is larger than the size of the first sliding window, and the second moving step length is larger than the first moving step length, the problems of low image processing efficiency and lack of dynamic optimization ability for batch image processing tasks in the prior art are solved, and the image processing parameters of batch images can be adaptively adjusted to improve the image processing efficiency and effect.
[0051] In a possible embodiment, the recognition module is further configured to: After obtaining the defect detection result of the first image to be recognized, in the case that the defect detection result of the first image to be recognized indicates the non-existence of a defect, performing third template matching recognition on the remaining images to be recognized in the current detection batch based on a third sliding window and a third moving step length to obtain defect detection results corresponding to the respective images to be recognized, wherein the size of the third sliding window is larger than the size of the first sliding window, and the third moving step length is larger than the first moving step length.
[0052] In a possible embodiment, the calibration module is specifically configured to: Determine the position area and defect type of the defect; Obtain a pre-set expansion range template according to the defect type, and perform area range calibration of the position area based on the position area and the expansion range template.
[0053] In a possible embodiment, the calibration module is further configured to: Before obtaining the pre-set expansion range template according to the defect type, set different expansion range templates corresponding to different defect types of pipeline products, wherein the expansion range sizes of different expansion range templates are different.
[0054] In a possible embodiment, the recognition module is further configured to: Before the second template matching recognition of the second sliding window and the second moving step size in the area outside the calibrated area range, determine the corresponding defect level according to the defect detection result, and obtain the image attribute parameters of the image to be recognized; Determine the second sliding window and the second moving step size according to the defect level and the image attribute parameters.
[0055] In a possible embodiment, the recognition module is further configured to: After obtaining the corresponding defect detection result, determine the batch image quantity, as well as the corresponding initial sliding window and initial moving step size, for performing defect recognition on the image to be recognized based on the initial sliding window and the initial moving step size when the number of images stored in the next batch reaches the batch image quantity.
[0056] In a possible embodiment, the calibration module is further configured to: Before performing template matching recognition on the first image to be recognized based on the first sliding window and the first moving step size, determine the target object area in the first image to be recognized; The recognition module is specifically configured to: Perform template matching recognition on the target object area based on the first sliding window and the first moving step size, and perform template matching recognition on the area outside the target object area based on the fourth sliding window and the fourth moving step size, where the size of the fourth sliding window is larger than the size of the first sliding window, and the fourth moving step size is larger than the first moving step size.
[0057] Figure 5 The following is a schematic structural diagram of a batch image data processing device for an intelligent manufacturing production line provided by an embodiment of the present application, as Figure 5 shown. The device includes a processor 201, a memory 202, an input device 203, and an output device 204; the number of processors 201 in the device can be one or more, Figure 5 taking one processor 201 as an example; the processor 201, the memory 202, the input device 203, and the output device 204 in the device can be connected through a bus or other means, Figure 5Take the bus connection as an example. The memory 202, as a computer-readable storage medium, can be configured to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the batch image data processing method for an intelligent manufacturing production line in the embodiments of the present application. The processor 201 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 202, that is, implements the above-mentioned batch image data processing method for an intelligent manufacturing production line. The input device 203 can be configured to receive input digital or character information and generate key signal inputs related to the user settings and function control of the device. The output device 204 may include display devices such as a display screen.
[0058] The embodiments of the present application also provide a non-volatile storage medium containing computer-executable instructions, which are configured to execute a batch image data processing method for an intelligent manufacturing production line described in the above embodiments when executed by a computer processor, and include: Obtain a first image to be recognized among multiple images to be recognized included in the current detection batch; Perform template matching recognition on the first image to be recognized based on a first sliding window and a first moving step length to obtain a defect detection result of the first image to be recognized; In the case where the defect detection result indicates the existence of a defect, determine the position area of the defect and perform corresponding area range calibration based on the position area; For the remaining images to be recognized in the current detection batch, perform first template matching recognition of the first sliding window and the first moving step length in the area where the area range calibration is located, and second template matching recognition of a second sliding window and a second moving step length in the area outside the area range calibration to obtain corresponding defect detection results, where the size of the second sliding window is larger than the size of the first sliding window, and the second moving step length is larger than the first moving step length.
[0059] It should be noted that in the embodiments of the above-mentioned batch image data processing system for an intelligent manufacturing production line, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for easy distinction and are not configured to limit the protection scope of the embodiments of the present application.
[0060] In some possible embodiments, various aspects of the method provided in this application can also be implemented in the form of a program product, which includes program code. When the program product runs on a computer device, the program code is configured to cause the computer device to execute the steps in the methods according to various exemplary embodiments of this application described above in this specification. For example, the computer device can execute the batch image data processing method for an intelligent manufacturing production line recorded in the embodiments of this application. The program product can be implemented using any combination of one or more readable media.
Claims
1. A method for processing batch image data in an intelligent manufacturing production line, characterized in that, Including: Obtain a first image to be recognized among multiple images to be recognized included in the current detection batch; Perform template matching recognition on the first image to be recognized based on a first sliding window and a first moving step length to obtain a defect detection result of the first image to be recognized; In the case that the defect detection result indicates the existence of a defect, determine the position area of the defect, and perform corresponding area range calibration based on the position area; For the remaining images to be recognized in the current detection batch, perform first template matching recognition of the first sliding window and the first moving step length in the area where the area range calibration is located, and second template matching recognition of a second sliding window and a second moving step length in the area outside the area range calibration, to obtain corresponding defect detection results, where the size of the second sliding window is larger than the size of the first sliding window, and the second moving step length is larger than the first moving step length.
2. The batch image data processing method for an intelligent manufacturing production line according to claim 1, wherein After obtaining the defect detection result of the first image to be recognized, it further includes: In the case that the defect detection result of the first image to be recognized indicates the non-existence of a defect, perform third template matching recognition on the remaining images to be recognized in the current detection batch based on a third sliding window and a third moving step length to obtain defect detection results corresponding to each image to be recognized, where the size of the third sliding window is larger than the size of the first sliding window, and the third moving step length is larger than the first moving step length.
3. The batch image data processing method for an intelligent manufacturing production line according to claim 1, characterized in that The determining the position area of the defect and performing corresponding area range calibration based on the position area includes: Determine the position area and defect type of the defect; Obtain a pre-set expansion range template according to the defect type, and perform area range calibration of the position area based on the position area and the expansion range template.
4. The batch image data processing method for an intelligent manufacturing production line according to claim 3, characterized in that, Before obtaining the pre-set expansion range template according to the defect type, it further includes: Correspondingly set different expansion range templates according to different defect types of pipeline products, where the expansion range sizes of different expansion range templates are different.
5. The batch image data processing method for an intelligent manufacturing production line according to any one of claims 1-4, characterized in that Before the second template matching recognition of the second sliding window and the second moving step length in the area outside the area range calibration, it further includes: Determine a corresponding defect grade according to the defect detection result, and obtain image attribute parameters of the image to be recognized; Determine the second sliding window and the second moving step length according to the defect grade and the image attribute parameters.
6. The batch image data processing method for an intelligent manufacturing production line according to any one of claims 1-4, characterized in that, After obtaining the corresponding defect detection result, it further includes: Determine the number of images in the batch and corresponding initial sliding window and initial moving step length, for the case where the number of images stored in the next batch reaches the number of images in the batch, perform defect recognition of the images to be recognized based on the initial sliding window and the initial moving step length.
7. The batch image data processing method for an intelligent manufacturing production line according to any one of claims 1-4, characterized in that, Before performing template matching recognition on the first image to be recognized based on the first sliding window and the first moving step length, it further includes: Determine the target object area in the first image to be recognized; Correspondingly, the template matching recognition of the first image to be recognized based on the first sliding window and the first moving step includes: Performing template matching recognition on the target object area based on the first sliding window and the first moving step, and performing template matching recognition on the area outside the target object area with a fourth sliding window and a fourth moving step, wherein the size of the fourth sliding window is larger than that of the first sliding window, and the fourth moving step is larger than the first moving step.
8. A batch image data processing system for an intelligent manufacturing production line, characterized in that, It includes: An acquisition module, configured to acquire the first image to be recognized among multiple images to be recognized included in the current detection batch; A recognition module, configured to perform template matching recognition on the first image to be recognized based on the first sliding window and the first moving step to obtain a defect detection result of the first image to be recognized; A calibration module, configured to determine the position area of the defect and perform corresponding area range calibration based on the position area when the defect detection result indicates the existence of a defect; The recognition module is further configured to perform first template matching recognition of the first sliding window and the first moving step on the area where the area range calibration is located, and second template matching recognition of a second sliding window and a second moving step on the area outside the area range calibration for the remaining images to be recognized in the current detection batch, to obtain corresponding defect detection results, wherein the size of the second sliding window is larger than that of the first sliding window, and the second moving step is larger than the first moving step.
9. A batch image data processing device for an intelligent manufacturing production line, characterized in that, The device includes: one or more processors; a storage device, configured to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the batch image data processing method for an intelligent manufacturing production line as described in any one of claims 1-7.
10. A storage medium storing computer-executable instructions, characterized in that, The computer-executable instructions are used to execute the batch image data processing method for an intelligent manufacturing production line as described in any one of claims 1-7 when executed by a computer processor.
Citation Information
Patent Citations
Surface defect detection method and system, electronic equipment and storage medium
CN115063357A
Product surface defect detection method and device, storage medium and electronic equipment
CN117078665A
Method, system and equipment for acquiring microscopic image without dead angle based on oral environment
CN118512141A
Image rotation display method and device
CN119941519A
Face detecting method and apparatus
KR1020170087817A
Cited By
Zipper puller blockage visual identification method of full-automatic zipper puller penetrating machine
CN121033045A
Zipper puller plug visual identification method of full-automatic zipper threading machine
CN121033045B
Automobile part quality detection method and system based on machine learning
CN121544540A
Machine learning based method and system for quality detection of automotive parts
CN121544540B