CN115690103A - Product appearance detection method, device, equipment and storage medium - Google Patents

Product appearance detection method, device, equipment and storage medium Download PDF

Info

Publication number
CN115690103A
CN115690103A CN202211713071.7A CN202211713071A CN115690103A CN 115690103 A CN115690103 A CN 115690103A CN 202211713071 A CN202211713071 A CN 202211713071A CN 115690103 A CN115690103 A CN 115690103A
Authority
CN
China
Prior art keywords
image
product
appearance detection
processed
detected
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211713071.7A
Other languages
Chinese (zh)
Inventor
黄耀
卓壮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Aqiu Technology Co ltd
Original Assignee
Beijing Aqiu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Aqiu Technology Co ltd filed Critical Beijing Aqiu Technology Co ltd
Priority to CN202211713071.7A priority Critical patent/CN115690103A/en
Publication of CN115690103A publication Critical patent/CN115690103A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention belongs to the technical field of product detection, and discloses a product appearance detection method, a device, equipment and a storage medium. The method comprises the following steps: collecting product images of products to be detected through a camera; obtaining an image to be processed according to the product image; performing image extraction on each image to be processed according to an image processing strategy to obtain an appearance detection image; and performing appearance detection on each product to be detected according to the appearance detection image. By means of the method, the whole product image of each product to be detected is directly collected through the camera, then the image of the product is taken and extracted, the appearance detection image is obtained, finally, the appearance detection of the product is carried out according to the appearance detection image, so that the product detection can be carried out by directly collecting the whole image of the product, the image processing and the appearance detection are not needed to be carried out directly by dividing the area, the steps of an algorithm are reduced, and the efficiency of the product appearance detection is improved.

Description

Product appearance detection method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of product detection, in particular to a product appearance detection method, device, equipment and storage medium.
Background
With the intelligent improvement of industrial manufacturing, appearance detection equipment based on deep learning has more and more cases and landing scenes in an intelligent factory. With the development of appearance defect detection technology in industrial manufacturing and the expansion of the range of customer demands, demanding parties and manufacturers have increasingly high requirements on the efficiency of equipment. In some customer scenarios, the detection requirements extend towards large product, high accuracy.
However, the requirement on computational resources is higher in the appearance detection algorithm based on deep learning than that in the traditional algorithm, and on the other hand, the detection area of the target detection object is enlarged and the detection precision is unchanged. On the basis, the requirement on the detection efficiency is also provided. The design complexity of the appearance detection scheme is extremely high, and most of visual manufacturers or detection equipment system manufacturers in the market still meet the detection efficiency requirement of customers by increasing detection stations and equipment calculation power during scheme evaluation. However, such a method has the following disadvantages: 1) The product detection is divided into more work stations and areas, and the consistency of each part of the product is difficult to debug; 2) A plurality of sets of detection algorithms are required to be designed for testing and optimizing respectively, and the consistency of detection effects is difficult to achieve; 3) The hardware and labor cost of the whole scheme for landing is increased, the complexity of design and debugging is high, and resource waste is caused.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a product appearance detection method, a product appearance detection device, product appearance detection equipment and a storage medium, and aims to solve the technical problems that in the prior art, the appearance detection scheme needs to divide a plurality of areas for detection, so that the efficiency is low, and the task processing mode is long in time consumption.
In order to achieve the above object, the present invention provides a product appearance detection method, comprising the steps of:
collecting product images of products to be detected through a camera;
obtaining an image to be processed according to the product image;
performing image extraction on each image to be processed according to an image processing strategy to obtain an appearance detection image;
and performing appearance detection on each product to be detected according to the appearance detection image.
Optionally, the obtaining an image to be processed according to the product image includes:
continuously acquiring according to the product image to obtain a plurality of groups of copied frame data corresponding to each product to be detected;
and obtaining and processing a plurality of images to be processed corresponding to each product to be detected according to the copied frame data.
Optionally, the continuously acquiring the product images to obtain multiple sets of copied frame data corresponding to the products to be tested according to the product images includes:
obtaining frame data to be extracted corresponding to each product to be detected according to the product image;
obtaining copied frame data according to the frame data to be extracted, and releasing data pointer authority so as to acquire the next frame data;
and when the collection times reach a preset collection threshold value, stopping data collection and obtaining a plurality of groups of copied frame data corresponding to the products to be detected.
Optionally, the obtaining and processing the image according to the copied frame data to obtain a plurality of images to be processed corresponding to each product to be processed includes:
determining an extracted image corresponding to each product to be detected according to the copied frame data;
determining pixel pointer information and image format information according to the extracted image;
and converting the extracted image into a to-be-processed image in a target format according to the pixel pointer information and the image format information.
Optionally, the performing image extraction on each image to be processed according to an image processing policy to obtain an appearance detection image includes:
acquiring product quantity information of each product to be detected;
determining an image processing strategy according to the product quantity information;
and carrying out image region extraction on the image to be processed according to the image processing strategy to obtain an appearance detection image.
Optionally, the determining an image processing policy according to the product quantity information includes:
determining a plurality of simultaneous subtasks according to the product quantity information;
determining a drawing taking sequence according to the image to be processed;
determining the processing queue sequence of each subtask according to the graph taking sequence;
and according to the processing queue information, an image processing strategy is that every time when each subtask obtains an image to be processed, image area extraction is carried out on the image to be processed according to the processing queue sequence.
Optionally, the performing, according to the image processing policy, image region extraction on the image to be processed to obtain an appearance detection image includes:
acquiring image information of the image to be processed according to the image processing strategy;
cutting the image to be processed according to the image information to obtain an interested image;
blacking a target background area of each interested image by a preset method to obtain an image to be extracted;
and carrying out image region extraction on the image to be extracted to obtain an appearance detection image.
In addition, in order to achieve the above object, the present invention further provides a product appearance inspection apparatus, including:
the image acquisition module is used for acquiring product images of products to be detected through the camera;
the image taking module is used for taking images according to the product image to obtain an image to be processed;
the image extraction module is used for extracting images of the images to be processed according to the image processing strategy to obtain appearance detection images;
an appearance detection module for performing appearance detection of each product to be detected according to the appearance detection image
Further, to achieve the above object, the present invention also provides a product appearance inspection apparatus including: a memory, a processor and a product appearance detection program stored on the memory and executable on the processor, the product appearance detection program configured to implement the steps of the product appearance detection method as described above.
Furthermore, to achieve the above object, the present invention further provides a storage medium having a product appearance detection program stored thereon, which when executed by a processor implements the steps of the product appearance detection method as described above.
The method comprises the steps of collecting product images of products to be detected through a camera; obtaining an image to be processed according to the product image; performing image extraction on each image to be processed according to an image processing strategy to obtain an appearance detection image; and performing appearance detection on each product to be detected according to the appearance detection image. By the mode, the whole product image of each product to be detected is directly acquired through the camera, then the image of the product is taken and extracted to obtain the appearance detection image, and finally the appearance detection of the product is carried out according to the appearance detection image, so that the product detection can be carried out by directly acquiring the whole image of the product, the image processing and the appearance detection are directly carried out without dividing the region, the steps of an algorithm are reduced, and the efficiency of the product appearance detection is improved.
Drawings
Fig. 1 is a schematic structural diagram of a product appearance detection device of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a first embodiment of a method for inspecting appearance of a product according to the present invention;
FIG. 3 is a schematic diagram of a conventional camera design in an embodiment of a method for inspecting the appearance of a product according to the present invention;
FIG. 4 is a schematic diagram of an improved camera design in an embodiment of the method for inspecting the appearance of a product according to the invention;
FIG. 5 is a schematic diagram illustrating an operation flow of drawing operation in an embodiment of a product appearance inspection method according to the present invention;
FIG. 6 is a flowchart illustrating a second embodiment of a method for inspecting appearance of a product according to the present invention;
FIG. 7 is a flowchart illustrating a prior art image processing task in an embodiment of a method for detecting an appearance of a product according to the present invention;
FIG. 8 is a schematic diagram illustrating a flow of an image processing task according to a modification of an embodiment of the method for detecting the appearance of a product of the present invention;
fig. 9 is a block diagram of a product appearance inspection device according to a first embodiment of the present invention.
The implementation, functional features and advantages of the present invention will be further described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a product appearance detection device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the product appearance detecting apparatus may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (Wi-Fi) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory, or may be a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the product appearance inspection apparatus, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a product appearance detection program.
In the product appearance inspection apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 of the product appearance detection device according to the present invention may be provided in the product appearance detection device, and the product appearance detection device calls the product appearance detection program stored in the memory 1005 through the processor 1001 and executes the product appearance detection method according to the embodiment of the present invention.
An embodiment of the present invention provides a method for detecting an appearance of a product, and referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of the method for detecting an appearance of a product according to the present invention.
In this embodiment, the product appearance detection method includes the following steps:
step S10: and collecting the product image of each product to be detected through a camera.
It should be noted that the execution subject of the embodiment is an intelligent terminal with an information processing function, including but not limited to an intelligent terminal such as a computer and a notebook computer, and the embodiment is not limited thereto.
It should be understood that, in the existing scheme at present, the product is divided into a plurality of areas for image acquisition by adding the work stations, so that the consistency of each part of the product is difficult to debug, a plurality of sets of algorithms need to be designed to deal with different parts, and finally, the appearance of the product is detected. According to the scheme of the embodiment, the camera is used for directly collecting the whole product image of each product to be detected, then the image of the product is taken and extracted, the appearance detection image is obtained, and finally the appearance detection of the product is carried out according to the appearance detection image, so that the product detection can be carried out by directly collecting the whole image of the product, the image processing and the appearance detection are not required to be carried out directly by dividing the area, the steps of an algorithm are reduced, and the efficiency of the product appearance detection is improved.
In a specific implementation, a camera adopted in the prior art is shown in fig. 3, but a camera used in the prior art is a telecentric lens, and the number of stations is 6 (or more), while a scheme of the embodiment is shown in fig. 4, the scheme of the embodiment uses an FA lens, so that the field of view is wider compared with that of the telecentric lens, and appearance detection on a large-sized product can be realized by only needing fewer stations, so that a 6500W large-target-plane camera design is adopted in the design of multiple schemes in this matter hi; customizing a large-size customized light source, and keeping the integral uniformity; multiple exposures of the combined light source can be realized, and various defects can be detected by a single workstation.
It should be noted that the product to be tested may be an industrial product produced in any flow line, and the product to be tested in this embodiment may be at least one product that is different in a plurality of flow lines, and the number of the product to be tested is not limited in this embodiment.
Step S20: and obtaining an image to be processed according to the product image.
It should be understood that the image to be processed refers to a plurality of images obtained by taking and screenshot images of a product image according to frames, and the number of the images to be processed is not particularly limited.
Further, in order to accurately obtain the image to be processed, step S20 includes: continuously acquiring according to the product image to obtain a plurality of groups of copied frame data corresponding to each product to be detected; and drawing and processing the copied frame data to obtain a plurality of images to be processed corresponding to the products to be tested.
In a specific implementation, the copied frame data refers to data copied from frame data extracted from the product image.
It should be noted that, the obtaining of multiple sets of copied frame data corresponding to each product to be tested by continuously acquiring the product image means: and sequentially and continuously extracting a plurality of to-be-extracted frame data corresponding to each product to be detected from the product image, and copying the to-be-extracted frame data to obtain copied frame data.
It should be understood that obtaining and processing the image according to the copied frame data to obtain the multiple to-be-processed images corresponding to each to-be-detected product means: and finally, carrying out format conversion on the extracted image to obtain the image to be processed in the target format.
By the method, the extraction, the copying and the processing of the frame data are carried out on the product image, so that a plurality of images to be processed are obtained.
Further, in order to accurately copy and obtain copied frame data, the step of continuously acquiring multiple sets of copied frame data corresponding to each product to be tested according to the product image comprises: obtaining frame data to be extracted corresponding to each product to be detected according to the product image; obtaining copied frame data according to the frame data to be extracted, and releasing data pointer authority so as to acquire the next frame data; and when the collection times reach a preset collection threshold value, stopping data collection and obtaining a plurality of groups of copied frame data corresponding to the products to be detected.
In specific implementation, obtaining to-be-extracted frame data corresponding to each to-be-detected product according to the product image means: after the camera is initialized, starting image taking operation through a StartGrabbing () instruction, and finally obtaining frame data of a product image corresponding to each product to be detected through a GetimageBuffer () instruction to serve as the frame data to be extracted.
It should be noted that after a set of to-be-extracted frame data of a to-be-detected product is obtained from a product image, the to-be-extracted frame data is copied through a marshal. And when the collection times reach a preset collection threshold value, stopping continuous collection circulation, and obtaining the duplicated frame data corresponding to each product to be detected, namely obtaining multiple groups of duplicated frame data. Wherein the preset collection threshold is the same as the number of the product images.
By the method, the continuous collection of the copy frame data is realized, and the copy frame data can be extracted from each product image.
Further, in order to extract and convert the copied frame data into a format, the step of extracting and processing the copied frame data to obtain a plurality of images to be processed corresponding to each product to be tested comprises the following steps: determining an extracted image corresponding to each product to be detected according to the copied frame data; determining pixel pointer information and image format information according to the extracted image; and converting the extracted image into a to-be-processed image in a target format according to the pixel pointer information and the image format information.
It should be understood that, after the copy frame data is obtained, image extraction is performed by the Frameinfo instruction to obtain an extracted image, and the extracted image is added to the List of List < Frameinfo > () { } by the Add () instruction.
In specific implementation, after an extracted image is obtained, firstly, a pixel pointer and the current format of the image are determined, and then the extracted image in the memory is converted into a Himage format according to a gen _ image _ interested () instruction, so that an image to be processed in a target format is obtained. Specifically, as shown in fig. 5, the overall operation flow of the map fetching operation in the present embodiment is shown.
In this way, the image conversion of the extracted image is realized, so that the extracted image is converted into the to-be-processed image in the target format which can be subjected to region extraction.
Step S30: and carrying out image extraction on each image to be processed according to the image processing strategy to obtain an appearance detection image.
It should be noted that, after the image to be processed is obtained, region extraction and sequential processing of algorithm calculation need to be performed, and the order and manner of image processing are determined according to the image processing policy, so that image region extraction is performed to obtain an appearance detection image.
Step S40: and performing appearance detection on each product to be detected according to the appearance detection image.
It should be understood that after the appearance detection image is obtained, the calculation and the detection of the appearance of all the products to be detected are performed by the preset appearance detection algorithm.
In the embodiment, the product images of the products to be detected are collected through the camera; obtaining an image to be processed according to the product image; performing image extraction on each image to be processed according to an image processing strategy to obtain an appearance detection image; and performing appearance detection on each product to be detected according to the appearance detection image. By the mode, the whole product image of each product to be detected is directly acquired through the camera, then the image of the product is taken and extracted to obtain the appearance detection image, and finally the appearance detection of the product is carried out according to the appearance detection image, so that the product detection can be carried out by directly acquiring the whole image of the product, the image processing and the appearance detection are directly carried out without dividing the region, the steps of an algorithm are reduced, and the efficiency of the product appearance detection is improved.
Referring to fig. 6, fig. 6 is a flowchart illustrating a method for detecting the appearance of a product according to a second embodiment of the present invention.
Based on the first embodiment, the product appearance detection method of this embodiment includes, in step S30:
step S301: and acquiring the product quantity information of each product to be detected.
It should be noted that the product quantity information refers to the quantity of all products to be tested that are monitored and need to be subjected to appearance inspection in the solution of the present embodiment.
Step S302: and determining an image processing strategy according to the product quantity information.
It should be understood that the image processing policy refers to the relevant plan information such as the order of image processing, the queue and process sequence for each image to be processed.
Further, in order to accurately make an image processing policy, step S302 includes: determining a plurality of simultaneous subtasks according to the product quantity information; determining a drawing taking sequence according to the image to be processed; determining the processing queue sequence of each subtask according to the graph taking sequence; and according to the processing queue information, an image processing strategy is that every time when each subtask obtains an image to be processed, image area extraction is carried out on the image to be processed according to the processing queue sequence.
In specific implementation, the number of subtasks requiring simultaneous image processing is determined according to the number of products to be detected in the product number information, so as to generate a corresponding number of subtasks. And then determining the sequence of the images to be processed when the images to be processed are taken as the image taking sequence according to the images to be processed. And determining the processing queue sequence of all the subtasks according to the image taking sequence. The processing queue sequence refers to the sequence of processing queues in all subtasks, the processing queue refers to a queue for processing images to be processed of each product to be detected, and each image to be processed corresponds to one processing queue.
It should be noted that, when the image processing policy is to obtain the image to be processed every time each subtask fetches the image according to the processing queue information, performing image region extraction on the image to be processed according to the processing queue sequence means: firstly, each subtask carries out image taking operation to obtain an image to be processed, and then starts to carry out image processing and image area extraction every time one image to be processed is obtained.
It should be understood that, as shown in fig. 7, a queue processing manner in the prior art is shown, specifically, a queue is not used, and each camera corresponds to one product to be detected, so that a task of each camera is a sub-task, but an operation flow is to obtain one image to be processed by drawing and directly process the image, and then obtain a second image to be processed after the processing is finished. However, according to the scheme of this embodiment, as shown in fig. 8, a queue manner is adopted, different processing queues are established according to the number of images to be processed, then, each image to be processed is obtained by sequentially fetching images according to a time sequence, and after one image to be processed is obtained, one processing queue is started to perform processing operations such as image extraction, and the fetching of the next image to be processed is started at the same time, so that the processing time of the whole flow is saved.
By the method, multi-task parallel processing is realized, multiple groups of tasks are processed in parallel, time is changed in space, and overall time is reduced by improving the utilization rate of system resources of the industrial personal computer. Through a reasonable multi-task algorithm framework, the utilization rate of system resources is improved, the single running time of the system is reduced, and the purpose of changing space into time is achieved.
Step S303: and carrying out image region extraction on the image to be processed according to the image processing strategy to obtain an appearance detection image.
In the embodiment, each image to be processed is cut, then the background area is blackened, and finally the image area is extracted to obtain the appearance detection image.
Further, in order to obtain the appearance detection image, step S303 includes: acquiring image information of the image to be processed according to the image processing strategy; cutting the image to be processed according to the image information to obtain an interested image; blacking a target background area of each interested image by a preset method to obtain an image to be extracted; and carrying out image region extraction on the image to be extracted to obtain an appearance detection image.
It should be noted that the image information refers to information such as image size of each image to be processed, and then the image to be processed is cut according to the image information to obtain a plurality of interested images, that is, each image to be processed is composed of a plurality of interested images, and each interested image is input into subsequent processing as an independent image, so that the maximum precision can be reduced by subsequent image segmentation, the occupied video memory is reduced, and the model training time is also shortened.
It should be understood that, blacking out the target background area of each image of interest by a preset method, and obtaining the image to be extracted refers to: since the full-image mask cannot be used in the region extraction, the full-image mask cannot be followed to the next processing, so that the consistency of the product position in the subsequent segmentation is not high, the full-image mask cannot be used, and the problem that the background region calibrated in the interested image is blackened by a preset method can be solved. The preset method can be any algorithm for painting black images.
It should be noted that after the image to be extracted is obtained, the image region may be directly extracted to obtain a plurality of appearance detection images.
By the method, the image areas of the images to be extracted are extracted and processed, so that the AI model is highly uniformly adjusted, the areas are detected by masking the invalid areas, and the overall detection rate is improved.
The embodiment obtains the product quantity information of each product to be detected; determining an image processing strategy according to the product quantity information; and carrying out image region extraction on the image to be processed according to the image processing strategy to obtain an appearance detection image. By the mode, the image processing strategy is formulated according to the product quantity of the product to be detected, so that the image area extraction is carried out on the image to be processed according to the image processing strategy, the system resource utilization rate is improved through a reasonable multi-task algorithm framework, the single running time of the system is reduced, the purpose of changing time in space is achieved, the AI model is highly uniformly adjusted, the mask invalid detection area is formed, and the overall detection rate is improved.
In addition, an embodiment of the present invention further provides a storage medium, where a product appearance detection program is stored on the storage medium, and when executed by a processor, the product appearance detection program implements the steps of the product appearance detection method described above.
Since the storage medium adopts all technical solutions of all the embodiments described above, at least all the beneficial effects brought by the technical solutions of the embodiments described above are achieved, and are not described in detail herein.
Referring to fig. 9, fig. 9 is a block diagram of a first embodiment of the product appearance inspection apparatus according to the present invention.
As shown in fig. 9, the apparatus for detecting the appearance of a product according to an embodiment of the present invention includes:
and the image acquisition module 10 is used for acquiring product images of the products to be detected through the camera.
And the image taking module 20 is configured to take an image according to the product image to obtain an image to be processed.
And the image extraction module 30 is configured to perform image extraction on each to-be-processed image according to an image processing policy to obtain an appearance detection image.
And the appearance detection module 40 is used for performing appearance detection on each product to be detected according to the appearance detection image.
In the embodiment, the product images of the products to be detected are collected through the camera; obtaining an image to be processed according to the product image; performing image extraction on each image to be processed according to an image processing strategy to obtain an appearance detection image; and performing appearance detection on each product to be detected according to the appearance detection image. By the mode, the whole product image of each product to be detected is directly acquired through the camera, then the image is taken and extracted to obtain the appearance detection image, and finally the appearance detection of the product is carried out according to the appearance detection image, so that the product detection can be carried out by directly acquiring the whole image of the product, the image processing and the appearance detection are not required to be carried out directly by dividing the area, the steps of an algorithm are reduced, and the efficiency of the product appearance detection is improved.
In an embodiment, the image capture module 20 is further configured to perform continuous acquisition according to the product image to obtain multiple sets of copied frame data corresponding to each product to be tested; and drawing and processing the copied frame data to obtain a plurality of images to be processed corresponding to the products to be tested.
In an embodiment, the image capture module 20 is further configured to obtain to-be-extracted frame data corresponding to each to-be-detected product according to the product image; obtaining copied frame data according to the frame data to be extracted, and releasing data pointer authority so as to acquire the next frame data; and when the collection times reach a preset collection threshold value, stopping data collection and obtaining a plurality of groups of copied frame data corresponding to the products to be detected.
In an embodiment, the image extracting module 20 is further configured to determine, according to the copied frame data, an extracted image corresponding to each product to be detected; determining pixel pointer information and image format information according to the extracted image; and converting the extracted image into an image to be processed in a target format according to the pixel pointer information and the image format information.
In an embodiment, the image extraction module 30 is further configured to obtain product quantity information of each product to be tested; determining an image processing strategy according to the product quantity information; and carrying out image region extraction on the image to be processed according to the image processing strategy to obtain an appearance detection image.
In an embodiment, the image extraction module 30 is further configured to determine a plurality of simultaneous subtasks according to the product quantity information; determining a drawing taking sequence according to the image to be processed; determining the processing queue sequence of each subtask according to the graph taking sequence; and according to the processing queue information, an image processing strategy is that every time when each subtask obtains an image to be processed, image area extraction is carried out on the image to be processed according to the processing queue sequence.
In an embodiment, the image extraction module 30 is further configured to obtain image information of the image to be processed according to the image processing policy; cutting the image to be processed according to the image information to obtain an interested image; blacking a target background area of each interested image by a preset method to obtain an image to be extracted; and carrying out image region extraction on the image to be extracted to obtain an appearance detection image.
It should be understood that the above is only an example, and the technical solution of the present invention is not limited in any way, and in a specific application, a person skilled in the art may set the technical solution as needed, and the present invention is not limited thereto.
It should be noted that the above-described work flows are only exemplary, and do not limit the scope of the present invention, and in practical applications, a person skilled in the art may select some or all of them to achieve the purpose of the solution of the embodiment according to actual needs, and the present invention is not limited herein.
In addition, the technical details that are not described in detail in this embodiment may be referred to a product appearance detection method provided in any embodiment of the present invention, and are not described herein again.
Further, it is to be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g. a Read Only Memory (ROM)/RAM, a magnetic disk, and an optical disk), and includes several instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A product appearance detection method is characterized by comprising the following steps:
collecting product images of products to be detected through a camera;
obtaining an image to be processed according to the product image;
performing image extraction on each image to be processed according to an image processing strategy to obtain an appearance detection image;
and performing appearance detection on each product to be detected according to the appearance detection image.
2. The method of claim 1, wherein obtaining the image to be processed according to the product image comprises:
continuously acquiring according to the product image to obtain a plurality of groups of copied frame data corresponding to each product to be detected;
and drawing and processing the copied frame data to obtain a plurality of images to be processed corresponding to the products to be tested.
3. The method of claim 2, wherein the continuously acquiring according to the product image to obtain a plurality of sets of copied frame data corresponding to each product to be tested comprises:
obtaining frame data to be extracted corresponding to each product to be detected according to the product image;
obtaining copy frame data according to the frame data to be extracted, and releasing data pointer authority so as to acquire next frame data;
and when the collection times reach a preset collection threshold value, stopping data collection and obtaining a plurality of groups of copied frame data corresponding to the products to be detected.
4. The method of claim 2, wherein the obtaining and processing the image according to the duplicated frame data to obtain a plurality of images to be processed corresponding to each product to be detected comprises:
determining an extracted image corresponding to each product to be detected according to the copied frame data;
determining pixel pointer information and image format information according to the extracted image;
and converting the extracted image into a to-be-processed image in a target format according to the pixel pointer information and the image format information.
5. The method of claim 1, wherein the performing image extraction on each image to be processed according to an image processing policy to obtain an appearance detection image comprises:
acquiring product quantity information of each product to be detected;
determining an image processing strategy according to the product quantity information;
and carrying out image region extraction on the image to be processed according to the image processing strategy to obtain an appearance detection image.
6. The method of claim 5, wherein determining an image processing policy based on the product quantity information comprises:
determining a plurality of simultaneous subtasks according to the product quantity information;
determining an image taking sequence according to the image to be processed;
determining the processing queue sequence of each subtask according to the graph taking sequence;
and according to the processing queue information, an image processing strategy is defined as that when every subtask obtains an image to be processed, image area extraction is carried out on the image to be processed according to the processing queue sequence.
7. The method of claim 5, wherein the performing image region extraction on the image to be processed according to the image processing policy to obtain an appearance detection image comprises:
acquiring image information of the image to be processed according to the image processing strategy;
cutting the image to be processed according to the image information to obtain an interested image;
blacking a target background area of each interested image by a preset method to obtain an image to be extracted;
and carrying out image region extraction on the image to be extracted to obtain an appearance detection image.
8. A product appearance inspection device, characterized by comprising:
the image acquisition module is used for acquiring product images of products to be detected through the camera;
the image taking module is used for taking images according to the product image to obtain an image to be processed;
the image extraction module is used for extracting images of the images to be processed according to the image processing strategy to obtain appearance detection images;
and the appearance detection module is used for carrying out appearance detection on each product to be detected according to the appearance detection image.
9. A product appearance inspection apparatus, characterized in that the apparatus comprises: a memory, a processor, and a product appearance detection program stored on the memory and executable on the processor, the product appearance detection program configured to implement the product appearance detection method of any one of claims 1 to 7.
10. A storage medium having a product appearance detection program stored thereon, the product appearance detection program, when executed by a processor, implementing the product appearance detection method according to any one of claims 1 to 7.
CN202211713071.7A 2022-12-30 2022-12-30 Product appearance detection method, device, equipment and storage medium Pending CN115690103A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211713071.7A CN115690103A (en) 2022-12-30 2022-12-30 Product appearance detection method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211713071.7A CN115690103A (en) 2022-12-30 2022-12-30 Product appearance detection method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115690103A true CN115690103A (en) 2023-02-03

Family

ID=85055179

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211713071.7A Pending CN115690103A (en) 2022-12-30 2022-12-30 Product appearance detection method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115690103A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130182941A1 (en) * 2012-01-17 2013-07-18 Dainippon Screen Mfg. Co., Ltd. Appearance inspection apparatus and method
CN110102511A (en) * 2019-05-23 2019-08-09 北京阿丘机器人科技有限公司 A kind of vision detection system and method for product appearance
CN112802017A (en) * 2021-03-30 2021-05-14 佛山隆深机器人有限公司 Method and device for detecting product external qualification based on workbench
CN112964724A (en) * 2021-02-01 2021-06-15 苏州百迈半导体技术有限公司 Multi-target multi-zone visual detection method and system
CN115436394A (en) * 2022-08-29 2022-12-06 富翔精密工业(昆山)有限公司 Appearance defect detection system and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130182941A1 (en) * 2012-01-17 2013-07-18 Dainippon Screen Mfg. Co., Ltd. Appearance inspection apparatus and method
CN110102511A (en) * 2019-05-23 2019-08-09 北京阿丘机器人科技有限公司 A kind of vision detection system and method for product appearance
CN112964724A (en) * 2021-02-01 2021-06-15 苏州百迈半导体技术有限公司 Multi-target multi-zone visual detection method and system
CN112802017A (en) * 2021-03-30 2021-05-14 佛山隆深机器人有限公司 Method and device for detecting product external qualification based on workbench
CN115436394A (en) * 2022-08-29 2022-12-06 富翔精密工业(昆山)有限公司 Appearance defect detection system and method

Similar Documents

Publication Publication Date Title
CN109085174A (en) Display screen peripheral circuit detection method, device, electronic equipment and storage medium
CN114235759B (en) Defect detection method, device, equipment and computer readable storage medium
CN111309618A (en) Page element positioning method, page testing method and related device
JP2015518594A (en) Integrated interactive segmentation method using spatial constraints for digital image analysis
CN110941553A (en) Code detection method, device, equipment and readable storage medium
JP7337937B2 (en) Magnified Image Acquisition and Storage
CN114218052B (en) Service interaction diagram generation method, device, equipment and storage medium
CN111681738A (en) Pathological section scanning and analysis based integrated method, device, equipment and medium
CN114091688B (en) Computing resource obtaining method and device, electronic equipment and storage medium
CN114201144A (en) Micro service system construction method, device and medium based on domain-driven design
CN115690103A (en) Product appearance detection method, device, equipment and storage medium
CN112416301A (en) Deep learning model development method and device and computer readable storage medium
CN111950517A (en) Target detection method, model training method, electronic device and storage medium
CN116628250A (en) Image generation method, device, electronic equipment and computer readable storage medium
CN116012354A (en) Method, device, equipment and storage medium for detecting silk-screen defect of chip capacitor
JP2023115913A (en) Method and system for visual inspection of sensor chip
CN111538657B (en) Page overdrawing detection method and device, electronic equipment and readable medium
CN114357057A (en) Log analysis method and device, electronic equipment and computer readable storage medium
CN114693554A (en) Big data image processing method and system
CN111124862A (en) Intelligent equipment performance testing method and device and intelligent equipment
CN112257134A (en) Model management method and device and electronic equipment
CN114155367B (en) Method, device and equipment for detecting defects of printed circuit board and storage medium
CN113657230B (en) Method for training news video recognition model, method for detecting video and device thereof
CN112887481B (en) Image processing method and device
CN111143270B (en) Distance projection calculation method, device, calculation equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20230203

RJ01 Rejection of invention patent application after publication