Image processing method, device, equipment and readable medium
By calculating the intersection discrimination factor on the equidistant surface and comparing it with the preset threshold, the self-intersection of the equidistant surface is accurately judged, and the self-intersection problem of the equidistant surface is solved and a more accurate product design image is generated.
Patent Information
- Application Number
- CN202411394047.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-10-08
AI Technical Summary
During the equidistance of surfaces, when the offset distance is too large, the equidistant surface may cause self-intersection, affecting the presentation effect of product design images. How to accurately determine the self-intersection of equidistant surfaces.
By obtaining the point curvature information, position information, and position information of the initial surface, the intersection discrimination factor is calculated and compared with the preset threshold value to obtain the self-intersection discrimination result in order to adjust the equidistant surface.
It realizes accurate judgment of the self-intersection of equidistant surfaces, assists in adjusting the equidistant surfaces, and generates more accurate product design images.
Smart Images

Figure CN118916942B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular, to an image processing method, an image processing device, an electronic device, and a computer-readable medium. Background Art
[0002] In the process of product design, curved surfaces are a commonly used primitive, and isometric surfaces are very useful in processing complex graphics. For example, isometric surfaces are needed when designing curved ceilings in rail transit station models, when designing curved water conservancy dams, when extracting the contours of curved screens, and when designing mechanical parts with curved surfaces such as screws.
[0003] However, when the offset distance of the surface is too large during the isometric offset process, the resulting isometric surface (also known as offset surface) may have self-intersections, thus affecting the final presentation effect of the product design image. Therefore, how to determine the self-intersection of isometric surfaces to generate more accurate product design images is an urgent problem to be solved. Summary of the invention
[0004] The embodiments of the present application provide an image processing method, an image processing device, an electronic device, a computer-readable storage medium, and a computer program product, which can accurately determine the self-intersection of equidistant surfaces to generate more accurate product design images.
[0005] According to one aspect of an embodiment of the present application, an embodiment of the present application provides an image processing method, the method comprising:
[0006] Displaying a product design interface, wherein the product design interface includes a product design image;
[0007] In response to an offset operation on an initial curved surface in the product design image, acquiring an equidistant curved surface corresponding to the initial curved surface in the product design image;
[0008] Obtaining an intersection discrimination factor based on the point curvature information of the equidistant surface, the position information of the equidistant surface, and the position information of the initial surface;
[0009] Comparing the intersection discrimination factor with a first preset threshold to obtain an intersection discrimination result;
[0010] The isometric curved surface is adjusted according to the discrimination result to obtain a new product design image, and the new product design image is output on the product design interface.
[0011] According to one aspect of an embodiment of the present application, an embodiment of the present application provides an image processing device, the device comprising a display unit, an acquisition unit, a processing unit, a comparison unit and an adjustment unit, wherein:
[0012] The display unit displays a product design interface, wherein the product design interface includes a product design image;
[0013] The acquisition unit is used for acquiring an equidistant curved surface corresponding to the initial curved surface in the product design image in response to an offset operation on the initial curved surface in the product design image;
[0014] The processing unit is used to obtain an intersection discrimination factor based on the point curvature information of the equidistant surface, the position information of the equidistant surface, and the position information of the initial surface;
[0015] The comparison unit is used to compare the intersection discrimination factor with a first preset threshold value to obtain an intersection discrimination result;
[0016] The adjustment unit is used to adjust the isometric surface according to the discrimination result to obtain a new product design image.
[0017] In one embodiment, based on the aforementioned scheme, when the processing unit obtains the intersection discrimination factor based on the point curvature information of the equidistant surface, the position information of the equidistant surface, and the position information of the initial surface, it can be specifically used to: obtain the offset vector of each point in the equidistant surface relative to the initial surface according to the position information of the equidistant surface and the position information of the initial surface; obtain the intersection discrimination factor based on the offset vector corresponding to each point, the principal curvature of each point in the point curvature information, and the curvature direction of each point.
[0018] In one embodiment, based on the aforementioned scheme, when the processing unit obtains the intersection discrimination factor based on the offset vector corresponding to each point, the principal curvature and the curvature direction of each point in the point curvature information, it can be specifically used to: obtain the offset discrimination parameter corresponding to each point based on the offset vector corresponding to each point, the principal curvature of each point, and the curvature direction of each point; and determine the maximum offset discrimination parameter among multiple offset discrimination parameters as the intersection discrimination factor.
[0019] In one embodiment, based on the aforementioned scheme, when the adjustment unit adjusts the equidistant surface according to the self-intersection judgment result to obtain a new product design image, it can be specifically used for: if the self-intersection judgment result indicates that the equidistant surface has self-intersection, then obtaining the self-intersection area and non-intersection area in the equidistant surface; based on the self-intersection area and the non-intersection area, adjusting the equidistant surface to obtain a new product design image.
[0020] In one embodiment, based on the aforementioned scheme, when the adjustment unit obtains the self-intersecting areas and non-intersecting areas in the equidistant surface, it can be specifically used to: obtain the offset discrimination parameters corresponding to each point in the equidistant surface based on the point curvature information of the equidistant surface, the position information of the equidistant surface, and the position information of the initial surface; divide the points in the equidistant surface into self-intersecting points and non-intersecting points based on the offset discrimination parameters corresponding to each point and a second preset threshold; determine the surface composed of the self-intersecting points as the self-intersecting area, and determine the surface composed of the non-intersecting points as the non-intersecting area.
[0021] In one embodiment, based on the aforementioned scheme, when the acquisition unit acquires the equidistant surface obtained by moving the initial surface in the product design image, it can be specifically used to: acquire the surface reference point set on the initial surface and the spatial reference point set in the product design image; construct a reference straight line based on the surface normal of the surface reference point on the initial surface and the surface reference point; acquire the projection point of the spatial reference point on the reference straight line, and acquire the offset distance according to the position information of the projection point and the position information of the spatial reference point; move the initial surface by the offset distance to obtain the equidistant surface.
[0022] In one embodiment, based on the above-mentioned scheme, when the comparison unit compares the intersection discrimination factor with the first preset threshold to obtain the self-intersection discrimination result, it can be specifically used to: if the intersection discrimination factor is less than or equal to the first preset threshold, then generate a self-intersection discrimination result for characterizing that the equidistant surface does not have self-intersection; if the intersection discrimination factor is greater than the first preset threshold, then generate a self-intersection discrimination result for characterizing that the equidistant surface has self-intersection.
[0023] According to one aspect of an embodiment of the present application, an embodiment of the present application provides an electronic device, comprising one or more processors; a storage device for storing one or more computer programs, when the one or more computer programs are executed by the one or more processors, the electronic device implements the image processing method as described above.
[0024] According to one aspect of an embodiment of the present application, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor of an electronic device, the electronic device executes the image processing method as described above.
[0025] According to one aspect of an embodiment of the present application, an embodiment of the present application provides a computer program product, including a computer program, wherein the computer program is stored in a computer-readable storage medium, and a processor of an electronic device reads and executes the computer program from the computer-readable storage medium, so that the electronic device performs the image processing method as described above.
[0026] In the technical solution provided in the embodiments of the present application, the intersection discrimination factor can be obtained through the point curvature information and position information of the equidistant surface, as well as the position information of the initial surface, so that the self-intersection discrimination result can be quickly and accurately obtained by comparing the intersection discrimination factor with the first preset threshold. According to the self-intersection discrimination result, it can be determined whether the equidistant surface has self-intersection, so that the equidistant surface can be adjusted by increasing or shortening the offset distance, etc.; this is conducive to the precise adjustment of the equidistant surface to obtain an accurate product design image that can achieve the ideal design effect. It can be seen that the embodiments of the present application can accurately determine the self-intersection of the equidistant surface to generate a more accurate product design image.
[0027] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0029] Figure 1 is a structural schematic diagram of an image processing system provided in an embodiment of the present application;
[0030] Figure 2 It is a flowchart of an image processing method provided in an embodiment of the present application;
[0031] Figure 3 is a schematic diagram of a curved surface movement process provided in an embodiment of the present application;
[0032] Figure 4 is a flowchart of another image processing method provided in an embodiment of the present application;
[0033] Figure 5 is a schematic diagram of a self-intersecting area and a non-intersecting area provided in an embodiment of the present application;
[0034] Figure 6 It is a schematic diagram of a process of curved surface offset provided in an embodiment of the present application;
[0035] Figure 7 is a structural block diagram of an image processing device shown in an exemplary embodiment of the present application;
[0036] Figure 8 It is a structural diagram of a computer system suitable for implementing an electronic device of an embodiment of the present application. DETAILED DESCRIPTION
[0037] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0038] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0039] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all contents and operations, nor must they be executed in the order described. For example, some operations may be decomposed, while some operations may be combined or partially combined, so the actual execution order may change according to actual conditions.
[0040] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0041] It should also be noted that the "multiple" mentioned in this application refers to two or more than two. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship.
[0042] In the process of product design, some basic graphics need to be changed to get the desired shape, or to check the effect after the change for subsequent design updates. Surface is a commonly used primitive, and isometric surface is a very useful means when dealing with complex graphics. Design products based on isometric surfaces are often used in various fields such as rail transportation, hydraulic construction, and machinery.
[0043] For example, in 3D design software such as Solid Work (a design tool that is easy to use for feature-based, parametric and solid modeling), the isometric surface function can create a surface that is equidistant from the original surface. When building a rail transit station model, the isometric surface function can be used to create station walls, station ceilings, etc. At the same time, the isometric surface function is very useful when dealing with complex shapes, such as car shapes, pump internal structures, ship hulls, etc.
[0044] In addition, the equidistant surface can also be used to extract the surface contour of the solid model. For example, when the equidistant distance is set to 0, the newly generated equidistant surface will be consistent with the outer surface of the solid part. With this technique, we can easily extract the outer surface of any model. In addition, in the principle of gear meshing, the principle of equidistant conjugate surfaces is also very valuable; when it is inconvenient for us to study a pair of conjugate surfaces, we can apply this principle to study their equidistant conjugate surfaces instead.
[0045] However, when the offset distance of the surface during the equidistant offset process is too large, the resulting equidistant surface (also called offset surface) may self-intersect, thereby affecting the final presentation effect of the product design image.
[0046] Based on this, the embodiment of the present application provides an image processing solution. After obtaining the equidistant surface corresponding to the initial surface in the product design image, the solution can obtain the intersection discrimination factor based on the point curvature information and position information of the equidistant surface and the position information of the initial surface; and by comparing the intersection discrimination factor with the first preset threshold, the self-intersection discrimination result of the equidistant surface is obtained, so that the equidistant surface can be adjusted according to the self-intersection discrimination result to obtain a new product design image. Among them, the self-intersection discrimination result is used to characterize whether the equidistant surface has self-intersection.
[0047] It is not difficult to see that this solution can obtain the intersection discrimination factor through the point curvature information and position information of the equidistant surface and the position information of the initial surface, so that by comparing the intersection discrimination factor with the first preset threshold, an accurate self-intersection discrimination result can be obtained. And according to the accurate self-intersection discrimination result, the equidistant surface can be accurately adjusted to obtain an accurate product design image that can achieve the ideal design effect. It can be seen that this solution can accurately determine the self-intersection of the equidistant surface to generate a more accurate product design image.
[0048] Based on the above image processing solution, the present application embodiment provides an image processing system, which can be seen in Figure 1 , Figure 1 The image processing system shown may include a terminal device 101 and a server 102, the number of terminal devices 101 may include one or more, and the number of servers 102 may include one or more. Among them, a communication connection is established between any terminal device and any server. For example, the terminal device 101 may include any one or more of a smart phone, a tablet computer, a laptop computer, a desktop computer, an intelligent voice interaction device, a smart home appliance, a vehicle terminal, an aircraft, and an intelligent wearable device. The terminal device 101 may be installed with a client such as Bentley (a BIM (Building Information Modeling, Building Information Modeling) design software), Computer Aided Design (CAD, Computer Aided Design) client for assisting product design. The server 102 may be a server or server cluster that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. Any terminal device 101 and any server 102 may be directly or indirectly connected in communication via wired or wireless communication, and this application is not limited here.
[0049] In some embodiments, the above image processing method can be performed by only Figure 1The terminal device 101 in the image processing system shown is executed, and the specific execution process is: the terminal device 101 can display the product design interface, and the product design interface includes the product design image; then, the terminal device 101 can respond to the designer's offset operation on the initial surface in the product design image, and first obtain the equidistant surface corresponding to the initial surface in the product design image. Then, the terminal device 101 can obtain the intersection discrimination factor based on the point curvature information of the equidistant surface, the position information of the equidistant surface, and the position information of the initial surface; and the terminal device 101 can compare the intersection discrimination factor with the first preset threshold to obtain the self-intersection discrimination result of the equidistant surface. Finally, the terminal device 101 can adjust the equidistant surface according to the self-intersection discrimination result to obtain a new product design image. Further, the terminal device 101 can also output a new product design image in the product design interface for the designer to check whether the expected design effect is achieved.
[0050] In some other embodiments, the above image processing method can also be performed by Figure 1 The terminal device 101 and the server 102 in the image processing system shown in the figure are executed, and the specific execution process may include: the terminal device 101 may display the product design interface, and the product design interface includes the product design image; the terminal device 101 may respond to the designer's offset operation on the initial surface in the product design image, and first obtain the isometric surface corresponding to the initial surface in the product design image. Then, the terminal device 101 sends the point curvature information of the isometric surface, the position information of the isometric surface, and the position information of the initial surface to the server 102, and the server 102 obtains the intersection discrimination factor based on the point curvature information of the isometric surface, the position information of the isometric surface, and the position information of the initial surface. Afterwards, the server 102 may send the intersection discrimination factor to the terminal device 101, and the terminal device 101 may compare the intersection discrimination factor with the first preset threshold value to obtain the self-intersection discrimination result of the isometric surface, and finally adjust the isometric surface according to the self-intersection discrimination result to obtain a new product design image.
[0051] It should be noted that the embodiments of the present application can be applied to various application scenarios that require the design of curved products, including but not limited to games, smart cities, rail transit, construction, machinery and other application scenarios, without limitation to this.
[0052] It should be noted that in the specific implementation of this application, if relevant data or information such as product design images are related to an object, when the embodiment of this application is applied to a specific product or technology, it is necessary to obtain the object's permission or consent, and the collection, use and processing of relevant data or information must comply with relevant laws, regulations and standards of relevant countries and regions.
[0053] The following is a detailed description of various implementation details of the technical solution of the embodiment of the present application:
[0054] like Figure 2 As shown, Figure 2 is a flowchart of an image processing method according to an embodiment of the present application, which can be applied to Figure 1 The image processing system shown in the figure, the method can be executed by the terminal device or the server, or can be executed by the terminal device and the server together. In the embodiment of the present application, the method is executed by the terminal device as an example for explanation, wherein the image processing method may include S201 to S205, which are described in detail as follows:
[0055] S201. Display a product design interface, where the product design interface includes a product design image.
[0056] In the embodiment of the present application, the product design interface may specifically be an interface in a three-dimensional design software such as Solid Work. The product design interface may also include various basic primitives and primitive design parameters. For example, the primitive design parameters may include the distance between primitives, the length, width, curvature, etc. of the primitives, which are not limited here.
[0057] In addition, the product design image may be a three-dimensional image including one or more graphic elements, and the initial curved surface in the product design image may be manually set or provided by the product design interface, which is not limited here.
[0058] S202: In response to an offset operation on an initial curved surface in a product design image, an equidistant curved surface corresponding to the initial curved surface in the product design image is acquired.
[0059] In the embodiment of the present application, the offset operation may specifically include at least one of the following operations, such as a drag operation on the initial curved surface and a setting operation on the offset distance parameter of the initial curved surface, which cause the initial curved surface to generate an equidistant offset.
[0060] The product design image is an image containing an initial surface. Specifically, designers can draw the initial surface on the product design image by interacting with the product design interface; they can also obtain the initial surface by setting parameters such as the surface size and shape in the product design interface. In practical applications, the initial surface can be a basic surface primitive (i.e., a quadratic surface), a non-uniform rational B-spline surface (NURBS surface), etc.; the initial surface can also be obtained by scanning the surface object.
[0061] The equidistant surface corresponding to the initial surface may specifically be an equidistant surface obtained by moving the initial surface. Optionally, in response to an edit operation on an offset distance parameter in a product design interface, the offset distance of the initial surface may be obtained, and then the surface to be obtained by moving the initial surface by the offset distance may be used as the equidistant surface corresponding to the initial surface. Optionally, the designer may also directly set the position to which the initial surface is desired to be moved in the product design image, and then use the surface to be obtained by moving the initial surface to the position as the equidistant surface corresponding to the initial surface. Optionally, the equidistant surface may also be obtained by other means, which are not limited here.
[0062] Specifically, since the isometric surface corresponding to the initial surface may need to be adjusted based on the self-intersection judgment result, the isometric surface corresponding to the initial surface may not be output in the product design image. The position of the isometric surface in the product design image may be clarified only based on the set offset distance, position and other information. Alternatively, the isometric surface may be displayed in a non-highlighted manner in the product design image, such as by displaying a dotted outline of the isometric surface.
[0063] In one embodiment, the designer may also obtain the offset distance to the initial surface by setting a surface reference point on the initial surface and setting a space reference point to which the surface reference point is to be moved in the space of the product design image.
[0064] Then, the process of obtaining the isometric surface can specifically include: displaying the product design image, and then in response to the designer's selection operation on the initial surface in the product design image, obtaining the surface reference point set by the designer on the initial surface; and, in response to the designer's editing operation on the product design image, obtaining the spatial reference point set by the designer in the product design image; then, based on the surface normal of the surface reference point on the initial surface, and the surface reference point, constructing a reference straight line; then, obtaining the projection point of the spatial reference point on the reference straight line, and obtaining the offset distance based on the position information of the projection point and the position information of the spatial reference point; finally, moving the initial surface by the offset distance can obtain the isometric surface corresponding to the initial surface.
[0065] In practical applications, designers can draw a non-self-intersecting NURBS surface in the product design interface. , Representing three-dimensional space; as the initial surface, the NURBS surface formula (1-1) is as follows:
[0066]
[0067] in, is the parameter value of any point on the initial surface in the length dimension, is the parameter value of any point on the initial surface in the width dimension. The parameter of a point is the unique value of a point on a curve or surface (similar to a coordinate). A surface has two internal dimensions, namely length and width.
[0068] and are all B-spline basis functions, Represents the node vector elements, Represents the node vector elements, the node vector is an increasing sequence. and Characterizes the degree of the basis function. Characterizes the total number of surface control points corresponding to the initial surface, . Used to characterize surface control points. The weights used to characterize the surface control points.
[0069] The designer can then select a point on the initial surface As a surface reference point, and to select a point in space within a product design image as a spatial reference point. Then, calculate The face normal at ; The face normal formula (1-2) is as follows:
[0070]
[0071] in, , .
[0072] In calculating Afterwards, it can be determined To reference line The projection point on (i.e. the foot of the perpendicular) Then, the offset distance is obtained according to formula (1-3), which is as follows:
[0073]
[0074] Where D is the offset distance. After calculating the offset distance, the isotropic surface (i.e., offset surface) of the initial surface can be constructed. , as shown in formula (1-4):
[0075]
[0076] S203, obtaining an intersection discrimination factor based on the point curvature information of the equidistant surface, the position information of the equidistant surface, and the position information of the initial surface.
[0077] In the embodiment of the present application, the point curvature information includes the curvature information of each point in the equidistant surface, wherein the curvature information of each point may specifically include at least one of the principal curvature, curvature direction, curvature and the like of each point.
[0078] The position information of the equidistant surface may include the coordinates of the equidistant surface in the space contained in the product design image, and may also include the position information of each point in the equidistant surface. The position information of each point may include the coordinates of each point in the space within the product design image, and the parameters of the surface control points (specifically, the parameter values of the surface control points in the length dimension and the parameter values of the surface control points in the width dimension). The same is true for the position information of the initial surface and other position information, which will not be described in detail later.
[0079] In one embodiment, since the offset distance is greater than the curvature radius of the point on the surface, the surface will self-intersect. Therefore, the process of obtaining the intersection discrimination factor may specifically include: the offset distance of the equidistant surface relative to the initial surface can be calculated based on the position information of the equidistant surface and the position information of the initial surface; then, the curvature radius of each point on the equidistant surface is calculated based on the point curvature information of the equidistant surface; finally, the intersection discrimination factor is obtained based on the offset distance and the curvature radius of each point on the equidistant surface.
[0080] The ratio between the offset distance and the curvature radius of each point on the equidistant surface can be obtained, and the intersection determination factor can be obtained based on multiple ratios. Optionally, the minimum ratio among the multiple ratios can be used as the intersection determination factor.
[0081] In one embodiment, the process of obtaining the intersection discrimination factor may specifically include: first, according to the position information of the equidistant surface and the position information of the initial surface, the offset vector of each point in the equidistant surface relative to the initial surface is obtained; then, based on the offset vector corresponding to each point, the principal curvature of each point in the point curvature information and the curvature direction of each point, the intersection discrimination factor is obtained.
[0082] Optionally, the specific process of obtaining the intersection discriminant factor based on the offset vector corresponding to each point, the principal curvature of each point in the point curvature information, and the curvature direction of each point may include: obtaining the offset discriminant parameter corresponding to each point based on the offset vector corresponding to each point, the principal curvature of each point, and the curvature direction of each point; and then, determining the maximum offset discriminant parameter among multiple offset discriminant parameters as the intersection discriminant factor.
[0083] S204: Compare the intersection discrimination factor with the first preset threshold to obtain a self-intersection discrimination result of the equidistant surface.
[0084] In an embodiment of the present application, the first preset threshold may be manually set, or may be set by a terminal device or server in the above-mentioned image processing system, which is not limited here. Specifically, the first preset threshold may change according to the change in the acquisition method of the aforementioned intersection discrimination factor. For example, if the discrimination factor is obtained based on the ratio between the offset distance and the radius of curvature of each point on the equidistant surface, and the offset distance is used as the numerator and the radius of curvature of each point is used as the denominator; then, the first preset threshold may be set to 1 at this time. Correspondingly, the comparison process of the intersection discrimination factor and the first preset threshold may specifically include: if the intersection discrimination factor is greater than the first preset threshold, a self-intersection discrimination result is generated to characterize the existence of self-intersection of the equidistant surface; if the intersection discrimination factor is less than or equal to the first preset threshold, a self-intersection discrimination result is generated to characterize the absence of self-intersection of the equidistant surface.
[0085] Optionally, if the discriminant factor is obtained based on the ratio between the offset distance and the curvature radius of each point on the equidistant surface, and the curvature radius of each point is used as the numerator and the offset distance is used as the denominator; then, at this time, the first preset threshold value can be set to 1. Correspondingly, the comparison process of the intersection discriminant factor and the first preset threshold value can specifically include: if the intersection discriminant factor is less than or equal to the first preset threshold value, a self-intersection discriminant result is generated to characterize that the equidistant surface does not have self-intersection; if the intersection discriminant factor is greater than the first preset threshold value, a self-intersection discriminant result is generated to characterize that the equidistant surface has self-intersection.
[0086] Optionally, if the intersection discriminant factor is obtained based on the offset vector corresponding to each point, the principal curvature of each point in the point curvature information, and the curvature direction of each point, the first preset threshold value may be set to 0. Accordingly, the comparison process of the intersection discriminant factor and the first preset threshold value may specifically include: if the intersection discriminant factor is less than or equal to the first preset threshold value, a self-intersection discriminant result is generated to characterize that the equidistant surface does not have self-intersection; if the intersection discriminant factor is greater than the first preset threshold value, a self-intersection discriminant result is generated to characterize that the equidistant surface has self-intersection.
[0087] In practical applications, following the example in step S201, after obtaining the isometric surface After that, the following judgment formula (1-5) can be used to determine whether the equidistant surface has self-intersection:
[0088]
[0089] in, ; u, v belong to the initial surface The domain of definition. is the offset discrimination parameter corresponding to each point in the equidistant surface; .
[0090] is the curvature direction of each point in the equidistant surface, ,in," " is used to becomes a unit vector. is the minimum value of the principal curvature at each point, . is the offset vector corresponding to each point, .
[0091] S205 , adjusting the equidistant surface according to the self-intersection judgment result to obtain a new product design image, and outputting the new product design image on the product design interface.
[0092] In the embodiment of the present application, the self-intersection judgment result can be directly output to assist the designer in determining whether to continue moving the equidistant surface.
[0093] Specifically, if the self-intersection judgment result is used to characterize that the equidistant surface does not have self-intersection, it means that the offset distance can be larger, so relevant information about continued offset can be output to assist designers in determining whether to continue moving; if the self-intersection judgment result is used to characterize that the equidistant surface has self-intersection, it means that the offset distance is too large, so prompt information about the occurrence of self-intersection can be output to assist designers in determining whether to continue moving.
[0094] In one embodiment, the terminal device may also obtain in advance the self-intersection judgment results corresponding to the equidistant surfaces obtained after the initial surface is offset by multiple different distances; then, based on the self-intersection judgment results corresponding to the multiple equidistant surfaces, determine the target equidistant surface without self-intersection, and find the maximum offset distance among the offset distances corresponding to the target equidistant surface. Finally, based on the maximum offset distance, the terminal device may determine whether the offset distance or position set by the designer is greater than the maximum offset distance.
[0095] Specifically, if it is greater than, prompt information indicating that the equidistant surface obtained based on the setting has self-intersection can be output; if it is less than, prompt information indicating that the equidistant surface obtained based on the setting has no self-intersection can be output.
[0096] For example, see Figure 3 , which shows a schematic diagram of a surface movement process. Figure 3 As shown in FIG. 301 , after the initial surface in FIG. 301 is moved by the maximum offset distance, an equidistant surface (indicated by a dotted line) as shown in FIG. 302 can be obtained. The solid line portion in FIG. 302 indicates the initial surface. On this basis, if the offset distance is further increased, the obtained equidistant surface is as shown in FIG. 303 , where there is a self-intersecting area.
[0097] Optionally, other adjustments may be made to the equidistant surface according to the self-intersection determination result, which is not limited here.
[0098] In an embodiment of the present application, an intersection discrimination factor can be obtained through the point curvature information and position information of the equidistant surface, as well as the position information of the initial surface, so that the self-intersection discrimination result can be quickly and accurately obtained by comparing the intersection discrimination factor with the first preset threshold. According to the self-intersection discrimination result, it can be determined whether the equidistant surface has self-intersection, so that the equidistant surface can be adjusted by increasing or shortening the offset distance, etc.; this is conducive to the precise adjustment of the equidistant surface to obtain an accurate product design image that can achieve the ideal design effect. It can be seen that the embodiment of the present application can accurately determine the self-intersection of the equidistant surface to generate a more accurate product design image.
[0099] In one embodiment of the present application, another image processing method is provided, which can be applied to Figure 1 The image processing system shown in the figure, the method can be executed by the terminal device or the server, or by the terminal device and the server together. In the embodiment of the present application, the method is described by taking the terminal device as an example. Figure 4 FIG. 4 is a flow chart showing another image processing method. Figure 2 This is an extension of the method shown in .
[0100] Among them, the detailed introduction of S401 to S405 is as follows:
[0101] S401. Display a product design interface, where the product design interface includes a product design image.
[0102] In the embodiment of the present application, the specific implementation of S401 can refer to the specific implementation of S201 and will not be described in detail here.
[0103] S402: In response to an offset operation on an initial curved surface in a product design image, an equidistant curved surface corresponding to the initial curved surface in the product design image is obtained.
[0104] In the embodiment of the present application, the specific implementation of S402 can refer to the specific implementation of S202, which will not be repeated here.
[0105] S403, obtaining an intersection discrimination factor based on the point curvature information of the equidistant surface, the position information of the equidistant surface, and the position information of the initial surface.
[0106] In the embodiment of the present application, the specific implementation of S402 can refer to the specific implementation of S202, which will not be repeated here.
[0107] S404: Compare the intersection discrimination factor with the first preset threshold to obtain a self-intersection discrimination result of the equidistant surface.
[0108] In the embodiment of the present application, the specific implementation of S403 can refer to the specific implementation of S203, which will not be described in detail here.
[0109] S405. If the self-intersection determination result indicates that the equidistant surface has self-intersection, obtain the self-intersection area and the non-intersection area in the equidistant surface.
[0110] In the embodiment of the present application, the self-intersecting area and the non-intersecting area in the equidistant surface can be determined according to the offset discrimination parameters corresponding to each point in the equidistant surface.
[0111] Specifically, based on the point curvature information of the equidistant surface, the position information of the equidistant surface, and the position information of the initial surface, the offset discrimination parameters corresponding to each point in the equidistant surface can be obtained; then, based on the offset discrimination parameters corresponding to each point and the second preset threshold, the points in the equidistant surface are divided into intersection points and non-intersection points; finally, the surface composed of intersection points is determined as a self-intersection area, and the surface composed of non-intersection points is determined as a non-intersection area.
[0112] The process of obtaining the offset discrimination parameter may refer to the specific implementation in step S202, which will not be described in detail here. The second preset threshold may be set manually or by a terminal device or server in the above-mentioned image processing system, which is not limited here. Specifically, the second preset threshold may be the same as the first preset threshold.
[0113] In practical applications, numerical methods or sampling can be used to calculate As a result, we get the set If a point corresponds to If it is equal to 0, it means that the point is the intersection of the self-intersecting area and the non-intersecting area.
[0114] Then, you can use De-segmentation The domain of , .in, is the domain of non-intersecting points in the surface, is the domain of self-intersection points in the surface. In the product design image in the Boundary Representation (Brep) format, you can use , The domain of definition is used to filter self-intersecting areas and non-intersecting areas.
[0115] For details, please see the attached Figure 5, which shows a schematic diagram of a self-intersecting region and a non-intersecting region. Figure 5 As shown in FIG. 5 , after moving the surface 501 by an appropriate distance, an equidistant surface 502 can be obtained. However, when the moving distance is too large, as shown in equidistant surface 503, self-intersection begins to occur. Points A and B on equidistant surface 503 represent position information belonging to the domain of The equidistant surface 503 is divided into three parts: surface 504, surface 505 and surface 506 by point A and point B.
[0116] Since the position information of the midpoints of the surfaces 504 and 505 belongs to the definition domain Therefore, the surface 504 and the surface 505 are non-intersecting areas in the equidistant surface 503; and the position information of the midpoint of the surface 506 belongs to the definition domain Therefore, the surface 506 is the self-intersecting area in the equidistant surface 503.
[0117] S406: Based on the self-intersecting area and the non-intersecting area, the equidistant surface is adjusted to obtain a new product design image, and the new product design image is output on the product design interface.
[0118] In the embodiment of the present application, the adjustment process may specifically include: selecting to retain only the self-intersecting areas in the equidistant surface, or selecting to retain only the non-intersecting areas in the equidistant surface. Then, the new product design image outputted by the product design interface may only contain the self-intersecting areas, or only contain the non-intersecting areas.
[0119] Optionally, when outputting a new product design image in the product design interface, the self-intersecting areas in the new product design image can be highlighted, the non-self-intersecting areas can be highlighted, or the self-intersecting areas and non-self-intersecting areas can be displayed in different ways (such as displaying different colors, attaching different logos, etc.) to distinguish the self-intersecting areas and non-self-intersecting areas in the equidistant surface; then, the designer can choose whether to continue to adjust the offset distance (increase the offset distance or shorten the offset distance) according to the effect of the self-intersecting areas or non-intersecting areas in the new product design image.
[0120] In general, combined with the actual examples in S202, S204 and S405, please see the attached Figure 6 , shows a schematic diagram of the process of surface migration. Figure 6 As shown, after obtaining the non-uniform rational B-spline surface (referred to as NURBS surface, i.e. the aforementioned initial surface), the offset distance of the NURBS surface is calculated to obtain the equidistant surface corresponding to the NURBS surface. Then, it is determined whether the equidistant surface will intersect itself.
[0121] If it is self-intersecting, the non-intersecting area and self-intersecting area in the equidistant surface can be obtained to adjust the equidistant surface according to the non-intersecting area and the self-intersecting area, thereby completing the offset of the NURBS surface. If it is not self-intersecting, the offset distance can be increased until the design requirements are met, thereby completing the offset of the NURBS surface.
[0122] In the embodiment of the present application, when it is determined that there is self-intersection in the equidistant surface, the non-intersecting area and the self-intersecting area in the equidistant surface are obtained, and the equidistant surface is adjusted according to the non-intersecting area and the self-intersecting area, so that the non-intersecting area and the self-intersecting area can be customized and reserved, providing designers with a more flexible and novel design direction. In this way, while ensuring the accuracy of the product design image, it is also conducive to more flexible and free expression of design intent and obtaining richer design effects.
[0123] Here, an apparatus embodiment of the present application is introduced, which can be used to execute the image processing method in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the above-mentioned embodiment of the image processing method of the present application.
[0124] The present application embodiment provides an image processing device, such as Figure 7 As shown, the device includes a display unit 701, an acquisition unit 702, a processing unit 703, a comparison unit 704 and an adjustment unit 705, wherein:
[0125] A display unit 701 is used to display a product design interface, which includes a product design image;
[0126] An acquisition unit 702, configured to acquire an isometric surface corresponding to the initial surface in the product design image in response to an offset operation on the initial surface in the product design image;
[0127] A processing unit 703 is used to obtain an intersection discrimination factor based on the point curvature information of the equidistant surface, the position information of the equidistant surface, and the position information of the initial surface;
[0128] A comparison unit 704 is used to compare the intersection discrimination factor with the first preset threshold value to obtain a self-intersection discrimination result of the equidistant surface;
[0129] The adjustment unit 705 is used to adjust the isometric surface according to the self-intersection judgment result to obtain a new product design image.
[0130] In one embodiment of the present application, based on the aforementioned scheme, when the processing unit 703 obtains the intersection discrimination factor based on the point curvature information of the equidistant surface, the position information of the equidistant surface, and the position information of the initial surface, it can be specifically used to: obtain the offset vector of each point in the equidistant surface relative to the initial surface according to the position information of the equidistant surface and the position information of the initial surface; obtain the intersection discrimination factor based on the offset vector corresponding to each point, the principal curvature of each point in the point curvature information, and the curvature direction of each point.
[0131] In one embodiment of the present application, based on the aforementioned scheme, when the processing unit 703 obtains the intersection discrimination factor based on the offset vector corresponding to each point, the principal curvature of each point in the point curvature information and the curvature direction of each point, it can be specifically used to: obtain the offset discrimination parameter corresponding to each point based on the offset vector corresponding to each point, the principal curvature of each point, and the curvature direction of each point; determine the maximum offset discrimination parameter among multiple offset discrimination parameters as the intersection discrimination factor.
[0132] In one embodiment of the present application, based on the aforementioned scheme, when the adjustment unit 705 adjusts the equidistant surface according to the self-intersection judgment result to obtain a new product design image, it can be specifically used for: if the self-intersection judgment result indicates that the equidistant surface has self-intersection, then the self-intersection area and non-intersection area in the equidistant surface are obtained; based on the self-intersection area and non-intersection area, the equidistant surface is adjusted to obtain a new product design image.
[0133] In one embodiment of the present application, based on the aforementioned scheme, when the adjustment unit 705 obtains the self-intersecting areas and non-intersecting areas in the equidistant surface, it can be specifically used to: obtain the offset discrimination parameters corresponding to each point in the equidistant surface based on the point curvature information of the equidistant surface, the position information of the equidistant surface, and the position information of the initial surface; divide the points in the equidistant surface into self-intersecting points and non-intersecting points based on the offset discrimination parameters corresponding to each point and a second preset threshold; determine the surface composed of self-intersecting points as a self-intersecting area, and determine the surface composed of non-intersecting points as a non-intersecting area.
[0134] In one embodiment of the present application, based on the aforementioned scheme, when acquiring the equidistant surface obtained by moving the initial surface in the product design image, the acquisition unit 702 can be specifically used to: acquire the surface reference point set on the initial surface, and the spatial reference point set in the product design image; construct a reference straight line based on the surface normal of the surface reference point on the initial surface, and the surface reference point; acquire the projection point of the spatial reference point on the reference straight line, and acquire the offset distance based on the position information of the projection point and the position information of the spatial reference point; move the initial surface by the offset distance to obtain the equidistant surface.
[0135] In one embodiment of the present application, based on the above-mentioned scheme, when the comparison unit 704 compares the intersection discrimination factor with the first preset threshold to obtain the self-intersection discrimination result, it can be specifically used to: if the intersection discrimination factor is less than or equal to the first preset threshold, then generate a self-intersection discrimination result for characterizing that the equidistant surface does not have self-intersection; if the intersection discrimination factor is greater than the first preset threshold, then generate a self-intersection discrimination result for characterizing that the equidistant surface has self-intersection.
[0136] It should be noted that the device provided in the above embodiment and the method provided in the above embodiment belong to the same concept, wherein the specific manner in which each module and unit performs the operation has been described in detail in the method embodiment and will not be repeated here.
[0137] The device provided in the above-mentioned embodiment can be arranged in a terminal device or in a server. The device provided in the embodiment of the present application can obtain the intersection discrimination factor through the point curvature information and position information of the equidistant surface and the position information of the initial surface, so that the self-intersection discrimination result can be quickly and accurately obtained by comparing the intersection discrimination factor with the first preset threshold value. According to the self-intersection discrimination result, it can be determined whether the equidistant surface has self-intersection, so that the equidistant surface can be adjusted by increasing or shortening the offset distance and other aspects; this is conducive to the precise adjustment of the equidistant surface to obtain an accurate product design image that can achieve the ideal design effect. It can be seen that the device provided in the embodiment of the present application can accurately determine the self-intersection of the equidistant surface to generate a more accurate product design image.
[0138] An embodiment of the present application also provides an electronic device, comprising one or more processors and a storage device, wherein the storage device is used to store one or more computer programs, and when the one or more computer programs are executed by one or more processors, the electronic device implements the above image processing method.
[0139] Figure 8 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.
[0140] It should be noted that Figure 8 The computer system 800 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0141] like Figure 8As shown, the computer system 800 includes a processor (Central Processing Unit, CPU) 801, which can perform various appropriate actions and processes according to the program stored in the read-only memory (Read-Only Memory, ROM) 802 or the program loaded from the storage part 808 to the random access memory (Random Access Memory, RAM) 803, such as executing the method in the above embodiment. In the RAM 803, various programs and data required for system operation are also stored. The CPU 801, the ROM 802 and the RAM 803 are connected to each other through the bus 804. The input / output (Input / Output, I / O) interface 805 is also connected to the bus 804.
[0142] In some embodiments, the following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a local area network (LAN) card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed so that a computer program read therefrom is installed into the storage section 808 as needed.
[0143] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 809, and / or installed from a removable medium 811. When the computer program is executed by the processor (CPU) 801, various functions defined in the system of the present application are executed.
[0144] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (Erasable Programmable Read Only Memory), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier, which carries a computer-readable computer program. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. A computer program contained on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0145] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the devices, methods and computer program products according to various embodiments of the present application. Among them, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and a computer program.
[0146] The units or modules involved in the embodiments described in this application may be implemented by software or hardware, and the units or modules described may also be set in a processor. The names of these units or modules do not, in some cases, constitute limitations on the units or modules themselves.
[0147] Another aspect of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the image processing method as described above is implemented. The computer-readable storage medium may be included in the electronic device described in the above embodiment, or may exist independently without being assembled into the electronic device.
[0148] Another aspect of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. A processor of an electronic device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the electronic device performs the image processing method as described above in the above embodiments.
[0149] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0150] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.
[0151] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. A person of ordinary skill in the art can easily make corresponding changes or modifications based on the main concept and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.
Claims
1. An image processing method, characterized in that: include: Displaying a product design interface, wherein the product design interface includes a product design image; In response to an offset operation on an initial curved surface in the product design image, acquiring an equidistant curved surface corresponding to the initial curved surface in the product design image; Obtaining an intersection discrimination factor based on the point curvature information of the equidistant surface, the position information of the equidistant surface, and the position information of the initial surface; Comparing the intersection discrimination factor with a first preset threshold value to obtain a self-intersection discrimination result of the equidistant surface; Adjusting the equidistant surface according to the self-intersection determination result to obtain a new product design image, and outputting the new product design image on the product design interface; The obtaining of the intersection discrimination factor based on the point curvature information of the equidistant surface, the position information of the equidistant surface, and the position information of the initial surface comprises: Obtaining, according to the position information of the equidistant surface and the position information of the initial surface, an offset vector of each point in the equidistant surface relative to the initial surface; Obtaining the intersection discrimination factor based on the offset vector corresponding to each point, the principal curvature of each point in the point curvature information, and the curvature direction of each point; The obtaining of the intersection discrimination factor based on the offset vector corresponding to each point, the principal curvature of each point in the point curvature information, and the curvature direction of each point includes: Based on the offset vector corresponding to each point, the principal curvature of each point, and the curvature direction of each point, the offset discrimination parameter corresponding to each point is obtained; the calculation process of the offset discrimination parameter corresponding to each point includes: multiplying the minimum value of the principal curvature of each point by the curvature direction of each point to obtain a calculation result; calculating the difference between the offset vector corresponding to each point and the calculation result; multiplying the difference by the curvature direction of each point to obtain the offset discrimination parameter corresponding to each point.
2. The method according to claim 1, characterized in that The step of adjusting the isometric surface according to the self-intersection determination result to obtain a new product design image includes: If the self-intersection determination result indicates that the equidistant surface has self-intersection, then obtaining the self-intersection area and the non-intersection area in the equidistant surface; Based on the self-intersecting area and the non-intersecting area, the equidistant surface is adjusted to obtain a new product design image.
3. The method according to claim 2, characterized in that The obtaining of the self-intersecting area and the non-intersecting area in the equidistant surface comprises: Obtaining the offset discrimination parameter corresponding to each point in the equidistant surface; Based on the offset discrimination parameter corresponding to each point and a second preset threshold, dividing the points in the equidistant surface into self-intersecting points and non-intersecting points; The curved surface composed of the self-intersecting points is determined as the self-intersecting area, and the curved surface composed of the non-intersecting points is determined as the non-intersecting area.
4. The method according to any one of claims 1 to 3, characterized in that The step of obtaining an isometric curved surface corresponding to an initial curved surface in the product design image includes: Acquire a surface reference point set on the initial surface and a space reference point set in the product design image; Constructing a reference straight line based on the surface normal of the surface reference point on the initial surface and the surface reference point; Acquire a projection point of the spatial reference point on the reference straight line, and obtain an offset distance according to position information of the projection point and position information of the spatial reference point; The initial curved surface is moved by the offset distance to obtain the equidistant curved surface.
5. The method according to any one of claims 1 to 3, characterized in that The step of comparing the intersection discrimination factor with a first preset threshold to obtain a self-intersection discrimination result of the equidistant surface includes: If the intersection discrimination factor is less than or equal to the first preset threshold, generating a self-intersection discrimination result for indicating that the equidistant surface does not have self-intersection; If the intersection determination factor is greater than the first preset threshold, a self-intersection determination result is generated to indicate that the equidistant surface has self-intersection.
6. An image processing device, characterized in that: The device comprises a display unit, an acquisition unit, a processing unit, a comparison unit and an adjustment unit, wherein: The display unit is used to display a product design interface, wherein the product design interface includes a product design image; The acquisition unit is used for acquiring an equidistant curved surface corresponding to the initial curved surface in the product design image in response to an offset operation on the initial curved surface in the product design image; The processing unit is used to obtain an intersection discrimination factor based on the point curvature information of the equidistant surface, the position information of the equidistant surface, and the position information of the initial surface; The comparison unit is used to compare the intersection discrimination factor with a first preset threshold value to obtain a self-intersection discrimination result of the equidistant surface; The adjustment unit is used to adjust the equidistant surface according to the self-intersection judgment result to obtain a new product design image, and output the new product design image on the product design interface; When the processing unit obtains the intersection discriminant factor based on the point curvature information of the equidistant surface, the position information of the equidistant surface, and the position information of the initial surface, the processing unit is used to obtain the offset vector of each point in the equidistant surface relative to the initial surface according to the position information of the equidistant surface and the position information of the initial surface; and obtain the intersection discriminant factor based on the offset vector corresponding to each point, the principal curvature of each point in the point curvature information, and the curvature direction of each point; When the processing unit obtains the intersection discrimination factor based on the offset vector corresponding to each point, the principal curvature of each point in the point curvature information and the curvature direction of each point, the processing unit is used to obtain the offset discrimination parameter corresponding to each point based on the offset vector corresponding to each point, the principal curvature of each point and the curvature direction of each point; the calculation process of the offset discrimination parameter corresponding to each point includes: multiplying the minimum value of the principal curvature of each point by the curvature direction of each point to obtain a calculation result; calculating the difference between the offset vector corresponding to each point and the calculation result; and multiplying the difference by the curvature direction of each point to obtain the offset discrimination parameter corresponding to each point.
7. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the image processing method according to any one of claims 1 to 5 is implemented.
8. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the image processing method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Profile tolerance error measurement device and method based on arc surfaced cam isometric model
CN103925902A
Added material manufacturing method and device based on characteristics
CN106985395A