Image processing method and computer device
Patent Information
- Application Number
- CN202610974825.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-30
- Publication Date
- 2026-09-25
AI Technical Summary
[0003]目前的纸艺风格三维生成方法中,多依赖手工建模或简单的纹理贴图模拟,无法实现从图像内容到几何结构的自动映射
[0007]本申请实施例通过图像的图像属性来得到组成轮廓与图像轮廓基本一致的多个有效分区,然后根据这些有效分区的几何特征生成螺旋曲线,最后对这些螺旋曲线模拟出三维螺旋几何体,从而实现从图像内容到几何结构的自动映射,无需通过手动建模的方式形成卷纸工艺效果,且可以提高螺旋纸带的随机性,有利于提高对图像以卷纸工艺进行数字化加工的效率和视觉效果。
Smart Images

Figure CN122820945A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, specifically to an image processing method and a computer device. Background Technology
[0002] Quilling is a traditional craft that uses thin strips of paper to create decorative patterns through winding and folding. In recent years, it has attracted widespread attention in areas such as game scene decoration, film and television concept design, and the recreation of digital twin artworks. With the rapid growth in demand for high-precision procedural decorative assets in the 3D content industry, how to efficiently and automatically transform arbitrary reference images into procedural geometries with a realistic paper art structure in 3D software has become an important technical challenge.
[0003] Current methods for generating 3D paper art styles mostly rely on manual modeling or simple texture mapping simulation, which cannot achieve automatic mapping from image content to geometric structure. Summary of the Invention
[0004] This application provides an image processing method and computer device that achieves the visual effect of paper rolling process through the logical link of "image information → region partitioning → spiral generation", realizing automatic mapping from image content to geometric structure.
[0005] On one hand, embodiments of this application provide an image processing method, the method comprising: generating multiple effective partitions based on image attributes of a target image; converting the partition boundaries of the effective partitions into closed curves, and obtaining multiple curve points sequentially distributed on the closed curves; generating spiral curves in each of the multiple effective partitions based on the geometric features of the multiple effective partitions; and performing three-dimensional simulation processing on the multiple spiral curves to generate multiple three-dimensional spiral geometries.
[0006] On the other hand, embodiments of this application provide a computer device, the computer device including a processor and a memory, the memory storing a computer program, the processor executing the image processing method as described in any of the above embodiments by calling the computer program stored in the memory.
[0007] This application embodiment obtains multiple effective partitions whose compositional contours are basically consistent with the image contours through the image attributes of the image. Then, a spiral curve is generated based on the geometric features of these effective partitions. Finally, a three-dimensional spiral geometry is simulated for these spiral curves, thereby realizing automatic mapping from image content to geometric structure. This eliminates the need for manual modeling to form the paper roll process effect and can improve the randomness of the spiral paper roll, which is beneficial to improving the efficiency and visual effect of digital processing of images using the paper roll process. Attached Figure Description
[0008] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0009] Figure 1 This is a schematic diagram of an example game system provided in an embodiment of this application.
[0010] Figure 2 This is a schematic flowchart of the image processing method provided in an embodiment of this application.
[0011] Figure 3 This is a schematic diagram of the image processing apparatus provided in an embodiment of this application.
[0012] Figure 4 This is a schematic diagram of a preset plane provided in an embodiment of this application.
[0013] Figure 5 This is a schematic diagram of the target image provided in an embodiment of this application.
[0014] Figure 6 A schematic diagram of an effective partition provided in an embodiment of this application.
[0015] Figure 7 This is a schematic diagram illustrating the effect of smoothing the effective partition boundaries as provided in an embodiment of this application.
[0016] Figure 8 This is a schematic diagram of a spiral curve provided in an embodiment of this application.
[0017] Figure 9 A schematic diagram of the top structure of the first helical geometry provided in the embodiments of this application.
[0018] Figure 10 This is a schematic diagram of the top structure of the second helical geometry provided in an embodiment of this application.
[0019] Figure 11 This is a schematic diagram illustrating the final effect of processing a target image using a paper-rolling process, as provided in an embodiment of this application.
[0020] Figure 12 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0022] This application provides an image processing method and a computer device. Specifically, the image processing method of this application can be executed by a computer device, which can be a terminal or a server. The terminal can be a smartphone, tablet, laptop, smart TV, wearable smart device, smart vehicle terminal, etc. The terminal can also include a client, which can be a game client, browser client, instant messaging client, or mini-program, etc. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0023] For example, when this image processing method is run on a terminal device, the terminal device may include a display screen and a processor. The display screen is used to present game visuals and receive commands generated by the player interacting with the game visuals. The game visuals may include a portion of a virtual game scene, which is a virtual world where virtual characters move. The processor is used to store the game application, run the game, generate game visuals, respond to commands, and control the display of the game visuals on the display screen. When the player interacts with the game visuals through the display screen, the game visuals can control the local content of the terminal device in response to the received operation commands. The terminal device can provide the graphical user interface to the player in various ways, such as rendering the display on the terminal device's screen or presenting the graphical user interface through holographic projection.
[0024] For example, when this image processing method runs on a server, it can be implemented and executed based on a cloud gaming system. A cloud gaming system refers to a gaming method based on cloud computing. A cloud gaming system includes servers and client devices. The main body running the game application and the main body displaying the game screen are separate. The storage and execution of the image processing method are completed on the server. The game screen display is completed on the client, which is mainly used for receiving and sending game data and displaying the game screen. For example, the client can be a display device with data transmission capabilities located close to the player, such as a mobile terminal, television, computer, PDA, personal digital assistant, head-mounted display device, etc. However, the terminal device for processing game data is the server in the cloud. During gameplay, the player operates the client to send commands to the server. The server controls the game operation according to the commands, encodes and compresses game screen data, returns it to the client via the network, and finally, the client decodes and outputs the game screen.
[0025] It should be noted that, in this embodiment, the entity executing the image processing method can be a terminal device or a server. The terminal device can be a local terminal device or a client device in the aforementioned cloud gaming. This embodiment does not limit the type of the entity executing the method.
[0026] It is understood that in the specific implementation of this application, user object data, context data and other related data are involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0027] For example, in conjunction with the above description, Figure 1 This application illustrates a game system 1000 for implementing an image processing method, as provided in an embodiment of this application. The game system 1000 may include at least one terminal 1001, at least one server 1002, at least one database 1003, and a network. The user-held terminal 1001 can connect to different servers via the network. The terminal is any device with computing hardware capable of supporting and executing software applications corresponding to the game.
[0028] In the aforementioned game system 1000, terminal 1001 is used to install and run the game application. In some cases, the game application may not need to be pre-installed on terminal 1001, and players can directly access the game through a browser or other client. Players log in to the game application using their registered game account to control the virtual character corresponding to that account and participate in the game. When a player logs in to the game application, terminal 1001 sends a login request to server 1002. Server 1002 verifies the game account used by the player and determines the game mechanics corresponding to the game account based on the login request. If the verification is successful, a login success notification is returned to terminal 1001. During the player's participation in the game through the game application, terminal 1001 and server 1002 exchange data. Terminal 1001 sends various information to server 1002. Server 1002 determines the display data for terminal 1001 based on the stored game mechanics and the received information, and sends the display data back to terminal 1001 so that terminal 1001 can display the display data sent by server 1002 to the player.
[0029] In possible application scenarios, different terminals 1001 may be served by different servers 1002. Therefore, in order to distinguish the servers 1002 corresponding to different game terminals 1001, the embodiments of this application will use the terms "first" and "second" to describe them. In fact, the servers 1002 corresponding to different game terminals 1001 can be the same server 1002. Therefore, without distinguishing between "first" and "second", it can be understood that the terminals 1001 corresponding to virtual characters in the same game scene are served by the same server 1002.
[0030] Furthermore, when the game system 1000 includes multiple terminals, multiple servers, and multiple networks, different terminals can connect to each other through different networks and servers. The network can be a wireless network or a wired network; for example, wireless networks include Wi-Fi, LAN, cellular networks, 2G, 3G, 4G, and 5G networks. Additionally, different terminals can also connect to other terminals or servers using their own Bluetooth networks or hotspot networks. Moreover, the system 100 can include multiple databases coupled to different servers, and can continuously store game-related information in the databases while different users are playing multiplayer games online.
[0031] It should be noted that in this embodiment, multiple terminal devices are running the same virtual game. Therefore, data interaction between the multiple terminal devices can be achieved through the virtual game's server. Thus, sending data from terminal device 1 to terminal device 2 can be understood as: terminal device 1 sends data to the virtual game's server, and the server sends the data to terminal device 2. Receiving data from terminal device 2 can be understood as: terminal device 1 receives data sent by the virtual game's server, which is the data sent by terminal device 2 to the server. Alternatively, there may be no game server, and terminal device 1 directly sends game data to terminal device 2.
[0032] It should be noted that, Figure 1 The game system diagram shown is merely an example. The game system 1000 described in this application embodiment is intended to more clearly illustrate the technical solutions of this application embodiment and does not constitute a limitation on the technical solutions provided in this application embodiment. As those skilled in the art will know, with the evolution of game systems and the emergence of new business scenarios, the technical solutions provided in this application embodiment are also applicable to similar technical problems.
[0033] The technical solution of this application will be described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0034] In this embodiment of the application, a graphical user interface is provided through a terminal device. The graphical user interface includes at least a portion of the virtual scene and at least one virtual character.
[0035] The aforementioned virtual scene can be a game scene, which can be understood as a simulation of the real world within a game, a semi-simulated / semi-fictional virtual environment, or a purely fictional virtual environment. A game scene can be any of the following: two-dimensional, 2.5-dimensional, or three-dimensional virtual scenes. A virtual scene typically includes multiple scene elements, which are the various elements required to construct the virtual scene. For example, these may include, but are not limited to, at least one of the following: virtual character elements, virtual item elements, virtual building elements, virtual terrain elements, and virtual vegetation elements. Virtual terrain elements may include, but are not limited to, natural landforms such as land, ocean, lakes, and rivers. A virtual scene is a scenario where players control virtual characters to complete game logic.
[0036] As can be understood, a virtual character is a game character controlled by the player in a game. The player manipulates this virtual character to perform various game activities within the game environment, such as picking up items, engaging in combat, exploring, or solving puzzles. This virtual character can represent the player's image, and each virtual character can be implemented using a three-dimensional or two-dimensional virtual model; this embodiment does not specifically limit this. Virtual characters include, but are not limited to, at least one of virtual human figures, virtual animals, and virtual machines.
[0037] Quilling is a traditional craft that uses thin strips of paper to create decorative patterns through winding and folding. In recent years, it has gained widespread attention in areas such as game scene decoration, film and television concept design, and the recreation of digital twin artworks. Currently, the mainstream methods for generating 3D models of paper art styles are as follows: 1. Manual modeling and piece-by-piece placement method: Artists manually sculpt individual paper strip geometries in 3D modeling software (such as Maya and Blender), and then place them piece by piece to the target position by means of rotation, copying, arraying, etc. Relying on manual judgment to adjust the curvature, height and position of each paper strip to simulate the curling effect of paper art. 2. Procedural texture generation method based on Worley noise: Use Worley noise in shaders or texture synthesizers (such as Substance Designer) to generate visually similar cellular patterns resembling Voronoi, which are then mapped onto the model surface as normal maps or color maps to simulate a sense of partitioning with a two-dimensional visual effect, without generating realistic three-dimensional curled geometry; 3. L-System-based procedural curve growth method: The Lindenmayer system (L-System) is used to define the curling rules, and a spiral curve is generated according to recursive rules in a dedicated growth node or plugin. The L-System can generate visual spiral branches, but its distribution area and density are controlled by fixed recursive parameters, and it is impossible to dynamically map the partition position and spiral parameters from the external image density field; 4. Point cloud scattering and static instantiation (Scatter & Instancing) method: In Houdini, scattering nodes are used to plot points on a plane according to the density map, and then a pre-made spiral curve is instantiated onto each point. Each instance shares the same pre-made curve, making it impossible to adaptively adjust the number of spiral turns, convergence radius, and height changes according to the shape and area of the Voronoi cell.
[0038] Based on the above, the mainstream methods for generating 3D paper art styles have the following drawbacks or shortcomings: 1. Manually creating each piece of model is extremely labor-intensive, and the 3D production of a single paper art pattern takes several days, which cannot meet the needs of mass content production. 2. The Worley noise method only generates two-dimensional texture effects, lacking realistic three-dimensional geometric depth. It completely loses the three-dimensional sense of paper art curling in close-up and side views, and cannot participate in physical simulation. 3. The distribution logic of L-System curve growth is hard-coded by recursive rules, which cannot respond to spatial changes in the external image density field, and there is no direct mathematical mapping relationship between image content and geometric distribution; 4. In the point cloud scattering instantiation method, the spiral parameters of each instance are completely identical, and the partition boundary has no effect on the spiral shape, resulting in the final effect lacking a structural correspondence with the reference image, and the partition size does not match the number of spiral turns; 5. In existing methods, each step is independent of the others and lacks a unified parameterized driving framework, making it difficult to achieve one-click generation and real-time parameter adjustment throughout the entire process.
[0039] Please refer to Figure 2 An image processing method according to this application may include: 01: Generate multiple valid partitions based on the image attributes of the target image; 02: Transform the partition boundaries of the effective partitions into closed curves, and obtain multiple curve points distributed sequentially on the closed curves; 03: Generate spiral curves within each valid partition based on the geometric characteristics of multiple valid partitions; 04: Perform three-dimensional simulation processing on multiple spiral curves to generate multiple three-dimensional spiral geometries.
[0040] The image processing method of this application embodiment can be implemented by the image processing apparatus 100 of this application embodiment. Specifically, please refer to... Figure 3 The image processing apparatus 100 may include a partitioning unit 110, a boundary transformation unit 120, a spiral generation unit 130, and a three-dimensional processing unit 140. The partitioning unit 110 can generate multiple effective partitions based on the image attributes of the target image; the boundary transformation unit 120 can convert the partition boundaries of the effective partitions into closed curves, and obtain multiple curve points sequentially distributed on the closed curves. The spiral generation unit 130 can generate spiral curves within each effective partition based on the geometric features of the multiple effective partitions. The three-dimensional processing unit 140 can perform three-dimensional simulation processing on the multiple spiral curves to generate multiple three-dimensional spiral geometries.
[0041] The image processing method and image processing device 100 described above obtain multiple effective partitions whose compositional contours are basically consistent with the image contours through the image attributes of the image. Then, a spiral curve is generated based on the geometric features of these effective partitions. Finally, a three-dimensional spiral geometry is simulated for these spiral curves, thereby realizing automatic mapping from image content to geometric structure. This eliminates the need for manual modeling to form the paper roll process effect and can improve the randomness of the spiral paper roll, which is beneficial to improving the efficiency and visual effect of digital processing of images using the paper roll process.
[0042] Specifically, in practical applications, when digitally processing a target image using a paper-rolling process, the main focus is on artistically processing specific content within the target image. This specific content has specific colors and outlines relative to other areas (such as the background area) in the target image. Therefore, multiple effective partitions are generated based on the image attributes of the target image.
[0043] Then, the target image undergoes technical processing, specifically generating spiral curves within each effective partition based on the geometric features of the effective features. These spiral curves can be used to simulate the effect of real paper rolling. Furthermore, these spiral curves are subjected to 3D simulation processing to generate multiple three-dimensional spiral geometries, which visually represent the transformation of the target object's visual form into a paper-rolling form. In some cases, the geometric features of the effective partitions may include the center point of the corresponding closed curve and multiple curve points.
[0044] Based on the above, the technical solution of this application can form a generation logic of "image information - effective partitioning - spiral paper strip", that is, the visual effect of quilling is generated according to the information of the image itself. Therefore, it can be achieved without manual modeling, which can greatly improve the processing efficiency of quilling art and facilitate batch processing. Moreover, the visual effect of quilling can vary depending on the target image, which can improve the randomness of the spiral paper strip effect and provide adaptive shape adjustment capability.
[0045] In some implementations, the target image includes a target object. Step 01 (generating multiple valid partitions based on the image attributes of the target image) may include: The target object area is divided into multiple effective partitions based on the image attributes of the target image.
[0046] The image processing method of this application embodiment can be implemented by the image processing apparatus 100 of this application embodiment. Specifically, please refer to... Figure 3 The partitioning unit 110 can be used to divide the area where the target object is located into multiple effective partitions according to the image attributes of the target image.
[0047] In this way, the contours formed by these effective partitions can be made to be basically consistent with the contours of the target object in the target image.
[0048] It is understandable that in the target image, these specific contents (i.e., the target object) have specific colors and contours relative to other areas (such as the background area) in the target image. Therefore, based on the image attributes of the target image, the area where the target object is located is divided into multiple effective partitions. This allows all effective partitions to form a contour that is basically consistent with the target object. Furthermore, the spiral curves generated within these effective partitions can also be combined to form a contour that is basically consistent with the target object.
[0049] In some implementations, generating multiple valid partitions based on the image attributes of the target image may include: 011: Based on the image attributes of the target image, the preset plane is partitioned to generate multiple initial partitions; 012: Based on the image attributes of the area where the target object is located, perform color transfer processing on multiple initial partitions within a preset plane to obtain multiple valid partitions from the multiple initial partitions.
[0050] The image processing method of this application embodiment can be implemented by the image processing apparatus 100 of this application embodiment. Specifically, please refer to... Figure 3 The partitioning unit 110 can be used to: partition a preset plane according to the image attributes of the target image to generate multiple initial partitions; and perform color transfer processing on the multiple initial partitions in the preset plane according to the image attributes of the area where the target object is located, so as to obtain multiple valid partitions from the multiple initial partitions.
[0051] This provides the prerequisite for generating spiral curves based on relevant information from images.
[0052] Specifically, a planar grid with a specific resolution can be pre-constructed as a preset plane. The resolution of the planar grid can be consistent with the resolution of the target image. For example, if the target image has a resolution of 1000×1000, a planar grid with a resolution of 1000×1000 can be constructed, allowing the target image to be perfectly tiled and aligned with the preset plane. Furthermore, the planar grid can be vertically flipped to match the coordinate system in the preset plane with the coordinate system in the target image.
[0053] The image attributes can include brightness values. Based on the different brightness values of each pixel in the target image, multiple initial partitions of varying sizes can be divided within a preset plane. The size of these initial partitions can vary depending on the brightness value of the corresponding location in the target image.
[0054] Furthermore, the image attributes of the region where the target object is located are passed to each initial partition. Since the image attributes of each initial partition are different, and the target object and other regions in the target image are also different in image attributes, color transfer processing is performed in the preset plane. Multiple initial partitions corresponding to the position of the target object can be directly determined in the preset plane, and these determined initial partitions can be used as valid partitions, indicating that the outline of the target object is basically consistent with the region composed of these valid partitions.
[0055] Based on the above, multiple effective partitions are obtained through the image attributes of the target image, realizing the first step in the generation logic of "image information - effective partitions - spiral paper tape", thus providing the prerequisite for the subsequent generation of spiral paper tape.
[0056] In some implementations, step 011 (partitioning a preset plane to generate multiple initial partitions based on the image attributes of the target image) may include: 0111: Based on the brightness value in the image attributes of the target image, generate multiple non-uniformly distributed scattered points in a preset plane. The density of the scattered points in the preset plane is positively correlated with the brightness value of the corresponding area in the preset plane. 0112: Based on multiple scattered points, the preset plane is divided to generate multiple initial partitions, and the space within each initial partition corresponds to a scattered point.
[0057] The image processing method of this application embodiment can be implemented by the image processing apparatus 100 of this application embodiment. Specifically, please refer to... Figure 3 The partitioning processing unit 110 can be used to: generate multiple non-uniformly distributed scattered points in a preset plane according to the brightness value in the image attributes of the target image, wherein the density of the multiple scattered points in the preset plane is positively correlated with the brightness value of the corresponding area in the preset plane; and divide the preset plane according to the multiple scattered points to generate multiple initial partitions, wherein the space in each initial partition corresponds to one scattered point.
[0058] In this way, the final spiral curve can be randomized according to the image attributes of the target image.
[0059] Please combine Figure 4 ,exist Figure 4 In the coordinate system shown, the preset plane can be formed by the region S1 formed between the four coordinate points (5, 5), (-5, 5), (-5, -5) and (5, -5). The white points in region S1 are the multiple scattered points generated.
[0060] Specifically, in one implementation, the target image can be imported into a synthesizer, and then a density map (or density field) is formed in the synthesizer using the brightness value of the image attributes in the target image as the density attribute. The larger the brightness value at a certain location in the target image, the larger the density attribute at the corresponding location in the density map; conversely, the smaller the brightness value at a certain location in the target image, the smaller the density attribute at the corresponding location in the density map.
[0061] By using the attribute mapping node, the density map in the synthesizer can be read as the image attributes of each point in the preset plane. Non-uniform point distribution is then performed on the preset plane. The more scatter points are in areas with high brightness values in the preset plane, the denser the scatter points are, while the more sparse the scatter points are in areas with low brightness values. This allows the number and size of the multiple initial partitions obtained to directly reflect the visual density distribution of the image.
[0062] After obtaining multiple scattered points, the preset plane can be divided into multiple grid cells using a planar grid of a specific resolution. Then, using the scattered points as the partition centers, each pixel within a grid cell is assigned a partition based on its distance from each scattered point. If the distance between a pixel and one of the scattered points is less than the distance between that pixel and all other scattered points, then that pixel will be assigned to the partition containing that scattered point. In other words, pixels within each initial partition are closest to the partition center of their own initial partition and farther from the partition centers of other initial partitions. This results in initial partitions that appear as polygonal blocks.
[0063] Based on the above, since the brightness values of each pixel in the target image are different, multiple scattered points with different density can be formed on the preset plane according to the brightness distribution in the target image. Then, with these scattered points as the center points, the pixel areas around the scattered points are divided into partitions. The resulting multiple initial partitions will also be different with the brightness distribution of the target image, thus giving the final spiral curve randomness.
[0064] In some implementations, step 011 (partitioning a preset plane to generate multiple initial partitions based on the image attributes of the target image) may include: 0113: Perform contrast enhancement processing on the target image to obtain a density map. The density map is used to determine the brightness value in the image attributes of the target image.
[0065] The image processing method of this application embodiment can be implemented by the image processing apparatus 100 of this application embodiment. Specifically, please refer to... Figure 3 The partitioning processing unit 110 can be used to perform contrast enhancement processing on the target image to obtain a density map, which is used to determine the brightness value in the image attributes of the target image.
[0066] This helps to increase the size difference between the initial partitions.
[0067] Specifically, the target image can be contrast-enhanced through the color level node, which increases the brightness of areas with high brightness values and decreases the brightness of areas with low brightness values. This increases the density difference of scattered points in the preset plane according to the distribution of bright and dark areas in the target image. The preset plane can have more dense scattered points corresponding to the brighter areas in the target image and sparser scattered points corresponding to the darker areas in the target image, thereby increasing the size difference of each initial partition.
[0068] In some implementations, step 012 (based on the image attributes of the region where the target object is located, performing color transfer processing on multiple initial partitions within a preset plane to obtain multiple valid partitions) may include: 0121: Transfer the image attributes of the target object to the initial partition at the corresponding position in the preset plane; 0122: Delete the initial partitions in the preset plane whose brightness values are lower than the preset brightness threshold, and then determine the remaining initial partitions as multiple valid partitions. The image attributes include brightness values, and the brightness value of the target object is not lower than the preset brightness threshold.
[0069] In this way, the generated spiral region can reflect the visual effect of the corresponding target object as much as possible.
[0070] Please combine Figure 5 and Figure 6 , Figure 5 The image shown is a target image, and the target object in the target image is represented by S2. The result of obtaining multiple valid partitions after color transfer processing is as follows: Figure 6 As shown, the multiple effective partitions obtained are polygonal in shape and closely distributed. All the effective partitions form a combined contour S3. The combined contour S3 is basically consistent with the contour of the target object, and the color displayed by each effective partition in the combined contour S3 is consistent with the color of the corresponding position in the target image.
[0071] Specifically, in one implementation, the target image can be read into a preset plane as point-level image attributes (i.e., the image attributes of each pixel) through an independent attribute mapping node. Then, the read point-level image attributes are used as patch-level image attributes (i.e., the image attributes of the initial partition) through an attribute promotion node. Finally, the patch-level image attributes are transferred from the preset plane to the corresponding initial partition through an attribute transfer node. This allows the spiral curves within the effective partitions to be colored using patch-level image attributes, effectively transferring the color of the target image to the spiral curves.
[0072] After obtaining the corresponding image attributes for each initial partition, the initial partitions with brightness values lower than the preset brightness threshold can be filtered out by deleting nodes based on the brightness values in the image attributes of each initial partition. These initial partitions basically correspond to the background area in the target image other than the target object. The background area generally does not have obvious processing needs. By deleting these initial partitions, the spatial cropping of the initial partitions can be achieved according to the outline of the target object, which can more obviously reflect the visual effect of the paper rolling process of the target object.
[0073] In some implementations, step 02 (converting the partition boundaries of the effective partition into closed curves) may include: 021: Perform the first sampling process on the partition boundaries of the effective partitions to obtain multiple boundary inflection points that are equidistantly distributed on the partition boundaries; 022: Based on multiple boundary inflection points, the partition boundaries are smoothed to form closed curves; Step 02 (obtaining multiple curve points sequentially distributed on the closed curve) may include: 023: Perform a second sampling process on the closed curve to obtain multiple curve points that are equidistantly distributed on the closed curve. The sampling interval between the multiple curve points is smaller than the sampling interval between the multiple boundary inflection points.
[0074] The image processing method of this application embodiment can be implemented by the image processing apparatus 100 of this application embodiment. Specifically, please refer to... Figure 3 The boundary transformation unit 120 can be used to: perform a first sampling process on the partition boundary of the effective partition to obtain multiple boundary inflection points that are equidistantly distributed on the partition boundary; perform curve smoothing processing on the partition boundary based on the multiple boundary inflection points to make the partition boundary form a closed curve; perform a second sampling process on the closed curve to obtain multiple curve points that are equidistantly distributed on the closed curve, wherein the sampling interval between the multiple curve points is smaller than the sampling interval between the multiple boundary inflection points.
[0075] This helps improve the realism of the three-dimensional spiral geometry in mimicking the effect of a real paper roll.
[0076] Please combine Figure 7 , Figure 7 Each valid partition in the process undergoes boundary smoothing, transforming the polygonal boundaries of each valid partition into closed curves.
[0077] Specifically, in some implementations, after determining all valid partitions, the partition boundaries of each valid partition can be sampled first. At this time, the partition boundaries of each valid partition are polygonal, which makes these polygons discretized to form a corresponding equidistant vertex sequence composed of multiple boundary vertices. This equidistant vertex sequence can basically reflect the trend of the partition boundaries and unify the point density of the boundary polylines, thereby eliminating the irregular point spacing generated during partitioning.
[0078] After obtaining multiple boundary inflection points, the partition boundaries can be smoothed. This smoothing process involves iterating through a weighted average of the coordinates of all boundary inflection points within the same equally spaced inflection point sequence. This transforms the sharp corners on the original polygonal boundaries of the effective partition into continuously curved, smooth rounded corners, thus eliminating the straight-line angles generated during partitioning while maintaining the basic shape of the overall effective partition.
[0079] After smoothing the boundary curves of the partitions to obtain closed curves, a second sampling process can be performed on these closed curves. This involves re-sampling points evenly at smaller sampling intervals on the smoothed result, which improves the point density of the curve and the accuracy of subsequent spiral curve generation. Finally, the boundary polylines of the effective partitions are transformed into closed curves using primitive nodes, completing the transformation from polygonal boundaries to smooth, closed parametric curves.
[0080] In addition, after completing the second sampling process, the center point of each valid partition can be recorded as the curve center point. The curve center point can serve as the target anchor point for the subsequent centripetal convergence of the spiral curve.
[0081] In some implementations, step 03 (generating a corresponding spiral curve within each valid partition based on the geometric features of multiple valid partitions) may include: 031: Determine the maximum spiral convergence radius based on the minimum distance from multiple curve points on the closed curve to the center point of the curve; 032: Based on the maximum spiral convergence radius, preset paper thickness parameters, and convergence interpolation parameters, differential convergence processing is performed within the effective partition to obtain the spiral curve.
[0082] The image processing method of this application embodiment can be implemented by the image processing apparatus 100 of this application embodiment. Specifically, please refer to... Figure 3 The spiral generation unit 130 can be used to: determine the maximum spiral convergence radius based on the minimum distance from multiple curve points on the closed curve to the center point of the curve; and perform differential convergence processing within the effective partition based on the maximum spiral convergence radius, preset paper thickness parameters, and convergence interpolation parameters to obtain a spiral curve.
[0083] In this way, it is possible to generate a continuously changing spiral curve within the effective partition.
[0084] Please combine Figure 8 , Figure 8 The demonstration showcases partial spiral curves generated within a preset plane. The larger the effective partition, the more spiral curves are generated within that partition; conversely, the smaller the effective partition, the fewer spiral curves are generated. This allows the number of spiral curves to adaptively adjust based on the partition size. Furthermore, after color transfer processing, the spiral curves can achieve a color consistency with the corresponding position on the target object.
[0085] Specifically, after transforming the boundaries of all valid partitions, the distance between the center point of the closed curve and all curve points on the closed curve can be traversed for each partition. Then, the minimum distance is taken as the maximum spiral convergence radius, which represents the limit of the number of spiral curves that can be accommodated within the valid partition.
[0086] After determining the maximum spiral convergence radius, the ratio of the maximum spiral convergence radius to the preset paper thickness parameter can be used as the maximum number of spiral turns that can be accommodated within the effective partition. Then, starting from the curve point with the minimum distance from the curve center point, the spiral is advanced along the distribution direction of all curve points. At each curve point, a new point is determined between the current curve point and the curve center point using an offset value. This offset value is the product of the offset vector and the convergence interpolation parameter. The offset vector can be the difference between the coordinates of the curve center point and the coordinates of the current curve point. The convergence interpolation parameter can be determined by the following formula: t = n / (maxnum * numpts); Where t represents the convergence interpolation parameter, n represents the ordinal number of the current curve point in the entire traversal process, maxnum represents the maximum number of spiral turns that can be accommodated, and numpts represents the total number of curve points on the closed curve.
[0087] Based on the above, as new points are determined one by one during the traversal, the ordinal number n gradually increases, causing the convergence interpolation parameter to gradually increase. The offset vector always points from the current curve point to the curve center point, causing the offset value to gradually increase as well. In this way, the new points obtained will start from the current curve point, with the offset vector as the offset direction and the convergence interpolation parameter as the offset distance. As the traversal of curve points progresses, the new points obtained have a tendency to gradually move closer to the curve center point. After traversing all curve points once, the next traversal can be performed. This will start from the last new point obtained in the just completed traversal and continue to confirm new points. During this process, n will continue to accumulate the results of the previous traversal, causing the offset value to continue to increase, until the number of traversals reaches the maximum number of spiral turns that can be accommodated.
[0088] Among them, for the convergence interpolation parameter, as the traversal progresses and the number of traversals increases, n will gradually increase from 0 to close to the product of the maximum number of spiral turns that can be accommodated and the total number of curve points. That is, the specific value of the convergence interpolation parameter will gradually increase from 0 to close to 1.
[0089] Furthermore, after obtaining all spiral curves, all closed curves of valid partitions can be deleted, retaining all spiral curves, that is... Figure 8 The results are shown.
[0090] In some implementations, step 032 (performing differential convergence processing within the effective partition based on the maximum spiral convergence radius, preset paper thickness parameters, and convergence interpolation parameters to obtain a spiral curve) may include: 033: Perform a third sampling process on the spiral curve to obtain multiple spiral inflection points; 034: Based on multiple spiral inflection points, perform curve smoothing on the spiral curve.
[0091] The image processing method of this application embodiment can be implemented by the image processing apparatus 100 of this application embodiment. Specifically, please refer to... Figure 3 The spiral generation unit 130 can be used to: perform a third sampling process on the spiral curve to obtain multiple spiral inflection points; and perform curve smoothing processing on the spiral curve based on the multiple spiral inflection points.
[0092] This improves the smoothness of the spiral curve.
[0093] Specifically, after generating the spiral curve, considering that there may be bends at the corresponding partition boundaries on the spiral curve during the difference convergence process, a third sampling process is performed on the spiral curve to discretize it into multiple spiral inflection points that are equidistantly distributed along the spiral curve. Then, the coordinates of these spiral inflection points are weighted and iterated to smooth the spiral curve, eliminating the small bends generated on the spiral curve during the difference convergence process, thereby improving the smoothing effect of the spiral curve.
[0094] In addition, after smoothing the spiral curve, curve attributes can be generated for the spiral curve. The curve attributes of each point on the spiral curve can represent the normalized parameter coordinates of each point from the starting point to the ending point of the spiral curve.
[0095] The normalization parameter coordinates of the curve vary from 0 to 1. In some implementations, if the curve attribute of a point on the spiral curve is 0, it indicates that the point is the starting point of the spiral curve; if the curve attribute of a point on the spiral curve is 0.5, it indicates that the distance from the point to the starting point along the extension direction of the spiral curve is the same as the distance to the ending point, or in other words, if the spiral curve is straightened, the point is the midpoint of the straightened spiral curve; if the curve attribute of a point on the spiral curve is 1, it indicates that the point is the ending point of the spiral curve.
[0096] In some implementations, step 04 (performing three-dimensional simulation processing on multiple spiral curves to generate multiple three-dimensional spiral geometries) may include: 041: Based on the first extrusion distance and the scaling factor of the spiral curve, the spiral curve is subjected to width extrusion processing along the first direction to generate the first spiral geometry, wherein the first direction is parallel to the normal direction of the plane containing the spiral curve; 042: Based on the random disturbance noise and the normalized coordinates on the spiral curve, the first spiral geometry is subjected to frontal deformation processing to generate the second spiral geometry. The front of the first spiral geometry is the side of the first spiral geometry facing the first direction. 043: Based on the second extrusion distance, the second spiral geometry is subjected to thickness extrusion processing and back-side generation processing along the second direction to generate a three-dimensional spiral geometry. The second direction is perpendicular to the path direction where the spiral curve is located. The back side of the first spiral geometry is the side of the first spiral geometry that is away from the first direction.
[0097] The image processing method of this application embodiment can be implemented by the image processing apparatus 100 of this application embodiment. Specifically, please refer to... Figure 3The three-dimensional processing unit 140 can be used to: perform width extrusion processing on the spiral curve along a first direction according to a first extrusion distance and a scaling factor of the spiral curve to generate a first spiral geometry, wherein the first direction is parallel to the normal direction of the plane where the spiral curve is located; perform front deformation processing on the first spiral geometry according to random disturbance noise and normalized coordinates on the spiral curve to generate a second spiral geometry, wherein the front of the first spiral geometry is the side of the first spiral geometry facing the first direction; and perform thickness extrusion processing and back-side generation processing on the second spiral geometry along a second direction according to a second extrusion distance to generate a three-dimensional spiral geometry, wherein the second direction is perpendicular to the path direction where the spiral curve is located, and the back of the first spiral geometry is the side of the first spiral geometry facing away from the first direction.
[0098] In this way, the natural warping shape of the paper strip tip can be accurately simulated, improving the physical simulation effect of real paper art.
[0099] It is understandable that performing a three-dimensional simulation on the spiral curve, giving it a third dimension of height, results in a three-dimensional structure that is no longer a curve structure in a two-dimensional plane.
[0100] Please combine Figure 9 and Figure 10 , Figure 9 The diagram shows the top structure of multiple first helical geometries. Figure 10 The diagram shows the top structure of multiple second helical geometries. Among them, in... Figure 9 In the S4 region, the apexes of the first spiral geometries are basically flush and vary in height; Figure 10 In the S5 region, the tops of each second spiral geometry have undulating variations due to deformation.
[0101] In this context, it can be understood that for a helical curve, performing width extrusion along the first direction is equivalent to elevating the helical curve along the first direction to form a corresponding height. That is, the first direction can be considered the height direction of the first helical geometry. And for the final generated three-dimensional helical geometry, combined with... Figure 8 As can be seen, in the final visual effect, the end surface (i.e. the front) formed along the first direction on the three-dimensional spiral geometry is used as the display surface. Therefore, the height formed by the first spiral geometry (and even the second spiral geometry) along the first direction corresponds to the width of the paper tape of the three-dimensional spiral geometry, and the width formed by the first spiral geometry (and even the second spiral geometry) along the path of the spiral curve corresponds to the thickness of the paper tape of the three-dimensional spiral geometry.
[0102] In some cases, a scaling factor can be pre-assigned to each spiral curve via attribute weaving nodes. The scaling factor for each spiral curve can be independent and random. In some implementations, when generating a spiral curve, a primitive can be created for each spiral curve, and then a fixed or preset offset is added to the primitive number of the spiral curve as a random value. This random value is then mapped to a corresponding range as the scaling factor for the corresponding spiral curve. The endpoint of the range mapped by the random value can be determined according to specific visual effect requirements.
[0103] In some cases, the maximum value of the range mapped by the random value can be three times the minimum value. This ensures that the final 3D spiral geometry has a clear sense of undulation and hierarchy across the paper tape width, without causing the overall structure to interweave or become distorted due to some parts of the 3D spiral geometry being too wide or too narrow. The range mapped by the random value can be from 0.5 to 1.5.
[0104] During width extrusion, the actual extrusion size can be obtained by extruding the tips of each spiral curve towards the first direction, using the product of the first extrusion distance and the scaling factor. This results in the corresponding first spiral geometry. Since the scaling factor of each spiral curve is different, the actual extrusion size of the corresponding first spiral geometry will also be different, thus simulating the sense of layering between paper tapes of different widths.
[0105] The first extrusion distance can be a fixed value or selected according to specific circumstances. In one embodiment, the value of the first extrusion distance ranges from 0.05 to 0.2.
[0106] Additionally, in width extrusion processing, the extrusion cross-sectional width of the helical curve along the first direction can be kept uniform by controlling the thickness ramp. The twist ramp can be kept at an intermediate value (such as a value between 0.4 and 0.6) to avoid excessive twisting.
[0107] Before deformation processing, each first spiral geometry can be assigned a unique class attribute number through connectivity nodes. The class attribute number can be used to distinguish different first spiral geometries, so as to support subsequent independent color and offset control.
[0108] During deformation processing, the top point of the first helical geometry can be determined based on the coordinates of the points. In some embodiments, the coordinate value of the top point of the first helical geometry in the first direction is greater than a preset coordinate threshold, so deformation processing can be performed only on points whose coordinate values in the first direction are greater than the preset coordinate threshold.
[0109] In some cases, the offset of the top point of the first helical geometry along the first direction is = y_ramp(curveu) × y_ramp(a1) + noise * a2 - a3; where y_ramp represents the ramp function, curveu represents the curve normalized parameter coordinates of the specific top point of the first helical geometry on the corresponding helical curve, noise represents random disturbance noise, and a1, a2, and a3 are offset coefficients. a1, a2, and a3 can be calibrated through actual testing.
[0110] Accordingly, in some cases, random perturbation noise = curveu * a4 + class * a5; where class represents the class attribute number of the first helical geometry, and a4 and a5 are offset coefficients. a4 and a5 can be calibrated through actual testing.
[0111] Please combine Figure 10 By using normalized coordinates on a spiral curve in random perturbation noise, the front deformation process allows the top of the first spiral geometry to be randomly offset along the first direction, thereby simulating the physical shape of a paper strip naturally curling up after being rolled up, making the three-dimensional spiral geometry visually realistic.
[0112] After completing the front deformation process, the width formed by the path of the second helical geometry along the helical curve can be subjected to thickness extrusion processing, and the back surface of the second helical geometry can be generated. Since the direction of the path of the helical curve changes with different points, the corresponding second direction will also change accordingly. Thus, the corresponding second direction can be determined according to the point being processed in the thickness extrusion process. Then, according to the second extrusion distance and the currently determined second direction, the thickness extrusion process is performed on the point being processed. Then, along the path of the helical curve, a new second direction is determined for the next point. Then, according to the second extrusion distance and the new second direction, the thickness extrusion process is performed on the next point until the thickness extrusion process of the second helical geometry is completed along the entire helical curve.
[0113] Building upon the above, thickness extrusion processing gives the three-dimensional spiral geometry the thickness of paper, while back-side generation processing allows the back of the three-dimensional spiral geometry to have a solid surface model, ultimately resulting in a closed-structure three-dimensional spiral geometry, such as... Figure 11 As shown.
[0114] Each unit in the aforementioned image processing apparatus can be implemented entirely or partially through software, hardware, or a combination thereof. Each unit can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each unit.
[0115] The image processing device 100 can be integrated into a terminal or server that has storage and a processor and thus computing power, or the image processing device 100 can be the terminal or server.
[0116] Optionally, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0117] Figure 12 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device may be a terminal or a server. Figure 12 As shown, the computer device 300 includes a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 is electrically connected to the memory 302. Those skilled in the art will understand that the computer device structure shown in the figures does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0118] The processor 301 is the control center of the computer device 300. It connects various parts of the computer device 300 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, it performs various functions of the computer device 300 and processes data, thereby performing overall processing of the computer device 300.
[0119] In this embodiment, the processor 301 in the computer device 300 loads the instructions corresponding to the processes of one or more computer programs into the memory 302 according to the following steps, and the processor 301 runs the computer programs stored in the memory 302 to realize various functions: 01: Generate multiple valid partitions based on the image attributes of the target image; 02: Transform the partition boundaries of the effective partitions into closed curves, and obtain multiple curve points distributed sequentially on the closed curves; 03: Generate spiral curves within each valid partition based on the geometric characteristics of multiple valid partitions; 04: Perform three-dimensional simulation processing on multiple spiral curves to generate multiple three-dimensional spiral geometries.
[0120] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0121] Optional, such as Figure 12 As shown, the computer device 300 also includes: a display screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected to the display screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307. Those skilled in the art will understand that... Figure 12 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0122] The display screen 303 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The display screen 303 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the computer device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program. Optionally, the touch panel may include a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, and transmits the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor 301, and can receive and execute commands from the processor 301. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 301 to determine the type of touch event. Subsequently, the processor 301 provides corresponding visual output on the display panel according to the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the display screen 303 to achieve input and output functions. However, in some embodiments, the touch panel and the display screen 303 can be implemented as two independent components to achieve input and output functions. That is, the display screen 303 can also be used as part of the input unit 306 to achieve input functions.
[0123] The radio frequency circuit 304 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other computer devices, and to transmit and receive signals with network devices or other computer devices.
[0124] Audio circuitry 305 can be used to provide an audio interface between a user and a computer device via a speaker and a microphone. Audio circuitry 305 converts received audio data into electrical signals, transmits them to the speaker, and the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 305, converted back into audio data, and output to processor 301 for processing. The audio data is then transmitted via radio frequency circuitry 304 to, for example, another computer device, or output to memory 302 for further processing. Audio circuitry 305 may also include an earphone jack to facilitate communication between peripheral headphones and the computer device.
[0125] The input unit 306 can be used to receive input numbers, characters, or object feature information (such as fingerprints, irises, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
[0126] Power supply 307 is used to supply power to various components of computer device 300. Optionally, power supply 307 can be logically connected to processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 307 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0127] although Figure 12 As not shown in the diagram, computer equipment 300 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.
[0128] This application also provides a computer-readable storage medium for storing a computer program. This computer-readable storage medium can be applied to a computer device, and the computer program causes the computer device to execute the corresponding processes in the image processing methods of the embodiments of this application; for the sake of brevity, further details are omitted here.
[0129] This application also provides a computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding process in the image processing method of this application embodiment. For brevity, further details are omitted here.
[0130] This application also provides a computer program comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding process in the image processing method of this application. For brevity, further details are omitted here.
[0131] It should be understood that the processor in this application may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0132] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0133] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software 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 beyond the scope of this application.
[0134] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0135] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0136] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0137] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0138] In addition, the functional units in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0139] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer or a server) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0140] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An image processing method, characterized in that, The method includes: Generate multiple valid partitions based on the image attributes of the target image; The partition boundaries of the effective partitions are transformed into closed curves, and multiple curve points are obtained sequentially distributed on the closed curves. Based on the geometric characteristics of the multiple effective partitions, a spiral curve is generated in each of the effective partitions; Multiple spiral curves are subjected to 3D simulation processing to generate multiple three-dimensional spiral geometries.
2. The image processing method as described in claim 1, characterized in that, The target image includes a target object, and the generation of multiple valid partitions based on the image attributes of the target image includes: The region where the target object is located is divided into multiple effective partitions based on the image attributes of the target image.
3. The image processing method as described in claim 2, characterized in that, The step of dividing the region where the target object is located into multiple effective partitions based on the image attributes of the target image includes: Based on the image attributes of the target image, the preset plane is partitioned to generate multiple initial partitions; Based on the image attributes of the region where the target object is located, color transfer processing is performed on the multiple initial partitions within the preset plane to obtain the multiple effective partitions from the multiple initial partitions.
4. The image processing method as described in claim 3, characterized in that, The step of partitioning a preset plane according to the image attributes of the target image to generate multiple initial partitions includes: Based on the brightness value in the image attributes of the target image, multiple non-uniformly distributed scattered points are generated in the preset plane. The density of the multiple scattered points in the preset plane is positively correlated with the brightness value of the corresponding area in the preset plane. Based on the multiple scattered points, the preset plane is divided to generate the multiple initial partitions, and the space within each initial partition corresponds to one of the scattered points.
5. The image processing method as described in claim 4, characterized in that, The step of partitioning a preset plane according to the image attributes of the target image to generate multiple initial partitions includes: The target image is subjected to contrast enhancement processing to obtain a density map, which is used to determine the brightness value in the image attributes of the target image.
6. The image processing method as described in claim 3, characterized in that, The step of performing color transfer processing on the plurality of initial partitions within the preset plane based on the image attributes of the region where the target object is located, and obtaining the plurality of valid partitions from the plurality of initial partitions, includes: The image attributes of the target object are transferred to the initial partition at the corresponding position within the preset plane; The initial partitions with brightness values lower than a preset brightness threshold within the preset plane are deleted, and then the remaining initial partitions are determined as the multiple valid partitions. The image attributes include the brightness values, and the brightness value of the target object is not lower than the preset brightness threshold.
7. The image processing method as described in claim 1, characterized in that, The step of converting the partition boundary of the effective partition into a closed curve includes: The partition boundaries of the effective partitions are subjected to a first sampling process to obtain a plurality of boundary inflection points that are equidistantly distributed on the partition boundaries. Based on the multiple boundary inflection points, the partition boundaries are smoothed to form closed curves. The step of obtaining multiple curve points sequentially distributed on the closed curve includes: The closed curve is subjected to a second sampling process to obtain a plurality of curve points that are equidistantly distributed on the closed curve. The sampling interval between the plurality of curve points is smaller than the sampling interval between the plurality of boundary inflection points.
8. The image processing method as described in claim 1, characterized in that, The step of generating a spiral curve within each of the multiple valid partitions based on their geometric features includes: The maximum spiral convergence radius is determined based on the minimum distance from each of the plurality of curve points on the closed curve to the center point of the curve. Based on the maximum spiral convergence radius, the preset paper thickness parameter, and the convergence interpolation parameter, differential convergence processing is performed within the effective partition to obtain the spiral curve.
9. The image processing method as described in claim 8, characterized in that, After obtaining the spiral curve by performing differential convergence processing within the effective partition based on the maximum spiral convergence radius, preset paper thickness parameters, and convergence interpolation parameters, the process includes: The spiral curve is subjected to a third sampling process to obtain multiple spiral inflection points; Based on the multiple spiral inflection points, the spiral curve is smoothed.
10. The image processing method as described in claim 1, characterized in that, The process of performing three-dimensional simulation on multiple spiral curves to generate multiple three-dimensional spiral geometries includes: Based on the first extrusion distance and the scaling factor of the spiral curve, the spiral curve is subjected to width extrusion processing along the first direction to generate a first spiral geometry, wherein the first direction is parallel to the normal direction of the plane in which the spiral curve is located; Based on the random disturbance noise and the normalized coordinates on the spiral curve, the first spiral geometry is subjected to frontal deformation processing to generate a second spiral geometry. The front of the first spiral geometry is the side of the first spiral geometry facing the first direction. Based on the second extrusion distance, the second spiral geometry is subjected to thickness extrusion processing and back-side generation processing along the second direction to generate the three-dimensional spiral geometry. The second direction is perpendicular to the path direction where the spiral curve is located, and the back side of the first spiral geometry is the side of the first spiral geometry that is away from the first direction.
11. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program, and the processor executing the image processing method according to any one of claims 1-10 by calling the computer program stored in the memory.