Information processing device, detection method, and detection program
Patent Information
- Application Number
- JP2024559358
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-02-17
- Publication Date
- 2025-01-22
- Estimated Expiration
- 2043-02-17
AI Technical Summary
Existing methods for inspecting twisted wires fail to accurately detect images of strands with the same pattern, leading to misclassification of normal twisted wires as abnormal.
An information processing device that acquires images of twisted wires, calculates the degree of similarity between reference and comparison images, and detects the length at which the twisted wire image is divided to ensure the same pattern is maintained across images.
Enables accurate detection of images of twisted wires with the same pattern, preventing misclassification and ensuring reliable inspection of twisted wires.
Smart Images

Figure 00000009_0000 
Figure 00000009_0001 
Figure 00000009_0002
Abstract
Description
[Technical field]
[0001] The present disclosure relates to an information processing device, a detection method, and a detection program. [Background technology]
[0002] Twisted wires are used. For example, twisted wires are used in electric wires. A technique for inspecting electric wires has been proposed (see Patent Document 1). The automatic inspection device in Patent Document 1 extracts images of potential anomalies by dividing them into independent rectangular regions. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Publication No. 10-117415 Summary of the Invention [Problem to be solved by the invention]
[0004] When inspecting a twisted wire as in the above technique, an image including the twisted wire may be divided. If the patterns of the twisted wire in each divided image are different, a normal twisted wire may be determined to be abnormal.
[0005] The objective of this disclosure is to detect the length to obtain an image of the same pattern of stranded wire. [Means for solving the problem]
[0006] According to one aspect of the present disclosure, there is provided an information processing device, the information processing device comprising: A reference image showing the twisted wire is obtained, and a number of comparison images are obtained from within the reference image. An acquisition unit for acquiring a calculation unit that calculates a similarity between the reference image and each of the plurality of comparison images; and and a detection unit for detecting the length in order to obtain an image of the twisted wire having the same pattern. Each of the plurality of comparative images is an image of the same size as the reference image. Effect of the Invention
[0007] According to the present disclosure, it is possible to detect the length required to obtain an image of a stranded wire with the same pattern. [Brief description of the drawings]
[0008] [Figure 1] FIG. 2 is a diagram illustrating hardware included in an information processing device according to the first embodiment. [Diagram 2] 1 is a block diagram showing functions of an information processing device according to a first embodiment; [Diagram 3] FIG. 2 is a diagram illustrating an example of a geometric transformation according to the first embodiment. [Figure 4] 5A and 5B are diagrams illustrating an example of calculation of a similarity according to the first embodiment. [Diagram 5] FIG. 4 is a diagram showing a specific example of the detection process according to the first embodiment. [Figure 6] 4 is a flowchart showing an example of processing executed by the information processing device according to the first embodiment. [Figure 7] FIG. 11 is a block diagram showing the functions of an information processing device according to a second embodiment. [Figure 8] FIG. 11 is a diagram showing an example of an image after conversion in the second embodiment. [Figure 9] FIG. 11 is a diagram showing an example of an amplitude spectrum image according to the second embodiment. [Figure 10] 13 is a flowchart showing an example of processing executed by an information processing device according to the second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] Hereinafter, an embodiment will be described with reference to the drawings. The following embodiment is merely an example, and various modifications are possible within the scope of the present disclosure.
[0010] Embodiment 1 1 is a diagram showing hardware included in an information processing device according to embodiment 1. The information processing device 100 is a device that executes a detection method. The information processing device 100 includes a processor 101, a volatile storage device 102, and a non-volatile storage device 103.
[0011] The processor 101 controls the entire information processing device 100. For example, the processor 101 is a central processing unit (CPU) or a field programmable gate array (FPGA). The processor 101 may be a multiprocessor. The information processing device 100 may also include a processing circuit.
[0012] The volatile storage device 102 is a main storage device of the information processing device 100. For example, the volatile storage device 102 is a random access memory (RAM). The non-volatile storage device 103 is an auxiliary storage device of the information processing device 100. For example, the non-volatile storage device 103 is a hard disk drive (HDD) or a solid state drive (SSD).
[0013] Next, functions of the information processing device 100 will be described. 2 is a block diagram showing functions of the information processing device of embodiment 1. The information processing device 100 includes a storage unit 110, an acquisition unit 120, a conversion unit 130, a calculation unit 140, and a detection unit 150.
[0014] The storage unit 110 may be realized as a storage area secured in the volatile storage device 102 or the non-volatile storage device 103 .
[0015] A part or all of the acquiring unit 120, the converting unit 130, the calculating unit 140, and the detecting unit 150 may be realized by a processing circuit. Also, a part or all of the acquiring unit 120, the converting unit 130, the calculating unit 140, and the detecting unit 150 may be realized as a module of a program executed by the processor 101. For example, the program executed by the processor 101 is also called a detection program. For example, the detection program is recorded on a recording medium.
[0016] The storage unit 110 stores various information.
[0017] Here, a brief description will be given of the processing executed by the information processing device 100. The information processing device 100 acquires an image of a twisted wire. Based on the image of the twisted wire, the information processing device 100 detects the length required to acquire an image of a twisted wire with the same pattern. The processing executed by the information processing device 100 will be described in detail below.
[0018] The acquisition unit 120 may acquire an image including the twisted wire. For example, the acquisition unit 120 acquires the image from the storage unit 110. Alternatively, for example, the acquisition unit 120 acquires the image from a camera. Alternatively, for example, the acquisition unit 120 acquires the image from an external device. Note that the external device is, for example, a cloud server. Also, the illustration of the external device is omitted. For example, the stranded wire is an electric wire, a wire supporting a utility pole, a wire supporting a bridge, etc.
[0019] The acquiring unit 120 may acquire an extracted image of the twisted wire from an image including the twisted wire. In other words, the acquiring unit 120 may acquire an image area of the twisted wire from an image including the twisted wire. The extraction process may be executed by the information processing device 100.
[0020] The acquisition unit 120 acquires an image of the twisted wire. As described above, the acquisition unit 120 may acquire an extracted image of the twisted wire. Alternatively, the acquisition unit 120 may acquire the image of the twisted wire from the storage unit 110 or an external device.
[0021] If the image of the twisted wire is not horizontal, the conversion unit 130 performs a geometric conversion so that the image of the twisted wire becomes horizontal. Here, a case where the image of the twisted wire is made horizontal will be described using a specific example.
[0022] Fig. 3 is a diagram showing an example of geometric transformation in the first embodiment. The upper diagram in Fig. 3 shows that the image 10 of the twisted wire is not horizontal. When the image 10 is not horizontal, the transformation unit 130 performs a geometric transformation so that the image 10 becomes horizontal. As a result, the image 10 becomes horizontal.
[0023] The acquisition unit 120 acquires a reference image showing the twisted wire. The calculation unit 140 calculates the similarity between a comparison image in the image of the twisted wire and the reference image. Here, the calculation of the similarity will be described using a specific example.
[0024] 4(A) and (B) are diagrams showing examples of calculation of similarity in the first embodiment. Fig. 4(A) is a diagram showing an example (part 1) of calculation of similarity. The acquisition unit 120 acquires an image of a predetermined length as a reference image from the image of the twisted wire. Fig. 4(A) shows the reference image 20.
[0025] The acquisition unit 120 acquires, as a comparison image, an image obtained by shifting the reference image 20 by one pixel to the right and having a predetermined length (i.e., an image having the same size as the reference image 20). In this way, the comparison image 21 is obtained.
[0026] The calculation unit 140 calculates the similarity between the reference image 20 and the comparison image 21. In particular, the calculation unit 140 calculates the similarity using a template matching technique. For example, the calculation unit 140 calculates the similarity using normalized cross-correlation. Specifically, the calculation unit 140 calculates the similarity using equation (1). Here, R is the similarity. N is the vertical length of the reference image or the comparison image. M is the horizontal length of the reference image or the comparison image. I(i,j) means the pixel value of the i-th row and j-th column of the comparison image. T(i,j) means the pixel value of the i-th row and j-th column of the reference image.
[0027]
number
[0028] Furthermore, for example, the calculation unit 140 calculates the similarity using SSD (Sum of Squared Difference). Specifically, the calculation unit 140 calculates the similarity using formula (2). Note that the symbols used in formula (2) have the same meanings as the symbols used in formula (1).
[0029]
number
[0030] Next, the acquisition unit 120 acquires an image obtained by shifting the comparison image 21 by one pixel to the right and having a predetermined length (i.e., an image of the same size as the reference image 20) as a comparison image. In this way, the comparison image 22 is obtained. The calculation unit 140 calculates the similarity between the reference image 20 and the comparison image 22.
[0031] The information processing device 100 repeats obtaining the comparison image and calculating the similarity. In this manner, the information processing device 100 obtains a plurality of comparison images, shifting each image. The information processing device 100 calculates the similarity between the reference image and each of the plurality of comparison images. As a result, a plurality of similarities are obtained.
[0032] 4A, a case has been described in which the reference image 20 is acquired from an image of a twisted wire. A case will now be described in which the reference image is not acquired from an image of a twisted wire.
[0033] 4B is a diagram showing an example (part 2) of calculation of similarity. The acquisition unit 120 acquires a reference image 30, which is an image having a predetermined length, from the storage unit 110 or an external device.
[0034] The acquisition unit 120 acquires an image of a predetermined length from the images of the twisted wire (that is, an image of the same size as the reference image 30) as a comparison image. In this way, the comparison image 31 is obtained.
[0035] The calculation unit 140 calculates the similarity between the reference image 30 and the comparison image 31. In detail, the calculation unit 140 calculates the similarity using a template matching technique.
[0036] Next, the acquisition unit 120 acquires, as a comparison image, an image obtained by shifting the comparison image 31 by one pixel to the right and having a predetermined length (i.e., an image of the same size as the reference image 30). In this way, the comparison image 32 is obtained. The calculation unit 140 calculates the similarity between the reference image 30 and the comparison image 32.
[0037] The information processing device 100 repeats obtaining the comparison image and calculating the similarity. In this manner, the information processing device 100 obtains a plurality of comparison images, shifting each image. The information processing device 100 calculates the similarity between the reference image and each of the plurality of comparison images. As a result, a plurality of similarities are obtained.
[0038] The detection unit 150 detects the length for dividing the image of the twisted wire by using a plurality of similarities. In other words, the detection unit 150 detects the length for acquiring an image of the twisted wire with the same pattern by using a plurality of similarities. Here, the detection process will be described using a concrete example.
[0039] Fig. 5 is a diagram showing a specific example of the detection process of the first embodiment. Fig. 5 is a diagram showing a graph of the relationship between a plurality of similarities and image positions. The vertical axis represents the similarity, and the horizontal axis represents the image position.
[0040] The detection unit 150 detects an image position X1 with a high degree of similarity. The detection unit 150 also detects an image position X2 with a high degree of similarity. The detection unit 150 detects the length between the image positions X1 and X2 as the length along which the image of the twisted wire is divided. When the image of the twisted wire is divided at the detected length, the pattern of the twisted wire in each image will be the same.
[0041] In the above description, it has been described that the information processing device 100 repeats obtaining the comparison image and calculating the similarity. The number of repetitions is equal to or greater than the number of times that the length of the division can be detected.
[0042] After the division length is detected, the information processing device 100 may execute the following process. The information processing device 100 divides the image of the twisted wire into the corresponding length. The information processing device 100 inspects whether the twisted wire is normal or not, using the multiple divided images obtained by the division. The information processing device 100 may perform the inspection using a publicly known technique.
[0043] Next, the process executed by the information processing device 100 will be described with reference to a flowchart. FIG. 6 is a flowchart illustrating an example of processing executed by the information processing device according to the first embodiment. (Step S11) The acquisition unit 120 acquires an image including a twisted wire. (Step S12) The acquisition unit 120 acquires an image of the twisted wire from the image. (Step S13) The conversion unit 130 determines whether or not the image of the twisted wire is horizontal. If the image of the twisted wire is horizontal, the process proceeds to step S15. If the image of the twisted wire is not horizontal, the process proceeds to step S14.
[0044] (Step S14) The conversion unit 130 performs a geometric conversion so that the image of the twisted wire becomes horizontal. (Step S15) The calculation unit 140 judges whether or not the process has been repeated a predetermined number of times. If the condition is met, the process proceeds to step S18. If the condition is not met, the process proceeds to step S16.
[0045] (Step S16) The acquiring unit 120 acquires a comparison image from the image of the twisted wire. For example, the acquiring unit 120 acquires an image obtained by shifting the reference image by one pixel to the right as the comparison image. Also, for example, the acquiring unit 120 acquires an image obtained by shifting the previously acquired comparison image by one pixel to the right as the comparison image to be used in step S17. (Step S17) The calculation unit 140 calculates the similarity between the reference image and the comparison image. Then, the process proceeds to step S15. (Step S18) The detection unit 150 detects the length into which the image of the twisted wire is divided, using a plurality of similarities.
[0046] According to the first embodiment, the information processing device 100 detects the length for dividing the image of the twisted wire by using a plurality of similarities. When the image of the twisted wire is divided at the detected length, the pattern of the twisted wire in each image becomes the same. Therefore, the information processing device 100 can detect the length for acquiring images of the twisted wire with the same pattern.
[0047] Embodiment 2 Next, a description will be given of embodiment 2. In embodiment 2, differences from embodiment 1 will be mainly described. In embodiment 2, descriptions of matters common to embodiment 1 will be omitted. In the second embodiment, a case will be described in which the information processing device detects the division length using a method different from that in the first embodiment.
[0048] 7 is a block diagram showing functions of an information processing device according to embodiment 2. The information processing device 100a includes a storage unit 110, an acquisition unit 120a, a conversion unit 130a, a calculation unit 140a, and a detection unit 150a.
[0049] The acquiring unit 120a, the converting unit 130a, the calculating unit 140a, and the detecting unit 150a may be partly or entirely implemented by a processing circuit. Also, the acquiring unit 120a, the converting unit 130a, the calculating unit 140a, and the detecting unit 150a may be partly or entirely implemented as a program module executed by the processor 101.
[0050] The acquiring unit 120a acquires an image of the twisted wire. For example, the acquiring unit 120a may acquire an extracted image of the twisted wire. The acquiring unit 120a may also acquire the image of the twisted wire from the storage unit 110 or an external device.
[0051] If the image of the twisted wire is not horizontal, the conversion unit 130a performs a geometric conversion so that the image of the twisted wire becomes horizontal. The conversion unit 130a may convert the image of the twisted wire into a grayscale image. In the following description, it is assumed that the image of the twisted wire is converted into a grayscale image.
[0052] The conversion unit 130a converts the image of the twisted wire using a window function. For example, the window function is a Hann window. For example, when a Hann window is used, the converted image is expressed by equation (3). In detail, according to equation (3), the pixel value of the y row and x column after conversion is expressed by v x1,y1 It is expressed as:
[0053]
number
[0054] v x,y is the pixel value of row y and column x before transformation. x (x) is expressed by equation (4).
[0055]
number
[0056] X is the horizontal length of the image of the stranded wire. w y (y) is expressed by equation (5).
[0057]
number
[0058] Y is the vertical length of the image of the stranded wire.
[0059] Here is an example of an image after conversion. Fig. 8 is a diagram showing an example of an image after conversion in the embodiment 2. Fig. 8 shows an image after conversion when a Hann window is used.
[0060] The conversion unit 130a performs a Fourier transform on the image converted by the window function. As a result, an amplitude spectrum image is obtained. An example of the amplitude spectrum image is shown below.
[0061] FIG. 9 is a diagram showing an example of an amplitude spectrum image of the second embodiment. FIG. 9 shows a peak of the amplitude spectrum image 40. A peak is the highest value among the pixel values of the amplitude spectrum image 40. If a peak appears at the edge of the amplitude spectrum image 40, the peak is excluded. In other words, if a peak appears at the edge of the amplitude spectrum image 40, the second highest pixel value becomes the peak in the second embodiment. Furthermore, peaks appear symmetrically in the vertical and horizontal directions. Furthermore, the position showing the peak in the amplitude spectrum image 40 is expressed in frequency. In detail, when the horizontal direction of the amplitude spectrum image 40 is the x direction, the x coordinate of the position showing the peak is expressed in frequency. 9 shows two peaks. The calculation unit 140a performs the following calculation using the frequency represented by the position of one of the peaks.
[0062] The calculation unit 140a uses the frequency to calculate the period T. Specifically, the calculation unit 140a calculates the period T using equation (6). Here, f is the frequency, and X is the horizontal length of the image of the twisted wire.
[0063]
number
[0064] The period T is a length for acquiring an image of a twisted wire having the same pattern. The detector 150a may detect the period T as a length for dividing the image of the twisted wire.
[0065] Next, the process executed in the second embodiment will be described with reference to a flowchart. FIG. 10 is a flowchart illustrating an example of processing executed by the information processing device according to the second embodiment. (Step S21) The acquisition unit 120a acquires an image including a twisted wire. (Step S22) The acquisition unit 120a acquires an image of the twisted wire from the image. (Step S23) The conversion unit 130a determines whether or not the image of the twisted wire is horizontal. If the image of the twisted wire is horizontal, the process proceeds to step S25. If the image of the twisted wire is not horizontal, the process proceeds to step S24. (Step S24) The conversion unit 130a performs a geometric conversion so that the image of the twisted wire becomes horizontal.
[0066] (Step S25) The conversion unit 130a converts the image of the twisted wire into a grayscale image. (Step S26) The conversion unit 130a converts the image of the twisted wire using a window function. (Step S27) The transform unit 130a performs a Fourier transform on the image that has been transformed using the window function, thereby obtaining an amplitude spectrum image. (Step S28) Calculation unit 140a calculates the period T by using the frequency represented by the position showing the peak of the amplitude spectrum image. (Step S29) The detection unit 150a detects the period T as the length into which the image of the twisted wire is divided.
[0067] According to the second embodiment, the information processing device 100a detects the period T as the length for dividing the image of the twisted wire. When the image of the twisted wire is divided at the detected length, the pattern of the twisted wire in each image will be the same. Therefore, the information processing device 100a can detect the length for acquiring images of twisted wire with the same pattern.
[0068] The features of each of the embodiments described above can be combined with each other as appropriate. [Explanation of symbols]
[0069] 10 image, 20 reference image, 21 comparison image, 22 comparison image, 30 reference image, 31 comparison image, 32 comparison image, 40 amplitude spectrum image, 100 information processing device, 100a information processing device, 101 processor, 102 volatile storage device, 103 non-volatile storage device, 110 storage unit, 120 acquisition unit, 120a acquisition unit, 130 conversion unit, 130a conversion unit, 140 calculation unit, 140a calculation unit, 150 detection unit, 150a detection unit.
Claims
1. an acquisition unit that acquires an image of the twisted wire, acquires a reference image showing the twisted wire, and acquires a plurality of comparison images from within the reference image; a calculation unit that calculates a similarity between the reference image and each of the plurality of comparison images; a detection unit that detects a length for acquiring an image of a twisted wire having the same pattern by using a plurality of the similarities; having Each of the plurality of comparison images is an image having the same size as the reference image. Information processing device.
2. The method further includes a conversion unit that performs a geometric transformation so that the image of the twisted wire becomes horizontal if the image of the twisted wire is not horizontal. The information processing device according to claim 1 .
3. An acquisition unit for acquiring an image of the stranded wire; a transform unit that transforms the image of the twisted wire using a window function and performs a Fourier transform on the image transformed by the window function; a calculation unit that calculates a period using a frequency represented by a position showing a peak in an amplitude spectrum image that is an image obtained by the Fourier transform; A detection unit that detects the period as a length for acquiring an image of a twisted wire having the same pattern; An information processing device having the above configuration.
4. The conversion unit converts the image of the stranded wire into a grayscale image. The information processing device according to claim 3 .
5. The conversion unit performs a geometric transformation when the image of the twisted wire is not horizontal so that the image of the twisted wire becomes horizontal.
5. The information processing device according to claim 3.
6. An information processing device, acquiring an image of the stranded wire, acquiring a reference image showing the stranded wire, and acquiring a plurality of comparison images from within the reference image; Calculating a similarity between the reference image and each of the plurality of comparison images; Detecting a length for acquiring an image of a twisted wire having the same pattern based on the image of the twisted wire and using a plurality of the similarities; Each of the plurality of comparison images is an image having the same size as the reference image. Detection methods.
7. An information processing device, Acquire an image of the stranded wire, transforming the image of the stranded wire using a window function and performing a Fourier transform on the image transformed by the window function; Calculating a period using a frequency represented by a position showing a peak in an amplitude spectrum image, which is an image obtained by the Fourier transform; Detecting the period as a length for acquiring an image of a twisted wire having the same pattern; Detection methods.
8. In the information processing device, acquiring an image of the stranded wire, acquiring a reference image showing the stranded wire, and acquiring a plurality of comparison images from within the reference image; Calculating a similarity between the reference image and each of the plurality of comparison images; Detecting a length for acquiring an image of the twisted wire having the same pattern, based on the image of the twisted wire, using a plurality of the similarities. a detection program that executes a process, Each of the plurality of comparison images is an image having the same size as the reference image. Detection program.
9. In the information processing device, Acquire an image of the stranded wire, transforming the image of the stranded wire using a window function and performing a Fourier transform on the image transformed by the window function; Calculating a period using a frequency represented by a position showing a peak in an amplitude spectrum image, which is an image obtained by the Fourier transform; Detecting the period as a length for acquiring an image of a twisted wire having the same pattern; The detection program that causes the process to run.