Image processing device

JP7898384B2Active Publication Date: 2026-07-31DMG MORI CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
DMG MORI CO LTD
Filing Date
2021-11-10
Publication Date
2026-07-31

AI Technical Summary

Benefits of technology

【0010】 本発明によれば、工具形状を効率的に画像認識しやすくなる。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007898384000001
    Figure 0007898384000001
  • Figure 0007898384000002
    Figure 0007898384000002
  • Figure 0007898384000003
    Figure 0007898384000003
Patent Text Reader

Abstract

This image processing device comprises: an imaging execution unit which captures, with a camera, a first partial image including a part of a tool; a position specifying unit which specifies the next imaging position on the basis of a partial shape of the tool included in the first partial image; and a position control unit which changes the relative positions of the tool and the camera into a specified imaging position. The imaging execution unit captures a second partial image including a part of the tool at the next imaging position.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a technique for managing tool shapes in machine tools.

Background Art

[0002] Machine tools include devices for cutting a workpiece into a desired shape and devices for creating a workpiece by laminating metal powder or the like. Machine tools for cutting include a turning center that processes a workpiece by applying a cutting tool to a rotating workpiece, a machining center that processes a workpiece by applying a rotating cutting tool to a workpiece, and a compound machining machine that combines these functions.

[0003] The tool is fixed to a tool holding part such as a spindle or a tool post. The machine tool processes the workpiece while moving the tool post or the like according to a prepared machining program and selecting the tool to be applied to the workpiece.

[0004] When moving the tool post or the like three-dimensionally in a narrow machining chamber, it is necessary to control so that the tool does not contact the workpiece itself, equipment such as a tailstock (center support device) that supports the workpiece, or a vibration damper device. Since the shapes and sizes of the tools are various, even at a position where contact does not occur with a certain tool, contact may occur with another tool. Therefore, when registering a tool in a machine tool, it is necessary to register the tool ID and the tool shape in association with each other (see Patent Document 1, for example).

Prior Art Documents

Patent Documents

[0005]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0006] Generally, tool shape data is downloaded from the tool manufacturer's website and entered into the machine tool to register the tool ID and tool shape. However, this registration method is labor-intensive and requires significant verification to prevent input errors. [Means for solving the problem]

[0007] An image processing apparatus in one aspect of the present invention includes an imaging execution unit that captures a first partial image including a part of a tool using a camera, a position determination unit that determines the next imaging position based on the partial shape of the tool included in the first partial image, and a position control unit that changes the relative positions of the tool and the camera to the determined imaging position. The imaging unit captures a second partial image, including a portion of the tool, at the next imaging position.

[0008] An image processing apparatus in another aspect of the present invention includes: (1) a receiving unit that receives a first partial image including a part of a tool captured by a camera; (2) a second partial image including a part of the tool captured by changing the relative positions of the tool and the camera to the captured position based on the partial shape of the tool included in the first partial image; and an image processing unit that extracts first contour data of a part of the tool from the first partial image and second contour data of a part of the tool from the second partial image, and generates tool shape data of the tool based on the first contour data and the second contour data.

[0009] A machine tool in one aspect of the present invention includes a camera, a tool holder capable of mounting a tool, a machining control unit that processes a workpiece with a tool according to a machining program, an imaging execution unit that captures a first partial image including a part of the tool with the camera, a position identification unit that identifies the next imaging position based on the partial shape of the tool included in the first partial image, and a position control unit that changes the relative positions of the tool and the camera to the next imaging position. The imaging unit captures a second partial image, including a portion of the tool, at the next imaging position. [Effects of the Invention]

[0010] According to the present invention, it becomes easier to efficiently recognize the shape of a tool using image recognition. [Brief explanation of the drawing]

[0011] [Figure 1] This is an external view of a machine tool. [Figure 2] This is a schematic diagram showing the positional relationship between the tool, camera, and lighting device in the tool recognition area. [Figure 3] This is a hardware configuration diagram of a machine tool and an image processing device. [Figure 4] This is a functional block diagram of an image processing device. [Figure 5] This is a schematic diagram showing the positional relationship between the tool and the imaging area. [Figure 6] This is a schematic diagram showing the relationship between a tool and a partial image. [Figure 7] This is a flowchart showing the tool registration process. [Figure 8] Figure 7 is a flowchart showing the shape recognition process in S12. [Figure 9] This shows a partial image taken during the outline recognition process. [Figure 10] This is a diagram showing the first edge point image. [Figure 11] This shows a partial image taken during the direction determination process. [Figure 12] This figure shows the second edge point image. [Figure 13] This is a diagram showing the tool shape data of a tool. [Figure 14] This is a schematic diagram showing a partial image of the tool tip during detection in Modification Example 1. [Figure 15] This is a schematic diagram showing a partial image after tool movement in Modification Example 1. [Figure 16] This is a first schematic diagram showing a position control method when a second edge point is detected in the third region in modified example 2. [Figure 17]It is a second schematic diagram showing a position control method when a second edge point is detected in the third region in the second modification. [Figure 18] It is a first schematic diagram showing a position control method when a second edge point is detected in the sixth region in the second modification. [Figure 19] It is a second schematic diagram showing a position control method when a second edge point is detected in the sixth region in the second modification.

Embodiments for Carrying Out the Invention

[0012] FIG. 1 is an external view of a machine tool 100. The machine tool 100 in the present embodiment is a multi - tasking machine that processes a workpiece arranged in a machining area 200. The workpiece is fixed to a holding portion 104 and is cut by a tool 102 attached to a spindle, which is another holding portion. The holding portion 104 that holds the workpiece is rotationally driven by a drive mechanism.

[0013] When the tool 102 is inserted into the tool recognition area 210, the lower lighting device 108 illuminates the tool 102, and the upper camera 106 images the tool 102. Based on the imaging result at this time, the tool shape recognition described later is executed. The configuration of the tool recognition area 210 will be described in more detail in relation to FIG. 2 below.

[0014] The machine tool 100 includes a cover 202 that blocks the outside. The cover 202 includes a door 204. The user opens the door 204 to attach a workpiece to the machining area 200 and remove the workpiece from the machining area 200. The operation panel 206 receives various operations on the machine tool 10 from the user.

[0015] [[ID=2,8]]The operation panel 206 is connected to an image processing device 110. In the present embodiment, the machine tool 100 main body and the image processing device 110 are connected via a wired cable. The image processing device 110 may be formed as an internal device of the machine tool 100, for example, inside the operation panel 206.

[0016] The tool storage unit 130 stores multiple tools 102. A tool 102 is retrieved from the multiple tools 102 stored in the tool storage unit 130 by a tool changer (described later) and mounted on the spindle. As shown in Figure 1, the X and Y axes are set horizontally, and the Z axis is set vertically. The Y axis direction corresponds to the axis direction of the spindle and the workpiece.

[0017] Figure 2 is a schematic diagram showing the positional relationship between the tool 102, camera 106, and lighting device 108 in the tool recognition area 210. The tool 102 includes a cutting edge 112 used for machining the workpiece and a shank portion 114 which is fixed to the holder 118 of the spindle 116. The spindle 116 is configured to be rotatable and movable while holding the tool 102. The spindle 116, which also serves as a holder, can also rotate the tool it holds.

[0018] Camera 106 is equipped with an image sensor such as a CMOS (Complementary Metal Oxide Semiconductor) or a CCD (Charge-Coupled Device). Camera 106 images the tool 102 attached to the spindle 116 from above (in the Z-axis direction). Camera 106 is fixed in the tool recognition area 210. By rotating the tool 102 with the spindle 116 as its axis, the tool 102 can be imaged from multiple directions. In addition, by moving the tool 102 horizontally (in the XY direction) with the spindle 116, multiple locations on the tool 102 can be imaged.

[0019] An illumination device 108 is fixed below the camera 106, facing it. The illumination device 108 illuminates the tool 102 from below. Through transmitted illumination by the illumination device 108, the camera 106 can acquire a high-contrast image that makes it easy to determine the contour position of the tool 102.

[0020] When a user registers a new tool 102, they set the control panel 206 to tool registration mode and attach the tool 102 to the spindle 116. Next, they enter an arbitrary tool ID. The spindle 116 moves and rotates the tool 102, and the fixed camera 106 automatically images the tool 102 from various positions and directions. From the numerous images obtained by the camera 106, the tool shape is recognized, and the tool ID and tool shape are registered in association. This control method allows for automatic registration of tool shapes. Details of the tool shape recognition method will be described later.

[0021] The camera 106 in this embodiment has a resolution of approximately 1 million pixels (1224 x 1024). The imaging area is approximately 300 mm x 300 mm. The camera 106 can acquire up to 80 images per second.

[0022] Figure 3 is a hardware configuration diagram of the machine tool 100 and the image processing device 110. The machine tool 100 includes an operation control device 120, a machining control device 122, a machining device 124, a tool changing unit 126, and a tool storage unit 130. The machining control device 122, which functions as a numerical control device, transmits control signals to the machining device 124 according to the machining program. The machining device 124 moves the spindle 116 to machine the workpiece according to instructions from the machining control device 122.

[0023] The operation control device 120 includes an operation panel 206 and controls the machining control unit 122. The tool storage unit 130 stores tools. The tool changing unit 126 corresponds to a so-called ATC (Automatic Tool Changer). The tool changing unit 126 retrieves a tool from the tool storage unit 130 and replaces the tool in the spindle 116 with the retrieved tool, according to the exchange instruction from the machining control unit 122.

[0024] The image processing device 110 primarily performs image processing such as tool shape recognition. As described above, the image processing device 110 may be configured as part of the operation control device 120.

[0025] Figure 4 is a functional block diagram of the image processing device 110. Each component of the image processing apparatus 110 is realized by hardware including a CPU (Central Processing Unit) and various computer processors, memory and storage devices, and wired or wireless communication lines connecting them, as well as software stored in the storage devices that supplies processing instructions to the arithmetic units. The computer program may consist of device drivers, an operating system, various application programs located at a higher layer, and libraries that provide common functions to these programs. The blocks described below represent functional units, not hardware units.

[0026] Furthermore, the operation control device 120 and the processing control device 122 may also be implemented on a separate operating system from the image processing device 110, including hardware such as a processor or other arithmetic unit, memory or storage device, and wired or wireless communication lines connecting them, as well as software or programs stored in the storage device that supply processing instructions to the arithmetic unit.

[0027] The image processing device 110 includes a user interface processing unit 140, a data processing unit 142, and a data storage unit 144. The user interface processing unit 140 accepts user input and is responsible for processing related to the user interface, such as displaying images and outputting sound. The data processing unit 142 executes various processes based on the data acquired by the user interface processing unit 140 and the data stored in the data storage unit 144. The data processing unit 142 also functions as an interface to the user interface processing unit 140 and the data storage unit 144. The data storage unit 144 stores various programs and configuration data.

[0028] The user interface processing unit 140 includes an input unit 146 and an output unit 148. The input unit 146 receives input from the user via a touch panel or a hardware device such as a handle. The output unit 148 provides the user with various information via image display or audio output. The input unit 146 includes an ID reception unit 150 that receives input of a tool ID.

[0029] The data processing unit 142 includes an imaging execution unit 152, a position identification unit 154, a position control unit 156, a shape reproduction unit 158, a first edge detection unit 160, a second edge detection unit 162, an image conversion unit 164, a tool registration unit 166, and a movable adjustment unit 168. The imaging execution unit 152 instructs the camera 106 to acquire an image. The position determination unit 154 calculates the direction of movement of the spindle 116 when imaging the tool 102 using the method described later. The position control unit 156 moves the spindle 116 when imaging the tool 102. The shape reproduction unit 158 ​​generates "tool shape data," which is data indicating the three-dimensional shape of the tool 102, based on the image. The first edge detection unit 160 detects "first edge points" indicating the contour positions of the tool 102. The second edge detection unit 162 also detects "second edge points" indicating the contour positions of the tool 102. The image conversion unit 164 changes the resolution of the image.

[0030] The tool registration unit 166 associates the tool ID with the tool shape data and registers it in the data storage unit 144. The tool ID and tool shape data may also be provided from the image processing device 110 to the operation control device 120. The movable adjustment unit 168 is a so-called interference check module and identifies the movable range (movable range) of the spindle 116 based on the type of machine tool 100, the shape of the workpiece, and the tool shape data of the tool 102 being used. Depending on the shape and size of the tool 102, the position where the spindle 116 interferes with other objects such as the workpiece will differ. Based on the tool shape data, the movable adjustment unit 168 identifies the movable range of the spindle 116 according to the tool being used. The machine tool 100 moves the spindle 116 within its movable range.

[0031] Figure 5 is a schematic diagram showing the positional relationship between the tool 102 and the imaging area 170. The imaging area 170 is located directly below the light-receiving surface of the camera 106. The camera 106 images objects within the range of the imaging area 170. The position control unit 156 inserts the tool 102 into the imaging area 170 by moving the main spindle 116. Since the imaging area 170 is smaller than the tool 102, it is not possible to image the entire tool 102 at once.

[0032] If the lens of the camera 106 is enlarged to increase the imaging area 170, it will lead to an increase in the cost of the camera 106. Also, if a large camera 106 is installed in the tool recognition area 210, the space of the machining area 200 will be reduced, which is undesirable. For this reason, in this embodiment, a relatively small camera 106 is used to image the tool 102 in multiple stages, and a method is adopted in which the overall shape of the tool 102 is recognized based on the multiple captured images.

[0033] As the number of movements of the tool 102 and the number of images acquired increase, the tool shape recognition process (hereinafter referred to as "shape recognition process") takes longer. In order to improve the efficiency of the shape recognition process, it is necessary to move the tool 102 efficiently so as not to acquire images that are unnecessary for recognizing the tool shape, specifically images that do not show the outline of the tool 102. Hereafter, an image captured by camera 106 of a portion of tool 102 will be referred to as a "partial image".

[0034] Figure 6 is a schematic diagram showing the relationship between the tool 102 and the partial image. During tool registration, the position control unit 156 moves the tool 102 (spindle 116) at a constant speed in the negative Y-axis direction, that is, in the direction away from the tip of the tool 102 to the imaging area 170. The imaging execution unit 152 constantly monitors the imaging area 170. The live view image in the imaging area 170 is transmitted from the camera 106 to the image processing device 110. When the tip of the blade portion 112 is detected in the imaging area 170 (live view image), the imaging execution unit 152 instructs the camera 106 to acquire an image (partial image). Upon receiving the instruction, the camera 106 acquires the first partial image and stores it in memory. In Figure 6, the partial image P1 is acquired first.

[0035] Next, the position control unit 156 moves the tool 102 (spindle 116) further in the negative Y-axis direction. At this time, to ensure that the outline of the tool 102 does not move outside the imaging area 170, the position control unit 156 also moves the spindle 116 slightly in the negative X-axis direction (details will be described later). After the movement, the imaging execution unit 152 instructs the camera 106 to acquire a partial image, and the camera 106 saves the second partial image P2 to memory. In this way, the position control unit 156 moves the spindle 116 appropriately to the left and right (X-direction) while gradually moving the spindle 116 in the negative Y-axis direction.

[0036] The imaging execution unit 152 instructs the camera 106 to take images (acquire partial images) in accordance with the movement of the spindle 116, and partial images P1 to P8 are acquired. Based on the multiple partial images P1 to P8, the shape reproduction unit 158 ​​generates the contour of the tool 102, that is, the tool shape data of the tool 102. By appropriately moving the spindle 116, the contour of the tool 102 can be appropriately recognized by image recognition while reducing the number of times partial images are acquired.

[0037] Figure 7 is a flowchart showing the tool registration process. Tool registration is performed after the user enters the tool ID. When the tool 102 to be registered is attached to the spindle 116 and the user enters the tool ID, the position control unit 156 sets the rotation angle of the spindle 116 (e.g., 0 degrees) (S10). Hereinafter, the rotation angle of the spindle 116 will be referred to as the "spindle rotation angle". In this embodiment, the tool 102 is rotated in 12-degree increments, and shape recognition processing is performed for a total of 30 different angles (=360 ÷ 12).

[0038] After setting the spindle rotation angle, the position control unit 156 moves the spindle 116 in the XY direction, and the imaging execution unit 152 performs shape recognition processing by acquiring multiple partial images (S12). Details of the shape recognition processing will be described later in relation to Figure 8. In the shape recognition processing, the contour of the tool 102 is identified as point sequence data at the set spindle rotation angle. If there are still unset spindle rotation angles remaining (N in S14), the process returns to S10 and the next rotation angle (e.g., 12 degrees) is set. When the shape recognition processing has been performed for all 30 types of spindle rotation angles (Y in S14), the shape reproduction unit 158 ​​generates tool shape data showing the three-dimensional shape of the tool 102 from the point sequence data obtained for multiple spindle rotation angles (S16). The tool registration unit 166 associates the tool ID with the tool shape data and registers it in the data storage unit 144 (S18).

[0039] Figure 8 is a flowchart showing the shape recognition process in S12 of Figure 7. After setting the spindle rotation angle, the position control unit 156 moves the spindle 116 in the negative Y-axis direction, and the imaging execution unit 152 captures a partial image (S20). The first edge detection unit 160 detects a first edge point indicating the contour of the tool 102 from the partial image (as will be described later in relation to Figure 9), thereby recognizing the external position of the tool 102 in the partial image (S22). Next, the position identification unit 154 identifies the next imaging position, in other words, the direction of movement of the spindle 116, based on the partial image of the tool 102 (S24). The method for identifying the direction of movement will be described later in relation to Figure 11.

[0040] When it is necessary to capture the next partial image (N in S26), the position control unit 156 moves the tool 102 (spindle 116) in the movement direction specified in S24 (S28). When the spindle 116 has been moved a predetermined distance in the negative Y-axis direction, the imaging is complete (Y in S26), and the process moves to S14 in Figure 7.

[0041] As described above, the shape recognition process includes the process in S22 for image recognition of the contour of the tool 102 (hereinafter referred to as the "outline recognition process") and the process in S24 for determining the next direction of movement of the tool 102 (hereinafter referred to as the "direction determination process"). Next, the outline recognition process and the direction determination process will be described.

[0042] Figure 9 shows a partial image 290 when performing the outline recognition process. Figure 10 shows the first edge point image 190. The partial image 290 displays the silhouette of the tool 102 projected from below by the illumination device 108. The first edge detection unit 160 sets a scan line 180a in the positive X-axis direction and detects a point located at the boundary between the dark region 182 (the silhouette region where the tool 102 exists) and the bright region 184 (the region where the tool 102 does not exist) as the first edge point 192. The first edge detection unit 160 detects multiple first edge points 192 while shifting the scan line 180a at a constant pitch.

[0043] Similarly, the first edge detection unit 160 sets a scan line 180b in the negative Y-axis direction and detects a first edge point 192 located at the boundary between the dark region 182 and the bright region 184. The first edge detection unit 160 detects multiple first edge points 192 while shifting the scan line 180b at a constant pitch.

[0044] Furthermore, the first edge detection unit 160 sets a scan line 180c in the positive Y-axis direction and detects a first edge point 192 located at the boundary between the dark region 182 and the bright region 184. The first edge detection unit 160 detects multiple first edge points 192 while shifting the scan line 180c at a constant pitch.

[0045] In this way, by setting scan lines 180a, 180b, and 180c from three directions, multiple first edge points 192 are detected, and the first edge point image 190 shown in Figure 10 is obtained. The multiple first edge points 192 included in the first edge point image 190 provide point sequence data indicating the contour of the tool 102. In this embodiment, the processing time required for outline recognition processing per partial image is approximately 200 to 250 milliseconds.

[0046] Figure 11 shows a partial image 290 when direction determination processing is performed. Figure 12 shows the second edge point image 260. The image conversion unit 164 sets the resolution of the partial image 290 to one-eighth of its normal resolution when performing direction determination processing. The reason for reducing the resolution is to reduce the load and speed up the direction determination processing by suppressing the number of pixels to be processed. While it is desirable to use a high-resolution partial image 290 for shape recognition processing to recognize the shape of the tool 102, it is more appropriate to use a low-resolution partial image 290 for direction determination processing, as it only needs to identify the next imaging position.

[0047] A reference point 250 is set at a predetermined position in the partial image 290. In this embodiment, the reference point 250 is set at the center of the partial image. In addition, an arbitrary reference line 252 is set that passes through the reference point 250. In this embodiment, the reference line 252 is set in the first quadrant of the XY plane when the reference point 250 is the origin.

[0048] The second edge detection unit 162 sets a scan line 254a in the positive X-axis direction and detects a point located at the boundary between the dark region 182 and the bright region 184 as a second edge point 194. The second edge detection unit 162 detects multiple second edge points 194 while shifting the scan line 254a at a constant pitch. Similarly, the second edge detection unit 162 sets a scan line 254b in the negative X-axis direction and detects a point located at the boundary between the dark region 182 and the bright region 184 as a second edge point 194. The second edge detection unit 162 detects multiple second edge points 194 while shifting the scan line 254b at a constant pitch.

[0049] The second edge detection unit 162 sets a scan line 254c in the negative Y-axis direction and detects multiple second edge points 194 in the same manner while shifting the scan line 254c at a constant pitch. The second edge detection unit 162 sets a scan line 254d in the positive Y-axis direction and detects multiple second edge points 194 while shifting the scan line 254d at a constant pitch.

[0050] In this way, by setting scan lines 254a, 254b, 254c, and 254d from four directions, multiple second edge points 194 are detected, and the second edge point image 260 shown in Figure 12 is obtained. Because the partial image was reduced in resolution, the number of second edge points 194 is less than the number of first edge points 192.

[0051] Next, the positioning unit 154 sets a verification line 262 connecting the reference point 250 and the second edge point 194. The positioning unit 154 calculates the angle between the verification line 262 and the reference line 252 (hereinafter referred to as the "edge angle") and identifies the second edge point 194A, which has the smallest edge angle, as the "selected second edge point". In the second edge point image 260, the edge angle is smallest when the second edge point 194A is selected. Based on the verification line 262A at this time, the positioning unit 154 determines the next imaging position.

[0052] As shown in Figure 12, the second edge point 194A (selected second edge point), selected by the positioning unit 154 based on the edge angle, is set on the side furthest from the tip of the tool 102, in other words, on the root side of the tool 102 when viewed from the reference point 250 set in the second edge point image 260. Subsequently, the positioning unit 154 determines the next imaging position so that the second edge point 194A moves to the lower half of the tool 102's length direction (Y-axis direction in Figure 12) (upper: root side of the tool 102, lower: tip side of the tool 102). The positioning unit 154 also determines the next imaging position so that the second edge point 194A moves towards the center of the tool 102's diameter direction (X-axis direction in Figure 12). In Figure 12, the second edge point 194A (selected second edge point) is located on the positive Y-axis side (upper side) and negative X-axis side (left side) of the second edge point image 260. Therefore, the positioning unit 154 moves the tool 102 along the movement vector 264 (negative Y-axis and positive X-axis) to change the relative position of the imaging area 170 and the tool 102 so that the second edge point 194A (selected second edge point) moves downward and towards the center.

[0053] In other words, the positioning unit 154 moves the tool 102 (spindle 116) along the verification line 262A in the direction shown by the movement vector 264 in Figure 12. At this time, the Y component (insertion direction) of the movement vector 264 of the tool 102 may be kept constant. That is, the positioning control unit 156 adjusts the magnitude of the X component of the movement vector 264 of the tool 102 according to the magnitude of the minimum edge angle. When the tool 102 moves in the direction of the movement vector 264, the second edge point 194A (point indicating the contour line) moves towards the center in the next partial image 290. With this control method, it is possible to control the system so that the contour line of the tool 102 does not fall outside the imaging area 170, in other words, so that partial images that do not include the contour line are not captured. In this embodiment, the processing time required for direction determination processing per partial image is about 10 to 20 milliseconds.

[0054] Figure 13 shows the tool shape data of tool 102. The position control unit 156 sets the spindle rotation angle with respect to the Y-axis of the tool 102, and then moves the tool 102 in the negative Y-axis direction while also moving the tool 102 in the X-axis direction based on the edge angle. A partial image 290 is acquired in the imaging area 170, and the outline of the tool 102 is determined by detecting the first edge point 192 from the partial image 290. After detecting the first edge point 192, the position control unit 156 adjusts the next imaging position by detecting the second edge point 194. Multiple partial images are acquired for each spindle rotation angle. Next, the position control unit 156 rotates the tool 102 by 12 degrees and performs the same process for the next spindle rotation angle.

[0055] If 10 partial images 290 are acquired for each spindle rotation angle, a total of 300 partial images 290 can be acquired with 30 different spindle rotation angle settings. From these partial images 290, the point sequence data shown in the first edge point image 190 is obtained. The shape reproduction unit 158 ​​combines the point sequence data from each partial image 290 to generate the tool shape data shown in Figure 13, that is, the point sequence data representing the three-dimensional shape of the tool 102.

[0056] [Summary] The image processing device 110 and the machine tool 100 have been described above based on the embodiments. According to this embodiment, after the user mounts the tool 102 on the spindle 116 and enters the tool ID, tool shape data is automatically generated, and the tool ID and tool shape data are registered in association. The number of tools 102 registered in the tool storage unit 130 may reach several dozen. Therefore, automating the registration of tool shape data has a significant effect on improving the work efficiency of the machine tool 100.

[0057] In this embodiment, a small camera 106 is used that images only a portion of the tool 102. Using a small camera 106 reduces the cost of the camera 106 and also contributes to saving space in the machining area 200. By performing direction determination processing on the second edge point image 260, the outer shape of the tool 102 can be appropriately recognized while reducing the number of times partial images 290 are acquired. Partial images 290 that are unnecessary for the shape recognition of the tool 102 are images that do not show the outline of the tool 102. The position determination unit 154 controls the camera 106 to always capture the outer shape of the tool 102 by adjusting the amount of movement in the X-axis direction based on the edge angle.

[0058] Furthermore, the direction determination process is accelerated by reducing the resolution of the partial images used for direction determination compared to the partial images used for shape recognition. By recognizing the outer shape of the tool 102 with high-resolution partial images and determining the direction of movement of the tool 102 with low-resolution partial images, both image recognition accuracy and speed are achieved.

[0059] It should be noted that the present invention is not limited to the embodiments and modifications described above, and the components can be modified and implemented without departing from the spirit of the invention. Various inventions may be formed by appropriately combining multiple components disclosed in the embodiments and modifications described above. In addition, some components may be deleted from all the components shown in the embodiments and modifications described above.

[0060] [Differentiation] The shape reproduction unit 158 ​​was described as generating tool shape data as point sequence data (see Figure 13). The shape reproduction unit 158 ​​may also generate tool shape data as polygons by applying a texture to the point sequence data.

[0061] In this embodiment, the camera 106 was fixed and the tool 102 (spindle 116) was moved. As a variation, the tool 102 (spindle 116) may be fixed and the camera 106 may be moved. Alternatively, both the camera 106 and the tool 102 (spindle 116) may be moved. In any case, partial images can be acquired by changing the relative positions of the camera 106 and the tool 102.

[0062] In this embodiment, the shape recognition process is described as being followed by the direction determination process. As a modification, the shape recognition process and the direction determination process may be executed in parallel.

[0063] In this embodiment, it has been explained that a first edge point 192 is detected for the recognition of the outer shape of the tool 102, and a second edge point 194 is detected for the direction control of the tool 102 (spindle 116). As a modification, the positioning unit 154 may determine the direction of movement of the tool 102 by calculating a verification line 262 and an edge angle based on the first edge point 192.

[0064] The image processing device 110 may include a receiving unit and an image processing unit. The receiving unit of the image processing device machine tool 100 receives a first partial image from the camera 106 that includes a part of the tool 102. Similarly, it receives a second partial image from the camera 106 that includes another part of the tool 102. That is, the camera 106 or an imaging processing device equipped with the camera 106 may include the functions of an imaging execution unit 152, a position identification unit 154, a position control unit 156, a second edge detection unit 162, and an image conversion unit 164. The image processing unit of the image processing device 110 includes the functions of a shape reproduction unit 158 ​​and a first edge detection unit 160.

[0065] The image processing unit of the image processing device 110 acquires a first partial image (for example, partial image P1 in Figure 6) and a second partial image (for example, partial image P2 in Figure 6) corresponding to the next imaging position from the camera 106, etc. The same applies to subsequent partial images (partial image P3). The image processing unit extracts first contour data indicating the contour of the tool 102 from the first partial image and second contour data indicating the contour of the tool 102 from the second partial image. The method for extracting contour data is the same as the method described in relation to Figures 11 and 12. The image processing unit may then reconstruct the tool contour data of the tool 102 based on the contour data (point cloud) obtained from the multiple partial images.

[0066] In this embodiment, the spindle rotation angle is set to a predetermined angle, and the tool 102 is imaged sequentially from the tip to the base, with the spindle rotation angle being changed after the imaging is complete. However, the invention is not limited to this, and the tool 102 may be continuously imaged by the camera 106 while the tool 102 is rotating. For example, the rotation timing of the spindle 116 and the imaging timing of the camera 106 may be synchronized so that the tool 102 is rotated by a predetermined angle every t seconds, and the camera 106 images the tool 102 every t seconds, thereby imaging the camera 106 from multiple angles while it is rotating. When the camera 106 has completed one rotation at a predetermined position, the camera 106 may be moved horizontally in the XY direction, and the camera 106 may be imaged again from multiple angles at a different position.

[0067] Camera 106 may image the tool 102 at regular time intervals. At this time, camera 106 may transmit a synchronization signal to image processing device 110 in accordance with the imaging timing. Image processing device 110 may control the timing of the movement or rotation of the tool 102 in accordance with this synchronization signal.

[0068] It is possible that the imaging timing of camera 106 and the rotation timing of the spindle rotation angle may not perfectly coincide. Camera 106 may transmit a synchronization signal to the machining control unit 122 and the image processing device 110 at the imaging timing, and the image processing device 110 may measure the spindle rotation angle of spindle 116 when it receives this synchronization signal. For example, suppose the tool 102 is imaged by camera 106 at the timing when the spindle rotation angle is set to 36 degrees. However, imaging may be performed when the rotation of spindle 116 is not completely finished, for example, when the spindle rotation angle is 35.99 degrees. In this case, the machining control unit 122 may measure the actual spindle rotation angle at the imaging timing, and the imaging execution unit 152 may save the partial image in association with the actual spindle rotation angle. With such a control method, the actual spindle rotation angle in the partial image (imaging image) can be accurately recorded, making it easier to reproduce the tool contour data more accurately.

[0069] The image processing device 110 may further perform the steps of: capturing a partial image including a part of the tool 102 with the camera 106; determining the next imaging position based on the partial shape of the tool 102 included in the partial image; changing the relative positions of the tool 102 and the camera 106 to the determined imaging position; and capturing a partial image including a part of the tool 102 at the next imaging position.

[0070] Various computers exemplified in the image processing device 110 may execute a computer program that performs the following functions: capturing a partial image including a part of the tool 102 using the camera 106; determining the next imaging position based on the partial shape of the tool 102 included in the partial image; changing the relative positions of the tool 102 and the camera 106 to the determined imaging position; and capturing a partial image including a part of the tool 102 at the next imaging position.

[0071] Figure 14 is a schematic diagram showing a partial image of the tool tip detection in Modification Example 1. In the partial image 290 (imaging area 170), the position identification unit 154 identifies the tip of the tool 102 (hereinafter referred to as the "tool tip"). The center of the partial image 290 is the reference point 250. In the partial image 290, the lower side of the paper (positive Y-axis direction) in Figure 14 is referred to as the "lower side," and the upper side of the paper (negative Y-axis direction) is referred to as the "upper side."

[0072] The direction in which the tool 102 extends is called the "tool length direction," and the radial direction (short side direction) of the tool 102 is called the "tool radial direction." The line in the Y-axis direction that passes through the reference point 250 is called the "center line 292." In addition, the direction approaching the center line 292 in the tool radial direction is called the "center side," and the direction moving away from the center line 292 is called the "end side."

[0073] When the partial image 290 is divided into four equal parts with reference point 250 as the center, the upper right region is called the first region C1, the upper left region is called the second region C2, the lower left region is called the third region C3, and the lower right region is called the fourth region C4.

[0074] The positioning unit 154 identifies a plurality of second edge points 194 in a manner similar to that described in relation to Figures 11 and 12. In modified example 2, the positioning unit 154 selects the second edge point 194 furthest from the reference point 250. In Figure 14, the second edge points 194 furthest from the reference point 250 are second edge point 194B and second edge point 194C. The positioning unit 154 selects from second edge point 194B and second edge point 194C that lies on the first region C1 or the center line 292. In Figure 14, second edge point 194B, which is in the first region C1, is selected. The position control unit 156 instructs the machining control unit 122 on the direction of movement of the tool 102 so that the selected second edge point 194B (selected second edge point) and the reference point 250 overlap.

[0075] Figure 15 is a schematic diagram showing a partial image after tool movement in Modification Example 1. As the tool 102 moves, the second edge point 194B and the reference point 250 coincide. The position control unit 156 again selects the second edge point 194E, which is furthest from the reference point 250. However, the second edge point 194E does not satisfy the condition "on the first region C1 or on the center line 292". At this time, the position control unit 156 selects the second edge point 194D, which is the next furthest from the second edge point 194E. The second edge point 194D is on the center line 292 and therefore satisfies the above condition. At this time, the position control unit 156 instructs the machining control unit 122 on the direction of movement so that the second edge point 194D (selected second edge point) and the reference point 250 overlap. In the modified example 1, multiple partial images 290 are obtained from the tool 102 by repeating this control.

[0076] Figure 16 is a first schematic diagram showing the position control method when a second edge point is detected in the third region in modified example 2. In the modified example 2, the partial image 290 is divided into six regions, from the first region D1 to the sixth region D6, as shown in Figure 16. Here, it is assumed that the second edge point 194F (the second edge point 194 furthest from the reference point 250) is detected in the upper left third region D3.

[0077] Figure 17 is a second schematic diagram showing the position control method when a second edge point is detected in the third region in modified example 2. In the modified example 2, the position control unit 156 instructs the machining control unit 122 on the direction of movement of the tool 102 so that the second edge point 194F is included in the fifth region D5. As shown in Figure 17, when the second edge point 194E is detected in the third region D3, the tool 102 will move in both the Y direction (tool length direction) and the X direction (tool diameter direction).

[0078] Figure 18 is a first schematic diagram showing the position control method when a second edge point is detected in the sixth region in modified example 2. Here, we assume that the second edge point 194G (the second edge point 194, which is furthest from the reference point 250) is detected in the sixth region D6 in the lower left.

[0079] Figure 19 is a second schematic diagram showing the position control method when a second edge point is detected in the sixth region in modified example 2. Similar to Figures 16 and 17, the position control unit 156 instructs the machining control unit 122 on the direction of movement of the tool 102 so that the second edge point 194G is included in the fifth region D5. As shown in Figure 19, when the second edge point 194G is detected in the sixth region D6, the tool 102 will move in the X direction (radial direction of the tool).

[0080] In this way, the position identification unit 154 detects multiple second edge points 194 and selects a second edge point 194 located in the upper half (first region D1 to third region D3) of the partial image 290 (imaging area 170). In Figures 17 to 19, it is explained that the second edge point 194 furthest from the reference point 250 is selected, but any second edge point 194 in the upper half may be selected. The position control unit 156 instructs the machining control unit 122 on the direction of movement of the tool 102 so that the selected second edge point 194 is located in the middle region (fifth region D4) of the lower half which is divided into three parts.

Claims

1. A second edge detection unit detects a plurality of second edge points indicating the external shape position of the tool in a first partial image including a part of the tool, From among the plurality of second edge points, a second edge point located on the side furthest from the tip of the tool is selected as the next imaging position, and a movement determination unit determines the direction of movement of the relative position of the camera and the tool so that the selected second edge point is located in the lower half of the tool length direction of the first partial image and on the central side in the tool radial direction. A position control unit that changes the relative position of the tool and the camera based on the direction of movement, In the first partial image, a first edge detection unit detects a plurality of first edge points indicating the external position of the tool, A shape reproduction unit that forms tool shape data indicating the outer shape of the tool based on a plurality of first edge points detected from the first partial image, The system includes an image conversion unit that converts the first partial image into a low-resolution image, The second edge detection unit detects the second edge point from the low-resolution first partial image, An image processing apparatus that causes the camera to capture a second partial image, which includes the selected second edge point and a part of the tool, at the next imaging position.

2. A second edge detection unit detects a plurality of second edge points indicating the external shape position of the tool in a first partial image including a part of the tool, Of the plurality of second edge points, the second edge point that minimizes the relative angle between a predetermined reference line extending from a predetermined reference point in the first partial image and a verification line connecting the reference point and the second edge point is selected as the second edge point in order to determine the next imaging position, and the position determination unit determines the direction of movement of the relative positions of the camera and the tool in the direction that the selected second edge point approaches the reference point, A position control unit that changes the relative position of the tool and the camera based on the direction of movement, In the first partial image, a first edge detection unit detects a plurality of first edge points indicating the external position of the tool, A shape reproduction unit that forms tool shape data indicating the outer shape of the tool based on a plurality of first edge points detected from the first partial image, The system includes an image conversion unit that converts the first partial image into a low-resolution image, The second edge detection unit detects the second edge point from the low-resolution first partial image, An image processing apparatus that causes the camera to capture a second partial image, which includes the selected second edge point and a part of the tool, at the next imaging position.

3. The image processing apparatus according to claim 1, wherein in the first partial image, the second edge point is selected as the point at which the relative angle between a predetermined reference line extending from a predetermined reference point and a verification line connecting the reference point and the second edge point is minimized, and the direction of movement of the relative positions of the camera and the tool is determined in the direction that the selected second edge point approaches the reference point.

4. The image processing apparatus according to any one of claims 1 to 3, wherein, when the camera and the tool are moved relative to each other, the first partial image of the tool is captured when the tip of the tool is detected in the imaging range.

5. The position control unit further changes the relative angle between the tool and the camera, The image processing apparatus according to any one of claims 1 to 4, wherein, in imaging by the camera, partial imaging is performed for each of multiple types of relative angles.

6. An ID reception unit that accepts input of a tool ID to identify a tool, The image processing apparatus according to claim 1, further comprising a tool registration unit that registers tool IDs and tool shape data in association.