WO2017128646A1 - 一种图像处理的方法及装置 - Google Patents

一种图像处理的方法及装置 Download PDF

Info

Publication number
WO2017128646A1
WO2017128646A1 PCT/CN2016/090460 CN2016090460W WO2017128646A1 WO 2017128646 A1 WO2017128646 A1 WO 2017128646A1 CN 2016090460 W CN2016090460 W CN 2016090460W WO 2017128646 A1 WO2017128646 A1 WO 2017128646A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
brightness
processed
area
contour
Prior art date
Application number
PCT/CN2016/090460
Other languages
English (en)
French (fr)
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 中兴通讯股份有限公司
Publication of WO2017128646A1 publication Critical patent/WO2017128646A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/92Dynamic range modification of images or parts thereof based on global image properties
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • 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/20172Image enhancement details
    • G06T2207/20208High dynamic range [HDR] image processing

Definitions

  • the camera application of the smart terminal is a very widely used function.
  • a lot of image processing functions are implanted in the application, and the filter is one.
  • the filter is limited by the simplicity of the design device, the processing effect is poor, and the image filtering effect of the image is too much, which affects the good image clarity.
  • An embodiment of the present invention provides a method for image processing, including:
  • the determining the first area in the to-be-processed image includes:
  • the preset area is the first area.
  • determining that the area occupied by the preset object is the first area includes:
  • the preset object having the largest area is selected, and the area occupied by the preset object with the largest area selected is determined as the first area;
  • extracting an outline of the first area in the first image, and calculating a brightness determination threshold of the contour boundary according to the contour of the first area including:
  • a brightness determination threshold of the contour boundary Determining a brightness determination threshold of the contour boundary according to a product of a brightness maximum value and a first proportional coefficient, a product of a brightness minimum value and a second proportional coefficient, a brightness maximum value, a brightness minimum value, and/or a brightness average value;
  • the first proportional coefficient is a positive number of 1 and the second proportional coefficient is a positive number greater than 1.
  • performing the coarse quantization process on the image to be processed to obtain a second image including:
  • Y1 represents the brightness of the pixel after the quantization level is increased
  • y represents the brightness of the original pixel
  • Q represents the value of the quantization level
  • the value of Q is any integer from 1 to 255
  • [y/Q] represents the pair.
  • the processed image is obtained, including:
  • Y2 represents the brightness of the corresponding pixel
  • Y1 represents the brightness of the pixel after the quantization level is increased
  • K represents an arbitrary value between 0-1
  • b is any value between 0 and 255;
  • the brightness quantization level processing is performed on the corresponding pixel points by using the formula (3), and the enhancement processing of the contour boundary brightness in the second image is completed to ensure the consistency of the brightness quantization level of the pixel points of the second image:
  • Y2 represents the brightness of the corresponding pixel
  • Y3 represents the brightness of the pixel after processing the corresponding pixel Y2
  • Q represents the value of the quantization level
  • the value of Q is any integer in the 1-255
  • [Y2/Q] represents Do a rounding operation on the quotient of Y2 and Q.
  • An embodiment of the present invention further provides an apparatus for image processing, including:
  • the obtaining determining module is configured to obtain a to-be-processed image, and determine a first area in the image to be processed, where the first area is an area containing a preset object or a preset area;
  • the first processing module is configured to perform brightness blur processing on the image to be processed to obtain a first image
  • the calculation processing module is configured to extract a contour of the first region in the first image, and calculate a brightness determination threshold of the contour boundary according to the contour of the first region, and determine the threshold according to the brightness determination threshold Contour boundary information of all contours in the first image;
  • the second processing module is configured to perform coarse quantization processing on the image to be processed to obtain a second image
  • the processing acquisition module is configured to utilize contour edges of all contours determined from the first image
  • the boundary information is subjected to enhancement processing on the contour boundary in the second image to obtain a processed image.
  • the obtaining determining module includes:
  • the determining submodule is configured to determine whether a preset object exists in the image to be processed
  • the first determining sub-module is configured to determine, when the preset object exists in the to-be-processed image, that the area occupied by the preset object is the first area;
  • the second determining sub-module is configured to determine that the preset area is the first area when there is no preset object in the image to be processed.
  • the first determining submodule includes:
  • the first unit is configured to: when there are multiple preset objects in the image to be processed, select a preset object with the largest area, and determine that the area occupied by the preset object with the largest area selected is the first area;
  • the second unit is configured to: when there are two preset objects having the same area and size in the image to be processed, select a preset object that is close to the central coordinate, and determine the selected preset object that is close to the central coordinate.
  • the area occupied is the first area.
  • the calculation processing module includes:
  • the extraction statistics sub-module is configured to extract contour pixel points of the first area, and calculate a brightness maximum value, a brightness minimum value, and/or a brightness average value of the contour pixel points of the first area;
  • the third determining submodule is configured to determine a contour boundary according to a product of a brightness maximum value and a first proportional coefficient, a product of a brightness minimum value and a second proportional coefficient, a brightness maximum value, a brightness minimum value, and/or a brightness average value.
  • Brightness discrimination threshold a product of a brightness maximum value and a first proportional coefficient, a product of a brightness minimum value and a second proportional coefficient, a brightness maximum value, a brightness minimum value, and/or a brightness average value.
  • the first proportional coefficient is a positive number of 1 and the second proportional coefficient is a positive number greater than 1.
  • the second processing module is further configured to:
  • Y1 represents the brightness of the pixel after the quantization level is increased, and y represents the illumination of the original pixel.
  • Q represents the value of the quantization level, Q is any integer from 1 to 255, and [y/Q] represents the rounding operation for the quotient of y and Q.
  • the process obtaining module includes:
  • the extraction processing sub-module is configured to extract, according to the contour boundary information of all the contours in the first image, the pixel points of the contour boundary of the second image, and the pixel points of the contour boundary of the second image according to the formula (2) ) Calculate to get the brightness of the corresponding pixel:
  • Y2 represents the brightness of the corresponding pixel
  • Y1 represents the brightness of the pixel after the quantization level is increased
  • K represents an arbitrary value between 0-1
  • b is any value between 0 and 255;
  • the processing sub-module is configured to perform an increase brightness quantization level process on the corresponding pixel point by using formula (3), complete enhancement processing of the contour boundary brightness in the second image, and ensure brightness quantization of the pixel point of the second image.
  • Level consistency :
  • Y2 represents the brightness of the corresponding pixel
  • Y3 represents the brightness of the pixel after processing the corresponding pixel Y2
  • Q represents the value of the quantization level
  • the value of Q is any integer in the 1-255
  • [Y2/Q] represents Do a rounding operation on the quotient of Y2 and Q.
  • the contour pixel information of the first region of the first image subjected to the brightness blur processing is obtained, and the brightness threshold of the contour boundary is calculated according to the contour pixel information of the first region of the first image, and the brightness is determined according to the brightness. Threshold, determining contour boundary information of all contours in the first image, and then strengthening the contour boundary of the second image subjected to the coarse quantization processing of the luminance information according to the contour boundary information of all the contours in the first image, improving the image
  • the filter effect of the filter reduces the pitting in the image captured by the image and improves the sharpness of the captured image.
  • FIG. 1 is a first schematic diagram of a method for image processing according to an embodiment of the present invention
  • FIG. 2 is a second schematic diagram of an image processing method according to an embodiment of the present invention.
  • Figure 3a is a schematic diagram 1 of the prewitt operator
  • Figure 3b is a schematic diagram 2 of the prewitt operator
  • FIG. 4 is a third schematic diagram of an image processing method according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram 4 of a method for image processing according to an embodiment of the present invention.
  • FIG. 6 is a schematic overall flow chart of a method for image processing according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of an apparatus for image processing according to an embodiment of the present invention.
  • an embodiment of the present invention provides a method for image processing, including:
  • Step (S, Step) 101 Acquire an image to be processed, and determine a first area in the image to be processed, where the first area is an area containing a preset object or a preset area;
  • S105 Perform enhancement processing on the contour boundary in the second image by using contour boundary information of all contours in the first image to obtain a processed image.
  • the image filtering effect of the image is improved by adopting the contour extraction mechanism and the brightness quantization level mechanism, thereby effectively solving the problem that the filter effect of the existing image is excessive.
  • the image to be processed is located in a coordinate system.
  • the preset area is an area centered on the coordinate origin, and Let the size of the area be preset, h represents the longitudinal distance of the preset area, and w represents the lateral distance of the preset area.
  • the image to be processed is subjected to brightness blur processing to obtain a first image, wherein when the image to be processed is subjected to brightness blur processing, Gaussian filtering may be used for processing.
  • Gaussian filtering may be used for processing.
  • the manner of blurring is not limited to Gaussian filtering, and those skilled in the art may adopt other fuzzy processing methods according to requirements.
  • the contour of the first region in the first image needs to be extracted, and according to the contour of the extracted first region, a corresponding edge extraction operator, such as Sobel or prewitt, is used.
  • the Prewitt operator is an edge detection of a first-order differential operator, which uses the gray-scale difference between the upper and lower adjacent points of the pixel, reaches the extreme value detection edge at the edge, removes some false edges, and has a smoothing effect on noise.
  • the contour boundary information of all the contours in the first image is determined according to the obtained brightness discrimination threshold. Then, the coarse quantization processing of the luminance information is performed on the image to be processed to obtain a second image.
  • the contour boundary in the second image is enhanced according to the contour boundary information of all the contours in the first image to obtain a processed effect image. It should be noted that the purpose of brightness enhancement processing on the boundary is that the outline of the image can be clearly distinguished, so that the processed image is better.
  • the contour pixel information of the first region of the first image subjected to the brightness blur processing is obtained, and the brightness threshold of the contour boundary is calculated according to the contour pixel information of the first region of the first image, and the brightness is determined according to the brightness. Threshold, determining contour boundary information of all contours in the first image, and then performing enhancement processing on the contour boundary of the second image subjected to the coarse quantization processing of the luminance information according to the contour boundary information of all the contours in the first image, thereby improving the image
  • the filter photo effect effectively solves the problem that the filter effect of the existing image is too much.
  • the first area in the image to be processed is determined in step 101, as shown in FIG. 4, including:
  • S1011 determining whether a preset object exists in the image to be processed
  • S1012 When there is a preset object in the image to be processed, determining that the area occupied by the preset object is the first area;
  • the preset object referred to herein may include a face image.
  • the preset object when there is a face image in the image to be processed, that is, when there is a preset object in the image to be processed, it is determined that the area occupied by the face image is the first area.
  • the preset area When there is no face image in the image to be processed, it is necessary to determine the preset area as the first area. It should be noted that the location of the preset area and the area size of the preset area are preset, and those skilled in the art can adjust the preset area according to actual needs.
  • determining that the area occupied by the preset object is the first area includes:
  • the preset object with the largest area is selected, and the area occupied by the preset object with the largest area selected is determined as the first area;
  • the preset object close to the central coordinate is selected, and the selected area occupied by the preset object close to the central coordinate is determined as the first area.
  • the preset object when there is a preset object in the image to be processed, the preset object here takes the face image as an example.
  • the following areas are determined to determine the first area:
  • the area occupied by the face image is the first area
  • the area size of the plurality of face images can be compared at this time, and the face image with the largest area is determined, and the area occupied by the face image with the largest area is the first region;
  • the distance between the center point of the area occupied by the face image and the coordinate origin of the coordinate system in which the image to be processed is located.
  • the area occupied by the first face image may be determined. For the first area.
  • the contour of the first region in the first image is extracted in step 103, and the brightness determination threshold of the contour boundary is calculated according to the contour of the first region.
  • the method includes:
  • S1031 extract a contour pixel of the first region, and calculate a brightness maximum value, a brightness minimum value, and/or a brightness average value of the contour pixel point of the first region;
  • determining a brightness determination threshold of the contour boundary according to a product of a brightness maximum value and a first proportional coefficient, a product of a brightness minimum value and a second proportional coefficient, a brightness maximum value, a brightness minimum value, and/or a brightness average value;
  • the contour pixel of the first area needs to be acquired, and each pixel point is counted for the obtained contour pixel of the first area.
  • the brightness value determines the brightness determination threshold of the contour boundary according to the brightness value of each pixel.
  • the brightness determination threshold of the contour boundary is determined according to the brightness value of each pixel point, including but not limited to the following methods:
  • the brightness value of each pixel is counted, and the maximum brightness value is selected, and the obtained maximum brightness value is multiplied by the first proportional coefficient to obtain a brightness determination threshold of the contour boundary, wherein the first proportional coefficient is between 0 and 1. Any value.
  • the brightness value of each pixel is counted and the maximum brightness is selected. Then calculate all the pixels The average value of the brightness values is taken as the mean value of the brightness maximum value and the brightness average value to obtain the brightness discrimination threshold of the contour boundary.
  • the contour boundary extraction algorithm may be used to determine the contour boundary information of all the contours in the first image according to the brightness determination threshold.
  • the operator used in the contour boundary extraction algorithm is the same as the operator used in calculating the boundary information of the first region.
  • the brightness determination threshold is here as a constraint such that the brightness of the pixel points of all the contour boundaries in the first image is smaller than the brightness determination threshold.
  • the pixel points of the contour boundary of the second image are extracted according to the contour boundary information of all the contours in the first image, and the pixel points of the contour boundary of the second image are subjected to brightness processing by using formula (2).
  • K is 0.1
  • the value of b can take any value from 0 to 253.
  • the values of K and b are determined for the same image. For example, K takes 0.1, the value of b takes 4, and the value of Y1 is 20. According to formula 2, the value of Y2 is 6. For the different pixels of the same image, the value of Y1 is 30, and the calculation is based on Equation 2, and the value of Y2 is 7.
  • the brightness quantization level processing of Y2 needs to be performed by using the formula (3).
  • S207 Perform enhancement processing on the contour boundary in the second image by using contour boundary information of all contours in the first image.
  • the embodiment of the invention further provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the image processing method.
  • An embodiment of the present invention further provides an apparatus for image processing, as shown in FIG. 7, comprising:
  • the obtaining determining module 10 is configured to obtain an image to be processed, and determine a first area in the image to be processed, where the first area is an area containing a preset object or a preset area;
  • the first processing module 20 is configured to perform brightness blur processing on the image to be processed to obtain a first image
  • the calculation processing module 30 is configured to extract the contour of the first region in the first image, calculate a brightness determination threshold of the contour boundary according to the contour of the first region, and determine all contours in the first image according to the brightness determination threshold. Contour boundary information;
  • the second processing module 40 is configured to perform coarse quantization processing of the luminance information on the image to be processed to obtain a second image
  • the process acquisition module 50 is configured to perform enhancement processing on the contour boundary in the second image using the contour boundary information of all the contours determined from the first image to obtain a processed image.
  • the determining sub-module 11 is configured to determine whether a preset object exists in the image to be processed
  • the second determining sub-module 13 is configured to determine that the preset area is the first area when there is no preset object in the image to be processed.
  • the first determining submodule 12 includes:
  • the first unit 121 is configured to: when there are multiple preset objects in the image to be processed, select the preset object with the largest area, and determine that the area occupied by the preset object with the largest area is the first area;
  • the second unit 122 is configured to: when there are two preset objects of the same size and size in the image to be processed, select a preset object that is close to the central coordinate, and determine that the selected distance is close to the central coordinate.
  • the area occupied by the preset object is the first area.
  • the calculation processing module 30 includes:
  • the extraction statistics sub-module 31 is configured to extract contour pixel points of the first region, and calculate a brightness maximum value, a brightness minimum value, and/or a brightness average value of the contour pixel points of the first region;
  • the first proportional coefficient is a positive number of 1 and the second proportional coefficient is a positive number greater than 1.
  • the extraction processing sub-module is configured to extract, according to the contour boundary information of all the contours in the first image, the pixel points of the contour boundary of the second image, and the pixel points of the contour boundary of the second image according to the formula (2) ) Calculate to get the brightness of the corresponding pixel:
  • Y2 represents the brightness of the corresponding pixel
  • Y1 represents the brightness of the pixel after the quantization level is increased
  • K represents an arbitrary value between 0-1
  • b is any value between 0 and 255;
  • the processing sub-module is configured to perform an increase brightness quantization level process on the corresponding pixel point by using formula (3), complete enhancement processing of the contour boundary brightness in the second image, and ensure brightness quantization of the pixel point of the second image.
  • Level consistency :
  • Y2 represents the brightness of the corresponding pixel
  • Y3 represents the brightness of the pixel after processing the corresponding pixel Y2
  • Q represents the value of the quantization level
  • the value of Q is any integer in the 1-255
  • [Y2/Q] The representative performs a rounding operation on the quotient of Y2 and Q.
  • the image processing method of the embodiment of the present invention calculates the brightness of the contour boundary according to the contour pixel information of the first region of the first image by acquiring the contour pixel information of the first region of the first image subjected to the brightness blur processing. Thresholding, determining the contour boundary information of all the contours in the first image according to the brightness discrimination threshold, and then performing the contour boundary of the second image subjected to the coarse quantization processing of the luminance information according to the contour boundary information of all the contours in the first image
  • the enhanced processing can improve the image taking effect of the image, and effectively solve the problem that the image filtering effect of the image is excessive.
  • the apparatus for image processing provided by the embodiment of the present invention is a device applying the above method, and all embodiments of the foregoing method are applicable to the device, and all of the same or similar beneficial effects can be achieved.
  • the above technical solution reduces the pitting in the image capturing effect of the image and improves the sharpness of the image.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

一种图像处理的方法及装置,包括:获取待处理图像,确定待处理图像中的第一区域,第一区域为包含预设对象的区域或一预设区域;对待处理图像进行亮度模糊处理,得到第一图像;提取出第一图像中第一区域的轮廓,并根据第一区域的轮廓,计算出轮廓边界的亮度判别门限,并根据亮度判别门限,确定第一图像中所有轮廓的轮廓边界信息;对待处理图像进行亮度信息的粗量化处理,得到第二图像;利用第一图像中所有轮廓的轮廓边界信息,对第二图像中的轮廓边界进行强化处理后,得到处理后的图像。通过采用轮廓提取机制、增加亮度量化等级机制,实现了图像的滤镜拍照效果的改进,减少了图像的滤镜拍摄效果中的麻点,提高了图像的清晰度。

Description

一种图像处理的方法及装置 技术领域
本文涉及但不限于图像处理技术领域,尤其涉及一种图像处理的方法及装置。
背景技术
智能终端的相机应用是一个使用非常广泛的功能。为了提升相机应用的实用性,在应用内植入了很多图像处理功能,滤镜就是一种。
现关技术中,滤镜受限于其设计装置的简单性,处理效果较差,图像的滤镜拍摄效果麻点过多,影响获得好的图像清晰度。
发明内容
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。
本发明实施例提供一种图像处理的方法及装置,能够通过设计简单的滤镜,提高获得的图像的清晰度。
本发明实施例提供一种图像处理的方法,包括:
获取待处理图像,确定所述待处理图像中的第一区域,所述第一区域为包含预设对象的区域或一预设区域;
对所述待处理图像进行亮度模糊处理,得到第一图像;
提取出所述第一图像中所述第一区域的轮廓,并根据所述第一区域的轮廓,计算出轮廓边界的亮度判别门限,并根据所述亮度判别门限,确定所述第一图像中所有轮廓的轮廓边界信息;
对所述待处理图像进行亮度信息的粗量化处理,得到第二图像;
利用从所述第一图像中确定的所有轮廓的轮廓边界信息,对所述第二图像中的轮廓边界进行强化处理,得到处理后的图像。
可选的,所述确定所述待处理图像中的第一区域,包括:
判断所述待处理图像中是否存在预设对象;
当所述待处理图像中存在预设对象时,确定预设对象所占的区域为所述第一区域;
当所述待处理图像中不存在预设对象时,确定预设区域为所述第一区域。
可选的,所述当所述待处理图像中存在预设对象时,确定预设对象所占的区域为所述第一区域,包括:
当所述待处理图像中存在多个预设对象时,选取面积最大的预设对象,并确定选取的面积最大的预设对象所占的区域为所述第一区域;
当所述待处理图像中存在两个面积大小相同的预设对象时,选取与中心坐标距离近的预设对象,并确定选取的与中心坐标距离近的预设对象所占的区域为所述第一区域。
可选的,所述提取出所述第一图像中所述第一区域的轮廓,并根据所述第一区域的轮廓,计算出轮廓边界的亮度判别门限,包括:
提取所述第一区域的轮廓像素点,统计所述第一区域的轮廓像素点的亮度最大值、亮度最小值和/或者亮度平均值;
根据亮度最大值与第一比例系数的乘积、亮度最小值与第二比例系数的乘积、亮度最大值、亮度最小值和/或亮度平均值确定轮廓边界的亮度判别门限;
其中,所述第一比例系数为小1的正数,所述第二比例系数为大于1的正数。
可选的,所述对所述待处理图像进行亮度信息的粗量化处理,得到第二图像,包括:
提取所述待处理图像的像素点,对所述待处理图像的像素点根据公式(1)进行增加亮度量化等级处理,获取所述第二图像:
Y1=[y/Q]*Q          公式(1)
其中:Y1代表经增加量化等级处理后的像素点亮度,y代表原像素点亮度,Q代表量化等级的数值,Q的取值为1-255中的任一整数,[y/Q]代表对 y与Q的商做取整操作。
可选的,所述利用所述第一图像中所有轮廓的轮廓边界信息,对所述第二图像中的轮廓边界进行强化处理后,得到处理后的图像,包括:
根据所述第一图像中所有轮廓的轮廓边界信息,提取所述第二图像的轮廓边界的像素点,对所述第二图像的轮廓边界的像素点根据公式(2)进行计算获取相应像素点亮度:
Y2=K*Y1+b           公式(2)
其中:Y2代表相应像素点亮度,Y1代表经增加量化等级处理后的像素点亮度,K表示0-1之间的任意数值,b是0-255之间的任一数值;
采用公式(3)对相应像素点进行增加亮度量化等级处理,完成对所述第二图像中的轮廓边界亮度的强化处理,保证所述第二图像的像素点的亮度量化等级的一致性:
Y3=[Y2/Q]*Q        公式(3)
其中:Y2代表相应像素点亮度,Y3代表对相应像素点Y2处理后的像素点亮度,Q代表量化等级的数值,Q的取值为1-255中的任一整数,[Y2/Q]代表对Y2与Q的商做取整操作。
本发明实施例还提供一种图像处理的装置,包括:
获取确定模块设置为,获取待处理图像,确定所述待处理图像中的第一区域,所述第一区域为包含预设对象的区域或一预设区域;
第一处理模块设置为,对所述待处理图像进行亮度模糊处理,得到第一图像;
计算处理模块设置为,提取出所述第一图像中所述第一区域的轮廓,并根据所述第一区域的轮廓,计算出轮廓边界的亮度判别门限,并根据所述亮度判别门限,确定所述第一图像中所有轮廓的轮廓边界信息;
第二处理模块设置为,对所述待处理图像进行亮度信息的粗量化处理,得到第二图像;
处理获取模块设置为,利用从所述第一图像中确定的所有轮廓的轮廓边 界信息,对所述第二图像中的轮廓边界进行强化处理,得到处理后的图像。
可选的,所述获取确定模块包括:
判断子模块设置为,判断所述待处理图像中是否存在预设对象;
第一确定子模块设置为,当所述待处理图像中存在预设对象时,确定预设对象所占的区域为所述第一区域;
第二确定子模块设置为,当所述待处理图像中不存在预设对象时,确定预设区域为所述第一区域。
可选的,所述第一确定子模块包括:
第一单元设置为,当所述待处理图像中存在多个预设对象时,选取面积最大的预设对象,并确定选取的面积最大的预设对象所占的区域为所述第一区域;
第二单元设置为,当所述待处理图像中存在两个面积大小相同的预设对象时,选取与中心坐标距离近的预设对象,并确定选取的与中心坐标距离近的预设对象所占的区域为所述第一区域。
可选的,所述计算处理模块包括:
提取统计子模块设置为,提取所述第一区域的轮廓像素点,统计所述第一区域的轮廓像素点的亮度最大值、亮度最小值和/或者亮度平均值;
第三确定子模块设置为,用于根据亮度最大值与第一比例系数的乘积、亮度最小值与第二比例系数的乘积、亮度最大值、亮度最小值和/或亮度平均值确定轮廓边界的亮度判别门限;
其中,所述第一比例系数为小1的正数,所述第二比例系数为大于1的正数。
可选的,所述第二处理模块进一步用于:
提取所述待处理图像的像素点,对所述待处理图像的像素点根据公式(1)进行增加亮度量化等级处理,获取所述第二图像:
Y1=[y/Q]*Q          公式(1)
其中:Y1代表经增加量化等级处理后的像素点亮度,y代表原像素点亮 度,Q代表量化等级的数值,Q的取值为1-255中的任一整数,[y/Q]代表对y与Q的商做取整操作。
可选的,所述处理获取模块包括:
提取处理子模块设置为,根据所述第一图像中所有轮廓的轮廓边界信息,提取所述第二图像的轮廓边界的像素点,对所述第二图像的轮廓边界的像素点根据公式(2)进行计算获取相应像素点亮度:
Y2=K*Y1+b         公式(2)
其中:Y2代表相应像素点亮度,Y1代表经增加量化等级处理后的像素点亮度,K表示0-1之间的任意数值,b是0-255之间的任一数值;
处理子模块设置为,采用公式(3)对相应像素点进行增加亮度量化等级处理,完成对所述第二图像中的轮廓边界亮度的强化处理,保证所述第二图像的像素点的亮度量化等级的一致性:
Y3=[Y2/Q]*Q          公式(3)
其中:Y2代表相应像素点亮度,Y3代表对相应像素点Y2处理后的像素点亮度,Q代表量化等级的数值,Q的取值为1-255中的任一整数,[Y2/Q]代表对Y2与Q的商做取整操作。本发明实施例的上述技术方案包括如下有益效果:
本发明实施例通过获取经过亮度模糊处理的第一图像的第一区域的轮廓像素点信息,根据第一图像的第一区域的轮廓像素点信息计算获得轮廓边界的亮度判别门限,并根据亮度判别门限,确定第一图像中所有轮廓的轮廓边界信息,然后根据第一图像中所有轮廓的轮廓边界信息,对进行亮度信息的粗量化处理后的第二图像的轮廓边界进行强化处理,改进了图像的滤镜拍照效果,减少了图像的滤镜拍摄图像中的麻点,提高了拍摄图像的清晰度。
在阅读并理解了附图和详细描述后,可以明白其他方面。
附图概述
图1为本发明实施例图像处理的方法示意图一;
图2为本发明实施例图像处理的方法示意图二;
图3a为prewitt算子的示意图一;
图3b为prewitt算子的示意图二;
图4为本发明实施例图像处理的方法示意图三;
图5为本发明实施例图像处理的方法示意图四;
图6为本发明实施例图像处理的方法整体流程示意图;
图7为本发明实施例图像处理的装置示意图。
本发明的实施方式
下文中将结合附图对本申请的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。
如图1所示,本发明实施例提供一种图像处理的方法,包括:
步骤(S,Step)101、获取待处理图像,确定待处理图像中的第一区域,第一区域为包含预设对象的区域或一预设区域;
S102、对待处理图像进行亮度模糊处理,得到第一图像;
S103、提取出第一图像中第一区域的轮廓,并根据第一区域的轮廓,计算出轮廓边界的亮度判别门限,并根据亮度判别门限,确定第一图像中所有轮廓的轮廓边界信息;
S104、对待处理图像进行亮度信息的粗量化处理,得到第二图像;
S105、利用第一图像中所有轮廓的轮廓边界信息,对第二图像中的轮廓边界进行强化处理后,得到处理后的图像。
本发明实施例上述步骤,通过采用轮廓提取机制、增加亮度量化等级机制改进图像的滤镜拍照效果,有效解决现有图像的滤镜拍摄效果麻点过多的问题。
可选的,首先获取待处理图像,为了便于计算,可以将获得的待处理图像以yuv(yuv被欧洲电视系统所采用的一种颜色编码方法(属于帕尔制(PAL),是PAL和塞康制(SECAM)模拟彩色电视制式采用的颜色空间)格式进行存储。然后确定待处理图像中的第一区域,这里的第一区域可以是包含预设对象的区域,也可以是一预设区域。本发明的预设对象以人脸图像 为例,本领域的技术人员也可以根据需求来确定其他预设对象,比如以肤色或是指定颜色(例如、浅黄色、棕黄色等)为特征的区域。。
需要说明的是,待处理图像位于一坐标系内,当第一区域为一预设区域时,通常情况下,如图2所示,预设区域为以坐标原点为中心的一区域,且预设区域的大小是预先设置的,h代表预设区域的纵向距离,w代表预设区域的横向距离。
在确定待处理图像中的第一区域之后,需要对待处理图像进行亮度模糊处理,获取到第一图像,其中在对待处理图像进行亮度模糊处理时,可以采用高斯滤波方式进行处理。但模糊处理的方式并不局限于高斯滤波一种,本领域技术人员可根据需求采用其他的模糊处理方式。
在获取得到第一图像之后,需要提取出第一图像中第一区域的轮廓,并根据提取出的第一区域的轮廓,采用相应的边缘提取算子,比如索贝尔(sobel)或是prewitt(Prewitt算子是一种一阶微分算子的边缘检测,利用像素点上下、左右邻点的灰度差,在边缘处达到极值检测边缘,去掉部分伪边缘,对噪声具有平滑作用。其原理是在图像空间利用两个方向模板与图像进行邻域卷积来完成的,这两个方向模板一个检测水平边缘,一个检测垂直边缘)等算子,计算第一区域的边界信息,根据第一区域的边界信息计算出轮廓边界的亮度判别门限。其中prewitt算子的示意图如图3a和3b所示。
根据得到的亮度判别门限,确定第一图像中所有轮廓的轮廓边界信息。然后针对待处理图像进行亮度信息的粗量化处理,得到第二图像。根据第一图像中所有轮廓的轮廓边界信息,对第二图像中的轮廓边界进行强化处理,得到处理后的效果图像。需要说明的是,对边界进行亮度强化处理的目的在于:可以清晰地区分出图像的轮廓,使得处理后图像效果更好。
本发明实施例通过获取经过亮度模糊处理的第一图像的第一区域的轮廓像素点信息,根据第一图像的第一区域的轮廓像素点信息计算获得轮廓边界的亮度判别门限,并根据亮度判别门限,确定第一图像中所有轮廓的轮廓边界信息,然后根据第一图像中所有轮廓的轮廓边界信息,对进行亮度信息的粗量化处理后的第二图像的轮廓边界进行强化处理,可以改进图像的滤镜拍照效果,有效解决现有图像的滤镜拍摄效果麻点过多的问题。
在本发明上述实施例中,步骤101中确定待处理图像中的第一区域,如图4所示,包括:
S1011、判断待处理图像中是否存在预设对象;
S1012、当待处理图像中存在预设对象时,确定预设对象所占的区域为第一区域;
S1013、当待处理图像中不存在预设对象时,确定预设区域为第一区域。
可选的,在确定待处理图像中的第一区域时,需要判断待处理图像中是否存在预设对象。在本实施例中,这里所说的预设对象可以包括人脸图像。当待处理图像中存在人脸图像时,即待处理图像中存在预设对象时,确定人脸图像所占的区域为第一区域。当待处理图像中不存在人脸图像时,需要确定预设区域作为第一区域。需要说明的是,预设区域的位置以及预设区域的面积大小均是预先设置的,本领域技术人员可以根据实际需求在预先设置过程中对其进行调整。
可选的,待处理图像中存在预设对象时,确定预设对象所占的区域为所述第一区域包括:
当待处理图像中存在多个预设对象时,选取面积最大的预设对象,并确定选取的面积最大的预设对象所占的区域为所述第一区域;
当待处理图像中存在两个面积大小相同的预设对象时,选取与中心坐标距离近的预设对象,并确定选取的与中心坐标距离近的预设对象所占的区域为第一区域。
当待处理图像中存在预设对象时,这里的预设对象以人脸图像为例,这时需要分为以下几种情况来确定第一区域:
当待处理图像中仅存在一个人脸图像时,这时可以确定人脸图像所占的区域为第一区域;
当待处理图像中仅存在多个人脸图像时,这时可以对多个人脸图像的面积大小进行比较,确定面积最大的一人脸图像,则面积最大的人脸图像所占的区域即为第一区域;
当待处理图像中存在两个面积大小相同的人脸图像时,这时需要查看人 脸图像所占区域的中心点与待处理图像所在的坐标系的坐标原点的距离大小。当第一人脸图像所占区域的中心点与坐标原点之间的距离小于第二人脸图像所占区域的中心点与坐标原点之间的距离时,可以确定第一人脸图像所占区域为第一区域。
在本发明上述实施例中,步骤103中提取出第一图像中第一区域的轮廓,并根据第一区域的轮廓,计算出轮廓边界的亮度判别门限,如图5所示,包括:
S1031、提取第一区域的轮廓像素点,统计第一区域的轮廓像素点的亮度最大值、亮度最小值和/或者亮度平均值;
S1032、根据亮度最大值与第一比例系数的乘积、亮度最小值与第二比例系数的乘积、亮度最大值、亮度最小值和/或者亮度平均值确定轮廓边界的亮度判别门限;
其中,第一比例系数为小1的正数,第二比例系数为大于1的正数。
可选的,在根据第一区域的轮廓,计算轮廓边界的亮度判别门限时,首先需要获取第一区域的轮廓像素点,针对于获取得到的第一区域的轮廓像素点,统计每一个像素点的亮度值,根据每个像素点的亮度值来确定轮廓边界的亮度判别门限。
在根据每一个像素点的亮度值来确定轮廓边界的亮度判别门限,包括但不局限于以下几种方法:
统计每一个像素点的亮度值,并选取亮度最大值,将获取得到的亮度最大值与第一比例系数相乘,获得轮廓边界的亮度判别门限,其中,第一比例系数为0~1之间的任意数值。
统计每一个像素点的亮度值,并选取亮度最小值,将获取得到的亮度最小值与第二比例系数相乘,获得轮廓边界的亮度判别门限,其中,第二比例系数为大于1的数。
统计每一个像素点的亮度值,并计算所有像素点的亮度值的平均值,将计算得到的平均值作为轮廓边界的亮度判别门限。
统计每一个像素点的亮度值,并选取亮度最大值。然后计算所有像素点 的亮度值的平均值,取亮度最大值和亮度平均值的均值得到轮廓边界的亮度判别门限。
在获取得到轮廓边界的亮度判别门限之后,可以根据亮度判别门限,采用轮廓边界提取算法,确定第一图像中所有轮廓的轮廓边界信息。需要说明的是,在采用轮廓边界提取算法时所采用的算子与计算第一区域的边界信息时所采用的算子是相同的。且亮度判别门限在这里作为一限制条件,使得第一图像中所有轮廓边界的像素点亮度小于亮度判别门限。
可选的,在本发明上述实施例中,步骤104包括:
提取待处理图像的像素点,对待处理图像的像素点根据如下公式进行增加亮度量化等级处理,获取第二图像:
Y1=[y/Q]*Q         公式(1)
其中:Y1代表经增加量化等级处理后的像素点亮度,y代表原像素点亮度,Q代表量化等级的数值,Q的取值为1-255中的任一整数,[y/Q]代表对y与Q的商做取整操作。
可选的,获取第二图像的过程,需要首先获取待处理图像的每一个像素点,针对于待处理图像的每一个像素点的亮度进行增加亮度量化等级的处理。实施的过程如下:
针对于待处理图像的每一个像素点,采用如下公式(1)进行增加亮度量化等级的处理。
Y1=[y/Q]*Q         公式(1)
其中,Y1代表经增加量化等级处理后的像素点亮度,y代表原像素点亮度,Q代表量化等级的数值,Q的取值为1-255中的任一整数,[y/Q]代表对y与Q的商做取整操作。这里,量化等级需要本领域技术人员公知常识,本发明实施例可以根据需求决定量化等级的精度。
在对原像素点亮度y进行操作时,需要确定一量化等级,Q为量化等级的数值,原像素点亮度y的取值范围为0~255,假定y的取值为25,Q的取值为4,则采用公式一进行计算后,得到Y1的值为24。计算过程为:对25除以4的商进行取整操作得到6,将6与4相乘得到的数值24即为增加量化 等级处理后的像素点亮度Y1。
或者假定y的取值为23,Q的取值为4,则采用公式一进行计算后,得到Y1的值为20。计算过程为:对23除以4的商进行取整操作得到5,将5与4相乘得到的数值20即为增加量化等级处理后的像素点亮度Y1。
在得到经增加量化等级处理后的像素点亮度Y1后,根据每一个更新后的像素点获得第二图像。
在本发明上述实施例中,步骤105中利用第一图像中所有轮廓的轮廓边界信息,对第二图像中的轮廓边界进行强化处理后,得到处理后的图像,包括:
根据第一图像中所有轮廓的轮廓边界信息,提取第二图像的轮廓边界的像素点,对第二图像的轮廓边界的像素点根据公式(2)进行计算获取相应像素点亮度:
Y2=K*Y1+b       公式(2)
其中:Y2代表相应像素点亮度,Y1代表经增加量化等级处理后的像素点亮度,K表示0-1之间的任意数字,b是0-255之间的任一数值;
采用公式(3)对相应像素点进行增加亮度量化等级处理,完成对第二图像中的轮廓边界亮度的强化处理,保证第二图像的像素点的亮度量化等级的一致性:
Y3=[Y2/Q]*Q        公式(3)
其中:Y2代表相应像素点亮度,Y3代表对相应像素点Y2处理后的像素点亮度,Q代表量化等级的数值,Q的取值为1-255中的任一整数,[Y2/Q]代表对Y2与Q的商做取整操作。
可选的,首先根据第一图像中所有轮廓的轮廓边界信息,提取第二图像的轮廓边界的像素点,利用公式(2)对第二图像的轮廓边界的像素点进行亮度处理。
Y2=K*Y1+b           公式(2)
需要说明的是,再利用公式二对第二图像的轮廓边界的像素点进行处理时,由于Y2的取值范围为0~255,因此在对K或者b取值过程中,需要保 证得到的Y2数值不会超过255。
假定Y1的值为20,K取0.1,b的值可以取0~253中的任意数值,在实际计算过程中,针对于同一图像,K和b值是确定的。例如:K取0.1,b的值取4,Y1的值为20,根据公式二进行计算,得到的Y2的值是6。针对于同一图像的不同像素点,Y1的值为30,根据公式二进行计算,得到Y2的值是7。需要说明的是,针对一图像,K和b值是预先设置确定的,根据确定的K和b值,采用公式二进行计算,得到的Y2可以大于Y1,也可以小于Y1,其中Y2与Y1的大小关系取决于,K和b的值。当K取0.5,b的值取25时,Y1的值为30,根据公式二进行计算,得到Y2的值是40,此时Y2大于Y1。
再利用公式(2)对第二图像的轮廓边界的像素点进行处理后,需要利用公式(3)对Y2进行增加亮度量化等级处理。
Y3=[Y2/Q]*Q          公式(3)
需要说明的是,在这里采用的量化等级与对待处理图像进行处理时采用的量化等级是相同的,目的在于保证第二图像的像素点的亮度量化等级的一致性。例如:假定Y2的取值为23,Q的取值为4,则采用公式三进行计算后,得到Y3的值为20。
如图6所示,为本发明实施例整体流程示意图:
S201、获取待处理图像;
S202、确定第一区域;
S203、对待处理图像进行亮度模糊处理获取第一图像;
S204、提取出第一图像中第一区域的轮廓,并根据第一区域的轮廓,计算出轮廓边界的亮度判别门限;
S205、根据亮度判别门限,确定第一图像中所有轮廓的轮廓边界信息;
S206、对待处理图像进行亮度信息的粗量化处理,得到第二图像;
S207、利用第一图像中所有轮廓的轮廓边界信息,对第二图像中的轮廓边界进行强化处理;
S208、输出效果图像。
本发明实施例还提供一种计算机存储介质,计算机存储介质中存储有计算机可执行指令,计算机可执行指令用于执行上述图像处理的方法。
本发明实施例还提供一种图像处理的装置,如图7所示,包括:
获取确定模块10设置为,获取待处理图像,确定待处理图像中的第一区域,第一区域为包含预设对象的区域或一预设区域;
第一处理模块20设置为,对待处理图像进行亮度模糊处理,得到第一图像;
计算处理模块30设置为,提取出第一图像中第一区域的轮廓,并根据第一区域的轮廓,计算出轮廓边界的亮度判别门限,并根据亮度判别门限,确定第一图像中所有轮廓的轮廓边界信息;
第二处理模块40设置为,对待处理图像进行亮度信息的粗量化处理,得到第二图像;
处理获取模块50设置为,利用从所述第一图像中确定的所有轮廓的轮廓边界信息,对第二图像中的轮廓边界进行强化处理,得到处理后的图像。
可选的,获取确定模块10包括:
判断子模块11设置为,判断待处理图像中是否存在预设对象;
第一确定子模块12设置为,当待处理图像中存在预设对象时,确定预设对象所占的区域为第一区域;
第二确定子模块13设置为,当待处理图像中不存在预设对象时,确定预设区域为第一区域。
可选的,第一确定子模块12包括:
第一单元121设置为,当待处理图像中存在多个预设对象时,选取面积最大的预设对象,并确定选取的面积最大的预设对象所占的区域为第一区域;
第二单元122设置为,当待处理图像中存在两个面积大小相同的预设对象时,选取与中心坐标距离近的预设对象,并确定选取的与中心坐标距离近 的预设对象所占的区域为第一区域。
可选的,计算处理模块30包括:
提取统计子模块31设置为,用于提取第一区域的轮廓像素点,统计第一区域的轮廓像素点的亮度最大值、亮度最小值和/或亮度平均值;
第三确定子模块32设置为,用于根据亮度最大值与第一比例系数的乘积、亮度最小值与第二比例系数的乘积、亮度最大值、亮度最小值和/或亮度平均值确定轮廓边界的亮度判别门限;
其中,第一比例系数为小1的正数,第二比例系数为大于1的正数。
可选的,第二处理模块40是设置为:
提取所述待处理图像的像素点,对所述待处理图像的像素点根据公式(1)进行增加亮度量化等级处理,获取所述第二图像:
Y1=[y/Q]*Q        公式(1)
其中:Y1代表经增加量化等级处理后的像素点亮度,y代表原像素点亮度,Q代表量化等级的数值,Q的取值为1-255中的任一整数,[y/Q]代表对y与Q的商做取整操作。
可选的,处理获取模块50包括:
提取处理子模块设置为,根据所述第一图像中所有轮廓的轮廓边界信息,提取所述第二图像的轮廓边界的像素点,对所述第二图像的轮廓边界的像素点根据公式(2)进行计算获取相应像素点亮度:
Y2=K*Y1+b         公式(2)
其中:Y2代表相应像素点亮度,Y1代表经增加量化等级处理后的像素点亮度,K表示0-1之间的任意数值,b是0-255之间的任一数值;
处理子模块设置为,采用公式(3)对相应像素点进行增加亮度量化等级处理,完成对所述第二图像中的轮廓边界亮度的强化处理,保证所述第二图像的像素点的亮度量化等级的一致性:
Y3=[Y2/Q]*Q        公式(3)
其中:Y2代表相应像素点亮度,Y3代表对相应像素点Y2处理后的像素点亮度,Q代表量化等级的数值,Q的取值为1-255中的任一整数,[Y2/Q] 代表对Y2与Q的商做取整操作。
本发明实施例的图像处理的方法,通过获取经过亮度模糊处理的第一图像的第一区域的轮廓像素点信息,根据第一图像的第一区域的轮廓像素点信息计算获得轮廓边界的亮度判别门限,并根据亮度判别门限,确定第一图像中所有轮廓的轮廓边界信息,然后根据第一图像中所有轮廓的轮廓边界信息,对进行亮度信息的粗量化处理后的第二图像的轮廓边界进行强化处理,可以改进图像的滤镜拍照效果,有效解决了图像的滤镜拍摄效果麻点过多的问题。
需要说明的是,本发明实施例提供的图像处理的装置是应用上述方法的装置,则上述方法的所有实施例均适用于该装置,且均能达到相同或相似的有益效果。
以上所述是本发明的可选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明所述原理的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件(例如处理器)完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的每个模块/单元可以采用硬件的形式实现,例如通过集成电路来实现其相应功能,也可以采用软件功能模块的形式实现,例如通过处理器执行存储于存储器中的程序/指令来实现其相应功能。本发明不限制于任何特定形式的硬件和软件的结合。”
虽然本申请所揭露的实施方式如上,但所述的内容仅为便于理解本申请而采用的实施方式,并非用以限定本申请,如本发明实施方式中的具体的实现方法。任何本申请所属领域内的技术人员,在不脱离本申请所揭露的精神和范围的前提下,可以在实施的形式及细节上进行任何的修改与变化,但本申请的专利保护范围,仍须以所附的权利要求书所界定的范围为准。
工业实用性
上述技术方案减少了图像的滤镜拍摄效果中的麻点,提高了图像的清晰度。

Claims (12)

  1. 一种图像处理的方法,包括:
    获取待处理图像,确定所述待处理图像中的第一区域,所述第一区域为包含预设对象的区域或一预设区域;
    对所述待处理图像进行亮度模糊处理,得到第一图像;
    提取出所述第一图像中所述第一区域的轮廓,并根据所述第一区域的轮廓,计算出轮廓边界的亮度判别门限,并根据所述亮度判别门限,确定所述第一图像中所有轮廓的轮廓边界信息;
    对所述待处理图像进行亮度信息的粗量化处理,得到第二图像;
    利用从所述第一图像中确定的所有轮廓的轮廓边界信息,对所述第二图像中的轮廓边界进行强化处理,得到处理后的图像。
  2. 如权利要求1所述的方法,其中,所述确定所述待处理图像中的第一区域,包括:
    判断所述待处理图像中是否存在预设对象;
    当所述待处理图像中存在预设对象时,确定预设对象所占的区域为所述第一区域;
    当所述待处理图像中不存在预设对象时,确定预设区域为所述第一区域。
  3. 如权利要求2所述的方法,其中,所述待处理图像中存在预设对象时,所述确定预设对象所占的区域为所述第一区域,包括:
    当所述待处理图像中存在多个预设对象时,选取面积最大的预设对象,并确定选取的面积最大的预设对象所占的区域为所述第一区域;
    当所述待处理图像中存在两个面积大小相同的预设对象时,选取与中心坐标距离近的预设对象,并确定选取的与中心坐标距离近的预设对象所占的区域为所述第一区域。
  4. 如权利要求1所述的方法,其中,所述提取出所述第一图像中所述第一区域的轮廓,并根据所述第一区域的轮廓,计算出轮廓边界的亮度判别门限,包括:
    提取所述第一区域的轮廓像素点,统计所述第一区域的轮廓像素点的亮度最大值、亮度最小值和/或者亮度平均值;
    根据亮度最大值与第一比例系数的乘积、亮度最小值与第二比例系数的乘积、亮度最大值、亮度最小值和/或亮度平均值确定轮廓边界的亮度判别门限;
    其中,所述第一比例系数为小1的正数,所述第二比例系数为大于1的正数。
  5. 如权利要求1所述的方法,其中,所述对所述待处理图像进行亮度信息的粗量化处理,得到第二图像,包括:
    提取所述待处理图像的像素点,对所述待处理图像的像素点根据公式(1)进行增加亮度量化等级处理,获取所述第二图像:
    Y1=[y/Q]*Q          公式(1)
    其中:Y1代表经增加量化等级处理后的像素点亮度,y代表原像素点亮度,Q代表量化等级的数值,Q的取值为1-255中的任一整数,[y/Q]代表对y与Q的商做取整操作。
  6. 如权利要求5所述的方法,其中,所述利用所述第一图像中所有轮廓的轮廓边界信息,对所述第二图像中的轮廓边界进行强化处理后,得到处理后的图像,包括:
    根据所述第一图像中所有轮廓的轮廓边界信息,提取所述第二图像的轮廓边界的像素点,对所述第二图像的轮廓边界的像素点根据公式(2)进行计算获取相应像素点亮度:
    Y2=K*Y1+b          公式(2)
    其中:Y2代表相应像素点亮度,Y1代表经增加量化等级处理后的像素点亮度,K表示0-1之间的任意数值,b是0-255之间的任一数值;
    采用公式(3)对相应像素点进行增加亮度量化等级处理,完成对所述第二图像中的轮廓边界亮度的强化处理,保证所述第二图像的像素点的亮度量化等级的一致性:
    Y3=[Y2/Q]*Q               公式(3)
    其中:Y2代表相应像素点亮度,Y3代表对相应像素点Y2处理后的像素点亮度,Q代表量化等级的数值,Q的取值为1-255中的任一整数,[Y2/Q]代表对Y2与Q的商做取整操作。
  7. 一种图像处理的装置,所述装置包括:
    获取确定模块设置为,获取待处理图像,确定所述待处理图像中的第一区域,所述第一区域为包含预设对象的区域或一预设区域;
    第一处理模块设置为,对所述待处理图像进行亮度模糊处理,得到第一图像;
    计算处理模块设置为,提取出所述第一图像中所述第一区域的轮廓,并根据所述第一区域的轮廓,计算出轮廓边界的亮度判别门限,并根据所述亮度判别门限,确定所述第一图像中所有轮廓的轮廓边界信息;
    第二处理模块设置为,对所述待处理图像进行亮度信息的粗量化处理,得到第二图像;
    处理获取模块设置为,利用从所述第一图像中确定的所有轮廓的轮廓边界信息,对所述第二图像中的轮廓边界进行强化处理,得到处理后的图像。
  8. 如权利要求7所述的装置,其中,所述获取确定模块包括:
    判断子模块设置为,判断所述待处理图像中是否存在预设对象;
    第一确定子模块设置为,当所述待处理图像中存在预设对象时,确定预设对象所占的区域为所述第一区域;
    第二确定子模块设置为,当所述待处理图像中不存在预设对象时,确定预设区域为所述第一区域。
  9. 如权利要求8所述的装置,其中,所述第一确定子模块包括:
    第一单元设置为,当所述待处理图像中存在多个预设对象时,选取面积最大的预设对象,并确定选取的面积最大的预设对象所占的区域为所述第一区域;
    第二单元设置为,当所述待处理图像中存在两个面积大小相同的预设对象时,选取与中心坐标距离近的预设对象,并确定选取的与中心坐标距离近 的预设对象所占的区域为所述第一区域。
  10. 如权利要求7所述的装置,其中,所述计算处理模块包括:
    提取统计子模块设置为,提取所述第一区域的轮廓像素点,统计所述第一区域的轮廓像素点的亮度最大值、亮度最小值和/或亮度平均值;
    第三确定子模块设置为,用于根据亮度最大值与第一比例系数的乘积、亮度最小值与第二比例系数的乘积、亮度最大值、亮度最小值和/或亮度平均值确定轮廓边界的亮度判别门限;
    其中,所述第一比例系数为小1的正数,所述第二比例系数为大于1的正数。
  11. 如权利要求7所述的装置,其中,所述第二处理模块是设置为:
    提取所述待处理图像的像素点,对所述待处理图像的像素点根据公式(1)进行增加亮度量化等级处理,获取所述第二图像:
    Y1=[y/Q]*Q           公式(1)
    其中:Y1代表经增加量化等级处理后的像素点亮度,y代表原像素点亮度,Q代表量化等级的数值,Q的取值为1-255中的任一整数,[y/Q]代表对y与Q的商做取整操作。
  12. 如权利要求11所述的装置,其中,所述处理获取模块包括:
    提取处理子模块设置为,根据所述第一图像中所有轮廓的轮廓边界信息,提取所述第二图像的轮廓边界的像素点,对所述第二图像的轮廓边界的像素点根据公式(2)进行计算获取相应像素点亮度:
    Y2=K*Y1+b           公式(2)
    其中:Y2代表相应像素点亮度,Y1代表经增加量化等级处理后的像素点亮度,K表示0-1之间的任意数值,b是0-255之间的任一数值;
    处理子模块设置为,采用公式(3)对相应像素点进行增加亮度量化等级处理,完成对所述第二图像中的轮廓边界亮度的强化处理,保证所述第二图像的像素点的亮度量化等级的一致性:
    Y3=[Y2/Q]*Q          公式(3)
    其中:Y2代表相应像素点亮度,Y3代表对相应像素点Y2处理后的像素点亮度,Q代表量化等级的数值,Q的取值为1-255中的任一整数,[Y2/Q]代表对Y2与Q的商做取整操作。
PCT/CN2016/090460 2016-01-29 2016-07-19 一种图像处理的方法及装置 WO2017128646A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610067209.9 2016-01-29
CN201610067209.9A CN107025633B (zh) 2016-01-29 2016-01-29 一种图像处理方法及装置

Publications (1)

Publication Number Publication Date
WO2017128646A1 true WO2017128646A1 (zh) 2017-08-03

Family

ID=59397386

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/090460 WO2017128646A1 (zh) 2016-01-29 2016-07-19 一种图像处理的方法及装置

Country Status (2)

Country Link
CN (1) CN107025633B (zh)
WO (1) WO2017128646A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113129218A (zh) * 2019-12-30 2021-07-16 Tcl集团股份有限公司 一种处理图像的方法及终端
CN114387500A (zh) * 2020-10-16 2022-04-22 苏州科瓴精密机械科技有限公司 应用于自行走设备的图像识别方法、系统、自行走设备及可读存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109145768A (zh) * 2018-07-31 2019-01-04 北京旷视科技有限公司 得到带人脸属性的人脸数据的方法及装置
CN111483803B (zh) * 2020-04-17 2022-03-04 湖南视比特机器人有限公司 控制方法、抓取系统和存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002247611A (ja) * 2001-02-16 2002-08-30 Matsushita Electric Ind Co Ltd 画像判別回路、画質補正装置、画像判別方法、画質補正方法、およびプログラム
CN101241526A (zh) * 2007-02-08 2008-08-13 佛山市顺德区顺达电脑厂有限公司 掌上移动电子装置影像辨识认证方法
CN101321289A (zh) * 2008-06-13 2008-12-10 北京大学 手机电视中视频图像的处理方法、系统及装置

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100512374C (zh) * 2007-12-05 2009-07-08 北京航空航天大学 一种基于阈值分割的图像边缘检测方法
JP5227639B2 (ja) * 2008-04-04 2013-07-03 富士フイルム株式会社 オブジェクト検出方法、オブジェクト検出装置、およびオブジェクト検出プログラム
CN101727658B (zh) * 2008-10-14 2012-12-26 深圳迈瑞生物医疗电子股份有限公司 图像处理方法及装置
EP2457196A4 (en) * 2009-07-21 2013-02-06 Qualcomm Inc METHOD AND SYSTEM FOR DETECTION AND ENHANCEMENT OF VIDEO IMAGES
JP5779089B2 (ja) * 2011-12-28 2015-09-16 株式会社ドワンゴ エッジ検出装置、エッジ検出プログラム、およびエッジ検出方法
CN102871686B (zh) * 2012-03-05 2015-08-19 杭州弘恩医疗科技有限公司 基于3d医学影像测定生理参数的装置和方法
US8805114B2 (en) * 2012-11-27 2014-08-12 Texas Instruments Incorporated Content adaptive edge and detail enhancement for image and video processing
CN103996212B (zh) * 2013-02-18 2017-11-14 威达电股份有限公司 自动描绘对象边缘走向之方法
CN103514588B (zh) * 2013-10-10 2016-05-18 广东威创视讯科技股份有限公司 图像增强方法和系统
CN104915934B (zh) * 2015-06-15 2017-10-27 电子科技大学 一种基于视网膜机制的灰度图像增强方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002247611A (ja) * 2001-02-16 2002-08-30 Matsushita Electric Ind Co Ltd 画像判別回路、画質補正装置、画像判別方法、画質補正方法、およびプログラム
CN101241526A (zh) * 2007-02-08 2008-08-13 佛山市顺德区顺达电脑厂有限公司 掌上移动电子装置影像辨识认证方法
CN101321289A (zh) * 2008-06-13 2008-12-10 北京大学 手机电视中视频图像的处理方法、系统及装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113129218A (zh) * 2019-12-30 2021-07-16 Tcl集团股份有限公司 一种处理图像的方法及终端
CN114387500A (zh) * 2020-10-16 2022-04-22 苏州科瓴精密机械科技有限公司 应用于自行走设备的图像识别方法、系统、自行走设备及可读存储介质

Also Published As

Publication number Publication date
CN107025633B (zh) 2020-11-27
CN107025633A (zh) 2017-08-08

Similar Documents

Publication Publication Date Title
US9305360B2 (en) Method and apparatus for image enhancement and edge verification using at least one additional image
CN110766736B (zh) 缺陷检测方法、装置、电子设备以及存储介质
Park et al. Single image dehazing with image entropy and information fidelity
US10620005B2 (en) Building height calculation method, device, and storage medium
WO2016206087A1 (zh) 一种低照度图像处理方法和装置
CN105243371A (zh) 一种人脸美颜程度的检测方法、系统及拍摄终端
US20110280475A1 (en) Apparatus and method for generating bokeh effect in out-focusing photography
WO2020001149A1 (zh) 用于在深度图像中提取物体的边缘的方法、装置和计算机可读存储介质
WO2017128646A1 (zh) 一种图像处理的方法及装置
US9240038B2 (en) Method and apparatus for acquiring weight coefficient of digital filter
EP3644599A1 (en) Video processing method and apparatus, electronic device, and storage medium
JP2014235736A (ja) グレースケール画像処理方法及び装置
WO2013145589A1 (ja) 画像処理装置、撮像装置および画像処理方法
CN105096330A (zh) 一种自动识别纯色边框的图像处理方法、系统及拍摄终端
US20120320433A1 (en) Image processing method, image processing device and scanner
CN106919883B (zh) 一种qr码的定位方法及装置
JP5662890B2 (ja) 画像処理方法、画像処理装置及び画像処理プログラム、並びに、画像処理による放射線量推定方法
CN113744294A (zh) 图像处理方法及相关装置
CN105809677B (zh) 一种基于双边滤波器的图像边缘检测方法及系统
CN112825189B (zh) 一种图像去雾方法及相关设备
CN109961422B (zh) 数字图像的对比度值的确定
CN113744200B (zh) 一种摄像头脏污检测方法、装置及设备
JP5822739B2 (ja) 画像処理装置、方法、及びプログラム
JP3772845B2 (ja) 画像処理プログラム、画像処理装置、および撮影装置
WO2020168818A1 (zh) 一种图像处理方法、系统、装置、存储介质及黑板装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16887525

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

Country of ref document: EP

Kind code of ref document: A1