WO2022067489A1 - 图像处理方法、装置及图像采集设备 - Google Patents
图像处理方法、装置及图像采集设备 Download PDFInfo
- Publication number
- WO2022067489A1 WO2022067489A1 PCT/CN2020/118784 CN2020118784W WO2022067489A1 WO 2022067489 A1 WO2022067489 A1 WO 2022067489A1 CN 2020118784 W CN2020118784 W CN 2020118784W WO 2022067489 A1 WO2022067489 A1 WO 2022067489A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- processing
- local enhancement
- mapping matrix
- local
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20021—Dividing image into blocks, subimages or windows
Definitions
- the present application relates to the technical field of image processing, and in particular, to an image processing method, an apparatus, and an image acquisition device.
- an image processing chip will be used to perform a series of processing on the image, such as noise reduction, lens shadow correction, white balance adjustment, sharpening, and local enhancement.
- the resolution of the collected image is getting higher and higher, and there may be a scene where the resolution of the image exceeds the upper limit of the processing bandwidth of the image processing chip. Therefore, it is necessary to first divide the image into multiple After framing the sub-images, the image processing chip is used to process the multiple sub-images respectively, and then the processed sub-images are synthesized to obtain the target image processed by the image processing chip.
- the image is locally enhanced, resulting in obvious stitching defects in the final synthesized image, which seriously affects the display effect of the image.
- the present application provides an image processing method, device and image acquisition device.
- an image processing method comprising:
- the local enhancement mapping matrix being used to describe the difference between the downsampled image that has undergone local enhancement processing and the downsampled image that has not undergone local enhancement processing;
- a target image is obtained by performing local enhancement processing on the second image based on the local enhancement mapping matrix.
- an image processing apparatus includes a processor, a memory, and a computer program stored in the memory for execution by the processor, when the processor executes the computer program , implement the following steps:
- the local enhancement mapping matrix being used to describe the difference between the downsampled image that has undergone local enhancement processing and the downsampled image that has not undergone local enhancement processing;
- a target image is obtained by performing local enhancement processing on the second image based on the local enhancement mapping matrix.
- an image acquisition device includes an image sensor and the image processing apparatus described in the second aspect above.
- a computer-readable storage medium on which computer program instructions are stored.
- the instructions are executed by a processor, the image processing method mentioned in the first aspect can be implemented.
- the first image to be processed can be down-sampled, so that the down-sampled image obtained by the down-sampling process meets the processing bandwidth requirements of the image processing chip, and then the down-sampled image is used to determine the image used to describe the local enhancement processing.
- the multiple sub-images obtained by dividing the first image can be processed separately except for local enhancement processing, and a second image can be synthesized by using the processed multiple sub-images, and then the second image can be processed by using the local enhancement mapping matrix. Local enhancement processing to obtain the target image.
- FIG. 1 is a schematic diagram of dividing an image into multi-frame sub-images and then processing them by an image processing chip according to an embodiment of the present application.
- FIG. 2 is an image effect diagram obtained by dividing an image into multi-frame sub-images and then processing them by an image processing chip when the local enhancement processing function is enabled in an embodiment of the present application.
- FIG. 3( a ) is a flowchart of an image processing method according to an embodiment of the present application.
- FIG. 3(b) is a schematic diagram of an image processing method according to an embodiment of the present application.
- FIG. 4(a) and FIG. 4(b) are schematic diagrams of determining a local enhancement mapping matrix according to an embodiment of the present application.
- 5 and 6 are schematic diagrams of obtaining a target image according to a local enhancement mapping matrix and a second image according to an embodiment of the present application.
- FIG. 7 is a schematic diagram of an image processing method according to an embodiment of the present application.
- FIG. 8 is a schematic diagram of a logical structure of an image processing apparatus according to an embodiment of the present application
- FIG. 9 is a schematic diagram of a logical structure of an image acquisition device according to an embodiment of the present application.
- a series of processes such as noise reduction, lens shadow correction, white balance adjustment, sharpening, and local enhancement are usually performed on the image to improve the display effect of the image.
- the above series of image processing can be implemented by using an image processing chip (such as an ISP chip) that integrates the above functions.
- each functional module can perform one kind of processing on the image.
- the local enhancement processing module can perform local enhancement processing on the image to increase the contrast of the image.
- the function of each functional module can be set to be turned on or off. For example, if the local enhancement processing function is turned on, the image processing The chip will perform local enhancement processing on the image, and if the local enhancement processing function is turned off, the image processing chip will not perform the local enhancement processing function, but only perform the processing functions of other enabled functional modules.
- the present application provides an image processing method, which can divide an image into multiple sub-images and then use an image processing chip to process the image, so that the image processing chip can process a resolution higher than its processing bandwidth.
- an image processing method which can divide an image into multiple sub-images and then use an image processing chip to process the image, so that the image processing chip can process a resolution higher than its processing bandwidth.
- it can also avoid the problem that the image cannot be locally enhanced because the image needs to be divided into multiple sub-frames and then processed by the image processing chip, or the image has obvious defects after the local enhancement processing.
- the image processing methods in the embodiments of the present application are applicable to various devices that can perform local enhancement processing and other image processing on images, and other image processing includes one or more of noise reduction, white balance adjustment, shadow correction, and sharpening.
- the device can be a camera, a mobile phone, or other device with an image acquisition function, and the above-mentioned processing can be performed on the image after the image is acquired.
- the device may also be a device that only has an image processing function, and the device obtains the captured image from the image capturing device and then performs the above-mentioned processing.
- the device may include an image processing chip configured with the above image processing functions.
- the image processing chip may be an ISP chip, and the image processing chip can perform local enhancement, noise reduction, and white balance on the image.
- One or more processing such as adjustment, shadow correction, sharpening, etc.
- the image processing methods in the embodiments of the present application may be used to process various images, for example, visible light images, infrared images, or other images, which are not limited in this application.
- FIG. 3(a) The flow of the method is shown in FIG. 3(a), including the following steps:
- S304 Determine a local enhancement mapping matrix based on the downsampled image, where the local enhancement mapping matrix is used to describe the difference between the downsampled image that has undergone local enhancement processing and the downsampled image that has not undergone local enhancement processing;
- the first image after acquiring the image to be processed (hereinafter, the images to be processed are collectively referred to as the first image), the first image can be processed.
- Down-sampling processing to obtain down-sampled images.
- the purpose of the downsampling is to reduce the resolution of the first image so that it meets the upper limit of the processing bandwidth of the image processing chip (the resolution of the downsampled image is lower than the upper limit of the resolution of the image that the image processing chip can process). ), so that the image processing chip can be directly used to perform local enhancement processing on the down-sampled image.
- a local enhancement mapping matrix can be determined using the downsampled image, wherein the local enhancement mapping matrix can be used to describe the difference between the downsampled image that has undergone local enhancement processing and the downsampled image that has not undergone local enhancement processing.
- the number of rows and columns of the local enhancement mapping matrix can be consistent with the number of rows and columns of the downsampled image, and the value of each element of the local enhancement mapping matrix can be used to describe the downsampled image that has undergone local enhancement processing and the image that has not undergone local enhancement.
- the first image can be divided to obtain multiple sub-images.
- the purpose of dividing the first image to obtain multiple sub-images is to reduce the resolution of the image so as to meet the processing bandwidth requirement of the image processing chip.
- it can be divided into multiple sub-images with the same size, or can be divided into multiple sub-images with different sizes, and the multiple sub-images obtained by division may have a partial overlapping area or may not The overlapping area is not limited in this embodiment of the present application.
- the sub-images obtained by division may include partially overlapping regions.
- image processing other than local enhancement processing can be performed on the image.
- the image processing can be any of noise reduction, camera shadow correction, white balance adjustment, sharpening, and global enhancement processing one or more treatments.
- the second image is obtained by synthesis, and the second image obtained by synthesis in this way can realize image effects other than local enhancement processing.
- the local enhancement mapping matrix may be used to perform local enhancement processing on the second image to obtain the target image.
- the image resolution Since the image resolution has a great influence on the processing effects of other image processing such as noise reduction and white balance, it can be divided into multiple sub-images and processed by the image processing chip, and then synthesized to obtain a second image, while the image resolution
- the effect of the local enhancement processing is small, so the image processing chip can be used to perform local enhancement processing on the down-sampled image to determine the local enhancement mapping matrix, and then use the local enhancement mapping matrix to guide the local enhancement processing of the second image.
- the target image processed in the above manner can not only have the effect of being processed by all functional modules of the image processing chip, but also will not have the problem of splicing defects.
- Step S302 may be executed before step S306, or after step S306, or step S302 and step S306 may be executed simultaneously.
- the resolution of the first image is lower than the upper limit of the resolution of the image that can be processed by the image processing chip, it is not necessary to divide the image into multiple sub-images, and then use the image processing chip to process, so the whole image can be processed by the image processing chip.
- the image is input to the image processing chip to complete all image processing such as local enhancement, noise reduction, camera shadow correction, white balance adjustment, sharpening, etc., and there is no problem of stitching defects.
- the image processing chip Before using the above image processing method to process the first image, it may be determined whether the resolution of the first image is higher than the specified resolution, and if it is higher, the above-mentioned down-sampling of the first image is performed. processing steps. If not higher, the first image can be directly input to the image processing chip to complete all image processing.
- the specified resolution may be determined according to the processing bandwidth of the image processing chip. For example, the specified resolution may be the maximum resolution of an image that the image processing chip can process, or a resolution obtained by subtracting a certain buffer threshold from the maximum resolution.
- the down-sampled image when the local enhancement mapping matrix is determined by the down-sampled image, the down-sampled image may be subjected to local enhancement processing and other image processing except the local enhancement processing to obtain the first Four images, and then other image processing except local enhancement processing is performed on only the down-sampled image to obtain a fifth image.
- the local enhancement mapping matrix can then be determined from the difference between the fourth image and the fifth image.
- the local enhancement mapping matrix when the local enhancement mapping matrix is determined according to the difference between the fourth image and the fifth image, the local enhancement mapping matrix may be obtained by dividing the fourth image and the fifth image. For example, the pixel value of the first row and first column of the fourth image can be divided by the pixel value of the first row and first column of the fifth image, and the obtained value is the element corresponding to the first row and first column of the local enhancement mapping matrix. The value of , and so on, can determine the local enhancement mapping matrix.
- the local enhancement mapping matrix when the local enhancement mapping matrix is determined according to the difference between the fourth image and the fifth image, the local enhancement mapping matrix may be obtained by performing a subtraction operation on the fourth image and the fifth image. For example, the pixel value of the first row and first column of the fourth image can be subtracted from the pixel value of the first row and first column of the fifth image, and the obtained value is the element corresponding to the first row and first column of the local enhancement mapping matrix. The value of , and so on, can determine the local enhancement mapping matrix.
- the local enhancement mapping matrix is determined according to the downsampled image
- the downsampled image is subjected to local enhancement processing and other image processing except the local enhancement processing
- a fourth image is obtained, and then the downsampled image is divided into
- the downsampled image is divided into
- the down-sampled image can also be subjected to local enhancement processing to obtain a sixth image, and then the local enhancement mapping matrix can be directly determined according to the difference between the sixth image and the down-sampled image .
- the processing process of one frame of image can be saved, the overhead of image processing can be saved, and the efficiency of image processing can be improved.
- the local enhancement mapping matrix when the local enhancement mapping matrix is determined according to the sixth image and the down-sampled image, the local enhancement mapping matrix may also be obtained by performing division, subtraction, or other operations on the two images. The description in the five-image determination of the local enhancement mapping matrix will not be repeated here.
- the above-mentioned down-sampled image may not be used.
- an image that is similar to the first image scene and whose resolution meets the processing bandwidth requirement of the image processing chip can be determined from a database containing a large number of various images, and then a description can be determined according to the image to describe the image that has undergone local enhancement processing and has not been processed.
- the local enhancement mapping matrix of the difference after the local enhancement processing is used to guide the local enhancement processing on the second image.
- local enhancement mapping matrices corresponding to images in different scenarios can also be simulated according to a large number of images, and before the first image to be processed is processed, a local enhancement matching the first image can be determined. mapping matrix, and then use the local enhancement mapping matrix to guide the local enhancement processing of the second image.
- the local enhancement mapping matrix when the target image is obtained by performing local enhancement processing on the second image according to the local enhancement mapping matrix, the local enhancement mapping matrix may be upsampled first, so that the rows of the local enhancement mapping matrix The number and the number of columns are consistent with the number of rows and columns of the second image, and then the up-sampled local enhancement mapping matrix is used to perform local enhancement processing on the second image to obtain the target image.
- the up-sampled local enhancement mapping matrix and the second image may be used to perform some specific operations to obtain the target image.
- the size of the local enhancement mapping matrix is half of the size of the second image, assuming that the local enhancement mapping matrix is a matrix of size 2*2, the size of the second image is 4*4 pixels, for the first row in the second image
- the parameters of the first row and the first column and the parameters of the first row and the second column in the local enhancement mapping matrix can be obtained, and then multiplied by the corresponding weights 3/4 respectively. , 1/4, calculate the weighted parameters, and then use the weighted parameters to calculate the new pixel value of the pixel point as the pixel value of the pixel point at the corresponding pixel position of the target image.
- the up-sampling local enhancement mapping matrix may be multiplied with the second image to obtain the target image.
- the value of the first row, first column of the up-sampling local enhancement mapping matrix can be multiplied by the pixel value of the first row and first column of the second image, and the obtained value is the first row of the target image.
- the pixel value of the pixel point in the first column of the row, and so on, can determine the target image.
- the up-sampling local enhancement mapping matrix may be added to the second image to obtain the target image.
- the value of the first row and first column of the up-sampling local enhancement mapping matrix can be added to the pixel value of the first row and first column of the second image, and the obtained value is the first row of the target image.
- the pixel value of the pixel point in the first column of the row, and so on, can determine the target image.
- the above is just an example of determining the target image by operating the local enhancement mapping matrix and the second image through a relatively simple algorithm.
- the local enhancement mapping matrix and the second image can be adjusted according to the algorithm for determining the local mapping matrix to obtain the target image.
- the algorithm of the image is not limited here.
- the high-frequency components and the low-frequency components of the second image can be determined first, wherein the high-frequency components and the low-frequency components can be pre-designed
- the high-frequency component refers to the part of the image where the pixel value changes drastically, that is, the detail part in the image, such as the contour edge of the object in the image
- the low-frequency component refers to the pixel value in the image.
- a local enhancement mapping matrix may be used to perform local enhancement processing on the low-frequency components of the second image to obtain a third image.
- the specific implementation details of using the local enhancement mapping matrix to perform the local enhancement processing on the low-frequency components can refer to the above description of the local enhancement processing on the second image using the local enhancement mapping matrix, which will not be repeated here.
- the third image and the high-frequency components may be fused, for example, by superimposing the third image and the high-frequency components to obtain the target image. In this way, while the local enhancement is performed on the second image, the details of the second image can also be well preserved.
- the reason for using the image processing chip for processing may be because the resolution of the first image exceeds the processing bandwidth of the image processing chip, or because the resolution of the first image exceeds The processing bandwidth of a function module in the image processing chip, for example, the upper limit of the image resolution that can be processed by a function module in the image processing chip located before the local enhancement processing function module is lower than the resolution of the first image. Therefore, in some embodiments, before the first image is input to the image processing chip, the first image may be divided into multiple sub-images, and then the multiple sub-images are sequentially input into the image processing chip to perform various deal with.
- the first image before the first image is input to the designated function module, the first image may be divided into multiple sub-images, and then the multiple sub-images are sequentially input to the designated function module.
- the upper limit of the resolution of the image that the functional module can process is lower than the resolution of the first image.
- the first image to be processed may be an image in any one of the following formats: a Raw image, an image in RGB format, an image in YUV format, and an image in RGBA format.
- image acquisition devices such as cameras include an image sensor (sensor) and an ISP chip.
- the image sensor After the image sensor collects the image, it will be sent to the ISP chip for local enhancement, noise reduction, white balance adjustment, shadow correction, sharpening and a series of processing before output.
- the resolution of the image collected by the image sensor becomes higher and higher, it may exceed the maximum processing bandwidth of the ISP chip. Therefore, it is necessary to divide the image into multiple sub-images, and then input them into the ISP chip for processing.
- the resulting multi-frame sub-images are synthesized to obtain the final target image. Since the image is divided into multiple sub-images and then the ISP chip is used for local enhancement processing, the synthesized image will have obvious stitching defects.
- the function of local enhancement processing needs to be turned off, so that the image cannot be locally enhanced.
- this embodiment provides a method, and the specific process is shown in FIG. 7 :
- the image sensor After the image sensor captures a frame of image A, it can be determined whether the resolution of the image A exceeds the upper limit of the image resolution that the ISP chip can process. Then, perform down-sampling processing on the image A to obtain an image B. The resolution of the image B after the down-sampling processing is lower than the upper limit of the image resolution that can be processed by the ISP chip. Then, under the condition that the local enhancement processing function of the ISP chip is turned on, the image B is input into the ISP chip for image processing to obtain the image C, and the image B is input to the ISP chip under the condition that the local enhancement processing function of the ISP chip is turned off Perform image processing to obtain image D. Then the image C and the image D are divided to obtain the local enhancement mapping matrix M. Among them, the values of the elements in the i-th row and the j-th column of the matrix are as follows:
- the image A can be divided into multiple sub-images, and the multiple-frame sub-images are sequentially input into the ISP chip for processing, and then the processed multiple-frame sub-images are synthesized to obtain image E.
- the high-frequency component of the image E is extracted by a pre-designed filter to obtain the image F
- the low-frequency component image G of the image E is obtained by subtracting the image F from the image E.
- the image H is obtained by multiplying the local enhancement mapping matrix M and the low-frequency component image G, and then the image H and the high-frequency component image F are superimposed to obtain the final target image.
- the ISP chip can also be used to perform local enhancement processing and other processing on the image to ensure the processing effect of the image.
- the present application also provides an image processing apparatus.
- the apparatus includes a processor 81 , a memory 82 , and a computer program stored in the memory 82 for execution by the processor 81 .
- the computer 81 executes the computer program, the following steps are implemented:
- the local enhancement mapping matrix being used to describe the difference between the downsampled image that has undergone local enhancement processing and the downsampled image that has not undergone local enhancement processing;
- a target image is obtained by performing local enhancement processing on the second image based on the local enhancement mapping matrix.
- the processor before the processor is configured to perform downsampling processing on the first image to be processed, the processor is further configured to:
- the image processing chip is used for performing the local enhancement processing and the other image processing on the first image.
- the processor when the processor is configured to perform local enhancement processing on the second image based on the local enhancement mapping matrix to obtain the target image, the processor is specifically configured to:
- the target image is obtained by performing local enhancement processing on the second image by using the local enhancement mapping matrix after the upsampling processing.
- the processor when the processor is configured to perform local enhancement processing on the second image based on the local enhancement mapping matrix to obtain the target image, the processor is specifically configured to:
- the target image is obtained by fusing the third image and the high frequency component.
- the processor when the processor is configured to determine a local enhancement mapping matrix based on the down-sampled image, it is specifically configured to:
- the local enhancement mapping matrix is determined according to the difference between the fourth image and the fifth image.
- the processor when the processor is configured to determine the local enhancement mapping matrix according to the difference between the fourth image and the fifth image, the processor is specifically configured to:
- the local enhancement mapping matrix is obtained by dividing the fourth image and the fifth image.
- the local enhancement mapping matrix is obtained by subtracting the fourth image and the fifth image.
- the processor when the processor is configured to perform local enhancement processing on the second image by using the local enhancement mapping matrix after upsampling processing to obtain the target image, the processor is specifically configured to:
- the local enhancement mapping matrix is obtained by dividing the fourth image and the fifth image, then multiplying the up-sampled local enhancement mapping matrix and the second image to obtain the the target image;
- the local enhancement mapping matrix is obtained by subtracting the fourth image and the fifth image, performing an addition operation on the up-sampling processed local enhancement mapping matrix and the second image to obtain the target image.
- the processor when the processor is configured to determine a local enhancement mapping matrix based on the down-sampled image, it is specifically configured to:
- the local enhancement mapping matrix is determined according to the difference between the sixth image and the down-sampled image.
- the timing of performing the step of dividing the first image into a plurality of sub-images includes:
- the image processing chip Before the first image is input to the image processing chip, the image processing chip is configured to perform the local enhancement processing and the other image processing on the first image; or
- the upper limit of the resolution of the image that can be processed by the designated function module is lower than the resolution of the first image.
- the image processing chip is an ISP chip.
- the first image includes any of the following: a Raw image, an image in RGB format, an image in YUV format, and an image in RGBA format.
- the present application also provides an image acquisition device, as shown in FIG. 9 , the image acquisition device includes an image sensor 91 and an image processing device 92, and the image processing device includes a processor 921, a memory 922, a The memory 922 can be a computer program executable by the processor 921.
- the processor 921 executes the computer program, the following steps are implemented:
- the local enhancement mapping matrix is used to describe the difference between the downsampled image that has undergone local enhancement processing and the downsampled image that has not undergone local enhancement processing;
- a target image is obtained by performing local enhancement processing on the second image based on the local enhancement mapping matrix.
- an embodiment of the present specification further provides a computer storage medium, where a program is stored in the storage medium, and when the program is executed by a processor, the image processing method in any of the foregoing embodiments is implemented.
- Embodiments of the present specification may take the form of a computer program product embodied on one or more storage media having program code embodied therein, including but not limited to disk storage, CD-ROM, optical storage, and the like.
- Computer-usable storage media includes permanent and non-permanent, removable and non-removable media, and storage of information can be accomplished by any method or technology.
- Information may be computer readable instructions, data structures, modules of programs, or other data.
- Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash Memory or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
- PRAM phase-change memory
- SRAM static random access memory
- DRAM dynamic random access memory
- RAM random access memory
- ROM read only memory
- EEPROM Electrically Erasable Programmable Read Only Memory
- Flash Memory or other memory technology
- CD-ROM Compact Disc Read Only Memory
- CD-ROM Compact Disc Read Only Memory
- DVD Digital Versatile Disc
- Magnetic tape cartridges magnetic tape magnetic disk storage or other magnetic storage devices or any other non-
- the apparatus embodiments since they basically correspond to the method embodiments, reference may be made to the partial descriptions of the method embodiments for related parts.
- the device embodiments described above are only illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in One place, or it can be distributed over multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment. Those of ordinary skill in the art can understand and implement it without creative effort.
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
一种图像处理方法、装置及图像采集设备。所述方法包括:对待处理的第一图像进行下采样处理,得到下采样图像;基于所述下采样图像确定局部增强映射矩阵,所述局部增强映射矩阵用于描述经过局部增强处理的所述下采样图像与未经过局部增强处理的所述下采样图像之间的差异;对所述第一图像划分得到的多张子图像分别进行除局部增强处理之外的其他图像处理,并利用处理后的多张子图像合成第二图像;基于所述局部增强映射矩阵对所述第二图像进行局部增强处理得到目标图像。通过上述方法可以避免因为要将图像划分为多帧子图像后再利用图像处理芯片进行局部增强处理后图像出现明显拼接瑕疵的问题。
Description
本申请涉及图像处理技术领域,具体而言,涉及一种图像处理方法、装置及图像采集设备。
为了提升图像的显示效果,在采集到图像后,会采用图像处理芯片对图像进行降噪、镜头阴影矫正、白平衡调节、锐化、局部增强等一系列处理。随着图像传感器的制备工艺的发展,其采集的图像的分辨率越来越高,可能会出现图像的分辨率超过图像处理芯片的处理带宽的上限的场景,因而,需要先将图像划分成多帧子图像后,再采用图像处理芯片分别对多帧子图像进行处理,然后将处理后的子图像合成得到经过图像处理芯片处理后的目标图像。但是由于将图像划分成多帧子图像后,再对图像进行局部增强处理,会导致最终合成的图像出现明显的拼接瑕疵,严重影响图像的显示效果。
发明内容
有鉴于此,本申请提供一种图像处理方法、装置及图像采集设备。
根据本申请的第一方面,提供一种图像处理方法,所述方法包括:
对待处理的第一图像进行下采样处理,得到下采样图像;
基于所述下采样图像确定局部增强映射矩阵,所述局部增强映射矩阵用于描述经过局部增强处理的所述下采样图像与未经过局部增强处理的所述下采样图像之间的差异;
对所述第一图像划分得到的多张子图像分别进行除局部增强处理之外的其他图像处理,并利用处理后的多张子图像合成第二图像;
基于所述局部增强映射矩阵对所述第二图像进行局部增强处理得到目标图像。
根据本申请的第二方面,提供一种图像处理装置,所述装置包括处理器、存储器、存储于所述存储器可供所述处理器执行的计算机程序,所述处理器执行所述计算机程序时,实现以下步骤:
对待处理的第一图像进行下采样处理,得到下采样图像;
基于所述下采样图像确定局部增强映射矩阵,所述局部增强映射矩阵用于描述经过局部增强处理的所述下采样图像与未经过局部增强处理的所述下采样图像之间的差异;
对所述第一图像划分得到的多张子图像分别进行除局部增强处理之外的其他图像处理,并利用处理后的多张子图像合成第二图像;
基于所述局部增强映射矩阵对所述第二图像进行局部增强处理得到目标图像。
根据本申请的第三方面,提供一种图像采集设备,所述图像采集设备包括图像传感器以及上述第二方面所述的图像处理装置。
根据本申请的第四方面,提供一种计算机可读存储介质,其上存储有计算机程序指令,当该指令被处理器执行时,可实现上述第一方面提及的图像处理方法。
应用本申请提供的方案,可以对待处理的第一图像进行下采样处理,使得下采样处理得到的下采样图像满足图像处理芯片的处理带宽要求,然后利用下采样图像确定用于描述经过局部增强处理的下采样图像与未经过局部增强处理的下采样图像之间的差异的局部增强映射矩阵。可以对第一图像划分得到的多张子图像分别进行除局部增强处理之外的其他图像处理,并利用处理后的多张子图像合成第二图像,再利用局部增强映射矩阵对第 二图像进行局部增强处理,得到目标图像。通过上述方法,既可以实现将图像划分成多帧子图像后再利用图像处理芯片对其进行图像处理,使得图像处理芯片可以处理分辨率高于其处理带宽上限的图像,同时,也可以避免因为要将图像划分为多帧子图像后再利用图像处理芯片进行局部增强处理后图像出现明显拼接瑕疵的问题。
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一个实施例的将图像划分成多帧子图像再利用图像处理芯片处理的示意图。
图2是本申请实施例的开启局部增强处理功能时将图像划分成多帧子图像再利用图像处理芯片处理后的图像效果图。
图3(a)是本申请一个实施例的图像处理方法流程图。
图3(b)是本申请一个实施例的一种图像处理方法示意图。
图4(a)和图4(b)是本申请一个实施例的确定局部增强映射矩阵的示意图。
图5和图6是本申请一个实施例的根据局部增强映射矩阵和第二图像得到目标图像的示意图。
图7是本申请一个实施例的一种图像处理方法示意图。
图8是本申请一个实施例的一种图像处理装置的逻辑结构示意图
图9是本申请一个实施例的一种图像采集设备的逻辑结构示意图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
在图像传感器采集到图像后,通常会对图像进行降噪、镜头阴影矫正、白平衡调节、锐化、局部增强等一系列处理,以提升图像的显示效果。上述一系列的图像处理可以利用集成上述功能的图像处理芯片(比如ISP芯片)来实现。随着图像传感器的制备工艺的发展,其采集的图像的分辨率越来越高,可能会出现图像的分辨率超过图像处理芯片的处理带宽的上限的场景,这种场景下,如图1所示,需要先将图像划分成多帧子图像后,再采用图像处理芯片分别对多帧子图像进行处理,然后将处理后的子图像合成得到经过图像处理芯片处理后的目标图像。但是在对图像进行局部增强处理时,由于处理过程中需要参考各像素点周围的像素点的亮度值来对图像进行局部增强处理,如果将图像划分成多帧子图像后再对图像进行局部增强处理,会导致最终合成的图像出现明显的拼接瑕疵,如图2所示,严重影响图像的显示效果。
由于图像处理芯片通常包括多个功能模块,每个功能模块可以对图像进行一种处理,比如使用降噪功能模块对图像进行降噪处理,使用白平衡调节模块可以对图像进行白平衡调节,使用局部增强处理模块可以对图像进行局部增强处理,增加图像的对比度,在利用图像处理芯片对图像进行处理时,各功能模块的功能可以设置成开启或者关闭,比如开启局部增强处理功能,则图像处理芯片就会对图像进行局部增强处理,关闭局部增强处理功能,则图像处理芯片不会执行局部增强处理的功能,仅执行其他开启的功能模块的处理功能。因此,在将图像划分成多帧子图像后再利用图 像处理芯片进行处理的场景,要么选择关闭对图像进行局部增强处理这一功能,牺牲图像的动态范围,要么选择开启局部增强处理这一功能,但又会导致处理后的图像瑕疵。
为了解决上述问题,本申请提供一种图像处理方法,既可以实现将图像划分成多帧子图像后再利用图像处理芯片对其进行图像处理,使得图像处理芯片可以处理分辨率高于其处理带宽上限的图像,同时,也可以避免因为要将图像划分为多帧子图像后再利用图像处理芯片处理而无法对其进行局部增强处理,或者局部增强处理后图像出现明显瑕疵的问题。
本申请实施例的图像处理方法适用于各种可以对图像进行局部增强处理以及其他图像处理的设备,其他图像处理包括降噪、白平衡调节、阴影矫正、锐化等一种或多种。该设备可以相机、手机等具有图像采集功能的设备,在采集到图像后即可以对图像进行上述处理。当然,该设备也可以是仅具有图像处理功能的设备,该设备从图像采集设备获取其采集的图像后再进行上述处理。其中,该设备可以包括配置有上述图像处理功能的图像处理芯片,比如,在一些实施例中,该图像处理芯片可以是ISP芯片,通过图像处理芯片实现对图像进行局部增强、降噪、白平衡调节、阴影矫正、锐化等一种或多种处理。
本申请实施例的图像处理方法可以用于对各种图像进行处理,比如,可以是可见光图像、红外图像或者其他图像,本申请不作限制。
以下结合图3(a)和图3(b)介绍本申请实施例提供的图像处理方法,所述方法的流程如图3(a)所示,包括以下步骤:
S302、对待处理的第一图像进行下采样处理,得到下采样图像;
S304、基于所述下采样图像确定局部增强映射矩阵,所述局部增强映射矩阵用于描述经过局部增强处理的所述下采样图像与未经过局部增强处理的所述下采样图像之间的差异;
S306、对所述第一图像划分得到的多张子图像分别进行除局部增强处理之外的其他图像处理,并利用处理后的多张子图像合成第二图像;
S308、基于所述局部增强映射矩阵对所述第二图像进行局部增强处理得到目标图像。
可参考图3(b)中示出的本申请实施例提供的图像处理方法的示意图,获取到待处理的图像后(以下将待处理的图像统称为第一图像),可以对第一图像进行下采样处理,得到下采样图像。其中,下采样的目的是为了降低第一图像的分辨率,使其符合图像处理芯片的处理带宽上限的要求(下采样图像的分辨率低于图像处理芯片所能处理的图像的分辨率的上限即可),这样便可以直接利用图像处理芯片对下采样图像进行局部增强处理。
确定下采样图像后,可以利用下采样图像确定局部增强映射矩阵,其中,局部增强映射矩阵可以用于描述经过局部增强处理的下采样图像与未经过局部增强处理的下采样图像之间的差异。局部增强映射矩阵的行数和列数可以与下采样图像的行数和列数一致,局部增强映射矩阵每个元素的数值可以用于描述经过局部增强处理的下采样图像与未经过局部增强处理的下采样图像某个像素位置像素点的像素值之间的差异。
然后可以将第一图像进行划分,得到多张子图像。其中,将第一图像划分得到多张子图像的目的是为了降低图像的分辨率,以便可以满足图像处理芯片处理带宽的需求。在对第一图像进行划分时,可以划分成多个大小相同的子图像,也可以划分成多个大小不同的子图像,并且,划分得到的多张子图像可以有部分重叠区域,也可以没有重叠区域,本申请实施例不作限制。在一些实施例中,为了子图像在处理后合成得到的目标图像有更好的效果,避免边缘出现拼接瑕疵,划分得到的多张子图像中可以包括部分重叠的区域。将第一图像划分得到多张子图像后,可以对图像进行除局部增强处理以外的图像处理,比如该图像处理可以是降噪、相机阴影矫正、白平衡调节、锐化、全局增强处理等任意一种或者多种处理。当然,为了避免处理后的子图像在拼接时会出现拼接瑕疵,可以在关闭图像处理芯片的局部增强处理功能的情况下利用图像处理芯片对子图像进行其他的处理,然后利用处理后的子图像合成得到第二图像,通过这种方式合成得 到的第二图像可以实现除局部增强处理之外的图像效果。
由于第二图像没有经过局部增强处理,为了增大图像的动态范围,可以利用局部增强映射矩阵对第二图像进行局部增强处理,得到目标图像。
由于图像分辨率对于降噪、白平衡等其他图像处理的处理效果影响较大,因而可以采用划分成多帧子图像的方式利用图像处理芯片进行处理,然后合成得到第二图像,而图像分辨率对局部增强处理的处理效果影响较小,因而可以利用图像处理芯片对下采样图像进行局部增强处理,以确定局部增强映射矩阵,再利用局部增强映射矩阵指导第二图像的局部增强处理。通过上述方式处理得到的目标图像,既可以具备由图像处理芯片所有功能模块处理后的效果,又不会出现拼接瑕疵的问题。
需要指出的是,本申请实施例对上述步骤S302和步骤S306的执行顺序不作限制,步骤S302可以在步骤S306之前执行,也可以在步骤S306之后执行,或者步骤S302和步骤S306可以同时执行。
当然,当第一图像的分辨率低于图像处理芯片所能处理的图像的分辨率的上限时,则可以不用将图像划分成多帧子图像后,再利用图像处理芯片处理,因而可以将整张图像输入至图像处理芯片,完成局部增强、降噪、相机阴影矫正、白平衡调节、锐化等所有图像处理,并且也不会出现拼接瑕疵的问题。当第一图像的分辨率高于图像处理芯片所能处理的图像的分辨率的上限时,图像处理芯片无法一次处理整张图像,所以需要将第一图像划分成多帧子图像,再分别处理,这种情况才会导致局部增强处理后的子图像合成目标图像时出现拼接瑕疵。所以,在一些实施例中,在利用上述图像处理方法处理第一图像之前,可以先确定第一图像的分辨率是否高于指定分辨率,如果高于,则执行上述对第一图像进行下采样处理等步骤。如果不高于,则可以直接将第一图像输入到图像处理芯片完成所有的图像处理。其中,指定分辨率可以根据图像处理芯片的处理带宽确定,比如,指定分辨率可以是图像处理芯片所能处理的图像的最大分辨率,或者是最大分辨率减去一定缓冲阈值得到的分辨率。
在一些实施例中,如图4(a)所示,通过下采样图像确定局部增强映射矩阵时,可以先对下采样图像进行局部增强处理以及除局部增强处理之外的其他图像处理,得到第四图像,然后对仅对下采样图像进行除局部增强处理之外的其他图像处理,得到第五图像。然后可以根据第四图像和第五图像的差异确定局部增强映射矩阵。
在一些实施例中,在根据第四图像和第五图像的差异确定局部增强映射矩阵时,可以对第四图像与第五图像进行除法运算得到局部增强映射矩阵。比如,可以将第四图像第一行第一列的像素值与第五图像第一行第一列的像素值相除,得到的值即为局部增强映射矩阵第一行第一列的元素对应的数值,以此类推,即可以确定局部增强映射矩阵。
在一些实施例中,在根据第四图像和第五图像的差异确定局部增强映射矩阵时,可以对第四图像与第五图像进行减法运算得到局部增强映射矩阵。比如,可以将第四图像第一行第一列的像素值与第五图像第一行第一列的像素值相减,得到的值即为局部增强映射矩阵第一行第一列的元素对应的数值,以此类推,即可以确定局部增强映射矩阵。
当然,以上只是通过第四图像和第五图像确定局部增强映射矩阵较为简单的算法,实际处理时,也可以采用其他算法确定增强映射矩阵,只要能表征下采样图像经过局部增强处理前后的差异即可,本申请实施例不作限制。
当然,在根据下采样图像确定局部增强映射矩阵时,如果要先对下采样图像进行局部增强处理以及除局部增强处理之外的其他图像处理,得到第四图像,然后再对下采样图像进行除局部增强处理之外的其他图像处理,得到第五图像,需对两帧图像进行处理,处理时间较长,会影响图像处理的效率。所以,在一些实施例中,如图4(b)所示,也可以先对下采样图像进行局部增强处理得到第六图像,然后直接根据第六图像和下采样图像的差异确定局部增强映射矩阵。通过这种方式,可以节省一帧图像的处理过程,节省图像处理的开销,并且提升图像处理的效率。其中,根据第六 图像和下采样图像确定局部增强映射矩阵时,也可以采用将两个图像进行除法运算、减法运算或者其他运算得到局部增强映射矩阵,具体实现细节可参考根据第四图像和第五图像确定局部增强映射矩阵中的描述,在此不再赘述。
当然,在一些实施例中,在确定局部增强映射矩阵时,也可以不使用上述下采样图像。比如,可以从包含大量各种图像的数据库中确定和第一图像场景类似且分辨率符合图像处理芯片的处理带宽需求的图像,然后可以根据该图像确定用于描述该图像经过局部增强处理和未经过局部增强处理的差异的局部增强映射矩阵,利用该局部映射矩阵指导对第二图像进行局部增强处理。当然,在某些实施例中,也可以根据大量的图像模拟出不同场景下的图像对应的局部增强映射矩阵,在对待处理的第一图像进行处理之前,可以确定与第一图像匹配的局部增强映射矩阵,然后利用该局部增强映射矩阵指导第二图像的局部增强处理。
在一些实施例中,如图5所示,在根据局部增强映射矩阵对第二图像进行局部增强处理得到目标图像时,可以先对局部增强映射矩阵进行上采样处理,使得局部增强映射矩阵的行数和列数与第二图像的行数和列数一致,然后再利用上采样后的局部增强映射矩阵对第二图像进行局部增强处理,得到目标图像。利用上采样后的局部增强映射矩阵对第二图像进行局部增强处理时,可以采用上采样处理后的局部增强映射矩阵和第二图像进行某些特定的运算,得到目标图像。当然,也可以不对局部增强映射矩阵进行上采样处理,而是在对第二图像中待处理的像素点/图像块进行局部增强处理时,基于当前待处理的像素点/图像块选择与之对应的局部增强映射矩阵中的参数后,对该参数进行插值/加权平均得到新的参数,进而利用新的参数对当前待处理的像素点/图像块进行局部增强处理。例如,局部增强映射矩阵的尺寸为第二图像的尺寸的一半,假设局部增强映射矩阵为2*2尺寸的矩阵,第二图像的尺寸为4*4个pixel,针对第二图像中第一行第二列的像素点,在进行局部增强处理时,可以获取局部增强映射矩阵中的第 一行第一列的参数以及第一行第二列的参数,然后分别乘以对应的权重3/4、1/4,计算得到加权后的参数,进而利用加权后的参数计算该像素点的新的像素值,作为目标图像在对应像素位置上像素点的像素值。在一些实施中,也可以直接对第二图像进行下采样处理,然后利用局部增强映射矩阵直接对对下采样处理后的第二图像进行局部增强后,再进行上采样处理,得到目标图像。
在一些实施例中,如果局部增强映射矩阵是通过第四图像与所述第五图像(或者第六图像与下采样图像)进行除法运算得到,则根据上采样处理后的局部增强映射矩阵对第二图像进行局部增强处理时,可以将该上采样处理后的局部增强映射矩阵与第二图像进行乘法运算,得到目标图像。比如,可以将上采样处理后的局部增强映射矩阵的第一行第一列的数值与第二图像第一行第一列的像素点的像素值相乘,得到的数值即为目标图像第一行第一列的像素点的像素值,以此类推,即可以确定目标图像。
在一些实施例中,如果局部增强映射矩阵是通过第四图像与所述第五图像(或者第六图像与下采样图像)进行减法运算得到,则根据上采样处理后的局部增强映射矩阵对第二图像进行局部增强处理时,可以将该上采样处理后的局部增强映射矩阵与第二图像进行加法运算,得到目标图像。比如,可以将上采样处理后的局部增强映射矩阵的第一行第一列的数值与第二图像第一行第一列的像素点的像素值相加,得到的数值即为目标图像第一行第一列的像素点的像素值,以此类推,即可以确定目标图像。
当然,以上只是通过较为简单的算法将局部增强映射矩阵和第二图像进行运算确定目标图像的例子,实际处理时,可以根据确定局部映射矩阵的算法调整利用局部增强映射矩阵和第二图像得到目标图像的算法,在此不作限制。
由于图像的动态范围主要通过其背景部分(即低频成分)体现,在一些实施例中,为了避免利用局部增强映射矩阵对第二图像进行局部增强处理时,造成第二图像的细节部分损失。因此,如图6所示,在利用局部增强 映射矩阵对第二图像进行局部增强处理时,可以先确定第二图像的高频成分和低频成分,其中,高频成分和低频成分可以通过预先设计的高频滤波器或者低频滤波器提取,高频成分是指图像中像素值变化较为剧烈的部分,即图像中的细节部分,比如图像中物体的轮廓边缘等,低频成分是指图像中像素值变化较为平缓的部分,主要是图像中的背景部分。在确定第二图像的高频成分和低频成分后,可以利用局部增强映射矩阵对第二图像的低频成分进行局部增强处理,得到第三图像。其中,利用局部增强映射矩阵对低频成分进行局部增强处理的具体实现细节可以参考上述利用局部增强映射矩阵对第二图像进行局部增强处理的描述,在此不再赘述。得到第三图像后,可以融合第三图像和高频成分,比如将第三图像和高频成分叠加,得到目标图像。通过这种方式,在对第二图像进行局部增强的同时,也可以很好的保留第二图像的细节部分。
由于将第一图像划分成多帧子图像后,再利用图像处理芯片进行处理原因可能是因为第一图像的分辨率超过该图像处理芯片的处理带宽,也可能是因为第一图像的分辨率超过图像处理芯片中的某个功能模块的处理带宽,比如,图像处理芯片中某个位于局部增强处理功能模块之前的功能模块所能处理的图像分辨率上限低于第一图像的分辨率。所以,在一些实施例中,可以在将第一图像输入至图像处理芯片之前,就将第一图像划分成多帧子图像,然后将多帧子图像依次输入至图像处理芯片中,进行各项处理。当然,在一些实施例中,也可以在将第一图像输入至指定功能模块之前,再将第一图像划分成多帧子图像,然后依次将多帧子图像输入至该指定功能模块,该指定功能模块所能处理的图像的分辨率的上限低于第一图像的分辨率。
在一些实施例中,待处理的第一图像可以是以下任一种格式的图像:Raw图像、RGB格式的图像、YUV格式的图像和RGBA格式的图像。
为了进一步解释本申请提供的图像处理方法,以下结合一个具体的实施例加以解释。
通常相机等图像采集设备包括图像传感器(sensor)和ISP芯片。图像传感器采集到图像后,会发送给ISP芯片进行局部增强、降噪、白平衡调节、阴影矫正、锐化等一系列处理后再输出。随着图像传感器采集的图像分辨率越来越高,可能会超过ISP芯片的最大处理带宽,因此,需要将图像划分成多帧子图像后,再依次输入到ISP芯片中进行处理,然后将处理后的多帧子图像合成得到最终的目标图像。由于将图像划分成多帧子图像再采用ISP芯片进行局部增强处理,合成的图像会有明显的拼接瑕疵,所以,目前在采用ISP芯片对分辨率高于其处理带宽的图像进行处理时,通常需要关闭局部增强处理的功能,使得图像无法进行局部增强处理。
为了避免上述问题,本实施例提供一种方法,具体过程如图7所示:
在图像传感器采集到一帧图像A后,可以先判定该图像A的分辨率是否超过ISP芯片所能处理的图像分辨率的上限,如果未超过,则直接输入ISP芯片进行后续处理,如果超过,则对该图像A进行下采样处理,得到图像B,下次采样处理后的图像B的分辨率低于ISP芯片的所能处理的图像分辨率的上限。然后在开启ISP芯片局部增强处理功能的条件下,将图像B输入至ISP芯片中进行图像处理,得到图像C,以及在关闭ISP芯片的局部增强处理功能的条件下将图像B输入至ISP芯片中进行图像处理,得到图像D。然后将图像C和图像D进行除法运算,得到局部增强映射矩阵M。其中,矩阵中第i行第j列的元素的数值如下:
M[ij]=图像C[ij]/图像D[ij]
然后可以在关闭ISP芯片的局部增强处理功能的条件下,将图像A划分成多帧子图像,依次将多帧子图像输入至ISP芯片中进行处理,然后利用处理后的多帧子图像合成得到图像E。利用预先设计的滤波器提起图像E的高频成分,得到图像F,利用图像E减去图像F得到图像E的低频成分图像G。利用局部增强映射矩阵M与低频成分图像G做乘法运算得到图像H,然后利用图像H和高频成分图像F叠加,即可以得到最终的目标图像。
通过上述方法,可以在图像的分辨率高于ISP芯片的处理带宽时,也可以采用ISP芯片对图像进行局部增强处理以及其他的处理,保证图像的处理效果。
进一步的,本申请还一种图像处理装置,如图8所示,所述装置包括处理器81、存储器82、存储于所述存储器82可供所述处理器81执行的计算机程序,所述处理器81执行所述计算机程序时,实现以下步骤:
对待处理的第一图像进行下采样处理,得到下采样图像;
基于所述下采样图像确定局部增强映射矩阵,所述局部增强映射矩阵用于描述经过局部增强处理的所述下采样图像与未经过局部增强处理的所述下采样图像之间的差异;
对所述第一图像划分得到的多张子图像分别进行图像处理,并利用处理后的多张子图像合成第二图像;
基于所述局部增强映射矩阵对所述第二图像进行局部增强处理得到目标图像。
在一些实施例中,所述处理器用于对待处理的第一图像进行下采样处理之前,还用于:
确定所述第一图像的分辨率是否高于指定分辨率,若是,执行所述对待处理的第一图像进行下采样处理的步骤,其中,所述指定分辨率基于图像处理芯片的处理带宽确定,所述图像处理芯片用于对所述第一图像进行所述局部增强处理以及所述其他图像处理。
在一些实施例中,所述处理器用于基于所述局部增强映射矩阵对所述第二图像进行局部增强处理得到目标图像时,具体用于:
对所述局部增强映射矩阵进行上采样处理;
利用上采样处理后的所述局部增强映射矩阵对所述第二图像进行局部增强处理,得到所述目标图像。
在一些实施例中,所述处理器用于基于所述局部增强映射矩阵对所述第二图像进行局部增强处理得到目标图像时,具体用于:
确定所述第二图像的高频成分和低频成分;
对所述局部增强映射矩阵进行上采样处理;
利用上采样处理后的所述局部映射矩阵对所述低频成分进行局部增强处理,得到第三图像;
融合所述第三图像与所述高频成分,得到所述目标图像。
在一些实施例中,所述处理器用于基于所述下采样图像确定局部增强映射矩阵时,具体用于:
对所述下采样图像进行局部增强处理和所述其他图像处理,得到第四图像;
对所述下采样图像进行所述其他图像处理,得到第五图像;
根据所述第四图像与所述第五图像的差异确定所述局部增强映射矩阵。
在一些实施例中,所述处理器用于根据所述第四图像与所述第五图像的差异确定所述局部增强映射矩阵时,具体用于:
对所述第四图像与所述第五图像进行除法运算得到所述局部增强映射矩阵;或
对所述第四图像与所述第五图像进行减法运算得到所述局部增强映射矩阵。
在一些实施例中,所述处理器用于利用上采样处理后的所述局部增强映射矩阵对所述第二图像进行局部增强处理,得到所述目标图像时,具体用于:
若所述局部增强映射矩阵通过所述第四图像与所述第五图像进行除法运算得到,则对所述上采样处理后的局部增强映射矩阵与所述第二图像进行乘法运算,得到所述目标图像;或
若所述局部增强映射矩阵通过所述第四图像与所述第五图像进行减法运算得到,则对所述上采样处理后的局部增强映射矩阵与所述第二图像进行加法运算,得到所述目标图像。
在一些实施例中,所述处理器用于基于所述下采样图像确定局部增强映射矩阵时,具体用于:
对所述下采样图像进行局部增强处理,得到第六图像;
根据所述第六图像与所述下采样图像的差异确定所述局部增强映射矩阵。
在一些实施例中,执行将所述第一图像划分为多张子图像的步骤的时机包括:
在将所述第一图像输入至图像处理芯片之前,所述图像处理芯片用于对所述第一图像进行所述局部增强处理以及所述其他图像处理;或
将所述待处理图像输入至所述图像处理芯片的指定功能模块之前,所述指定功能模块所能处理的图像的分辨率的上限低于所述第一图像的分辨率。
在一些实施例中,所述图像处理芯片为ISP芯片。
在一些实施例中,所述第一图像包括以下任一种:Raw图像、RGB格式的图像、YUV格式的图像和RGBA格式的图像。
其中,所述图像处理装置对图像进行处理的具体细节可参考上述方法各实施例中的描述,本申请不作限制。
此外,本申请还提供了一种图像采集设备,如图9所示,所述图像采集设备包括图像传感器91和图像处理装置92,所述图像处理装置包括处理器921、存储器922、存储于所述存储器922可供所述处理器921执行的计算机程序,所述处理器921执行所述计算机程序时,实现以下步骤:
对待处理的第一图像进行下采样处理,得到下采样图像;
基于所述下采样图像确定局部增强映射矩阵,所述局部增强映射矩阵用于描述经过局部增强处理的所述下采样图像与未经过局部增强处理的所 述下采样图像之间的差异;
对所述第一图像划分得到的多张子图像分别进行图像处理,并利用处理后的多张子图像合成第二图像;
基于所述局部增强映射矩阵对所述第二图像进行局部增强处理得到目标图像。
其中,所述图像处理装置对图像进行处理的具体细节可参考上述方法各实施例中的描述,本申请不作限制。
相应地,本说明书实施例还提供一种计算机存储介质,所述存储介质中存储有程序,所述程序被处理器执行时实现上述任一实施例中图像处理方法。
本说明书实施例可采用在一个或多个其中包含有程序代码的存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。计算机可用存储介质包括永久性和非永久性、可移动和非可移动媒体,可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括但不限于:相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。
对于装置实施例而言,由于其基本对应于方法实施例,所以相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上对本发明实施例所提供的方法和装置进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。
Claims (23)
- 一种图像处理方法,其特征在于,所述方法包括:对待处理的第一图像进行下采样处理,得到下采样图像;基于所述下采样图像确定局部增强映射矩阵,所述局部增强映射矩阵用于描述经过局部增强处理的所述下采样图像与未经过局部增强处理的所述下采样图像之间的差异;对所述第一图像划分得到的多张子图像分别进行除局部增强处理之外的其他图像处理,并利用处理后的多张子图像合成第二图像;基于所述局部增强映射矩阵对所述第二图像进行局部增强处理得到目标图像。
- 根据权利要求1所述的方法,其特征在于,对待处理的第一图像进行下采样处理之前,还包括:确定所述第一图像的分辨率是否高于指定分辨率,若是,执行所述对待处理的第一图像进行下采样处理的步骤,其中,所述指定分辨率基于图像处理芯片的处理带宽确定,所述图像处理芯片用于对所述第一图像进行所述局部增强处理以及所述其他图像处理。
- 根据权利要求1或2所述的方法,其特征在于,基于所述局部增强映射矩阵对所述第二图像进行局部增强处理得到目标图像,包括:对所述局部增强映射矩阵进行上采样处理;利用上采样处理后的所述局部增强映射矩阵对所述第二图像进行局部增强处理,得到所述目标图像。
- 根据权利要求1或2所述的方法,其特征在于,基于所述局部增强映射矩阵对所述第二图像进行局部增强处理得到目标图像,包括:确定所述第二图像的高频成分和低频成分;对所述局部增强映射矩阵进行上采样处理;利用上采样处理后的所述局部映射矩阵对所述低频成分进行局部增强处理,得到第三图像;融合所述第三图像与所述高频成分,得到所述目标图像。
- 根据权利要求1-4任一项所述的方法,其特征在于,基于所述下采样图像确定局部增强映射矩阵,包括:对所述下采样图像进行局部增强处理和所述其他图像处理,得到第四图像;对所述下采样图像进行所述其他图像处理,得到第五图像;根据所述第四图像与所述第五图像的差异确定所述局部增强映射矩阵。
- 根据权利要求5所述的方法,其特征在于,根据所述第四图像与所述第五图像的差异确定所述局部增强映射矩阵,包括:对所述第四图像与所述第五图像进行除法运算得到所述局部增强映射矩阵;或对所述第四图像与所述第五图像进行减法运算得到所述局部增强映射矩阵。
- 根据权利要求6所述的方法,其特征在于,利用上采样处理后的所述局部增强映射矩阵对所述第二图像进行局部增强处理,得到所述目标图像,包括:若所述局部增强映射矩阵通过所述第四图像与所述第五图像进行除法运算得到,则对所述上采样处理后的局部增强映射矩阵与所述第二图像进行乘法运算,得到所述目标图像;或若所述局部增强映射矩阵通过所述第四图像与所述第五图像进行减法运算得到,则对所述上采样处理后的局部增强映射矩阵与所述第二图像进行加 法运算,得到所述目标图像。
- 根据权利要求1-4任一项所述的方法,其特征在于,基于所述下采样图像确定局部增强映射矩阵,包括:对所述下采样图像进行局部增强处理,得到第六图像;根据所述第六图像与所述下采样图像的差异确定所述局部增强映射矩阵。
- 根据权利要求1-8任一项所述的方法,其特征在于,执行将所述第一图像划分为多张子图像的步骤的时机包括:在将所述第一图像输入至图像处理芯片之前,所述图像处理芯片用于对所述第一图像进行所述局部增强处理以及所述其他图像处理;或将所述第一图像输入至所述图像处理芯片的指定功能模块之前,所述指定功能模块所能处理的图像的分辨率的上限低于所述第一图像的分辨率。
- 根据权利要求2或9所述的方法,其特征在于,所述图像处理芯片为ISP芯片。
- 根据权利要求1-10任一项所述的方法,其特征在于,所述第一图像包括以下任一种:Raw图像、RGB格式的图像、YUV格式的图像和RGBA格式的图像。
- 一种图像处理装置,其特征在于,所述装置包括处理器、存储器、存储于所述存储器可供所述处理器执行的计算机程序,所述处理器执行所述计算机程序时,实现以下步骤:对待处理的第一图像进行下采样处理,得到下采样图像;基于所述下采样图像确定局部增强映射矩阵,所述局部增强映射矩阵用于描述经过局部增强处理的所述下采样图像与未经过局部增强处理的所述下采样图像之间的差异;对所述第一图像划分得到的多张子图像分别进行除局部增强处理之外的 其他图像处理,并利用处理后的多张子图像合成第二图像;基于所述局部增强映射矩阵对所述第二图像进行局部增强处理得到目标图像。
- 根据权利要求12所述的图像处理装置,其特征在于,所述处理器用于对待处理的第一图像进行下采样处理之前,还用于:确定所述第一图像的分辨率是否高于指定分辨率,若是,执行所述对待处理的第一图像进行下采样处理的步骤,其中,所述指定分辨率基于图像处理芯片的处理带宽确定,所述图像处理芯片用于对所述第一图像进行所述局部增强处理以及所述其他图像处理。
- 根据权利要求12或13所述的图像处理装置,其特征在于,所述处理器用于基于所述局部增强映射矩阵对所述第二图像进行局部增强处理得到目标图像时,具体用于:对所述局部增强映射矩阵进行上采样处理;利用上采样处理后的所述局部增强映射矩阵对所述第二图像进行局部增强处理,得到所述目标图像。
- 根据权利要求12或13所述的图像处理装置,其特征在于,所述处理器用于基于所述局部增强映射矩阵对所述第二图像进行局部增强处理得到目标图像时,具体用于:确定所述第二图像的高频成分和低频成分;对所述局部增强映射矩阵进行上采样处理;利用上采样处理后的所述局部映射矩阵对所述低频成分进行局部增强处理,得到第三图像;融合所述第三图像与所述高频成分,得到所述目标图像。
- 根据权利要求12-15任一项所述的图像处理装置,其特征在于,所述 处理器用于基于所述下采样图像确定局部增强映射矩阵时,具体用于:对所述下采样图像进行局部增强处理和所述其他图像处理,得到第四图像;对所述下采样图像进行所述其他图像处理,得到第五图像;根据所述第四图像与所述第五图像的差异确定所述局部增强映射矩阵。
- 根据权利要求16所述的图像处理装置,其特征在于,所述处理器用于根据所述第四图像与所述第五图像的差异确定所述局部增强映射矩阵时,具体用于:对所述第四图像与所述第五图像进行除法运算得到所述局部增强映射矩阵;或对所述第四图像与所述第五图像进行减法运算得到所述局部增强映射矩阵。
- 根据权利要求17所述的图像处理装置,其特征在于,所述处理器用于利用上采样处理后的所述局部增强映射矩阵对所述第二图像进行局部增强处理,得到所述目标图像时,具体用于:若所述局部增强映射矩阵通过所述第四图像与所述第五图像进行除法运算得到,则对所述上采样处理后的局部增强映射矩阵与所述第二图像进行乘法运算,得到所述目标图像;或若所述局部增强映射矩阵通过所述第四图像与所述第五图像进行减法运算得到,则对所述上采样处理后的局部增强映射矩阵与所述第二图像进行加法运算,得到所述目标图像。
- 根据权利要求12-15任一项所述的图像处理装置,其特征在于,所述处理器用于基于所述下采样图像确定局部增强映射矩阵时,具体用于:对所述下采样图像进行局部增强处理,得到第六图像;根据所述第六图像与所述下采样图像的差异确定所述局部增强映射矩阵。
- 根据权利要求12-19任一项所述的图像处理装置,其特征在于,执行将所述第一图像划分为多张子图像的步骤的时机包括:在将所述第一图像输入至图像处理芯片之前,所述图像处理芯片用于对所述第一图像进行所述局部增强处理以及所述其他图像处理;或将所述待处理图像输入至所述图像处理芯片的指定功能模块之前,所述指定功能模块所能处理的图像的分辨率的上限低于所述第一图像的分辨率。
- 根据权利要求13或20所述的图像处理装置,其特征在于,所述图像处理芯片为ISP芯片。
- 根据权利要求12-21任一项所述的图像处理装置,其特征在于,所述第一图像包括以下任一种:Raw图像、RGB格式的图像、YUV格式的图像和RGBA格式的图像。
- 一种图像采集设备,其特征在于,所述图像采集设备包括图像传感器以及如权利要求12-22任一项所述的图像处理装置。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2020/118784 WO2022067489A1 (zh) | 2020-09-29 | 2020-09-29 | 图像处理方法、装置及图像采集设备 |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2020/118784 WO2022067489A1 (zh) | 2020-09-29 | 2020-09-29 | 图像处理方法、装置及图像采集设备 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2022067489A1 true WO2022067489A1 (zh) | 2022-04-07 |
Family
ID=80949327
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/118784 Ceased WO2022067489A1 (zh) | 2020-09-29 | 2020-09-29 | 图像处理方法、装置及图像采集设备 |
Country Status (1)
| Country | Link |
|---|---|
| WO (1) | WO2022067489A1 (zh) |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20130057578A1 (en) * | 2011-09-02 | 2013-03-07 | Canon Kabushiki Kaisha | Image processing apparatus and control method thereof |
| CN105809638A (zh) * | 2016-03-01 | 2016-07-27 | 深圳Tcl数字技术有限公司 | 图像处理方法及装置 |
| CN109325901A (zh) * | 2017-07-31 | 2019-02-12 | 深圳市中兴微电子技术有限公司 | 一种实现图像处理的方法及装置 |
| CN110677577A (zh) * | 2018-07-03 | 2020-01-10 | 杭州海康慧影科技有限公司 | 图像处理方法及装置 |
| CN110944110A (zh) * | 2018-09-21 | 2020-03-31 | 三星电子株式会社 | 图像信号处理器、其操作方法以及应用处理器 |
| CN111598776A (zh) * | 2020-04-29 | 2020-08-28 | Oppo广东移动通信有限公司 | 图像处理方法、图像处理装置、存储介质与电子设备 |
-
2020
- 2020-09-29 WO PCT/CN2020/118784 patent/WO2022067489A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20130057578A1 (en) * | 2011-09-02 | 2013-03-07 | Canon Kabushiki Kaisha | Image processing apparatus and control method thereof |
| CN105809638A (zh) * | 2016-03-01 | 2016-07-27 | 深圳Tcl数字技术有限公司 | 图像处理方法及装置 |
| CN109325901A (zh) * | 2017-07-31 | 2019-02-12 | 深圳市中兴微电子技术有限公司 | 一种实现图像处理的方法及装置 |
| CN110677577A (zh) * | 2018-07-03 | 2020-01-10 | 杭州海康慧影科技有限公司 | 图像处理方法及装置 |
| CN110944110A (zh) * | 2018-09-21 | 2020-03-31 | 三星电子株式会社 | 图像信号处理器、其操作方法以及应用处理器 |
| CN111598776A (zh) * | 2020-04-29 | 2020-08-28 | Oppo广东移动通信有限公司 | 图像处理方法、图像处理装置、存储介质与电子设备 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11882357B2 (en) | Image display method and device | |
| US20200082508A1 (en) | Information processing method, information processing apparatus, and recording medium | |
| US20200234414A1 (en) | Systems and methods for transforming raw sensor data captured in low-light conditions to well-exposed images using neural network architectures | |
| CN110557584B (zh) | 图像处理方法及装置、计算机可读存储介质 | |
| CN107924554B (zh) | 图像处理流水线中对图像数据的多速率处理 | |
| US10298863B2 (en) | Automatic compensation of lens flare | |
| CN112734650A (zh) | 一种基于虚拟多曝光融合的不均匀光照图像增强方法 | |
| JP7212554B2 (ja) | 情報処理方法、情報処理装置、及びプログラム | |
| CN110276767A (zh) | 图像处理方法和装置、电子设备、计算机可读存储介质 | |
| CN115550570B (zh) | 图像处理方法与电子设备 | |
| CN105323497A (zh) | 恒定包围的高动态范围(cHDR)操作 | |
| CN114581318A (zh) | 一种低照明度图像增强方法及系统 | |
| CN111340732B (zh) | 一种低照度视频图像增强方法及装置 | |
| JP2007066138A (ja) | 画像処理装置および画像処理プログラム | |
| CN113379609B (zh) | 一种图像处理方法、存储介质及终端设备 | |
| CN111915528B (zh) | 一种图像增亮方法、装置、移动终端和存储介质 | |
| KR20200078619A (ko) | 이미지 처리 방법 및 장치, 컴퓨터-판독 가능 저장 매체 및 컴퓨터 장치 | |
| CN116109535A (zh) | 一种图像融合方法、设备及计算机可读存储介质 | |
| CN118014862A (zh) | 视频增强方法、装置、电子设备、存储介质及程序产品 | |
| CN114331893A (zh) | 一种获取图像噪声的方法、介质和电子设备 | |
| CN112241935B (zh) | 图像处理方法、装置及设备、存储介质 | |
| WO2025145962A1 (zh) | 图像处理方法、装置、电子设备和计算机可读存储介质 | |
| WO2022217525A1 (zh) | 图像降噪处理方法、装置及成像装置 | |
| CN112241936A (zh) | 图像处理方法、装置及设备、存储介质 | |
| CN116645274A (zh) | 图像处理方法、装置、电子设备及计算机可读存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20955516 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20955516 Country of ref document: EP Kind code of ref document: A1 |