Edge detection system, edge detection method, and edge detection program
The edge detection system addresses the accuracy and complexity issues of conventional methods by using a judgment graphic or circle to exclude noise points, resulting in improved edge detection accuracy with a simple configuration.
Patent Information
- Application Number
- JP2023179542
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-10-18
- Publication Date
- 2025-05-01
AI Technical Summary
Conventional edge detection methods, such as the least squares method, are prone to reduced accuracy due to noise points, and methods like the Hough transform increase processing time and complexity.
An edge detection system that acquires detection points from a captured image, sets a judgment graphic or circle based on average coordinates, identifies and excludes noise points based on distance from the graphic or circle, and detects edges using the remaining points.
Improves edge detection accuracy with a simple configuration by effectively excluding noise points, thereby enhancing the precision of edge detection without increasing processing complexity or time.
Smart Images

Figure 2025069674000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a technique for detecting the edges of an object. [Background technology]
[0002] Conventionally, in the inspection of an object (inspection object) such as an industrial product, a technique is known for detecting the edge (ridge line) of the object from an image captured by a camera and aligning the object. For example, a method is known in which an approximation line is found by using the least squares method based on the coordinate information of a plurality of discrete detection points obtained by detecting edges from a captured image (see, for example, Patent Document 1). [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2004-272734 A Summary of the Invention [Problem to be solved by the invention]
[0004] However, in conventional technology, when an approximation method such as the least squares method is used, the detection accuracy of the edge is reduced because the detection is significantly affected by noise points (abnormal detection points) among the multiple detection points. In addition, it is possible to use a method such as the Hough transform to reduce the influence of the noise points, but in this case, problems arise such as a slow processing speed and a complicated processing program due to the high calculation cost.
[0005] An object of the present disclosure is to provide an edge detection system, an edge detection method, and an edge detection program that are capable of improving the accuracy of detecting the edge of an object with a simple configuration. [Means for solving the problem]
[0006] An edge detection system according to one aspect of the present disclosure is a system for detecting edges of an object. The edge detection system includes an acquisition processing unit, a setting processing unit, a specification processing unit, and a detection processing unit. The acquisition processing unit acquires a plurality of detection points corresponding to edges of the object based on an image captured of the object. The specification processing unit sets a determination figure based on average coordinates of the plurality of detection points. The specification processing unit specifies an excluded detection point to be excluded from the plurality of detection points based on a distance from the determination figure to each of the plurality of detection points. The detection processing unit detects the edge of the object based on a plurality of detection points excluding the excluded detection point among the plurality of detection points.
[0007] An edge detection system according to another aspect of the present disclosure is a system for detecting an edge of an object. The edge detection system includes an acquisition processing unit, a setting processing unit, a specification processing unit, and a detection processing unit. The acquisition processing unit acquires a plurality of detection points corresponding to the edge of the object based on an image obtained by capturing an image of the object. The specification processing unit sets a judgment circle having a radius equal to an average distance between a reference coordinate set in advance according to a detection position of the object and each of the coordinates of the plurality of detection points. The specification processing unit specifies an excluded detection point to be excluded from the plurality of detection points based on a distance from an outer periphery of the judgment circle to each of the plurality of detection points. The detection processing unit detects the edge of the object based on a plurality of detection points excluding the excluded detection point among the plurality of detection points.
[0008] An edge detection method according to another aspect of the present disclosure is a method for detecting an edge of an object, the edge detection method being a method executed by one or more processors to acquire a plurality of detection points corresponding to an edge of the object based on an image obtained by capturing an image of the object, set a determination figure based on average coordinates of the plurality of detection points, identify an excluded detection point to be excluded from the plurality of detection points based on a distance from the determination figure to each of the plurality of detection points, and detect the edge of the object based on the plurality of detection points excluding the excluded detection point.
[0009] An edge detection method according to another aspect of the present disclosure is a method for detecting an edge of an object, the edge detection method being a method executed by one or more processors to acquire a plurality of detection points corresponding to an edge of the object based on an image obtained by capturing an image of the object, set a judgment circle having a radius equal to an average distance from a reference coordinate set in advance according to a detection position of the object to coordinates of each of the plurality of detection points, identify an excluded detection point to be excluded from the plurality of detection points based on a distance from an outer periphery of the judgment circle to each of the plurality of detection points, and detect the edge of the object based on the plurality of detection points excluding the excluded detection point.
[0010] An edge detection program according to another aspect of the present disclosure is a program for detecting an edge of an object, the edge detection program being a program for causing one or more processors to execute the following steps: acquiring a plurality of detection points corresponding to an edge of the object based on an image obtained by capturing an image of the object, setting a determination figure based on average coordinates of the plurality of detection points, identifying an excluded detection point to be excluded from the plurality of detection points based on a distance from the determination figure to each of the plurality of detection points, and detecting the edge of the object based on a plurality of detection points among the plurality of detection points excluding the excluded detection points.
[0011] An edge detection program according to another aspect of the present disclosure is a program for detecting an edge of an object, the edge detection program being a program for causing one or more processors to execute the following steps: acquiring a plurality of detection points corresponding to an edge of the object based on an image obtained by capturing an image of the object, setting a judgment circle having a radius equal to an average distance from a reference coordinate set in advance according to a detection position of the object to coordinates of each of the plurality of detection points, identifying an excluded detection point to be excluded from the plurality of detection points based on a distance from an outer periphery of the judgment circle to each of the plurality of detection points, and detecting the edge of the object based on a plurality of detection points among the plurality of detection points excluding the excluded detection points. Effect of the Invention
[0012] According to the present disclosure, it is possible to provide an edge detection system, an edge detection method, and an edge detection program that are capable of improving the detection accuracy of an edge of an object with a simple configuration. [Brief description of the drawings]
[0013] [Figure 1] FIG. 1 is a block diagram showing an overall configuration of an edge detection system according to an embodiment of the present disclosure. [Diagram 2] FIG. 2 is a diagram illustrating an example of an edge detection method according to the first embodiment of the present disclosure. [Figure 3A] FIG. 3A is a diagram illustrating an example of an edge detection method according to the first embodiment of the present disclosure. [Figure 3B] FIG. 3B is a diagram illustrating an example of an edge detection method according to the first embodiment of the present disclosure. [Figure 4A] FIG. 4A is a diagram showing an example of an edge detection method according to a reference embodiment. [Figure 4B] FIG. 4B is a diagram showing an example of an edge detection method according to a reference embodiment. [Diagram 5] FIG. 5 is a flowchart illustrating an example of a procedure of an edge detection process executed in the edge detection system according to the first embodiment of the present disclosure. [Figure 6] FIG. 6 is a diagram illustrating an example of an edge detection method according to the second embodiment of the present disclosure. [Figure 7A] FIG. 7A is a diagram illustrating an example of an edge detection method according to the second embodiment of the present disclosure. [Figure 7B] FIG. 7B is a diagram illustrating an example of an edge detection method according to the second embodiment of the present disclosure. [Figure 8] FIG. 8 is a flowchart illustrating an example of a procedure of an edge detection process executed in the edge detection system according to the second embodiment of the present disclosure. [Figure 9A] FIG. 9A is a diagram illustrating an example of an edge detection method according to another embodiment of the present disclosure. [Figure 9B] FIG. 9B is a diagram illustrating an example of an edge detection method according to another embodiment of the present disclosure. [Figure 9C] FIG. 9C is a diagram illustrating an example of an edge detection method according to another embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. Note that the following embodiments are examples of the present disclosure and are not intended to limit the technical scope of the present disclosure.
[0015] [Edge Detection System 10] 1 is a diagram showing a configuration of an edge detection system 10 according to an embodiment of the present disclosure. The edge detection system 10 includes an edge detection device 1 and a camera 2. The edge detection system 10 is a system that detects edges (ridge lines) of an object when inspecting the object, such as an industrial product.
[0016] The edge detection device 1 is a device that executes a process of detecting the edges of an object. The camera 2 is a digital camera that captures an image of a subject and outputs it as digital image data. The camera 2 has a communication function that transmits the digital image data to the edge detection device 1 through the network N1. The camera 2 may be included in the edge detection device 1.
[0017] The edge detection device 1 obtains an image of an object placed on an examination table by using a camera 2, and detects edges of the object by performing predetermined image processing on the image. A specific configuration of the edge detection device 1 will be described below.
[0018] [Embodiment 1] [Edge detection device 1] 1 shows a block diagram illustrating a configuration of an edge detection device 1 according to a first embodiment of the present disclosure. The edge detection device 1 is a server including a control unit 11, a storage unit 12, an operation display unit 13, and a communication unit 14. Note that the edge detection device 1 is not limited to a single computer, and may be a computer system in which multiple computers work in cooperation. Also, various processes executed by the edge detection device 1 may be executed in a distributed manner by one or multiple processors.
[0019] The communication unit 14 is a communication interface for connecting the edge detection device 1 to the network N1 in a wired or wireless manner and for executing data communication with an external device such as the camera 2 via the network N1 in accordance with a predetermined communication protocol.
[0020] The operation display unit 13 is a user interface that includes a display unit, such as a liquid crystal display or an organic EL display, that displays various information, and an operation unit, such as a mouse, a keyboard, or a touch panel, that accepts operations.
[0021] The storage unit 12 is a non-volatile storage unit such as a hard disk drive (HDD), a solid state drive (SSD), or a flash memory that stores various information. Specifically, the storage unit 12 stores data of captured images received from the camera 2, data of detection points acquired by image processing of the captured images, and the like.
[0022] The storage unit 12 also stores control programs such as an edge detection program for causing the control unit 11 to execute various processes such as an edge detection process (see FIG. 5) described below. For example, the edge detection program is non-temporarily recorded on a computer-readable recording medium such as a CD or DVD, and is read by a reading device (not shown) such as a CD drive or DVD drive provided in the edge detection device 1 and stored in the storage unit 12.
[0023] The control unit 11 has control devices such as a CPU, a ROM, and a RAM. The CPU is a processor that executes various arithmetic processes. The ROM is a non-volatile storage unit in which control programs such as a BIOS and an OS for causing the CPU to execute various arithmetic processes are stored in advance. The RAM is a volatile or non-volatile storage unit that stores various information, and is used as a temporary storage memory (work area) for various processes executed by the CPU. The control unit 11 controls the edge detection device 1 by executing various control programs stored in advance in the ROM or the storage unit 12 by the CPU.
[0024] Specifically, the control unit 11 includes various processing units such as an acquisition processing unit 111, a setting processing unit 112, a specific processing unit 113, and a detection processing unit 114. The control unit 11 functions as the various processing units by executing various processes according to the edge detection program with the CPU. Some or all of the processing units may be configured with electronic circuits. The edge detection program may be a program for causing a plurality of processors to function as the processing units.
[0025] The acquisition processing unit 111 acquires a plurality of detection points corresponding to the edges of the object based on a captured image of the object. Specifically, when the camera 2 captures an image of the object placed on the inspection table, the image data of the captured image is transmitted to the edge detection device 1. When the acquisition processing unit 111 receives the image data from the camera 2, it executes well-known image processing on the captured image to acquire a plurality of detection points corresponding to the edges of the object, and detects the position coordinates of each detection point. Note that the position coordinates of the plurality of detection points detected here are a set of discrete values.
[0026] 2 shows an example of detection points acquired on an object A1 including a linear edge E0 of the detection target. The acquisition processing unit 111 acquires five detection points a1 to a5 based on the captured image and detects the position coordinates of each of the detection points a1 to a5. Note that since the captured image shown in FIG. 2 includes a foreign object m1 (noise), the acquisition processing unit 111 detects the foreign object m1 as one detection point (detection point a5).
[0027] The setting processing unit 112 sets a determination figure based on the average coordinates of the multiple detection points. Specifically, the setting processing unit 112 sets a determination line that has a slope according to the detection direction of the edge of the object and passes through the average coordinates of the coordinates of each of the multiple detection points.
[0028] 2, the setting processing unit 112 sets the detection direction D1 based on the direction of an edge E0 predicted (anticipated) in the object A1. For example, the setting processing unit 112 sets a direction perpendicular to the direction of the predicted edge E0 as the detection direction D1. The setting processing unit 112 sets a determination straight line L0 that passes through an average coordinate a0 (average value of each X coordinate, average value of each Y coordinate) of the position coordinates of the five detection points a1 to a5 based on the detection direction D1. The determination straight line L0 is a straight line that passes through the average coordinate a0 and extends in a direction perpendicular to the detection direction D1.
[0029] The identification processing unit 113 identifies excluded detection points (noise points) to be excluded from the multiple detection points based on the distance from the determination figure set by the setting processing unit 112 to each of the multiple detection points. FIG. 3A shows a schematic diagram of the distance between the determination line L0 set by the setting processing unit 112 based on the detection points a1 to a5 shown in FIG. 2 and the detection points a1 to a5. The identification processing unit 113 identifies the excluded detection points based on the distance from the determination line L0 to each of the detection points a1 to a5. For example, the identification processing unit 113 identifies one or more detection points, among the multiple detection points, whose distance from the determination line L0 is greater than a preset threshold value, as the excluded detection points. In the example shown in FIG. 3A, the identification processing unit 113 identifies the detection point a5, whose distance is greater than the threshold value, as the excluded detection point.
[0030] As another embodiment, the identification processing unit 113 may identify one detection point that is the farthest from the determination straight line L0 as the excluded detection point among the multiple detection points. Also, the identification processing unit 113 may identify a predetermined number of detection points as the excluded detection points in descending order of distance from the determination straight line L0 among the multiple detection points.
[0031] The detection processing unit 114 detects the edge of the object based on a plurality of detection points excluding the excluded detection point among the plurality of detection points. For example, as shown in Fig. 3A and Fig. 3B, when the identification processing unit 113 identifies the detection point a5 as the excluded detection point, the detection processing unit 114 detects a straight line (edge L1) perpendicular to the detection direction D1 (parallel to the judgment straight line L0) as the edge of the object A1 based on the position coordinates of the remaining detection points a1 to a4 excluding the detection point a5 from the detection points a1 to a5. The detection processing unit 114 can detect the edge by a well-known method such as the least square method based on the plurality of detection points (here, the detection points a1 to a4) which are discrete values.
[0032] According to the above configuration, a straight line corresponding to the detection direction of the object can be detected as the edge of the object based on appropriate detection points obtained by excluding noise points (detection points of a foreign object m1, etc.) from the multiple detection points. Here, FIG. 4A and FIG. 4B show an example of an edge detection method when the detection direction D1 is not considered. When the detection direction D1 is not considered, a judgment straight line L0 oblique to the detection direction D1 is set as shown in FIG. 4A. Then, when the detection point a5 is excluded based on the judgment straight line L0, the edge L1 shown in FIG. 4B is detected as the edge of the object. In this way, when the detection direction D1 is not considered, the edge of the object cannot be detected correctly. In contrast, according to the configuration of this embodiment, the judgment straight line L0 corresponding to the detection direction D1 is set as described above, so that the noise points can be appropriately excluded and the edge of the object can be appropriately detected.
[0033] [Edge detection process] Hereinafter, an example of the edge detection process executed by the edge detection system 10 according to the first embodiment will be described with reference to FIG.
[0034] The present disclosure can be understood as a disclosure of an edge detection method that executes one or more steps included in the edge detection process. The edge detection method is an example of the edge detection method of the present disclosure. One or more steps included in the edge detection process described here may be omitted as appropriate. The steps in the edge detection process may be executed in a different order as long as the same action and effect is achieved. One or more processors may execute the steps in the edge detection process in a distributed manner.
[0035] In step S11, the control unit 11 sets a detection direction of the object. For example, as shown in Fig. 2, the control unit 11 sets a detection direction D1 based on the direction of an edge E0 predicted in the object A1. For example, the control unit 11 sets a direction perpendicular to the direction of the predicted edge E0 as the detection direction D1. Note that the control unit 11 may set a direction having a predetermined angle with respect to the direction of the predicted edge E0 as the detection direction D1.
[0036] Next, in step S12, the control unit 11 executes a detection process for detecting the detection point. Specifically, the control unit 11 causes the camera 2 to execute an imaging process, and acquires a captured image of the object from the camera 2. In addition, when the control unit 11 acquires the captured image, it executes a well-known image processing.
[0037] Next, in step S13, the control unit 11 obtains a plurality of detection points corresponding to the edges of the object by the image processing. In the example shown in Fig. 2, the control unit 11 obtains five detection points a1 to a5 corresponding to the edge E0 of the object A1 based on the captured image, and detects the position coordinates of each of the detection points a1 to a5.
[0038] Next, in step S14, the control unit 11 sets a determination straight line L0. For example, as shown in Fig. 2, the control unit 11 sets a determination straight line L0 that passes through an average coordinate a0 of the position coordinates of five detection points a1 to a5 and is perpendicular to the detection direction D1.
[0039] Next, in step S15, the control unit 11 identifies the excluded detection points. Specifically, the control unit 11 identifies the excluded detection points to be excluded from the multiple detection points based on the distance from the judgment line L0 to each of the multiple detection points. For example, as shown in FIG. 3A, the control unit 11 identifies the excluded detection points based on the distance from the judgment line L0 to each of the detection points a1 to a5. For example, the identification processing unit 113 identifies one or more detection points among the multiple detection points whose distance from the judgment line L0 is greater than a preset threshold value as the excluded detection points. In the example shown in FIG. 3A, the control unit 11 identifies the detection point a5 whose distance is greater than the threshold value as the excluded detection point.
[0040] Next, in step S16, the control unit 11 detects the edge of the object and outputs the detection result. Specifically, the control unit 11 detects the edge of the object based on a plurality of detection points excluding the excluded detection point among the plurality of detection points. For example, as shown in FIG. 3A and FIG. 3B, the control unit 11 detects a straight line (edge L1) perpendicular to the detection direction D1 as the edge of the object A1 by the least square method based on the position coordinates of the remaining detection points a1 to a4 excluding the detection point a5 from the detection points a1 to a5. The control unit 11 outputs the detection result (edge L1). For example, the control unit 11 causes the operation display unit 13 to display the edge L1 superimposed on the captured image acquired from the camera 2. The control unit 11 may also cause the determination straight line L0 to be identifiable on the captured image.
[0041] In the manner described above, the control unit 11 executes the edge detection process for the object.
[0042] As described above, the edge detection device 1 according to the first embodiment acquires a plurality of detection points corresponding to the edges of an object based on an image obtained by capturing an image of the object, sets a determination figure based on the average coordinates of the plurality of detection points, identifies an excluded detection point to be excluded from the plurality of detection points based on the distance from the determination figure to each of the plurality of detection points, and detects the edges of the object based on the plurality of detection points excluding the excluded detection point among the plurality of detection points. Also, the edge detection device 1 sets a determination line having a slope according to the detection direction of the edge of the object and passing through the average coordinates of the coordinates of each of the plurality of detection points, and identifies the excluded detection point based on the distance from the determination line to each of the plurality of detection points.
[0043] According to the above configuration, since the edge is detected based on a plurality of detection points excluding noise points, it is possible to improve the detection accuracy of the edge of the object with a simple configuration. Also, since the edge is detected by excluding noise points using a judgment line according to the detection direction, it is possible to appropriately detect the edge of the object.
[0044] [Embodiment 2] A description will be given of the configuration of an edge detection device 1 according to the embodiment 2. Note that in the embodiment 2, the description of the same configuration as in the embodiment 1 will be omitted as appropriate.
[0045] The edge detection device 1 according to the second embodiment has a configuration for detecting the edge of a circular object or an object including a curved portion.
[0046] Fig. 6 shows an example of detection points acquired on a circular object B1. The acquisition processing unit 111 acquires six detection points b1 to b6 corresponding to the outer periphery of the object B1 based on the captured image, and detects the position coordinates of each of the detection points b1 to b6. Since the captured image shown in Fig. 6 includes a foreign object n1, the acquisition processing unit 111 detects the foreign object n1 as one detection point (detection point b4).
[0047] The setting processing unit 112 sets a judgment circle P0 whose radius is the average distance between a reference coordinate C1 (center position) that is set in advance according to the detection position of the object B1 and the coordinates of each of the multiple detection points. The reference coordinate C1 is a position coordinate where the center of the object is expected to be located when, for example, a circular object is placed on an examination table, and one or more reference coordinates C1 are set. The reference coordinate C1 is set in advance according to the shape of the object. For example, as shown in FIG. 7A, the setting processing unit 112 sets a judgment circle P0 whose radius is the average distance r1 between the reference coordinate C1 and the coordinates of each of the detection points b1 to b6.
[0048] The identification processing unit 113 identifies, from the multiple detection points, the excluded detection points to be excluded based on the distance from the outer periphery of the judgment circle P0 to each of the multiple detection points. For example, the identification processing unit 113 identifies, as the excluded detection points, one or more detection points whose distance from the outer periphery of the judgment circle P0 with a radius r1 is greater than a preset threshold. In the example shown in FIG. 7A, the identification processing unit 113 identifies, as the excluded detection point, the detection point b4 whose distance is greater than the threshold.
[0049] As another embodiment, the identification processing unit 113 may identify one detection point that is the farthest from the outer periphery of the judgment circle P0 as the excluded detection point among the multiple detection points. Also, the identification processing unit 113 may identify a predetermined number (one or more) of detection points as the excluded detection points in descending order of distance from the outer periphery of the judgment circle P0 among the multiple detection points.
[0050] The detection processing unit 114 detects the edge of the object based on the plurality of detection points excluding the excluded detection point among the plurality of detection points. For example, as shown in Fig. 7A and Fig. 7B, when the identification processing unit 113 identifies the detection point b4 as the excluded detection point, the detection processing unit 114 detects a circle (edge P1) centered on the reference coordinate C1 as the edge of the object B1 based on the position coordinates of the remaining detection points b1 to b3, b5, and b6 excluding the detection point b4 from the detection points b1 to b6 (see Fig. 7B). The detection processing unit 114 can detect the edge by a well-known method such as the least square method based on the plurality of detection points (here, the detection points b1 to b3, b5, and b6) that are discrete values.
[0051] When a plurality of reference coordinates C1 are set, the detection processing unit 114 may detect a circle (edge P1) having a center at any one of the reference coordinates C1 as the edge of the object B1 based on the position coordinates of the detection points b1 to b3, b5, and b6. In another embodiment, when the reference coordinate C1 is set within a predetermined range in the X direction and the Y direction, the detection processing unit 114 may detect a circle (edge P1) having a center at any point within the predetermined range as the edge of the object B1 based on the position coordinates of the detection points b1 to b3, b5, and b6.
[0052] According to the above configuration, a circle corresponding to the center position of a circular object can be detected as the edge of the object based on appropriate detection points obtained by excluding noise points (detection points of foreign object n1, etc.) from the multiple detection points.
[0053] [Edge detection process] Hereinafter, an example of the edge detection process executed by the edge detection system 10 according to the second embodiment will be described with reference to FIG.
[0054] In step S21, the control unit 11 sets the reference coordinates of the object. For example, as shown in Fig. 6, the control unit 11 sets the reference coordinates C1 based on the predicted center position of the object B1. For example, the control unit 11 sets a plurality of reference coordinates C1.
[0055] Next, in step S22, the control unit 11 executes a detection process for detecting the detection point. Specifically, the control unit 11 causes the camera 2 to execute an imaging process, and acquires a captured image of the object from the camera 2. In addition, when the control unit 11 acquires the captured image, it executes a well-known image processing.
[0056] Next, in step S23, the control unit 11 obtains a plurality of detection points corresponding to the edge of the object by the image processing. In the example shown in Fig. 6, the control unit 11 obtains six detection points b1 to b6 corresponding to the outer periphery of the object B1 based on the captured image, and detects the position coordinates of each of the detection points b1 to b6.
[0057] Next, in step S24, the control unit 11 sets a judgment circle P0. For example, as shown in Fig. 6, the control unit 11 sets the judgment circle P0 with a radius equal to an average distance r1 between the reference coordinate C1 and each of the coordinates of the detection points b1 to b6.
[0058] Next, in step S25, the control unit 11 specifies the excluded detection points. Specifically, the control unit 11 specifies the excluded detection points to be excluded from the multiple detection points based on the distance from the outer periphery of the judgment circle P0 to each of the multiple detection points. For example, the control unit 11 specifies one or more detection points, among the multiple detection points, whose distance from the outer periphery of the judgment circle P0 with a radius r1 is greater than a preset threshold, as the excluded detection points. In the example shown in FIG. 7A, the control unit 11 specifies the detection point b4, whose distance is greater than the threshold, as the excluded detection point. Note that the control unit 11 may specify the excluded detection points based on the distance from the reference coordinate C1 to each detection point.
[0059] Next, in step S26, the control unit 11 detects the edge of the object and outputs the detection result. Specifically, the control unit 11 detects the edge of the object based on a plurality of detection points excluding the excluded detection point among the plurality of detection points. For example, as shown in FIG. 7A and FIG. 7B, the control unit 11 may detect a circle (edge P1) centered on the reference coordinate C1 as the edge of the object B1 by the least square method based on the position coordinates of the remaining detection points b1 to b3, b5, and b6 excluding the detection point b4 from the detection points b1 to b6. The control unit 11 outputs the detection result (edge P1). For example, the control unit 11 causes the operation display unit 13 to display the edge P1 superimposed on the captured image acquired from the camera 2. The control unit 11 may also cause the reference coordinate C1 to be identifiable on the captured image.
[0060] The control unit 11 executes the edge detection process in the above manner.
[0061] As described above, the edge detection device 1 according to the second embodiment acquires a plurality of detection points corresponding to the edges of an object based on an image obtained by capturing an image of the object, sets a judgment circle having a radius equal to an average distance between a reference coordinate preset according to a detection position of the object and the coordinates of each of the plurality of detection points, identifies an excluded detection point to be excluded from the plurality of detection points based on a distance from the outer periphery of the judgment circle to each of the plurality of detection points, and detects the edges of the object based on the plurality of detection points excluding the excluded detection point. Also, the edge detection device 1 identifies, from among the plurality of detection points, a detection point whose distance from the judgment circle is greater than a preset threshold as the excluded detection point.
[0062] According to the above configuration, since edges are detected based on a plurality of detection points excluding noise points, it is possible to improve the detection accuracy of the edges of circular objects with a simple configuration. Also, since edges are detected by excluding noise points using a judgment circle according to the reference coordinates, it is possible to appropriately detect the edges of circular objects.
[0063] [Other embodiments] As another embodiment of the edge detection device 1 according to the first embodiment, the control unit 11 may set a plurality of judgment straight lines L0. For example, as shown in Fig. 9A, when the edge of the object A1 is likely to be inclined with respect to the detection direction D1, the control unit 11 sets a first judgment straight line La perpendicular to the detection direction D1 (see Fig. 9), a second judgment straight line Lb rotated by +10 degrees with respect to the first judgment straight line La (see Fig. 9B), and a third judgment straight line Lc rotated by -10 degrees with respect to the first judgment straight line La (see Fig. 9C).
[0064] The control unit 11 identifies one of the three judgment lines La, Lb, and Lc rotated by a fixed value (here, 10 degrees) that has the smallest value when the maximum distance is subtracted from the sum of the distances between each judgment line and the detection point, and identifies an excluded detection point using the identified judgment line.
[0065] For example, the control unit 11 calculates (Ta) the value obtained by subtracting the maximum distance (the distance from the first judgment line La to the detection point a5) from the total value of the distances from the first judgment line La (see FIG. 9A) to each of the detection points a1 to a5, calculates (Tb) the value obtained by subtracting the maximum distance (the distance from the second judgment line Lb to the detection point a1) from the total value of the distances from the second judgment line Lb (see FIG. 9B) to each of the detection points a1 to a5, and calculates (Tc) the value obtained by subtracting the maximum distance (the distance from the third judgment line Lc to the detection point a1) from the total value of the distances from the third judgment line Lc (see FIG. 9C) to each of the detection points a1 to a5. Then, the control unit 11 identifies the judgment line with the smallest value among the calculated values Ta, Tb, and Tc, and identifies the excluded detection point using the identified judgment line.
[0066] The angle (fixed value) by which the judgment straight line is rotated is set arbitrarily depending on the degree of rotational variation of the object. According to the above configuration, even for objects that are often slanted during edge detection, noise points can be appropriately excluded from multiple detection points, making it possible to appropriately detect the edges of the object.
[0067] [Disclosure Note] The following will provide an outline of the disclosure extracted from the above-described embodiment. Note that the configurations and processing functions described in the following supplementary notes can be selected and combined in any desired manner.
[0068] <Appendix 1> 1. An edge detection system for detecting an edge of an object, comprising: an acquisition processing unit that acquires a plurality of detection points corresponding to edges of the object based on an image of the object; a setting processing unit that sets a determination graphic based on an average coordinate of the plurality of detection points; a specification processing unit that specifies an excluded detection point to be excluded from the plurality of detection points based on a distance from the judgment figure to each of the plurality of detection points; a detection processing unit that detects an edge of the object based on a plurality of detection points excluding the excluded detection points among the plurality of detection points; An edge detection system comprising:
[0069] <Appendix 2> the setting processing unit sets a determination straight line that has a gradient according to a detection direction of the edge of the object and passes through an average coordinate of each of the coordinates of the plurality of detection points; the identification processing unit identifies the excluded detection points based on a distance from the judgment line to each of the plurality of detection points. 2. The edge detection system of claim 1.
[0070] <Appendix 3> the identification processing unit identifies, as the excluded detection point, a detection point whose distance from the judgment straight line is greater than a preset threshold value among the plurality of detection points; 3. The edge detection system of claim 2.
[0071] <Appendix 4> the identification processing unit identifies a predetermined number of detection points as the excluded detection points from among the plurality of detection points in descending order of distance from the judgment straight line; 4. The edge detection system according to claim 2 or 3.
[0072] <Appendix 5> 1. An edge detection system for detecting an edge of an object, comprising: an acquisition processing unit that acquires a plurality of detection points corresponding to edges of the object based on an image of the object; a setting processing unit that sets a judgment circle having a radius equal to an average distance between a reference coordinate that is preset in accordance with a detection position of the object and each of the coordinates of the plurality of detection points; an identification processing unit that identifies an excluded detection point to be excluded from the plurality of detection points based on a distance from an outer periphery of the judgment circle to each of the plurality of detection points; a detection processing unit that detects an edge of the object based on a plurality of detection points excluding the excluded detection points among the plurality of detection points; An edge detection system comprising:
[0073] <Appendix 6> the identification processing unit identifies, as the excluded detection point, a detection point whose distance from the judgment circle is greater than a preset threshold value among the plurality of detection points; 6. The edge detection system of claim 5.
[0074] <Appendix 7> the identification processing unit identifies a predetermined number of detection points as the excluded detection points from among the plurality of detection points in descending order of distance from the judgment circle; 7. The edge detection system according to claim 5 or 6.
[0075] <Appendix 8> the detection processing unit detects an edge of the object using a least squares method based on a plurality of detection points excluding the excluded detection points among the plurality of detection points. An edge detection system according to any one of appendixes 1 to 7. [Explanation of symbols]
[0076] 1: Edge detection device 2: Camera 10: Edge detection system 11: Control section 12: Storage section 13: Operation display section 14: Communications Department 111: Acquisition processing unit 112: Setting processing section 113: Specific processing unit 114: Detection processing unit A1: Object B1: Object C1: Reference coordinates D1: Detection direction L0: Straight line for judgment P0: Judgment circle
Claims
1. 1. An edge detection system for detecting an edge of an object, comprising: an acquisition processing unit that acquires a plurality of detection points corresponding to edges of the object based on an image of the object; a setting processing unit that sets a determination graphic based on an average coordinate of the plurality of detection points; a specification processing unit that specifies an excluded detection point to be excluded from the plurality of detection points based on a distance from the judgment figure to each of the plurality of detection points; a detection processing unit that detects an edge of the object based on a plurality of detection points excluding the excluded detection points among the plurality of detection points; An edge detection system comprising:
2. the setting processing unit sets a determination straight line that has a gradient according to a detection direction of the edge of the object and passes through an average coordinate of each of the coordinates of the plurality of detection points; the identification processing unit identifies the excluded detection points based on a distance from the judgment line to each of the plurality of detection points. The edge detection system of claim 1 .
3. the identification processing unit identifies, as the excluded detection point, a detection point whose distance from the judgment straight line is greater than a preset threshold value among the plurality of detection points; The edge detection system of claim 2 .
4. the identification processing unit identifies a predetermined number of detection points as the excluded detection points from among the plurality of detection points in descending order of distance from the judgment straight line; The edge detection system of claim 2 .
5. 1. An edge detection system for detecting an edge of an object, comprising: an acquisition processing unit that acquires a plurality of detection points corresponding to edges of the object based on an image of the object; a setting processing unit that sets a judgment circle having a radius equal to an average distance between a reference coordinate that is preset in accordance with a detection position of the object and each of the coordinates of the plurality of detection points; an identification processing unit that identifies an excluded detection point to be excluded from the plurality of detection points based on a distance from an outer periphery of the judgment circle to each of the plurality of detection points; a detection processing unit that detects an edge of the object based on a plurality of detection points excluding the excluded detection points among the plurality of detection points; An edge detection system comprising:
6. the identification processing unit identifies, as the excluded detection point, a detection point whose distance from the judgment circle is greater than a preset threshold value among the plurality of detection points; The edge detection system of claim 5 .
7. the identification processing unit identifies a predetermined number of detection points as the excluded detection points from among the plurality of detection points in descending order of distance from the judgment circle; The edge detection system of claim 5 .
8. the detection processing unit detects an edge of the object using a least squares method based on a plurality of detection points excluding the excluded detection points among the plurality of detection points. The edge detection system according to any one of claims 1 to 7.
9. 1. A method for detecting an edge of an object, comprising: acquiring a plurality of detection points corresponding to edges of the object based on an image of the object; setting a determination graphic based on an average coordinate of the plurality of detection points; Identifying an excluded detection point to be excluded from the plurality of detection points based on a distance from the judgment graphic to each of the plurality of detection points; Detecting an edge of the object based on a plurality of detection points excluding the excluded detection points among the plurality of detection points; The edge detection method is executed by one or more processors.
10. 1. A method for detecting an edge of an object, comprising: acquiring a plurality of detection points corresponding to edges of the object based on an image of the object; setting a judgment circle having a radius equal to an average distance between a reference coordinate set in advance according to the detection position of the object and each of the coordinates of the plurality of detection points; Identifying an excluded detection point to be excluded from the plurality of detection points based on a distance from an outer periphery of the judgment circle to each of the plurality of detection points; Detecting an edge of the object based on a plurality of detection points excluding the excluded detection points among the plurality of detection points; The edge detection method is executed by one or more processors.
11. An edge detection program for detecting an edge of an object, acquiring a plurality of detection points corresponding to edges of the object based on an image of the object; setting a determination graphic based on an average coordinate of the plurality of detection points; Identifying an excluded detection point to be excluded from the plurality of detection points based on a distance from the judgment graphic to each of the plurality of detection points; Detecting an edge of the object based on a plurality of detection points excluding the excluded detection points among the plurality of detection points; An edge detection program for causing one or more processors to execute the above.
12. An edge detection program for detecting an edge of an object, acquiring a plurality of detection points corresponding to edges of the object based on an image of the object; setting a judgment circle having a radius equal to an average distance between a reference coordinate set in advance according to the detection position of the object and each of the coordinates of the plurality of detection points; Identifying an excluded detection point to be excluded from the plurality of detection points based on a distance from an outer periphery of the judgment circle to each of the plurality of detection points; Detecting an edge of the object based on a plurality of detection points excluding the excluded detection points among the plurality of detection points; An edge detection program for causing one or more processors to execute the above.
Citation Information
Patent Citations
Image processing method
JP2004272734A