Image processing method and device, terminal equipment and storage medium

By defining the order of image operations and the input resolution queue during image processing, and automatically configuring basic operation library functions, the high error rate and development difficulty caused by manual parameter input in existing technologies are solved, achieving more efficient and stable image processing.

CN115469977BActive Publication Date: 2026-03-17GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-10
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

In existing technologies, image processing requires cumbersome operations to ensure the correct opening and manipulation of the original image. In particular, during application development, multiple parameters need to be manually input, resulting in a high error rate and significant development difficulty.

Method used

By acquiring the original image to be processed and its corresponding image processing action, at least two image operations with a defined order are identified, and these operations and their input resolutions are added to the operation queue in sequence. The basic operation library functions are used for automatic configuration, avoiding the need for manual parameter input.

Benefits of technology

It reduces the error rate in application development, improves configuration efficiency and accuracy, reduces the risk of memory leaks, and enhances the speed and stability of image processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115469977B_ABST
    Figure CN115469977B_ABST
Patent Text Reader

Abstract

This invention discloses an image processing method, apparatus, terminal device, and storage medium. The method involves acquiring the original image to be processed and its corresponding image processing action; confirming that the image processing action includes at least two sequentially ordered image operations; adding the image operations and their corresponding input resolutions sequentially to an operation queue; the input resolution of the first image operation in the operation queue is the configured resolution of the image processing action; and the input resolutions of subsequent image operations in the operation queue are configured based on the output resolution of the preceding image operation. Based on the image operations and their corresponding resolutions in the operation queue, operation functions in a basic operation library are called sequentially. Each image operation processes either the original image to be processed or the output image of the preceding image operation to obtain the target processed image. By setting simple actions to correctly open and operate the original image, the possibility of application malfunctions is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of image technology, and in particular to image processing methods, apparatus, terminal devices and storage media. Background Technology

[0002] For various terminal devices, especially mobile electronic devices, cameras are a standard feature, and in many applications, the image data captured by cameras is processed to record real-world scenes and transmit real-time images during video communication.

[0003] In the specific image processing process, the format of the raw images captured by the camera is fixed. These formats do not contain information such as the image height, width, and pixel bit depth. When each application actually processes the raw images captured by the camera, it needs to manually input a series of basic image operations and the corresponding processing parameters for each basic image operation according to the action settings of the basic operation library during the application development process in order to correctly open and operate the raw images in the application. Summary of the Invention

[0004] This invention provides an image processing method, apparatus, terminal device, and storage medium to solve the technical problem that existing technologies require cumbersome operations to correctly open and manipulate original images.

[0005] In a first aspect, embodiments of the present invention provide an image processing method, comprising:

[0006] Obtain the original image to be processed and the corresponding image processing action;

[0007] The image processing action is confirmed to include at least two image operations with a defined order. The image operations and their corresponding input resolutions are added to the operation queue in sequence. The input resolution of the first image operation in the operation queue is the configured resolution of the image processing action. The input resolution of the image operations after the first image operation in the operation queue is configured according to the output resolution of the previous image operation.

[0008] Based on the image operations in the operation queue and their corresponding input and output resolutions, the operation functions in the basic operation library are called sequentially. Each image operation processes the original image to be processed or the output image of the previous image operation to obtain the target processed image.

[0009] Secondly, embodiments of the present invention also provide an image processing apparatus, comprising:

[0010] The image action acquisition unit is used to acquire the original image to be processed and the corresponding image processing action.

[0011] An operation queue confirmation unit is used to confirm that the image processing action includes at least two image operations with a defined order, and to add the image operations and their corresponding input resolutions to the operation queue in sequence. The input resolution of the first image operation in the operation queue is the configured resolution of the image processing action, and the input resolution of the image operations after the first image operation in the operation queue is configured according to the output resolution of the previous image operation.

[0012] The operation function calling unit is used to sequentially call the operation functions in the basic operation library according to the image operations in the operation queue and the corresponding input resolution and output resolution. Each image operation processes the original image to be processed or the output image of the previous image operation to obtain the target processed image.

[0013] Thirdly, embodiments of the present invention also provide a terminal device, including:

[0014] One or more processors;

[0015] Memory, used to store one or more programs;

[0016] When the one or more programs are executed by the one or more processors, the terminal device implements the image processing method as described in the first aspect.

[0017] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the image processing method as described in the first aspect.

[0018] The aforementioned image processing method, apparatus, terminal device, and storage medium involve acquiring the original image to be processed and its corresponding image processing action; confirming that the image processing action includes at least two sequentially determined image operations; adding the image operations and their corresponding input resolutions sequentially to an operation queue, where the input resolution of the first image operation in the operation queue is the configured resolution of the image processing action; and configuring the input resolution of subsequent image operations based on the output resolution of the preceding image operation. Based on the image operations in the operation queue and their corresponding input and output resolutions, operation functions in a basic operation library are sequentially called. Each image operation processes either the original image to be processed or the output image of the preceding image operation to obtain the target processed image. By customizing and encapsulating the operation functions in the basic operation library, the output and input resolutions are automatically configured directly between consecutive image operations, avoiding manual input of each parameter during application development. This simple action setting ensures the correct opening and operation of the original image, reducing the possibility of application malfunctions. Attached Figure Description

[0019] Figure 1 This is a flowchart of an image processing method provided in an embodiment of the present invention;

[0020] Figure 2 This is a schematic diagram of the data architecture of an image processing method provided in an embodiment of the present invention;

[0021] Figure 3 This is a schematic diagram of the structure of an image processing device provided in an embodiment of the present invention;

[0022] Figure 4 This is a schematic diagram of the structure of a terminal device provided in an embodiment of the present invention. Detailed Implementation

[0023] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and not for limiting the invention. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention and not the entire structure.

[0024] It should be noted that, due to space limitations, this application specification does not exhaustively list all possible implementation methods. Those skilled in the art should be able to conceive after reading this application specification that, as long as the technical features do not contradict each other, any combination of technical features can constitute an optional implementation method.

[0025] The embodiments are described in detail below.

[0026] Figure 1 This is a flowchart of an image processing method provided in an embodiment of the present invention. The image processing method is used in a terminal device. As shown in the figure, the image processing method includes:

[0027] Step S110: Obtain the original image to be processed and the corresponding image processing action.

[0028] The original image in this solution mainly refers to the initial image captured by the camera. The format of the initial image captured by the camera is commonly NV21 and YUV formats. These image formats do not store information such as the height, width, and pixel depth of the image. When using the original image, the application needs to perform a series of processing on the original image according to its own functional requirements. Each processing requires accurate parameter information. However, when developing the application, the developer can only manually input the action of each processing and the corresponding parameters. Multiple independent manual inputs lead to a high risk of errors and a high possibility of anomalies during application development. For example, to process a 640×480 image in NV21 format by "cropping the edges to 455x480 -> rotating the image 270 degrees clockwise -> scaling the image to 640x480 -> converting the i420 format to NV21 for output", the following steps are required: 1. Allocate memory space; 2. Convert NV21 to i420 format (input and output resolutions); 3. Allocate memory space; 4. Crop the edges to 455×480 (input and output resolutions); 5. Allocate memory space; 6. Rotate the image 270 degrees clockwise (input and output resolutions); 7. Allocate memory space; 8. Scale the image to 640×480 (input and output resolutions); 9. Allocate memory space; 10. Convert the i420 format to NV21 for output (input and output resolutions). The tedious process of allocating memory space is necessary to save the results of graphics processing in each step. Memory space must be allocated strictly according to the size of the output image. Repeatedly configuring the input and output resolutions can also easily lead to application malfunctions.

[0029] In this solution, the image processing operations on the raw image to be processed depend on the functional requirements of the application itself. For example, some real-time communication applications will process the raw image captured by the camera during video chat into a fixed size and format by default, while processing the raw image captured by the camera into another fixed size and format when sharing photos. Further complex operations such as screenshots may also occur during the processing. Existing technologies require multiple specific image operations as described above to achieve the final functional requirements, including setting the order of image operations and manually inputting the parameters for each operation. In this solution, the image processing action only needs to confirm the combination and order of the corresponding image operations. The specific combination and order of image operations are determined by the functional requirements of the application itself. Correspondingly, the more functional requirements there are, the more combinations of image operations there are. Generally, one image processing action only requires one combination of image operations and one corresponding operation order. Based on this, in this solution, developers need to preset the image operations corresponding to the image processing action and the order of the image operations during application development. For example, an image processing action for outputting an image might involve four image operations: "cropping the edges to 455x480 -> rotating the image clockwise by 270 degrees -> scaling the image to 640x480 -> converting the i420 format to NV21 for output." Developers only need to define the four image operations corresponding to this image processing action and their order.

[0030] Step S120: Confirm that the image processing action includes at least two image operations with a defined order, add the image operations and their corresponding input resolutions to the operation queue in sequence, wherein the input resolution of the first image operation in the operation queue is the configured resolution of the image processing action, and the input resolution of the image operations after the first image operation in the operation queue is configured according to the output resolution of the previous image operation.

[0031] All image operations and their related parameters required for an image processing action are added to the operation queue. In particular, the related image operations are automatically configured based on the input resolution, output resolution of the image processing action, or the output resolution of the previous image operation. This avoids application developers having to manually configure the relevant parameters one by one, improving the efficiency and accuracy of configuration and reducing the possibility of errors during application development.

[0032] In specific implementation, step S120 may include steps S121 and S122:

[0033] Step S121: Confirm that the image processing action includes at least two image operations with a defined order;

[0034] Step S122: Determine whether the configured resolution or the output resolution of the previous image operation is the resolution that needs to be preprocessed. If so, insert the preprocessing operation into the operation queue and configure the corresponding input resolution and output resolution; otherwise, use the output resolution of the previous image operation as the input resolution of the subsequent adjacent image operation.

[0035] For each image operation, it may be necessary to preprocess the image data, such as cropping, rotating, or scaling, and then add the corresponding data.

[0036] Step S130: Based on the image operations in the operation queue and the corresponding input and output resolutions, the operation functions in the basic operation library are called sequentially. Each image operation processes the original image to be processed or the output image of the previous image operation to obtain the target processed image.

[0037] Basic operation libraries (such as libyuv) provide basic image operations. During application development, the corresponding image operations can be completed by directly calling the operation functions in these basic operation libraries. This solution does not particularly emphasize what specific processing of image data is required for a certain image transformation, but focuses on improving how to further improve the efficiency of using these image operations and reduce the development difficulty.

[0038] In a specific implementation, step S120 may further include step S123:

[0039] Step S123: Each image operation pre-allocates memory according to the corresponding output resolution to obtain the corresponding memory address, and saves the memory address in the operation queue along with the corresponding image operation.

[0040] Corresponding to step S123, step S130 is specifically implemented through the following steps: each image operation performs image processing based on the corresponding memory address and the cache address of the original image to be processed or the memory address corresponding to the previous image operation.

[0041] As mentioned earlier, existing image processing methods require frequent calls to operation functions in the basic operation library. These frequent function calls lead to frequent memory allocations, slowing down image processing and display and increasing the risk of memory leaks. Therefore, this solution pre-allocates and requests memory for each image operation during the operation queue configuration. During actual image processing, data is obtained directly from the cache address of the original image or the memory address of the previous image operation, and the processed image data is cached at its corresponding cache address. This avoids frequent memory allocation and requests during processing, improving image processing and display speed and reducing the risk of memory leaks.

[0042] Overall, the process of image data acquisition and output can be referenced. Figure 2 Here, "Camera" represents the camera used to capture raw images in NV21 format. The middleware layer receives the raw images and calls underlying operation functions to convert them into NV21 format and output the target image to the HAL (Hardware Abstraction Layer) for processing. Specifically, the middleware layer performs transformations such as cropping, rotation, and scaling. The middleware layer mainly consists of various wrapper classes; in this solution, it's defined as the `yuvUtils` class. The underlying layer primarily uses the raw image operations provided by libyuv. Each image operation is given one or more of the following information: target image pointer, target resolution, raw image pointer, and raw resolution. By executing all image operations sequentially, the image processing action is complete, yielding the corresponding target image. This solution is primarily implemented in the middleware layer. The overall design goal is to bind image operations to their corresponding parameters. Application developers only need to design the operation order of the image processing actions and configure the input and output resolutions of the entire image processing action once. Internally, it automatically pre-allocates memory based on the operation order and uses the output resolution of the previous image operation as the input resolution of the next, avoiding manual parameter configuration. For example, when implementing a certain image processing action, the original image to be processed is first converted from NV21 to i420 format according to the input resolution. Then, each image operation in the operation queue is run. The image operation is run according to the relevant parameters and memory address. The output of each image operation is used as the input of the next image operation until each image operation is completed. Finally, it is converted from i420 to nv21 according to the corresponding resolution to complete the output.

[0043] The above describes the process of obtaining the original image to be processed and its corresponding image processing action; confirming that the image processing action includes at least two sequentially determined image operations; adding the image operations and their corresponding input resolutions sequentially to the operation queue; the input resolution of the first image operation in the operation queue is the configured resolution of the image processing action; and the input resolution of subsequent image operations in the operation queue is configured based on the output resolution of the previous image operation. Based on the image operations in the operation queue and their corresponding input and output resolutions, the operation functions in the basic operation library are called sequentially. Each image operation processes either the original image to be processed or the output image of the previous image operation to obtain the target processed image. By customizing and encapsulating the operation functions in the basic operation library, the output and input resolutions are automatically configured directly between consecutive image operations, avoiding manual input of each parameter during application development. This simple action setting ensures the correct opening and operation of the original image, reducing the possibility of application malfunctions.

[0044] Figure 3 This is a schematic diagram of an image processing apparatus provided in an embodiment of the present invention. (Reference) Figure 3 The image processing device includes: an image motion acquisition unit 210, an operation queue confirmation unit 220, and an operation function call unit 230.

[0045] The image action acquisition unit 210 is used to acquire the original image to be processed and the corresponding image processing action; the operation queue confirmation unit 220 is used to confirm that the image processing action includes at least two image operations with a defined order, and to add the image operations and their corresponding input resolutions to the operation queue in sequence. The input resolution of the first image operation in the operation queue is the configured resolution of the image processing action, and the input resolution of the image operations after the first image operation in the operation queue is configured according to the output resolution of the previous image operation; the operation function calling unit 230 is used to sequentially call the operation functions in the basic operation library according to the image operations in the operation queue and their corresponding input and output resolutions. Each image operation processes the original image to be processed or the output image of the previous image operation to obtain the target processed image.

[0046] Based on the above embodiments, the device further includes:

[0047] An operation sequence preset unit is used to preset the image operations corresponding to the image processing action and the order of the image operations.

[0048] Based on the above embodiments, confirming that the image processing action includes at least two sequentially determined image operations, and adding the image operations and their corresponding input resolutions sequentially to the operation queue, includes:

[0049] The image processing action is confirmed to include at least two sequentially defined image operations;

[0050] Determine whether the configured resolution or the output resolution of the previous image operation is the resolution that needs preprocessing. If so, insert the preprocessing operation into the operation queue and configure the corresponding input and output resolutions; otherwise, use the output resolution of the previous image operation as the input resolution of the subsequent adjacent image operation.

[0051] Based on the above embodiments, the step of confirming that the image processing action includes at least two sequentially determined image operations, adding the image operations and their corresponding input resolutions to the operation queue in sequence, further includes:

[0052] Each image operation pre-allocates memory according to the corresponding output resolution to obtain a corresponding memory address, and saves the memory address in the operation queue as associated with the corresponding image operation.

[0053] Correspondingly, each of the image operations processes the image to be processed or the output image of the previous image operation, specifically as follows:

[0054] Each image operation performs image processing based on the corresponding memory address and the cache address of the original image to be processed or the memory address corresponding to the previous image operation.

[0055] The image processing apparatus provided in this embodiment of the invention is included in the electronic device of the device and can be used to execute any of the image processing methods provided in the above embodiments, and has corresponding functions and beneficial effects.

[0056] It is worth noting that in the embodiments of the above image processing device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy distinction between each other and are not used to limit the scope of protection of the present invention.

[0057] Figure 4 This is a schematic diagram of the structure of a terminal device provided in an embodiment of the present invention. Figure 4 As shown, the terminal device includes a processor 310, a memory 320, an input device 330, an output device 340, and a communication device 350; the number of processors 310 in the terminal device can be one or more. Figure 4Taking a processor 310 as an example; the processor 310, memory 320, input device 330, output device 340, and communication device 350 in the terminal device can be connected via a bus or other means. Figure 4 Taking the example of a connection between China and Israel via a bus.

[0058] The memory 320, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the image processing method in this embodiment of the invention (e.g., the image motion acquisition unit 210, the operation queue confirmation unit 220, and the operation function call unit 230 in the image processing device). The processor 310 executes various functional applications and data processing of the terminal device by running the software programs, instructions, and modules stored in the memory 320, thereby implementing the aforementioned image processing method.

[0059] The memory 320 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the terminal device. Furthermore, the memory 320 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 320 may further include memory remotely located relative to the processor 310, which can be connected to the terminal device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0060] Input device 330 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the terminal device. Output device 340 may include display devices such as a display screen.

[0061] The aforementioned terminal device includes an image processing unit, which can be used to execute any image processing method and has corresponding functions and beneficial effects.

[0062] This invention also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform relevant operations in the image processing method provided in any embodiment of this application, and have corresponding functions and beneficial effects.

[0063] Those skilled in the art will understand that embodiments of this application may be provided as methods, systems, or computer program products.

[0064] Therefore, this application may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, produce implementations of the flowchart... Figure 1 One or more processes and / or boxes Figure 1 The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0065] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory. Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0066] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0067] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0068] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. An image processing method, characterized by, include: Obtain the original image to be processed and the corresponding image processing action; The image processing action is confirmed to include at least two image operations with a defined order. The image operations and their corresponding input resolutions are added to the operation queue in sequence. The input resolution of the first image operation in the operation queue is the configured resolution of the image processing action. The input resolution of the image operations after the first image operation in the operation queue is configured according to the output resolution of the previous image operation. Based on the image operations in the operation queue and the corresponding input and output resolutions, the operation functions in the basic operation library are called sequentially. Each image operation processes the original image to be processed or the output image of the previous image operation to obtain the target processed image. The step of confirming that the image processing action includes at least two sequentially determined image operations, adding the image operations and their corresponding input resolutions to the operation queue in sequence, further includes: Each image operation pre-allocates memory according to the corresponding output resolution to obtain a corresponding memory address, and saves the memory address in the operation queue as associated with the corresponding image operation. Each of the image operations processes the image to be processed or the output image of the previous image operation, specifically as follows: Each image operation performs image processing based on the corresponding memory address and the cache address of the original image to be processed or the memory address corresponding to the previous image operation.

2. The method of claim 1, wherein, Before acquiring the original image to be processed and the corresponding image processing action, the process also includes: The image operations corresponding to the image processing actions and the order of the image operations are preset.

3. The method of claim 1, wherein, The confirmation that the image processing action includes at least two sequentially determined image operations, and adding the image operations and their corresponding input resolutions sequentially to the operation queue, includes: The image processing action is confirmed to include at least two sequentially defined image operations; Determine whether the configured resolution or the output resolution of the previous image operation is the resolution that needs preprocessing. If so, insert the preprocessing operation into the operation queue and configure the corresponding input and output resolutions; otherwise, use the output resolution of the previous image operation as the input resolution of the subsequent adjacent image operation.

4. An image processing apparatus, characterized in that, include: The image action acquisition unit is used to acquire the original image to be processed and the corresponding image processing action. An operation queue confirmation unit is used to confirm that the image processing action includes at least two image operations with a defined order, and to add the image operations and their corresponding input resolutions to the operation queue in sequence. The input resolution of the first image operation in the operation queue is the configured resolution of the image processing action, and the input resolution of the image operations after the first image operation in the operation queue is configured according to the output resolution of the previous image operation. The operation function calling unit is used to sequentially call the operation functions in the basic operation library according to the image operations in the operation queue and the corresponding input resolution and output resolution. Each image operation processes the original image to be processed or the output image of the previous image operation to obtain the target processed image. The confirmation that the image processing action includes at least two sequentially determined image operations, adding the image operations and their corresponding input resolutions sequentially to the operation queue, further includes: Each image operation pre-allocates memory according to the corresponding output resolution to obtain a corresponding memory address, and saves the memory address in the operation queue as associated with the corresponding image operation. Correspondingly, each of the image operations processes the image to be processed or the output image of the previous image operation, specifically as follows: Each image operation performs image processing based on the corresponding memory address and the cache address of the original image to be processed or the memory address corresponding to the previous image operation.

5. The apparatus according to claim 4, characterized in that, The device further includes: An operation sequence preset unit is used to preset the image operations corresponding to the image processing action and the order of the image operations.

6. The apparatus according to claim 4, characterized in that, The confirmation that the image processing action includes at least two sequentially determined image operations, and adding the image operations and their corresponding input resolutions sequentially to the operation queue, includes: The image processing action is confirmed to include at least two sequentially defined image operations; Determine whether the configured resolution or the output resolution of the previous image operation is the resolution that needs preprocessing. If so, insert the preprocessing operation into the operation queue and configure the corresponding input and output resolutions; otherwise, use the output resolution of the previous image operation as the input resolution of the subsequent adjacent image operation.

7. A terminal device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the terminal device implements the image processing method as described in any one of claims 1-3.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the image processing method as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Computer program, image processing method, and image processing apparatus

    US20200184693A1