Image drawing method and apparatus, and electronic device
By acquiring user trajectories in real time and randomly rendering images with different perspectives and poses from multiple image indices in a painting application, the problem of rigid dynamic scene rendering in existing technologies is solved, achieving more realistic dynamic effects and higher painting efficiency.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2025-11-19
- Publication Date
- 2026-07-09
AI Technical Summary
Existing painting applications cannot effectively capture the dynamic effects of dynamic scenes, resulting in static images that fail to reflect the movement trajectories and changes in the real physical world.
By acquiring the user's drawing trajectory in real time during the drawing process, images are randomly rendered from multiple images with different perspectives and poses, an index is built to display multiple images, and parameters are adjusted to enhance the dynamic effect.
It achieves more realistic and dynamic effects in drawing the physical world, improving the user's drawing experience and the quality of their work, and increasing drawing efficiency.
Smart Images

Figure CN2025136079_09072026_PF_FP_ABST
Abstract
Description
Methods, apparatus and electronic devices for drawing images
[0001] This application claims priority to Chinese Patent Application No. 202411998748.5, filed with the Chinese Patent Office on December 31, 2024, entitled “Method, Apparatus and Electronic Device for Drawing Images”, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of image rendering, and more specifically, to a method, apparatus, and electronic device for rendering images. Background Technology
[0003] When users draw using drawing apps, they often need to depict objects in dynamic scenes, such as fluttering butterflies, birds in the clouds, and falling leaves. Images drawn using current drawing apps tend to be static and fail to capture the fluidity of the real physical world.
[0004] Therefore, how to make the rendered images of dynamic scenes more vivid and more in line with the actual physical world has become an urgent problem to be solved. Summary of the Invention
[0005] This application provides a method, apparatus, and electronic device for drawing images. Through this method, apparatus, and electronic device, during the image drawing process, images can be acquired from multiple different images at each drawing trajectory point and rendered. This enables the drawing of images with richer variations and motion trajectories that are more realistic, presenting a dynamic effect that conforms to the actual physical world, thereby improving the user's drawing experience and the quality of the artwork.
[0006] In a first aspect, a method for drawing an image is provided, the method comprising: acquiring a user's drawing trajectory in real time during the process of drawing a dynamic effect image of a first object; displaying a first image of the first object at a first drawing trajectory point of the user; and displaying a second image of the first object at a second drawing trajectory point of the user, wherein the first image and the second image are generated by the first object, and the shooting angle and / or the motion posture of the first object are different between the first image and the second image.
[0007] Optionally, the method can also be described as: acquiring the user's drawing trajectory; displaying multiple images of a first object on the drawing trajectory based on the user's drawing trajectory, the multiple images being generated by the first object, and at least two of the multiple images having a different shooting perspective and / or pose of the first object.
[0008] In this embodiment of the application, during the image drawing process, images can be obtained from multiple different images at each drawing trajectory point and rendered, which can draw images with richer variations and more realistic motion trajectories, presenting a dynamic effect that conforms to the actual physical world, improving the user's drawing experience and the quality of the artwork.
[0009] Furthermore, in this embodiment, multiple image textures with different motion postures and / or different shooting angles can be drawn in one stroke, thereby creating a dynamic effect image of the object. This eliminates the need to manually redraw the motion postures and angles of multiple image textures with the same motion posture and / or shooting angle after drawing them in one stroke, thus improving drawing efficiency.
[0010] In conjunction with the first aspect, in one possible implementation, the motion posture of the first object includes the pose of the first object and / or the facial expression of the first object.
[0011] In this embodiment of the application, during the image drawing process, images can be obtained and rendered from multiple images of the same object with different motion postures and / or different shooting angles at each drawing trajectory point. This can produce images with richer variations and motion trajectories that are more in line with reality, presenting a dynamic effect that conforms to the actual physical world, thereby improving the user's drawing experience and the quality of the artwork.
[0012] In conjunction with the first aspect, in one possible implementation, the size or angle of the first object is also different between the first image and the second image.
[0013] In conjunction with the first aspect, in one possible implementation, before acquiring the user's drawing trajectory in real time, the method further includes: acquiring multiple images of the first object, wherein the shooting perspective and / or motion posture of the first object are different between any two images; generating multiple indices that correspond one-to-one with the multiple images; before displaying the first image of the first object at the user's first drawing trajectory point, the method further includes: at the first drawing trajectory point, randomly acquiring a first index from the multiple indices, and acquiring the first image of the first object based on the first index; rendering the first image of the first object.
[0014] In this embodiment, by establishing multiple indices that correspond one-to-one with multiple different images of the same object, during the drawing process of the dynamic effect diagram of the object, at each drawing trajectory point, an image can be randomly selected from multiple different images of the same object by randomly selecting one of the multiple indices. The randomly selected image is then displayed at the drawing trajectory point. In this way, the multiple images in the drawn dynamic effect diagram have different postures and / or shooting perspectives, thereby enabling the drawing of images with richer changes and more realistic motion trajectories, presenting a dynamic effect that conforms to the actual physical world, improving the user's drawing experience and the quality of the artwork.
[0015] In conjunction with the first aspect, in one possible implementation, before displaying the second image of the first object at the user's second drawing trajectory point, the method further includes: at the second drawing trajectory point, randomly obtaining a second index from the plurality of indices, and obtaining the second image of the first object based on the second index; rendering the second image of the first object, wherein the first index and the second index are different.
[0016] In this embodiment, by establishing multiple indices that correspond one-to-one with multiple different images of the same object, during the drawing process of the dynamic effect diagram of the object, at each drawing trajectory point, an image can be randomly selected from multiple different images of the same object by randomly selecting one of the multiple indices. The randomly selected image is then displayed at the drawing trajectory point. In this way, the multiple images in the drawn dynamic effect diagram have different postures and / or shooting perspectives, thereby enabling the drawing of images with richer changes and more realistic motion trajectories, presenting a dynamic effect that conforms to the actual physical world, improving the user's drawing experience and the quality of the artwork.
[0017] In conjunction with the first aspect, in one possible implementation, before rendering the first image of the first object, the method further includes: adjusting the parameters of the first image of the first object, the parameters including one or more of dithering parameters, rotation parameters, and offset parameters.
[0018] In this embodiment of the application, after randomly selecting an image from multiple images at the current drawing trajectory point, before rendering the image, the parameters of the image can be randomly adjusted, which can further make the drawn dynamic effect more realistic and more in line with the actual motion trajectory, presenting a dynamic effect that conforms to the actual physical world.
[0019] In conjunction with the first aspect, in one possible implementation, generating multiple indexes corresponding one-to-one with the multiple images includes: obtaining multiple storage addresses corresponding one-to-one with the multiple images; and generating multiple indexes corresponding one-to-one with the multiple storage addresses.
[0020] In conjunction with the first aspect, in one possible implementation, before generating multiple indices that correspond one-to-one with the multiple images, the method further includes: standardizing each of the multiple images, wherein the purpose of the standardization is to make the multiple images uniform in format; and regularizing the multiple images into a form that can be loaded at once.
[0021] In this embodiment of the application, before establishing multiple indexes that correspond one-to-one with multiple images of the same object, the multiple images of the same object can be standardized and regularized. This not only makes it easier to obtain images based on the index in the subsequent drawing process, but also makes the final dynamic effect image more uniform in terms of color, brightness, etc.
[0022] In conjunction with the first aspect, in one possible implementation, normalizing the image includes processing the image's size, brightness, and / or color.
[0023] In conjunction with the first aspect, in one possible implementation, the multiple images are organized into a form that can be loaded at once, including: stitching the multiple images into a large texture image.
[0024] In conjunction with the first aspect, in one possible implementation, acquiring multiple images of the first object includes: acquiring the multiple images based on an animated image of the first object; and / or acquiring the multiple images based on multiple pictures of the first object; and / or acquiring the multiple images based on a video of the first object.
[0025] In conjunction with the first aspect, in one possible implementation, the animation includes a graphics exchange format GIF animation.
[0026] In this embodiment of the application, multiple images of the same object can be obtained through various means, which makes the user's image drawing process more convenient.
[0027] In a second aspect, an image drawing apparatus is provided, comprising: an acquisition module for acquiring a user's drawing trajectory in real time during the process of drawing a dynamic effect image of a first object; a display module for displaying a first image of the first object at a first drawing trajectory point of the user; the display module is further configured to display a second image of the first object at a second drawing trajectory point of the user, wherein the first image and the second image are generated by the first object, and the shooting angle and / or the motion posture of the first object are different between the first image and the second image.
[0028] In this embodiment of the application, during the image drawing process, images can be obtained from multiple different images at each drawing trajectory point and rendered, which can draw images with richer variations and more realistic motion trajectories, presenting a dynamic effect that conforms to the actual physical world, improving the user's drawing experience and the quality of the artwork.
[0029] Furthermore, in this embodiment, multiple image textures with different motion postures and / or different shooting angles can be drawn in one stroke, thereby creating a dynamic effect image of the object. This eliminates the need to manually redraw the motion postures and angles of multiple image textures with the same motion posture and / or shooting angle after drawing them in one stroke, thus improving drawing efficiency.
[0030] In conjunction with the second aspect, in one possible implementation, the motion posture of the first object includes the pose of the first object and / or the facial expression of the first object.
[0031] In this embodiment of the application, during the image drawing process, images can be obtained and rendered from multiple images of the same object in different poses and / or from different shooting angles at each drawing trajectory point. This can produce images with richer variations and motion trajectories that are more realistic, presenting a dynamic effect that conforms to the actual physical world, thereby improving the user's drawing experience and the quality of the artwork.
[0032] In conjunction with the second aspect, in one possible implementation, the size or angle of the first object is also different between the first image and the second image.
[0033] In conjunction with the second aspect, in one possible implementation, the acquisition module is further configured to acquire multiple images of the first object before acquiring the user's drawing trajectory in real time, wherein the shooting angle and / or the motion posture of the first object are different between any two of the multiple images; the device further includes: a mapping module, configured to generate multiple indices corresponding one-to-one with the multiple images; a drawing module, configured to randomly acquire a first index from the multiple indices at the first drawing trajectory point, and acquire the first image of the first object according to the first index; the drawing module is further configured to render the first image of the first object.
[0034] In this embodiment, by establishing multiple indices that correspond one-to-one with multiple different images of the same object, during the drawing process of the dynamic effect diagram of the object, at each drawing trajectory point, an image can be randomly selected from multiple different images of the same object by randomly selecting one of the multiple indices. The randomly selected image is then displayed at the drawing trajectory point. In this way, the multiple images in the drawn dynamic effect diagram have different postures and / or shooting perspectives, thereby enabling the drawing of images with richer changes and more realistic motion trajectories, presenting a dynamic effect that conforms to the actual physical world, improving the user's drawing experience and the quality of the artwork.
[0035] In conjunction with the second aspect, in one possible implementation, the drawing module is further configured to: randomly obtain a second index from the plurality of indices at the second drawing trajectory point, and obtain a second image of the first object based on the second index; and render the second image of the first object.
[0036] In this embodiment, by establishing multiple indices that correspond one-to-one with multiple different images of the same object, during the drawing process of the dynamic effect diagram of the object, at each drawing trajectory point, an image can be randomly selected from multiple different images of the same object by randomly selecting one of the multiple indices. The randomly selected image is then displayed at the drawing trajectory point. In this way, the multiple images in the drawn dynamic effect diagram have different postures and / or shooting perspectives, thereby enabling the drawing of images with richer changes and more realistic motion trajectories, presenting a dynamic effect that conforms to the actual physical world, improving the user's drawing experience and the quality of the artwork.
[0037] In conjunction with the second aspect, in one possible implementation, the apparatus further includes: an adjustment module for adjusting parameters of the first image of the first object before rendering the first image of the first object, the parameters including one or more of dithering parameters, rotation parameters, and offset parameters.
[0038] In this embodiment of the application, after randomly selecting an image from multiple images at the current drawing trajectory point, before rendering the image, the parameters of the image can be randomly adjusted, which can further make the drawn dynamic effect more realistic and more in line with the actual motion trajectory, presenting a dynamic effect that conforms to the actual physical world.
[0039] In conjunction with the second aspect, in one possible implementation, the mapping module is specifically used to: obtain multiple storage addresses that correspond one-to-one with the multiple images; and generate multiple indexes that correspond one-to-one with the multiple storage addresses.
[0040] In conjunction with the second aspect, in one possible implementation, the apparatus further includes: a processing module for standardizing each of the plurality of images before generating a plurality of indices corresponding one-to-one with the plurality of images, and for normalizing the plurality of images into a form that can be loaded at once, wherein the purpose of the standardization process is to make the format of the plurality of images uniform.
[0041] In this embodiment of the application, before establishing multiple indexes that correspond one-to-one with multiple images of the same object, the multiple images of the same object can be standardized and regularized. This not only makes it easier to obtain images based on the index in the subsequent drawing process, but also makes the final dynamic effect image more uniform in terms of color, brightness, etc.
[0042] In conjunction with the second aspect, in one possible implementation, the normalization process for the image includes processing the image's size, brightness, and / or color.
[0043] In conjunction with the second aspect, in one possible implementation, the processing module is specifically used to stitch the multiple images into a large texture image.
[0044] In conjunction with the second aspect, in one possible implementation, the acquisition module is specifically used to: acquire the plurality of images based on the animation of the first object; and / or acquire the plurality of images based on the multiple pictures of the first object; and / or acquire the plurality of images based on the video of the first object.
[0045] In conjunction with the second aspect, in one possible implementation, the animation includes a Graphics Exchange Format (GIF) animation.
[0046] In this embodiment of the application, multiple images of the same object can be obtained through various means, which makes the user's image drawing process more convenient.
[0047] Thirdly, an electronic device is provided, comprising a memory and a processor, wherein the memory is used to store computer program code, and the processor is used to execute the computer program code stored in the memory to implement the method in the first aspect or any possible implementation thereof.
[0048] Fourthly, a computer-readable storage medium is provided, which stores a computer program or instructions that, when executed, implement the method described in the first aspect or any possible implementation thereof.
[0049] Fifthly, a chip is provided, wherein instructions are stored therein, which, when executed on a device, cause the chip to perform the methods of the first aspect or any possible implementation thereof.
[0050] In a sixth aspect, a computer program product is provided, which stores a computer program or instructions that, when executed, implement the method in the first aspect or any possible implementation of the first aspect. Attached Figure Description
[0051] Figure 1 is a schematic diagram of the structure of the electronic device provided in an embodiment of this application;
[0052] Figure 2 is a software structure block diagram of an electronic device provided in an embodiment of this application;
[0053] Figure 3 is a software structure block diagram of another electronic device provided in an embodiment of this application;
[0054] Figure 4 is a schematic flowchart of a method for drawing an image;
[0055] Figure 5 is a further illustrative diagram explaining the method of drawing the image shown in Figure 4;
[0056] Figure 6 is a schematic diagram of an image drawn using the method shown in Figure 4;
[0057] Figure 7 is a schematic flowchart of a method for drawing an image provided in an embodiment of this application;
[0058] Figure 8 is a schematic flowchart of another method for drawing an image provided in an embodiment of this application;
[0059] Figure 9 is a schematic flowchart of another method for drawing an image provided in an embodiment of this application;
[0060] Figure 10 is a schematic flowchart of another method for drawing an image provided in an embodiment of this application;
[0061] Figure 11 is a schematic flowchart of an image drawing apparatus provided in an embodiment of this application;
[0062] Figure 12 is a schematic diagram of the process by which a processing module generates a first texture image set according to an embodiment of this application;
[0063] Figure 13 is a schematic diagram of a mapping module generating multiple indices for randomly acquiring texture images according to an embodiment of this application;
[0064] Figure 14 is a schematic diagram of the interaction between multiple modules provided in an embodiment of this application;
[0065] Figure 15 is a schematic diagram of a scene for drawing an image according to an embodiment of this application;
[0066] Figure 16 is a schematic diagram of a scene for drawing an image according to an embodiment of this application;
[0067] Figure 17 is a comparison diagram of the drawing effects of an embodiment of this application and an existing solution. Detailed Implementation
[0068] The technical solutions of this application will now be described with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments.
[0069] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in this text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "plural" or "multiple" refers to two or more than two.
[0070] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise stated, "a plurality of" means two or more.
[0071] The terminology used in the following embodiments is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to also include expressions such as “one or more,” unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, “at least one” and “one or more” refer to one, two, or more than two. The term “and / or” is used to describe the relationship between related objects, indicating that three relationships may exist; for example, A and / or B can indicate: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character “ / ” generally indicates that the preceding and following related objects are in an “or” relationship.
[0072] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "one embodiment," "some embodiments," "another embodiment," "other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0073] The method provided in this application can be applied to electronic devices with time display or time recognition functions, such as mobile phones, tablets, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), smart home devices, and other electronic devices. This application does not impose any restrictions on the specific type of electronic device.
[0074] For example, Figure 1 shows a schematic diagram of the structure of an electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0075] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0076] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0077] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0078] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0079] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0080] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0081] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0082] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0083] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0084] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0085] It should be understood that the phone cards in the embodiments of this application include, but are not limited to, SIM cards, eSIM cards, universal subscriber identity modules (USIM), universal integrated circuit cards (UICC), etc.
[0086] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses a layered architecture system as an example to exemplify the software structure of electronic device 100.
[0087] Figure 2 is a software structure block diagram of an electronic device 100 according to an embodiment of this application. The layered architecture divides the software into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the system is divided into four layers, from top to bottom: the application layer, the application framework layer, the runtime and system libraries, and the kernel layer. The application layer may include a series of application packages.
[0088] As shown in Figure 2, the application layer can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.
[0089] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0090] As shown in Figure 2, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0091] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0092] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.
[0093] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0094] The phone manager is used to provide communication functions for electronic device 100. For example, it manages call status (including connection and disconnection).
[0095] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0096] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.
[0097] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0098] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0099] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0100] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0101] A 2D graphics engine is a graphics engine for 2D drawing.
[0102] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
[0103] The electronic device provided in this application embodiment can run an operating system (OS). This operating system can be various operating systems currently used in the industry, such as HarmonyOS based on OpenHarmony; or other operating systems such as Android™, iOS mobile operating system; it can also be various open-source operating systems or their derivatives, such as Linux OS, and other embedded operating systems; or it can be a future new operating system, such as an AI operating system based on artificial intelligence. An operating system is a set of interconnected system software programs that manage and control the operation of electronic devices, utilize and run hardware and software resources, and provide public services to organize user interaction. The operating system occupies a pivotal position in electronic devices, connecting to the physical devices at the hardware layer below and providing a runtime environment for application software above.
[0104] An operating system typically includes a kernel layer, a middleware layer, and an application layer. The application layer includes applications, which can include system applications and third-party applications. The middleware layer is a set of software, or frameworks, that provides various services to application developers, such as databases, multimedia, and graphics, or capabilities like distributed scheduling and system expansion. For example, the middleware layer can also be broadly divided into a framework layer and / or a system service layer. The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The system service layer includes the core capabilities of the system, providing services to applications through the framework layer. The kernel layer is the layer between hardware and software. The kernel layer can include hardware drivers and the operating system kernel. In addition to providing hardware drivers, the kernel layer also supports functions such as memory management and system process management.
[0105] The electronic devices we use in our daily lives come in various types and forms, and are applied in a wide range of scenarios. Therefore, based on the different forms and functions of electronic devices, different application scenarios, and different user needs, the operating systems used in these devices may also differ. These operating systems share commonalities but also have their own unique characteristics. Different operating systems affect user experience, application ecosystem, and system performance. The basic functions implemented by the electronic device provided in this application can be achieved using a general-purpose operating system or a dedicated operating system.
[0106] To more clearly illustrate the implementation of the embodiments of this application under a specific operating system, Figure 3 illustrates the architecture of HarmonyOS, and those skilled in the art can deduce the implementation of the embodiments of this application under other specific operating systems, such as the Android™ operating system.
[0107] As shown in Figure 3, the software architecture of an electronic device can be divided into several layers. In some embodiments, from bottom to top, these layers are: kernel layer, system service layer, framework layer, and application layer. The layers communicate with each other through software interfaces. System functions can be tailored, added, or combined at the subsystem granularity in different device deployment scenarios. Each subsystem can also be tailored, added, or combined at the functional granularity.
[0108] (1) Kernel layer
[0109] The Kernel Abstraction Layer (KAL) provides basic kernel capabilities to upper layers by shielding the differences between multiple kernels, including but not limited to process / thread management, memory management, file system, network management, and peripheral device management.
[0110] Kernel Subsystem: Supports the selection of a suitable OS kernel for different resource-constrained devices, including but not limited to Linux kernel, HarmonyOS kernel, LiteOS, etc.
[0111] Driver Subsystem: The driver framework is the foundation for the open system hardware ecosystem, providing unified peripheral access capabilities and a framework for driver development and management. The driver framework includes: display drivers, camera drivers, audio drivers, Bluetooth drivers, sensor drivers, etc.
[0112] (2) System Service Layer
[0113] The system service layer comprises the core capabilities of the system, providing services to applications through the framework layer. This layer includes, but is not limited to, the following subsystems:
[0114] The system's basic capability subsystems provide fundamental capabilities for the operation, scheduling, and migration of distributed applications across multiple devices. For example, they may include distributed soft bus, distributed data management, distributed task scheduling, and the Ark multi-language runtime. They may also include multi-modal input subsystems, graphics subsystems, security subsystems, and AI subsystems.
[0115] Basic software service subsystems: provide common and general software services; for example, event notification subsystem, telephone service subsystem, multimedia subsystem, etc.
[0116] Enhanced software service subsystem suite: Provides differentiated capability-enhancing software services for different devices; for example, it may include proprietary business subsystems for smart screens, wearable devices, and IoT devices.
[0117] Hardware service subsystem set: provides hardware services; for example, it may include location service subsystem, user IAM (Identity and Access Management) subsystem, wearable proprietary hardware service subsystem, biometric identification, IoT proprietary hardware service subsystem, etc.
[0118] Distributed task scheduling enables distributed service management (discovery, synchronization, registration, and invocation), supporting remote startup, remote invocation, remote connection, and migration of applications across devices.
[0119] Distributed data management enables data synchronization, data storage, data sharing, and data access across all scenarios and devices.
[0120] The distributed soft bus provides communication-related capabilities for seamless interconnection between multiple devices, including: WLAN service capabilities, Bluetooth service capabilities, soft bus, inter-process communication RPC (Remote Procedure Call) and other communication capabilities.
[0121] Ark Multilingual Runtime is a unified compilation runtime platform designed to support the joint compilation and execution of multiple programming languages and multiple chip platforms.
[0122] (3) Framework layer
[0123] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. Examples include the ArkUI framework (which provides a complete infrastructure for UI development of system applications, including UI functionalities such as components, layouts, animations, and interactive events, as well as a real-time interface preview tool), the user application framework, and the Ability framework (an Ability is a lightweight application; the Ability framework schedules and manages the operation and lifecycle of Abilities). Different devices may run different operating systems, and therefore support different APIs.
[0124] The HarmonyOS API is a series of open capabilities provided to support HarmonyOS application development. The HarmonyOS API can be set at the framework layer or independently of the framework layer. Examples include: Audio API (audio service), Push API (push service), and Account API (account service).
[0125] (4) Application layer
[0126] Applications can include system apps and extended / third-party apps. System apps can include the desktop, control bar, settings, contacts, phone, camera, etc., while extended / third-party apps can include social apps, travel apps, etc.
[0127] It should be understood that the technical solutions in the embodiments of this application can be used in systems such as Android, iOS, and HarmonyOS.
[0128] The technical solutions of this application embodiment can be applied to scenarios where electronic devices are used for drawing.
[0129] Among them, electronic devices can be televisions, desktop computers, laptops, or portable electronic devices such as mobile phones, foldable screens, tablets, cameras, camcorders, video recorders, augmented reality (AR) glasses, smart home devices such as smart screens or any electronic devices with drawing functions, or electronic devices in future networks or in future evolved public land mobile networks (PLMNs).
[0130] In some painting scenarios, the application of electronic devices provides users with optional objects that they can add to the image they are drawing. Some embodiments offer users a wider range of ways to add these objects, such as adjusting their size, angle, and number, thereby enriching the user's painting experience.
[0131] In some painting scenarios, the use of electronic devices also provides users with more convenient ways to add elements. For example, it can capture the user's drawing trajectory in real time, display multiple selectable objects along the trajectory, and add rich patterns in one stroke. For instance, it can add falling leaves, fluttering butterflies, and so on in one stroke.
[0132] In some embodiments, FIG4 illustrates a schematic flowchart of a method 400 for drawing an image. As shown in FIG4, the method 400 includes:
[0133] S401: Get the texture image of a static image.
[0134] The texture image of the static image is obtained from the imported static image, such as a static image imported from the gallery of an electronic device.
[0135] Among them, the texture image of a static image refers to the image texture of a static image.
[0136] In an image, the structure formed by the repetition of a certain pattern can be regarded as texture. Image texture reflects certain changes in the color and grayscale of the surface of objects in the image, and these changes are related to the properties of the objects themselves. From a microscopic perspective, texture is composed of visual primitives with a certain degree of invariance, and the texture of different object surfaces can serve as a distinct feature to describe different regions.
[0137] In some embodiments, a texture image can be directly described as an image.
[0138] S402: Set parameters such as jitter, rotation, spacing, and offset.
[0139] Specifically, before drawing, multiple selectable parameters are preset for the multiple texture images to be drawn at the drawing trajectory points. These parameters may include one or more jitter parameters, one or more rotation parameters, one or more spacing parameters, and / or one or more other parameters. For example, these parameters can be set through the parameter settings interface of the drawing application, and the set parameters may be stored in the corresponding storage file of the drawing application.
[0140] The number of jitter parameters, rotation parameters, spacing parameters, and offset parameters can all be set.
[0141] S403: During the process of painting on the canvas using a texture brush, parameters are randomly set and rendered for the texture image at each trajectory point on the painting path according to the set parameters, so as to obtain a dynamic effect image of the image.
[0142] Here, randomly setting parameters for the texture image at each trajectory point means randomly selecting one or more parameters from the multiple parameters set in S402 at each trajectory point, and setting the selected one or more parameters as the parameters of the texture image drawn at that trajectory point.
[0143] Taking the drawing of a dynamic effect of a butterfly in flight as an example, and referring to Figure 5, we will further explain method 400.
[0144] As shown in Figure 5, when a user wants to draw an image of a flying butterfly, they can use the above method 400, with image 501 as the texture image of the static image, and draw on the canvas using a texture brush. During the drawing process, at each trajectory point left by the texture brush (i.e., the position where the butterfly image is displayed in image 502), random parameters are set for image 501 and rendered to obtain the image of the flying butterfly, i.e., image 502.
[0145] As shown in Figure 5, although the drawn image 502 also presents a certain dynamic feeling, each butterfly image drawn is different from image 501 only in rotation parameters and size. There is no difference in the shooting angle and movement posture of the butterfly. That is, the multiple butterfly images displayed in image 502 are obtained from the same static image through parameter settings.
[0146] Taking the dynamic effect of drawing butterflies in flight and birds in flight as an example, Figure 6 shows a schematic diagram of the effect of the image drawn by method 400.
[0147] Figure 6(a) shows an image of a butterfly in flight drawn using method 400.
[0148] As shown in Figure 6(a), among all the butterfly images included in the butterfly flying image drawn by method 400, the butterfly rotation parameters and / or butterfly size are different, but the butterfly shooting angle and butterfly movement posture remain unchanged. That is, among all the butterfly images in the obtained dynamic effect image, the butterfly shooting angle and butterfly movement posture are exactly the same. In other words, the multiple butterfly images displayed in the obtained image can be obtained from the same static image by setting parameters.
[0149] Figure 6(b) shows an image of a bird drawn using method 400.
[0150] As shown in Figure 6(b), among all the bird images included in the bird images drawn by method 400, the rotation parameters and / or the size of the birds are different, but the shooting angle and the movement posture of the birds remain unchanged.
[0151] By randomly setting parameters for the texture images drawn at the points on the drawing trajectory, multiple texture images displayed on the drawing trajectory can undergo transformations such as rotation, translation, and jitter, making the drawn images appear dynamic.
[0152] By using static texture brushes, that is, when drawing on the canvas, the same texture image of the same object is randomly varied to achieve a dynamic effect.
[0153] Because this method uses the same image texture for all moving objects, the moving objects and their states of motion are repetitive. This causes the dynamic effects that should be lively to become stiff after being drawn.
[0154] Based on this, this application provides a richer drawing method. By manually redrawing the motion posture or size of each texture image in the image drawn by the above method 400, the drawn image presents a dynamic effect that matches the motion trajectory and time sequence in the actual physical world, further improving the user's drawing experience.
[0155] Manual drawing can enhance the dynamism of the drawn image, but the drawing process is time-consuming, affecting the user's drawing efficiency.
[0156] In view of this, embodiments of this application provide a method, apparatus, and electronic device for drawing images. Through this method, different texture images (i.e., texture images of different motion postures and / or different perspectives of the same object) are used during the drawing process. At each trajectory point, a texture image is randomly obtained from multiple different texture images and rendered. This makes the drawn image more varied and the motion trajectory more realistic, presenting a dynamic effect that conforms to the actual physical world, thereby improving the user's drawing experience and the quality of the artwork.
[0157] Furthermore, after acquiring the texture image of the trajectory point, before rendering it, the texture image corresponding to the trajectory point can be randomly adjusted (e.g., random jitter parameters, random rotation parameters), which can further make the drawn dynamic effect more realistic, obtain richer object change effects and image sequences that are more in line with the actual motion trajectory, and present a dynamic effect that conforms to the actual physical world.
[0158] In addition, the method provided in this application embodiment can draw multiple image textures with different motion postures and / or different shooting angles in one stroke, thereby drawing a dynamic effect picture of an object in one stroke. It is not necessary to manually redraw the motion postures and angles of these image textures after drawing multiple image textures with the same motion postures and / or shooting angles in one stroke, which can improve the efficiency of drawing.
[0159] It should be understood that the two images in the embodiments of this application have different shooting perspectives of the first object. This can mean that the two images are obtained by shooting the first object from different angles. For example, the images can be obtained by shooting the first object from different angles when the first object is stationary; or the images can be obtained by shooting the first object from different angles when the first object is in a non-stationary state.
[0160] It should also be understood that the different motion postures of the first object in the two images described in the embodiments of this application can mean that the two images were taken when the first object was in different postures, expressions, and / or states of mind. For example, if the first object is a butterfly, the first image may be taken when the butterfly's wings are fully open, and the second image may be taken when the butterfly's wings are half open. As another example, if the first object is a puppy, the first image may be taken when the puppy's expression is serious, and the second image may be taken when the puppy's expression is happy. As yet another example, if the first object is a bird, the first image may be taken when the bird flaps its wings upward, and the second image may be taken when the bird swoops downward. As yet another example, if the first object is a person, the first image may be taken when the person's expression is relaxed and content, and the second image may be taken when the person's expression is listless.
[0161] For example, taking the drawing of a dynamic effect diagram of a first object as an example, Figure 7 shows a schematic flowchart of another image drawing method 700 provided in an embodiment of this application. As shown in Figure 7, the method is applied to a first device, and the method 700 includes:
[0162] S701: During the process of drawing the dynamic effect image of the first object, the user's first drawing trajectory point is obtained, and the first image of the first object is displayed at the first drawing trajectory point.
[0163] Among them, the dynamic effect image of the first object refers to an image that presents the dynamic motion of the first object through multiple static images of the first object, such as presenting the motion trajectory and changes in the motion posture of the first object through multiple static images of the first object.
[0164] S702: Obtain the user's second drawing trajectory point, and display the second image of the first object at the second drawing trajectory point.
[0165] The first image and the second image are generated from the first object. The shooting angle and / or the motion posture of the first object are different between the first image and the second image.
[0166] The first image and the second image may be obtained by taking a picture of a first object, which may include people, animals, plants, objects, etc.
[0167] It should be understood that during the process of drawing the dynamic effect image of the first object, the user's drawing trajectory is acquired in real time. When the drawing trajectory extends to the first drawing trajectory point, the first image of the first object is displayed at the first drawing trajectory point. When the drawing trajectory extends to the second drawing trajectory point, the second image of the first object is displayed at the first drawing trajectory point.
[0168] What can be understood is that during the process of drawing the dynamic effect image of the first object, as the user manipulates the texture brush to leave a drawing path on the canvas, when the texture brush moves to the first drawing path point, the first device acquires that first drawing path point and displays the first image of the first object at that point. When the texture brush continues to move to the second drawing path point, the first device acquires that second drawing path point and displays the second image of the first object at that point, and so on. As the drawing path extends, an image of the first object is displayed at each drawing path point until the drawing process ends. In this way, from the user's perspective, it is possible to draw multiple images of the first object in one stroke, and among these multiple images of the first object, at least two images differ in the shooting perspective and / or the movement posture of the first object.
[0169] In some embodiments, the motion posture of the first object may include the posture of the first object and / or the facial expression of the first object.
[0170] In one example, the first object is a person or animal. The posture of the first object can include a variety of standing postures, a variety of lying postures, and a variety of sitting postures. More broadly, when the joints corresponding to two postures of the first object cannot be completely overlapped, the two postures can be considered different.
[0171] In a specific example, the first object is a butterfly, and the different postures of the first object may include the posture of the butterfly with its antennae raised, the posture of the butterfly with its wings fully open, the posture of the butterfly with its wings half open, the posture of the butterfly with its wings fully folded, etc.
[0172] In a specific example, the first object is a bird. Different postures of the first object can include the posture of the bird flapping its wings upward and flying high, the posture of the bird spreading its wings 180°, the posture of the bird flapping its wings downward, the posture of the bird folding its wings, etc.
[0173] In one example, the first object is a plant, and the pose of the first object can include a variety of poses such as swaying in the wind, drooping under the scorching sun, and being drenched in rain.
[0174] In a specific example, the first object is a pine tree, and the different postures of the first object can include the posture of the pine tree growing straight, the posture of the pine tree being tilted by the wind at 10°, the posture of the pine tree being tilted by the wind at 15°, the posture of the pine tree being tilted by the wind at 20°, etc.
[0175] The expressions of the first object may include, for example, happy expressions (laughing, smiling, grinning, laughing wildly, etc.), frustrated expressions (grimacing, lifeless eyes, etc.), crying expressions (crying with open mouth, tears in eyes, crying without expression, etc.), angry expressions (wide-eyed, face flushed, etc.), and other expressions.
[0176] For example, taking the drawing of a dynamic effect diagram of a first object as an example, Figure 8 shows a schematic flowchart of another image drawing method 800 provided in an embodiment of this application. As shown in Figure 8, the method is applied to a first device, and the method 800 includes:
[0177] S801: Acquire multiple texture images of the first object, wherein any two texture images of the first object have different shooting angles and / or different motion postures.
[0178] In this context, multiple texture images of the first object can also be described as multiple images of the first object.
[0179] This could involve obtaining multiple texture images of a first object through the drawing application interface while using a drawing application on the first device.
[0180] The texture image of the first object can be obtained through various means.
[0181] In some embodiments, multiple images of a first object may be obtained from the gallery or other storage location of the first device, and a texture image of the first object may be obtained based on the multiple images of the first object.
[0182] For example, multiple images of a first object can be selected from the gallery of a first device, and the selected multiple images of the first object can be imported into a painting application. The painting application obtains multiple texture images of the first object by parsing each of the imported multiple images of the first object.
[0183] In some embodiments, an animated image of the first object can be obtained from the image library or other storage location of the first device, and a texture image of the first object can be obtained based on the obtained animated image of the first object.
[0184] For example, an animated image of a first object can be imported into a painting application from the image library or other storage location of the first device. The painting application then decomposes the animated image of the first object to obtain multiple frames of the first object. By parsing each frame of the multiple frames of the first object, multiple texture images of the first object can be obtained.
[0185] In an optional example, the animation of the first object can be a graphics interchange format (GIF) animation of the first object.
[0186] In some embodiments, a video of the first object can be obtained from the gallery or other storage location of the first device, and a texture image of the first object can be obtained based on the obtained video of the first object.
[0187] For example, a video of a first object can be imported into a painting application from the gallery or other storage location of the first device. The painting application then decomposes the video of the first object to obtain multiple frames of the first object. By parsing each frame of the multiple frames of the first object, multiple texture images of the first object can be obtained.
[0188] In this process, after decomposing the video of the first object, the multi-frame images obtained from the decomposition can be filtered, and then each frame of the filtered multi-frame images can be parsed to obtain multiple texture images of the first object.
[0189] In some embodiments, at least two of the following can be obtained from the first device’s gallery or other storage location: an image of the first object, an animated GIF of the first object, and a video of the first object; and a texture image of the first object can be obtained based on at least two of the following: an image of the first object, an animated GIF of the first object, and a video of the first object.
[0190] S802: Construct an index for each of the multiple texture images of the first object to obtain multiple indices that correspond one-to-one with the multiple texture images of the first object.
[0191] In some embodiments, multiple indexes are first generated, and then a mapping relationship is established between the multiple indexes and the multiple texture images.
[0192] In some embodiments, an index for each of the plurality of texture images is generated sequentially, and there is a mapping relationship between the generated index of each texture image and each texture image. For example, an index for the first texture image is generated, and there is a mapping relationship between the generated index of the first texture image and the first texture image; an index for the second texture image is generated, and there is a mapping relationship between the generated index of the second texture image and the second texture image.
[0193] In some embodiments, multiple indexes may be stored in a storage file corresponding to the painting application, for example, in a storage file corresponding to the mapping module in the painting application.
[0194] In some embodiments, multiple indexes may be stored in the storage of the electronic device's GPU.
[0195] In one implementation, taking texture image 1 among the multiple texture images of the first object as an example, the index constructed for texture image 1 can refer to the index constructed for the storage address of texture image 1. The storage address of texture image 1 can be found according to the constructed index, and then texture image 1 can be obtained.
[0196] During the process of drawing the dynamic effect image of the first object using a texture brush, for each trajectory point on the drawing trajectory, one index is randomly selected from the above multiple indices, and the corresponding texture image is obtained according to the randomly selected index, and the obtained texture image is rendered.
[0197] The following section, using S803 to S805 as examples, provides a detailed explanation of the drawing process:
[0198] S803: During the process of drawing the dynamic effect image of the first object, at the i-th trajectory point, one index is obtained from the above multiple indices, and the texture image corresponding to the i-th trajectory point is obtained according to the obtained one index, where the initial value of i is 1, and i is a positive integer greater than or equal to 1.
[0199] In some embodiments, one index may be randomly selected from the above multiple indices, and the texture image corresponding to the i-th trajectory point may be obtained based on the randomly selected index.
[0200] S804: Render the texture image corresponding to the i-th trajectory point.
[0201] Specifically, the texture image corresponding to the i-th trajectory point can be rendered at the i-th trajectory point so that the texture image corresponding to the i-th trajectory point is displayed at the i-th trajectory point.
[0202] S805: Determine if the drawing process has ended. If not, set i = i + 1, return to S803, and continue executing S803 to S805 at the (i + 1)th trajectory point. If the drawing has ended, output the dynamic effect of the first object.
[0203] In this embodiment of the application, different texture images (i.e. texture images of different motion postures and / or different perspectives of the same object) are used during the drawing process. At each trajectory point, a texture image is randomly obtained from multiple different texture images and rendered. This makes the changes in the drawn image richer and the motion trajectory more realistic, presenting a dynamic effect that conforms to the actual physical world, improving the user's drawing experience and the quality of the artwork.
[0204] For example, taking the drawing of a dynamic effect diagram of a first object as an example, Figure 9 shows a schematic flowchart of another image drawing method 900 provided in an embodiment of this application. As shown in Figure 9, the method is applied to a first device, and the method 900 includes:
[0205] S901: Acquire multiple texture images of the first object, wherein any two texture images of the first object have different shooting angles and / or different motion postures.
[0206] The explanation of S901 is exactly the same as the explanation of S801 in the embodiment shown in Figure 8, and will not be repeated here for the sake of brevity.
[0207] S902: Perform normalization processing on each of the multiple texture images of the first object, and the multiple texture images after normalization processing form a first texture image set, and output multiple storage addresses that correspond one-to-one with the multiple texture images after normalization processing.
[0208] The aforementioned storage addresses are the addresses for storing multiple texture images after standardization processing.
[0209] This includes standardizing the texture images, such as processing the size, brightness, and / or color of each texture image to achieve a unified format for the multiple texture images.
[0210] The first texture image set consists of multiple texture images after standardization. This can refer to the standardization of multiple texture images into a form that can be loaded at once. It can be understood that the first texture image set can be loaded at once. The first texture image set can exist as a large texture image composed of multiple texture images.
[0211] It is understandable that by combining multiple standardized texture images into a first texture image set, the first device can quickly access the texture images during the subsequent texture image rendering process.
[0212] In some embodiments, after normalizing each of the multiple texture images of the first object, the normalized multiple texture images can be stored.
[0213] S903: Generate multiple indexes that correspond one-to-one with the above-mentioned multiple storage addresses.
[0214] This step can also be described as: generating an index for each of the above multiple storage addresses to obtain multiple indexes that correspond one-to-one with the above multiple storage addresses.
[0215] In other words, taking index A among the aforementioned indices as an example, index A can be used to obtain a storage address containing the texture image of the first object. Furthermore, the texture image of the first object can be obtained by accessing this storage address. In this way, by randomly obtaining the index, it is possible to randomly select a texture image from multiple texture images.
[0216] In some embodiments, this step may also be described as: generating multiple indexes and establishing a one-to-one mapping relationship between the multiple storage addresses and the multiple indexes.
[0217] During the process of drawing the dynamic effect image of the first object using a texture brush, for each trajectory point on the drawing trajectory, one index is randomly selected from the above multiple indices. Based on the one-to-one mapping relationship between multiple storage addresses and multiple indices established in S903, the storage address corresponding to the randomly selected index is obtained. A texture image of the first object is obtained by accessing the storage address, and the obtained texture image of the first object is rendered.
[0218] The following section, in conjunction with S904 to S906, provides a detailed explanation of the drawing process:
[0219] S904: During the process of drawing the dynamic effect image of the first object, at the i-th trajectory point, one index is obtained from the above multiple indices, and the texture image corresponding to the i-th trajectory point is obtained according to the obtained one index, where the initial value of i is 1, and i is a positive integer greater than or equal to 1.
[0220] In some embodiments, one index may be randomly selected from the above multiple indices, and the texture image corresponding to the i-th trajectory point may be obtained based on the randomly selected index.
[0221] Specifically, the above-mentioned method of obtaining the texture image corresponding to the i-th trajectory point according to the randomly obtained index may include: accessing the storage address used to store the texture image corresponding to the i-th trajectory point according to the randomly obtained index, and then obtaining the texture image corresponding to the i-th trajectory point.
[0222] S905: Render the texture image corresponding to the i-th trajectory point.
[0223] Specifically, the texture image corresponding to the i-th trajectory point can be rendered at the i-th trajectory point so that the texture image corresponding to the i-th trajectory point is displayed at the i-th trajectory point.
[0224] S906: Determine if the drawing process has ended. If not, set i = i + 1, return to S904, and continue executing S904 to S906 at the (i + 1)th trajectory point. If the drawing has ended, output the dynamic effect of the first object.
[0225] In one example, taking a butterfly as the first object, when a user uses the drawing application on the first device to draw a picture of a butterfly in flight, the user can select multiple images of butterflies in flight from the device's gallery (the images show butterflies with different shooting angles and / or movements), and import these images into the drawing application. The drawing application can batch-parse these multiple flight images to obtain multiple texture images. After standardizing each texture image, it stitches them together into a large texture image that can be loaded all at once. It then outputs multiple storage addresses for storing these texture images and establishes a one-to-one mapping between these storage addresses and multiple indices. Based on this, the user can then use the texture pen. The drawing begins on the canvas. At the first trajectory point, an index is randomly selected from multiple indices. Based on the one-to-one mapping between multiple storage addresses and indices, a storage address that is mapped to the randomly selected index is obtained. This storage address is then accessed to randomly select one texture image from multiple texture images. The obtained texture image is then rendered, thus creating the first flight image of the butterfly at the first trajectory point. Similarly, as the user progresses drawing, the second flight image of the butterfly can be drawn at the second trajectory point, and the third flight image at the third trajectory point. This process continues until the drawing is complete. In the first, second, and third flight images, the butterfly's shooting angle and / or movement posture are different from each other.
[0226] In this embodiment of the application, different texture images (i.e. texture images of different motion postures and / or different perspectives of the same object) are used during the drawing process. At each trajectory point, a texture image is randomly obtained from multiple different texture images and rendered. This makes the changes in the drawn image richer and the motion trajectory more realistic, presenting a dynamic effect that conforms to the actual physical world, improving the user's drawing experience and the quality of the artwork.
[0227] For example, taking the drawing of a dynamic effect diagram of a first object as an example, Figure 10 shows a schematic flowchart of another image drawing method 1000 provided in an embodiment of this application. As shown in Figure 10, the method is applied to a first device, and the method 1000 includes:
[0228] S1001: Obtain multiple texture images of the first object, wherein any two texture images of the first object have different shooting angles and / or different motion postures.
[0229] S1002: Perform normalization processing on each of the multiple texture images of the first object, and the multiple texture images after normalization processing form a first texture image set, and output multiple storage addresses that correspond one-to-one with the multiple texture images after normalization processing.
[0230] S1003: Generate multiple indexes that correspond one-to-one with the above-mentioned multiple storage addresses.
[0231] S1004: During the process of drawing the dynamic effect image of the first object, at the i-th trajectory point, one index is randomly selected from the above multiple indices, and the texture image corresponding to the i-th trajectory point is obtained according to the randomly selected index.
[0232] The explanations of S1001 to S1004 are exactly the same as those of S901 to S904 in the embodiment shown in Figure 9, and will not be repeated here for the sake of brevity.
[0233] S1005: Adjust the parameters of the texture image corresponding to the i-th trajectory point.
[0234] The parameters may include one or more of the following: random jitter parameters, rotation parameters, and offset parameters.
[0235] S1006: Render the texture image corresponding to the i-th trajectory point.
[0236] S1007: Determine if the drawing process has ended. If not, set i = i + 1, return to S1004, and continue executing S1004 to S1007 at the (i + 1)th trajectory point. If the drawing has ended, output the dynamic effect of the first object.
[0237] The explanations of S1006 and S1007 are exactly the same as those of S905 and S906 in the embodiment shown in Figure 9, and will not be repeated here for the sake of brevity.
[0238] In this embodiment of the application, after obtaining the texture image of the trajectory point and before rendering it, the parameters of the texture image corresponding to the trajectory point can be randomly adjusted, which can further make the drawn dynamic effect map more realistic and more in line with the actual motion trajectory, presenting a dynamic effect that conforms to the actual physical world.
[0239] For example, FIG11 shows a schematic flowchart of an image drawing apparatus 1100 provided in an embodiment of this application. As shown in FIG11, the apparatus 1100 includes an acquisition module 1110, a processing module 1120, a mapping module 1130, and a drawing module 1140, specifically:
[0240] The acquisition module 1110 is used to acquire multiple texture images of the first object, wherein any two texture images of the first object have different shooting angles and / or different motion postures of the first object.
[0241] In this scenario, during the use of a drawing application on the first device, the image acquisition module 1110 acquires multiple texture images of the first object based on the user's triggering operation on the drawing application interface.
[0242] The acquisition module 1110 can acquire the texture image of the first object through multiple means.
[0243] In some embodiments, the acquisition module 1110 may acquire multiple images of the first object from the gallery or other storage location of the first device, and acquire a texture image of the first object based on the acquired multiple images of the first object.
[0244] In some embodiments, the acquisition module 1110 may acquire an animated image of the first object from the image library or other storage location of the first device, and acquire a texture image of the first object based on the acquired animated image of the first object.
[0245] In some embodiments, the acquisition module 1110 may acquire a video of the first object from the gallery or other storage location of the first device, and acquire a texture image of the first object based on the acquired video of the first object.
[0246] In some embodiments, the acquisition module 1110 may also acquire at least two of the following from the first device's image, animation, and video: an image of the first object, an animation of the first object, and a video of the first object, and acquire a texture image of the first object based on at least two of the following: an image of the first object, an animation of the first object, and a video of the first object.
[0247] The processing module 1120 is used to perform normalization processing on each of the multiple texture images of the first object, and the multiple texture images after normalization processing form a first texture image set. It is also used to output multiple storage addresses that correspond one-to-one with the multiple texture images after normalization processing.
[0248] The aforementioned storage addresses are the addresses for storing multiple texture images after standardization processing.
[0249] The processing module 1120 performs standardization processing on the texture images. For example, the processing module 1120 may process the size, brightness and / or color of each texture image in multiple texture images to achieve format unification of multiple texture images.
[0250] The first texture image set is composed of multiple texture images after standardization. This can mean that the processing module 1120 organizes the multiple texture images after standardization into a form that can be loaded at once. It can be understood that the first texture image set can be loaded at once. The first texture image set can exist as a large texture image composed of multiple texture images.
[0251] It is understandable that after the processing module 1120 combines the multiple standardized texture images into a first texture image set, the drawing module 1140 can quickly access the texture images.
[0252] In some embodiments, the processing module 1120 is further configured to store the normalized texture images after normalizing each of the multiple texture images of the first object.
[0253] The mapping module 1130 is used to generate multiple indexes that correspond one-to-one with the above-mentioned multiple storage addresses.
[0254] It can also be described as: mapping module 1130, used to generate an index for each of the above-mentioned multiple storage addresses, so as to obtain multiple indexes that correspond one-to-one with the above-mentioned multiple storage addresses.
[0255] It can also be described as: mapping module 1130, used to generate multiple indexes and establish a one-to-one mapping relationship between the above multiple storage addresses and the multiple indexes.
[0256] In other words, the processing module 1120 can input multiple storage addresses for storing multiple texture images of the first object to the mapping module 1130, and the mapping module 1130 can output multiple indices. These multiple indices have a one-to-one mapping relationship with the aforementioned multiple storage addresses. These multiple indices are used to link to the multiple storage addresses and then obtain the texture image from the storage address.
[0257] The drawing module 1140 is used to randomly select one index from the above multiple indices for each trajectory point on the drawing trajectory during the process of drawing the dynamic effect image of the first object using a texture brush. Based on the one-to-one mapping relationship between multiple storage addresses and multiple indices established by the mapping module 1130, the module obtains the corresponding storage address according to the randomly selected index, obtains a texture image of the first object by accessing the storage address, and renders the obtained texture image of the first object.
[0258] In some embodiments, the apparatus 1100 may further include a parameter adjustment module for adjusting the parameters of the acquired texture image of the first object before rendering the texture image of the first object.
[0259] The parameters may include one or more of the following: random jitter parameters, rotation parameters, and offset parameters.
[0260] In some embodiments, an apparatus is provided, comprising an acquisition module and a display module, wherein the acquisition module is configured to acquire a first drawing trajectory point of a user during the process of drawing an image; the display module is configured to display a first image of a first object at the first drawing trajectory point; the acquisition module is further configured to acquire a second drawing trajectory point of the user; the display module is further configured to display a second image of the first object at the second drawing trajectory point, wherein the first image and the second image are generated by the first object, and the shooting angle and / or the motion posture of the first object are different between the first image and the second image.
[0261] For example, taking object A as the first object, Figure 12 shows a schematic diagram of a processing module generating a first texture image set according to an embodiment of this application. As shown in Figure 12, the process includes:
[0262] (1) The processing module can standardize multiple texture images of the acquired object A (where the shooting angle and / or motion posture of object A are different in any two texture images) to unify the format of the multiple texture images.
[0263] Standardizing texture images can include processing their size, brightness, and color.
[0264] In the example shown in Figure 12, the multiple texture images after normalization are the texture image of object A in state 1, the texture image of object A in state 2, ..., the texture image of object A in state N.
[0265] (2) Regularize the multiple texture images after standardization and convert their existence into a form that can be loaded at once.
[0266] In some embodiments, multiple texture images that have undergone standardization are stitched together into a single large texture image, thereby converting the existing form of multiple texture images into a form that can be loaded all at once.
[0267] In the example shown in Figure 12, the texture image of object A in state 1, the texture image of object A in state 2, ..., the texture image of object A in state N are stitched together to form a large texture.
[0268] For example, taking object A as the first object, based on the embodiment shown in Figure 12, Figure 13 illustrates a process diagram of a mapping module generating multiple indices for randomly acquiring texture images, provided in an embodiment of this application. As shown in Figure 13, the process includes:
[0269] (1) The mapping module obtains multiple storage addresses from the processing module for storing multiple texture images of object A, wherein the multiple storage addresses correspond one-to-one with the multiple texture images of object A.
[0270] (2) The mapping module generates an index corresponding to each of the multiple storage addresses. In other words, the mapping module establishes a one-to-one correspondence between multiple storage addresses and multiple indexes, where the multiple indexes are the indexes of the multiple storage addresses.
[0271] In this way, during the drawing process, at each trajectory point, an index can be randomly obtained from the above multiple indices, and the texture image drawn at each trajectory point can be obtained from the storage address pointed to by the randomly obtained index.
[0272] In the example shown in Figure 13, the storage address of the texture image of object A in state 1 is 1, the storage address of the texture image of object A in state 2 is 2, ..., the storage address of the texture image of object A in state N-2 is N-2, the storage address of the texture image of object A in state N-1 is N-1, and the storage address of the texture image of object A in state N is N.
[0273] The mapping relationship between the storage address and index of the texture image established by the mapping module is as follows: index 0 is mapped to storage address 1, index 1 is mapped to storage address 2, index 3 is mapped to storage address 3, ..., index N-3 is mapped to storage address N-2, index N-2 is mapped to storage address N-1, and index N-1 is mapped to storage address N.
[0274] Based on this, by randomly selecting an index, the storage address corresponding to the index can be obtained according to the mapping relationship between the index and the storage address of the texture image. Then, by accessing the storage address, it is possible to randomly obtain a texture image from multiple texture images of object A.
[0275] In one implementation, the one-to-one mapping relationship between multiple storage addresses and multiple indices can be carried in the form of a mapping table, such as the mapping table shown in Figure 13; during the drawing process, the texture image corresponding to any index can be quickly obtained through this mapping table.
[0276] For example, Figure 14 shows a schematic diagram of interaction between multiple modules provided in an embodiment of this application.
[0277] As shown in Figure 14, the interaction process between the acquisition module, processing module, mapping module, and drawing module is as follows:
[0278] (1) The acquisition module parses one or more of the animated GIFs, videos and images of object A to acquire multiple texture images of object A. Among the multiple texture images of object A, the shooting angle of object A is different and / or the motion posture of object A is different.
[0279] (2) The processing module performs standardization processing on each of the multiple texture images of object A.
[0280] For example, after normalization, multiple texture images of object A are respectively the texture image of object A in state 1, the texture image of object A in state 2, ..., the texture image of object A in state N.
[0281] (3) The processing module regularizes the multiple texture images after standardization, that is, it stitches the multiple texture images after standardization into a large texture image, so as to realize the transformation of the existence of multiple texture images into a form that can be loaded at once.
[0282] For example: stitch together the texture image of object A in state 1, the texture image of object A in state 2, ..., the texture image of object A in state N into a large texture.
[0283] (4) The mapping module obtains multiple storage addresses from the processing module for storing multiple texture images of object A, wherein the multiple storage addresses correspond one-to-one with the multiple texture images of object A; the mapping module generates an index corresponding to each of the multiple storage addresses.
[0284] For example: the storage address of the texture image of object A in state 1 is 1, the storage address of the texture image of object A in state 2 is 2, ..., the storage address of the texture image of object A in state N-2 is N-2, the storage address of the texture image of object A in state N-1 is N-1, and the storage address of the texture image of object A in state N is N.
[0285] The mapping relationship between the storage address and index of the texture image established by the mapping module is as follows: index 0 is mapped to storage address 1, index 1 is mapped to storage address 2, index 3 is mapped to storage address 3, ..., index N-3 is mapped to storage address N-2, index N-2 is mapped to storage address N-1, and index N-1 is mapped to storage address N.
[0286] (5) During the drawing process, for each trajectory point on the drawing trajectory, an index is randomly selected from the mapping table generated by the mapping module. The storage address corresponding to the index can be obtained according to the index, and then the storage address can be accessed. This enables the random acquisition of a texture image from multiple texture images of object A, and thus enables the drawing of a random texture image at each trajectory point.
[0287] For example: at the first trajectory point, the texture image of object A in state 1 is randomly drawn using the randomly obtained index 0; at the second trajectory point, the texture image of object A in state N is randomly drawn using the randomly obtained index N-1; at the third trajectory point, the texture image of object A in state 3 is randomly drawn using the randomly obtained index 2; and at the fourth trajectory point, the texture image of object A in state 2 is randomly drawn using the randomly obtained index 1.
[0288] For example, taking the drawing of a dynamic effect diagram corresponding to a flying bird as an example, Figure 15 shows a scene diagram of drawing an image provided by an embodiment of this application.
[0289] As shown in Figure 15(a), during the process of the user drawing on the canvas with a pen, at the trajectory point A, the image 1 of the flying bird is drawn on the canvas.
[0290] As shown in Figure 15(b), as the drawing process moves from trajectory point A to trajectory point B, the image 2 of the flying bird is drawn on the canvas.
[0291] As shown in Figure 15(c), as the drawing process moves from trajectory point B to trajectory point C, the image 3 of the flying bird is drawn on the canvas.
[0292] As shown in Figure 15(d), as the drawing process moves from trajectory point C to trajectory point D, the image 4 of the flying bird is drawn on the canvas.
[0293] Among the images of birds 1, 2, 3 and 4, at least two images show birds with different postures and / or expressions. For example, in image 1, the bird is in a flight posture with its wings flapping upwards; in image 2, the bird is in a flight posture with its wings flapping downwards.
[0294] For example, taking the drawing of the dynamic effect diagram corresponding to the first character as an example, Figure 16 shows another scene diagram of drawing an image provided by the embodiment of this application.
[0295] As shown in Figure 16(a), during the process of the user drawing on the canvas with a pen, at the trajectory point E, the image 1 of the first person is drawn on the canvas, where the expression of the first person in the image 1 is a smile.
[0296] As shown in Figure 16(b), as the drawing process moves from trajectory point E to trajectory point F, the image 2 of the first person is drawn on the canvas, where the expression of the first person in the image 2 is serious.
[0297] As shown in Figure 16(c), as the drawing process moves from trajectory point F to trajectory point G, the image 3 of the first person is drawn on the canvas, where the expression of the first person in the image 3 is sadness.
[0298] As shown in Figure 16(d), as the drawing process moves from trajectory point G to trajectory point H, the image 1 of the first person is drawn on the canvas, where the expression of the first person in the image 1 is a smile.
[0299] It can be seen that among the drawn images, at least two images have different expressions.
[0300] For example, taking the dynamic effect diagram of a flying bird as an example, Figure 17 shows a comparison diagram of the drawing effect of a solution provided by this application and an existing solution.
[0301] Figure 17(a) shows a dynamic rendering of a bird in flight created using an existing method. As can be seen from Figure 17(a), the bird images in the dynamic rendering have the same motion posture and shooting angle, differing only in parameters such as shaking, rotation, and offset. This dynamic rendering is rather rigid in its presentation, and its flight trajectory and motion posture do not conform to actual flight conditions, failing to present a dynamic effect that matches the real physical world.
[0302] Figure 17(b) shows a dynamic effect diagram of a bird drawn using the solution provided in the embodiment of this application. As can be seen from Figure 17(b), among the multiple bird images in the dynamic effect diagram, at least two bird images have different motion postures and / or shooting angles, and there may also be differences in parameters such as shaking, rotation, and offset, presenting a dynamic effect that conforms to the actual physical world.
[0303] One or more modules or units described herein can be implemented in software, hardware, or a combination of both. When any of the above modules or units are implemented in software, the software exists as computer program instructions and is stored in memory. A processor can be used to execute the program instructions and implement the above method flow. The processor can include, but is not limited to, at least one of the following: a central processing unit (CPU), a microprocessor, a digital signal processor (DSP), a microcontroller unit (MCU), or an artificial intelligence processor, etc., and various computing devices that run software. Each computing device may include one or more cores for executing software instructions to perform calculations or processing. The processor can be built into a SoC (System-on-a-Chip) or an application-specific integrated circuit (ASIC), or it can be a separate semiconductor chip. In addition to the cores for executing software instructions to perform calculations or processing, the processor may further include necessary hardware accelerators, such as field-programmable gate arrays (FPGAs), PLDs (programmable logic devices), or logic circuits that implement dedicated logic operations.
[0304] When the modules or units described herein are implemented in hardware, the hardware may be any one or any combination of a CPU, microprocessor, DSP, MCU, artificial intelligence processor, ASIC, SoC, FPGA, PLD, application-specific digital circuit, hardware accelerator, or non-integrated discrete device, which may run the necessary software or perform the above method flow independently of software.
[0305] When the modules or units described herein are implemented using software, they can be implemented, in whole or in part, in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0306] 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.
[0307] 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.
[0308] 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.
[0309] 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.
[0310] In addition, the functional units in the various embodiments of 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.
[0311] 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, server, or network device, etc.) 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, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0312] 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. A method for drawing an image, characterized in that, The method includes: During the process of drawing the dynamic effect image of the first object, the user's drawing trajectory is acquired in real time. A first image of the first object is displayed at the user's first drawing trajectory point, and a second image of the first object is displayed at the user's second drawing trajectory point, wherein the first image and the second image are generated by the first object, and the shooting angle and / or the motion posture of the first object are different between the first image and the second image.
2. The method according to claim 1, characterized in that, The movement posture of the first object includes the posture of the first object or the expression of the first object.
3. The method according to claim 1 or 2, characterized in that, The size or angle of the first object is also different between the first image and the second image.
4. The method according to any one of claims 1 to 3, characterized in that, Prior to acquiring the user's drawing trajectory in real time, the method further includes: Acquire multiple images of the first object, wherein the shooting angle and / or the motion posture of the first object are different between any two of the multiple images; Generate multiple indices that correspond one-to-one with the multiple images; Before displaying the first image of the first object at the user's first drawing trajectory point, the method further includes: At the first drawing trajectory point, a first index is randomly obtained from the plurality of indices, and a first image of the first object is obtained based on the first index; Render the first image of the first object.
5. The method according to claim 4, characterized in that, Before displaying a second image of the first object at the user's second drawing trajectory point, the method further includes: At the second drawing trajectory point, a second index is randomly obtained from the plurality of indices, and a second image of the first object is obtained based on the second index, wherein the first index and the second index are different; Render the second image of the first object.
6. The method according to claim 4 or 5, characterized in that, Before rendering the first image of the first object, the method further includes: The parameters of the first image of the first object are adjusted, including one or more of jitter parameters, rotation parameters, and offset parameters.
7. The method according to any one of claims 4 to 6, characterized in that, The generation of multiple indexes corresponding one-to-one with the multiple images includes: Obtain multiple storage addresses that correspond one-to-one with the multiple images; Generate multiple indexes that correspond one-to-one with the multiple storage addresses.
8. The method according to any one of claims 4 to 7, characterized in that, Before generating multiple indices that correspond one-to-one with the multiple images, the method further includes: Each of the plurality of images is standardized, wherein the purpose of the standardization is to make the format of the plurality of images uniform; The multiple images are organized into a format that can be loaded all at once.
9. The method according to claim 8, characterized in that, Normalizing the image includes processing the image's size, brightness, and / or color.
10. The method according to claim 8 or 9, characterized in that, The step of organizing the multiple images into a form that can be loaded all at once includes: The multiple images are stitched together to form a large texture image.
11. The method according to any one of claims 4 to 10, characterized in that, The step of acquiring multiple images of the first object includes: Obtain the plurality of images based on the animation of the first object; and / or Obtain the multiple images based on the multiple images of the first object; and / or The plurality of images are obtained based on the video of the first object.
12. The method according to claim 11, characterized in that, The animated images include GIF (Graphics Interchange Format) animated images.
13. An apparatus for drawing images, characterized in that, The device includes: The acquisition module is used to acquire the user's drawing trajectory in real time during the process of drawing the dynamic effect image of the first object; The display module is used to display the first image of the first object at the user's first drawing trajectory point; The display module is further configured to display a second image of the first object at the user's second drawing trajectory point, wherein the first image and the second image are generated by the first object, and the shooting angle and / or the motion posture of the first object are different between the first image and the second image.
14. The apparatus according to claim 13, characterized in that, The movement posture of the first object includes the posture of the first object or the expression of the first object.
15. The apparatus according to claim 13 or 14, characterized in that, The size or angle of the first object is also different between the first image and the second image.
16. The apparatus according to claim 14 or 15, characterized in that, The acquisition module is further configured to acquire multiple images of the first object before acquiring the user's drawing trajectory in real time, wherein the shooting angle and / or the motion posture of the first object are different between any two of the multiple images; The device further includes: The mapping module is used to generate multiple indices that correspond one-to-one with the multiple images; A drawing module is used to randomly obtain a first index from the plurality of indices at the first drawing trajectory point, and obtain a first image of the first object based on the first index; The drawing module is also used to render a first image of the first object.
17. The apparatus according to claim 16, characterized in that, The drawing module is also used for: At the second drawing trajectory point, a second index is randomly obtained from the plurality of indices, and a second image of the first object is obtained based on the second index; Render the second image of the first object.
18. The apparatus according to claim 16 or 17, characterized in that, The device further includes: An adjustment module is used to adjust the parameters of the first image of the first object before rendering the first image of the first object, the parameters including one or more of jitter parameters, rotation parameters, and offset parameters.
19. The apparatus according to any one of claims 16 to 18, characterized in that, The mapping module is specifically used for: Obtain multiple storage addresses that correspond one-to-one with the multiple images; Generate multiple indexes that correspond one-to-one with the multiple storage addresses.
20. The apparatus according to any one of claims 16 to 19, characterized in that, The device further includes: The processing module is used to standardize each of the plurality of images before generating a plurality of indices that correspond one-to-one with the plurality of images, and to regularize the plurality of images into a form that can be loaded at once, wherein the purpose of the standardization process is to make the format of the plurality of images uniform.
21. The apparatus according to claim 20, characterized in that, The standardization process for the image includes processing the size, brightness, and / or color of the image.
22. The apparatus according to claim 20 or 21, characterized in that, The processing module is specifically used for: The multiple images are stitched together to form a large texture image.
23. The apparatus according to any one of claims 16 to 22, characterized in that, The acquisition module is specifically used for: Obtain the plurality of images based on the animation of the first object; and / or Obtain the multiple images based on the multiple images of the first object; and / or The plurality of images are obtained based on the video of the first object.
24. The apparatus according to claim 23, characterized in that, The animated images include GIF (Graphics Interchange Format) animated images.
25. An electronic device, characterized in that, include: One or more processors; One or more memory units; And one or more computer programs, wherein the one or more computer programs are stored in the one or more memories, the one or more computer programs including instructions that, when executed by the one or more processors, cause the electronic device to perform the method as described in any one of claims 1 to 12.
26. A computer-readable storage medium, characterized in that, The storage medium stores a program or instructions that, when executed, implement the method as described in any one of claims 1 to 12.
27. A chip, characterized in that, The chip stores instructions that, when executed, implement the method as described in any one of claims 1 to 12.
28. A computer program product, characterized in that, The computer program product stores a program or instructions that, when executed, implement the method as described in any one of claims 1 to 12.