Image processing methods and apparatus, chips and electronic devices
By employing an iterative image smoothing method, different regions of the image can be processed flexibly, thus solving the problem of limited computing resources and improving the smoothing effect and efficiency.
Patent Information
- Application Number
- CN202211026150.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-25
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2042-08-25
AI Technical Summary
In existing technologies, image smoothing processes treat the entire image area uniformly, resulting in wasted computation and space. Especially when computing resources are limited, it is impossible to effectively address the smoothing needs of different areas.
An iterative image smoothing method is adopted, which divides the image into multiple image blocks according to the region, processes them one by one, and sets block overlap between different iterations to reduce smoothing traces.
It improves the flexibility and efficiency of image smoothing processing, reduces the demand for computing resources, is suitable for scenarios with limited computing space, and improves image quality.
Smart Images

Figure CN115375578B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer vision, specifically to image processing methods and apparatus, chips, and electronic devices. Background Technology
[0002] Currently, image smoothing processing typically involves smoothing the entire image region at once, ensuring that each region of the image incurs the same computational cost (e.g., the computational cost of the image smoothing algorithm) and occupies the same computational space (e.g., the storage space required during image smoothing).
[0003] When it is necessary to improve the image smoothing effect, this method of smoothing the image along the entire region will require more computation and more computing space.
[0004] However, compared to some important regions of the image (such as non-edge regions or regions of interest (ROIs), some less important regions (such as edge regions or non-ROIs) may not require better image smoothing. Therefore, this approach wastes computational resources and space. Especially when computational resources and space are limited, this approach has certain shortcomings. Therefore, further research is needed on image smoothing processing. Summary of the Invention
[0005] This application provides an image processing method, apparatus, chip, and electronic device to address the problem of image smoothing for different regions of an image.
[0006] Firstly, this application provides an image processing method, including...
[0007] The target image is subjected to multiple iterative image smoothing processes according to different regions;
[0008] The iterative image smoothing process refers to performing the next image smoothing process based on the result of the previous image smoothing process.
[0009] Each iterative image smoothing process includes the following steps: First, the target image is divided into image blocks for different regions, and the divided image blocks are arranged into an image block arrangement so that one region corresponds to one image block arrangement. Then, the image blocks in the same image block arrangement are processed one by one until all the image blocks in the same image block arrangement are processed to obtain the image smoothing result.
[0010] The image blocks corresponding to the same region under different iterations of image smoothing processing overlap.
[0011] As can be seen, to address the problem of image smoothing for different regions of an image, this embodiment of the application can perform multiple iterative image smoothing processes on the target image (which can be the image requiring image smoothing) according to different regions. This iterative image smoothing process involves performing the next image smoothing process based on the result of the previous one. In this way, this embodiment of the application can flexibly adjust the number of iterative image smoothing processes according to different regions, thereby not only achieving image smoothing for different regions of the image but also improving the flexibility of image smoothing. Furthermore, multiple iterative image smoothing processes also help improve the image smoothing effect.
[0012] Secondly, in each iterative image smoothing process, this embodiment of the application can divide the target image into image blocks for different regions to obtain an image block arrangement corresponding to each region. Then, the image blocks in the image block arrangement are processed one by one until all image blocks in the image block arrangement have been processed. In this way, compared with the method of smoothing the entire image region at once, dividing the image into multiple image blocks according to regions and smoothing the image blocks one by one in sequence can reduce the computational space required, thus making it suitable for scenarios with limited computational space.
[0013] Finally, since the image smoothing process in this embodiment is performed on image blocks one by one in each iteration, a certain smoothing mark will be generated at the intersection between each pair of image blocks after processing. Therefore, setting a certain overlap between image blocks in different iterations of image smoothing can help reduce these smoothing marks.
[0014] Secondly, an image processing apparatus according to this application includes:
[0015] The processing unit is used to perform multiple iterative image smoothing processes on the target image according to different regions; wherein, the iterative image smoothing process refers to performing the next image smoothing process based on the result of the previous image smoothing process;
[0016] In each of the iterative image smoothing processes, the processing unit is used to: firstly divide the target image into image blocks for different regions, and the divided image blocks form an image block arrangement so that one region corresponds to one image block arrangement; then, perform image smoothing processing on the image blocks in the same image block arrangement one by one, until all the image blocks in the same image block arrangement are processed to obtain the image smoothing processing result.
[0017] The image blocks corresponding to the same region under different iterations of image smoothing processing overlap.
[0018] Thirdly, this application provides a chip comprising a processing unit, a first storage unit, and a storage unit access unit; wherein...
[0019] The processing unit is used to perform multiple image smoothing processes on the target image according to different regions. The iterative image smoothing process refers to performing the next image smoothing process based on the result of the previous image smoothing process.
[0020] In each of the iterative image smoothing processes, the processing unit is configured to: firstly divide the target image into image blocks for different regions, and arrange the divided image blocks into an image block arrangement such that one region corresponds to one image block arrangement; wherein, the image blocks of the image block arrangements corresponding to the same region in different iterative image smoothing processes overlap; store the divided image blocks in a second storage unit; control the storage unit access unit to sequentially transfer the image blocks in the same image block arrangement to the first storage unit one by one for image smoothing processing, until all image blocks in the same image block arrangement are processed to obtain the image smoothing result; control the storage unit access unit to sequentially transfer each image block after image smoothing processing to the second storage unit.
[0021] The first storage unit is used to store image blocks in the same image block arrangement on a unit basis; wherein, the storage space of the first storage unit is smaller than that of the second storage unit, and the read / write speed of the first storage unit is higher than that of the second storage unit.
[0022] The storage unit access unit is used to sequentially transfer image blocks from the same image block arrangement from the second storage unit to the first storage unit one by one, and to sequentially transfer each image block after image smoothing to the second storage unit.
[0023] Fourthly, an electronic device according to this application includes the chip described in the third aspect above.
[0024] Fifthly, this application provides a computer-readable storage medium, wherein a computer program or instructions are stored on the computer-readable storage medium, and when executed by a processor, the computer program or instructions implement the steps of the method designed in the first aspect above.
[0025] The sixth aspect is a computer program product of this application, comprising a computer program or instructions, wherein when the computer program or instructions are executed by a processor, they implement the steps of the method designed in the first aspect above.
[0026] The beneficial effects of the technical solutions in the second to sixth aspects can be found in the technical effects of the technical solution in the first aspect, and will not be repeated here. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below.
[0028] Figure 1 This is a schematic flowchart of an image processing method according to an embodiment of this application;
[0029] Figure 2 This is a schematic diagram of the structure of the non-edge region and the edge region of an image according to an embodiment of this application;
[0030] Figure 3 This is a schematic diagram of the structure of a non-ROI and ROI of an image according to an embodiment of this application;
[0031] Figure 4 This is a schematic diagram of an image block arrangement according to an embodiment of this application;
[0032] Figure 5 This is a schematic diagram of an image filtering process according to an embodiment of this application;
[0033] Figure 6 This is a schematic diagram of another image filtering process according to an embodiment of this application;
[0034] Figure 7 This is a schematic diagram of the structure of a target image under different conditions according to an embodiment of this application;
[0035] Figure 8 This is a schematic diagram of the structure of a target image under different conditions according to an embodiment of this application;
[0036] Figure 9 This is a schematic diagram of the structure of image block arrangement under different conditions according to an embodiment of this application;
[0037] Figure 10 This is a structural schematic diagram illustrating the degree of overlap between image blocks in different situations according to an embodiment of this application;
[0038] Figure 11 This is a functional unit block diagram of an image device according to an embodiment of this application;
[0039] Figure 12 This is a schematic diagram of the structure of a chip according to an embodiment of this application. Detailed Implementation
[0040] To help those skilled in the art better understand the technical solutions of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the description of the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0041] It should be understood that the terms "first," "second," etc., used in the embodiments of this application are used to distinguish different objects, rather than to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, software, product, or device that includes a series of steps or units is not limited to the listed steps or units, but also includes steps or units not listed, or other steps or units inherent to these processes, methods, products, or devices.
[0042] The term "embodiment" as used in the embodiments of this application means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0043] In the embodiments of this application, "and / or" describes the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent the following three situations: A exists alone; A and B exist simultaneously; B exists alone. Among them, A and B can be singular or plural.
[0044] In this embodiment, the symbol " / " can indicate that the preceding and following objects are in an "or" relationship. Alternatively, the symbol " / " can also represent a division sign, i.e., performing a division operation. For example, A / B can mean A divided by B.
[0045] In this embodiment, the symbols “*” or “·” can represent multiplication, i.e., performing a multiplication operation. For example, A*B or A·B can represent A multiplied by B.
[0046] In the embodiments of this application, "at least one item" or its similar expression refers to any combination of these items, including any combination of a single item or a plurality of items. "One or more" means one or more items, while "multiple" means two or more. For example, "at least one item" of a, b, and c can represent the following seven cases: a, b, c; a and b; a and c; b and c; a, b, and c. Each of a, b, and c can be an element or a set containing one or more elements.
[0047] In the embodiments of this application, "equal to" can be used with "greater than" and is applicable to technical solutions used when "greater than" is used; it can also be used with "less than" and is applicable to technical solutions used when "less than" is used. When "equal to" is used with "greater than", it is not used with "less than"; when "equal to" is used with "less than", it is not used with "greater than".
[0048] Currently, image smoothing processing typically involves smoothing the entire image region at once, ensuring that each region of the image incurs the same computational cost (e.g., the computational cost of the image smoothing algorithm) and occupies the same computational space (e.g., the storage space required during image smoothing).
[0049] When it is necessary to improve the image smoothing effect, this method of smoothing the image along the entire region will require more computation and more computing space.
[0050] However, compared to some important regions of the image (such as non-edge regions or ROIs), some less important regions (such as edge regions or non-ROIs) may not require better image smoothing. Therefore, this approach wastes computational resources and space. Especially when computational resources and space are limited, this approach has certain shortcomings. Therefore, it is necessary to perform image smoothing processing on different regions of the image.
[0051] Therefore, in order to solve the problem of image smoothing processing for different regions of an image, this application discloses an image processing method to achieve image smoothing processing for different regions of an image. This method can be applied to electronic devices, chips, devices, etc.
[0052] The electronic devices, chips, and related concepts involved in the embodiments of this application will be described in detail below.
[0053] I. Electronic Equipment
[0054] 1. Description
[0055] The electronic device described in the embodiments of this application can be an entity / unit / module / device, etc., with communication functions for sending and receiving.
[0056] In some possible implementations, the electronic device can be a handheld device, an in-vehicle device, a wearable device, an augmented reality (AR) device, a virtual reality (VR) device, an Internet of Things (IoT) device, a projection device, a projector, or other devices connected to a wireless modem. It can also be user equipment (UE), a terminal device, a terminal, a mobile terminal, a smartphone, a smart screen, a smart TV, a smartwatch, a laptop, a smart speaker, a camera, a game controller, a microphone, a station (STA), an access point (AP), a mobile station (MS), a personal digital assistant (PDA), a personal computer (PC), or a relay device, etc.
[0057] For example, taking wearable devices as an example, these wearable devices, also known as smart wearable devices, are a general term for intelligent devices that utilize wearable technology to intelligently design and develop everyday wearables. Examples include smart glasses, smart gloves, smartwatches, various smart bracelets with specific feature monitoring, and smart jewelry. These wearable devices can be worn directly on the body or integrated into the user's clothing or accessories; they are portable devices. These wearable devices can not only utilize dedicated hardware architectures but also dedicated software architectures for data interaction and cloud interaction. These wearable smart devices can achieve complete or partial functionality without relying on other smart devices.
[0058] In some possible implementations, the electronic device described in this application embodiment may include at least one of a chip, a storage component, a sensing component, a display component, a camera component, and an input driver. Exemplary examples are provided below.
[0059] 2. Chip
[0060] In some possible implementations, the chip can be used to run or add an operating system, which can be any one or more computer operating systems that implement business processing through processes. Examples include Linux, Unix, Android, iOS, Windows, Zephyr, Real-Time Operating System (RTOS), DOS, Mac, ThreadX, embedded operating systems, and Nucleus Plus.
[0061] In some possible implementations, the chip can be a complete system-on-a-chip (SOC).
[0062] In some possible implementations, the chip can be a processor.
[0063] In some possible implementations, the chip may include one or more processing units. For example, a processing unit may include at least one of the following: digital signal processor (DSP), central processing unit (CPU), application processor (AP), microcontroller unit (MCU), single-chip microcomputer (SCM), microcontroller, graphics processing unit (GPU), image signal processor (ISP), controller, field-programmable gate array (FPGA), application-specific integrated circuit (ASIC), baseband processor, neural-network processing unit (NPU), etc. The different processing units may be separate or integrated together.
[0064] In some possible implementations, a processing unit can be a single core or multiple cores.
[0065] In some possible implementations, a processing unit can run or load a multi-core subsystem. This multi-core subsystem can be an operating system with multi-core processing capabilities.
[0066] In some possible implementations, the chip may also include memory cells for storing computer programs or instructions.
[0067] For example, a chip can call programs stored in its memory to run an operating system.
[0068] For example, memory cells in a chip can store or cache instructions that the processor has just used or that are used repeatedly. If the processor needs to use the instruction or data again, it can retrieve it directly from the memory, thereby avoiding repeated accesses, reducing processor wait time, and improving system efficiency.
[0069] For example, the storage units in a chip can be used to save / cache / store images and synchronize or transmit images to other chips for execution. These storage units can include at least one of the following: random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), compact disc read-only memory (CD-ROM), double data rate synchronous dynamic random access memory (DDR SDRAM), and tightly coupled memory (TCM).
[0070] In some possible implementations, the chip may include one or more communication interfaces. These communication interfaces may include at least one of the following: Serial Peripheral Interface (SPI), Inter-Integrated Circuit (I2C) interface, Inter-Integrated Circuit Sound (I2S) interface, Pulse Code Modulation (PCM) interface, Universal Asynchronous Receiver / Transmitter (UART) interface, Mobile Industry Processor Interface (MIPI), General-Purpose Input / Output (GPIO) interface, Subscriber Identity Module (SIM) interface, and Universal Serial Bus (USB) interface.
[0071] 3. Storage components
[0072] In the embodiments of this application, the storage component can be used to store data, and the storage component can also be referred to as a memory.
[0073] In some possible implementations, the storage component may include at least one of RAM, ROM, EPROM, CD-ROM, SDRAM, DDR SDRAM, TCM, etc.
[0074] 4. Sensing components
[0075] In some possible implementations, the sensing component can be a sensor.
[0076] For example, the sensing components may include at least one of the following: gravity sensor, gyroscope sensor, magnetometer sensor, accelerometer sensor, inertial sensor (such as inertial motion unit (IMU)), pressure sensor, barometric pressure sensor, distance sensor, proximity sensor, fingerprint sensor, temperature sensor, touch sensor, ambient light sensor, bone conduction sensor, ultra-wideband (UWB) sensor, near field communication (NFC) sensor, laser sensor, and / or visible light sensor.
[0077] 5. Display components
[0078] In some possible implementations, the display component can be used to display at least one of the following: user interface, user interface elements and features, user selectable controls, various displayable objects, etc.
[0079] In some possible implementations, the display component can be at least one of a display screen, a touch screen, etc.
[0080] For example, the display component may include a display panel. The display panel may employ liquid crystal display (LCD), organic light-emitting diode (OLED), active-matrix organic light-emitting diode (AMOLED), flexible light-emitting diode (FLED), quantum dot light-emitting diodes (QLED), etc.
[0081] It should be noted that the device can implement display functions through GPUs, display components, and processors. The GPU can be used to perform mathematical and geometric calculations and to perform graphics rendering. Additionally, the GPU can be a microprocessor for image processing and connects to the display components and the processor. The processor can include one or more GPUs, which execute program instructions to generate or modify display information.
[0082] 6. Camera components
[0083] In some possible implementations, the camera component can be a camera or camera module, which is used to capture (shoot / scan / acquire, etc.) still / moving images or videos.
[0084] In some possible implementations, the camera assembly may include a lens, a photosensitive element, etc., and the photosensitive element may be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
[0085] Therefore, an object can generate an optical image through the lens and project it onto the photosensitive element. The photosensitive element can convert the light signals in this optical image into electrical signals, and then pass these electrical signals to the ISP (Image Signal Processor) for conversion into digital image signals. The ISP outputs this digital image signal to the DSP (Digital Signal Processor). The DSP converts this digital image signal into image signals in standard formats such as RGB and YUV.
[0086] In some possible implementations, the camera component can be a front-facing camera.
[0087] It should be noted that the device can achieve functions such as capturing (shooting / scanning) images through ISP, DSP, camera components, video codecs, GPU, display components, and processors.
[0088] In some possible implementations, the ISP can be used to process data fed back from the camera component. For example, when taking a picture, the shutter is first opened, and then light passes through the lens of the camera component to the image sensor of the camera component, realizing the conversion of light signals into electrical signals. Finally, the image sensor transmits the electrical signals to the ISP for processing to convert them into digital images, etc.
[0089] In some possible implementations, the ISP can also perform algorithmic optimizations on image noise, brightness, and skin tone.
[0090] In some possible implementations, the ISP can also optimize parameters such as exposure and color temperature of the shooting scene.
[0091] In some possible implementations, the ISP and / or DSP can be set in the camera assembly.
[0092] 7. Input driver
[0093] In some possible implementations, the input driver can be used to handle various inputs from user-operated devices.
[0094] For example, when the display is a touchscreen, the input driver can operate to detect and process various touch inputs and / or touch events. Touch inputs or touch events on the touchscreen simultaneously indicate the area of interest and initiate scanning of an object (such as a document). The object can be displayed on the touchscreen as a preview of the image to be scanned, and touch events at specific locations on the touchscreen indicate the image that should be scanned.
[0095] 8. Examples of hardware and software architecture of electronic devices
[0096] For example, the hardware and software architecture of an electronic device may include a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on top of the operating system layer.
[0097] In some possible implementations, this hardware layer may include hardware such as chips, memory management units (MMUs), and memory (also known as storage).
[0098] In some possible implementations, the memory can be used to store software programs / computer programs / computer instructions / data, etc., and may include a program storage area and a data storage area. The program storage area can be used to store software programs / computer programs / computer instructions required by the operating system or at least one function, and the software programs / computer programs / computer instructions required by the at least one function can be used to execute the technical solutions involved in the embodiments of this application; the data storage area can be used to store images, etc., involved in the embodiments of this application.
[0099] It should be noted that the embodiments of this application do not specifically limit the structure of the executing entity of the image processing method, as long as it can be processed by running a computer program or instructions that record the method provided in the embodiments of this application, and by performing processing according to the method provided in the embodiments of this application. For example, the executing entity of the method provided in the embodiments of this application can be an electronic device, or a chip / processor / device / module / unit in an electronic device that can call and execute computer programs or instructions, etc., without specific limitations.
[0100] II. Exemplary Description of an Image Processing Method
[0101] The following is an exemplary description of an image processing method according to an embodiment of this application.
[0102] like Figure 1 As shown, Figure 1 This is a flowchart illustrating an image processing method according to an embodiment of this application. The method may specifically include the following steps:
[0103] S110. Perform multiple iterative image smoothing processes on the target image according to different regions; wherein, the iterative image smoothing process refers to performing the next image smoothing process based on the result of the previous image smoothing process.
[0104] Each iteration of the image smoothing process includes the following steps: First, the image blocks are divided into different regions of the target image, and the divided image blocks are arranged into an image block arrangement so that one region corresponds to one image block arrangement. Then, the image blocks in the same image block arrangement are processed one by one until all the image blocks in the same image block arrangement are processed to obtain the image smoothing result.
[0105] The image blocks corresponding to the same region under different iterations of image smoothing processing overlap.
[0106] As can be seen, to address the problem of image smoothing for different regions of an image, this embodiment of the application can perform multiple iterative image smoothing processes on the target image (which can be the image requiring image smoothing) according to different regions. This iterative image smoothing process involves performing the next image smoothing process based on the result of the previous one. In this way, this embodiment of the application can flexibly adjust the number of iterative image smoothing processes according to different regions, thereby not only achieving image smoothing for different regions of the image but also improving the flexibility of image smoothing. Furthermore, multiple iterative image smoothing processes also help improve the image smoothing effect.
[0107] Secondly, in each iterative image smoothing process, this embodiment of the application can divide the target image into image blocks for different regions to obtain an image block arrangement corresponding to each region. Then, the image blocks in the image block arrangement are processed one by one until all image blocks in the image block arrangement have been processed. In this way, compared with the method of smoothing the entire image region at once, dividing the image into multiple image blocks according to regions and smoothing the image blocks one by one in sequence can reduce the computational space required, thus making it suitable for scenarios with limited computational space.
[0108] Finally, since the image smoothing process in this embodiment is performed on image blocks one by one in each iteration, a certain smoothing mark will be generated at the intersection between each pair of image blocks after processing. Therefore, setting a certain overlap between image blocks in different iterations of image smoothing can help reduce these smoothing marks.
[0109] The following section will explain some of the implementation methods involved. For other content not covered, please refer to the above description for details, which will not be repeated here.
[0110] 1. Target image
[0111] It should be noted that the target image can refer to the image that needs to undergo image smoothing processing in the embodiments of this application. Of course, other terms can also be used for description, and there is no limitation thereto.
[0112] 2. Different regions of the target image
[0113] It should be noted that, according to requirements or specifications, the target image can be divided into multiple different regions, which may be important or unimportant regions. Important regions may include non-edge regions or Regions of Interest (ROIs), while unimportant regions may include edge regions or non-ROI regions. Thus, this embodiment of the application can perform image smoothing processing according to the different regions.
[0114] For example, taking non-edge regions and edge regions as examples, such as Figure 2 As shown, image 210 may include non-edge regions and edge regions.
[0115] For example, taking non-ROI and ROI as examples, such as Figure 3 As shown, image 310 may include non-ROI and ROI.
[0116] 3. Iterative image smoothing processing
[0117] It should be noted that images may be affected by interference during acquisition, processing, and transmission, resulting in noise, which is a type of erroneous signal. Noise causes image coarseness, thus requiring image smoothing. Therefore, image smoothing can eliminate noise and improve image quality.
[0118] This application embodiment can perform multiple iterative image smoothing processes on the same region of a target image. The iterative image smoothing process refers to performing the next image smoothing process based on the result of the previous one.
[0119] In other words, the embodiments of this application can perform multiple image smoothing processes on the same region of the target image, and the image smoothing processes are iterative with each other.
[0120] It's important to note that iteration can be a repetitive feedback process, typically aimed at approximating a desired goal or result. Each repetition of the process can be called an "iteration," and the result of each iteration serves as the initial value for the next iteration. In other words, the next iteration is performed based on the result of the previous iteration.
[0121] For example, in Figure 2 In this application embodiment, multiple iterative image smoothing processes can be performed on edge regions and non-edge regions.
[0122] For example, in Figure 3 In this application embodiment, multiple iterative image smoothing processes can be performed on ROIs and multiple iterative image smoothing processes can be performed on non-ROIs.
[0123] 4. Steps included in each iterative image smoothing process
[0124] 1) Description
[0125] It should be noted that each iteration of image smoothing processing in this application embodiment may include the following steps:
[0126] First, the image block is divided into different regions of the target image, and the resulting image blocks are arranged into an image block layout so that one region corresponds to one image block layout.
[0127] Then, image smoothing is performed on each image block in the same image block arrangement one by one until all image blocks in the same image block arrangement have been processed to obtain the image smoothing result.
[0128] In this way, compared to smoothing the entire image region at once, smoothing the image according to different regions, dividing each region into multiple image blocks, and then smoothing each image block one by one, requires very little computational space, making it suitable for scenarios with limited computational space.
[0129] 2) Image block arrangement
[0130] It should be noted that when multiple iterative image smoothing processes are required for a certain region, the embodiments of this application require the region to be divided into image blocks in each iterative image smoothing process.
[0131] Since each of the resulting image blocks has a different location, these blocks can be arranged into an image block layout for ease of description and explanation. Thus, this region can correspond to an image block layout.
[0132] For example, in Figure 3 On the basis of, such as Figure 4 As shown, in a certain iterative image smoothing process for the ROI of image 310, the embodiment of this application divides the ROI of image 310 into image blocks, and the image blocks obtained by these divisions have certain arrangement or distribution rules, thereby obtaining an image block arrangement.
[0133] It should be noted that each image block can include multiple rows of pixels and multiple columns of pixels. The size of the image block can be represented by the number of rows of pixels and the number of columns of pixels.
[0134] In some possible implementations, the individual image blocks in the same image block arrangement may not overlap with each other.
[0135] It is understandable that in a single iterative image smoothing process targeting a specific region of the target image, the resulting image patches for that region are non-overlapping. This avoids dependencies between image patches when performing image smoothing on those patches.
[0136] In some possible implementations, all image blocks in the same image block arrangement have the same size.
[0137] It is understandable that in a certain iterative image smoothing process targeting a certain region of the target image, the image blocks obtained by dividing that region have the same size, which facilitates the processing between image blocks.
[0138] 3) Perform image smoothing processing on each image block in the same image block arrangement one by one.
[0139] It should be noted that the image smoothing process in this embodiment is performed sequentially, one image block at a time. That is, image smoothing is performed on the next image block only after the previous image block has been processed.
[0140] In addition, the embodiments of this application require the use of an image smoothing algorithm to perform image smoothing processing on each image block in the same image block arrangement.
[0141] In some possible implementations, the image smoothing algorithm may include at least one of mean filtering, box filtering, Gaussian filtering, median filtering, bilateral filtering, etc.
[0142] In some possible implementations, the image smoothing algorithm may include Fast Global Image Smoothing (FGS).
[0143] In some possible implementations, the image smoothing algorithm may include the following steps: first, filter each row pixel of an image block arranged in the same image block arrangement, row by row, until all row pixels are filtered; then, filter each column pixel of the same image block, column by column, until all column pixels are filtered.
[0144] In other words, image smoothing can be performed on image blocks in the same image block arrangement one by one. This can include: first, filtering each row pixel of an image block in the same image block arrangement one row at a time until all row pixels are filtered; then, filtering each column pixel of an image block one column at a time until all column pixels are filtered.
[0145] As can be seen, when performing image smoothing processing on an image block, compared to filtering on a pixel-by-pixel basis, the embodiments of this application can improve filtering efficiency by filtering each row pixel on a row-by-row basis (or filtering each column pixel on a column-by-column basis).
[0146] In addition, compared to filtering only each row pixel or each column pixel, the embodiments of this application can improve the filtering effect by filtering each row pixel first and then each column pixel.
[0147] For example, such as Figure 5 As shown, image block 501 is filtered row by row, pixel by pixel, until all row pixels are filtered, resulting in image block 502. Then, image block 502 is filtered column by column, pixel by pixel, until all column pixels are filtered, finally resulting in image block 503.
[0148] Of course, in this embodiment, after performing the first row and column filtering on an image patch, a second row and column filtering can be performed iteratively. The number of iterations can be set according to requirements or specifications. In this way, by performing multiple iterations on an image patch, image smoothing efficiency can be improved.
[0149] For example, such as Figure 6 As shown, image block 601 is filtered row by row, pixel by pixel, until all row pixels are filtered, resulting in image block 602. Then, image block 602 is filtered column by column, pixel by pixel, until all column pixels are filtered. Next, the next iteration is performed, and in the next iteration, both row and column pixel filtering are performed in the same way.
[0150] In some possible implementations, the image smoothing algorithm may include the following steps: first, filter each column pixel of an image block arranged in the same image block arrangement, column by column, until all column pixels are filtered; then, filter each row pixel of an image block, row by row, until all row pixels are filtered.
[0151] In other words, image smoothing can be performed on image blocks in the same image block arrangement one by one. This can include: first, filtering each column pixel of an image block in the same image block arrangement column by column until all column pixels are filtered; then, filtering each row pixel of an image block row by row until all row pixels are filtered.
[0152] As can be seen, similarly to the above, when performing image smoothing processing on an image block, compared to filtering on a pixel-by-pixel basis, this embodiment of the application can improve filtering efficiency by filtering each column pixel on a column-by-column basis (or filtering each row pixel on a row-by-row basis). Furthermore, compared to filtering only each row pixel or each column pixel, this embodiment of the application can improve the filtering effect by first filtering each column pixel and then each row pixel.
[0153] 5. Image blocks in the same region overlap under different iterations of image smoothing processing.
[0154] It should be noted that during each iteration of image smoothing for the same region, since the image blocks are smoothed one by one, a certain smoothing trace will be generated at the intersection between every two image blocks after processing.
[0155] For example, such as Figure 7 The above, Figure 7 (a) represents the target image; Figure 7 (b) indicates that it is aimed at Figure 7 The image after smoothing the entire region of the target image represented by (a); Figure 7 (c) indicates that it is for Figure 7 The image after one iteration of image smoothing is performed on different regions of the target image represented by (a); Figure 7 (d) is for Figure 7 The image represented by (c) is marked with smoothing marks. It can be seen that, in Figure 7 In the image represented by (d), a certain smoothing mark is produced at the intersection of every two image blocks.
[0156] For example, such as Figure 8 As shown, Figure 8 (a) represents the target image; Figure 8 (b) indicates that it is aimed at Figure 8 The image block arrangement corresponding to the region of the target image represented by (a) under one iteration of the image smoothing process; Figure 8 (c) indicates that Figure 8 The image in (b) is the result of image smoothing processed one image at a time in the image block arrangement. Figure 8 (d) is for Figure 8 The image represented by (c) is marked with smoothing marks. It can be seen that, in Figure 8 In the image represented by (d), a certain smoothing mark is produced at the intersection of every two image blocks.
[0157] To reduce these smoothing marks, embodiments of this application can set overlapping of image blocks between the image block arrangements corresponding to different iterations of image smoothing processing for the same region.
[0158] For example, such as Figure 9 As shown, Figure 9 (a) represents the image block arrangement corresponding to a region of the target image under the first iterative image smoothing process; Figure 9 (b) represents the image block arrangement corresponding to this region under the second iteration of image smoothing processing; Figure 9 (c) represents the image block arrangement corresponding to this region under the third iteration of image smoothing processing; Figure 9 (d) indicates that the image block arrangement corresponding to the region under the first iteration of image smoothing processing overlaps with the image block arrangement corresponding to the second iteration of image smoothing processing. Figure 9 (e) indicates that the image block arrangement corresponding to the region under the second iteration of image smoothing process overlaps with the image block arrangement corresponding to the third iteration of image smoothing process.
[0159] 6. The number of iterative image smoothing processes performed on different regions of the target image.
[0160] It should be noted that the number of iterative image smoothing processes performed on different regions of the target image can be set according to requirements or regulations.
[0161] In some possible implementations, the number of iterative image smoothing processes performed on different regions of the target image can be the same or different.
[0162] It is understood that the embodiments of this application can set the number of iterative image smoothing processes for each region individually; wherein, the number of image smoothing processes set for different regions can be the same or different.
[0163] As can be seen, compared to the method of smoothing the entire region of the target image together, the embodiments of this application perform multiple iterative image smoothing processes on the target image according to different regions. This allows for flexible setting of the number of iterative image smoothing processes required for each region, thereby improving the flexibility of image smoothing processing.
[0164] Furthermore, the number of iterative image smoothing processes performed on different regions of the target image may vary. Examples of this application's embodiments include the following:
[0165] In some possible examples, the number of iterative image smoothing operations performed on the ROI of the target image can be greater than the number of iterative image smoothing operations performed on the non-ROI of the target image.
[0166] It should be noted that, in conjunction with the above... Figure 3 When performing image smoothing on both non-ROI and ROI, it is generally desirable for ROI to achieve a better image smoothing effect, while non-ROI can achieve a relatively poor image smoothing effect. To address this, embodiments of this application can increase the number of iterative image smoothing processes performed on the ROI.
[0167] In addition, increasing the number of ROIs and decreasing the number of non-ROIs can help save computation and computing space as much as possible, which is very advantageous when computation and computing space are limited.
[0168] In some possible examples, the number of iterative image smoothing operations performed on the edge regions of the target image can be less than the number of iterative image smoothing operations performed on the non-edge regions of the target image.
[0169] It should be noted that, in conjunction with the above... Figure 2 Similarly, when performing image smoothing on edge and non-edge regions, it is generally desirable for non-edge regions to have a better smoothing effect, while edge regions can have a relatively poor smoothing effect. To address this, embodiments of this application can increase the number of iterative image smoothing processes performed on non-edge regions.
[0170] In addition, by increasing the number of non-edge regions and decreasing the number of edge regions, it is also beneficial to save computational load and computational space as much as possible, which is very advantageous when computational load and computational space are limited.
[0171] 7. The degree of overlap between image patches in different regions of the target image under different iterations of image smoothing processing.
[0172] It should be noted that, in combination Figure 9 (d) and Figure 9 As shown in (e), the image blocks in the same region of the target image overlap between the image block layouts corresponding to different iterative image smoothing processes. However, the degree of overlap between the image blocks in the image block layouts corresponding to different regions of the target image under different iterative image smoothing processes can be different or the same, thus allowing for flexible settings.
[0173] The degree of overlap can be understood as the extent to which image patches overlap. A higher degree of overlap indicates that more image patches overlap, while a lower degree of overlap indicates that less image patches overlap.
[0174] As can be seen, setting a higher overlap level can reduce more smoothing artifacts, but it also requires more computation and space. Setting a lower overlap level can reduce the amount of computation and space required, but more smoothing artifacts will be retained.
[0175] Furthermore, the degree of overlap between image patches in different regions of the target image varies under different iterations of image smoothing processing. Examples of this can be found below:
[0176] In some possible examples, the degree of overlap between image blocks in the block layout corresponding to the ROI of the target image under different iterations of image smoothing is higher than the degree of overlap between image blocks in the block layout corresponding to the non-ROI of the target image under different iterations of image smoothing.
[0177] It should be noted that, in conjunction with the above... Figure 3 When performing image smoothing on both non-ROI and ROI, it is generally desirable for ROI to achieve a better smoothing effect, while non-ROI should have a relatively poor smoothing effect. To address this, embodiments of this application can increase the overlap of image blocks between the corresponding image block layouts under different iterations of image smoothing processing for ROI, thereby reducing smoothing artifacts in the ROI.
[0178] For example, such as Figure 10 The above, Figure 10 (a) represents the degree of overlap between the image patch arrangement corresponding to the ROI under the first iteration of image smoothing and the image patch arrangement corresponding to the ROI under the second iteration of image smoothing. Figure 10 (b) represents the degree of overlap between the image patch arrangement corresponding to the non-ROI under the first iteration of image smoothing and the image patch arrangement corresponding to the second iteration of image smoothing. Figure 10 The degree of overlap represented by (a) is higher than Figure 10 The degree of overlap represented by (b).
[0179] In some possible examples, the degree of overlap between image blocks in the block layout corresponding to the edge region of the target image under different iterations of image smoothing is lower than the degree of overlap between image blocks in the block layout corresponding to the edge region of the target image under different iterations of image smoothing.
[0180] It should be noted that, in conjunction with the above... Figure 2 Similarly, when performing image smoothing on edge and non-edge regions, it is generally desirable for non-edge regions to have a better smoothing effect, while edge regions can have a relatively poor smoothing effect. To address this, embodiments of this application can increase the overlap of image blocks between the image block layouts corresponding to non-edge regions under different iterations of image smoothing processing, thereby reducing smoothing artifacts in non-edge regions.
[0181] 8. The size of image blocks in the image block arrangement corresponding to the same region under different iterative image smoothing processes.
[0182] It should be noted that the image blocks corresponding to the same region under different iterative image smoothing processes can have the same size or different sizes, depending on the requirements or regulations, in order to improve the flexibility of image block division.
[0183] 9. Size of image blocks divided for different regions of the target image
[0184] It should be noted that the size of the image blocks divided for different regions of the target image can be different or the same, depending on the requirements or regulations, in order to improve the flexibility of image block division.
[0185] Furthermore, in cases where the size of the image blocks divided for different regions of the target image is not the same, the embodiments of this application may include the following examples:
[0186] In some possible examples, the size of the image patch divided for the ROI of the target image may be smaller than the size of the image patch divided for the non-ROI of the target image.
[0187] It should be noted that, in conjunction with the above... Figure 3 When performing image smoothing on both non-ROI and ROI areas, it is generally desirable for ROIs to achieve a better smoothing effect, while non-ROIs can have a relatively poor smoothing effect. To address this, embodiments of this application can divide ROIs into smaller image blocks.
[0188] In some possible examples, the size of the image patch divided for the edge region of the target image can be larger than the size of the image patch divided for the non-edge region of the target image.
[0189] It should be noted that, in conjunction with the above... Figure 2Similarly, when performing image smoothing on edge and non-edge regions, it is generally desirable for non-edge regions to have a better smoothing effect, while edge regions can have a relatively poor smoothing effect. To address this, embodiments of this application can divide edge regions into larger image blocks.
[0190] III. Exemplary Description of an Image Processing Apparatus
[0191] The foregoing mainly describes the solutions of the embodiments of this application from the perspective of the method execution process. It is understood that, in order to achieve the above functions, the device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should recognize that the methods, functions, modules, units, or steps described in conjunction with the embodiments provided herein can be implemented in hardware or a combination of hardware and computer software. Whether a method, function, module, unit, or step is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described methods, functions, modules, units, or steps for each specific application, but such implementation should not be considered beyond the scope of this application.
[0192] This application embodiment can divide an electronic device into functional units / modules based on the above method examples. For example, each function can be divided into its own functional unit / module, or two or more functions can be integrated into one functional unit / module. The integrated functional unit / module can be implemented in hardware or software. It should be noted that the division of functional units / modules in this application embodiment is illustrative and only represents a logical functional division; in actual implementation, there may be other division methods.
[0193] When using integrated units, Figure 11 This is a functional unit block diagram of an image processing apparatus according to an embodiment of this application. The image processing apparatus 1100 specifically includes: a processing unit 1110.
[0194] It should be noted that the processing unit 1110 can be a module unit used for acquiring or processing images, etc., and there are no specific limitations on this.
[0195] It should be noted that the processing unit 1110 can be a processor or controller, such as a DSP, CPU, general-purpose processor, ASIC, field-programmable gate array (FPGA), or other programmable logic device, transistor logic device, hardware component, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processing unit 1110 can also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0196] In some possible implementations, the image processing apparatus 1100 may also include a communication unit.
[0197] It should be noted that the communication unit can be a communication interface, transceiver, transceiver circuit, etc.
[0198] In some possible implementations, the image processing apparatus 1100 may also include a storage unit for storing computer programs or instructions executed by the image processing apparatus 1100.
[0199] For example, the storage unit could be a memory.
[0200] In some possible implementations, the image processing device 1100 may be a chip / chip module / processor / hardware, etc.
[0201] In specific implementation, the image processing device 1100 performs the steps described in the above method embodiments. A detailed description follows.
[0202] The processing unit 1110 is used to perform multiple iterative image smoothing processes on the target image according to different regions; wherein, iterative image smoothing process refers to performing the next image smoothing process based on the result of the previous image smoothing process.
[0203] In each iterative image smoothing process, the processing unit 1110 is used to: firstly divide the target image into different regions, and the divided image blocks form an image block arrangement so that one region corresponds to one image block arrangement; then, perform image smoothing processing on the image blocks in the same image block arrangement one by one, until all the image blocks in the same image block arrangement are processed to obtain the image smoothing processing result.
[0204] The image blocks corresponding to the same region under different iterative image smoothing processes overlap.
[0205] As can be seen, to address the problem of image smoothing for different regions of an image, this embodiment of the application can perform multiple iterative image smoothing processes on the target image (which can be the image requiring image smoothing) according to different regions. This iterative image smoothing process involves performing the next image smoothing process based on the result of the previous one. In this way, this embodiment of the application can flexibly adjust the number of iterative image smoothing processes according to different regions, thereby not only achieving image smoothing for different regions of the image but also improving the flexibility of image smoothing. Furthermore, multiple iterative image smoothing processes also help improve the image smoothing effect.
[0206] Secondly, in each iterative image smoothing process, this embodiment of the application can divide the target image into image blocks for different regions to obtain an image block arrangement corresponding to each region. Then, the image blocks in the image block arrangement are processed one by one until all image blocks in the image block arrangement have been processed. In this way, compared with the method of smoothing the entire image region at once, dividing the image into multiple image blocks according to regions and smoothing the image blocks one by one in sequence can reduce the computational space required, thus making it suitable for scenarios with limited computational space.
[0207] Finally, since the image smoothing process in this embodiment is performed on image blocks one by one in each iteration, a certain smoothing mark will be generated at the intersection between each pair of image blocks after processing. Therefore, setting a certain overlap between image blocks in different iterations of image smoothing can help reduce these smoothing marks.
[0208] It should be noted that the specific implementation of each operation performed by the image processing device 1100 can be found in the above description. Figure 1 The corresponding descriptions of the method embodiments shown will not be repeated here.
[0209] The following section will explain some of the implementation methods involved. For other content not covered, please refer to the above description for details, which will not be repeated here.
[0210] In some possible implementations, the processing unit 1110 is used to perform image smoothing processing on a unit basis, sequentially processing image blocks arranged in the same image block arrangement one by one:
[0211] First, filter each row of pixels in an image block within the same image block arrangement, working as a row, until all row pixels have been filtered. Then, filter each column of pixels in an image block, working as a column, until all column pixels have been filtered. Alternatively,
[0212] First, filter each column of pixels in one image block of the same image block arrangement, until all column pixels are filtered. Then, filter each row of pixels in one image block, until all row pixels are filtered.
[0213] It should be noted that, in conjunction with the content of "4. Steps included in each iterative image smoothing process" above, when performing image smoothing processing on an image block, compared to filtering on a pixel-by-pixel basis, this embodiment of the application can improve filtering efficiency by performing row-by-row pixel filtering (column-by-column pixel filtering). Furthermore, compared to performing only row-by-row pixel filtering or column-by-column pixel filtering, this embodiment of the application can improve the filtering effect by performing row-by-row pixel filtering first and then column-by-column pixel filtering.
[0214] For example, such as Figure 5 As shown, image block 501 is filtered row by row, pixel by pixel, until all row pixels are filtered, resulting in image block 502. Then, image block 502 is filtered column by column, pixel by pixel, until all column pixels are filtered, finally resulting in image block 503.
[0215] Of course, in this embodiment, after performing the first row and column filtering on an image patch, a second row and column filtering can be performed iteratively. The number of iterations can be set according to requirements or specifications. In this way, by performing multiple iterations on an image patch, image smoothing efficiency can be improved.
[0216] For example, such as Figure 6 As shown, image block 601 is filtered row by row, pixel by pixel, until all row pixels are filtered, resulting in image block 602. Then, image block 602 is filtered column by column, pixel by pixel, until all column pixels are filtered. Next, the next iteration is performed, and in the next iteration, both row and column pixel filtering are performed in the same way.
[0217] In some possible implementations, the number of iterative image smoothing processes performed on different regions of the target image can be different or the same.
[0218] It should be noted that, in conjunction with the content of "6. Number of iterative image smoothing processes for different regions of the target image" above, the embodiments of this application can set the number of iterative image smoothing processes for each region separately; wherein, the number of image smoothing processes set for different regions can be the same or different.
[0219] As can be seen, compared to the method of smoothing the entire region of the target image together, the embodiments of this application perform multiple iterative image smoothing processes on the target image according to different regions. This allows for flexible setting of the number of iterative image smoothing processes required for each region, thereby improving the flexibility of image smoothing processing.
[0220] In some possible implementations, the number of iterative image smoothing processes performed on different regions of the target image is not the same, and may include:
[0221] The number of iterative image smoothing operations performed on the region of interest (ROI) of the target image is greater than the number of iterative image smoothing operations performed on the non-ROIs of the target image; and / or,
[0222] The number of iterative image smoothing processes performed on the edge regions of the target image is less than the number of iterative image smoothing processes performed on the non-edge regions of the target image.
[0223] It should be noted that, in conjunction with the content of "6. Number of iterative image smoothing processes for different regions of the target image" above, and in conjunction with the above... Figure 3 When performing image smoothing on both non-ROI and ROI, it is generally desirable for ROI to achieve a better image smoothing effect, while non-ROI can achieve a relatively poor image smoothing effect. To address this, embodiments of this application can increase the number of iterative image smoothing processes performed on the ROI.
[0224] In addition, increasing the number of ROIs and decreasing the number of non-ROIs can help save computation and computing space as much as possible, which is very advantageous when computation and computing space are limited.
[0225] In combination with the above Figure 2 Similarly, when performing image smoothing on edge and non-edge regions, it is generally desirable for non-edge regions to have a better smoothing effect, while edge regions can have a relatively poor smoothing effect. To address this, embodiments of this application can increase the number of iterative image smoothing processes performed on non-edge regions.
[0226] In addition, by increasing the number of non-edge regions and decreasing the number of edge regions, it is also beneficial to save computational load and computational space as much as possible, which is very advantageous when computational load and computational space are limited.
[0227] In some possible implementations, the degree of overlap between image blocks in different regions of the target image under different iterations of image smoothing processing can be different or the same.
[0228] It should be noted that, in combination Figure 9 (d) and Figure 9 As shown in (e), the image blocks in the same region of the target image overlap between the image block layouts corresponding to different iterative image smoothing processes. However, the degree of overlap between the image blocks in the image block layouts corresponding to different regions of the target image under different iterative image smoothing processes can be different or the same, thus allowing for flexible settings.
[0229] The degree of overlap can be understood as the extent to which image patches overlap. A higher degree of overlap indicates that more image patches overlap, while a lower degree of overlap indicates that less image patches overlap.
[0230] As can be seen, setting a higher overlap level can reduce more smoothing artifacts, but it also requires more computation and space. Setting a lower overlap level can reduce the amount of computation and space required, but more smoothing artifacts will be retained.
[0231] In some possible implementations, the degree of overlap between image patches in different regions of the target image under different iterations of image smoothing processing varies, and may include:
[0232] The degree of overlap between image patches in the block layout corresponding to the ROI of the target image under different iterations of image smoothing is higher than the degree of overlap between image patches in the block layout corresponding to the non-ROI of the target image under different iterations of image smoothing; and / or,
[0233] The degree of overlap between image blocks in the image block layout corresponding to the edge region of the target image under different iterations of image smoothing is lower than the degree of overlap between image blocks in the image block layout corresponding to the edge region of the target image under different iterations of image smoothing.
[0234] It should be noted that, in conjunction with the content of "7. The degree of overlap between image blocks in different regions of the target image under different iterative image smoothing processes", and in conjunction with the above... Figure 3 When performing image smoothing on both non-ROI and ROI, it is generally desirable for ROI to achieve a better smoothing effect, while non-ROI should have a relatively poor smoothing effect. To address this, embodiments of this application can increase the overlap of image blocks between the corresponding image block layouts under different iterations of image smoothing processing for ROI, thereby reducing smoothing artifacts in the ROI.
[0235] For example, such as Figure 10 The above, Figure 10 (a) indicates the degree of overlap between the image patch arrangement corresponding to the ROI under the first iteration of image smoothing and the image patch arrangement corresponding to the second iteration of image smoothing. Figure 10 (b) represents the degree of overlap between the image patch arrangement corresponding to the non-ROI under the first iteration of image smoothing and the image patch arrangement corresponding to the second iteration of image smoothing. Figure 10 The degree of overlap represented by (a) is higher than Figure 10 The degree of overlap represented by (b).
[0236] In combination with the above Figure 2 Similarly, when performing image smoothing on edge and non-edge regions, it is generally desirable for non-edge regions to have a better smoothing effect, while edge regions can have a relatively poor smoothing effect. To address this, embodiments of this application can increase the overlap of image blocks between the image block layouts corresponding to non-edge regions under different iterations of image smoothing processing, thereby reducing smoothing artifacts in non-edge regions.
[0237] In some possible implementations, the individual image patches in the same image patch arrangement do not overlap; and / or,
[0238] All image blocks in the same image block arrangement have the same size; and / or,
[0239] The image blocks in the same region under different iterative image smoothing processes may have the same or different sizes.
[0240] It should be noted that, in conjunction with the above-mentioned "steps included in each iterative image smoothing process", in a certain iterative image smoothing process for a certain region of the target image, the image blocks obtained by dividing the region are non-overlapping. This avoids the dependency between image blocks when performing image smoothing process on the image blocks.
[0241] In an iterative image smoothing process targeting a specific region of a target image, the resulting image blocks for that region are of the same size, which facilitates processing.
[0242] The image blocks corresponding to the same region under different iterative image smoothing processes can have the same size or different sizes, depending on the requirements or regulations, in order to improve the flexibility of image block division.
[0243] In some possible implementations, the size of the image blocks divided for different regions of the target image can be different or the same.
[0244] It should be noted that, in conjunction with the content of "9. Size of image blocks divided for different regions of the target image" above, the size of image blocks divided for different regions of the target image can be different or the same, depending on the requirements or regulations, in order to improve the flexibility of image block division.
[0245] In some possible implementations, the size of the image patches divided for different regions of the target image is not the same, and may include:
[0246] The size of the image patch divided for the ROI of the target image is smaller than the size of the image patch divided for the non-ROI of the target image; and / or,
[0247] The size of the image patch divided for the edge region of the target image is larger than the size of the image patch divided for the non-edge region of the target image.
[0248] It should be noted that, in conjunction with the content of "9. The size of image blocks divided for different regions of the target image" above, and in conjunction with the above... Figure 3 When performing image smoothing on both non-ROI and ROI areas, it is generally desirable for ROIs to achieve a better smoothing effect, while non-ROIs can have a relatively poor smoothing effect. To address this, embodiments of this application can divide ROIs into smaller image blocks.
[0249] In combination with the above Figure 2 Similarly, when performing image smoothing on edge and non-edge regions, it is generally desirable for non-edge regions to have a better smoothing effect, while edge regions can have a relatively poor smoothing effect. To address this, embodiments of this application can divide edge regions into larger image blocks.
[0250] IV. Exemplary Description of a Chip
[0251] Based on the above description, the following is a schematic diagram of the structure of a chip according to an embodiment of this application, as shown below. Figure 12 As shown. The chip 1210 includes a processing unit 1211, a first storage unit 1212, a storage unit access unit 1213, and a communication bus for connecting the processing unit 1211, the first storage unit 1212, and the storage unit access unit 1213. The processing unit 1211 can access a second storage unit 1220 external to the chip 1210 by controlling the storage unit access unit 1213. The second storage unit 1220 can be used to store the target image.
[0252] 1. Description
[0253] It should be noted that, in the process of image smoothing processing by chip 1210 in this embodiment of the application, the first storage unit 1212 and the second storage unit 1220 are used to allocate the storage space required by the image. The first storage unit 1212 can be integrated into chip 1210, while the second storage unit 1220 is located outside of chip 1210.
[0254] Since the read / write speed of the first storage unit 1212 is higher than that of the second storage unit 1220, the processing unit 1211 can directly and quickly call the image stored in the first storage unit 1212, in order to reduce the latency of image processing, improve the efficiency of image smoothing processing, and reduce the time delay of image smoothing processing, compared to the processing unit 1211 calling the stored image from the second storage unit 1220 for image smoothing processing.
[0255] Because the storage space of the first storage unit 1212 is smaller than that of the second storage unit 1220, the first storage unit 1212 cannot store too many images, while the second storage unit 1220 can store too many images. Therefore, in this embodiment, images can be first stored in the second storage unit 1220, and then the images stored in the second storage unit 1220 can be transferred to the first storage unit 1212 in batches via the storage unit access unit 1213. Each batch transfers a portion of the images (e.g., each image block) so that the first storage unit 1212 can store them.
[0256] For the storage unit access unit 1213, after the previous batch of partial images has been processed, the storage unit access unit 1213 can transmit the next batch of partial images and transmit the image smoothing processing result back to the second storage unit 1220.
[0257] For the processing unit 1211, firstly, the processing unit 1211 can control the storage unit access unit 1213 to transfer a batch of partial images in the second storage unit 1220 to the first storage unit 1212, so as to call the batch of partial images from the first storage unit 1212 for image smoothing processing.
[0258] Then, the control storage unit access unit 1213 copies the image smoothing processing result from the first storage unit 1212 to the second storage unit 1220 so that the second storage unit 1220 can be used to store the image smoothing processing result.
[0259] Finally, the control storage unit access unit 1213 transmits the next batch of partial images from the second storage unit 1220 to the first storage unit 1212 for image smoothing processing. This process is repeated until all images that need to be processed have been processed.
[0260] In specific implementation, to address the issue of image smoothing for different regions of an image, the chip 1210 in this embodiment can perform multiple iterative image smoothing processes on the target image according to different regions. This iterative image smoothing process refers to performing the next image smoothing process based on the result of the previous one. In this way, the chip 1210 can flexibly adjust the number of iterative image smoothing processes according to different regions, thereby not only achieving image smoothing for different regions of the image but also improving the flexibility of image smoothing. Simultaneously, multiple iterative image smoothing processes also help improve the image smoothing effect.
[0261] Secondly, during each iterative image smoothing process, chip 1210 can divide the target image into image blocks for different regions to obtain an image block arrangement corresponding to each region. Then, the image blocks in the arrangement are processed sequentially, one by one, until all image blocks in the arrangement have been processed. In this way, compared to smoothing the entire image region at once, dividing the image into multiple image blocks according to regions and smoothing each block sequentially requires very little computational space, making it suitable for scenarios with limited computational space.
[0262] Finally, since the chip 1210 performs image smoothing on image blocks one by one in each iteration of the image smoothing process, certain smoothing marks will be generated at the intersection between each pair of image blocks after processing. Therefore, setting a certain overlap between image blocks in different iterations of the image smoothing process can help reduce these smoothing marks.
[0263] The following sections will provide a detailed explanation of each unit.
[0264] 2. Processing Unit 1211
[0265] 1) Description
[0266] In this embodiment of the application, the processing unit 1211 can be used to perform multiple image smoothing processes on the target image according to different regions. The iterative image smoothing process can refer to performing the next image smoothing process on the result of the previous image smoothing process.
[0267] In each iteration of image smoothing processing, the processing unit 1211 can be used to: firstly divide the target image into image blocks for different regions, and the divided image blocks form an image block arrangement so that one region corresponds to one image block arrangement; wherein, the image blocks of the image block arrangements corresponding to the same region under different iterations of image smoothing processing overlap.
[0268] The divided image blocks are stored in the second storage unit 1220;
[0269] The control storage unit access unit 1213 transmits image blocks in the same image block arrangement one by one to the first storage unit 1212 for image smoothing processing, until all image blocks in the same image block arrangement are processed to obtain the image smoothing processing result.
[0270] The control storage unit access unit 1213 sequentially transmits each image block after image smoothing to the second storage unit 1220.
[0271] In some possible implementations, the processing unit 1211 may be the processing unit described in "2. Chip" above, which will not be repeated here.
[0272] Optionally, the processing unit 1211 can be a DSP. It should be noted that the reason for using a DSP for image smoothing processing in this embodiment is that, compared to a CPU, a DSP can support a single instruction to operate on multiple data, thereby improving processing efficiency.
[0273] 2) Perform image smoothing processing on each image block in the same image block arrangement one by one.
[0274] In some possible implementations, the processing unit 1211 may be used to perform image smoothing processing on a unit basis, sequentially processing image blocks arranged in the same image block arrangement one by one:
[0275] First, filter each row of pixels in one image block of the same image block arrangement, row by row, until all row pixels have been filtered. Then, filter each column of pixels in one image block, column by column, until all column pixels have been filtered. Or,
[0276] First, filter each column of pixels in one image block of the same image block arrangement, until all column pixels are filtered. Then, filter each row of pixels in one image block, until all row pixels are filtered.
[0277] It should be noted that, in conjunction with the content of "4. Steps included in each iterative image smoothing process" above, when performing image smoothing processing on an image block, compared to filtering on a pixel-by-pixel basis, this embodiment of the application can improve filtering efficiency by performing row-by-row pixel filtering (column-by-column pixel filtering). Furthermore, compared to performing only row-by-row pixel filtering or column-by-column pixel filtering, this embodiment of the application can improve the filtering effect by performing row-by-row pixel filtering first and then column-by-column pixel filtering.
[0278] For example, such as Figure 5 As shown, image block 501 is filtered row by row, pixel by pixel, until all row pixels are filtered, resulting in image block 502. Then, image block 502 is filtered column by column, pixel by pixel, until all column pixels are filtered, finally resulting in image block 503.
[0279] Of course, in this embodiment, after performing the first row and column filtering on an image patch, a second row and column filtering can be performed iteratively. The number of iterations can be set according to requirements or specifications. In this way, by performing multiple iterations on an image patch, image smoothing efficiency can be improved.
[0280] For example, such as Figure 6 As shown, image block 601 is filtered row by row, pixel by pixel, until all row pixels are filtered, resulting in image block 602. Then, image block 602 is filtered column by column, pixel by pixel, until all column pixels are filtered. Next, the next iteration is performed, and in the next iteration, both row and column pixel filtering are performed in the same way.
[0281] 3. First storage unit 1212
[0282] In this embodiment of the application, the first storage unit 1212 can be used to store image blocks in the same image block arrangement one by one.
[0283] The storage space of the first storage unit 1212 is smaller than that of the second storage unit 1220, and the read / write speed of the first storage unit 1212 is higher than that of the second storage unit 1220.
[0284] In some possible implementations, the first storage unit 1212 may be a memory with a small storage space and fast read / write speed.
[0285] For example, the first storage unit 1212 may include one of tightly coupled memory (TCM), instruction tightly coupled memory (ITCM), data tightly coupled memory (DTCM), etc.
[0286] 4. Storage Unit Access Unit 1213
[0287] In this embodiment of the application, the storage unit access unit 1213 can be used to sequentially transfer image blocks arranged in the same image block from the second storage unit 1220 to the first storage unit 1212 one by one, and to sequentially transfer each image block after image smoothing to the second storage unit 1220.
[0288] In some possible implementations, the memory access unit 1213 may be a device for accessing memory.
[0289] For example, the memory access unit 1213 may include Direct Memory Access (DMA), etc.
[0290] It should be noted that DMA can be a hardware-implemented data transfer mechanism. Specifically, DMA can complete data transfer without the involvement of the CPU.
[0291] 5. Second storage unit 1220
[0292] In this embodiment of the application, the second storage unit 1220 can be used to store the target image and the image smoothing processing result.
[0293] In some possible implementations, the second storage unit 1220 can be a memory with a large storage space.
[0294] For example, the second storage unit 1220 may include one of DDR SDRAM, SDRAM, RAM, CD-ROM, etc.
[0295] 6. Examples of other implementation methods
[0296] Based on the above description, some implementation methods involved will be illustrated below. For other content not covered, please refer to the above description for details, which will not be repeated here.
[0297] In some possible implementations, the number of iterative image smoothing processes performed on different regions of the target image can be different or the same.
[0298] It should be noted that, in conjunction with the content of "6. Number of iterative image smoothing processes for different regions of the target image" above, the embodiments of this application can set the number of iterative image smoothing processes for each region separately; wherein, the number of image smoothing processes set for different regions can be the same or different.
[0299] As can be seen, compared to the method of smoothing the entire region of the target image together, the embodiments of this application perform multiple iterative image smoothing processes on the target image according to different regions. This allows for flexible setting of the number of iterative image smoothing processes required for each region, thereby improving the flexibility of image smoothing processing.
[0300] In some possible implementations, the number of iterative image smoothing processes performed on different regions of the target image is not the same, and may include:
[0301] The number of iterative image smoothing operations performed on the region of interest (ROI) of the target image is greater than the number of iterative image smoothing operations performed on the non-ROIs of the target image; and / or,
[0302] The number of iterative image smoothing processes performed on the edge regions of the target image is less than the number of iterative image smoothing processes performed on the non-edge regions of the target image.
[0303] It should be noted that, in conjunction with the content of "6. Number of iterative image smoothing processes for different regions of the target image" above, and in conjunction with the above... Figure 3 When performing image smoothing on both non-ROI and ROI, it is generally desirable for ROI to achieve a better image smoothing effect, while non-ROI can achieve a relatively poor image smoothing effect. To address this, embodiments of this application can increase the number of iterative image smoothing processes performed on the ROI.
[0304] In addition, increasing the number of ROIs and decreasing the number of non-ROIs can help save computation and computing space as much as possible, which is very advantageous when computation and computing space are limited.
[0305] In combination with the above Figure 2 Similarly, when performing image smoothing on edge and non-edge regions, it is generally desirable for non-edge regions to have a better smoothing effect, while edge regions can have a relatively poor smoothing effect. To address this, embodiments of this application can increase the number of iterative image smoothing processes performed on non-edge regions.
[0306] In addition, by increasing the number of non-edge regions and decreasing the number of edge regions, it is also beneficial to save computational load and computational space as much as possible, which is very advantageous when computational load and computational space are limited.
[0307] In some possible implementations, the degree of overlap between image blocks in different regions of the target image under different iterations of image smoothing processing can be different or the same.
[0308] It should be noted that, in combination Figure 9 (d) and Figure 9 As shown in (e), the image blocks in the same region of the target image overlap between the image block layouts corresponding to different iterative image smoothing processes. However, the degree of overlap between the image blocks in the image block layouts corresponding to different regions of the target image under different iterative image smoothing processes can be different or the same, thus allowing for flexible settings.
[0309] The degree of overlap can be understood as the extent to which image patches overlap. A higher degree of overlap indicates that more image patches overlap, while a lower degree of overlap indicates that less image patches overlap.
[0310] As can be seen, setting a higher overlap level can reduce more smoothing artifacts, but it also requires more computation and space. Setting a lower overlap level can reduce the amount of computation and space required, but more smoothing artifacts will be retained.
[0311] In some possible implementations, the degree of overlap between image patches in different regions of the target image under different iterative image smoothing processes varies, and may include:
[0312] The degree of overlap between image patches in the block layout corresponding to the ROI of the target image under different iterations of image smoothing is higher than the degree of overlap between image patches in the block layout corresponding to the non-ROI of the target image under different iterations of image smoothing; and / or,
[0313] The degree of overlap between image blocks in the image block layout corresponding to the edge region of the target image under different iterations of image smoothing is lower than the degree of overlap between image blocks in the image block layout corresponding to the edge region of the target image under different iterations of image smoothing.
[0314] It should be noted that, in conjunction with the content of "7. The degree of overlap between image blocks in different regions of the target image under different iterative image smoothing processes", and in conjunction with the above... Figure 3 When performing image smoothing on both non-ROI and ROI, it is generally desirable for ROI to achieve a better smoothing effect, while non-ROI should have a relatively poor smoothing effect. To address this, embodiments of this application can increase the overlap of image blocks between the corresponding image block layouts under different iterations of image smoothing processing for ROI, thereby reducing smoothing artifacts in the ROI.
[0315] For example, such as Figure 10 The above, Figure 10 (a) indicates the degree of overlap between the image patch arrangement corresponding to the ROI under the first iteration of image smoothing and the image patch arrangement corresponding to the second iteration of image smoothing. Figure 10 (b) represents the degree of overlap between the image patch arrangement corresponding to the non-ROI under the first iteration of image smoothing and the image patch arrangement corresponding to the second iteration of image smoothing. Figure 10 The degree of overlap represented by (a) is higher than Figure 10 The degree of overlap represented by (b).
[0316] In combination with the above Figure 2 Similarly, when performing image smoothing on edge and non-edge regions, it is generally desirable for non-edge regions to have a better smoothing effect, while edge regions can have a relatively poor smoothing effect. To address this, embodiments of this application can increase the overlap of image blocks between the image block layouts corresponding to non-edge regions under different iterations of image smoothing processing, thereby reducing smoothing artifacts in non-edge regions.
[0317] In some possible implementations, the individual image patches in the same image patch arrangement do not overlap; and / or,
[0318] All image blocks in the same image block arrangement have the same size; and / or,
[0319] The image blocks in the same region under different iterative image smoothing processes may have the same or different sizes.
[0320] It should be noted that, in conjunction with the above-mentioned "steps included in each iterative image smoothing process", in a certain iterative image smoothing process for a certain region of the target image, the image blocks obtained by dividing the region are non-overlapping. This avoids the dependency between image blocks when performing image smoothing process on the image blocks.
[0321] In an iterative image smoothing process targeting a specific region of a target image, the resulting image blocks for that region are of the same size, which facilitates processing.
[0322] The image blocks corresponding to the same region under different iterative image smoothing processes can have the same size or different sizes, depending on the requirements or regulations, in order to improve the flexibility of image block division.
[0323] In some possible implementations, the size of the image blocks divided for different regions of the target image can be different or the same.
[0324] It should be noted that, in conjunction with the content of "9. Size of image blocks divided for different regions of the target image" above, the size of image blocks divided for different regions of the target image can be different or the same, depending on the requirements or regulations, in order to improve the flexibility of image block division.
[0325] In some possible implementations, the size of the image patches divided for different regions of the target image is not the same, and may include:
[0326] The size of the image patch divided for the ROI of the target image is smaller than the size of the image patch divided for the non-ROI of the target image; and / or,
[0327] The size of the image patch divided for the edge region of the target image is larger than the size of the image patch divided for the non-edge region of the target image.
[0328] It should be noted that, in conjunction with the content of "9. The size of image blocks divided for different regions of the target image" above, and in conjunction with the above... Figure 3 When performing image smoothing on both non-ROI and ROI areas, it is generally desirable for ROIs to achieve a better smoothing effect, while non-ROIs can have a relatively poor smoothing effect. To address this, embodiments of this application can divide ROIs into smaller image blocks.
[0329] In combination with the above Figure 2Similarly, when performing image smoothing on edge and non-edge regions, it is generally desirable for non-edge regions to have a better smoothing effect, while edge regions can have a relatively poor smoothing effect. To address this, embodiments of this application can divide edge regions into larger image blocks.
[0330] V. Other Exemplary Descriptions
[0331] This application also provides an electronic device, including the above-described... Figure 12 The chip shown is 1210.
[0332] It should be noted that, in conjunction with the content of "I. Electronic Devices" above, the electronic device may also include at least one of the following: storage components, sensing components, display components, camera components, and input drivers, which will not be elaborated further.
[0333] This application also provides a computer-readable storage medium storing a computer program or instructions that, when executed by a processor, implement the steps described in the above embodiments.
[0334] This application also provides a computer program product, including a computer program or instructions, wherein the computer program or instructions, when executed by a processor, implement the steps described in the above embodiments. For example, the computer program product may be a software installation package.
[0335] In addition, computer program products should be understood as software products that primarily implement the technical solutions of this application through computer programs or instructions.
[0336] It should be noted that, for the sake of simplicity, the above embodiments are all described as a series of actions. Those skilled in the art should understand that this application is not limited to the described order of actions, as some steps in the embodiments of this application can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions, steps, modules, or units involved are not necessarily essential to the embodiments of this application.
[0337] In the above embodiments, the descriptions of each embodiment in this application have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0338] Those skilled in the art should understand that the functions of the methods, steps, or related modules / units described in the embodiments of this application can be implemented, in whole or in part, by software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product, or by a processor executing computer program instructions. The computer program product includes at least one computer program instruction, which can be composed of corresponding software modules. These software modules can be stored in RAM, flash memory, ROM, EPROM, EEPROM, registers, hard disk, portable hard disk, read-only optical disc (CD-ROM), or any other form of storage medium well known in the art. The computer program instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer program instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media, or semiconductor media (e.g., SSDs).
[0339] The modules / units included in the various devices or products described in the above embodiments can be software modules / units, hardware modules / units, or a combination of software and hardware modules / units. For example, for devices or products applied to or integrated into a chip, all of their modules / units can be implemented using hardware methods such as circuits; or, some of their modules / units can be implemented using software programs that run on a processor integrated within the chip, while other (if any) modules / units can be implemented using hardware methods such as circuits. The same principle applies to devices or products applied to or integrated into chip modules, or devices or products applied to or integrated into terminals.
[0340] The above detailed embodiments further illustrate the purpose, technical solution, and beneficial effects of the embodiments of this application. It should be understood that the above are merely specific implementations of the embodiments of this application and are not intended to limit the protection scope of the embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made based on the technical solutions of the embodiments of this application should be included within the protection scope of the embodiments of this application.
Claims
1. An image processing method, characterized in that, include: The target image is subjected to multiple iterative image smoothing processes according to different regions; The number of iterative image smoothing processes performed on different regions of the target image is different, including: the number of iterative image smoothing processes performed on the region of interest (ROI) of the target image is greater than the number of iterative image smoothing processes performed on the non-ROI of the target image; and / or, the number of iterative image smoothing processes performed on the edge regions of the target image is less than the number of iterative image smoothing processes performed on the non-edge regions of the target image; The iterative image smoothing process refers to performing the next image smoothing process based on the result of the previous image smoothing process. Each iterative image smoothing process includes the following steps: First, the target image is divided into image blocks for different regions, and the divided image blocks are arranged into an image block arrangement so that one region corresponds to one image block arrangement. Then, the image blocks in the same image block arrangement are processed one by one until all the image blocks in the same image block arrangement are processed to obtain the image smoothing result. The image blocks corresponding to the image block arrangements of the same region under different iterative image smoothing processes overlap. The image blocks in the same image block arrangement are stored in a first storage unit as a unit. The storage space of the first storage unit is smaller than that of the second storage unit, and the read / write speed of the first storage unit is higher than that of the second storage unit. The second storage unit is used to store the target image and the image smoothing processing result. The storage unit access unit realizes the sequential transfer of image blocks in the same image block arrangement from the second storage unit to the first storage unit as a unit, and the sequential transfer of each image block after image smoothing processing to the second storage unit. The storage unit access unit includes direct memory access.
2. The method according to claim 1, characterized in that, The step of performing image smoothing processing on image blocks in the same image block arrangement one at a time includes: First, filter each row of pixels in one image block of the same image block arrangement, row by row, until all row pixels are filtered. Then, filter each column of pixels in one image block, column by column, until all column pixels are filtered. Alternatively, First, filter each column of pixels in one image block of the same image block arrangement, until all column pixels are filtered. Then, filter each row of pixels in one image block, until all row pixels are filtered.
3. The method according to claim 1, characterized in that, The degree of overlap between the image blocks in different regions of the target image under different iterations of image smoothing processing is either the same or different.
4. The method according to claim 3, characterized in that, The degree of overlap between image blocks in different regions of the target image under different iterations of image smoothing processing varies, including: The degree of overlap between image blocks in the image block layout corresponding to the ROI of the target image under different iterations of image smoothing processing is higher than the degree of overlap between image blocks in the image block layout corresponding to the non-ROI of the target image under different iterations of image smoothing processing; and / or, The degree of overlap between the image blocks in the image block layout corresponding to the edge region of the target image under different iterations of image smoothing processing is lower than the degree of overlap between the image blocks in the image block layout corresponding to the edge region of the target image under different iterations of image smoothing processing.
5. The method according to claim 1, characterized in that, The image blocks in the same image block arrangement do not overlap; and / or, All image blocks in the same image block arrangement have the same size; and / or, The image blocks in the same region under different iterations of image smoothing processing have the same or different sizes.
6. The method according to claim 1, characterized in that, The size of the image blocks divided for different regions of the target image may be different or the same.
7. The method according to claim 6, characterized in that, The image blocks divided for different regions of the target image are of different sizes, including: The size of the image patch divided for the ROI of the target image is smaller than the size of the image patch divided for the non-ROI of the target image; and / or, The size of the image blocks that are divided for the edge regions of the target image is larger than the size of the image blocks that are divided for the non-edge regions of the target image.
8. An image processing apparatus, characterized in that, include: A processing unit is configured to perform iterative image smoothing processing on a target image multiple times according to different regions; wherein the number of iterative image smoothing processes performed on different regions of the target image is different, including: the number of iterative image smoothing processes performed on the region of interest (ROI) of the target image is greater than the number of iterative image smoothing processes performed on the non-ROI regions of the target image; and / or, the number of iterative image smoothing processes performed on the edge regions of the target image is less than the number of iterative image smoothing processes performed on the non-edge regions of the target image; wherein, the iterative image smoothing process refers to performing the next image smoothing process based on the result of the previous image smoothing process; In each of the iterative image smoothing processes, the processing unit is used to: firstly divide the target image into image blocks for different regions, and the divided image blocks form an image block arrangement so that one region corresponds to one image block arrangement; then, perform image smoothing processing on the image blocks in the same image block arrangement one by one, until all the image blocks in the same image block arrangement are processed to obtain the image smoothing processing result. The image blocks corresponding to the image block arrangements of the same region under different iterative image smoothing processes overlap. The image blocks in the same image block arrangement are stored in a first storage unit as a unit. The storage space of the first storage unit is smaller than that of the second storage unit, and the read / write speed of the first storage unit is higher than that of the second storage unit. The second storage unit is used to store the target image and the image smoothing processing result. The storage unit access unit realizes the sequential transfer of image blocks in the same image block arrangement from the second storage unit to the first storage unit as a unit, and the sequential transfer of each image block after image smoothing processing to the second storage unit. The storage unit access unit includes direct memory access.
9. A chip, characterized in that, It includes a processing unit, a first storage unit, and a storage unit access unit; wherein, The processing unit is used to perform multiple image smoothing processes on the target image according to different regions. Iterative image smoothing refers to performing the next image smoothing process based on the result of the previous image smoothing process. The number of iterative image smoothing processes performed on different regions of the target image is different, including: the number of iterative image smoothing processes performed on the region of interest (ROI) of the target image is greater than the number of iterative image smoothing processes performed on the non-ROI regions of the target image; and / or, the number of iterative image smoothing processes performed on the edge regions of the target image is less than the number of iterative image smoothing processes performed on the non-edge regions of the target image. In each of the iterative image smoothing processes, the processing unit is configured to: firstly divide the target image into image blocks for different regions, and arrange the divided image blocks into an image block arrangement such that one region corresponds to one image block arrangement; wherein, the image blocks of the image block arrangements corresponding to the same region in different iterative image smoothing processes overlap; store the divided image blocks in a second storage unit; control the storage unit access unit to sequentially transfer the image blocks in the same image block arrangement to the first storage unit one by one for image smoothing processing, until all image blocks in the same image block arrangement are processed to obtain the image smoothing result; control the storage unit access unit to sequentially transfer each image block after image smoothing processing to the second storage unit. The first storage unit is used to store image blocks in the same image block arrangement on a unit basis; wherein, the storage space of the first storage unit is smaller than that of the second storage unit, and the read / write speed of the first storage unit is higher than that of the second storage unit; The storage unit access unit is used to sequentially transfer image blocks from the same image block arrangement from the second storage unit to the first storage unit one by one, and to sequentially transfer each image block after image smoothing to the second storage unit. The storage unit access unit includes direct memory access.
10. An electronic device, characterized in that, Includes the chip described in claim 9.
11. A computer-readable storage medium, characterized in that, It stores a computer program or instructions that, when executed, implement the steps of the method described in any one of claims 1-7.
Citation Information
Patent Citations
Image filtering method and device, electronic equipment and storage medium
CN111598806A
Image processing method and device
CN114612313A