CN108416333B - Image processing method and device - Google Patents
Image processing method and device Download PDFInfo
- Publication number
- CN108416333B CN108416333B CN201810297650.5A CN201810297650A CN108416333B CN 108416333 B CN108416333 B CN 108416333B CN 201810297650 A CN201810297650 A CN 201810297650A CN 108416333 B CN108416333 B CN 108416333B
- Authority
- CN
- China
- Prior art keywords
- sub
- region
- area
- brightness
- adjusted
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
- G06T5/94—Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10048—Infrared image
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Oral & Maxillofacial Surgery (AREA)
- Human Computer Interaction (AREA)
- Multimedia (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
The embodiment of the invention provides an image processing method and device. The image processing method comprises the following steps: determining a first region including a face in the infrared image; determining a second area corresponding to the first area in the color image; determining a sub-region to be adjusted in the second region according to the pixel parameters of the first region and the second region; and adjusting the pixel parameters in the sub-area to be adjusted according to the pixel parameters of the first area and/or the second area. The embodiment of the invention can supplement the pixel parameters of the color image by utilizing the pixel parameters of the adjusted color image corresponding to the infrared image comprising the face, so as to conveniently and accurately identify the face by utilizing the adjusted color image.
Description
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to a method and an apparatus for image processing.
Background
With the development of electronic products and image processing technologies, the requirements of users on the shooting effect of face shooting images are higher and higher.
Due to the complexity of the practical application environment, most face recognition systems have a problem of reduced recognition performance, especially under non-ideal lighting conditions and in situations where the user is not in compliance (viewing angle change, expression change, decorations or even make-up).
Among many factors affecting the face recognition performance, the change of ambient light is the most challenging problem in the face recognition field. When the recognized ambient light and the ambient light at the time of registration are different, the performance of face recognition is often greatly reduced.
Disclosure of Invention
Embodiments of the present invention provide a method and an apparatus for image processing, so as to at least solve one or more technical problems in the prior art.
In a first aspect, an embodiment of the present invention provides an image processing method, including:
determining a first region including a face in the infrared image;
determining a second area corresponding to the first area in the color image;
determining a sub-region to be adjusted in the second region according to the pixel parameters of the first region and the second region;
and adjusting the pixel parameters in the sub-area to be adjusted according to the pixel parameters of the first area and/or the second area.
With reference to the first aspect, in a first implementation manner of the first aspect, the determining, in the color image, a second area corresponding to the first area includes:
and determining a second area corresponding to the pixel position of the first area in the color image.
With reference to the first aspect, in a second implementation manner of the first aspect, the determining, in the second area, a sub-area to be adjusted according to the pixel parameters of the first area and the second area includes:
comparing the brightness mean value of each first sub-area with the brightness mean value of each first sub-area to obtain each first brightness difference;
comparing the brightness mean value of each second sub-area with the brightness mean value of each second sub-area to obtain each second brightness difference;
and determining the sub-area to be adjusted in the second area according to the first brightness differences and the second brightness differences.
With reference to the first aspect, in a third implementation manner of the first aspect, the adjusting the pixel parameters in the sub-region to be adjusted according to the pixel parameters of the first region includes:
in the first area, determining a first symmetrical sub-area which is symmetrical to the position of the sub-area to be adjusted;
and correspondingly adjusting the brightness parameters of the sub-regions to be adjusted according to the brightness parameters of the first symmetrical sub-regions.
With reference to the first aspect, the first implementation manner of the first aspect, the second implementation manner of the first aspect, or the third implementation manner of the first aspect, in a fourth implementation manner of the first aspect, the adjusting the pixel parameters in the sub-region to be adjusted according to the pixel parameters of the second region includes:
in the second area, determining a second symmetrical sub-area which is symmetrical to the position of the sub-area to be adjusted;
and correspondingly adjusting the brightness parameters and/or the RGB components of the sub-areas to be adjusted according to the brightness parameters and/or the RGB components of the second symmetrical sub-areas.
In a second aspect, an embodiment of the present invention provides an apparatus for image processing, including:
the first region determining module is used for determining a first region comprising a face in the infrared image;
the second area determining module is used for determining a second area corresponding to the first area in the color image;
a to-be-adjusted sub-region determining module, configured to determine a to-be-adjusted sub-region in the second region according to the pixel parameters of the first region and the second region;
and the adjusting module is used for adjusting the pixel parameters in the sub-area to be adjusted according to the pixel parameters of the first area and/or the second area.
With reference to the second aspect, in a first implementation manner of the second aspect, the second region determining module is further configured to determine, in the color image, a second region corresponding to a pixel position of the first region.
With reference to the second aspect, in a second implementation manner of the second aspect, the first region includes a plurality of first sub-regions, the second region includes a plurality of second sub-regions, and the to-be-adjusted sub-region determining module includes:
the first comparison sub-module is used for comparing the brightness mean value of each first sub-area and the first area to obtain each first brightness difference;
the second comparison submodule is used for comparing the brightness mean value of each second sub-area with the brightness mean value of each second area to obtain each second brightness difference;
and the determining submodule is used for determining the sub-area to be adjusted in the second area according to the first brightness differences and the second brightness differences.
With reference to the second aspect, in a third implementation manner of the second aspect, the adjusting module includes:
the first symmetrical sub-region determining submodule is used for determining a first symmetrical sub-region which is symmetrical to the position of the sub-region to be adjusted in the first region;
and the first adjusting submodule is used for correspondingly adjusting the brightness parameters of the sub-regions to be adjusted according to the brightness parameters of the first symmetrical sub-regions.
With reference to the second aspect, the first implementation manner of the second aspect, the second implementation manner of the second aspect, or the third implementation manner of the second aspect, in a fourth implementation manner of the second aspect, the adjusting module includes:
a second symmetric sub-region determining submodule, configured to determine, in the second region, a second symmetric sub-region that is symmetric to the sub-region to be adjusted in position;
and the second adjusting submodule is used for correspondingly adjusting the brightness parameter and/or the RGB component of the sub-area to be adjusted according to the brightness parameter and/or the RGB component of the second symmetrical sub-area.
In a third aspect, an embodiment of the present invention provides an apparatus for image processing, including:
the functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
In one possible design, the image processing apparatus includes a processor and a memory, the memory is used for storing a program for the apparatus supporting image processing to execute the method for image processing in the first aspect, and the processor is configured to execute the program stored in the memory. The apparatus for image processing may further comprise a communication interface for the apparatus for image processing to communicate with other devices or a communication network.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium for storing computer software instructions for an apparatus for image processing, which includes a program for executing the method for image processing in the first aspect as an apparatus for image processing.
One of the above technical solutions has the following advantages or beneficial effects: the pixel parameters of the color image can be supplemented by utilizing the pixel parameters of the adjusted color image corresponding to the infrared image comprising the face, so that the face can be accurately identified after adjustment.
Another technical scheme in the above technical scheme has the following advantages or beneficial effects: by utilizing the brightness of the infrared image and/or the color image, the specific position of which areas, such as the face, in the color image can be determined to be adjusted, and further the pixel parameters of the color image are adjusted, so that the adverse effect of environmental illumination on the image can be improved, and the face recognition performance is further improved.
The foregoing summary is provided for the purpose of description only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the present invention will be readily apparent by reference to the drawings and following detailed description.
Drawings
In the drawings, like reference numerals refer to the same or similar parts or elements throughout the several views unless otherwise specified. The figures are not necessarily to scale. It is appreciated that these drawings depict only some embodiments in accordance with the disclosure and are therefore not to be considered limiting of its scope.
Fig. 1 shows a flow diagram of a method of image processing according to an embodiment of the invention.
Fig. 2a and 2b are schematic diagrams illustrating a first region and a second region in an image processing method according to an embodiment of the present invention.
Fig. 3 shows a flow diagram of a method of image processing according to another embodiment of the invention.
Fig. 4a and 4b show schematic diagrams of sub-regions in a method of image processing according to another embodiment of the invention.
Fig. 5 shows a block diagram of an apparatus for image processing according to an embodiment of the present invention.
Fig. 6 is a block diagram showing a configuration of an apparatus for image processing according to another embodiment of the present invention.
Fig. 7 is a block diagram showing a configuration of an apparatus for image processing according to another embodiment of the present invention.
Fig. 8 is a block diagram showing a configuration of an apparatus for image processing according to another embodiment of the present invention.
Fig. 9 shows a block diagram of an apparatus for image processing according to another embodiment of the present invention.
Detailed Description
In the following, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments may be modified in various different ways, all without departing from the spirit or scope of the present invention. Accordingly, the drawings and description are to be regarded as illustrative in nature, and not as restrictive.
Fig. 1 shows a flow diagram of a method of image processing according to an embodiment of the invention. As shown in fig. 1, the method may include:
s110: a first region including a face is determined in the infrared image.
In this embodiment, an infrared image of the target object may be obtained by using an infrared camera, and a color image of the target object may be obtained by using a color camera. The infrared image and the color image may include a face of the target object. An infrared image is an image obtained by "measuring" the amount of heat radiated by an object, usually a gray scale map showing the temperature of a human face.
For example, by performing face recognition on the infrared image, a first region including a face may be obtained, and the position of a pixel included in the first region on the infrared image may be determined.
S120: and determining a second area corresponding to the first area in the color image.
Each pixel of a color image is composed of red (R), green (G), and blue (B) components, and various colors are obtained by R, G, B through variations of three color channels and their superposition with each other. Therefore, a color image may also be referred to as an RGB image.
In one example, the infrared camera and the color camera may be employed to photograph the target object at the same position using the same photographing angle. In this way, the same part of the target object is identical in pixel position between the infrared image and the color image. Of course, if the pixel positions of the same part of the target object in the initially captured infrared image and the color image are different, the corresponding relationship between the pixel positions of the same part of the target object in the two images can be calculated. Therefore, after the first region is determined in the infrared image, the second region corresponding to the pixel position of the first region can be determined in the color image according to the pixel position of the first region. The second region also typically includes a face of the target object.
For example: as shown in fig. 2a and 2b, the first region of the infrared image includes regions in which four pixel points at positions (x1, y1), (x2, y2), (x3, y3), and (x4, y4) are connected. In the color image, a region in which four pixels at positions (x1, y1), (x2, y2), (x3, y3), and (x4, y4) are connected may be used as the second region.
S130: and determining a sub-area to be adjusted in the second area according to the pixel parameters of the first area and the second area.
In the infrared image, the first region may be divided into a plurality of sub-regions, and in the color image, the second region may be divided into a plurality of sub-regions. And then determining which sub-area of the second area needs to be adjusted according to the parameters of the brightness, RGB components and the like of the pixels of each sub-area.
For example, if the luminance of a certain sub-region of the second region is significantly lower than the mean luminance of the color image (or the second region), the sub-region may be determined as the sub-region to be adjusted.
As another example, if a certain R, G, B component of a certain sub-region of the second region is significantly abnormal compared to the R, G, B component of the color image (or other sub-region), the sub-region may be determined as the sub-region to be adjusted.
The number of the sub-regions to be adjusted may be one or more, and this embodiment is not limited. If a plurality of sub-areas to be adjusted are determined, the sub-areas to be adjusted can be adjusted respectively, or a plurality of sub-areas to be adjusted adjacent in position can be adjusted to a complete sub-area to be adjusted currently.
S140: and adjusting the pixel parameters in the sub-area to be adjusted according to the pixel parameters of the first area and/or the second area.
In the embodiment of the present invention, there are various ways to adjust the pixel parameters in the sub-region to be adjusted, which can be determined according to actual situations.
For example, if the face of the target object included in the image is left-right symmetric, and the sub-region to be adjusted is on the right face, the pixel parameters of the sub-region to be adjusted may be adjusted according to the pixel parameters of the sub-region at the symmetric position (on the left face of the infrared and/or color image).
For another example, if the sub-region to be adjusted is located at the chin of the face, the pixel parameter of the sub-region to be adjusted may be adjusted according to the pixel parameter of the sub-region at other positions of the face, such as the forehead, the cheek, and the like.
For another example, the pixel parameters of the sub-region to be adjusted may also be adjusted according to an average value of the pixel parameters of the whole face region (the first region and/or the second region) on the infrared and/or color image, and the like.
The embodiment of the invention can supplement the pixel parameters of the color image by utilizing the pixel parameters of the adjusted color image corresponding to the infrared image comprising the face, so as to conveniently and accurately identify the face by utilizing the adjusted color image.
Fig. 3 shows a flow diagram of a method of image processing according to another embodiment of the invention. As shown in fig. 3, the meanings of S110, S120, S130, and S140 can be referred to in the description of the above embodiments, and are not repeated herein.
The difference from the above embodiment is that after dividing a first region and a second region into a plurality of sub-regions, the first region includes a plurality of first sub-regions, the second region includes a plurality of second sub-regions, and S130 may include:
s210, comparing the brightness mean value of each first sub-area with the brightness mean value of each first area to obtain each first brightness difference;
s220, comparing the brightness mean value of each second sub-area with the brightness mean value of each second sub-area to obtain each second brightness difference;
and S230, determining the sub-area to be adjusted in the second area according to the first brightness differences and the second brightness differences.
For example, the average value of the first-region luminance of the infrared image is 100, the luminance of the first sub-region a1 is 80, and the first luminance difference between the two is 20. The average luminance value 110 of the second region of the color image and the luminance of the second sub-region B1 (assuming B1 corresponds to a1 position) are 50, and the second luminance difference is 60. Assume that the difference threshold of the second luminance difference from the first luminance difference is 30. In this example, the difference between the second luminance difference and the first luminance difference is 40, and is greater than the difference threshold, the second sub-region B1 may be considered as the sub-region to be adjusted.
It should be noted that, although the manner of determining the sub-region to be adjusted is described above by taking the brightness as an example, those skilled in the art can understand that the present invention should not be limited thereto. In fact, the determination mode of the sub-region to be adjusted can be flexibly set according to the actual application scene, as long as the sub-region to be adjusted can be determined from the image. The sub-regions to be adjusted can also be determined, for example, from the luminance and/or RGB components of the pixels of the color image.
In one possible implementation manner, there are various manners of adjusting the brightness parameter of the sub-region to be adjusted, which are exemplified as follows.
The first method, S140, may include:
s310, determining a first symmetrical sub-area which is symmetrical to the position of the sub-area to be adjusted in the first area;
s320, correspondingly adjusting the brightness parameters of the sub-regions to be adjusted according to the brightness parameters of the first symmetric sub-regions.
Specifically, as shown in fig. 4a and 4B, after the sub-region B1 to be adjusted is determined, the first symmetric sub-region a2 which is symmetric with respect to the position of the region to be adjusted can be determined in the infrared image. For example, according to the position of B1 in the color image, the corresponding region a1 can be found in the infrared image, and then the symmetric region a2 can be found according to a 1. There are many ways to find a2 from a1, for example, a2 with a1 symmetry may be determined by taking the center line (and/or center point) of the image as the axis of symmetry, a2 with a1 symmetry may be determined by taking the center line of the first region as the axis of symmetry, or a2 with a1 symmetry determined by taking the center line as the axis of symmetry after determining the center line from the nose of the face, or other possibilities may be used.
The second method S140 may include:
s410, determining a second symmetrical sub-area which is symmetrical to the position of the sub-area to be adjusted in the second area;
s420, correspondingly adjusting the brightness parameters and/or the RGB components of the sub-regions to be adjusted according to the brightness parameters and/or the RGB components of the second symmetric sub-regions.
Specifically, as shown in fig. 4a, after the sub-region B1 to be adjusted is determined, a second symmetric sub-region B2 which is symmetric with respect to the position of the region to be adjusted can be determined in the color image. The method for finding B2 according to B1 can be found in the method for finding A2 according to A1 described above.
The embodiment of the invention can determine which areas, such as specific positions of the face, in the color image need to be adjusted by utilizing the brightness of the infrared image and/or the color image, and further adjust the pixel parameters of the color image, thereby improving the adverse effect of environmental illumination on the image and improving the performance of face recognition.
Furthermore, the brightness, RGB components and the like of the infrared image and/or the color image can be utilized to adjust the pixel parameters of the color image, so that the color image better conforms to the characteristics of the face, and the face recognition performance is improved.
Fig. 5 shows a block diagram of an apparatus for image processing according to an embodiment of the present invention. Referring to fig. 5, the apparatus includes:
a first region determining module 510 for determining a first region including a face in the infrared image.
A second region determining module 520, configured to determine a second region corresponding to the first region in the color image.
A to-be-adjusted sub-region determining module 530, configured to determine a to-be-adjusted sub-region in the second region according to the pixel parameters of the first region and the second region.
An adjusting module 540, configured to adjust a pixel parameter in the sub-region to be adjusted according to the pixel parameter of the first region and/or the second region.
In another embodiment, referring to fig. 6, the to-be-adjusted sub-region determining module 530 may further include:
the first comparing sub-module 610 is configured to compare the luminance mean of each of the first sub-regions with the luminance mean of the first region to obtain each of the first luminance differences.
The second comparing sub-module 620 is configured to compare the luminance mean of each of the second sub-regions with the luminance mean of the second region to obtain each second luminance difference.
The determining sub-module 630 is configured to determine the sub-region to be adjusted in the second region according to each of the first luminance differences and each of the second luminance differences.
In another embodiment, referring to fig. 7, the adjusting module 540 may include:
a first symmetric sub-region determining sub-module 710, configured to determine, in the first region, a first symmetric sub-region that is symmetric to the sub-region to be adjusted in position;
the first adjusting submodule 720 is configured to correspondingly adjust the brightness parameter of the sub-region to be adjusted according to the brightness parameter of the first symmetric sub-region.
In another embodiment, referring to fig. 8, the adjusting module 540 may further include:
a second symmetric sub-region determining sub-module 810, configured to determine, in the second region, a second symmetric sub-region that is symmetric to the sub-region to be adjusted in position;
and a second adjusting sub-module 820, configured to correspondingly adjust the luminance parameter and/or the RGB component of the sub-region to be adjusted according to the luminance parameter and/or the RGB component of the second symmetric sub-region.
The functions of each module in the apparatus according to the embodiment of the present invention may refer to the related description of the above method, and are not described herein again.
Fig. 9 shows a block diagram of an apparatus for image processing according to another embodiment of the present invention. As shown in fig. 9, the image processing apparatus includes: a memory 910 and a processor 920, the memory 910 having stored therein computer programs operable on the processor 920. The processor 920 implements the method of image processing in the above-described embodiments when executing the computer program. The number of the memory 910 and the processor 920 may be one or more.
The image processing apparatus further includes:
and a communication interface 930 for communicating with an external device to perform data interactive transmission.
Memory 910 may include high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
If the memory 910, the processor 920 and the communication interface 930 are implemented independently, the memory 910, the processor 920 and the communication interface 930 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 9, but this does not indicate only one bus or one type of bus.
Optionally, in an implementation, if the memory 910, the processor 920 and the communication interface 930 are integrated on a chip, the memory 910, the processor 920 and the communication interface 930 may complete communication with each other through an internal interface.
An embodiment of the present invention provides a computer-readable storage medium, which stores a computer program, and the computer program is used for implementing the method of any one of the above embodiments when being executed by a processor.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer readable storage medium. The storage medium may be a read-only memory, a magnetic or optical disk, or the like.
The above description is only for the specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive various changes or substitutions within the technical scope of the present invention, and these should be covered by the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.
Claims (10)
1. A method of image processing, comprising:
determining a first region including a face in the infrared image;
determining a second area corresponding to the first area in the color image, wherein the first area comprises a plurality of first sub-areas, and the second area comprises a plurality of second sub-areas;
determining a sub-region to be adjusted in the second region according to the pixel parameters of the first region and the second region, including: comparing the brightness mean value of each first sub-area with the brightness mean value of each first sub-area to obtain each first brightness difference; comparing the brightness mean value of each second sub-area with the brightness mean value of each second sub-area to obtain each second brightness difference; determining the sub-area to be adjusted in the second area according to the first brightness differences and the second brightness differences; or, under the condition that the RGB components of the second sub-region are abnormal, determining the abnormal second sub-region as the sub-region to be adjusted;
and adjusting the pixel parameters in the sub-area to be adjusted according to the brightness parameters of the first area and/or the brightness parameters and/or the RGB components of the second area.
2. The method of claim 1, wherein determining the second region in the color image that corresponds to the first region comprises:
and determining a second area corresponding to the pixel position of the first area in the color image.
3. The method according to claim 1, wherein adjusting the pixel parameters in the sub-region to be adjusted according to the pixel parameters of the first region comprises:
in the first area, determining a first symmetrical sub-area which is symmetrical to the position of the sub-area to be adjusted;
and correspondingly adjusting the brightness parameters of the sub-regions to be adjusted according to the brightness parameters of the first symmetrical sub-regions.
4. The method according to any one of claims 1 to 3, wherein adjusting the pixel parameters in the sub-region to be adjusted according to the pixel parameters of the second region comprises:
in the second area, determining a second symmetrical sub-area which is symmetrical to the position of the sub-area to be adjusted;
and correspondingly adjusting the brightness parameters and/or the RGB components of the sub-areas to be adjusted according to the brightness parameters and/or the RGB components of the second symmetrical sub-areas.
5. An apparatus for image processing, comprising:
the first region determining module is used for determining a first region comprising a face in the infrared image;
a second region determining module, configured to determine, in the color image, a second region corresponding to the first region, where the first region includes a plurality of first sub-regions, and the second region includes a plurality of second sub-regions;
a to-be-adjusted sub-region determining module, configured to determine a to-be-adjusted sub-region in the second region according to the pixel parameters of the first region and the second region;
the to-be-adjusted sub-region determining module comprises:
the first comparison sub-module is used for comparing the brightness mean value of each first sub-area and the first area to obtain each first brightness difference;
the second comparison submodule is used for comparing the brightness mean value of each second sub-area with the brightness mean value of each second area to obtain each second brightness difference;
the first determining submodule is used for determining the sub-area to be adjusted in the second area according to each first brightness difference and each second brightness difference;
the second determining submodule is used for determining the abnormal second sub-area as the sub-area to be adjusted under the condition that the RGB components of the second sub-area are abnormal;
and the adjusting module is used for adjusting the pixel parameters in the sub-area to be adjusted according to the brightness parameters of the first area and/or the brightness parameters and/or the RGB components of the second area.
6. The apparatus of claim 5, wherein the second region determining module is further configured to determine a second region corresponding to the pixel position of the first region in the color image.
7. The apparatus of claim 5, wherein the adjustment module comprises:
the first symmetrical sub-region determining submodule is used for determining a first symmetrical sub-region which is symmetrical to the position of the sub-region to be adjusted in the first region;
and the first adjusting submodule is used for correspondingly adjusting the brightness parameters of the sub-regions to be adjusted according to the brightness parameters of the first symmetrical sub-regions.
8. The apparatus of any of claims 5 to 7, wherein the adjustment module comprises:
a second symmetric sub-region determining submodule, configured to determine, in the second region, a second symmetric sub-region that is symmetric to the sub-region to be adjusted in position;
and the second adjusting submodule is used for correspondingly adjusting the brightness parameter and/or the RGB component of the sub-area to be adjusted according to the brightness parameter and/or the RGB component of the second symmetrical sub-area.
9. An apparatus for image processing, comprising:
one or more processors;
storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method recited in any of claims 1-4.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-4.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810297650.5A CN108416333B (en) | 2018-03-30 | 2018-03-30 | Image processing method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810297650.5A CN108416333B (en) | 2018-03-30 | 2018-03-30 | Image processing method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN108416333A CN108416333A (en) | 2018-08-17 |
| CN108416333B true CN108416333B (en) | 2020-01-17 |
Family
ID=63134585
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810297650.5A Active CN108416333B (en) | 2018-03-30 | 2018-03-30 | Image processing method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN108416333B (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112308056B (en) * | 2019-07-26 | 2024-12-03 | 深圳怡化电脑股份有限公司 | Method, device, equipment and storage medium for acquiring bill feature area |
| CN112084951A (en) * | 2020-09-10 | 2020-12-15 | 深圳市迈航信息技术有限公司 | Intelligent building system control method, device, system and readable storage medium |
| CN113327193A (en) * | 2021-05-27 | 2021-08-31 | 北京百度网讯科技有限公司 | Image processing method, image processing apparatus, electronic device, and medium |
| TWI812516B (en) * | 2022-10-20 | 2023-08-11 | 緯創資通股份有限公司 | Image processing apparatus and image processing method |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1585957A (en) * | 2001-09-13 | 2005-02-23 | 霍尼韦尔国际公司 | Near-infrared method and system for use in face detection |
| CN101271519A (en) * | 2007-03-22 | 2008-09-24 | 阿特尼克斯有限公司 | A method and apparatus for detecting faces |
| CN101330563A (en) * | 2007-02-01 | 2008-12-24 | 株式会社东芝 | Systems and methods for facial image enhancement |
| CN101931755A (en) * | 2010-07-06 | 2010-12-29 | 上海洪剑智能科技有限公司 | Modulated light filter device and filter method for face recognition |
| CN102138148A (en) * | 2009-06-30 | 2011-07-27 | 索尼公司 | Skin detection using multi-band near-infrared illumination |
| CN103810463A (en) * | 2012-11-14 | 2014-05-21 | 汉王科技股份有限公司 | Face recognition device and face image detection method |
| CN107633485A (en) * | 2017-08-07 | 2018-01-26 | 百度在线网络技术(北京)有限公司 | Face's luminance regulating method, device, equipment and storage medium |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR101014325B1 (en) * | 2008-02-11 | 2011-02-14 | 김동의 | Infrared Face Recognition System and Method |
| CN105612740B (en) * | 2014-09-16 | 2017-12-15 | 华为技术有限公司 | A kind of method and device of image procossing |
| CN105554483B (en) * | 2015-07-16 | 2018-05-15 | 宇龙计算机通信科技(深圳)有限公司 | A kind of image processing method and terminal |
| CN107316272A (en) * | 2017-06-29 | 2017-11-03 | 联想(北京)有限公司 | Method and its equipment for image procossing |
| CN107292860B (en) * | 2017-07-26 | 2020-04-28 | 武汉鸿瑞达信息技术有限公司 | Image processing method and device |
-
2018
- 2018-03-30 CN CN201810297650.5A patent/CN108416333B/en active Active
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1585957A (en) * | 2001-09-13 | 2005-02-23 | 霍尼韦尔国际公司 | Near-infrared method and system for use in face detection |
| CN101330563A (en) * | 2007-02-01 | 2008-12-24 | 株式会社东芝 | Systems and methods for facial image enhancement |
| CN101271519A (en) * | 2007-03-22 | 2008-09-24 | 阿特尼克斯有限公司 | A method and apparatus for detecting faces |
| CN102138148A (en) * | 2009-06-30 | 2011-07-27 | 索尼公司 | Skin detection using multi-band near-infrared illumination |
| CN101931755A (en) * | 2010-07-06 | 2010-12-29 | 上海洪剑智能科技有限公司 | Modulated light filter device and filter method for face recognition |
| CN103810463A (en) * | 2012-11-14 | 2014-05-21 | 汉王科技股份有限公司 | Face recognition device and face image detection method |
| CN107633485A (en) * | 2017-08-07 | 2018-01-26 | 百度在线网络技术(北京)有限公司 | Face's luminance regulating method, device, equipment and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108416333A (en) | 2018-08-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107977940B (en) | Background blurring processing method, device and equipment | |
| CN108416333B (en) | Image processing method and device | |
| US9451173B2 (en) | Electronic device and control method of the same | |
| JP7031697B2 (en) | Information processing device and recognition support method | |
| CA3049704C (en) | Camera assembly and mobile electronic device | |
| CN113747008B (en) | Camera and light supplementing method | |
| CN111311500B (en) | A method and device for color restoration of an image | |
| US10798358B2 (en) | Image processing method and device for accomplishing white balance regulation, computer-readable storage medium and computer device | |
| JP2019092156A (en) | Method for synthesizing first image and second image having overlapping fields of view, device, and camera | |
| JP2015179985A (en) | Multi-area white balance control device, multi-area white balance control method, multi-area white balance control program, computer recording multi-area white balance control program, multi-area white balance image processing device, multi-area white balance image processing method, multi-area White balance image processing program, computer recording multi-area white balance image processing program, and imaging apparatus provided with multi-area white balance image processing device | |
| CN108307098A (en) | Fisheye camera shadow correction parameter determination method, bearing calibration and device, storage medium, fisheye camera | |
| CN112218065A (en) | Image white balance method, system, terminal device and storage medium | |
| CN109785390A (en) | A kind of method and apparatus for image flame detection | |
| US9800793B2 (en) | Method for generating target gain value of wide dynamic range operation | |
| CN113053324A (en) | Backlight control method, device, equipment, system and storage medium | |
| WO2024002186A1 (en) | Image fusion method and apparatus, and storage medium | |
| CN116343652A (en) | LED display screen splice line compensation system, method, equipment and storage medium | |
| CN110930340B (en) | Image processing method and device | |
| CN116309224A (en) | Image fusion method, device, terminal and computer readable storage medium | |
| CN117392161B (en) | Calibration plate corner point for long-distance large perspective distortion and corner point number determination method | |
| CN107507601A (en) | A kind of method and system of the camera supervised interface display effect of adjust automatically | |
| JP2022167586A (en) | Information processing device, information processing method, and control program | |
| CN108510538B (en) | Three-dimensional image synthesis method and device and computer-readable storage medium | |
| CN113947708B (en) | Lighting effect control method, system, device, electronic device and medium for lighting equipment | |
| WO2020084894A1 (en) | Multi-camera system, control value calculation method and control device |
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 |