WO2020124355A1 - Image processing method, image processing device, and unmanned aerial vehicle - Google Patents

Image processing method, image processing device, and unmanned aerial vehicle Download PDF

Info

Publication number
WO2020124355A1
WO2020124355A1 PCT/CN2018/121726 CN2018121726W WO2020124355A1 WO 2020124355 A1 WO2020124355 A1 WO 2020124355A1 CN 2018121726 W CN2018121726 W CN 2018121726W WO 2020124355 A1 WO2020124355 A1 WO 2020124355A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
result
filtering
frequency
filter
Prior art date
Application number
PCT/CN2018/121726
Other languages
French (fr)
Chinese (zh)
Inventor
李静
袁一璟
彭亮
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to CN201880069922.4A priority Critical patent/CN111344736A/en
Priority to PCT/CN2018/121726 priority patent/WO2020124355A1/en
Publication of WO2020124355A1 publication Critical patent/WO2020124355A1/en

Links

Images

Classifications

    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20172Image enhancement details
    • G06T2207/20192Edge enhancement; Edge preservation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Definitions

  • the present invention relates to the technical field of image processing, and in particular, to an image processing method, an image processing device, and a drone.
  • the image needs to be denoised to remove the noise in the image.
  • the invention provides an image processing method, an image processing device and an unmanned aerial vehicle to solve the technical problems in the related art.
  • an image processing method including:
  • the original image is downsampled n-1 times to determine n resolution images, where the resolution of the i-th image is less than the resolution of the i-1 image, 1 ⁇ i ⁇ n, the first image Is the original image;
  • the high-frequency information of the i-th image and the high-frequency information of the i-1th image are fused to obtain the i-1 high-frequency fusion result, where, when i ⁇ n, the i-th high-frequency fusion result is taken as the High frequency information of i images;
  • the filter result of the i-th image and the filter result of the i-1 image are fused to obtain the i-1 filter fusion result, where, when i ⁇ n, the The i-filter fusion result is used as the filter result of the i-th image.
  • an image processing apparatus including a processor, the processor is used for,
  • the original image is downsampled n-1 times to determine n resolution images, where the resolution of the i-th image is less than the resolution of the i-1 image, 1 ⁇ i ⁇ n, the first image Is the original image;
  • the high-frequency information of the i-th image and the high-frequency information of the i-1th image are fused to obtain the i-1 high-frequency fusion result, where, when i ⁇ n, the i-th high-frequency fusion result is taken as the High frequency information of i images;
  • the filter result of the i-th image and the filter result of the i-1 image are fused to obtain the i-1 filter fusion result, where, when i ⁇ n, the The i-filter fusion result is used as the filter result of the i-th image.
  • a drone including the image processing device described in the above embodiments.
  • the filtering result of the i-th image is less than the filtering result of the i-1 image, and the pixels with larger high-frequency fusion results correspond to
  • the pixels in the filtered image are more likely to be edges, so more high-frequency information can be retained so that the edges can be correctly extracted.
  • the filter result of the i-th image and the filter result of the i-1 image can be fused according to the i-1 high-frequency fusion result, for example, by setting the i-1 high-frequency fusion result and
  • the weight value of the filtering result of the i-th image is inversely correlated and positively correlated with the weight value of the filtering result of the i-1th image, so that for the i-1 filtering fusion result, more details are retained in the high-frequency region , The denoising effect is higher in the low frequency region.
  • the ith filter fusion result is used as the filtering result of the i-th image, and the second two steps in the above embodiment can be continuously performed on the second to n-1th images, so that according to the i-1 Filter fusion result to get the i-2 filter fusion result, according to the i-2 filter fusion result to get the i-3 filter fusion result, ..., until the first filter fusion result is obtained, then the first filter fusion result is relative to the original image In other words, at the same time, more details are retained in the high-frequency region, and the denoising effect is higher in the low-frequency region.
  • FIG. 1 is a schematic flowchart of an image processing method according to an embodiment of the present disclosure.
  • FIG. 2 is a schematic flow chart of fusing the high-frequency information of the i-th image and the high-frequency information of the i-1th image according to an embodiment of the present disclosure to obtain the result of the i-1 high-frequency fusion.
  • FIG. 3 is a schematic flowchart of fusing the filter result of the i-th image and the filter result of the i-1 image according to the i-1 high-frequency fusion result to obtain the i-1 filter fusion result.
  • FIG. 4 is a schematic flowchart of determining an i-1 second weight corresponding to an i-1 high-frequency fusion result.
  • FIG. 5 is a schematic flowchart of another image processing method according to an embodiment of the present disclosure.
  • FIG. 1 is a schematic flowchart of an image processing method according to an embodiment of the present disclosure.
  • the image processing method shown in this embodiment can be applied to terminals, such as mobile phones, tablet computers, wearable devices, etc., can also be applied to servers, and can also be applied to other devices with data processing functions, such as drones.
  • the image processing method may include the following steps:
  • step S1 the original image is down-sampled n-1 times to determine n resolution images, where the resolution of the i-th image is less than the resolution of the i-1 image, 1 ⁇ i ⁇ n, the first One image is the original image.
  • an image with a lower resolution can be obtained.
  • the ratio of the resolution reduction of the image may be the same as before the downsampling Can also be different.
  • the following is an exemplary description mainly in the case where the reduction ratio of the image resolution is the same.
  • the original image is down-sampled three times.
  • the ratio of the resolution of the image is reduced by 1/2 relative to that before the down-sampling, that is, the resolution of the image after down-sampling, It is 1/2 the resolution of the image before downsampling.
  • the resolution of the second image d2 after the first downsampling is 1/2 of the resolution of the original image d1
  • the resolution of the third image d3 after the second downsampling is 1 of the resolution of d2 /2
  • the resolution of the fourth image d4 after the third downsampling is 1/2 of the resolution of d3.
  • Step S2 Perform edge-preserving filtering for each image to obtain high-frequency information and filtering results.
  • edge-preserving filtering can be performed separately, where edge-preserving filtering refers to a filtering method that can effectively retain edge information in the image during the filtering process , For example, bilateral filtering, guided filtering, weighted least squares filtering, etc.
  • edge-preserving filtering refers to a filtering method that can effectively retain edge information in the image during the filtering process .
  • bilateral filtering Taking bilateral filtering as an example, the minimum convolution kernel used for filtering is 3 ⁇ 3, for example, a 7 ⁇ 7 convolution kernel can be used.
  • the high-frequency information and filtering result of the image can be obtained.
  • the high-frequency information of an area can express whether the area changes drastically, specifically whether there is more texture in the area, for example, the higher the high-frequency information corresponding to a pixel, the more likely that pixel belongs to the object in the image the edge of.
  • the filtering result is the result of removing some noise and details from the image before filtering.
  • the signal-to-noise ratio of the filtering result is higher than that of the image before filtering.
  • the filtering result of the edge-preserving filtering on the down-sampled image can reflect the low-frequency information of the image before down-sampling.
  • the low-frequency information of a certain area can express whether the area changes smoothly, specifically whether there are large patches of color in the area.
  • the high-frequency information of the fourth image d4 is d4_diff and the filtering result is d4_filter
  • the high-frequency information of the third image d3 is d3_diff and the filtering result is d3_filter
  • the high-frequency information of the second image d2 is d2_diff
  • the filtering result is d2_filter
  • the high-frequency information of the first image d1 is d1_diff
  • the filtering result is d1_filter.
  • Step S3 fusing the high-frequency information of the i-th image and the high-frequency information of the i-1-th image to obtain the i-1 high-frequency fusion result, where, when i ⁇ n, the i-th high-frequency fusion The result is the high frequency information of the i-th image;
  • step S4 according to the i-1 high-frequency fusion result, the filter result of the i-th image and the filter result of the i-1 image are fused to obtain the i-1 filter fusion result.
  • the ith filter fusion result is used as the ith image filter result.
  • the high-frequency information of the i-th image and the high-frequency information of the i-1th image are fused to obtain the i-1 high-frequency fusion result.
  • the i-th high-frequency fusion result is used as the high-frequency information of the i-th image.
  • the third high-frequency fusion result d3_diff_merge is used as the high-frequency information of the third image d3_diff
  • i 2
  • the second high-frequency fusion result d2_diff_merge is used as the high-frequency information d2_diff of the second image.
  • the high-frequency information d2_diff of the second image and the high-frequency information d1_diff of the first image can be further fused to obtain the first high-frequency fusion result d1_diff_merge.
  • the down-sampling of the image will reduce the image noise, so the first high-frequency fusion result obtained by successive fusion according to the high-frequency information of the images of different resolutions, relative to the original image, that is, the high-frequency information of the first image, can While retaining high-frequency information, reduce noise interference and improve the accuracy of edge detection.
  • the filter result of the i-th image and the filter result of the i-1 image are fused to obtain the i-1 filter fusion result.
  • fusion refers to weighted sum
  • the weight value of the filter result of the corresponding i-th image is small, and the weight value of the filter result of the i-th image is large.
  • the filtering result of the i-th image has less high-frequency information than the filtering result of the i-1th image, and the pixels with larger high-frequency fusion results correspond to the pixels in the filtered image are edges Is more likely, so more high-frequency information can be retained so that the edges can be correctly extracted.
  • the filter result of the i-th image and the filter result of the i-1 image can be fused according to the i-1 high-frequency fusion result, for example, by setting the i-1 high-frequency fusion result and
  • the weight of the filtering result of the i-th image is inversely correlated and positively correlated with the weight of the filtering result of the i-th image.
  • the i-1 high-frequency fusion result When the i-1 high-frequency fusion result is large, there is a high possibility that the pixel is high-frequency information, corresponding to the filtering result, so that the weight of the filtering result of the i-1th image is larger, and the i The weight of the filtering result of each image is small; when the i-1 high-frequency fusion result is small, there is a high possibility that the pixel is low-frequency information, corresponding to the filtering result, so that the filtering result of the i-1 image The weight of the image is smaller, and the weight of the filtering result of the i-th image is larger; thus for the i-1 filter fusion result, more details are retained in the high-frequency region, and the denoising effect is higher in the low-frequency region. .
  • the i-th high-frequency fusion result is used as the high-frequency information of the i-th image
  • the i-th filter fusion result is used as the filter result of the i-th image
  • the high-frequency information of the 2 images and the high-frequency information of the i-3 image are fused to obtain the i-3 high-frequency fusion result, ..., and finally the first high-frequency fusion result is obtained; in addition, the i The filtering result of each image and the filtering result of the i-1th image are fused to obtain the filtering result of the i-1th filter, and the filtering result of the i-1th image and the filtering result of the i-2th image are fused, Obtain the i-2 filter fusion result, ..., and finally get the first filter fusion result.
  • the first filter fusion result realizes the preservation of more details in the high frequency area and the denoising in the low frequency area. The effect is higher.
  • FIG. 2 shows a method for fusing the high-frequency information of the i-th image and the high-frequency information of the i-1th image according to an embodiment of the present disclosure to obtain the i -1 Schematic flow chart of high-frequency fusion results.
  • the high-frequency information of the i-th image and the high-frequency information of the i-1th image are fused, and the result of the i-1 high-frequency fusion includes:
  • Step S31 up-sampling the high-frequency information of the i-th image to obtain the i-th high-frequency up-sampling result
  • step S32 the i-th high-frequency up-sampling result and the high-frequency information of the i-1th image are weighted and summed according to the i-1 first weight to obtain the i-1 high-frequency fusion result.
  • the resolution of the i-th image is smaller than the resolution of the i-1th image
  • the resolution of the high-frequency information of the i-th image is smaller than the resolution of the high-frequency information of the i-1th image
  • the high-frequency information of the image is up-sampled to obtain the i-th high-frequency up-sampling result, and the resolution of the i-th high-frequency up-sampling result is the same as the resolution of the high-frequency information of the i-1th image.
  • d4_diff For the high-frequency information d4_diff of the fourth image, up-sampling is performed to obtain the fourth high-frequency up-sampling result d4_up_diff.
  • the resolution of d4_up_diff is the same as the resolution of the high-frequency information d3_diff of the third image.
  • the i-th high-frequency up-sampling result and the i-th image high-frequency information are weighted and summed to obtain the i-1 high-frequency fusion result.
  • d3_diff_merge d3_diff ⁇ w3+d4_up_diff ⁇ (1-w3);
  • the information can express more high-frequency information.
  • the first weight value is a preset value
  • the first weight value w(i-1) can be determined according to the signal-to-noise ratio of the original image. If the original image has a high signal-to-noise ratio, then w(i-1) You can take a larger value. In general, you can set w(n-1), w(n-2)...w0 decreases sequentially.
  • the high-frequency information of the i-1th image can be fused more, so that more high-frequency information of higher frequencies can be retained, that is, fusion
  • the degree of detail retention is high in the process; accordingly, if the i-1 first weight is set smaller, the i-th high-frequency upsampling result can be fused more, resulting in less The high-frequency information is retained, so the denoising effect is relatively good.
  • i-1 high-frequency fusion result
  • d3_diff_merge d3_diff ⁇ w3+d4_up_diff ⁇ (1-w3)
  • w3 is a fixed value.
  • FIG. 3 is based on the i-1 high-frequency fusion result, the filter result of the i-th image and the filter result of the i-1 image are fused to obtain the first The schematic flow chart of i-1 filter fusion result.
  • the filter result of the i-th image and the filter result of the i-1 image are fused, and the i-1 filter fusion result includes:
  • Step S41 up-sampling the filtering result of the i-th image to obtain the i-th filtering up-sampling result
  • Step S42 Determine the i-1 second weight value corresponding to the i-1 high frequency fusion result, where the i-1 high frequency fusion result is positively correlated with the i-1 second weight value;
  • Step S43 Weight the i-th filter up-sampling result according to the i-1 second weight, weight the filter result of the i-1th image according to the difference between 1 and the i-1 second weight, and sum according to the weight As a result, the i-1th filter fusion result is obtained.
  • the resolution of the i-th image is smaller than the resolution of the i-1th image
  • the resolution of the filtering result of the i-th image is smaller than the resolution of the filtering result of the i-1th image
  • the resolution of the i-th filter up-sampling result is the same as the resolution of the i-1 image filtering result.
  • up-sampling is performed to obtain the fourth high-frequency up-sampling result d4_up_filter.
  • the resolution of d4_up_filter is the same as the resolution of the filter result d4_filter of the third image.
  • the i-1 second weight value corresponding to the i-1 high frequency fusion result can be determined, and by setting the weight value of the i-1 high frequency fusion result inversely correlated with the filtering result of the i th image, and The weight of the filtering result of the i-1th image is positively correlated, so that the weight of the filtering result of the ith image corresponding to the pixel with a higher high-frequency fusion result is smaller, and the filtering result of the i-1th image corresponds to Has a larger weight.
  • the third second weight d3_weight may be determined according to the third high-frequency fusion result d3_diff_merge, where the determined d3_weight is different for pixels with different d3_diff_merge, then for the third image d3 Pixel (i,j), the corresponding fourth filter upsampling result d4_up_filter(i,j), the corresponding third high-frequency fusion result is d3_diff_merge(i,j), then the determined third second weight Is d3_weight(i,j), the i-1th high-frequency fusion result of pixel (i,j) d3_filter_new(i,j) is equal to:
  • the filter result d4_filter of the fourth image is less high-frequency information than the filter result d3_filter of the third image, and the pixels with larger high-frequency fusion result correspond to the filtered image
  • pixels are more likely to be edges, so more high-frequency information can be retained so that the edges are correctly extracted.
  • the filtering result of the fourth image and the filtering result of the third image can be weighted and summed according to the third high-frequency fusion result, for example, by setting the third high-frequency fusion result and the fourth image
  • the weights of the filtering results are inversely correlated and positively correlated with the weights of the filtering results of the third image, so that for the third filtering fusion result, more details are retained in the high-frequency region and the denoising effect in the low-frequency region Higher.
  • the i-th high-frequency fusion result is used as the high-frequency information of the i-th image
  • the i-th filter fusion result is used as the filter result of the i-th image
  • the second to third images are executed
  • the high-frequency information of the third image and the high-frequency information of the second image can be weighted and summed to obtain the second high-frequency fusion result
  • the second second weight can be determined accordingly Value d2_weight, and then weighted and sum the high-frequency information of the second image and the high-frequency information of the first image to obtain the first high-frequency fusion result, and determine the first second weight d1_weight based on this
  • the filtering result of the third image and the filtering result of the second image can be weighted and summed based on the second second weight d2_weight to obtain the second filter fusion result, and then based on the first second weight d1_weight, the The filtering results
  • the i-1 high-frequency fusion result is inversely related to the weight of the filtering result of the i-th image, and positively related to the weight of the filtering result of the i-1 image.
  • the positive correlation in the embodiment of the present disclosure means that when A and B are positively correlated, A increases in the overall trend with the increase of B, and in a local interval, A can follow the B Increases and remains unchanged;
  • the positive correlation in the embodiments of the present disclosure means that when A and B are inversely correlated, A increases or decreases with the increase of B in the overall trend, while in a local interval, A can increase with The increase in B remains unchanged.
  • FIG. 4 is a schematic flowchart of determining an i-1 second weight value corresponding to an i-1 high frequency fusion result.
  • the determining the i-1 second weight corresponding to the i-1 high frequency fusion result includes:
  • Step S421 Determine the i-1 second weight corresponding to the i-1 high-frequency fusion result according to the association table between the i-1 second weight and the i-1 high-frequency fusion result.
  • the i-1 second weight value and the i-1 high-frequency fusion result may be stored in an association relationship table.
  • different i-1 high-frequency fusion results may correspond to different I-1 second weight value, so that the i-1 second weight value corresponding to the i-1 high frequency fusion result can be subsequently queried according to the association relationship table.
  • the manner of downsampling includes at least one of the following:
  • Gaussian downsampling mean downsampling, maximum or minimum downsampling, and median downsampling.
  • the adopted downsampling method may be selected according to needs, and the downsampling operation method may be the same or different each time.
  • the manner of upsampling includes at least one of the following:
  • the nearest neighbor element method bilinear interpolation method, cubic interpolation method.
  • the adopted upsampling method may be selected according to needs, and the upsampling operation method may be the same or different each time.
  • the edge-preserving filtering method includes at least one of the following:
  • Bilateral filtering guided filtering, weighted least squares filtering.
  • the edge-preserving filtering method used may be selected according to needs.
  • FIG. 5 is a schematic flowchart of another image processing method according to an embodiment of the present disclosure. As shown in FIG. 5, before the original image is downsampled n-1 times to determine n resolution images, the method further includes:
  • Step S5 Determine the value of n according to the resolution of the original image.
  • the value of n can be determined based on the resolution of the original image, and then the number of downsampling times n-1 is determined. For example, the higher the resolution of the original image, the larger n can be, that is, the number of downsampling times n -1 can be larger, which can ensure that the low-frequency information of sufficiently low frequency is obtained, so as to ensure that the fused result has a good denoising effect.
  • the high-frequency information includes a mean value of a sum of absolute values of pixel value differences between each pixel in the corresponding image and pixels in respective neighborhoods.
  • the average value of the sum of the absolute values of the difference between the pixel value of the pixel and the pixel in the neighborhood can be calculated, and the average value can express the difference between the pixel and the pixel value in the neighborhood If the average value is large, it means that the difference between the pixel value and the pixel value in the neighborhood is large, then the pixel is more likely to belong to the edge of the object in the image, so the average value can be used as the high-frequency information of the pixel.
  • the present disclosure also proposes embodiments of the image processing device.
  • An embodiment of the present disclosure proposes an image processing apparatus including a processor, the processor is used for,
  • the original image is downsampled n-1 times to determine n resolution images, where the resolution of the i-th image is less than the resolution of the i-1 image, 1 ⁇ i ⁇ n, the first image Is the original image;
  • the high-frequency information of the i-th image and the high-frequency information of the i-1th image are fused to obtain the i-1 high-frequency fusion result, where, when i ⁇ n, the i-th high-frequency fusion result is taken as the High frequency information of i images;
  • the filter result of the i-th image and the filter result of the i-1 image are fused to obtain the i-1 filter fusion result, where, when i ⁇ n, the The i-filter fusion result is used as the filter result of the i-th image.
  • the processor is used to,
  • the i-th high-frequency up-sampling result and the i-th image high-frequency information are weighted and summed to obtain the i-1 high-frequency fusion result.
  • the processor is used to,
  • the i-th filter up-sampling result is weighted according to the i-1 second weight
  • the i-1 image filtering result is weighted according to the difference between 1 and the i-1 second weight
  • the first i-1 filter fusion results are weighted according to the i-1 second weight
  • the i-1 high-frequency fusion result is inversely correlated with the weight of the filter result of the i-th image, and positively correlated with the weight of the filter result of the i-1 image.
  • the processor is used to,
  • the i-1 second weight value corresponding to the i-1 high frequency fusion result is determined according to the correlation table between the i-1 second weight value and the i-1 high frequency fusion result.
  • the manner of downsampling includes at least one of the following:
  • Gaussian downsampling mean downsampling, maximum or minimum downsampling, and median downsampling.
  • the manner of upsampling includes at least one of the following:
  • the nearest neighbor element method bilinear interpolation method, cubic interpolation method.
  • the edge-preserving filtering method includes at least one of the following:
  • Bilateral filtering guided filtering, weighted least squares filtering.
  • the processor is further configured to determine the value of n according to the resolution of the original image.
  • the high-frequency information includes an average value of the sum of the absolute values of the difference values of the pixel values of each pixel in the corresponding image and the pixels in the respective neighborhood.
  • An embodiment of the present disclosure proposes a drone, including the image processing device described in any of the above embodiments.
  • the system, device, module or unit explained in the above embodiments may be specifically implemented by a computer chip or entity, or implemented by a product having a certain function.
  • the functions are divided into various units and described separately.
  • the functions of each unit may be implemented in one or more software and/or hardware.
  • the embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware.
  • the present invention may take the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.

Abstract

The present disclosure relates to an image processing method comprising: performing n-1 downsamplings on a raw image, so as to generate images of n respective resolutions; performing edge-preserving filtering on each of the images, so as to obtain high frequency information and filtering results; combining high frequency information of the ith image with high frequency information of the i-1th image, and obtaining a result of the i-1th high frequency fusion; and combining a filtering result of the ith image and a filtering result of the i-1th image according to the result of the i-1th high frequency fusion, and obtaining a result of the i-1th filtering fusion. According to the embodiments of the present disclosure, more details can be retained in the high frequency region of an image, while simultaneously achieving better noise reduction effects in the low frequency region of the image.

Description

图像处理方法、图像处理装置和无人机Image processing method, image processing device and drone 技术领域Technical field
本发明涉及图像处理技术领域,尤其涉及图像处理方法、图像处理装置和无人机。The present invention relates to the technical field of image processing, and in particular, to an image processing method, an image processing device, and a drone.
背景技术Background technique
为了得到优良的显示效果,对于图像需要进行去噪处理,以去除图像中的噪声。In order to get an excellent display effect, the image needs to be denoised to remove the noise in the image.
然而基于目前对于图像去噪的方式,如果要实现较好的去噪效果,就会损失较多图像的细节信息,而若需要保留较多图像的细节信息,那么去噪效果就会被削弱。However, based on the current method of image denoising, if a better denoising effect is to be achieved, more detailed information of the image will be lost, and if more detailed information of the image needs to be retained, the denoising effect will be weakened.
发明内容Summary of the invention
本发明提供穿图像处理方法、图像处理装置和无人机,以解决相关技术中的技术问题。The invention provides an image processing method, an image processing device and an unmanned aerial vehicle to solve the technical problems in the related art.
根据本公开实施例的第一方面,提出一种图像处理方法,包括:According to a first aspect of the embodiments of the present disclosure, an image processing method is proposed, including:
对原图像进行n-1次下采样,以确定n个分辨率的图像,其中,第i个图像的分辨率小于第i-1个图像的分辨率,1<i≤n,第1个图像为所述原图像;The original image is downsampled n-1 times to determine n resolution images, where the resolution of the i-th image is less than the resolution of the i-1 image, 1<i≤n, the first image Is the original image;
针对每个图像分别进行保边滤波,以获得高频信息和滤波结果;Perform edge-preserving filtering for each image separately to obtain high-frequency information and filtering results;
对第2至第n个图像分别执行以下步骤,直至得到第1滤波融合结果:Perform the following steps on the 2nd to nth images, respectively, until the first filter fusion result is obtained:
对第i个图像的高频信息和第i-1个图像的高频信息进行融合,得到第i-1高频融合结果,其中,在i<n时,将第i高频融合结果作为第i个图像的高频信息;The high-frequency information of the i-th image and the high-frequency information of the i-1th image are fused to obtain the i-1 high-frequency fusion result, where, when i<n, the i-th high-frequency fusion result is taken as the High frequency information of i images;
根据第i-1高频融合结果,对第i个图像的滤波结果和第i-1个图像的滤波结果进行融合,得到第i-1滤波融合结果,其中,在i<n时,将第i滤波融 合结果作为第i个图像的滤波结果。According to the i-1 high-frequency fusion result, the filter result of the i-th image and the filter result of the i-1 image are fused to obtain the i-1 filter fusion result, where, when i<n, the The i-filter fusion result is used as the filter result of the i-th image.
根据本公开实施例的第二方面,提出一种图像处理装置,包括处理器,所述处理器用于,According to a second aspect of the embodiments of the present disclosure, an image processing apparatus is proposed, including a processor, the processor is used for,
对原图像进行n-1次下采样,以确定n个分辨率的图像,其中,第i个图像的分辨率小于第i-1个图像的分辨率,1<i≤n,第1个图像为所述原图像;The original image is downsampled n-1 times to determine n resolution images, where the resolution of the i-th image is less than the resolution of the i-1 image, 1<i≤n, the first image Is the original image;
针对每个图像分别进行保边滤波,以获得高频信息和滤波结果;Perform edge-preserving filtering for each image separately to obtain high-frequency information and filtering results;
对第2至第n个图像分别执行以下步骤,直至得到第1滤波融合结果:Perform the following steps on the 2nd to nth images, respectively, until the first filter fusion result is obtained:
对第i个图像的高频信息和第i-1个图像的高频信息进行融合,得到第i-1高频融合结果,其中,在i<n时,将第i高频融合结果作为第i个图像的高频信息;The high-frequency information of the i-th image and the high-frequency information of the i-1th image are fused to obtain the i-1 high-frequency fusion result, where, when i<n, the i-th high-frequency fusion result is taken as the High frequency information of i images;
根据第i-1高频融合结果,对第i个图像的滤波结果和第i-1个图像的滤波结果进行融合,得到第i-1滤波融合结果,其中,在i<n时,将第i滤波融合结果作为第i个图像的滤波结果。According to the i-1 high-frequency fusion result, the filter result of the i-th image and the filter result of the i-1 image are fused to obtain the i-1 filter fusion result, where, when i<n, the The i-filter fusion result is used as the filter result of the i-th image.
根据本公开实施例的第三方面,提出一种无人机,包括上述实施例所述的图像处理装置。According to a third aspect of the embodiments of the present disclosure, a drone is proposed, including the image processing device described in the above embodiments.
根据本公开的实施例,由于第i个图像是基于第i-1个图像下采样得到的,下采样后的第i个图像的分辨率小于第i-1个图像的分辨率,会导致丢失部分高频信息,因此具有较好的降噪效果,那么第i个图像的滤波结果相对于第i-1个图像的滤波结果高频信息更少,而高频融合结果较大的像素对应到滤波图像中的像素是边缘的可能性更大,因此可以保留更多的高频信息,以便使边缘得到正确提取。According to an embodiment of the present disclosure, since the i-th image is obtained by downsampling based on the i-1th image, the resolution of the i-th image after downsampling is smaller than the resolution of the i-1th image, which may result in loss Part of the high-frequency information, so it has a better noise reduction effect, then the filtering result of the i-th image is less than the filtering result of the i-1 image, and the pixels with larger high-frequency fusion results correspond to The pixels in the filtered image are more likely to be edges, so more high-frequency information can be retained so that the edges can be correctly extracted.
基于本实施例,可以根据第i-1高频融合结果,对第i个图像的滤波结果和第i-1个图像的滤波结果进行融合,例如可以通过设置第i-1高频融合结果与第i个图像的滤波结果的权值反相关,且与第i-1个图像的滤波结果的权值正相关,从而对于第i-1滤波融合结果同时实现了在高频区域保留细节较多,在低频区域的去噪效果较高。Based on this embodiment, the filter result of the i-th image and the filter result of the i-1 image can be fused according to the i-1 high-frequency fusion result, for example, by setting the i-1 high-frequency fusion result and The weight value of the filtering result of the i-th image is inversely correlated and positively correlated with the weight value of the filtering result of the i-1th image, so that for the i-1 filtering fusion result, more details are retained in the high-frequency region , The denoising effect is higher in the low frequency region.
进而在i<n时,将第i滤波融合结果作为第i个图像的滤波结果,可以对第2至第n-1个图像继续执行上述实施例中的后两步,从而根据第i-1滤波融合结果得到第i-2滤波融合结果,根据第i-2滤波融合结果得到第i-3滤波融合结果,…,直至得到第1滤波融合结果,那么第1滤波融合结果相对于原图像而言,就同时实现了在高频区域保留细节较多,在低频区域的去噪效果较高。Furthermore, when i<n, the ith filter fusion result is used as the filtering result of the i-th image, and the second two steps in the above embodiment can be continuously performed on the second to n-1th images, so that according to the i-1 Filter fusion result to get the i-2 filter fusion result, according to the i-2 filter fusion result to get the i-3 filter fusion result, ..., until the first filter fusion result is obtained, then the first filter fusion result is relative to the original image In other words, at the same time, more details are retained in the high-frequency region, and the denoising effect is higher in the low-frequency region.
附图说明BRIEF DESCRIPTION
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly explain the technical solutions in the embodiments of the present invention, the drawings required in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without paying any creative labor, other drawings can also be obtained based on these drawings.
图1是根据本公开的实施例示出的一种图像处理方法的示意流程图。FIG. 1 is a schematic flowchart of an image processing method according to an embodiment of the present disclosure.
图2是根据本公开的实施例示出的一种对第i个图像的高频信息和第i-1个图像的高频信息进行融合,得到第i-1高频融合结果的示意流程图。FIG. 2 is a schematic flow chart of fusing the high-frequency information of the i-th image and the high-frequency information of the i-1th image according to an embodiment of the present disclosure to obtain the result of the i-1 high-frequency fusion.
图3是根据第i-1高频融合结果,对第i个图像的滤波结果和第i-1个图像的滤波结果进行融合,得到第i-1滤波融合结果的示意流程图。FIG. 3 is a schematic flowchart of fusing the filter result of the i-th image and the filter result of the i-1 image according to the i-1 high-frequency fusion result to obtain the i-1 filter fusion result.
图4是确定与第i-1高频融合结果对应的第i-1第二权值的示意流程图。4 is a schematic flowchart of determining an i-1 second weight corresponding to an i-1 high-frequency fusion result.
图5是根据本公开的实施例示出的另一种图像处理方法的示意流程图。FIG. 5 is a schematic flowchart of another image processing method according to an embodiment of the present disclosure.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。另外,在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。The technical solutions in the embodiments of the present invention will be described clearly and completely in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present invention. In addition, in the case of no conflict, the following embodiments and the features in the embodiments can be combined with each other.
图1是根据本公开的实施例示出的一种图像处理方法的示意流程图。本实施例所示的图像处理方法,可以应用于终端,例如手机、平板电脑、可穿戴设备等,也可以应用于服务器,还可以应用于其他具备处理数据功能的设备,例如无人机。FIG. 1 is a schematic flowchart of an image processing method according to an embodiment of the present disclosure. The image processing method shown in this embodiment can be applied to terminals, such as mobile phones, tablet computers, wearable devices, etc., can also be applied to servers, and can also be applied to other devices with data processing functions, such as drones.
如图1所示,所述图像处理方法可以包括以下步骤:As shown in FIG. 1, the image processing method may include the following steps:
步骤S1,对原图像进行n-1次下采样,以确定n个分辨率的图像,其中,第i个图像的分辨率小于第i-1个图像的分辨率,1<i≤n,第1个图像为所述原图像。In step S1, the original image is down-sampled n-1 times to determine n resolution images, where the resolution of the i-th image is less than the resolution of the i-1 image, 1<i≤n, the first One image is the original image.
在一个实施例中,通过对原图像进行下采样,可以得到分辨率较低的图像,需要说明的是,每次下采样后,相对于下采样前,图像的分辨率降低的比例可以是相同的,也可以是不同的。以下主要在图像的分辨率降低的比例是相同的情况下进行示例性说明。In one embodiment, by downsampling the original image, an image with a lower resolution can be obtained. It should be noted that after each downsampling, the ratio of the resolution reduction of the image may be the same as before the downsampling Can also be different. The following is an exemplary description mainly in the case where the reduction ratio of the image resolution is the same.
例如n=4,那么对原图像进行3次下采样,每次下采样后,相对于下采样前,图像的分辨率降低的比例为1/2,也即下采样后的图像的分辨率,是下采样前的图像的分辨率的1/2。那么第一次下采样后的第2个图像d2的分辨率是原图像d1的分辨率的1/2,第二次下采样后的第3个图像d3的分辨率是d2的分辨率的1/2,第三次下采样后的第4个图像d4的分辨率是d3的分辨率的1/2。For example, n=4, then the original image is down-sampled three times. After each down-sampling, the ratio of the resolution of the image is reduced by 1/2 relative to that before the down-sampling, that is, the resolution of the image after down-sampling, It is 1/2 the resolution of the image before downsampling. Then the resolution of the second image d2 after the first downsampling is 1/2 of the resolution of the original image d1, and the resolution of the third image d3 after the second downsampling is 1 of the resolution of d2 /2, the resolution of the fourth image d4 after the third downsampling is 1/2 of the resolution of d3.
以下主要在n=4,每次下采样后,相对于下采样前,图像的分辨率降低的比例为1/2的情况下,对本公开的实施例进行示例性说明。In the following, the embodiment of the present disclosure will be exemplarily described in the case where n=4, and after each downsampling, the ratio of the resolution reduction of the image is 1/2 compared with that before the downsampling.
步骤S2,针对每个图像分别进行保边滤波,以获得高频信息和滤波结果。Step S2: Perform edge-preserving filtering for each image to obtain high-frequency information and filtering results.
在一个实施例中,针对每个图像,例如上述d1,d2,d3,d4,可以分别进行保边滤波,其中,保边滤波是指在滤波过程中能够有效的保留图像中边缘信息的滤波方式,例如可以是双边滤波、引导滤波、加权最小二乘法滤波等。以双边滤波为例,滤波所采用的卷积核最小为3×3,例如可以采用7×7的卷积核。In one embodiment, for each image, for example, d1, d2, d3, and d4, edge-preserving filtering can be performed separately, where edge-preserving filtering refers to a filtering method that can effectively retain edge information in the image during the filtering process , For example, bilateral filtering, guided filtering, weighted least squares filtering, etc. Taking bilateral filtering as an example, the minimum convolution kernel used for filtering is 3×3, for example, a 7×7 convolution kernel can be used.
通过保边滤波对图像进行滤波后,可以得到图像的高频信息和滤波结果。After filtering the image through edge-preserving filtering, the high-frequency information and filtering result of the image can be obtained.
其中,某个区域的高频信息可以表达该区域是否变化剧烈,具体是指该区域是否存在较多纹理,例如某个像素对应的高频信息越大,那么该像素越有可能属于图像中物体的边缘。Among them, the high-frequency information of an area can express whether the area changes drastically, specifically whether there is more texture in the area, for example, the higher the high-frequency information corresponding to a pixel, the more likely that pixel belongs to the object in the image the edge of.
滤波结果是从滤波前的图像中去除一些噪声和细节后的结果,理论上滤波结果的信噪比高于滤波前图像的信噪比。对于下采样后的图像进行保边滤波的滤波结果可以反应下采样前图像的低频信息,某个区域的低频信息可以表达该区域是否变化平缓,具体是指该区域是否存在大片的色块。The filtering result is the result of removing some noise and details from the image before filtering. In theory, the signal-to-noise ratio of the filtering result is higher than that of the image before filtering. The filtering result of the edge-preserving filtering on the down-sampled image can reflect the low-frequency information of the image before down-sampling. The low-frequency information of a certain area can express whether the area changes smoothly, specifically whether there are large patches of color in the area.
为了方便描述,记做第4个图像d4的高频信息为d4_diff,滤波结果为d4_filter;第3个图像d3的高频信息为d3_diff,滤波结果为d3_filter;第2个图像d2的高频信息为d2_diff,滤波结果为d2_filter;第1个图像d1的高频信息为d1_diff,滤波结果为d1_filter。For convenience of description, it is noted that the high-frequency information of the fourth image d4 is d4_diff and the filtering result is d4_filter; the high-frequency information of the third image d3 is d3_diff and the filtering result is d3_filter; the high-frequency information of the second image d2 is d2_diff, the filtering result is d2_filter; the high-frequency information of the first image d1 is d1_diff, and the filtering result is d1_filter.
对第2至第n个图像分别执行以下步骤,直至得到第1滤波融合结果:Perform the following steps on the 2nd to nth images, respectively, until the first filter fusion result is obtained:
步骤S3,对第i个图像的高频信息和第i-1个图像的高频信息进行融合,得到第i-1高频融合结果,其中,在i<n时,将第i高频融合结果作为第i个图像的高频信息;Step S3, fusing the high-frequency information of the i-th image and the high-frequency information of the i-1-th image to obtain the i-1 high-frequency fusion result, where, when i<n, the i-th high-frequency fusion The result is the high frequency information of the i-th image;
步骤S4,根据第i-1高频融合结果,对第i个图像的滤波结果和第i-1个图像的滤波结果进行融合,得到第i-1滤波融合结果,在i<n时,将第i滤波融合结果作为第i个图像的滤波结果。In step S4, according to the i-1 high-frequency fusion result, the filter result of the i-th image and the filter result of the i-1 image are fused to obtain the i-1 filter fusion result. When i<n, The ith filter fusion result is used as the ith image filter result.
在一个实施例中,首先从第n个图像开始,对第i个图像的高频信息和第i-1个图像的高频信息进行融合,得到第i-1高频融合结果。例如n=4,那么从第4个图像d4开始,对第4个图像的高频信息d4_diff和第3个图像d3的高频信息d3_diff进行融合,得到第3高频融合结果d3_diff_merge。In one embodiment, starting from the nth image, the high-frequency information of the i-th image and the high-frequency information of the i-1th image are fused to obtain the i-1 high-frequency fusion result. For example, n=4, starting from the fourth image d4, the high-frequency information d4_diff of the fourth image and the high-frequency information d3_diff of the third image d3 are fused to obtain the third high-frequency fusion result d3_diff_merge.
进而在i<n时,将第i高频融合结果作为第i个图像的高频信息,例如i=3时,将第3高频融合结果d3_diff_merge作为第3个图像的高频信息d3_diff,i=2时,将第2高频融合结果d2_diff_merge作为第2个图像的高频信息d2_diff。Furthermore, when i<n, the i-th high-frequency fusion result is used as the high-frequency information of the i-th image. For example, when i=3, the third high-frequency fusion result d3_diff_merge is used as the high-frequency information of the third image d3_diff, i = 2, the second high-frequency fusion result d2_diff_merge is used as the high-frequency information d2_diff of the second image.
在得到第2个图像的高频信息d2_diff后,可以进一步对第2个图像的高频信息d2_diff和第1个图像的高频信息d1_diff进行融合,得到第1高频融合 结果d1_diff_merge。After obtaining the high-frequency information d2_diff of the second image, the high-frequency information d2_diff of the second image and the high-frequency information d1_diff of the first image can be further fused to obtain the first high-frequency fusion result d1_diff_merge.
由于图像经过下采样会减少图像噪声,因此根据不同分辨率的图像的高频信息进行逐次融合得到的第1高频融合结果,相对于原图像,也即第1个图像的高频信息,可以在保留高频信息的同时减少噪声的干扰,提高边缘检测的正确性。The down-sampling of the image will reduce the image noise, so the first high-frequency fusion result obtained by successive fusion according to the high-frequency information of the images of different resolutions, relative to the original image, that is, the high-frequency information of the first image, can While retaining high-frequency information, reduce noise interference and improve the accuracy of edge detection.
进而根据第i-1高频融合结果,对第i个图像的滤波结果和第i-1个图像的滤波结果进行融合,得到第i-1滤波融合结果,例如融合是指加权求和,那么可以设置第i-1高频融合结果与第i个图像的滤波结果的权值反相关,且与第i-1个图像的滤波结果的权值正相关,使得高频融合结果较大的像素对应的第i个图像的滤波结果的权值较小,且第i-1个图像的滤波结果对应的权值较大。Further, according to the i-1 high-frequency fusion result, the filter result of the i-th image and the filter result of the i-1 image are fused to obtain the i-1 filter fusion result. For example, fusion refers to weighted sum, then You can set the i-1 high-frequency fusion result to be inversely correlated with the weight of the filtering result of the i-th image, and positively correlated with the weight of the i-th image filtering result, so that the pixels with larger high-frequency fusion results The weight value of the filter result of the corresponding i-th image is small, and the weight value of the filter result of the i-th image is large.
由于第i个图像是基于第i-1个图像下采样得到的,下采样后的第i个图像的分辨率小于第i-1个图像的分辨率,会导致丢失部分高频信息,因此具有较好的降噪效果,那么第i个图像的滤波结果相对于第i-1个图像的滤波结果高频信息更少,而高频融合结果较大的像素对应到滤波图像中的像素是边缘的可能性更大,因此可以保留更多的高频信息,以便使边缘得到正确提取。Since the i-th image is based on the down-sampling of the i-1th image, the resolution of the i-th image after downsampling is less than the resolution of the i-1th image, which will cause some high-frequency information to be lost, so it has Better noise reduction effect, then the filtering result of the i-th image has less high-frequency information than the filtering result of the i-1th image, and the pixels with larger high-frequency fusion results correspond to the pixels in the filtered image are edges Is more likely, so more high-frequency information can be retained so that the edges can be correctly extracted.
基于本实施例,可以根据第i-1高频融合结果,对第i个图像的滤波结果和第i-1个图像的滤波结果进行融合,例如可以通过设置第i-1高频融合结果与第i个图像的滤波结果的权值反相关,且与第i-1个图像的滤波结果的权值正相关。当第i-1高频融合结果较大时,此处像素是高频信息的可能性大,对应到滤波结果中,使得第i-1个图像的滤波结果的权值较大,而第i个图像的滤波结果的权值较小;当第i-1高频融合结果较小时,此处像素是低频信息的可能性大,对应到滤波结果中,使得第i-1个图像的滤波结果的权值较小,而第i个图像的滤波结果的权值较大;从而对于第i-1滤波融合结果同时实现了在高频区域保留细节较多,在低频区域的去噪效果较高。Based on this embodiment, the filter result of the i-th image and the filter result of the i-1 image can be fused according to the i-1 high-frequency fusion result, for example, by setting the i-1 high-frequency fusion result and The weight of the filtering result of the i-th image is inversely correlated and positively correlated with the weight of the filtering result of the i-th image. When the i-1 high-frequency fusion result is large, there is a high possibility that the pixel is high-frequency information, corresponding to the filtering result, so that the weight of the filtering result of the i-1th image is larger, and the i The weight of the filtering result of each image is small; when the i-1 high-frequency fusion result is small, there is a high possibility that the pixel is low-frequency information, corresponding to the filtering result, so that the filtering result of the i-1 image The weight of the image is smaller, and the weight of the filtering result of the i-th image is larger; thus for the i-1 filter fusion result, more details are retained in the high-frequency region, and the denoising effect is higher in the low-frequency region. .
进而在i<n时,将第i高频融合结果作为第i个图像的高频信息,将第i滤波融合结果作为第i个图像的滤波结果,从而在对第2至第n-1个图像执行 上述步骤S3和S4的过程中,可以对第i-1个图像的高频信息和第i-2个图像的高频信息进行融合,得到第i-2高频融合结果,对第i-2个图像的高频信息和第i-3个图像的高频信息进行融合,得到第i-3高频融合结果,…,最终得到第1高频融合结果;另外,还可以对第i个图像的滤波结果和第i-1个图像的滤波结果进行融合,得到第i-1滤波融合结果,对第i-1个图像的滤波结果和第i-2个图像的滤波结果进行融合,得到第i-2滤波融合结果,…,最终得到第1滤波融合结果,第1滤波融合结果相对于原图像而言,就同时实现了在高频区域保留细节较多,在低频区域的去噪效果较高。Further, when i<n, the i-th high-frequency fusion result is used as the high-frequency information of the i-th image, and the i-th filter fusion result is used as the filter result of the i-th image, so that when the second to n-1 In the process of performing the above steps S3 and S4, the high frequency information of the i-1th image and the high frequency information of the i-2th image can be fused to obtain the i-2 high frequency fusion result. -The high-frequency information of the 2 images and the high-frequency information of the i-3 image are fused to obtain the i-3 high-frequency fusion result, ..., and finally the first high-frequency fusion result is obtained; in addition, the i The filtering result of each image and the filtering result of the i-1th image are fused to obtain the filtering result of the i-1th filter, and the filtering result of the i-1th image and the filtering result of the i-2th image are fused, Obtain the i-2 filter fusion result, ..., and finally get the first filter fusion result. Compared with the original image, the first filter fusion result realizes the preservation of more details in the high frequency area and the denoising in the low frequency area. The effect is higher.
在图1所示实施例的基础上,图2是根据本公开的实施例示出的一种对第i个图像的高频信息和第i-1个图像的高频信息进行融合,得到第i-1高频融合结果的示意流程图。如图2所示,所述对第i个图像的高频信息和第i-1个图像的高频信息进行融合,得到第i-1高频融合结果包括:Based on the embodiment shown in FIG. 1, FIG. 2 shows a method for fusing the high-frequency information of the i-th image and the high-frequency information of the i-1th image according to an embodiment of the present disclosure to obtain the i -1 Schematic flow chart of high-frequency fusion results. As shown in FIG. 2, the high-frequency information of the i-th image and the high-frequency information of the i-1th image are fused, and the result of the i-1 high-frequency fusion includes:
步骤S31,对第i个图像的高频信息进行上采样,得到第i高频上采样结果;Step S31, up-sampling the high-frequency information of the i-th image to obtain the i-th high-frequency up-sampling result;
步骤S32,根据第i-1第一权值,对第i高频上采样结果和第i-1个图像的高频信息进行加权求和,得到第i-1高频融合结果。In step S32, the i-th high-frequency up-sampling result and the high-frequency information of the i-1th image are weighted and summed according to the i-1 first weight to obtain the i-1 high-frequency fusion result.
在一个实施例中,由于第i个图像的分辨率小于第i-1个图像的分辨率,因此第i个图像的高频信息的分辨率小于第i-1个图像的高频信息的分辨率,为了将第i个图像的高频信息和第i-1个图像的高频信息进行加权求和,需要提高第i个图像的高频信息的分辨率,其中,可以通过对第i个图像的高频信息进行上采样,得到第i高频上采样结果,第i高频上采样结果的分辨率与第i-1个图像的高频信息的分辨率相同。In one embodiment, since the resolution of the i-th image is smaller than the resolution of the i-1th image, the resolution of the high-frequency information of the i-th image is smaller than the resolution of the high-frequency information of the i-1th image In order to weight and sum the high-frequency information of the i-th image and the high-frequency information of the i-1th image, it is necessary to increase the resolution of the high-frequency information of the i-th image. The high-frequency information of the image is up-sampled to obtain the i-th high-frequency up-sampling result, and the resolution of the i-th high-frequency up-sampling result is the same as the resolution of the high-frequency information of the i-1th image.
例如对于第4个图像的高频信息d4_diff,进行上采样得到第4高频上采样结果d4_up_diff,d4_up_diff的分辨率与第3个图像的高频信息d3_diff的分辨率相同。For example, for the high-frequency information d4_diff of the fourth image, up-sampling is performed to obtain the fourth high-frequency up-sampling result d4_up_diff. The resolution of d4_up_diff is the same as the resolution of the high-frequency information d3_diff of the third image.
进一步地,根据第i-1第一权值,对第i高频上采样结果和第i-1个图像的高频信息进行加权求和,得到第i-1高频融合结果,所采用的第i-1第一权 值可以根据需要进行设置,例如在i=4时,第3第一权值为w3,第3高频融合结果d3_diff_merge的计算方式如下:Further, according to the i-1 first weight value, the i-th high-frequency up-sampling result and the i-th image high-frequency information are weighted and summed to obtain the i-1 high-frequency fusion result. The i-1 first weight can be set as needed. For example, when i=4, the third first weight is w3, and the third high-frequency fusion result d3_diff_merge is calculated as follows:
d3_diff_merge=d3_diff×w3+d4_up_diff×(1-w3);d3_diff_merge=d3_diff×w3+d4_up_diff×(1-w3);
由于第i个图像是基于第i-1个图像下采样得到的,下采样后的第i个图像的分辨率小于第i-1个图像的分辨率,那么第i-1个图像的高频信息相对于第i个图像的高频信息,可以表达更多的高频信息,在这种情况下,通过设置第i-1第一权值,可以对融合过程中的去噪效果和细节保留程度进行调整。通常情况下,第一权重值为预设值,可以根据原始图像的信噪比确定第一权重值w(i-1),如果原始图像的信噪比较高,则w(i-1)可以取较大值。一般情况下,可以设置w(n-1),w(n-2)……w0依次递减。Since the i-th image is obtained based on the down-sampling of the i-1 image, the resolution of the i-th image after down-sampling is less than the resolution of the i-1 image, then the high frequency of the i-1 image Compared with the high-frequency information of the i-th image, the information can express more high-frequency information. In this case, by setting the i-1 first weight, the denoising effect and details in the fusion process can be retained Adjust the degree. Generally, the first weight value is a preset value, and the first weight value w(i-1) can be determined according to the signal-to-noise ratio of the original image. If the original image has a high signal-to-noise ratio, then w(i-1) You can take a larger value. In general, you can set w(n-1), w(n-2)...w0 decreases sequentially.
例如将第i-1第一权值设置的较大,那么第i-1个图像的高频信息可以较多地被融合,从而使得较多更高频的高频信息得以保留,也即融合过程中细节保留程度较高;相应地,若将第i-1第一权值设置的较小,那么第i高频上采样结果可以较多地被融合,从而使得较少的更高频的高频信息得以保留,那么相对而言去噪效果较好。For example, if the first weight of i-1 is set larger, then the high-frequency information of the i-1th image can be fused more, so that more high-frequency information of higher frequencies can be retained, that is, fusion The degree of detail retention is high in the process; accordingly, if the i-1 first weight is set smaller, the i-th high-frequency upsampling result can be fused more, resulting in less The high-frequency information is retained, so the denoising effect is relatively good.
需要说明的是,针对一个第i-1高频融合结果,可以通过一个第i-1第一权值来计算,例如在d3_diff_merge=d3_diff×w3+d4_up_diff×(1-w3)中,对于d3_diff和每个d4_up_diff中的每个像素而言,w3是固定值。但是,也可以根据需要设置第i-1第一权值为可变的,其中,针对不同位置的像素可以设置不同的第i-1第一权值,例如在d3_diff_merge=d3_diff×w3+d4_up_diff×(1-w3)中,对于d3_diff和每个d4_up_diff中的每个像素而言,基于像素位置的不同,w3可以有所不同。It should be noted that for an i-1 high-frequency fusion result, it can be calculated by an i-1 first weight, for example, in d3_diff_merge=d3_diff×w3+d4_up_diff×(1-w3), for d3_diff and For each pixel in each d4_up_diff, w3 is a fixed value. However, it is also possible to set the i-1th first weight value to be variable as needed, wherein different i-1th first weight values can be set for pixels in different positions, for example, in d3_diff_merge=d3_diff×w3+d4_up_diff× In (1-w3), for each pixel in d3_diff and each d4_up_diff, w3 may be different based on the difference in pixel position.
在图1或图2所示实施例的基础上,图3是根据第i-1高频融合结果,对第i个图像的滤波结果和第i-1个图像的滤波结果进行融合,得到第i-1滤波融合结果的示意流程图。如图3所示,所述根据第i-1高频融合结果,对第i个图像的滤波结果和第i-1个图像的滤波结果进行融合,得到第i-1滤波融合结果包括:Based on the embodiment shown in FIG. 1 or FIG. 2, FIG. 3 is based on the i-1 high-frequency fusion result, the filter result of the i-th image and the filter result of the i-1 image are fused to obtain the first The schematic flow chart of i-1 filter fusion result. As shown in FIG. 3, according to the i-1 high-frequency fusion result, the filter result of the i-th image and the filter result of the i-1 image are fused, and the i-1 filter fusion result includes:
步骤S41,对第i个图像的滤波结果进行上采样,得到第i滤波上采样结果;Step S41, up-sampling the filtering result of the i-th image to obtain the i-th filtering up-sampling result;
步骤S42,确定与第i-1高频融合结果对应的第i-1第二权值,其中,第i-1高频融合结果与第i-1第二权值正相关;Step S42: Determine the i-1 second weight value corresponding to the i-1 high frequency fusion result, where the i-1 high frequency fusion result is positively correlated with the i-1 second weight value;
步骤S43,根据第i-1第二权值对第i滤波上采样结果加权,根据1与第i-1第二权值之差对第i-1个图像的滤波结果加权,根据加权求和结果得到第i-1滤波融合结果。Step S43: Weight the i-th filter up-sampling result according to the i-1 second weight, weight the filter result of the i-1th image according to the difference between 1 and the i-1 second weight, and sum according to the weight As a result, the i-1th filter fusion result is obtained.
在一个实施例中,由于第i个图像的分辨率小于第i-1个图像的分辨率,因此第i个图像的滤波结果的分辨率小于第i-1个图像的滤波结果的分辨率,为了将第i个图像的滤波结果和第i-1个图像的滤波结果进行加权求和,需要提高第i个图像的滤波结果的分辨率,其中,可以通过对第i个图像的滤波结果进行上采样,得到第i滤波上采样结果,第i滤波上采样结果的分辨率与第i-1个图像的滤波结果的分辨率相同。例如对于第4个图像的滤波结果d4_filter,进行上采样得到第4高频上采样结果d4_up_filter,d4_up_filter的分辨率与第3个图像的滤波结果d4_filter的分辨率相同。In one embodiment, since the resolution of the i-th image is smaller than the resolution of the i-1th image, the resolution of the filtering result of the i-th image is smaller than the resolution of the filtering result of the i-1th image, In order to perform weighted summation of the filtering result of the i-th image and the filtering result of the i-1th image, it is necessary to increase the resolution of the filtering result of the i-th image, where the filtering result of the i-th image can be performed Up-sampling to obtain the i-th filter up-sampling result, the resolution of the i-th filter up-sampling result is the same as the resolution of the i-1 image filtering result. For example, for the filter result d4_filter of the fourth image, up-sampling is performed to obtain the fourth high-frequency up-sampling result d4_up_filter. The resolution of d4_up_filter is the same as the resolution of the filter result d4_filter of the third image.
进一步地,可以确定与第i-1高频融合结果对应的第i-1第二权值,通过设置第i-1高频融合结果与第i个图像的滤波结果的权值反相关,与第i-1个图像的滤波结果的权值正相关,使得高频融合结果较大的像素对应的第i个图像的滤波结果的权值较小,且第i-1个图像的滤波结果对应的权值较大。Further, the i-1 second weight value corresponding to the i-1 high frequency fusion result can be determined, and by setting the weight value of the i-1 high frequency fusion result inversely correlated with the filtering result of the i th image, and The weight of the filtering result of the i-1th image is positively correlated, so that the weight of the filtering result of the ith image corresponding to the pixel with a higher high-frequency fusion result is smaller, and the filtering result of the i-1th image corresponds to Has a larger weight.
例如在n=4的情况下,可以根据第3高频融合结果d3_diff_merge确定第3第二权值d3_weight,其中,针对具有不同d3_diff_merge的像素,所确定的d3_weight不同,那么对于第3个图像d3中的像素(i,j),其对应的第4滤波上采样结果d4_up_filter(i,j),对应的第3高频融合结果为d3_diff_merge(i,j),那么所确定的第3第二权值为d3_weight(i,j),像素(i,j)的第i-1高频融合结果d3_filter_new(i,j)等于:For example, in the case of n=4, the third second weight d3_weight may be determined according to the third high-frequency fusion result d3_diff_merge, where the determined d3_weight is different for pixels with different d3_diff_merge, then for the third image d3 Pixel (i,j), the corresponding fourth filter upsampling result d4_up_filter(i,j), the corresponding third high-frequency fusion result is d3_diff_merge(i,j), then the determined third second weight Is d3_weight(i,j), the i-1th high-frequency fusion result of pixel (i,j) d3_filter_new(i,j) is equal to:
d3_filter(i,j)*d3_weight(i,j)+d4_up_filter(i,j)*(1-d3_weight(i,j))d3_filter(i,j)*d3_weight(i,j)+d4_up_filter(i,j)*(1-d3_weight(i,j))
基于图1实施例所言,由于第4个图像是基于第3个图像下采样得到的, 下采样后的第4个图像的分辨率小于第3个图像的分辨率,会导致丢失部分高频信息,因此具有较好的降噪效果,那么第4个图像的滤波结果d4_filter相对于第3个图像的滤波结果d3_filter高频信息更少,而高频融合结果较大的像素对应到滤波图像中的像素是边缘的可能性更大,因此可以保留更多的高频信息,以便使边缘得到正确提取。Based on the example in FIG. 1, since the fourth image is obtained based on the down-sampling of the third image, the resolution of the down-sampled fourth image is less than that of the third image, which may cause some high-frequency loss. Information, so it has better noise reduction effect, then the filter result d4_filter of the fourth image is less high-frequency information than the filter result d3_filter of the third image, and the pixels with larger high-frequency fusion result correspond to the filtered image Of pixels are more likely to be edges, so more high-frequency information can be retained so that the edges are correctly extracted.
基于本实施例,可以根据第3高频融合结果,对第4个图像的滤波结果和第3个图像的滤波结果进行加权求和,例如可以通过设置第3高频融合结果与第4个图像的滤波结果的权值反相关,且与第3个图像的滤波结果的权值正相关,从而对于第3滤波融合结果同时实现了在高频区域保留细节较多,在低频区域的去噪效果较高。Based on this embodiment, the filtering result of the fourth image and the filtering result of the third image can be weighted and summed according to the third high-frequency fusion result, for example, by setting the third high-frequency fusion result and the fourth image The weights of the filtering results are inversely correlated and positively correlated with the weights of the filtering results of the third image, so that for the third filtering fusion result, more details are retained in the high-frequency region and the denoising effect in the low-frequency region Higher.
进而在i<4时,将第i高频融合结果作为第i个图像的高频信息,将第i滤波融合结果作为第i个图像的滤波结果,从而在对第2至第3个图像执行上述步骤S3和S4的过程中,可以对第3个图像的高频信息和第2个图像的高频信息进行加权求和,得到第2高频融合结果,并据此确定第2第二权值d2_weight,然后对第2个图像的高频信息和第1个图像的高频信息进行加权求和,得到第1高频融合结果,并据此确定第1第二权值d1_weight;另外,还可以基于第2第二权值d2_weight,对第3个图像的滤波结果和第2个图像的滤波结果进行加权求和,得到第2滤波融合结果,然后基于第1第二权值d1_weight,对第2个图像的滤波结果和第1个图像的滤波结果进行加权求和,最终得到第1滤波融合结果,第1滤波融合结果相对于原图像而言,就同时实现了在高频区域保留细节较多,在低频区域的去噪效果较高。Further, when i<4, the i-th high-frequency fusion result is used as the high-frequency information of the i-th image, and the i-th filter fusion result is used as the filter result of the i-th image, so that the second to third images are executed During the above steps S3 and S4, the high-frequency information of the third image and the high-frequency information of the second image can be weighted and summed to obtain the second high-frequency fusion result, and the second second weight can be determined accordingly Value d2_weight, and then weighted and sum the high-frequency information of the second image and the high-frequency information of the first image to obtain the first high-frequency fusion result, and determine the first second weight d1_weight based on this; in addition, The filtering result of the third image and the filtering result of the second image can be weighted and summed based on the second second weight d2_weight to obtain the second filter fusion result, and then based on the first second weight d1_weight, the The filtering results of the two images and the filtering result of the first image are weighted and summed, and finally the first filtering fusion result is obtained. Compared with the original image, the first filtering fusion result realizes the preservation of details in the high-frequency region. Many, the denoising effect is higher in the low frequency region.
可选地,第i-1高频融合结果与第i个图像的滤波结果的权值反相关,与第i-1个图像的滤波结果的权值正相关。Optionally, the i-1 high-frequency fusion result is inversely related to the weight of the filtering result of the i-th image, and positively related to the weight of the filtering result of the i-1 image.
需要说明的是,本公开实施例中的正相关,是指A和B正相关时,A在整体趋势上随着B的增大而增大,而在局部区间内,A可以随着B的增大而保持不变;本公开实施例中的正相关,是指A和B反相关时,A在整体趋势上随着B的增大而增减,而在局部区间内,A可以随着B的增大保持不变。It should be noted that the positive correlation in the embodiment of the present disclosure means that when A and B are positively correlated, A increases in the overall trend with the increase of B, and in a local interval, A can follow the B Increases and remains unchanged; the positive correlation in the embodiments of the present disclosure means that when A and B are inversely correlated, A increases or decreases with the increase of B in the overall trend, while in a local interval, A can increase with The increase in B remains unchanged.
在图3所示实施例的基础上,图4是确定与第i-1高频融合结果对应的第i-1第二权值的示意流程图。如图4所示,所述确定与第i-1高频融合结果对应的第i-1第二权值包括:Based on the embodiment shown in FIG. 3, FIG. 4 is a schematic flowchart of determining an i-1 second weight value corresponding to an i-1 high frequency fusion result. As shown in FIG. 4, the determining the i-1 second weight corresponding to the i-1 high frequency fusion result includes:
步骤S421,根据第i-1第二权值与第i-1高频融合结果的关联关系表,确定与第i-1高频融合结果对应的第i-1第二权值。Step S421: Determine the i-1 second weight corresponding to the i-1 high-frequency fusion result according to the association table between the i-1 second weight and the i-1 high-frequency fusion result.
在一个实施例中,可以通过关联关系表来存储第i-1第二权值与第i-1高频融合结果,在关联关系表中,不同的第i-1高频融合结果可以对应不同的第i-1第二权值,从而后续可以根据该关联关系表查询第i-1高频融合结果对应的第i-1第二权值。In an embodiment, the i-1 second weight value and the i-1 high-frequency fusion result may be stored in an association relationship table. In the association relationship table, different i-1 high-frequency fusion results may correspond to different I-1 second weight value, so that the i-1 second weight value corresponding to the i-1 high frequency fusion result can be subsequently queried according to the association relationship table.
可选地,下采样的方式包括以下至少之一:Optionally, the manner of downsampling includes at least one of the following:
高斯下采样,均值下采样,最大值或最小值下采样,中值下采样。Gaussian downsampling, mean downsampling, maximum or minimum downsampling, and median downsampling.
在一个实施例中,所采用的下采样的方式可以根据需要选择,并且每次下采样操作的方式可以是相同,也可以是不同的。In one embodiment, the adopted downsampling method may be selected according to needs, and the downsampling operation method may be the same or different each time.
可选地,上采样的方式包括以下至少之一:Optionally, the manner of upsampling includes at least one of the following:
最邻近元法,双线性内插法,三次内插法。The nearest neighbor element method, bilinear interpolation method, cubic interpolation method.
在一个实施例中,所采用的上采样的方式可以根据需要选择,并且每次上采样操作的方式可以是相同,也可以是不同的。In one embodiment, the adopted upsampling method may be selected according to needs, and the upsampling operation method may be the same or different each time.
可选地,保边滤波的方式包括以下至少之一:Optionally, the edge-preserving filtering method includes at least one of the following:
双边滤波、引导滤波、加权最小二乘法滤波。Bilateral filtering, guided filtering, weighted least squares filtering.
在一个实施例中,所采用的保边滤波的方式可以根据需要选择。In one embodiment, the edge-preserving filtering method used may be selected according to needs.
在上述任一实施例的基础上,图5是根据本公开的实施例示出的另一种图像处理方法的示意流程图。如图5所示,对原图像进行n-1次下采样,以确定n个分辨率的图像之前,所述方法还包括:Based on any of the above embodiments, FIG. 5 is a schematic flowchart of another image processing method according to an embodiment of the present disclosure. As shown in FIG. 5, before the original image is downsampled n-1 times to determine n resolution images, the method further includes:
步骤S5,根据所述原图像的分辨率,确定n的值。Step S5: Determine the value of n according to the resolution of the original image.
在一个实施例中,基于原图像的分辨率可以确定n的值,进而确定下采样的次数n-1,例如,原图像的分辨率越大,n可以越大,也即下采样的次数n-1可以越大,进而可以保证得到足够低频率的低频信息,以便保证融合后的 结果具有较好的去噪效果。In one embodiment, the value of n can be determined based on the resolution of the original image, and then the number of downsampling times n-1 is determined. For example, the higher the resolution of the original image, the larger n can be, that is, the number of downsampling times n -1 can be larger, which can ensure that the low-frequency information of sufficiently low frequency is obtained, so as to ensure that the fused result has a good denoising effect.
可选地,所述高频信息包括对应图像中每个像素和各自邻域内像素的像素值差值的绝对值之和的均值。Optionally, the high-frequency information includes a mean value of a sum of absolute values of pixel value differences between each pixel in the corresponding image and pixels in respective neighborhoods.
在一个实施例中,针对图像中的每个像素,可以计算该像素和邻域内像素的像素值差值的绝对值之和的均值,该均值可以表达该像素与其邻域内像素值的差值情况,若该均值较大,说明该像素与其邻域内像素值的差值较大,那么该像素就越可能属于图像中物体的边缘,因此可以将该均值作为该像素的高频信息。In one embodiment, for each pixel in the image, the average value of the sum of the absolute values of the difference between the pixel value of the pixel and the pixel in the neighborhood can be calculated, and the average value can express the difference between the pixel and the pixel value in the neighborhood If the average value is large, it means that the difference between the pixel value and the pixel value in the neighborhood is large, then the pixel is more likely to belong to the edge of the object in the image, so the average value can be used as the high-frequency information of the pixel.
与上述图像处理方法的实施例相对应地,本公开还提出了图像处理装置的实施例。Corresponding to the embodiments of the image processing method described above, the present disclosure also proposes embodiments of the image processing device.
本公开的实施例提出一种图像处理装置,包括处理器,所述处理器用于,An embodiment of the present disclosure proposes an image processing apparatus including a processor, the processor is used for,
对原图像进行n-1次下采样,以确定n个分辨率的图像,其中,第i个图像的分辨率小于第i-1个图像的分辨率,1<i≤n,第1个图像为所述原图像;The original image is downsampled n-1 times to determine n resolution images, where the resolution of the i-th image is less than the resolution of the i-1 image, 1<i≤n, the first image Is the original image;
针对每个图像分别进行保边滤波,以获得高频信息和滤波结果;Perform edge-preserving filtering for each image separately to obtain high-frequency information and filtering results;
对第2至第n个图像分别执行以下步骤,直至得到第1滤波融合结果:Perform the following steps on the 2nd to nth images, respectively, until the first filter fusion result is obtained:
对第i个图像的高频信息和第i-1个图像的高频信息进行融合,得到第i-1高频融合结果,其中,在i<n时,将第i高频融合结果作为第i个图像的高频信息;The high-frequency information of the i-th image and the high-frequency information of the i-1th image are fused to obtain the i-1 high-frequency fusion result, where, when i<n, the i-th high-frequency fusion result is taken as the High frequency information of i images;
根据第i-1高频融合结果,对第i个图像的滤波结果和第i-1个图像的滤波结果进行融合,得到第i-1滤波融合结果,其中,在i<n时,将第i滤波融合结果作为第i个图像的滤波结果。According to the i-1 high-frequency fusion result, the filter result of the i-th image and the filter result of the i-1 image are fused to obtain the i-1 filter fusion result, where, when i<n, the The i-filter fusion result is used as the filter result of the i-th image.
在一个实施例中,所述处理器用于,In one embodiment, the processor is used to,
对第i个图像的高频信息进行上采样,得到第i高频上采样结果;Up-sampling the high-frequency information of the i-th image to obtain the i-th high-frequency up-sampling result;
根据第i-1第一权值,对第i高频上采样结果和第i-1个图像的高频信息进行加权求和,得到第i-1高频融合结果。According to the i-1 first weight, the i-th high-frequency up-sampling result and the i-th image high-frequency information are weighted and summed to obtain the i-1 high-frequency fusion result.
在一个实施例中,所述处理器用于,In one embodiment, the processor is used to,
对第i个图像的滤波结果进行上采样,得到第i滤波上采样结果;Up-sampling the filtering result of the i-th image to obtain the i-th filtering up-sampling result;
确定与第i-1高频融合结果对应的第i-1第二权值,其中,第i-1高频融合结果与第i-1第二权值正相关;Determine the i-1 second weight corresponding to the i-1 high frequency fusion result, where the i-1 high frequency fusion result is positively correlated with the i-1 second weight;
根据第i-1第二权值对第i滤波上采样结果加权,根据1与第i-1第二权值之差对第i-1个图像的滤波结果加权,根据加权求和结果得到第i-1滤波融合结果。The i-th filter up-sampling result is weighted according to the i-1 second weight, the i-1 image filtering result is weighted according to the difference between 1 and the i-1 second weight, and the first i-1 filter fusion results.
在一个实施例中,第i-1高频融合结果与第i个图像的滤波结果的权值反相关,与第i-1个图像的滤波结果的权值正相关。In one embodiment, the i-1 high-frequency fusion result is inversely correlated with the weight of the filter result of the i-th image, and positively correlated with the weight of the filter result of the i-1 image.
在一个实施例中,所述处理器用于,In one embodiment, the processor is used to,
根据第i-1第二权值与第i-1高频融合结果的关联关系表,确定与第i-1高频融合结果对应的第i-1第二权值。The i-1 second weight value corresponding to the i-1 high frequency fusion result is determined according to the correlation table between the i-1 second weight value and the i-1 high frequency fusion result.
在一个实施例中,下采样的方式包括以下至少之一:In one embodiment, the manner of downsampling includes at least one of the following:
高斯下采样,均值下采样,最大值或最小值下采样,中值下采样。Gaussian downsampling, mean downsampling, maximum or minimum downsampling, and median downsampling.
在一个实施例中,上采样的方式包括以下至少之一:In one embodiment, the manner of upsampling includes at least one of the following:
最邻近元法,双线性内插法,三次内插法。The nearest neighbor element method, bilinear interpolation method, cubic interpolation method.
在一个实施例中,保边滤波的方式包括以下至少之一:In one embodiment, the edge-preserving filtering method includes at least one of the following:
双边滤波、引导滤波、加权最小二乘法滤波。Bilateral filtering, guided filtering, weighted least squares filtering.
在一个实施例中,处理器还用于,根据所述原图像的分辨率,确定n的值。In one embodiment, the processor is further configured to determine the value of n according to the resolution of the original image.
在一个实施例中,所述高频信息包括对应图像中每个像素和各自邻域内像素的像素值差值的绝对值之和的均值。In one embodiment, the high-frequency information includes an average value of the sum of the absolute values of the difference values of the pixel values of each pixel in the corresponding image and the pixels in the respective neighborhood.
本公开的实施例提出一种无人机,包括上述任一实施例所述的图像处理装置。An embodiment of the present disclosure proposes a drone, including the image processing device described in any of the above embodiments.
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。为了描述的方便,描述以上装置时以功能分为各种单元分别描述。当然,在实施本申请时可以把各单元的功能在同一个或多个软件和/或硬件中实现。本领域内的技术人员应明白, 本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。The system, device, module or unit explained in the above embodiments may be specifically implemented by a computer chip or entity, or implemented by a product having a certain function. For the convenience of description, when describing the above device, the functions are divided into various units and described separately. Of course, when implementing this application, the functions of each unit may be implemented in one or more software and/or hardware. Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The embodiments in this specification are described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant part can be referred to the description of the method embodiment.
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations There is any such actual relationship or order. The terms "include", "include", or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device that includes a series of elements includes not only those elements, but also others that are not explicitly listed Elements, or also include elements inherent to such processes, methods, objects, or equipment. Without more restrictions, the element defined by the sentence "include one..." does not exclude that there are other identical elements in the process, method, article or equipment that includes the element.
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。The above is only an embodiment of the present application, and is not intended to limit the present application. For those skilled in the art, this application may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in the scope of the claims of this application.

Claims (21)

  1. 一种图像处理方法,其特征在于,包括:An image processing method, which includes:
    对原图像进行n-1次下采样,以确定n个分辨率的图像,其中,第i个图像的分辨率小于第i-1个图像的分辨率,1<i≤n,第1个图像为所述原图像;The original image is downsampled n-1 times to determine n resolution images, where the resolution of the i-th image is less than the resolution of the i-1 image, 1<i≤n, the first image Is the original image;
    针对每个图像分别进行保边滤波,以获得高频信息和滤波结果;Perform edge-preserving filtering for each image separately to obtain high-frequency information and filtering results;
    对第2至第n个图像分别执行以下步骤,直至得到第1滤波融合结果:Perform the following steps on the 2nd to nth images, respectively, until the first filter fusion result is obtained:
    对第i个图像的高频信息和第i-1个图像的高频信息进行融合,得到第i-1高频融合结果,其中,在i<n时,将第i高频融合结果作为第i个图像的高频信息;The high-frequency information of the i-th image and the high-frequency information of the i-1th image are fused to obtain the i-1 high-frequency fusion result, where, when i<n, the i-th high-frequency fusion result is taken as the High frequency information of i images;
    根据第i-1高频融合结果,对第i个图像的滤波结果和第i-1个图像的滤波结果进行融合,得到第i-1滤波融合结果,其中,在i<n时,将第i滤波融合结果作为第i个图像的滤波结果。According to the i-1 high-frequency fusion result, the filter result of the i-th image and the filter result of the i-1 image are fused to obtain the i-1 filter fusion result, where, when i<n, the The i-filter fusion result is used as the filter result of the i-th image.
  2. 根据权利要求1所述的方法,其特征在于,所述对第i个图像的高频信息和第i-1个图像的高频信息进行融合,得到第i-1高频融合结果包括:The method according to claim 1, wherein the fusing the high-frequency information of the i-th image and the high-frequency information of the i-1th image to obtain the i-1 high-frequency fusion result includes:
    对第i个图像的高频信息进行上采样,得到第i高频上采样结果;Up-sampling the high-frequency information of the i-th image to obtain the i-th high-frequency up-sampling result;
    根据第i-1第一权值,对第i高频上采样结果和第i-1个图像的高频信息进行加权求和,得到第i-1高频融合结果。According to the i-1 first weight, the i-th high-frequency up-sampling result and the i-th image high-frequency information are weighted and summed to obtain the i-1 high-frequency fusion result.
  3. 根据权利要求1所述的方法,其特征在于,所述根据第i-1高频融合结果,对第i个图像的滤波结果和第i-1个图像的滤波结果进行融合,得到第i-1滤波融合结果包括:The method according to claim 1, wherein the filtering result of the i-th image and the filtering result of the i-1th image are fused according to the i-1 high-frequency fusion result to obtain the i-th 1 Filter fusion results include:
    对第i个图像的滤波结果进行上采样,得到第i滤波上采样结果;Up-sampling the filtering result of the i-th image to obtain the i-th filtering up-sampling result;
    确定与第i-1高频融合结果对应的第i第二权值,其中,第i-1高频融合结果与第i-1第二权值正相关;Determine the ith second weight corresponding to the ith-1 high-frequency fusion result, where the ith-1 high-frequency fusion result is positively correlated with the ith-1 second weight;
    根据第i-1第二权值对第i滤波上采样结果加权,根据1与第i-1第二权值之差对第i-1个图像的滤波结果加权,根据加权求和结果得到第i-1滤波融合结果。The i-th filter up-sampling result is weighted according to the i-1 second weight, the i-1 image filtering result is weighted according to the difference between 1 and the i-1 second weight, and the first i-1 filter fusion results.
  4. 根据权利要求3所述的方法,其特征在于,第i-1高频融合结果与第i 个图像的滤波结果的权值反相关,与第i-1个图像的滤波结果的权值正相关。The method according to claim 3, wherein the i-1 high-frequency fusion result is inversely correlated with the weight of the filtering result of the i-th image, and positively correlated with the weight of the filtering result of the i-1th image .
  5. 根据权利要求3所述的方法,其特征在于,所述确定与第i-1高频融合结果对应的第i-1第二权值包括:The method according to claim 3, wherein the determining the i-1 second weight corresponding to the i-1 high frequency fusion result includes:
    根据第i-1第二权值与第i-1高频融合结果的关联关系表,确定与第i-1高频融合结果对应的第i-1第二权值。The i-1 second weight value corresponding to the i-1 high frequency fusion result is determined according to the correlation table between the i-1 second weight value and the i-1 high frequency fusion result.
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,下采样的方式包括以下至少之一:The method according to any one of claims 1 to 5, wherein the manner of downsampling includes at least one of the following:
    高斯下采样,均值下采样,最大值或最小值下采样,中值下采样。Gaussian downsampling, mean downsampling, maximum or minimum downsampling, and median downsampling.
  7. 根据权利要求1至5中任一项所述的方法,其特征在于,上采样的方式包括以下至少之一:The method according to any one of claims 1 to 5, wherein the manner of upsampling includes at least one of the following:
    最邻近元法,双线性内插法,三次内插法。The nearest neighbor element method, bilinear interpolation method, cubic interpolation method.
  8. 根据权利要求1至5中任一项所述的方法,其特征在于,保边滤波的方式包括以下至少之一:The method according to any one of claims 1 to 5, wherein the edge-preserving filtering method includes at least one of the following:
    双边滤波、引导滤波、加权最小二乘法滤波。Bilateral filtering, guided filtering, weighted least squares filtering.
  9. 根据权利要求1至5中任一项所述的方法,其特征在于,对原图像进行n-1次下采样,以确定n个分辨率的图像之前,所述方法还包括:The method according to any one of claims 1 to 5, wherein before down-sampling the original image n-1 times to determine n resolution images, the method further comprises:
    根据所述原图像的分辨率,确定n的值。According to the resolution of the original image, the value of n is determined.
  10. 根据权利要求1至5中任一项所述的方法,其特征在于,所述高频信息包括对应图像中每个像素和各自邻域内像素的像素值差值的绝对值之和的均值。The method according to any one of claims 1 to 5, wherein the high-frequency information includes an average value of a sum of absolute values of differences in pixel values of each pixel in the corresponding image and pixels in respective neighborhoods.
  11. 一种图像处理装置,其特征在于,包括处理器,所述处理器用于,对原图像进行n-1次下采样,以确定n个分辨率的图像,其中,第i个图像的分辨率小于第i-1个图像的分辨率,1<i≤n,第1个图像为所述原图像;An image processing device, characterized by comprising a processor for down-sampling the original image n-1 times to determine n resolution images, wherein the resolution of the i-th image is less than The resolution of the i-1th image, 1<i≤n, the first image is the original image;
    针对每个图像分别进行保边滤波,以获得高频信息和滤波结果;Perform edge-preserving filtering for each image separately to obtain high-frequency information and filtering results;
    对第2至第n个图像分别执行以下步骤,直至得到第1滤波融合结果:Perform the following steps on the 2nd to nth images, respectively, until the first filter fusion result is obtained:
    对第i个图像的高频信息和第i-1个图像的高频信息进行融合,得到第i-1高频融合结果,其中,在i<n时,将第i高频融合结果作为第i个图像的高频 信息;The high-frequency information of the i-th image and the high-frequency information of the i-1th image are fused to obtain the i-1 high-frequency fusion result, where, when i<n, the i-th high-frequency fusion result is taken as the High frequency information of i images;
    根据第i-1高频融合结果,对第i个图像的滤波结果和第i-1个图像的滤波结果进行融合,得到第i-1滤波融合结果,其中,在i<n时,将第i滤波融合结果作为第i个图像的滤波结果。According to the i-1 high-frequency fusion result, the filter result of the i-th image and the filter result of the i-1 image are fused to obtain the i-1 filter fusion result, where, when i<n, the The i-filter fusion result is used as the filter result of the i-th image.
  12. 根据权利要求10所述的装置,其特征在于,所述处理器用于,The apparatus according to claim 10, wherein the processor is used to:
    对第i个图像的高频信息进行上采样,得到第i高频上采样结果;Up-sampling the high-frequency information of the i-th image to obtain the i-th high-frequency up-sampling result;
    根据第i-1第一权值,对第i高频上采样结果和第i-1个图像的高频信息进行加权求和,得到第i-1高频融合结果。According to the i-1 first weight, the i-th high-frequency up-sampling result and the i-th image high-frequency information are weighted and summed to obtain the i-1 high-frequency fusion result.
  13. 根据权利要求10所述的装置,其特征在于,所述处理器用于,The apparatus according to claim 10, wherein the processor is used to:
    对第i个图像的滤波结果进行上采样,得到第i滤波上采样结果;Up-sampling the filtering result of the i-th image to obtain the i-th filtering up-sampling result;
    确定与第i-1高频融合结果对应的第i-1第二权值,其中,第i-1高频融合结果与第i-1第二权值正相关;Determine the i-1 second weight corresponding to the i-1 high frequency fusion result, where the i-1 high frequency fusion result is positively correlated with the i-1 second weight;
    根据第i-1第二权值对第i滤波上采样结果加权,根据1与第i-1第二权值之差对第i-1个图像的滤波结果加权,根据加权求和结果得到第i-1滤波融合结果。The i-th filter up-sampling result is weighted according to the i-1 second weight, the i-1 image filtering result is weighted according to the difference between 1 and the i-1 second weight, and the first i-1 filter fusion results.
  14. 根据权利要求13所述的装置,其特征在于,第i-1高频融合结果与第i个图像的滤波结果的权值反相关,与第i-1个图像的滤波结果的权值正相关。The device according to claim 13, wherein the i-1 high-frequency fusion result is inversely related to the weight of the filtering result of the i-th image, and is positively related to the weight of the filtering result of the i-1 image .
  15. 根据权利要求14所述的装置,其特征在于,所述处理器用于,The apparatus according to claim 14, wherein the processor is used for,
    根据第i-1第二权值与第i-1高频融合结果的关联关系表,确定与第i-1高频融合结果对应的第i-1第二权值。The i-1 second weight value corresponding to the i-1 high frequency fusion result is determined according to the correlation table between the i-1 second weight value and the i-1 high frequency fusion result.
  16. 根据权利要求11至15中任一项所述的装置,其特征在于,下采样的方式包括以下至少之一:The device according to any one of claims 11 to 15, wherein the manner of downsampling includes at least one of the following:
    高斯下采样,均值下采样,最大值或最小值下采样,中值下采样。Gaussian downsampling, mean downsampling, maximum or minimum downsampling, and median downsampling.
  17. 根据权利要求11至15中任一项所述的装置,其特征在于,上采样的方式包括以下至少之一:The device according to any one of claims 11 to 15, wherein the manner of upsampling includes at least one of the following:
    最邻近元法,双线性内插法,三次内插法。The nearest neighbor element method, bilinear interpolation method, cubic interpolation method.
  18. 根据权利要求11至15中任一项所述的装置,其特征在于,保边滤波的方式包括以下至少之一:The device according to any one of claims 11 to 15, wherein the manner of edge-preserving filtering includes at least one of the following:
    双边滤波、引导滤波、加权最小二乘法滤波。Bilateral filtering, guided filtering, weighted least squares filtering.
  19. 根据权利要求11至15中任一项所述的装置,其特征在于,处理器还用于,根据所述原图像的分辨率,确定n的值。The apparatus according to any one of claims 11 to 15, wherein the processor is further configured to determine the value of n according to the resolution of the original image.
  20. 根据权利要求11至15中任一项所述的装置,其特征在于,所述高频信息包括对应图像中每个像素和各自邻域内像素的像素值差值的绝对值之和的均值。The device according to any one of claims 11 to 15, wherein the high-frequency information includes an average value of a sum of absolute values of pixel value differences between each pixel in the corresponding image and pixels in respective neighborhoods.
  21. 一种无人机,其特征在于,包括权利要求11至20中任一项所述的图像处理装置。An unmanned aerial vehicle, characterized by comprising the image processing device according to any one of claims 11 to 20.
PCT/CN2018/121726 2018-12-18 2018-12-18 Image processing method, image processing device, and unmanned aerial vehicle WO2020124355A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201880069922.4A CN111344736A (en) 2018-12-18 2018-12-18 Image processing method, image processing device and unmanned aerial vehicle
PCT/CN2018/121726 WO2020124355A1 (en) 2018-12-18 2018-12-18 Image processing method, image processing device, and unmanned aerial vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/121726 WO2020124355A1 (en) 2018-12-18 2018-12-18 Image processing method, image processing device, and unmanned aerial vehicle

Publications (1)

Publication Number Publication Date
WO2020124355A1 true WO2020124355A1 (en) 2020-06-25

Family

ID=71100109

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/121726 WO2020124355A1 (en) 2018-12-18 2018-12-18 Image processing method, image processing device, and unmanned aerial vehicle

Country Status (2)

Country Link
CN (1) CN111344736A (en)
WO (1) WO2020124355A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113296664A (en) * 2021-05-18 2021-08-24 Oppo广东移动通信有限公司 Screen resolution adjusting method and device, terminal equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120147225A1 (en) * 2008-08-01 2012-06-14 Nikon Corporation Image processing method
CN104008539A (en) * 2014-05-29 2014-08-27 西安理工大学 Image super-resolution rebuilding method based on multiscale geometric analysis
CN106530244A (en) * 2016-10-26 2017-03-22 长安大学 Image enhancement method
CN106611408A (en) * 2016-10-26 2017-05-03 成都易云知科技有限公司 Image fusion method
CN107316274A (en) * 2017-05-10 2017-11-03 重庆邮电大学 A kind of Infrared image reconstruction method that edge is kept
CN108205804A (en) * 2016-12-16 2018-06-26 阿里巴巴集团控股有限公司 Image processing method, device and electronic equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7856150B2 (en) * 2007-04-10 2010-12-21 Arcsoft, Inc. Denoise method on image pyramid
CN103514580B (en) * 2013-09-26 2016-06-08 香港应用科技研究院有限公司 For obtaining the method and system of the super-resolution image that visual experience optimizes
CN103778606B (en) * 2014-01-17 2018-01-12 Tcl集团股份有限公司 The processing method and relevant apparatus of a kind of image
CN106204657B (en) * 2016-07-21 2019-04-16 北京邮电大学 Moving target based on gaussian pyramid and wavelet transformation describes method across scale
CN108154474B (en) * 2017-12-22 2021-08-27 浙江大华技术股份有限公司 Super-resolution image reconstruction method, device, medium and equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120147225A1 (en) * 2008-08-01 2012-06-14 Nikon Corporation Image processing method
CN104008539A (en) * 2014-05-29 2014-08-27 西安理工大学 Image super-resolution rebuilding method based on multiscale geometric analysis
CN106530244A (en) * 2016-10-26 2017-03-22 长安大学 Image enhancement method
CN106611408A (en) * 2016-10-26 2017-05-03 成都易云知科技有限公司 Image fusion method
CN108205804A (en) * 2016-12-16 2018-06-26 阿里巴巴集团控股有限公司 Image processing method, device and electronic equipment
CN107316274A (en) * 2017-05-10 2017-11-03 重庆邮电大学 A kind of Infrared image reconstruction method that edge is kept

Also Published As

Publication number Publication date
CN111344736A (en) 2020-06-26

Similar Documents

Publication Publication Date Title
CN109087269B (en) Weak light image enhancement method and device
JP2015225665A (en) Image noise removal method and image noise removal device
US9811882B2 (en) Method and apparatus for processing super resolution image using adaptive preprocessing filtering and/or postprocessing filtering
EP2529353A1 (en) Method and system for generating an output image of increased pixel resolution from an input image
CN110335216B (en) Image processing method, image processing apparatus, terminal device, and readable storage medium
CN111882504B (en) Method and system for processing color noise in image, electronic device and storage medium
CN112997479B (en) Method, system and computer readable medium for processing images across a phase jump connection
CN110503704B (en) Method and device for constructing three-dimensional graph and electronic equipment
CN110415237B (en) Skin flaw detection method, skin flaw detection device, terminal device and readable storage medium
CN110874827A (en) Turbulent image restoration method and device, terminal equipment and computer readable medium
CN111935425B (en) Video noise reduction method and device, electronic equipment and computer readable medium
CN104363391A (en) Image defective pixel compensation method and system and photographing device
CN111598088B (en) Target detection method, device, computer equipment and readable storage medium
CN108234826B (en) Image processing method and device
KR102315471B1 (en) Image processing method and device
CN111833269A (en) Video noise reduction method and device, electronic equipment and computer readable medium
WO2020078102A1 (en) Image enhancement method and apparatus, and computer-readable storage medium
WO2020124355A1 (en) Image processing method, image processing device, and unmanned aerial vehicle
WO2024055458A1 (en) Image noise reduction processing method and apparatus, device, storage medium, and program product
WO2021102704A1 (en) Image processing method and apparatus
CN108470327B (en) Image enhancement method and device, electronic equipment and storage medium
WO2022016326A1 (en) Image processing method, electronic device, and computer-readable medium
CN111815535B (en) Image processing method, apparatus, electronic device, and computer readable medium
CN114596210A (en) Noise estimation method, device, terminal equipment and computer readable storage medium
CN114764839A (en) Dynamic video generation method and device, readable storage medium and terminal equipment

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: 18943850

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: 18943850

Country of ref document: EP

Kind code of ref document: A1