CN111091107A - Face region edge detection method and device and storage medium - Google Patents

Face region edge detection method and device and storage medium Download PDF

Info

Publication number
CN111091107A
CN111091107A CN201911341716.7A CN201911341716A CN111091107A CN 111091107 A CN111091107 A CN 111091107A CN 201911341716 A CN201911341716 A CN 201911341716A CN 111091107 A CN111091107 A CN 111091107A
Authority
CN
China
Prior art keywords
image
face region
threshold
edge
sub
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911341716.7A
Other languages
Chinese (zh)
Inventor
张秋镇
林凡
刘经豪
周芳华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
GCI Science and Technology Co Ltd
Original Assignee
GCI Science and Technology Co Ltd
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 GCI Science and Technology Co Ltd filed Critical GCI Science and Technology Co Ltd
Priority to CN201911341716.7A priority Critical patent/CN111091107A/en
Publication of CN111091107A publication Critical patent/CN111091107A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/161Detection; Localisation; Normalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Abstract

The invention discloses a method, a device and a storage medium for detecting edges of a face area, wherein the method comprises the following steps: acquiring an image to be detected, and performing non-downsampling contour transformation on the image to be detected to obtain sub-band images with different scales and different directions; calculating the gradient amplitude and direction of the sub-band image, and performing non-maximum suppression; and carrying out double-threshold processing on the image subjected to the non-maximum suppression processing to obtain the edge of the face region. The invention adopts non-downsampling contour transformation to carry out smoothing processing on the image, and can obtain better edge detection effect under the condition of noise interference.

Description

Face region edge detection method and device and storage medium
Technical Field
The present invention relates to the field of face recognition technologies, and in particular, to a method and an apparatus for detecting edges of a face region, and a storage medium.
Background
The face recognition system is an emerging biological recognition technology, is a high-precision technology for the current international scientific and technological field and has wide development prospect. The edge detection and extraction of the face region is a core technology, and plays an important role in understanding, analyzing and identifying the face image. However, most of the existing face region edge detection technologies have poor anti-noise performance and the extracted edges are not fine enough.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for detecting edges of a face region and a storage medium, wherein the method and the device adopt non-downsampling contour transformation to carry out smoothing processing on an image, and can obtain a better edge detection effect under the condition of noise interference.
In order to achieve the above object, an embodiment of the present invention provides a method for detecting edges of a face region, including the following steps:
acquiring an image to be detected, and performing non-downsampling contour transformation on the image to be detected to obtain sub-band images with different scales and different directions;
calculating the gradient amplitude and direction of the sub-band image, and performing non-maximum suppression;
and carrying out double-threshold processing on the image subjected to the non-maximum suppression processing to obtain the edge of the face region.
Preferably, the acquiring an image to be detected, and performing non-downsampling contour transformation on the image to be detected to obtain sub-band images with different scales and different directions specifically includes:
acquiring an image to be detected;
performing multi-scale decomposition on the image to be detected by adopting a non-downsampling tower filter group to obtain band-pass sub-band images with different scales;
and carrying out directional decomposition on the obtained band-pass sub-band images by adopting a non-downsampling directional filter group to obtain sub-band images with different scales and different directions.
Preferably, the non-downsampled contourlet transform is filtered using a hard threshold method.
Preferably, the threshold system in the hard threshold methodNumber pass
Figure BDA0002329419750000021
To determine; wherein, TkAnd for the threshold coefficient, sigma is the noise standard deviation, N is the number of the threshold coefficient, K is the number of non-downsampled contour transform layers, and K is the scale grade.
Preferably, the calculating the gradient magnitude and direction of the subband image and performing non-maximum suppression specifically includes:
acquiring first-order partial derivatives of the subband images in the x direction and the y direction;
by passing
Figure BDA0002329419750000023
Calculating to obtain the gradient amplitude of the sub-band image; wherein M (i, j) is the gradient magnitude, Px (i, j) is the first partial derivative of the subband image in the x-direction, Py (i, j) is the first partial derivative of the subband image in the y-direction;
by passing
Figure BDA0002329419750000022
Calculating to obtain the gradient direction of the sub-band image;
non-maximum suppression is performed on the gradient amplitudes.
Preferably, the high-pair image subjected to non-maximum suppression processing is subjected to double-threshold processing to obtain a face region edge, and the method specifically includes:
determining a high threshold and a low threshold by adopting an automatic threshold selection method;
comparing the high threshold value with the image subjected to non-maximum value suppression processing, and recording a first edge point;
iteratively searching the first edge point which is larger than the low threshold value in the neighborhood of 8, and marking the first edge point as a second edge point;
and obtaining the edge of the face region according to the second edge point.
Preferably, the automatic threshold selection method is a maximum inter-class variance method.
Another embodiment of the present invention provides a device for detecting edges of a face region, including:
the image acquisition module is used for acquiring an image to be detected and carrying out non-downsampling contour transformation on the image to be detected to obtain sub-band images with different scales and different directions;
the gradient calculation module is used for calculating the gradient amplitude and the gradient direction of the sub-band image and carrying out non-maximum suppression;
and the edge determining module is used for carrying out double-threshold processing on the image subjected to the non-maximum suppression processing to obtain the edge of the face region.
Another embodiment of the present invention correspondingly provides an apparatus using a face region edge detection method, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the processor implements the face region edge detection method according to any one of the above descriptions when executing the computer program.
A further embodiment of the present invention provides a computer-readable storage medium, which includes a stored computer program, where when the computer program runs, the apparatus where the computer-readable storage medium is located is controlled to execute the method for detecting a face region edge as described in any one of the above.
Compared with the prior art, the method, the device and the storage medium for detecting the edge of the face region provided by the embodiment of the invention can obtain a better edge detection effect under the condition of noise interference by smoothing the image through non-downsampling contour transformation and performing double-threshold processing on the image.
Drawings
Fig. 1 is a schematic flow chart of a method for detecting edges of a face region according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a sub-band image obtained by performing a non-downsampling contour transformation on an image according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of frequency division by a non-downsampled contour transform according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a face region edge detection apparatus according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an apparatus using a face region edge detection method according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, which is a schematic flow chart of a method for detecting edges of a face region according to an embodiment of the present invention, the method includes steps S1 to S4:
s1, acquiring an image to be detected, and performing non-downsampling contour transformation on the image to be detected to obtain sub-band images with different scales and different directions;
s2, calculating the gradient amplitude and direction of the sub-band image, and performing non-maximum suppression;
and S3, carrying out double-threshold processing on the image subjected to the non-maximum suppression processing to obtain the edge of the face region.
Specifically, an image to be detected is obtained, and non-downsampling contour transformation is performed on the image to be detected to obtain sub-band images with different scales and different directions. The non-downsampling contour transformation can cancel downsampling and upsampling operations on the image in the process of decomposition and reconstruction of the image, so that the obtained sub-band image not only has the characteristics of multiple scales, good spatial domain, frequency domain local characteristics and multi-direction characteristics, but also has the characteristic of translation invariance, and all sub-band images have the characteristics of the same scale and the same size.
And calculating the gradient amplitude and direction of the sub-band image, and performing non-maximum suppression. The process is to find out the local maximum value point in the image gradient of the face region and set other non-local maximum value points to zero to obtain the refined edge. Wherein the smoothed image is processed using a two-dimensional gaussian function.
And carrying out double-threshold processing on the image subjected to the non-maximum suppression processing to obtain the edge of the face region. The double threshold processing can eliminate false edges and connect discontinuous edges, and the edges of the face area are obtained through the double threshold processing.
According to the method for detecting the edge of the face region, provided by the embodiment 1 of the invention, the image is subjected to smoothing processing through non-downsampling contour transformation, and the image is subjected to double-threshold processing, so that a better edge detection effect can be obtained under the condition of noise interference.
As an improvement of the above scheme, the obtaining of the image to be detected and the non-downsampling profile transformation of the image to be detected are performed to obtain sub-band images with different scales and different directions, and specifically includes:
acquiring an image to be detected;
performing multi-scale decomposition on the image to be detected by adopting a non-downsampling tower filter group to obtain band-pass sub-band images with different scales;
and carrying out directional decomposition on the obtained band-pass sub-band images by adopting a non-downsampling directional filter group to obtain sub-band images with different scales and different directions.
Specifically, referring to fig. 2, it is a schematic diagram of a subband image obtained by performing non-downsampling contour transformation on an image according to this embodiment of the present invention. As can be seen from fig. 2, the input image is subjected to the non-downsampling contour transformation to obtain the low-pass sub-band + the first band-pass sub-band + the second band-pass sub-band, which is also the working principle of the non-downsampling contour transformation. Fig. 3 is a schematic diagram of frequency division by the non-downsampling contour transform according to the embodiment of the present invention.
Acquiring an image to be detected, and performing multi-scale decomposition on the image to be detected by adopting a non-downsampling tower filter group to obtain band-pass sub-band images with different scales, as shown in fig. 2. The obtained subband images with different dimensions and different directions are obtained by performing directional decomposition on the obtained subband images by using a non-downsampling directional filter set, as shown in fig. 3.
As an improvement of the above scheme, the non-downsampling contourlet transform is filtered by using a hard threshold method.
Specifically, the non-downsampled contourlet transform uses a hard threshold method for filtering. The threshold filtering is a nonlinear filtering method which is simple to implement and has a good effect, and has the advantages that noise can be well suppressed, and peak points reflecting original characteristics are well reserved.
The hard threshold method is as follows:
Figure BDA0002329419750000051
where c (x, y) is the transform coefficient in the sub-block before hard thresholding, c' (x, y) is the new transform coefficient after hard thresholding, and T (x, y) is the selected threshold coefficient.
As an improvement of the above scheme, the threshold coefficient in the hard threshold method is passed
Figure BDA0002329419750000052
Figure BDA0002329419750000053
To determine; wherein, TkAnd for the threshold coefficient, sigma is the noise standard deviation, N is the number of the threshold coefficient, K is the number of non-downsampled contour transform layers, and K is the scale grade.
In particular, the threshold coefficient in the hard thresholding is passed
Figure BDA0002329419750000061
To determine; wherein, TkThe threshold coefficients determined for the calculation, i.e. T (x, y) in the above embodiment, σ is the noise standard deviation, M is the number of threshold coefficients, K is the number of non-downsampled contour transform layers, and K is the scale level.
Since the energy distribution of each scale and each sub-band of the noisy image after the multi-level non-downsampling conversion is different, if a threshold value is artificially set, the result of edge detection is greatly affected, and the noisy image is easily interfered by various noises.
It is worth to be noted that the threshold coefficient in the low-scale sub-band is mainly image information, and the noise occupies a smaller proportion, so that the threshold should be properly reduced when the low-scale sub-band is filtered; in the high-scale sub-band, the noise occupation proportion is increased, the image information is reduced, and the threshold value is properly amplified when the image information is filtered, so that the threshold value is adaptively adjusted, and the image coefficient can be better kept and the noise coefficient can be more removed.
Furthermore, the threshold coefficient is determined only by considering the dependency between images of different scales, and is not considered for the dependency in the image of the same scale. According to the coefficient energy concentration of the transformed image edge, the amplitude is large, and the sum of the absolute values of the coefficients in the edge area is large; the noise energy is dispersed, the amplitude is smaller, and the sum of the absolute values of the coefficients in the noise area is smaller. In order to better retain the image coefficients and remove more noise coefficients, the above equation is modified using 3 x 3 template adjustment coefficients:
Figure BDA0002329419750000062
where C (i, j) is the average of the transform coefficients of the neighborhood after the non-downsampled contour transform, i.e., the average of C' (x, y) in the above embodiment, and max (C) and mean (C) are the maximum and average of the transform coefficients of the subband image after the non-downsampled contour transform, respectively. From the above equation, more noise is removed by increasing the threshold for the noise region; on the contrary, for the image signal area, more useful information is reserved by reducing the threshold value, so that more accurate image information is obtained.
As an improvement of the above scheme, the calculating the gradient magnitude and direction of the subband image and performing non-maximum suppression specifically includes:
acquiring first-order partial derivatives of the subband images in the x direction and the y direction;
by passing
Figure BDA0002329419750000071
Calculating to obtain the gradient amplitude of the sub-band image; wherein M (i, j) is the gradient magnitude and Px (i, j) is the subband diagramLike the first partial derivative in the x-direction, Py (i, j) is the first partial derivative in the y-direction of the subband image;
by passing
Figure BDA0002329419750000072
Calculating to obtain the gradient direction of the sub-band image;
non-maximum suppression is performed on the gradient amplitudes.
In general, the edge points of the image are located at the gradient magnitude maximum points of the image smoothed by the gaussian function. In the present embodiment, the smoothed image utilizes a two-dimensional Gaussian function
Figure BDA0002329419750000073
Wherein, G (x, y) is the image gray value of (x, y) point on the subband image, x, y represent the template coordinates of the pixel, the template center position is the origin, σ represents the standard deviation, which controls the smoothing degree. The process of smoothing the image by using a two-dimensional Gaussian function is used for constructing a filter, calculating a proper mask, and realizing Gaussian smoothing by using standard convolution.
Specifically, the processing procedure after smoothing is as follows: acquiring first-order partial derivatives of the sub-band images in the x direction and the y direction; by passing
Figure BDA0002329419750000074
Calculating to obtain the gradient amplitude of the sub-band image; wherein M (i, j) is a gradient magnitude, Px (i, j) is a first-order partial derivative of the subband image in the x direction, and Py (i, j) is a first-order partial derivative of the subband image in the y direction; by passing
Figure BDA0002329419750000075
Calculating to obtain the gradient direction of the sub-band image; non-maximum suppression is performed on the gradient amplitudes. The process is to find out the local maximum value point in the image gradient of the face area and set other non-local maximum value points to zero to obtain the refined edge.
As an improvement of the above scheme, the performing double-threshold processing on the image subjected to the non-maximum suppression processing to obtain the edge of the face region specifically includes:
determining a high threshold and a low threshold by adopting an automatic threshold selection method;
comparing the high threshold value with the image subjected to non-maximum value suppression processing, and recording a first edge point;
iteratively searching the first edge point which is larger than the low threshold value in the neighborhood of 8, and marking the first edge point as a second edge point;
and obtaining the edge of the face region according to the second edge point.
Specifically, a threshold automatic selection method is adopted to determine a high threshold and a low threshold; the automatic threshold selection method can avoid manual parameter setting to influence the detection result of the edge of the face area, so that the detection is more accurate.
After the high threshold and the low threshold are determined, firstly, the high threshold is compared with the image subjected to non-maximum suppression processing, first edge points are recorded, then, the first edge points larger than the low threshold are searched in 8 neighborhoods in an iterative mode and are marked as second edge points, and therefore the edge of the face area is obtained according to the second edge points. By the method, the contradiction between noise suppression and fine edge preservation can be effectively solved, and an ideal edge image is obtained.
As an improvement of the scheme, the automatic threshold value selection method is a maximum inter-class variance method.
Specifically, the automatic threshold selection method is a maximum inter-class variance method. The maximum inter-class variance method is derived by adopting a least square method on the basis of a histogram, has the statistically optimal segmentation threshold, and has the basic idea that image pixels are divided into two classes by using the threshold, and the maximum value of the inter-class variance is calculated by searching to obtain the optimal threshold. The maximum inter-class variance method has the advantages of strong dynamic capability, good segmentation effect and simple calculation. The threshold value is used as a high threshold value for detecting the edge of the face area, so that the contradiction between noise suppression and fine edge reservation can be effectively solved, and an ideal edge image is obtained.
Suppose that the number of image pixels is N, the gray scale is L, and the gray scale range is [0, L-1 ]]The number of pixels corresponding to the gray level i is niThe probability is: p is a radical ofi=niN, where i is 0,1,2, … L-1, dividing the pixels in the image into two types of pixel sets C by the threshold T for the gray value0And C1,C0From the gray value of [0, T]Pixel composition of (B) C1From gray value at [ T +1, L-1]And (c) pixel composition in between. Then have, set C0The mean value of (A) is:
Figure BDA0002329419750000081
wherein the content of the first and second substances,
Figure BDA0002329419750000082
set C1The mean value of (A) is:
Figure BDA0002329419750000083
wherein the content of the first and second substances,
Figure BDA0002329419750000084
the average of the whole image is thus obtained as: u. ofT=ω0u01u1The between-class variance is defined as:
Figure BDA0002329419750000085
Figure BDA0002329419750000086
let T be at [0, L-1 ]]The ranges take values in sequence, making σ2 BThe maximum T value is the optimal threshold value of the automatic threshold value selecting method. The threshold is the high threshold, denoted ThReuse the formula Tl=0.5ThDetermining a low threshold Tl
The method meets the optimal criteria of ① signal-to-noise ratio criterion, ② positioning accuracy criterion and ③ unilateral response criterion in the edge detection of the face region, and can deduce an approximate realization of an optimal edge detection operator according to the 3 criteria, namely that the boundary point is positioned on the maximum value point of the gradient amplitude after the image is smoothed by the Gaussian function.
The core of the invention is a method for automatically selecting the threshold by adopting a dynamic threshold filtering algorithm and a maximum inter-class variance method, wherein the specific algorithm mainly comprises the following steps: the method comprises the following steps of dynamic threshold filtering algorithm, gradient calculation, non-maximum value inhibition, automatic threshold selection and double-threshold detection of 5 parts.
Referring to fig. 4, which is a schematic structural diagram of a face region edge detection apparatus according to an embodiment of the present invention, the apparatus includes:
the image acquisition module 11 is configured to acquire an image to be detected, and perform non-downsampling contour transformation on the image to be detected to obtain sub-band images with different scales and different directions;
a gradient calculating module 12, configured to calculate a gradient amplitude and a gradient direction of the subband image, and perform non-maximum suppression;
and the edge determining module 13 is configured to perform double-threshold processing on the image subjected to the non-maximum suppression processing to obtain a face region edge.
Preferably, the image acquisition module 11 specifically includes:
the image acquisition unit is used for acquiring an image to be detected;
the scale decomposition unit is used for carrying out multi-scale decomposition on the image to be detected by adopting a non-downsampling tower filter group to obtain band-pass sub-band images with different scales;
and the direction decomposition unit is used for performing direction decomposition on the obtained band-pass sub-band images by adopting a non-downsampling direction filter group to obtain sub-band images with different scales and different directions.
Preferably, the non-downsampled contourlet transform is filtered using a hard threshold method.
Preferably, the threshold coefficient in the hard threshold method is passed
Figure BDA0002329419750000091
To determine; wherein, TkAnd for the threshold coefficient, sigma is the noise standard deviation, N is the number of the threshold coefficient, K is the number of non-downsampled contour transform layers, and K is the scale grade.
Preferably, the gradient calculation module 12 specifically includes:
a partial derivative obtaining unit, configured to obtain first-order partial derivatives of the subband images in an x direction and a y direction;
gradient magnitude calculation unit for passing
Figure BDA0002329419750000092
Calculating to obtain the gradient amplitude of the sub-band image; wherein M (i, j) is the gradient magnitude, Px (i, j) is the first partial derivative of the subband image in the x-direction, Py (i, j) is the first partial derivative of the subband image in the y-direction;
gradient direction calculation unit for passing
Figure BDA0002329419750000101
Calculating to obtain the gradient direction of the sub-band image;
and the non-maximum suppression unit is used for performing non-maximum suppression on the gradient amplitude.
Preferably, the edge determining module 13 specifically includes:
the threshold value determining unit is used for determining a high threshold value and a low threshold value by adopting an automatic threshold value selecting method;
the comparison unit is used for comparing the high threshold value with the image subjected to the non-maximum value suppression processing and recording a first edge point;
the marking unit is used for iteratively searching the first edge point which is larger than the low threshold value in the neighborhood of 8 and marking the first edge point as a second edge point;
and the edge determining unit is used for obtaining the edge of the face region according to the second edge point.
Preferably, the automatic threshold selection method is a maximum inter-class variance method.
The human face region edge detection device provided in the embodiment of the present invention can implement all the processes of the human face region edge detection method described in any one of the above embodiments, and the functions and implemented technical effects of each module and unit in the device are respectively the same as those of the human face region edge detection method described in the above embodiment, and are not described herein again.
Referring to fig. 5, the apparatus using the face region edge detection method according to an embodiment of the present invention is schematically illustrated, and the apparatus using the face region edge detection method includes a processor 10, a memory 20, and a computer program stored in the memory 20 and configured to be executed by the processor 10, where the processor 10 implements the face region edge detection method according to any of the above embodiments when executing the computer program.
Illustratively, the computer program may be divided into one or more modules/units, which are stored in the memory 20 and executed by the processor 10 to implement the present invention. One or more of the modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program in a face region edge detection method. For example, the computer program may be divided into an image acquisition module, a gradient calculation module and an edge determination module, each module having the following specific functions:
the image acquisition module 11 is configured to acquire an image to be detected, and perform non-downsampling contour transformation on the image to be detected to obtain sub-band images with different scales and different directions;
a gradient calculating module 12, configured to calculate a gradient amplitude and a gradient direction of the subband image, and perform non-maximum suppression;
and the edge determining module 13 is configured to perform double-threshold processing on the image subjected to the non-maximum suppression processing to obtain a face region edge.
The device using the human face area edge detection method can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing equipment. The device using the face region edge detection method may include, but is not limited to, a processor and a memory. It will be understood by those skilled in the art that the schematic diagram 5 is merely an example of an apparatus using the face region edge detection method, and does not constitute a limitation of the apparatus using the face region edge detection method, and may include more or less components than those shown in the drawings, or combine some components, or different components, for example, the apparatus using the face region edge detection method may further include an input and output device, a network access device, a bus, and the like.
The Processor 10 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor 10 may be any conventional processor, etc., and the processor 10 is a control center of the apparatus using the face region edge detection method, and various interfaces and lines are used to connect various parts of the entire apparatus using the face region edge detection method.
The memory 20 may be used to store the computer programs and/or modules, and the processor 10 implements various functions of the apparatus using the face region edge detection method by running or executing the computer programs and/or modules stored in the memory 20 and calling data stored in the memory 20. The memory 20 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to program use, and the like. In addition, the memory 20 may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Wherein, the module integrated by the device using the human face region edge detection method can be stored in a computer readable storage medium if the module is realized in the form of a software functional unit and sold or used as an independent product. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium and can implement the steps of the embodiments of the method when the computer program is executed by a processor. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, U.S. disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, in accordance with legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunications signals.
The embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program, and when the computer program runs, the apparatus where the computer-readable storage medium is located is controlled to execute the method for detecting a face region edge according to any one of the above embodiments.
In summary, the method, the apparatus, and the storage medium for detecting the edge of the face region provided by the embodiments of the present invention improve the defects existing in the conventional edge detection process for extracting the edge of the face region image, perform smoothing on the face region image by using a dynamic threshold filtering method based on non-downsampling edge transformation, retain more edge information while removing noise, and automatically determine the high and low thresholds by using a maximum inter-class variance method. Because artificial interference is not needed, the limitation of artificial setting is avoided, the method is superior to the traditional algorithm in the aspects of noise suppression, edge continuity and the like, various parameters are completely set according to image information, artificial intervention is not needed, the flexibility is high, more detected edge information is obtained, the dynamic property of the algorithm is high, and a good edge detection effect can be obtained under the condition of noise interference.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

Claims (10)

1. A method for detecting the edge of a face region is characterized by comprising the following steps:
acquiring an image to be detected, and performing non-downsampling contour transformation on the image to be detected to obtain sub-band images with different scales and different directions;
calculating the gradient amplitude and direction of the sub-band image, and performing non-maximum suppression;
and carrying out double-threshold processing on the image subjected to the non-maximum suppression processing to obtain the edge of the face region.
2. The method for detecting the edge of the human face region according to claim 1, wherein the obtaining of the image to be detected and the non-downsampling contour transformation of the image to be detected are performed to obtain sub-band images with different scales and different directions, specifically comprising:
acquiring an image to be detected;
performing multi-scale decomposition on the image to be detected by adopting a non-downsampling tower filter group to obtain band-pass sub-band images with different scales;
and carrying out directional decomposition on the obtained band-pass sub-band images by adopting a non-downsampling directional filter group to obtain sub-band images with different scales and different directions.
3. The method for detecting edges of face regions according to claim 1, wherein said non-downsampled contourlet transform is filtered using a hard threshold method.
4. The edge detection method of a face region according to claim 3, characterized in that the threshold system in the hard threshold methodNumber pass
Figure FDA0002329419740000011
To determine; wherein, TkAnd for the threshold coefficient, sigma is the noise standard deviation, N is the number of the threshold coefficient, K is the number of non-downsampled contour transform layers, and K is the scale grade.
5. The method for detecting edges of a face region according to claim 1, wherein the calculating the gradient magnitude and direction of the subband images and performing non-maximum suppression specifically comprises:
acquiring first-order partial derivatives of the subband images in the x direction and the y direction;
by passing
Figure FDA0002329419740000021
Calculating to obtain the gradient amplitude of the sub-band image; wherein M (i, j) is the gradient magnitude, Px (i, j) is the first partial derivative of the subband image in the x-direction, Py (i, j) is the first partial derivative of the subband image in the y-direction;
by passing
Figure FDA0002329419740000022
Calculating to obtain the gradient direction of the sub-band image;
non-maximum suppression is performed on the gradient amplitudes.
6. The method for detecting edges of a face region according to claim 1, wherein the step of performing double-threshold processing on the image subjected to the non-maximum suppression processing to obtain the edges of the face region specifically comprises:
determining a high threshold and a low threshold by adopting an automatic threshold selection method;
comparing the high threshold value with the image subjected to non-maximum value suppression processing, and recording a first edge point;
iteratively searching the first edge point which is larger than the low threshold value in the neighborhood of 8, and marking the first edge point as a second edge point;
and obtaining the edge of the face region according to the second edge point.
7. The method for detecting edges of a human face region as claimed in claim 6, wherein the automatic threshold selection method is a maximum inter-class variance method.
8. An edge detection device for a face region, comprising:
the image acquisition module is used for acquiring an image to be detected and carrying out non-downsampling contour transformation on the image to be detected to obtain sub-band images with different scales and different directions;
the gradient calculation module is used for calculating the gradient amplitude and the gradient direction of the sub-band image and carrying out non-maximum suppression;
and the edge determining module is used for carrying out double-threshold processing on the image subjected to the non-maximum suppression processing to obtain the edge of the face region.
9. An apparatus using a face region edge detection method, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the face region edge detection method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, comprising a stored computer program, wherein when the computer program runs, the computer-readable storage medium controls an apparatus to execute the face region edge detection method according to any one of claims 1 to 7.
CN201911341716.7A 2019-12-20 2019-12-20 Face region edge detection method and device and storage medium Pending CN111091107A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911341716.7A CN111091107A (en) 2019-12-20 2019-12-20 Face region edge detection method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911341716.7A CN111091107A (en) 2019-12-20 2019-12-20 Face region edge detection method and device and storage medium

Publications (1)

Publication Number Publication Date
CN111091107A true CN111091107A (en) 2020-05-01

Family

ID=70396632

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911341716.7A Pending CN111091107A (en) 2019-12-20 2019-12-20 Face region edge detection method and device and storage medium

Country Status (1)

Country Link
CN (1) CN111091107A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112749708A (en) * 2021-01-28 2021-05-04 深圳艾摩米智能科技有限公司 Facial freckle detection and analysis method and device, computer equipment and storage medium
CN113112516A (en) * 2021-04-01 2021-07-13 广东拓斯达科技股份有限公司 Image edge feature library construction method and device, computer equipment and storage medium
CN115100228A (en) * 2022-07-25 2022-09-23 江西现代职业技术学院 Image processing method, system, readable storage medium and computer device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101551456A (en) * 2009-05-13 2009-10-07 西安电子科技大学 Method for detecting water area margin of SAR image based on improved shearlet transformation
CN103400383A (en) * 2013-07-22 2013-11-20 西安电子科技大学 SAR (synthetic aperture radar) image change detection method based on NSCT (non-subsampled contourlet transform) and compressed projection
CN108416789A (en) * 2018-06-04 2018-08-17 武汉斑马快跑科技有限公司 Method for detecting image edge and system
CN108932492A (en) * 2018-06-28 2018-12-04 福州昌宇五金锁具制品有限公司 A kind of image fingerprint extracting method based on non-sampled shearing wave conversion
CN109360217A (en) * 2018-09-29 2019-02-19 国电南瑞科技股份有限公司 Power transmission and transforming equipment method for detecting image edge, apparatus and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101551456A (en) * 2009-05-13 2009-10-07 西安电子科技大学 Method for detecting water area margin of SAR image based on improved shearlet transformation
CN103400383A (en) * 2013-07-22 2013-11-20 西安电子科技大学 SAR (synthetic aperture radar) image change detection method based on NSCT (non-subsampled contourlet transform) and compressed projection
CN108416789A (en) * 2018-06-04 2018-08-17 武汉斑马快跑科技有限公司 Method for detecting image edge and system
CN108932492A (en) * 2018-06-28 2018-12-04 福州昌宇五金锁具制品有限公司 A kind of image fingerprint extracting method based on non-sampled shearing wave conversion
CN109360217A (en) * 2018-09-29 2019-02-19 国电南瑞科技股份有限公司 Power transmission and transforming equipment method for detecting image edge, apparatus and system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112749708A (en) * 2021-01-28 2021-05-04 深圳艾摩米智能科技有限公司 Facial freckle detection and analysis method and device, computer equipment and storage medium
CN112749708B (en) * 2021-01-28 2024-04-23 深圳艾摩米智能科技有限公司 Face freckle detection and analysis method and device, computer equipment and storage medium
CN113112516A (en) * 2021-04-01 2021-07-13 广东拓斯达科技股份有限公司 Image edge feature library construction method and device, computer equipment and storage medium
WO2022205605A1 (en) * 2021-04-01 2022-10-06 广东拓斯达科技股份有限公司 Method and apparatus for constructing image edge feature library, and computer device and storage medium
CN115100228A (en) * 2022-07-25 2022-09-23 江西现代职业技术学院 Image processing method, system, readable storage medium and computer device

Similar Documents

Publication Publication Date Title
Tiwari et al. Review of motion blur estimation techniques
CN111091107A (en) Face region edge detection method and device and storage medium
CN109919960B (en) Image continuous edge detection method based on multi-scale Gabor filter
CN110472521B (en) Pupil positioning calibration method and system
CN108932699B (en) Three-dimensional matching harmonic filtering image denoising method based on transform domain
CN102968770A (en) Method and device for eliminating noise
CN111368661A (en) Finger vein image enhancement method based on image processing
CN110717922A (en) Image definition evaluation method and device
Song et al. A study of the generalized morphological filter
CN108305268B (en) Image segmentation method and device
CN105303538B (en) A kind of Gaussian noise variance method of estimation based on NSCT and PCA
Wu et al. Pyramid edge detection based on stack filter
Liu et al. Two‐stage image smoothing based on edge‐patch histogram equalisation and patch decomposition
CN109636822A (en) A kind of improvement Canny adaptive edge extracting method based on new building subordinating degree function
CN112801031A (en) Vein image recognition method and device, electronic equipment and readable storage medium
CN116739943A (en) Image smoothing method and target contour extraction method
CN111311610A (en) Image segmentation method and terminal equipment
CN113674180B (en) Method, device, equipment and storage medium for detecting low-contrast defect of frosted plane
Yang et al. An adaptive edge detection algorithm based on improved canny
KR101776501B1 (en) Apparatus and Method for removing noise using non-local means algorithm
CN112927169B (en) Remote sensing image denoising method based on wavelet transformation and improved weighted kernel norm minimization
Vignesh et al. Performance and Analysis of Edge detection using FPGA Implementation
KR102096532B1 (en) Edge Enhancement Method and Apparatus based on Curvelet Transform for Object Recognition at Sonar Image
CN114596210A (en) Noise estimation method, device, terminal equipment and computer readable storage medium
Shakeel et al. Efficient blind image deblurring method for palm print images

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination