Image sample production method and system, computer-readable storage medium, and device
Patent Information
- Application Number
- CN202210257339.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-16
- Publication Date
- 2026-09-04
- Estimated Expiration
- 2042-03-16
AI Technical Summary
为了确保模型的准确和检测结果的正确性,需要包括封胶区域实际情况的大量样本,然而获取正常样本相对容易,现实中封胶区域的某些变化往往是显示面板封胶后的后续工艺步骤带来的特征变化,因而,若采用现场采集的方式进行样本制作,获取具有一定变化甚至是异常的样本则需要一定时间,从而完成样本采集的时间跨度非常长
[0032] This invention addresses existing problems by providing an image creation method, an image sample creation system, a computer-readable storage medium, and a computer device. Using an original sample image comprising a sealed area, a non-sealed area, and multiple metal lines, and employing a point on each metal line as a starting point to extract and copy a first image region, and updating a second image region using the first image region as a starting point on another point on the metal line, this invention enables the rapid creation of multiple image samples with identical local and overall textures from the current original sample image. This significantly reduces the preparation time for initial image samples in industrial inspection, lowers product costs, and has broad application prospects.
Smart Images

Figure CN114627203B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to an image creation method, an image sample creation system, a computer-readable storage medium, and a computer device. Background Technology
[0002] In industrial inspection, especially in the quality inspection of display panels, it is necessary to check whether the sealant meets the requirements. With the development of artificial intelligence technology, its advantages in image processing can be utilized to train AI models using image samples. The trained model can then automatically perform sealant quality inspection on display panels. To ensure the accuracy of the model and the correctness of the inspection results, a large number of samples containing actual data of the sealant area are needed. However, while obtaining normal samples is relatively easy, certain changes in the sealant area in reality are often characteristic changes brought about by subsequent processing steps after the display panel is sealed. Therefore, if on-site sample preparation is used, obtaining samples with certain changes or even anomalies takes a considerable amount of time, resulting in a very long time span for sample collection.
[0003] Therefore, there is a need for a method to quickly acquire image samples of various types in a short period of time. Summary of the Invention
[0004] To address at least one of the aforementioned problems, a first aspect of this application provides a method for creating image samples, comprising:
[0005] Acquire multiple raw sample images of the target object. The raw sample images include a sealed area and a non-sealed area, and the sealed area and the non-sealed area have multiple metal lines.
[0006] Select a point on one of the multiple metal lines, and use that point as the starting point to cut and copy the first image region. The first image region includes at least a partially sealed area and a partially unsealed area.
[0007] The second image region of the original sample image is updated using the first image region to generate an image sample, and the corresponding starting point of the second image region is located on the selected metal line.
[0008] In some optional embodiments, before selecting a point on one of a plurality of metal lines and using that point as the starting point to crop and copy the first image region, the method further includes:
[0009] Extracting lines from the original sample image based on a line detection algorithm;
[0010] The lines are filtered using the minimum preset straight line length as the initial screening criterion.
[0011] In some optional embodiments, after filtering lines using a preset minimum line length as the initial screening criterion, the method further includes:
[0012] The lines after the initial selection are filtered using a preset range of straight line slopes as a secondary filtering condition to obtain the metal straight lines to be selected.
[0013] The position information of each metal line to be selected is obtained based on a pre-established rectangular coordinate system.
[0014] In some optional embodiments, selecting a point on one of a plurality of metal lines and using that point as a starting point to crop and copy the first image region further includes:
[0015] Select any one of multiple metal lines and obtain the position information of the selected metal line;
[0016] Select a point on the metal line and obtain the position information of that point based on the position information of the selected metal line;
[0017] Extract and copy a first image region with a predetermined size range, starting from the selected point.
[0018] In some optional embodiments, updating a second image region of the original sample image using a first image region to generate an image sample further includes:
[0019] The position information of the corresponding starting point of the second image region is determined on the selected metal straight line according to the preset step size, wherein the preset step size satisfies that the corresponding starting point of the second image region does not exceed the range of the original sample image.
[0020] The second image region of the original sample image is updated using the first image region to generate an image sample.
[0021] In some alternative embodiments, the shape of the first image region includes at least one of polygons, circles, and ellipses.
[0022] In some optional embodiments, before selecting a point on one of the plurality of metal lines and using that point as the starting point to crop and copy the first image region, the method further includes:
[0023] The original sampled image is binarized.
[0024] A second aspect of the present invention provides an image sample production system, comprising: an imaging device and a control device, wherein:
[0025] The shooting device is used to move on a preset track under the control of the control device and to take pictures of the target object during the movement to generate original sample images;
[0026] A control device for performing the image sample creation method described above.
[0027] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon.
[0028] When the program is executed by the processor, it implements the image sample creation method described above.
[0029] A fourth aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor.
[0030] When the program is executed by the processor, it implements the image sample creation method described above.
[0031] The beneficial effects of this invention are as follows:
[0032] This invention addresses existing problems by providing an image creation method, an image sample creation system, a computer-readable storage medium, and a computer device. Using an original sample image comprising a sealed area, a non-sealed area, and multiple metal lines, and employing a point on each metal line as a starting point to extract and copy a first image region, and updating a second image region using the first image region as a starting point on another point on the metal line, this invention enables the rapid creation of multiple image samples with identical local and overall textures from the current original sample image. This significantly reduces the preparation time for initial image samples in industrial inspection, lowers product costs, and has broad application prospects. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 An exemplary flowchart illustrating an image sample creation method according to some embodiments of this application is shown;
[0035] Figure 2 An exemplary structural block diagram of an image sample production system according to some embodiments of the present application image sample production method is shown;
[0036] Figure 3 A schematic top view showing an original image sample according to an embodiment of this application;
[0037] Figures 4 to 7 An exemplary flowchart illustrating an application image sample creation method according to some embodiments of this application is shown;
[0038] Figure 8 A schematic top view of an image sample created according to an embodiment of this application is shown.
[0039] Figure 9 This illustration shows a structural schematic diagram of a computer device according to another embodiment of this application. Detailed Implementation
[0040] To more clearly illustrate the present invention, the following description, in conjunction with preferred embodiments and accompanying drawings, further explains the invention. Similar components in the drawings are indicated by the same reference numerals. Those skilled in the art should understand that the specific description below is illustrative rather than restrictive and should not be construed as limiting the scope of protection of the present invention.
[0041] It should be noted that the terms "having", "comprising", and "including" used in this application are all open-ended, meaning that when a module is described as "having", "comprising", or "including" a first element, a second element, and / or a third element, it indicates that the module includes other elements in addition to the first element, the second element, and / or the third element.
[0042] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0043] To solve one of the above problems, such as Figure 1 As shown, one embodiment of this application provides a method for creating image samples, including:
[0044] S1. Obtain multiple original sample images of the target object, wherein the original sample images include a sealed area and a non-sealed area, and the sealed area and the non-sealed area have multiple metal straight lines;
[0045] S2. Select a point on one of the multiple metal lines, and use that point as the starting point to cut and copy the first image area. The first image area includes a partially sealed area and a non-sealed area.
[0046] S3. Update the second image region of the original sample image using the first image region to generate an image sample. The corresponding starting point of the second image region is located on the selected metal straight line.
[0047] In this embodiment, by using an original sample image that includes both sealed and unsealed areas and multiple metal lines, and by using a point on the metal line as a starting point to extract and copy a first image area, and updating a second image area on the metal line with another point as a starting point, it is possible to quickly create multiple image samples with the same local and overall texture using the current original sample image. This significantly reduces the preparation time of the initial image samples in industrial inspection, lowers product costs, and has broad application prospects.
[0048] It should be noted that the image sample production method of this application embodiment can be applied to an image sample production system for the sealing area of a display panel, such as... Figure 2 As shown, the image sample production system 100 includes a control device 101 and an imaging device 103.
[0049] In this embodiment, the image sample creation method is executed by a control device 101. The control device 101 can be an electronic device with computing and data transmission / reception capabilities, such as a computer or a terminal device; this application does not specifically limit its capabilities. The imaging device 103 can be a camera directly mounted on a preset track or mounted on a robotic arm. Under the control of the control device 101 or other controllers, it captures images of the target object within its field of view, acquiring multiple original sample images. Of course, this application does not intend to limit the way the imaging device 103 acquires original sample images, as long as it can produce the original sample images required by the control device 101 to execute the image sample creation method.
[0050] To make the technical solution of this application clearer, the steps of the image sample production method are explained below with specific examples.
[0051] In step S1, multiple original sample images of the target object are acquired. The original sample images include a sealed area and a non-sealed area, and the sealed area and the non-sealed area have multiple metal straight lines.
[0052] Specifically, the control device 101 can directly control the camera set on the preset track, or control the movement of the robotic arm and control the camera on the robotic arm to image the target object within the field of view of the camera, and obtain multiple original sample images of the target object.
[0053] In another scenario, image acquisition is performed using other devices that can be used as image acquisition equipment. Specifically, other controllers control cameras positioned on preset tracks or mounted on robotic arms to image the target object within the camera's field of view, generating multiple raw sample images of the target object. In this case, the control device 101 acquires the raw sample images by communicating with the devices. Of course, the communication method can be wired or wireless, and this application does not limit it.
[0054] Specifically, refer to Figure 3 As shown, the original sample image includes a sealed area BB and a non-sealed area CC, with multiple metal lines L on both sides. The figure shows an example where the sealed area BB is located in the center of the image. This is because when the sealed area BB is in the center and the non-sealed areas CC are on either side, more possibilities for the sealed area to change towards its edges can be expanded, maximizing the variety of samples. Of course, this application does not specifically limit the location of the sealed area. Those skilled in the art should understand that the sealant on the display panel is usually a semi-transparent or transparent material. After sealing, there are clearly visible, regularly arranged metal lines for transmitting electrical signals directly above the display panel. These metal lines can be wiring or various signal lines located near the sealed area of the display panel. Regular arrangement means that they are arranged at certain slopes and predetermined intervals. In this application, utilizing the regularity of the metal lines on the display panel to create image samples can increase the diversity of samples and ensure consistency in local and overall texture. The principle behind this setup will be described in detail below.
[0055] It should be noted that Figure 3 The image shown is merely an example illustrating the positional relationship and approximate shape of the regions and metal lines in the original sample image. It does not limit the image details in the actual image, and the original sample image sampled in the actual field is not limited to this.
[0056] In some optional embodiments, after acquiring multiple original sample images, the control device 103 processes the original sample images. Optionally, the control device 103 performs binarization processing on the original sample images. There are various ways to binarize an image. In one example, the original sample image is processed into grayscale to obtain the pixel value of each pixel in the image, and a preset critical grayscale value is set. Pixels with grayscale values greater than the preset critical grayscale value are set as grayscale maxima, for example, as white, and pixels with grayscale values less than the preset critical grayscale value are set as grayscale minima, for example, as black, thereby achieving binarization. The preset critical grayscale value can be set according to actual conditions, and the embodiments of this application do not specifically limit it.
[0057] This setting significantly reduces the amount of data in the original sample image, thereby highlighting the outlines of the main targets in the original sample image, such as lines and the outlines of the sealing area, simplifying the image sample production process.
[0058] The original sample image may contain other linear patterns besides the metallic straight lines, such as gaps and cracks. These lines will become noise in subsequent image data analysis and processing. When selecting metallic straight lines, these lines may be mistakenly treated as metallic straight lines. The irregular arrangement of these noise lines will affect the diversity of the image samples.
[0059] In view of the above issues, in some alternative embodiments, the lines in the image are filtered before further processing of the original sample image.
[0060] Specifically, refer to Figure 4 As shown, the image sample creation method further includes:
[0061] Step S101: Extract lines from the original sample image based on the line detection algorithm;
[0062] Step S102: Use the preset minimum straight line length as the initial screening condition to screen the lines.
[0063] Of course, those skilled in the art should understand that before filtering lines in an image, any line detection algorithm can be used to identify and extract lines from the original sample image, and then the lines can be filtered based on the filtering conditions. This will not be elaborated further here.
[0064] Optionally, the preset minimum line length can be set based on the length of the shortest metal line located at the corner of the screen. For example, refer to Figure 3 As shown, the minimum preset straight line length is set to the length of the shortest metal straight line L1 in the original sample image, and lines shorter than the length of the metal straight line L1 are filtered out as stray lines.
[0065] This setting allows for the filtering out of lines in the original sample image whose length is less than the preset minimum straight line length, ensuring accurate selection of metal straight lines in subsequent steps.
[0066] Furthermore, when using only the minimum line length as the initial screening criterion, stray lines in the original sample image with lengths greater than this minimum line length may be mistakenly identified as metallic lines as candidates. To eliminate such stray lines, embodiments of this application preferably provide a secondary screening scheme.
[0067] Specifically, refer to Figure 5 As shown, after step S102, which uses the minimum preset straight line length as the initial screening condition to screen the lines, the method further includes:
[0068] Step S103: Use the preset straight line slope range as a secondary screening condition to screen the lines after the initial selection to obtain the metal straight lines to be selected.
[0069] Step S104: Obtain the position information of each metal line to be selected based on the pre-established rectangular coordinate system.
[0070] This setting utilizes the characteristic of straight metal lines having a certain slope range, and uses the preset slope range as a secondary screening condition. This allows non-straight lines that meet the initial screening conditions and straight lines that do not meet the slope range to be screened out from the original sample image. This ensures that the candidate lines after screening are all straight metal lines to be selected. The position information of the straight metal lines to be selected is obtained by using a pre-established rectangular coordinate system. This allows the image to be transformed into a digital problem for subsequent processing. The image sample creation process using digital processing provides the conditions for the rapid creation of a large number of various image samples.
[0071] In step S2, a point on one of the multiple metal straight lines is selected, and the point is used as the starting point to cut and copy the first image area, which includes a partially sealed area and a non-sealed area.
[0072] Specifically, refer to Figure 6 As shown, in step S21, any one of the multiple metal lines Li is selected and its position information is obtained. Here, Li indicates the i-th metal line. When the original sample image includes n metal lines, 1 ≤ i ≤ n, where n is a positive integer.
[0073] It should be noted that, based on the metal lines extracted from the original sample image using the recognition algorithm, if the lines are not further filtered, that is, if the extracted lines are used as metal lines, the position information of the metal lines is directly obtained based on the pre-established Cartesian coordinate system.
[0074] The purpose of creating image samples in this application is to obtain as many different types of image samples as possible to reflect the various possible changes in the sealing area for subsequent machine learning model training. Therefore, this application does not aim to limit the selection of metal lines. While maximizing the number of image samples, it is preferable to select any one metal line from all available metal lines and obtain its position information.
[0075] The location information can be, for example, a mathematical expression for a straight line, or the coordinates of the intersection point of the line and the boundary of the original sample image, so as to uniquely describe the metal straight line and quickly determine the position coordinates of each point on it.
[0076] In step S22, refer to Figure 8As shown, select a point A on the metal line and obtain the position information of the point based on the position information of the selected metal line.
[0077] This step is not intended to limit the specific location of the selected points, but should be coordinated with the next step to ensure that the captured first image region includes at least a portion of the encapsulated area and a portion of the non-encapsulated area. The location information of the selected points is, for example, coordinate values.
[0078] In step S23, a first image region with a predetermined size range is extracted and copied using the selected point as the starting point. The starting point described in this application refers to a point on the boundary of the first image region, and this point is the same location on the boundary when creating all image samples of the same original sample image.
[0079] Continue to refer to Figure 8 As shown in the figure, a rectangle is used as an example to illustrate the extraction of the first image region. Figure 8 As shown, point A is the starting point of the rectangle. Its predetermined size range is a rectangular graphic range defined by width H1 and length W1, and the first image region extracted is E1.
[0080] It should be noted that, in order to maximize the diversity of image samples, this application does not limit the specific size of the predetermined size range. It is only necessary that, after selecting point A, the first image region extracted according to the preset size range includes at least a portion of the sealed area BB and a portion of the non-sealed area CC. The purpose of this is to ensure that each image sample produced shows a variation in either the sealed or non-sealed area, avoiding the situation where the second image region is still located within the same region if the first image region only includes one type of area, thus rendering the created image sample meaningless.
[0081] In step S3, the second image region of the original sample image is updated using the first image region to generate an image sample, and the corresponding starting point of the second image region is located on the selected metal straight line.
[0082] Specifically, refer to Figure 7 As shown, in step S31, the position information of the corresponding starting point of the second image region is determined on the selected metal straight line according to the preset step size, wherein the preset step size satisfies that the corresponding starting point of the second image region does not exceed the range of the original sample image.
[0083] In this application, by selecting point B located on the same metal straight line Li as the starting point, it is ensured that the second image region moves parallel to the metal straight line Li. Furthermore, the preset step size only indicates that the step size is pre-set; it is acceptable as long as the corresponding starting point of the second image region does not exceed the range of the original sample image.
[0084] Optionally, the preset step size can be either positive or negative. This allows the first image region to be updated to either a lower position or a lower position. Furthermore, optionally, multiple preset step sizes can be used, meaning the generated image sample is intended to simultaneously show changes in multiple positions of the sealing area. Therefore, the above methods can further improve the diversity of image samples.
[0085] In step S32, the second image region of the original sample image is updated using the first image region to generate an image sample.
[0086] Specifically, continue to refer to Figure 8 As shown, point B, which is also located on the selected metal straight line Li, is taken as the starting point of the second image region. The second image region is updated with the first image region to obtain a new second image region E2, which is equivalent to translating the image of the first image region along the metal straight line Li to the position of E2.
[0087] The above settings, based on linear sliding to copy and paste the first image area, ensure the consistency of local and overall texture features in the created image samples, making the constructed image samples closer to the real samples. Furthermore, by using the inherent, regularly arranged metal straight lines of the display panel after sealing as a reference for creating image samples, the existing features of the display panel are cleverly utilized. By translating the first image area, which includes at least a portion of the sealed area and at least a portion of the unsealed area, along the metal straight lines, highly diverse image samples can be quickly created while maintaining consistent texture features.
[0088] The image sample production method of this application embodiment is based on the original sample images collected on site and uses the metal straight lines in the images as a reference to quickly produce a large number of image samples of various types, which reduces the cost of image sample production and thus reduces the production cost of products, and has broad application prospects.
[0089] It is worth noting that, although Figure 8 The first image region shown is rectangular, but this application is not intended to limit it to this. The shape of the first image region can be any shape, such as a polygon, circle, ellipse, etc. When the shape of the first image region is a polygon, it can be a conventional polygon such as a rectangle, square, trapezoid, parallelogram, etc., or it can be an irregular polygon. This setting further expands the diversity of the samples.
[0090] Accordingly, refer to Figure 2 As shown, this embodiment of the invention provides an image sample production system, including: a control device 101 and an imaging device 103, wherein:
[0091] The shooting device 103 is used to move on a preset track under the control of the control device and to shoot the target object during the movement to generate an original sample image;
[0092] The control device 101 is used to execute the image sample production method described in the above embodiments.
[0093] In this embodiment, by using an imaging device to capture an original sample image including a sealing area and multiple metal lines, and using a control device to select a point on the metal line as a starting point to crop and copy a first image area, and using the first image area to update a second image area with another point on the metal line as a starting point, it is possible to quickly produce multiple image samples with the same local and overall texture using the current original sample image. This significantly reduces the preparation time of the initial image samples in industrial inspection, reduces product costs, and has broad application prospects.
[0094] Another embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which is implemented when executed by a processor:
[0095] Acquire multiple raw sample images of the target object. The raw sample images include a sealed area and a non-sealed area, and the sealed area and the non-sealed area have multiple metal lines.
[0096] Select a point on one of the multiple metal lines, and use that point as the starting point to cut and copy the first image region, which includes a partially sealed area and a non-sealed area;
[0097] The second image region of the original sample image is updated using the first image region to generate an image sample, and the corresponding starting point of the second image region is located on the selected metal line.
[0098] In practical applications, a computer-readable storage medium can take any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this embodiment, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0099] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0100] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0101] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0102] like Figure 9As shown, another embodiment of the present invention provides a structural schematic diagram of a computer device. Figure 9 The computer device 12 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0103] like Figure 9 As shown, the computer device 12 is represented in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and a bus 18 connecting different system components (including system memory 28 and processing unit 16).
[0104] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0105] Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0106] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 9 Not shown; usually referred to as a "hard drive"). Although Figure 9 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0107] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.
[0108] Computer device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with the computer device 12, and / or with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through input / output (I / O) interface 22. Furthermore, computer device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) through network adapter 20. Figure 9 As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be understood that, although... Figure 9 As not shown, it can be combined with computer device 12 to use other hardware and / or software modules, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0109] The processor unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the image sample production method provided in the embodiments of the present invention.
[0110] This invention addresses existing problems by providing an image creation method, an image sample creation system, a computer-readable storage medium, and a computer device. It utilizes an original sample image including a sealed area, a non-sealed area, and multiple metal lines. A first image region is extracted and copied using a point on each metal line as a starting point. A second image region is then updated using the first image region as the starting point of another point on the metal line. This allows for the rapid creation of multiple image samples with identical local and overall textures from the original sample image, significantly reducing the time required for initial image sample creation in industrial inspection, lowering product costs, and demonstrating broad application prospects.
[0111] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. For those skilled in the art, other variations or modifications can be made based on the above description. It is impossible to exhaustively list all the implementation methods here. All obvious variations or modifications derived from the technical solutions of the present invention are still within the protection scope of the present invention.
Claims
1. A method for creating image samples, characterized in that, include: Multiple original sample images of the target object are acquired. The original sample images include a sealed area and a non-sealed area. The sealed area and the non-sealed area have multiple metal straight lines. The metal straight lines are used to transmit electrical signals. The metal straight lines are arranged regularly with a certain slope and a predetermined interval range. Regular arrangement means that they are arranged at intervals with a certain slope and a predetermined interval range. Lines are extracted from the original sample image based on a line detection algorithm; The lines are screened using a preset minimum straight line length as the initial screening criterion. The lines after the initial selection are filtered using a preset range of straight line slopes as a secondary filtering condition to obtain the metal straight lines to be selected. The position information of each metal line to be selected is obtained based on a pre-established rectangular coordinate system; Select a point on one of the plurality of metal straight lines, and use that point as the starting point to cut and copy a first image region, the first image region including at least a partially sealed area and a partially unsealed area; The second image region of the original sample image is updated using the first image region to generate an image sample. The corresponding starting point of the second image region is located on the selected metal straight line, thereby ensuring that the local and overall texture features of the generated image sample are consistent, making the constructed image sample closer to the real sample.
2. The image sample production method according to claim 1, characterized in that, The step of selecting a point on one of the plurality of metal lines and using that point as the starting point to extract and copy the first image region further includes: Select any one of multiple metal lines and obtain the position information of the selected metal line; Select a point on the metal straight line and obtain the position information of that point based on the position information of the selected metal straight line; Extract and copy a first image region with a predetermined size range, starting from the selected point.
3. The image sample production method according to claim 2, characterized in that, The step of updating the second image region of the original sample image using the first image region to generate an image sample further includes: The position information of the corresponding starting point of the second image region is determined on the selected metal straight line according to a preset step size, wherein the preset step size satisfies that the corresponding starting point of the second image region does not exceed the range of the original sample image; The second image region of the original sample image is updated using the first image region to generate an image sample.
4. The image sample production method according to claim 1, characterized in that, The shape of the first image region includes at least one of polygon, circle, and ellipse.
5. The image sample production method according to claim 1, characterized in that, Before selecting a point on one of the plurality of metal lines and using that point as the starting point to crop and copy the first image region, the method further includes: The original sample image is binarized.
6. An image sample production system, characterized in that, include: The shooting device and control device, wherein: The shooting device is used to move on a preset track under the control of the control device and to shoot the target object during the movement to generate an original sample image; The control device is used to execute the image sample production method according to any one of claims 1-5.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the image sample creation method as described in any one of claims 1-5.
8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the program is executed by the processor, it implements the image sample creation method as described in any one of claims 1-5.
Citation Information
Patent Citations
Instrument image sample manufacturing method and system, storage medium and electronic equipment
CN112367461A