Method for correcting to-be-processed consumables, related method and related equipment
By turning the image taken by the camera in the processing equipment, and obtaining the accurate viewing angle image of the consumables to be processed, the processing error problem caused by inaccurate images in the prior art is solved, and the processing effect and user experience are improved.
Patent Information
- Application Number
- CN202510360112.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-03-21
- Filing Date
- 2025-03-25
- Publication Date
- 2025-06-27
AI Technical Summary
In the prior art, incompletely accurate top view of the images taken by the camera leads to large errors between the processing results and the user's creative intentions, affecting the processing effect.
By using the first camera in the processing equipment to obtain the image of the consumables to be processed, and perform the positive processing based on the parameters of the camera to display an accurate top-view viewing angle image. The user can select the target thickness measurement area on this basis, control the tool head to move to the actual thickness measurement area, obtain the first height, and further perform the image positive processing.
It realizes accurate top-view image acquisition of consumables to be processed, improves the compliance of processing results with user creative intentions, and improves processing effect and user experience.
Smart Images

Figure CN120224008A_ABST
Abstract
Description
[0001] This application claims the priority of a Chinese patent application titled "Image Righting Method and Related Devices" with an application number of 202510342123.1 and filed with the Chinese Patent Office on March 21, 2025. The entire content thereof is incorporated herein by reference. Technical Field
[0002] This application relates to the field of image processing technologies, and in particular, to a method for righting a consumable to be processed, related methods, and related devices. Background Art
[0003] Processing devices, such as 3D printers, (laser) cutting machines, laser engraving machines, etc., can provide processing methods such as printing, cutting, and engraving, and can be used to manufacture complex items that cannot be achieved by traditional manufacturing technologies (such as injection molding or manual assembly). For subtractive processing, such as cutting, laser engraving, etc., after the user places the consumable to be processed on the processing platform, an image containing the consumable to be processed is required, and operations such as content creation and regional processing are performed based on this image. In the prior art, the image captured by the camera is not a completely accurate top view, resulting in a large error between the actual processing result and the user's creative intention, which affects the processing effect. Summary of the Invention
[0004] In view of this, this application provides a method for righting a consumable to be processed, related methods, and related devices, which can obtain an accurate top view image of the consumable to be processed, and further make the actual processing result more consistent with the user's creative intention, improving the processing effect and user experience.
[0005] In a first aspect, an embodiment of this application provides a method for righting a consumable to be processed. This method is applied to a processing device, which includes a processing platform, a tool head, and a first camera. The shooting angle of the first camera is inclined to the plane where the processing platform is located. The processing platform is used to place the consumable to be processed. The method includes:
[0006] Controlling the first camera to obtain a first image including the consumable to be processed;
[0007] Displaying a second image of the consumable to be processed at a terminal device connected to the processing device. The second image is obtained by performing a righting process on the first image based on the parameters of the first camera;
[0008] In response to the user selecting a target thickness measurement area of the consumable to be processed in the second image, controlling the tool head to move to an actual thickness measurement area of the consumable to be processed corresponding to the target thickness measurement area, and obtaining a first height of the consumable to be processed in the actual thickness measurement area;
[0009] Based on the first height and the parameters of the first camera, the first image is normalized, and a third image of the consumable material to be processed is displayed on the terminal device.
[0010] In a possible implementation, the tool head includes a 3D printing head and an engraving laser head or a cutting head detachably connected to the 3D printing head, and the second camera is fixedly mounted on the 3D printing head.
[0011] In a possible implementation, the processing equipment further includes a second camera and a line laser, wherein the second camera is fixed on the tool head; the line laser is connected to the engraving laser head;
[0012] The step of controlling the tool head to move to an actual thickness measurement area in the consumable to be processed corresponding to the target thickness measurement area to obtain a first height of the consumable to be processed in the actual thickness measurement area includes:
[0013] After controlling the tool head to move above the actual thickness measurement area, controlling the line laser to emit laser light to the consumable to be processed, and using the second camera to shoot while controlling the processing platform to move in the vertical direction, so as to obtain a fourth image including the actual thickness measurement area;
[0014] Based on the fourth image, a first height of the actual thickness measurement area is determined.
[0015] In a possible implementation, during the process of controlling the line laser to emit laser light toward the consumable material to be processed, the line laser emits the line laser toward the consumable material to be processed in a non-vertical direction.
[0016] In one possible implementation,
[0017] The surface of the processing platform is provided with at least two calibration patterns; the processing equipment further comprises a second camera fixed to the tool head;
[0018] Before controlling the first camera to acquire the first image including the consumable material to be processed, the method further includes:
[0019] Controlling the first camera to acquire a fifth image including the at least two calibration patterns;
[0020] Controlling the tool head to move to the top of each calibration pattern, and taking an image of each calibration pattern through the second camera to determine the world coordinates of each calibration pattern;
[0021] Based on the world coordinates of each calibration pattern and the camera coordinates of each calibration pattern in the first camera, parameters of the first camera are determined.
[0022] In a possible implementation, before controlling the first camera to acquire a fifth image including the at least two calibration patterns, the method further includes:
[0023] Detecting a change in the position of the first camera; or, detecting a replacement of the first camera, and triggering the shooting of the fifth image.
[0024] In a possible implementation, the determining the world coordinates of each calibration pattern includes:
[0025] Controlling the tool head to move directly above each calibration pattern, and determining the abscissa and ordinate of each calibration pattern;
[0026] Based on the height of the processing platform, determining the vertical coordinate of each calibration pattern.
[0027] In a possible implementation, the method further includes:
[0028] Controlling the first camera to acquire a sixth image, where the sixth image includes the consumable to be processed;
[0029] Based on the sixth image and the first image, determining whether the position and / or attitude of the consumable to be processed has changed;
[0030] When the position and / or attitude of the consumable to be processed has changed, sending a prompt message to the user, so that the user re-triggers the image rectification process to acquire a new rectified image, or, triggering the image rectification process based on the sixth image to obtain a new rectified image.
[0031] In a possible implementation, the first camera acquires images according to a preset shooting period, or the first camera acquires images after the hatch of the processing device is closed.
[0032] In a second aspect, an embodiment of the present application provides a method for determining camera parameters for photographing a consumable to be processed. The method is applied to a processing device, and the processing device includes a processing platform, a tool head, a first camera, and a second camera. The shooting angle of the first camera is inclined with respect to the plane where the processing platform is located. The second camera is fixed on the tool head. The processing platform is used to place the consumable to be processed, and at least two calibration patterns are provided on the surface of the processing platform. The method includes:
[0033] Controlling the first camera to acquire a fifth image including the at least two calibration patterns;
[0034] Controlling the tool head to move to the top of each calibration pattern, and taking an image of each calibration pattern through the second camera to determine the world coordinates of each calibration pattern;
[0035] Based on the world coordinates of each calibration pattern and the camera coordinates of each calibration pattern in the first camera, parameters of the first camera are determined.
[0036] In a possible implementation, before controlling the first camera to acquire a fifth image including the at least two calibration patterns, the method further includes:
[0037] A position change of the first camera is detected; or a replacement of the first camera is detected, thereby triggering the capturing of the fifth image.
[0038] In a possible implementation manner, determining the world coordinates of each calibration pattern includes:
[0039] Controlling the tool head to move to the top of each calibration pattern, and determining the horizontal coordinate and the vertical coordinate of each calibration pattern;
[0040] Based on the height of the processing platform, the vertical coordinate of each calibration pattern is determined.
[0041] In a possible implementation, the method further includes:
[0042] Controlling the first camera to acquire a first image including the consumable material to be processed;
[0043] Displaying a second image of the consumable to be processed at a terminal device connected to the processing device, where the second image is obtained by performing a normalization process on the first image based on the parameters of the first camera;
[0044] In response to the user selecting a target thickness measurement area of the consumable to be processed in the second image, controlling the tool head to move to an actual thickness measurement area in the consumable to be processed corresponding to the target thickness measurement area, and obtaining a first height of the consumable to be processed in the actual thickness measurement area;
[0045] Based on the first height and the parameters of the first camera, the first image is normalized, and a third image of the consumable material to be processed is displayed on the terminal device.
[0046] In a possible implementation, the tool head includes a 3D printing head and an engraving laser head or a cutting head detachably connected to the 3D printing head, and the second camera is fixedly mounted on the 3D printing head.
[0047] In a possible implementation, the processing equipment further includes a line laser, and the line laser is connected to the engraving laser head;
[0048] The step of controlling the tool head to move to an actual thickness measurement area in the consumable to be processed corresponding to the target thickness measurement area to obtain a first height of the consumable to be processed in the actual thickness measurement area includes:
[0049] After controlling the tool head to move above the actual thickness measurement area, controlling the line laser to emit laser light to the consumable to be processed, and using the second camera to shoot while controlling the processing platform to move in the vertical direction, so as to obtain a fourth image including the actual thickness measurement area;
[0050] Based on the fourth image, a first height of the actual thickness measurement area is determined.
[0051] In a possible implementation, during the process of controlling the line laser to emit laser light toward the consumable material to be processed, the line laser emits the line laser toward the consumable material to be processed in a non-vertical direction.
[0052] In a possible implementation, the method further includes:
[0053] Controlling the first camera to acquire a sixth image, wherein the sixth image includes the consumable material to be processed;
[0054] Based on the sixth image and the first image, determining whether the position and / or posture of the consumable to be processed has changed;
[0055] When the position and / or posture of the consumable to be processed changes, a prompt message is sent to the user to enable the user to re-trigger the image conversion process and obtain a new converted image, or trigger the image conversion process based on the sixth image to obtain a new converted image.
[0056] In a possible implementation, the first camera acquires images according to a preset shooting cycle, or the first camera acquires images after a hatch of the processing equipment is closed.
[0057] In a third aspect, an embodiment of the present application provides a processing device, which includes a processing platform, a tool head, a first camera and a second camera, wherein the shooting angle of the first camera is inclined to the plane where the processing platform is located, the second camera is fixed to the tool head, and the processing platform is used to place consumables to be processed;
[0058] The processing equipment also includes a processor, which is used to execute instructions for the steps of the method in the first aspect or the second aspect of the embodiment of the present application.
[0059] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium stores a computer program for electronic data exchange. The computer program causes a computer to execute some or all of the steps described in the method of the first aspect or the second aspect of the embodiment of the present application.
[0060] In a fifth aspect, an embodiment of the present application provides a computer program product. The computer program product includes a non-transitory computer-readable storage medium storing a computer program. The computer program is operable to cause a computer to execute some or all of the steps described in the method of the first aspect or the second aspect of the embodiment of the present application. The computer program product can be a software installation package.
[0061] It can be seen that through the method of the embodiments of the present application, the first camera is controlled to acquire a first image including the consumable to be processed. Then, based on the parameters of the first camera, the first image is corrected to obtain a second image. In this way, a less accurate top-down image can be obtained for the user to select the target thickness measurement area. Then, based on the target thickness measurement area selected by the user on the second image, the corresponding actual thickness measurement area is determined in the consumable to be processed, and the tool head is controlled to determine the first height of the actual thickness measurement area. Finally, based on the first height and the parameters of the first camera, the first image can be corrected to obtain a third image with a precise top-down view. Thus, the obtained third image is a precise top-down view image of the consumable to be processed. Based on this third image, the user can perform processing, which can make the actual processing result more in line with the user's creative intention, thereby improving the processing effect and the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0063] Figure 1 It is a schematic structural diagram of a processing device provided by an embodiment of the present application;
[0064] Figure 2 It is a schematic structural diagram of another processing device provided by an embodiment of the present application;
[0065] Figure 3 It is a schematic flowchart of a method for correcting a consumable to be processed provided by an embodiment of the present application;
[0066] Figure 4Schematic diagram of a first image provided by an embodiment of the present application;
[0067] Figure 5 Schematic diagram of a processing platform provided by an embodiment of the present application;
[0068] Figure 6 Schematic diagram of a second image provided by an embodiment of the present application;
[0069] Figure 7 Identification diagram of an object position provided by an embodiment of the present application;
[0070] Figure 8 Schematic diagram of a fourth image provided by an embodiment of the present application;
[0071] Figure 9 Schematic diagram of determining the first height of an actual thickness measurement area provided by an embodiment of the present application;
[0072] Figure 10 Flow schematic diagram of a method for determining camera parameters for photographing a consumable to be processed provided by an embodiment of the present application;
[0073] Figure 11 Flow schematic diagram of a straightening method provided by an embodiment of the present application;
[0074] Figure 12 Block diagram of functional units of a device for straightening a consumable to be processed provided by an embodiment of the present application;
[0075] Figure 13 Block diagram of functional units of a device for determining camera parameters for photographing a consumable to be processed provided by an embodiment of the present application;
[0076] Figure 14 Schematic diagram of the structure of a processing device provided by an embodiment of the present application. Detailed implementation mode
[0077] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application.
[0078] In the description of the present application, the specification, the claims and the above-mentioned drawings, terms such as "first", "second", etc. are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices.
[0079] The expression "at least one (item)" or a similar expression in the embodiments of the present application refers to any combination of these items, including any combination of a single item (item) or multiple items (items), and means one or more, and multiple means two or more. For example, at least one (item) of a, b or c can represent the following seven cases: a, b, c, a and b, a and c, b and c, a, b and c. Among them, each of a, b, c can be an element or a set containing one or more elements.
[0080] The "connection" that appears in the embodiments of the present application refers to various connection methods such as direct connection or indirect connection to achieve communication between devices, and the embodiments of the present application do not make any limitations on this. In the description of the present application, it should be noted that unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense. In one example, it can be a fixed connection, or a detachable connection, or an integral connection; it can be a mechanical connection, or an electrical connection, or can communicate with each other; it can be directly connected, or indirectly connected through an intermediate medium, and can be the communication inside two components or the interaction relationship between two components.
[0081] Referring to "embodiments" herein means that the specific features, structures or characteristics described in connection with the embodiments can be included in at least one embodiment of the present application. The appearance of this phrase in various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0082] Currently, for subtractive manufacturing, such as cutting, laser engraving, etc., to obtain a processing result that conforms to the user's creative intention, a precise top-down view image of the consumable to be processed is required. When the user performs operations such as content creation and area processing on this image, since the image is a precise top-down view image, the user's created or processed content can be accurately corresponding to the corresponding position of the consumable to be processed, thereby making the final processing result more in line with the user's creative intention. However, if the camera in the processing equipment is usually fixed on the inner wall of one side of the processing equipment, the image captured by it is often at an inclined angle. And if an additional camera is arranged on the top of the processing equipment to capture images from directly above, the equipment cost is relatively high, and it is easily affected by the tool head during shooting, and the tool head needs to be moved out of the shooting range. Subsequently, how to obtain a precise top-down view image of the consumable to be processed without increasing the hardware complexity of the processing equipment has become a problem.
[0083] To solve the above problems, the embodiments of the present application provide a method for straightening the consumable to be processed, related methods and related equipment, which can straighten the image with an inclined angle captured by the camera in the existing processing equipment to obtain a precise top-down view image of the consumable to be processed, thereby further making the actual processing result more in line with the user's creative intention and improving the processing effect and user experience.
[0084] First, refer to Figure 1 , Figure 1 which is a schematic diagram of a processing equipment provided by the embodiments of the present application. As Figure 1 shown, the processing equipment includes a tool head 110, a first camera 120, a second camera 130, and a processing platform 140. In some feasible embodiments, the processing equipment may be a gantry structure, and the tool head 110 is arranged on the guide rail above the processing platform 140 and can move in the X-axis direction or the Y-axis direction under the drive of the guide rail, where the directions of the X-axis and the Y-axis can be interchanged, and the present application does not limit the establishment of the equipment coordinate system.
[0085] The first camera 120 is arranged on one side of the frame of the processing equipment, and its installation height can be higher than the height of the tool head 110, or lower than or flush with the height of the tool head 110. The first camera 120 can capture the overall scene directly above the processing platform 140, and its shooting angle is inclined to the plane where the processing platform 140 is located.
[0086] The second camera 130 is fixed on the tool head 110 and can move relative to the processing platform 140 under the drive of the tool head 110 to obtain a regional image of the processing platform 140 or the consumable to be processed on the processing platform.
[0087] In some feasible embodiments, in addition to connecting the second camera 130, the tool head may further include a 3D printing head and a carving laser head or a cutting tool head detachably connected to the 3D printing head. The second camera 130 may be fixedly installed on the 3D printing head.
[0088] The processing platform 140 can move vertically back and forth along the Y-axis to carry the consumables to be processed. During the processing, the tool head moves up and down along the Z-axis to an appropriate height to process the consumables to be processed.
[0089] Optionally, the processing device may be a corexy structure as shown in Figure 2 The processing device includes a tool head 210, a first camera 220, a second camera 230, a processing platform 240, and a Z-axis lead screw 250. The tool head 210 can be supported by a frame on the processing device. The tool head 210 can move on the XY plane driven by a guide rail. The first camera 220 can be disposed on the inner wall on one side of the processing device or above the front door of the processing device to obtain an image of the consumables to be processed on the processing platform 240. The second camera 230 is fixed on the tool head 210 and moves relative to the processing platform 240 driven by the tool head 210. The processing platform 240 is connected to the Z-axis lead screw 250 to achieve the movement of the processing platform 240 in the Z-axis direction.
[0090] It should be understood that Figure 1 and Figure 2 are only illustrative and do not limit the structural type of the processing device. In some feasible embodiments, the processing device may also be a cantilever type structure. In this application, unless otherwise clearly specified and limited, terms such as "connection" and "fixation" should be understood in a broad sense. For example, "fixation" can be a fixed connection, a detachable connection, or integrated; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two components or the interaction relationship between two components, unless otherwise clearly limited. "Connection" includes detachable connection and non-detachable connection. For example, fixed connection can include detachable fixed connection and non-detachable fixed connection, rotational connection can include detachable rotational connection and non-detachable rotational connection, and sliding connection can include detachable sliding connection and non-detachable sliding connection. Connection can also be a direct connection or an indirect connection through a component. For example, for a detachable fixed connection, it means that in the installed state, the positional relationship between at least two connected objects can be fixed; similarly, for rotational connection and sliding connection, etc.
[0091] In this embodiment, the processing platform may refer to a general workbench that can be used for various processing methods. Exemplarily, the processing platform can be used for various processing methods such as 3D printing, laser processing, cutter cutting, and brush painting.
[0092] When the processing platform is used for 3D printing, the processing platform can be regarded as a printing platform. That is, the processing platform may include a heated bed, and may further include at least one of a printing panel located above the heated bed and a heated bed support for supporting the heated bed, where the heated bed support can elastically support the heated bed or fixedly support the heated bed and the printing panel.
[0093] When the processing platform is used for laser processing, the processing platform may include a laser backing plate, and the object to be laser processed is placed on the laser backing plate. Optionally, if the processing device can perform both 3D printing and laser processing, the processing platform may include both a laser backing plate and may further include a heated bed, and may even further include a printing panel. When laser processing is required, the laser backing plate can be placed on the heated bed; when 3D printing is required, the laser backing plate is removed and the printing panel is placed on the heated bed. Alternatively, the processing platform is still a printing platform, and the processing device can engrave / cut the printed part while printing, or engrave / cut the printed part on the printing platform after printing.
[0094] When the processing platform is used for cutter cutting / drawing, the processing platform may include a sticky plate for sticking the object to be cut / drawn, and may further include a protective bottom plate located below the sticky plate. If the processing device can perform both 3D printing and cutter cutting / drawing, the processing platform may include both a sticky plate and may further include a protective bottom plate and a heated bed, and may even further include a printing panel. When cutter cutting / drawing is required, the sticky plate can be placed on the protective bottom plate, and the protective bottom plate is placed on the heated bed, and the protective bottom plate can protect the heated bed from being scratched / stained; when 3D printing is required, the sticky plate and the protective bottom plate are removed and the printing panel is placed on the heated bed. Alternatively, the processing platform is still a printing platform, and the processing device can cut / draw the printed part while printing, or cut / draw the printed part on the printing platform after printing.
[0095] The following combines Figure 3 to describe a method for straightening a consumable to be processed in the embodiment of the present application. Figure 3 is a schematic flowchart of a method for straightening a consumable to be processed provided by the embodiment of the present application, and this method can be applicable to Figure 1 or Figure 2The processing equipment shown in the figure includes a processing platform, a movable tool head, a first camera, and a second camera. Among them, the shooting angle of the first camera is inclined to the plane where the processing platform is located, the second camera is fixed on the tool head, and the processing platform is used to place the consumables to be processed. The method specifically includes the following steps:
[0096] S301: Control the first camera to obtain a first image including the consumables to be processed.
[0097] In this embodiment, as Figure 4 shown, the first image at least includes the complete consumables to be processed.
[0098] In a feasible embodiment, before performing step S301, the parameters of the first camera can also be calibrated. Specifically, when the processing equipment is started for the first time, or the position of the first camera changes, or the first camera is removed and reinstalled, or the first camera is replaced, before image rectification, the parameters of the first camera can be calibrated to obtain the parameters of the first camera, and the parameters can include internal parameters and / or external parameters.
[0099] Exemplarily, at least 2 calibration patterns are provided on the upper surface of the processing platform, as Figure 5 shown, Figure 5 shows a processing platform provided with 4 calibration patterns. When calibrating the parameters of the first camera, first, control the first camera to obtain a fifth image including at least 2 calibration patterns on the processing platform. Then, control the tool head to move directly above each calibration pattern respectively. For example, the central axis of the tool head can be moved to coincide with the pattern central axis of each calibration pattern, and the abscissa and ordinate when the tool head is directly above each calibration pattern are obtained. Finally, the current height of the processing platform is determined.
[0100] Thus, taking the abscissa and ordinate when the tool head is directly above each calibration pattern as the abscissa and ordinate of each calibration pattern, and taking the current height of the processing platform as the vertical coordinate of each calibration pattern, the world coordinates of each calibration pattern can be obtained.
[0101] After determining the world coordinates of each calibration pattern, then determine the camera coordinates of each calibration pattern in the camera coordinate system. Then, based on the world coordinates of each calibration pattern and the camera coordinates of each calibration pattern, the parameters of the first camera can be determined.
[0102] In some feasible embodiments, algorithms such as the solvePnP algorithm, EPnP algorithm, or PoseNet algorithm can be used to determine the world coordinates of the first camera's parameters.
[0103] Exemplarily, taking the solvePnP algorithm as an example, the plane where the processing platform is currently located can be set as the XY plane, and the current height of the processing platform is 0. If the fourth image includes four calibration patterns, the world coordinates of the four calibration patterns can be: (x1, y1, 0), (x2, y2, 0), (x3, y3, 0), and (x4, y4, 0); the camera coordinates can be: (p1x, p1y), (p2x, p2y), (p3x, p3y), and (p4x, p4y).
[0104] Furthermore, the parameters of the first camera can be determined by the following formula ①:
[0105] s×u = K×[R|t]×G………①
[0106] Where s is the scaling factor, u is the camera coordinate, K is the internal parameter matrix of the first camera, [R∣t] is the external parameter matrix of the first camera, and G is the world coordinate.
[0107] It should be noted that any method in the art for determining the parameters of the first camera based on the world coordinates and camera coordinates of the calibration pattern can be applied to this application, and this application makes no restrictions on this.
[0108] S302: Display the second image of the consumable to be processed at the terminal device connected to the processing equipment.
[0109] In this embodiment, as Figure 6 shown, the second image is obtained by rectifying the first image based on the parameters of the first camera. Specifically, in this rectification process, the thickness of the consumable to be processed can be roughly determined by performing depth estimation on the first image, and then based on the thickness of the consumable to be processed and the parameters of the first camera, the image is roughly rectified to obtain a top-down view image with slightly lower accuracy as the second image. Or, each consumable to be processed has a default thickness value. After the consumable to be processed is placed on the processing platform, the category of the consumable to be processed can be obtained through the first camera or the second camera, and the default thickness of the consumable to be processed can be determined according to the mapping relationship between the category and the default thickness. Or, the user can input the thickness value of the consumable to be processed at the terminal device or the processing equipment.
[0110] Exemplarily, after determining the rough thickness of the consumable to be processed, the vertical coordinates in the world coordinates of each point on the upper surface of the consumable to be processed can be determined. At the same time, based on the first image, the camera coordinates of each point on the upper surface of the consumable to be processed can be determined. Thus, based on formula ① in step S301, the world coordinates of each point on the upper surface of the consumable to be processed can be calculated. Finally, by reorganizing the images of each point on the upper surface of the consumable to be processed with the world coordinates, the second image can be obtained.
[0111] It should be noted that other image righting methods in the art can be applied to this application without limitation. For example, in order to correct the image distortion caused by the camera angle and make the terminal device present a top view of the precision consumable to be processed, that is, a view of the consumable to be processed similar to that seen from directly above, which can also be said to be a front view. The algorithms used can include, but are not limited to, direct perspective transformation (Homography Transformation), RANSAC + perspective transformation, deep learning, and perspective correction (CNN-based Rectification), etc.
[0112] S303: In response to the user selecting a target thickness measurement area of the consumable to be processed in the second image, control the tool head to move to the actual thickness measurement area corresponding to the target thickness measurement area in the consumable to be processed, and obtain the first height of the consumable to be processed in the actual thickness measurement area.
[0113] In this embodiment, the user can select the target thickness measurement area by clicking on the display interface of the terminal device for the displayed second image. As described above, the second image is obtained by re - organizing the images of each point on the upper surface of the consumable to be processed based on the world coordinates. Therefore, after the user selects the target thickness measurement area, the world coordinates of each point in the target thickness measurement area can be determined, and then the actual thickness measurement area corresponding to the target thickness measurement area in the consumable to be processed can be determined.
[0114] Exemplarily, the target thickness measurement area can be the area to be processed. By using the thickness of the area to be processed to correct the image distortion of the consumable to be processed, the front view of the area to be processed can be accurately displayed.
[0115] In a possible implementation manner, after obtaining the second image, the position of the consumable to be processed in the second image can also be recognized to obtain an object position identification map as shown in Figure 7 . Then, based on the position relationship of the target thickness measurement area selected by the user in the second image, combined with Figure 7 , the actual thickness measurement area corresponding to the target thickness measurement area in the consumable to be processed is determined. Of course, other methods in the art can also be used to determine the actual thickness measurement area corresponding to the target thickness measurement area in the consumable to be processed, and this application does not limit this.
[0116] In this embodiment, after determining the actual thickness measurement area, the tool head can be controlled to move above the actual thickness measurement area, and the line laser can be controlled to emit laser light to the consumable to be processed. Exemplarily, the line laser can emit the line laser to the consumable to be processed in a non-vertical direction to form a linear laser pattern on the consumable to be processed. Line laser is mainly used for positioning, measurement or visual alignment, and it does not remove material. Engraving laser is a laser beam that can partially or completely remove the surface of the material, and the power density is greater than that of line laser.
[0117] In this embodiment, since the shooting range of the second camera is limited, while the laser head emits laser light, the processing platform can be controlled to move toward the tool head in the vertical direction until the second camera obtains the fourth image containing the laser pattern of the actual thickness measurement area. Figure 8 shown.
[0118] Finally, based on the fourth image, the precise first height of the actual thickness measurement area can be determined.
[0119] Specifically, if Figure 8 and Figure 9 As shown, based on the fourth image, the distance h between the laser pattern and the central axis of the second camera in the horizontal direction can be determined. At the same time, the angle a of the laser beam emitted by the laser head and the distance c between the processing platform and the second camera in the vertical direction are both known. Therefore, the distance b between the upper surface of the actual thickness measurement area and the second camera in the vertical direction can be calculated, and then the first height of the actual thickness measurement area is determined to be cb. The laser pattern can be a pattern formed by the laser line emitted by the line laser on the surface of the consumable to be processed.
[0120] It should be noted that, in addition to Figure 8 and Figure 9 The triangulated thickness measurement method shown in the figure and other thickness measurement methods in the art, such as laser confocal thickness measurement or visual thickness measurement, may also be applicable to the present application, and the present application does not impose any limitation on this.
[0121] S304: Based on the first height and the parameters of the first camera, the first image is normalized and a third image of the consumables to be processed is displayed on the terminal device.
[0122] In this embodiment, in contrast to the normalization processing of the second image obtained in step S302, the image is further normalized based on the measured thickness of the target area of the object to be processed, and for example, a 3D Homography / PnP algorithm, a stereo vision (Stereo Rectification) algorithm, etc. may be used.
[0123] In addition, after controlling the first camera to acquire the first image, the first camera may also be controlled to acquire a sixth image, which also includes at least the complete consumables to be processed. Exemplarily, the first camera may be a liveview camera, which acquires images periodically according to a preset shooting cycle, for example, 2s / time. Alternatively, the first camera acquires images each time the hatch of the processing equipment is closed.
[0124] After acquiring the sixth image, it is possible to determine whether the position and / or posture of the consumable to be processed has changed based on the sixth image and the first image. Specifically, the features related to the workpiece to be engraved in the sixth image and the first image can be extracted, and then the position and / or posture of the consumable to be processed can be determined by feature comparison. The extraction can be a conventional visual feature extraction method such as Scale-Invariant Feature Transform (SIFT) and Speeded-Up Robust Features (SURF), or it can be a method of performing target detection on the image to obtain a bounding box, or obtaining a mask of the object to be engraved by speech segmentation, etc. This application does not limit this.
[0125] In this embodiment, when the position and / or posture of the consumable to be processed changes, a prompt message is sent to the user to enable the user to re-trigger the image conversion process and obtain a new converted image, or trigger the image conversion process based on the sixth image to obtain a new converted image. Then, it is ensured that the image displayed to the user corresponds to the actual consumable to be processed in the processing equipment, and it is avoided that after content creation, area processing and other operations are performed based on the wrong image, the actual processing position of the processing equipment is different from the creation or processing position in the image, and then the actual processing result is ensured to be consistent with the user's creative intention.
[0126] It can be seen that through the method of each embodiment of the present application, the first camera is controlled to obtain a first image including the consumable to be processed, and then, based on the parameters of the first camera, the first image is corrected to obtain a second image. In this way, a less accurate top-down image can be obtained for the user to select the target thickness measurement area. Then, based on the target thickness measurement area selected by the user on the second image, the corresponding actual thickness measurement area is determined in the consumable to be processed, and the tool head is controlled to determine the first height of the actual thickness measurement area. Finally, based on the first height and the parameters of the first camera, the first image can be corrected to obtain a third image with a precise top-down view. Thus, the obtained third image is a precise top-down view image of the consumable to be processed. Based on this third image, the user can perform processing, which can make the actual processing result more in line with the user's creative intention, thereby improving the processing effect and user experience. Moreover, in the present application, there is no need for the user to place the consumable to be processed at a specified position because the first camera can capture a global image from a top-down angle, and the second camera is a movable camera that can find the position of the consumable to be processed instead of requiring the consumable to be processed to be placed at a fixed position, which improves the flexibility of user use.
[0127] In addition, referring to Figure 10 , an embodiment of the present application also provides a method for determining the parameters of a camera for photographing a consumable to be processed. This method can be applied to the processing equipment shown in Figure 1 or Figure 2 . The processing equipment includes a processing platform, a tool head, a first camera, and a second camera. Among them, the shooting angle of the first camera is inclined to the plane where the processing platform is located, the second camera is fixed on the tool head, the processing platform is used to place the consumable to be processed, and at least two calibration patterns are provided on the surface of the processing platform. The method specifically includes the following steps:
[0128] S1001: Control the first camera to obtain a fifth image including at least two calibration patterns.
[0129] S1002: Control the tool head to move directly above each calibration pattern, and use the second camera to photograph the image of each calibration pattern to determine the world coordinates of each calibration pattern.
[0130] S1003: Based on the world coordinates of each calibration pattern and the camera coordinates of each calibration pattern in the first camera, determine the parameters of the first camera.
[0131] In this embodiment, after determining the parameters of the first camera, the correction method shown in Figure 11 can also be executed:
[0132] S1101: Control the first camera to obtain a first image including the consumable to be processed.
[0133] S1102: Display a second image of the consumable to be processed at a terminal device connected to the processing equipment.
[0134] In this embodiment, the second image is obtained by rectifying the first image based on the parameters of the first camera.
[0135] S1103: In response to the user selecting a target thickness measurement area of the consumable to be processed in the second image, control the tool head to move to the actual thickness measurement area corresponding to the target thickness measurement area in the consumable to be processed, and obtain a first height of the consumable to be processed in the actual thickness measurement area.
[0136] S1104: Based on the first height and the parameters of the first camera, rectify the first image, and display a third image of the consumable to be processed at the terminal device.
[0137] In addition, after controlling the first camera to obtain the first image, the first camera can also be controlled to obtain a sixth image, which also includes at least the complete consumable to be processed. Then, based on the sixth image and the first image, it can be determined whether the position and / or attitude of the consumable to be processed has changed. And when the position and / or attitude of the consumable to be processed has changed, a prompt message is sent to the user, so that the user can re-trigger the image rectification process to obtain a new rectified image, or trigger the image rectification process based on the sixth image to obtain a new rectified image.
[0138] For the specific implementation of each operation in the above steps S1001 - S1003 and steps S1101 - S1104, reference can be made to Figures 3 - 9 the description in the method embodiment shown, which will not be elaborated herein.
[0139] The above mainly introduces the solution of the embodiment of the present application from the perspective of the method. It can be understood that, in order to implement the above functions, the device may include corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0140] The embodiments of the present application can divide the device into functional units according to the above method examples. For example, each functional unit can be divided corresponding to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of a software program module. It should be noted that the division of units in the embodiments of the present application is illustrative, only a logical function division, and there can be other division methods in actual implementation.
[0141] In the case of adopting an integrated unit, Figure 12 is a functional unit composition block diagram of a device for straightening a consumable to be processed proposed by the embodiments of the present application. Among them, the device 1200 for straightening the consumable to be processed includes a shooting module 1201, a straightening module 1202, and a measurement module 1203.
[0142] In this embodiment, the shooting module 1201, the straightening module 1202, and the measurement module 1203 can be a module unit for receiving and processing signals, information, etc. or determining a monitoring mechanism, and no specific limitation is made thereto.
[0143] In this embodiment, the device 1200 for straightening the consumable to be processed may further include a storage unit for storing the computer program code or instructions executed by the device 1200 for straightening the consumable to be processed. Among them, the storage unit can be a memory.
[0144] In this embodiment, the device 1200 for straightening the consumable to be processed can be a chip or a chip module.
[0145] In this embodiment, the shooting module 1201, the straightening module 1202, and the measurement module 1203 can be integrated in a communication unit. Among them, the communication unit can be a communication interface, a transceiver, a transceiver circuit, etc.
[0146] In this embodiment, the shooting module 1201, the straightening module 1202, and the measurement module 1203 can be integrated in a processing unit.
[0147] It should be noted that the processing unit can be a processor or a controller. For example, it can be a baseband processor, a baseband chip, a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logical blocks, modules, and circuits described in connection with the disclosure of the present application. The processing unit can also be a combination for implementing a computing function, such as a combination including one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0148] In this embodiment, the device 1200 for straightening the consumable to be processed is used to execute any step executed by a network device / chip / chip module, etc. in the above method embodiment.
[0149] Specifically, the shooting module 1201, the straightening module 1202, and the measuring module 1203 are used to execute any step in the above method embodiment, and when performing actions such as sending, other units can be selectively called to complete the corresponding operations. The following is a detailed description.
[0150] The shooting module 1201 is used to control the first camera to obtain a first image including the consumable to be processed;
[0151] The straightening module 1202 is used to display a second image of the consumable to be processed at the terminal device connected to the processing device, and the second image is obtained by straightening the first image based on the parameters of the first camera;
[0152] The measuring module 1203 is used to, in response to the user selecting a target thickness measurement area of the consumable to be processed in the second image, control the tool head to move to the actual thickness measurement area corresponding to the target thickness measurement area in the consumable to be processed, and obtain a first height of the consumable to be processed in the actual thickness measurement area;
[0153] The straightening module 1202 is further used to, based on the first height and the parameters of the first camera, perform straightening processing on the first image, and display a third image of the consumable to be processed at the terminal device.
[0154] In this embodiment, the tool head includes a 3D printing head and a carving laser head or a cutting tool head detachably connected to the 3D printing head, and the second camera is fixedly installed on the 3D printing head.
[0155] In this embodiment, the processing device further includes a second camera and a line laser, and the second camera is fixed on the tool head; the line laser is connected to the carving laser head; based on this, in terms of controlling the tool head to move to the actual thickness measurement area corresponding to the target thickness measurement area in the consumable to be processed and obtaining the first height of the consumable to be processed in the actual thickness measurement area, the measuring module 1203 specifically is used for:
[0156] After controlling the tool head to move above the actual thickness measurement area, control the line laser to emit laser to the consumable to be processed, and take a picture through the second camera during the process of controlling the processing platform to move in the vertical direction, so as to obtain a fourth image including the actual thickness measurement area;
[0157] Based on the fourth image, determine the first height of the actual thickness measurement area.
[0158] In this embodiment, during the process of controlling the line laser to emit laser light towards the consumable to be processed, the line laser emits line laser light towards the consumable to be processed in a non-vertical direction.
[0159] In this embodiment, at least two calibration patterns are provided on the surface of the processing platform; the processing device further includes a second camera fixed to the tool head; based on this, before the control module 1201 controls the first camera to obtain a first image including the consumable to be processed, the shooting module 1201 is further configured to:
[0160] Control the first camera to obtain a fifth image including the at least two calibration patterns;
[0161] Control the tool head to move directly above each calibration pattern, and capture an image of each calibration pattern through the second camera to determine the world coordinates of each calibration pattern;
[0162] Based on the world coordinates of each calibration pattern and the camera coordinates of each calibration pattern in the first camera, determine the parameters of the first camera.
[0163] In this embodiment, before the control module 1201 controls the first camera to obtain a fifth image including the at least two calibration patterns, the shooting module 1201 is further configured to:
[0164] Detect a change in the position of the first camera; or, detect that the first camera is replaced, and trigger the capture of the fifth image.
[0165] In this embodiment, in terms of determining the world coordinates of each calibration pattern, the shooting module 1201 is specifically configured to:
[0166] Control the tool head to move directly above each calibration pattern, and determine the abscissa and ordinate of each calibration pattern;
[0167] Based on the height of the processing platform, determine the vertical coordinate of each calibration pattern.
[0168] In this embodiment, the shooting module 1201 is further configured to:
[0169] Control the first camera to obtain a sixth image, where the sixth image includes the consumable to be processed;
[0170] Based on the sixth image and the first image, determine whether the position and / or orientation of the consumable to be processed has changed;
[0171] When the position and / or attitude of the consumable to be processed changes, a prompt message is sent to the user, so that the user can re-trigger the image correction process to obtain a new corrected image, or trigger the image correction process based on the sixth image to obtain a new corrected image.
[0172] In this embodiment, the first camera acquires images according to a preset shooting period, or the first camera acquires images after the hatch of the processing device is closed.
[0173] In the case of using an integrated unit, Figure 13 It is a functional unit composition block diagram of a device for determining camera parameters for photographing a consumable to be processed proposed in an embodiment of the present application. Among them, the device 1300 for determining camera parameters for photographing a consumable to be processed includes a photographing module 1301 and a determining module 1302.
[0174] In this embodiment, the photographing module 1301 and the determining module 1302 may be a module unit for receiving and processing signals, information, etc. or determining a monitoring mechanism, and no specific limitation is made thereto.
[0175] In this embodiment, the device 1300 for determining camera parameters for photographing a consumable to be processed may further include a storage unit for storing the computer program code or instructions executed by the device 1300 for determining camera parameters for photographing a consumable to be processed. Among them, the storage unit may be a memory.
[0176] In this embodiment, the device 1300 for determining camera parameters for photographing a consumable to be processed may be a chip or a chip module.
[0177] In this embodiment, the photographing module 1301 and the determining module 1302 may be integrated in a communication unit. Among them, the communication unit may be a communication interface, a transceiver, a transceiver circuit, etc.
[0178] In this embodiment, the photographing module 1301 and the determining module 1302 may be integrated in a processing unit.
[0179] It should be noted that the processing unit may be a processor or a controller. For example, it may be a baseband processor, a baseband chip, a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in connection with the disclosure of the present application. The processing unit may also be a combination for implementing computing functions, such as a combination including one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0180] In this embodiment, the device 1300 for determining camera parameters for photographing the consumables to be processed is used to execute any step executed by the network device / chip / chip module, etc. in the above method implementation.
[0181] In specific implementation, the shooting module 1301 and the determining module 1302 are used to execute any step in the above method implementation, and when executing actions such as sending, other units can be selectively called to complete corresponding operations.
[0182] A shooting module 1301 is used to control the first camera to acquire a fifth image including the at least two calibration patterns;
[0183] Determination module 1302 is used to control the tool head to move to directly above each calibration pattern, and capture an image of each calibration pattern through the second camera to determine the world coordinates of each calibration pattern, and determine the parameters of the first camera based on the world coordinates of each calibration pattern and the camera coordinates of each calibration pattern in the first camera.
[0184] In this implementation, before controlling the first camera to acquire the fifth image including the at least two calibration patterns, the shooting module 1301 is further configured to:
[0185] A position change of the first camera is detected; or a replacement of the first camera is detected, thereby triggering the capturing of the fifth image.
[0186] In this implementation, in determining the world coordinates of each calibration pattern, the determination module 1302 is specifically configured to:
[0187] Controlling the tool head to move to the top of each calibration pattern, and determining the horizontal coordinate and the vertical coordinate of each calibration pattern;
[0188] Based on the height of the processing platform, the vertical coordinate of each calibration pattern is determined.
[0189] In this implementation, the determination module 1302 is further configured to:
[0190] Controlling the first camera to acquire a first image including the consumable material to be processed;
[0191] Displaying a second image of the consumable to be processed at a terminal device connected to the processing device, where the second image is obtained by performing a normalization process on the first image based on the parameters of the first camera;
[0192] In response to the user selecting a target thickness measurement area of the consumable to be processed in the second image, controlling the tool head to move to an actual thickness measurement area in the consumable to be processed corresponding to the target thickness measurement area, and obtaining a first height of the consumable to be processed in the actual thickness measurement area;
[0193] Based on the first height and the parameters of the first camera, the first image is normalized, and a third image of the consumable material to be processed is displayed on the terminal device.
[0194] In this embodiment, the tool head includes a 3D printing head and an engraving laser head or a cutting head detachably connected to the 3D printing head, and the second camera is fixedly mounted on the 3D printing head.
[0195] In this embodiment, the processing equipment further includes a line laser, and the line laser is connected to the engraving laser head; based on this, in controlling the tool head to move to the actual thickness measurement area corresponding to the target thickness measurement area in the consumable to be processed, and obtaining the first height of the consumable to be processed in the actual thickness measurement area, the determination module 1302 is specifically used to:
[0196] After controlling the tool head to move above the actual thickness measurement area, controlling the line laser to emit laser light to the consumable to be processed, and using the second camera to shoot while controlling the processing platform to move in the vertical direction, so as to obtain a fourth image including the actual thickness measurement area;
[0197] Based on the fourth image, a first height of the actual thickness measurement area is determined.
[0198] In this embodiment, in the process of controlling the line laser to emit laser light toward the consumable material to be processed, the line laser emits the line laser toward the consumable material to be processed in a non-vertical direction.
[0199] In this implementation, the determination module 1302 is further configured to:
[0200] Controlling the first camera to acquire a sixth image, wherein the sixth image includes the consumable material to be processed;
[0201] Based on the sixth image and the first image, determining whether the position and / or posture of the consumable to be processed has changed;
[0202] When the position and / or posture of the consumable to be processed changes, a prompt message is sent to the user to enable the user to re-trigger the image conversion process and obtain a new converted image, or trigger the image conversion process based on the sixth image to obtain a new converted image.
[0203] In this embodiment, the first camera acquires images according to a preset shooting period, or the first camera acquires images after the hatch of the processing device is closed.
[0204] It should be noted that Figure 12 and Figure 13 For the specific implementation of each operation in the embodiment, reference can be made to the description in the above-mentioned method embodiment, and details will not be elaborated here.
[0205] Refer to Figure 14 , Figure 14 FIG. is a schematic structural diagram of a processing device proposed in an embodiment of the present application. Among them, the processing device 1400 may include a processing platform 1410, a tool head 1420, a first camera 1430, and a second camera 1440. The shooting angle of the first camera 1430 is inclined with respect to the plane where the processing platform 1410 is located. The second camera 1440 is fixed on the tool head 1420. The processing platform 1410 is used to place the consumables to be processed. The processing device 1400 may further include a processor 1450.
[0206] In this embodiment, the processing device 1400 further includes a communication interface, which is used to receive and send data.
[0207] In this embodiment, the processor 1450 may be one or more CPUs. When the processor 1450 is a single CPU, the CPU may be a single-core CPU or a multi-core CPU.
[0208] In this embodiment, the processor 1450 may be a baseband chip, a chip, a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA, or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof.
[0209] Specifically, the processor 1450 in the processing device 1400 is used to execute a computer program or instruction 1451 to perform the following operations:
[0210] Control the first camera to acquire a first image including the consumables to be processed;
[0211] Display a second image of the consumables to be processed at a terminal device connected to the processing device. The second image is obtained by straightening the first image based on the parameters of the first camera;
[0212] In response to the user selecting a target thickness measurement area of the consumables to be processed in the second image, control the tool head to move to an actual thickness measurement area corresponding to the target thickness measurement area in the consumables to be processed, and obtain a first height of the consumables to be processed in the actual thickness measurement area;
[0213] Based on the first height and the parameters of the first camera, the first image is normalized, and a third image of the consumable material to be processed is displayed on the terminal device.
[0214] Alternatively, do the following:
[0215] Controlling the first camera to acquire a fifth image including the at least two calibration patterns;
[0216] Controlling the tool head to move to the top of each calibration pattern, and taking an image of each calibration pattern through the second camera to determine the world coordinates of each calibration pattern;
[0217] Based on the world coordinates of each calibration pattern and the camera coordinates of each calibration pattern in the first camera, parameters of the first camera are determined.
[0218] It should be noted that Figure 14 The specific implementation of each operation in the implementation method can be found in the description of the method implementation method shown above, and will not be described in detail here.
[0219] The present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps of any method described in the above method implementation, and the above computer includes an electronic device.
[0220] The present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps of any method described in the above method implementation. The computer program product may be a software installation package, and the computer includes an electronic device.
[0221] It should be noted that, for the above-mentioned various embodiments, for the sake of simple description, they are all expressed as a series of action combinations. Those skilled in the art should be aware that the present application is not limited by the described order of actions, because some steps in the embodiments of the present application can be performed in other orders or simultaneously. In addition, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions, steps, modules or units involved are not necessarily required for the embodiments of the present application.
[0222] In the above-mentioned embodiments, the description of each embodiment of the present application has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0223] The steps of the methods or algorithms described in the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, and the software modules can be stored in a RAM, flash memory, ROM, EPROM, electrically erasable programmable read-only memory (EEPROM), register, hard disk, removable hard disk, compact disc read-only memory (CD-ROM), or any other form of storage medium well known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. Additionally, the ASIC can be located in a terminal device or a management device. Of course, the processor and the storage medium can also exist as discrete components in the terminal device or the management device.
[0224] Those skilled in the art should be able to realize that in one or more of the above examples, the functions described in the embodiments of this application can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, fiber optic, digital subscriber line (DSL)) or a wireless manner (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a digital video disc (DVD)), or a semiconductor medium (such as a solid state disk (SSD)), etc.
[0225] Each device and product described in the above embodiments, and each module / unit included therein, may be a software module / unit, a hardware module / unit, or may be partly a software module / unit and partly a hardware module / unit. For example, for each device and product applied to or integrated into a chip, each module / unit included therein may be implemented in the form of hardware such as circuits. Or, at least some of the modules / units may be implemented in the form of a software program that runs on a processor integrated inside the chip, and the remaining (if any) part of the modules / units may be implemented in the form of hardware such as circuits. For each device and product applied to or integrated into a chip module, each module / unit included therein may be implemented in the form of hardware such as circuits. Different modules / units may be located in the same component (such as a chip, a circuit module, etc.) or different components of the chip module. Or, at least some of the modules / units may be implemented in the form of a software program that runs on a processor integrated inside the chip module, and the remaining (if any) part of the modules / units may be implemented in the form of hardware such as circuits. For each device and product applied to or integrated into a terminal device, each module / unit included therein may be implemented in the form of hardware such as circuits. Different modules / units may be located in the same component (such as a chip, a circuit module, etc.) or different components within the terminal device. Or, at least some of the modules / units may be implemented in the form of a software program that runs on a processor integrated inside the terminal device, and the remaining (if any) part of the modules / units may be implemented in the form of hardware such as circuits.
[0226] The specific embodiments described above further elaborate on the purpose, technical solutions, and beneficial effects of the embodiments of the present application. It should be understood that the above are only specific embodiments of the embodiments of the present application and are not used to limit the protection scope of the embodiments of the present application. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of the embodiments of the present application shall be included within the protection scope of the embodiments of the present application.
Claims
1. A method for regularizing consumables to be processed, characterized in that: The method is applied to a processing device, the processing device includes a processing platform, a tool head and a first camera, the shooting angle of the first camera is inclined to the plane where the processing platform is located, the processing platform is used to place consumables to be processed, and the method includes: Controlling the first camera to acquire a first image including the consumable material to be processed; Displaying a second image of the consumable to be processed at a terminal device connected to the processing device, where the second image is obtained by performing a normalization process on the first image based on the parameters of the first camera; In response to a user selecting a target thickness measurement area of the consumable to be processed in the second image, controlling the tool head to move to an actual thickness measurement area in the consumable to be processed corresponding to the target thickness measurement area, and obtaining a first height of the consumable to be processed in the actual thickness measurement area; Based on the first height and the parameters of the first camera, the first image is normalized, and a third image of the consumable material to be processed is displayed on the terminal device.
2. The method according to claim 1, characterized in that The tool head comprises a 3D printing head and an engraving laser head or a cutting head detachably connected to the 3D printing head, and the second camera is fixedly mounted on the 3D printing head.
3. The method according to claim 1, characterized in that The processing equipment also includes a second camera and a line laser, wherein the second camera is fixed on the tool head; the line laser is connected to the engraving laser head; The step of controlling the tool head to move to an actual thickness measurement area in the consumable material to be processed corresponding to the target thickness measurement area to obtain a first height of the consumable material to be processed in the actual thickness measurement area comprises: After controlling the tool head to move to above the actual thickness measurement area, controlling the line laser to emit laser light to the consumable to be processed, and using the second camera to shoot while controlling the processing platform to move in the vertical direction, so as to obtain a fourth image including the actual thickness measurement area; Based on the fourth image, a first height of the actual thickness measurement area is determined.
4. The method according to claim 3, characterized in that In the process of controlling the line laser to emit laser light toward the consumable material to be processed, the line laser emits the line laser toward the consumable material to be processed in a non-vertical direction.
5. The method according to any one of claims 1 to 4, characterized in that: The surface of the processing platform is provided with at least two calibration patterns; the processing equipment further comprises a second camera fixed to the tool head; Before controlling the first camera to acquire the first image including the consumable material to be processed, the method further includes: Controlling the first camera to acquire a fifth image including the at least two calibration patterns; Controlling the tool head to move to the top of each calibration pattern, and taking an image of each calibration pattern through the second camera to determine the world coordinates of each calibration pattern; Based on the world coordinates of each calibration pattern and the camera coordinates of each calibration pattern in the first camera, parameters of the first camera are determined.
6. The method according to claim 5, characterized in that Before controlling the first camera to acquire a fifth image including the at least two calibration patterns, the method further includes: A position change of the first camera is detected; or a replacement of the first camera is detected, thereby triggering the capturing of the fifth image.
7. The method according to claim 5, characterized in that Determining the world coordinates of each calibration pattern includes: Controlling the tool head to move to the top of each calibration pattern, and determining the horizontal coordinate and the vertical coordinate of each calibration pattern; Based on the height of the processing platform, the vertical coordinate of each calibration pattern is determined.
8. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Controlling the first camera to acquire a sixth image, wherein the sixth image includes the consumable material to be processed; Based on the sixth image and the first image, determining whether the position and / or posture of the consumable to be processed has changed; When the position and / or posture of the consumable to be processed changes, a prompt message is sent to the user to enable the user to re-trigger the image conversion process and obtain a new converted image, or trigger the image conversion process based on the sixth image to obtain a new converted image.
9. The method according to claim 8, characterized in that The first camera acquires images according to a preset shooting cycle, or the first camera acquires images after the hatch of the processing equipment is closed.
10. A method for determining camera parameters for photographing consumables to be processed, characterized in that: The method is applied to a processing device, which includes a processing platform, a tool head, a first camera and a second camera, wherein the shooting angle of the first camera is inclined to the plane where the processing platform is located, the second camera is fixed on the tool head, the processing platform is used to place consumables to be processed and the surface of the processing platform is provided with at least two calibration patterns, and the method includes: Controlling the first camera to acquire a fifth image including the at least two calibration patterns; Controlling the tool head to move to the top of each calibration pattern, and taking an image of each calibration pattern through the second camera to determine the world coordinates of each calibration pattern; Based on the world coordinates of each calibration pattern and the camera coordinates of each calibration pattern in the first camera, parameters of the first camera are determined.
11. The method according to claim 10, characterized in that Before controlling the first camera to acquire a fifth image including the at least two calibration patterns, the method further includes: A position change of the first camera is detected; or a replacement of the first camera is detected, thereby triggering the capturing of the fifth image.
12. The method according to claim 10, characterized in that Determining the world coordinates of each calibration pattern includes: Controlling the tool head to move to the top of each calibration pattern, and determining the horizontal coordinate and the vertical coordinate of each calibration pattern; Based on the height of the processing platform, the vertical coordinate of each calibration pattern is determined.
13. The method according to any one of claims 10 to 12, characterized in that: The method further comprises: Controlling the first camera to acquire a first image including the consumable material to be processed; Displaying a second image of the consumable to be processed at a terminal device connected to the processing device, where the second image is obtained by performing a normalization process on the first image based on the parameters of the first camera; In response to a user selecting a target thickness measurement area of the consumable to be processed in the second image, controlling the tool head to move to an actual thickness measurement area in the consumable to be processed corresponding to the target thickness measurement area, and obtaining a first height of the consumable to be processed in the actual thickness measurement area; Based on the first height and the parameters of the first camera, the first image is normalized, and a third image of the consumable material to be processed is displayed on the terminal device.
14. The method according to claim 13, characterized in that The tool head comprises a 3D printing head and an engraving laser head or a cutting head detachably connected to the 3D printing head, and the second camera is fixedly mounted on the 3D printing head.
15. The method according to claim 14, characterized in that The processing equipment also includes a line laser, which is connected to the engraving laser head; The step of controlling the tool head to move to an actual thickness measurement area in the consumable material to be processed corresponding to the target thickness measurement area to obtain a first height of the consumable material to be processed in the actual thickness measurement area comprises: After controlling the tool head to move to above the actual thickness measurement area, controlling the line laser to emit laser light to the consumable to be processed, and using the second camera to shoot while controlling the processing platform to move in the vertical direction, so as to obtain a fourth image including the actual thickness measurement area; Based on the fourth image, a first height of the actual thickness measurement area is determined.
16. The method according to claim 15, characterized in that In the process of controlling the line laser to emit laser light toward the consumable material to be processed, the line laser emits the line laser toward the consumable material to be processed in a non-vertical direction.
17. The method according to claim 13, characterized in that The method further comprises: Controlling the first camera to acquire a sixth image, wherein the sixth image includes the consumable material to be processed; Based on the sixth image and the first image, determining whether the position and / or posture of the consumable to be processed has changed; When the position and / or posture of the consumable to be processed changes, a prompt message is sent to the user to enable the user to re-trigger the image conversion process and obtain a new converted image, or trigger the image conversion process based on the sixth image to obtain a new converted image.
18. The method according to claim 17, characterized in that The first camera acquires images according to a preset shooting cycle, or the first camera acquires images after the hatch of the processing equipment is closed.
19. A processing equipment, characterized in that: The processing equipment includes a processing platform, a tool head, a first camera and a second camera, the shooting angle of the first camera is inclined to the plane where the processing platform is located, the second camera is fixed on the tool head, and the processing platform is used to place the consumables to be processed; The processing equipment also includes a processor, which is used to execute the method in any one of claims 1-9 or claims 10-18.
20. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 9 or claims 10 to 18.