CN109977734B - Image processing method and device - Google Patents

Image processing method and device Download PDF

Info

Publication number
CN109977734B
CN109977734B CN201711454207.6A CN201711454207A CN109977734B CN 109977734 B CN109977734 B CN 109977734B CN 201711454207 A CN201711454207 A CN 201711454207A CN 109977734 B CN109977734 B CN 109977734B
Authority
CN
China
Prior art keywords
image
determining
texture complexity
condition
under
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.)
Active
Application number
CN201711454207.6A
Other languages
Chinese (zh)
Other versions
CN109977734A (en
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201711454207.6A priority Critical patent/CN109977734B/en
Publication of CN109977734A publication Critical patent/CN109977734A/en
Application granted granted Critical
Publication of CN109977734B publication Critical patent/CN109977734B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/006Mixed reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • 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/107Static hand or arm
    • G06V40/113Recognition of static hand signs

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Image Analysis (AREA)

Abstract

The application provides an image processing method and device, which select different skin color detection algorithms to detect hand shapes based on brightness and texture complexity, can avoid the limitation of a single skin color detection algorithm, better select the skin color detection algorithm suitable for the current background, ensure the effect of hand shape detection and reduce the probability of missing detection and false detection.

Description

Image processing method and device
Technical Field
The application relates to the field of image processing, in particular to an image processing method and device.
Background
Remote AR (augmented reality ) guidance is a practical application of AR technology, and in this application scenario, the application scenario includes an instructor terminal and an instructor terminal, the instructor terminal transmits a captured video image to the instructor terminal, the instructor terminal captures a hand-shape image of the instructor, and the captured hand-shape is superimposed on the video image transmitted by the instructor terminal. In the application scene, the recognition and segmentation of the hand shape are a key technology, and in the prior art, the recognition process of the hand shape is as follows: selecting a color space, carrying out binarization processing on the image to be processed according to a threshold value, and carrying out hand shape recognition and segmentation on the binary image by adopting methods such as cluster analysis or template matching. The applicant has found that the problems with the current hand recognition schemes are: the hand shape can be identified and extracted only in a stable and simple background, and the false detection probability is high when the hand shape is identified and extracted in a background which is complicated and changeable.
Disclosure of Invention
The technical problem to be solved by the embodiment of the invention is to improve the accuracy of identifying and extracting hand shapes under a complex background, and provide an image processing method and device.
The first aspect of the present application provides an image processing method, including: determining the average brightness of the image to be processed; calculating the texture complexity of the image to be processed under the condition that the average brightness is located in the brightness threshold value interval; and under the condition that the texture complexity of the image to be processed is smaller than the texture complexity threshold value, processing the image to be processed according to a skin color detection algorithm with a fixed threshold value to obtain a binary image.
The two endpoints of the brightness threshold interval are a first brightness threshold and a second brightness threshold, the first brightness threshold is smaller than the second scheduling threshold, and the value of the brightness threshold interval can comprise the two endpoints; alternatively, the first luminance threshold and the second luminance threshold may be obtained by learning training or a number of sample tests. The texture of the image represents the visual characteristics of the homogeneity phenomenon in the image, and represents the surface structure organization arrangement attribute of the surface of the object, which has slow change or periodical change. The skin color detection algorithm is used for detecting the hand-shaped region by detecting and dividing the skin color according to the characteristic that the skin color has clustering in a certain skin color space.
In the embodiment, different skin color detection algorithms are selected to detect the hand shape based on brightness and texture complexity, so that the limitation of a single skin color detection algorithm can be avoided, the skin color detection algorithm suitable for the current background is better selected, the effect of hand shape detection is ensured, and the probability of missing detection and false detection is reduced.
In one possible design, the method further comprises: and under the condition that the average brightness is not in the brightness threshold interval, processing the image to be processed according to a skin color detection algorithm of the dynamic threshold to obtain a binary image.
In one possible design, the binary image is obtained by processing the image to be processed according to a skin tone detection algorithm of a dynamic threshold value under the condition that the texture complexity is not less than a texture complexity threshold value.
In one possible design, the method further comprises:
dividing the binary image into M x N rectangular areas of M rows and N columns; m and N are integers greater than 1; and carrying out false detection analysis and omission analysis according to the distribution positions of the hand-shaped areas in the M multiplied by N.
In one possible design, the number of M N rectangular regions is
Figure BDA0001528972160000021
In the case that 4 rectangular areas numbered 11, 1N, M and MN are detected as hand-shaped areas, determining that false detection exists in the current detection result; or (b)
Under the condition that 2 rectangular areas with the numbers of 11 and MN are detected to be hand-shaped areas, determining that false detection exists in the current detection result; or (b)
Under the condition that 2 rectangular areas with the numbers of 1N and M1 are detected to be hand-shaped areas, determining that false detection exists in the current detection result; or (b)
And under the condition that all 2M+2N-4 rectangular areas of the outermost layer are hand-shaped areas, determining that the current detection result has false detection.
In one possible design, before determining the average brightness of the image to be processed, the method further comprises:
collecting a plurality of background images and determining texture complexity of the plurality of background images;
determining an average value of texture complexity of a plurality of background images, and a maximum value of the texture complexity of the plurality of background images; wherein the texture complexity threshold is between the average value and the maximum value.
In a second aspect, the present application provides an image processing apparatus having a function of implementing the above-described first aspect and various possible embodiments. The functions may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functions described above.
The image processing apparatus includes: a determining unit for determining an average brightness of the image to be processed;
the computing unit is used for computing the texture complexity of the image to be processed under the condition that the average brightness is located in a brightness threshold value interval;
and the detection unit is used for processing the image to be processed according to a skin color detection algorithm with a fixed threshold value to obtain a binary image under the condition that the texture complexity is smaller than the texture complexity threshold value.
In one possible design, the detecting unit is further configured to process the image to be processed according to a skin color detection algorithm with a dynamic threshold to obtain a binary image when the average brightness is not in the brightness threshold interval.
In one possible design, the detecting unit is further configured to process the image to be processed according to a skin color detection algorithm with a dynamic threshold to obtain a binary image when the texture complexity is not less than a texture complexity threshold.
In one possible design, the false detection analysis unit is configured to divide the binary image into m×n rectangular areas of M rows and N columns; m and N are integers greater than 1;
and carrying out false detection analysis according to the distribution positions of the hand-shaped areas in the M multiplied by N rectangular areas.
In one possible design, the m×n rectangular areas are numbered;
under the condition that 4 rectangular areas with the numbers of 11, 1N, M and MN are all hand-shaped areas, determining that false detection exists in the current detection result; or (b)
Under the condition that the 2 areas with the numbers of 11 and MN are hand-shaped areas, determining that false detection exists in the current detection result; or;
under the condition that 2 rectangular areas with the numbers of 1N and M1 are detected to be hand-shaped areas, determining that false detection exists in the current detection result; or (b)
And under the condition that all 2M+2N-4 rectangular areas of the outermost layer are hand-shaped areas, determining that the current detection result has false detection.
In one possible design, the method further comprises:
a threshold setting unit for determining texture complexity of the plurality of background images;
determining an average value of texture complexity of a plurality of background images, and a maximum value of the texture complexity of the plurality of background images; wherein the texture complexity threshold is between the average value and the maximum value.
In a third aspect, the present application provides an image processing apparatus including: a memory and a processor; wherein the memory stores a set of program codes, and the processor is configured to invoke the program codes stored in the memory to execute the image processing method in each implementation of the first aspect and the first aspect.
Yet another aspect of the present application provides a computer-readable storage medium having instructions stored therein, which when run on a computer, cause the computer to perform the method of the above aspects.
Yet another aspect of the present application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the above aspects.
Drawings
In order to more clearly describe the technical solution in the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be described below.
Fig. 1 is a schematic flow chart of an image processing method according to an embodiment of the present invention;
FIG. 2a is a schematic diagram illustrating another flow of an image processing method according to an embodiment of the present invention;
FIG. 2b is a schematic diagram of a binary image according to an embodiment of the present invention;
fig. 2c is a schematic numbering diagram of a segmented rectangular region of a binary image according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention;
fig. 4 is a schematic diagram of another structure of an image processing apparatus according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention.
The image processing apparatus in the application may be a terminal device, may be a handheld device with a wireless communication function, an in-vehicle device, a wearable device, a computing device, or other processing device connected to a wireless modem, or the like. Terminal devices in different networks may be called different names, for example: a user equipment, an access terminal, a subscriber unit, a subscriber station, a mobile station, a remote terminal, a mobile device, a user terminal, a wireless communication device, a user agent or user equipment, a cellular telephone, a cordless telephone, a session initiation protocol (Session Initiation Protocol, SIP) phone, a wireless local loop (Wireless Local Loop, WLL) station, a personal digital assistant (Personal Digital Assistant, PDA), a terminal device in a 5G network or future evolution network, and the like.
Referring to fig. 1, fig. 1 is a flowchart of an image processing method according to an embodiment of the invention. The method comprises the following steps:
s101, determining average brightness of the image to be processed.
Specifically, the image to be processed is a digital image, and the image to be processed includes a plurality of pixels. The method for determining the average brightness of the image to be processed comprises the following steps: the color space of the image to be processed is converted into YCrCb (also called YUV), each pixel is represented by brightness (Y), tone (Cr or U) and saturation (Cb or V), the brightness of each pixel in the image to be processed is obtained, and the obtained brightness of each pixel is averaged (for example, arithmetic average value) to obtain the average brightness of the image to be processed.
S102, calculating the texture complexity of the image to be processed under the condition that the average brightness is in the brightness threshold value interval.
Specifically, the image processing apparatus is pre-stored or pre-configured as a luminance threshold interval, where the luminance threshold interval is a continuous luminance threshold, and the luminance threshold interval may include two value endpoints: a first luminance threshold and a second luminance threshold, the first luminance threshold being less than the second luminance threshold. In the case that the average brightness obtained by S101 is in the brightness threshold interval, that is, the average brightness is greater than or equal to the first brightness threshold and less than or equal to the second brightness threshold, the image processing device calculates the texture complexity of the image to be processed, and the texture of the image represents the visual characteristics of the homogeneity phenomenon in the image, and represents the surface structure arrangement attribute of the object surface with slow variation or periodical variation. Alternatively, the image processing apparatus may calculate the texture complexity of the image to be processed using the following formula 1:
Figure BDA0001528972160000041
wherein I represents an absolute value operator, f is texture complexity, N represents the number of pixel points in the image to be processed, N represents the number of pixel points in the image to be processed, and Pix n And the gray value of the pixel point numbered n in the image to be processed is represented.
And S103, under the condition that the texture complexity is smaller than the texture complexity threshold, processing the image to be processed according to a skin color detection algorithm with a fixed threshold to obtain a binary image.
Specifically, the image processing device pre-stores or pre-configures a texture complexity threshold, compares whether the texture complexity calculated in S102 is smaller than the texture complexity threshold, and if so, processes the image to be processed according to a skin color detection algorithm with a fixed threshold to obtain a binary image. The skin color detection algorithm with the fixed threshold value adopts the fixed threshold value to carry out binarization processing on the image to be processed, and a binary image is obtained after the processing, wherein the binary image comprises detection results, for example: the area constituted by white pixels is a detected hand-shaped area.
In the embodiment, different skin color detection algorithms are selected to detect the hand shape based on brightness and texture complexity, so that the limitation of a single skin color detection algorithm can be avoided, the skin color detection algorithm suitable for the current background is better selected, the effect of hand shape detection is ensured, and the probability of missing detection and false detection is reduced.
Referring to fig. 2a, another flow chart of an image processing method according to an embodiment of the present invention is provided, where in the embodiment of the present invention, the method includes:
s201, determining average brightness of the image to be processed.
Specifically, the image to be processed is a digital image, the image to be processed includes a plurality of pixels, and a color space of the image to be processed includes, but is not limited to, any one of RGB, HSV, YCrCb or other forms of color space, which is not limited by the embodiment of the present invention. The method for determining the average brightness of the image to be processed comprises the following steps: and averaging (such as arithmetic average) the average brightness of each pixel in the image to be processed to obtain the average brightness of the image to be processed. It should be noted that, when determining the average brightness of the image to be processed, it is necessary to convert the images in other color spaces into YCrCb space.
S202, whether the average brightness is in a brightness threshold interval or not.
Specifically, the brightness threshold interval includes two valued endpoints: a first luminance threshold and a second luminance threshold, the first luminance threshold being less than the second luminance threshold, wherein the first luminance threshold and the second luminance threshold can be derived by learning training or extensive sample testing. The image processing apparatus determines whether the average luminance determined in S201 is within the luminance threshold section, and if yes, S203 is executed, and if no, S206 is executed.
S203, calculating texture complexity of the image to be processed.
Specifically, the texture of the image represents the visual characteristics of the homogeneity phenomenon in the image, and represents the slowly-changing or periodically-changing structural organization arrangement attribute of the physical surface. The optional image processing apparatus may calculate the texture complexity of the image to be processed using equation 1 in S102, or may calculate the texture complexity of the image to be processed using other methods, for example: gray level co-occurrence evidence (GLCM), tamura texture features, autoregressive texture models, wavelet transforms, and the like.
S204, whether the texture complexity is smaller than a texture complexity threshold.
Specifically, the image processing apparatus pre-stores or pre-configures a texture complexity threshold, and the image processing apparatus compares whether the texture complexity calculated in S203 is smaller than the texture complexity threshold, if yes, S205 is executed, and if no, S206 is executed.
Optionally, the method for determining the texture complexity threshold by the image processing apparatus may be: the image processing device adopts a plurality of background images, the background images do not comprise hand shapes, the image processing device calculates the texture complexity of the plurality of background images, and the texture complexity of the plurality of background images is determined; determining an average value of texture complexity of a plurality of background images, and a maximum value of the texture complexity of the plurality of background images; wherein the texture complexity threshold is between the average and the maximum (e.g., arithmetic average) as a texture complexity threshold.
S205, processing the image to be processed according to a skin color detection algorithm with a fixed threshold value.
Specifically, the skin tone detection algorithm with a fixed threshold performs binarization processing on an image to be processed by using the fixed threshold, wherein the binarization processing refers to converting a multi-gray-level image into an image with only two gray levels. Setting the gray value range of the image F (x, y) to be processed to be [ a, b ], setting the threshold value of the binarization processing to be t, wherein a is less than or equal to t and less than or equal to b, and the expression of the binarization processing is as follows: in the case of F (x, y) > t, G (x, y) =1; in the case of F (x, y) < t, G (x, y) =0. G (x, y) is a binary image. In a fixed threshold skin tone detection algorithm, the threshold t is fixed.
For example: the skin color detection algorithm with fixed threshold is Cr+Cb algorithm, and the pixels of each image to be processed are processed: setting the gray value of a pixel to 1 when Cr (hue) of the pixel is between [ a, b ] and Cb (saturation) is between [ c, d ]; otherwise, the gray value of the pixel is set to 0. Wherein a, b, c and d are preset values.
S206, processing the image to be processed according to a skin color detection algorithm of the dynamic threshold.
Specifically, in the skin tone detection algorithm of the dynamic threshold, the threshold t is dynamically changed, for example: the image to be processed is divided into different areas, and the thresholds t of the different areas are different. For example: the skin tone detection algorithm for the dynamic threshold is the cr+ostu (maximum inter-class variance) algorithm.
S207, binary image.
Specifically, according to a skin color detection algorithm of a fixed threshold or a skin color detection algorithm of a dynamic threshold, a binary image is obtained after processing an image to be processed, for example: referring to fig. 2b, a binary image is obtained, in which a pixel having a gray value of 1 is displayed as white, a pixel having a gray value of 0 is displayed as black, and a white area in the binary image is a hand-shaped area.
Optionally, after S207, the method further includes: dividing the binary image into M multiplied by N rectangular areas of M rows and N columns, wherein M and N are integers larger than 1, and performing false detection analysis and omission analysis according to the distribution positions of the hand-shaped areas in the M multiplied by N rectangular areas.
Specifically, the hand-shaped region represents a pixel region including a hand shape, for example, the binary image in fig. 2b, and when the rectangular region includes a pixel having a gray value of 0, the rectangular region is the hand-shaped region. The false detection analysis indicates an analysis process of judging whether or not the non-hand shape is a non-hand shape, and the missing detection analysis indicates an analysis process of judging whether or not the hand shape is recognized as a non-hand shape. The image processing device judges whether false detection or omission exists according to whether the distribution positions of the hand-shaped areas in the M multiplied by N accord with a preset distribution strategy.
For example: the resolution of the binary image is 1024×768, the resolution of the rectangular area is 128×96, and the image processing apparatus divides the binary image into 128×96 rectangular areas of 128 rows and 96 columns.
Wherein v= { V is set for m×n regions i },i=1,2,3,…,M×N,V i Represents any one rectangular region of the m×n rectangular regions; b (B) j Is a subset of V, P (B j ) Representation B j Probability that all rectangular areas are hand-shaped areas at the same time, P (B j |B k ) Representation B k B in case of hand-shaped area of all rectangular areas in j Probability that all regions within are hand-shaped regions. Determining P (B based on pre-stored or pre-configured constraints and features j ) And P (B) j |B k ) And according to P (B) j ) And P (B) j |B k ) And (5) carrying out false detection analysis and omission analysis on the values of the samples. For example:
at P (B) j ) In the case of +.T4, i.e. B j Determining that false detection exists in the current detection result under the condition that the probability of the hand-shaped areas in all the areas is smaller than or equal to a threshold value T4;
at P (B) j ) In the case of ≡ T5, i.e. B j Under the condition that the probability of the hand-shaped areas in all the areas is greater than or equal to a threshold value T5, determining that the current detection result has missed detection;
at P (B) j |B k ) In the case of +.T6, i.e. B k B when all the rectangular areas in the inner part are hand-shaped areas j All rectangular areas in the inner part are handsUnder the condition that the probability of the shape area is smaller than or equal to a threshold value T6, determining that false detection exists in the current detection result;
at P (B) j |B k ) In the case of ≡ T7, i.e. B k B when all the rectangular areas in the inner part are hand-shaped areas j And under the condition that the probability of the hand-shaped areas in all the rectangular areas is greater than or equal to a threshold value T7, determining that the current detection result has missed detection.
It should be noted that, the thresholds T4, T5, T6 and T7 may be set as required, and the specific value of this embodiment is not limited, for example: the values of T4 and T6 are 0, and the values of T5 and T7 are 1.
Wherein the number of M×N rectangular regions is
Figure BDA0001528972160000061
In the case that 4 rectangular areas numbered 11, 1N, M and MN are detected as hand-shaped areas, determining that false detection exists in the current detection result; or (b)
Under the condition that 2 rectangular areas with the numbers of 11 and MN are detected to be hand-shaped areas, determining that false detection exists in the current detection result; or (b)
Under the condition that 2 rectangular areas with the numbers of 1N and M1 are detected to be hand-shaped areas, determining that false detection exists in the current detection result; or (b)
And under the condition that all 2M+2N-4 rectangular areas of the outermost layer are hand-shaped areas, determining that the current detection result has false detection.
Illustrating: referring to fig. 2c, the binary image is divided into 81 rectangular areas of 9 rows and 9 columns, and the numbers of the 81 rectangular areas are as shown in fig. 2 c.
In the case where it is detected that 4 rectangular areas numbered 11, 19, 91, and 99 are all hand-shaped areas, it is determined that there is false detection of the current detection result.
In the case where it is detected that both of the two rectangular areas of the diagonal corners numbered 11 and 99 are hand-shaped areas, it is determined that there is false detection of the current detection result.
In the case where it is detected that both of the rectangular areas of the diagonal corners numbered 91 and 19 are hand-shaped areas, it is determined that there is false detection of the current detection result.
In the case where all of the 32 rectangular areas (the rectangular areas numbered 11, 12, 13, 14, 15, 16, 17, 18, 19, 29, 39, 49, 59, 69, 79, 89, 99, 98, 97, 96, 95, 94, 93, 92, 91, 81, 71, 67, 51, 41, 31, 21) of the outermost turn are detected as the hand-shaped areas, it is determined that there is false detection of the current detection result.
In the embodiment, different skin color detection algorithms are selected to detect the hand shape based on brightness and texture complexity, so that the limitation of a single skin color detection algorithm can be avoided, the skin color detection algorithm suitable for the current background is better selected, the effect of hand shape detection is ensured, and the probability of missing detection and false detection is reduced.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention. The image processing apparatus 3 (hereinafter referred to as apparatus 3) may include: a determining unit 301, a calculating unit 302, and a detecting unit 303, wherein the detailed description of each unit is as follows:
a determining unit 301 for determining an average brightness of the image to be processed.
And a calculating unit 302, configured to calculate the texture complexity of the image to be processed when the average brightness is within the brightness threshold interval.
And the detecting unit 303 is configured to process the image to be processed according to a skin color detection algorithm with a fixed threshold value to obtain a binary image when the texture complexity is smaller than a texture complexity threshold value.
In a possible implementation manner, the detection unit 303 is further configured to process the image to be processed according to a skin color detection algorithm with a dynamic threshold to obtain a binary image when the average brightness is not in the brightness threshold interval.
In a possible implementation manner, the detection unit 303 is further configured to, in a case where the texture complexity is not less than the texture complexity threshold, process the image to be processed according to a skin color detection algorithm with a dynamic threshold to obtain a binary image.
In a possible embodiment, the device 3 further comprises: an analysis unit (not shown).
An analysis unit for dividing the binary image into m×n rectangular areas of M rows and N columns; m and N are integers greater than 1;
and carrying out false detection analysis and omission analysis according to the distribution positions of the hand-shaped areas in the M multiplied by N rectangular areas.
In one possible embodiment, the m×n rectangular areas are numbered
Figure BDA0001528972160000071
Under the condition that 4 rectangular areas with the numbers of 11, 1N, M and MN are all hand-shaped areas, determining that false detection exists in the current detection result; or (b)
Under the condition that the 2 areas with the numbers of 11 and MN are hand-shaped areas, determining that false detection exists in the current detection result; or;
under the condition that 2 rectangular areas with the numbers of 1N and M1 are detected to be hand-shaped areas, determining that false detection exists in the current detection result; or (b)
And under the condition that all 2M+2N-4 rectangular areas of the outermost layer are hand-shaped areas, determining that the current detection result has false detection.
In a possible embodiment, the device 3 further comprises: a threshold setting unit (not shown in the figure).
A threshold setting unit for determining texture complexity of the plurality of background images; determining an average value of texture complexity of a plurality of background images, and a maximum value of the texture complexity of the plurality of background images; wherein the texture complexity threshold is between the average value and the maximum value.
The device 4 of the present invention may be a field-programmable gate array (field-programmable gate array, FPGA), an application-specific integrated chip, a system on chip (SoC), a central processing unit (central processor unit, CPU), a network processor (network processor, NP), a digital signal processing circuit, a microcontroller (micro controller unit, MCU), a programmable controller (programmable logic device, PLD) or other integrated chips.
The technical effects brought by the embodiment and the method embodiment of fig. 2a are the same based on the same conception, and the specific process can refer to the description of the method embodiment of fig. 2a, which is not repeated here.
Referring to fig. 4, fig. 4 is another image processing apparatus 4 (hereinafter referred to as apparatus 4) according to an embodiment of the present invention, where the apparatus 4 may include a processor 401 and a memory 402.
The memory 402 may be a separate physical unit and may be connected to the processor 401 via a bus. The memory 402, the processor 401 may be integrated together, realized by hardware, or the like.
The memory 402 is used for storing a program implementing the above method embodiment, or each module of the apparatus embodiment, and the processor 401 calls the program to perform the operations of the above method embodiment.
Alternatively, when part or all of the image processing methods of the above-described embodiments are implemented by software, the apparatus may include only the processor. The memory for storing the program is located outside the device and the processor is connected to the memory via a circuit/wire for reading and executing the program stored in the memory.
The processor 401 may be a central processing unit (central processing unit, CPU), a network processor (network processor, NP) or a combination of CPU and NP.
The processor 402 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (programmable logic device, PLD), or a combination thereof. The PLD may be a complex programmable logic device (complex programmable logic device, CPLD), a field-programmable gate array (field-programmable gate array, FPGA), general-purpose array logic (generic array logic, GAL), or any combination thereof.
The memory may include volatile memory (RAM), such as random-access memory (RAM); the memory may also include a nonvolatile memory (non-volatile memory), such as a flash memory (flash memory), a hard disk (HDD) or a Solid State Drive (SSD); the memory may also comprise a combination of the above types of memories.
The embodiment of the application also provides a computer storage medium storing a computer program for executing the image processing method provided by the above embodiment.
The present application also provides a computer program product containing instructions which, when run on a computer, cause the computer to perform the image processing method provided in the above embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted across a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
Those of ordinary skill in the art will appreciate that implementing all or part of the above-described method embodiments may be accomplished by a computer program to instruct related hardware, the program may be stored in a computer readable storage medium, and the program may include the above-described method embodiments when executed. And the aforementioned storage medium includes: ROM or random access memory RAM, magnetic or optical disk, etc.

Claims (8)

1. An image processing method, comprising:
determining the average brightness of the image to be processed;
calculating the texture complexity of the image to be processed under the condition that the average brightness is in a brightness threshold value interval;
processing the image to be processed according to a skin color detection algorithm of a dynamic threshold value to obtain a binary image under the condition that the average brightness is in a brightness threshold value interval and the texture complexity is not less than a texture complexity threshold value;
processing the image to be processed according to a skin color detection algorithm with a fixed threshold value to obtain a binary image under the condition that the average brightness is in a brightness threshold value interval and the texture complexity is smaller than a texture complexity threshold value;
and under the condition that the average brightness is not in the brightness threshold interval, processing the image to be processed according to a skin color detection algorithm of a dynamic threshold value to obtain a binary image.
2. The method as recited in claim 1, further comprising:
dividing the binary image into M x N rectangular areas of M rows and N columns; m and N are integers greater than 1;
and carrying out false detection analysis and omission analysis according to the distribution positions of the hand-shaped areas in the M multiplied by N rectangular areas.
3. The method of claim 2, wherein the step of determining the position of the substrate comprises,
the number of the M multiplied by N rectangular areas is
Figure FDA0004110376780000011
Under the condition that 4 rectangular areas with the numbers of 11, 1N, M and MN are all hand-shaped areas, determining that false detection exists in the current detection result; or (b)
Under the condition that the 2 areas with the numbers of 11 and MN are hand-shaped areas, determining that false detection exists in the current detection result; or;
under the condition that 2 rectangular areas with the numbers of 1N and M1 are detected to be hand-shaped areas, determining that false detection exists in the current detection result; or (b)
And under the condition that all 2M+2N-4 rectangular areas of the outermost layer are hand-shaped areas, determining that the current detection result has false detection.
4. A method according to any one of claims 1-3, characterized in that before determining the average brightness of the image to be processed, further comprises:
determining texture complexity of a plurality of background images;
determining an average value of texture complexity of a plurality of background images, and a maximum value of the texture complexity of the plurality of background images; wherein the texture complexity threshold is between the average value and the maximum value.
5. An image processing apparatus, comprising:
a determining unit for determining an average brightness of the image to be processed;
the calculating unit is used for calculating the texture complexity of the image to be processed under the condition that the average brightness is located in a brightness threshold value interval;
the detection unit is used for processing the image to be processed according to a skin color detection algorithm of the dynamic threshold value to obtain a binary image under the condition that the average brightness is in a brightness threshold value interval and the texture complexity is not less than a texture complexity threshold value; processing the image to be processed according to a skin color detection algorithm with a fixed threshold value to obtain a binary image under the condition that the average brightness is in a brightness threshold value interval and the texture complexity is smaller than a texture complexity threshold value; and under the condition that the average brightness is not in the brightness threshold interval, processing the image to be processed according to a skin color detection algorithm of a dynamic threshold value to obtain a binary image.
6. The apparatus as recited in claim 5, further comprising:
an analysis unit for dividing the binary image into m×n rectangular areas of M rows and N columns; m and N are integers greater than 1;
and carrying out false detection analysis and omission analysis according to the distribution positions of the hand-shaped areas in the M multiplied by N rectangular areas.
7. The apparatus of claim 6, wherein the device comprises a plurality of sensors,
the number of the M multiplied by N rectangular areas is
Figure FDA0004110376780000021
Under the condition that 4 rectangular areas with the numbers of 11, 1N, M and MN are all hand-shaped areas, determining that false detection exists in the current detection result; or (b)
Under the condition that the 2 areas with the numbers of 11 and MN are hand-shaped areas, determining that false detection exists in the current detection result; or;
under the condition that 2 rectangular areas with the numbers of 1N and M1 are detected to be hand-shaped areas, determining that false detection exists in the current detection result; or (b)
And under the condition that all 2M+2N-4 rectangular areas of the outermost layer are hand-shaped areas, determining that the current detection result has false detection.
8. The apparatus according to any one of claims 5-7, further comprising:
a threshold setting unit for determining texture complexity of the plurality of background images; determining an average value of texture complexity of a plurality of background images, and a maximum value of the texture complexity of the plurality of background images; wherein the texture complexity threshold is between the average value and the maximum value.
CN201711454207.6A 2017-12-28 2017-12-28 Image processing method and device Active CN109977734B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711454207.6A CN109977734B (en) 2017-12-28 2017-12-28 Image processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711454207.6A CN109977734B (en) 2017-12-28 2017-12-28 Image processing method and device

Publications (2)

Publication Number Publication Date
CN109977734A CN109977734A (en) 2019-07-05
CN109977734B true CN109977734B (en) 2023-06-06

Family

ID=67074083

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711454207.6A Active CN109977734B (en) 2017-12-28 2017-12-28 Image processing method and device

Country Status (1)

Country Link
CN (1) CN109977734B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7265873B1 (en) * 1999-04-13 2007-09-04 Conexant Systems, Inc. Image processor that performs edge enhancement using a dynamic threshold
WO2017092431A1 (en) * 2015-12-01 2017-06-08 乐视控股(北京)有限公司 Human hand detection method and device based on skin colour

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103106386A (en) * 2011-11-10 2013-05-15 华为技术有限公司 Dynamic self-adaption skin color segmentation method and device
CN103745193B (en) * 2013-12-17 2019-08-06 小米科技有限责任公司 A kind of skin color detection method and device
CN104167006B (en) * 2014-07-10 2017-04-19 华南理工大学 Gesture tracking method of any hand shape
CN107491718A (en) * 2016-06-13 2017-12-19 南京亿猫信息技术有限公司 The method that human hand Face Detection is carried out under different lightness environment
CN106485222A (en) * 2016-10-10 2017-03-08 上海电机学院 A kind of method for detecting human face being layered based on the colour of skin

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7265873B1 (en) * 1999-04-13 2007-09-04 Conexant Systems, Inc. Image processor that performs edge enhancement using a dynamic threshold
WO2017092431A1 (en) * 2015-12-01 2017-06-08 乐视控股(北京)有限公司 Human hand detection method and device based on skin colour

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
朱金秀等.基于纹理复杂度的快速帧内预测算法.计算机工程与设计.2010,(第07期),全文. *

Also Published As

Publication number Publication date
CN109977734A (en) 2019-07-05

Similar Documents

Publication Publication Date Title
CN108805023B (en) Image detection method, device, computer equipment and storage medium
JP5701182B2 (en) Image processing apparatus, image processing method, and computer program
CN110853047A (en) Intelligent image segmentation and classification method and device and computer readable storage medium
CN105975939B (en) Video detecting method and device
WO2018068304A1 (en) Image matching method and device
CN108269220B (en) Method and device for positioning digital watermark
CN105740872B (en) Image feature extraction method and device
CN116188808B (en) Image feature extraction method and system, storage medium and electronic device
CN110807110A (en) Image searching method and device combining local and global features and electronic equipment
CN107563986B (en) Image area judgment method and system
CN111383254A (en) Depth information acquisition method and system and terminal equipment
CN113658196B (en) Ship detection method and device in infrared image, electronic equipment and medium
CN109255311B (en) Image-based information identification method and system
CN111080665A (en) Image frame identification method, device and equipment and computer storage medium
JP4967045B2 (en) Background discriminating apparatus, method and program
CN109977734B (en) Image processing method and device
CN116912556A (en) Picture classification method and device, electronic equipment and storage medium
CN116228861A (en) Probe station marker positioning method, probe station marker positioning device, electronic equipment and storage medium
CN110930287A (en) Image steganography detection method and device, computer equipment and storage medium
CN110147765A (en) A kind of image processing method and device
CN113453017B (en) Video processing method, device, equipment and computer program product
CN112801997B (en) Image enhancement quality evaluation method, device, electronic equipment and storage medium
CN111127310B (en) Image processing method and device, electronic equipment and storage medium
CN114693697A (en) Image processing method, device, equipment and computer readable storage medium
CN116152530B (en) Image difference determining method and device, storage medium and electronic equipment

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
GR01 Patent grant
GR01 Patent grant