CN107800962B - Image processing method, device and electronic device - Google Patents
Image processing method, device and electronic device Download PDFInfo
- Publication number
- CN107800962B CN107800962B CN201711021392.XA CN201711021392A CN107800962B CN 107800962 B CN107800962 B CN 107800962B CN 201711021392 A CN201711021392 A CN 201711021392A CN 107800962 B CN107800962 B CN 107800962B
- Authority
- CN
- China
- Prior art keywords
- image
- light source
- structured light
- point set
- area
- 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.)
- Expired - Fee Related
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/65—Control of camera operation in relation to power supply
- H04N23/651—Control of camera operation in relation to power supply for reducing power consumption by affecting camera operations, e.g. sleep mode, hibernation mode or power off of selective parts of the camera
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/70—Circuitry for compensating brightness variation in the scene
- H04N23/72—Combination of two or more compensation controls
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/70—Circuitry for compensating brightness variation in the scene
- H04N23/74—Circuitry for compensating brightness variation in the scene by influencing the scene brightness using illuminating means
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/70—Circuitry for compensating brightness variation in the scene
- H04N23/75—Circuitry for compensating brightness variation in the scene by influencing optical camera components
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/95—Computational photography systems, e.g. light-field imaging systems
- H04N23/951—Computational photography systems, e.g. light-field imaging systems by using two or more images to influence resolution, frame rate or aspect ratio
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computing Systems (AREA)
- Theoretical Computer Science (AREA)
- Studio Devices (AREA)
- Image Processing (AREA)
Abstract
Description
技术领域technical field
本发明涉及移动终端技术领域,尤其涉及一种图像处理方法、装置和电子装置。The present invention relates to the technical field of mobile terminals, and in particular, to an image processing method, device and electronic device.
背景技术Background technique
随着移动终端技术的发展,结构光技术逐渐被应用于移动终端中。然而,现有的采用结构光技术进行拍照的移动终端,在进行拍照时,结构光的所有光源点被同时投射至拍摄对象上,导致移动终端的瞬时功耗较大,发热现象明显。With the development of mobile terminal technology, structured light technology is gradually applied to mobile terminals. However, in the existing mobile terminals that use structured light technology to take pictures, when taking pictures, all light sources of the structured light are projected onto the photographed object at the same time, resulting in high instantaneous power consumption of the mobile terminal and obvious heat generation.
发明内容SUMMARY OF THE INVENTION
本发明的实施例提供了一种图像处理方法、装置和电子装置,以降低移动终端进行拍摄时的瞬时功耗,解决现有技术中瞬时功耗大的技术问题。Embodiments of the present invention provide an image processing method, device, and electronic device, so as to reduce the instantaneous power consumption of a mobile terminal when shooting, and solve the technical problem of large instantaneous power consumption in the prior art.
本发明实施方式的图像处理方法用于电子装置,所述电子装置包括结构光发射器和图像采集器,所述图像处理方法包括:The image processing method of the embodiment of the present invention is applied to an electronic device, and the electronic device includes a structured light emitter and an image collector, and the image processing method includes:
按照从第一区域向所述第一区域四周延伸的方向,连续从所述结构光发射器中的光源阵列中选取一个光源点集合;其中,所述第一区域位于所述光源阵列的中心位置;According to the direction extending from the first area to the periphery of the first area, a light source point set is continuously selected from the light source array in the structured light emitter; wherein, the first area is located at the center of the light source array ;
开启所述光源点集合;turn on the light source point set;
通过所述光源点集合向当前用户投射结构光并在投射完所述结构光之后关闭所述光源点集合;Projecting structured light to the current user through the light source point set and turning off the light source point set after projecting the structured light;
控制图像采集器拍摄每次经所述当前用户调制的结构光图像并进行图像叠加,得到目标图像。The image collector is controlled to capture the structured light image modulated by the current user each time and superimpose the images to obtain the target image.
本发明实施方式的图像处理装置,用于电子装置,所述图像处理装置包括:An image processing apparatus according to an embodiment of the present invention is used in an electronic apparatus, and the image processing apparatus includes:
结构光发射器,用于向当前用户发射结构光;Structured light transmitter, used to transmit structured light to the current user;
图像采集器,用于拍摄经所述当前用户调制的结构光图像;an image collector for capturing the structured light image modulated by the current user;
处理器,所述处理器用于:a processor for:
按照从第一区域向所述第一区域四周延伸的方向,连续从所述结构光发射器中的光源阵列中选取一个光源点集合;其中,所述第一区域位于所述光源阵列的中心位置;According to the direction extending from the first area to the periphery of the first area, a light source point set is continuously selected from the light source array in the structured light emitter; wherein, the first area is located at the center of the light source array ;
开启所述光源点集合;turn on the light source point set;
通过所述光源点集合向当前用户投射结构光并在投射完所述结构光之后关闭所述光源点集合;Projecting structured light to the current user through the light source point set and turning off the light source point set after projecting the structured light;
控制图像采集器拍摄每次经所述当前用户调制的结构光图像并进行图像叠加,得到目标图像。The image collector is controlled to capture the structured light image modulated by the current user each time and superimpose the images to obtain the target image.
本发明实施方式的电子装置包括:一个或多个处理器、存储器和一个或多个程序,其中所述一个或多个程序被存储在所述存储器中,并且被配置成由所述一个或多个处理器执行,所述程序包括用于执行上述实施方式所述的图像处理方法的指令。An electronic device of an embodiment of the present invention includes: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more programs Executed by each processor, the program includes instructions for executing the image processing method described in the above embodiments.
本发明实施方式的计算机可读存储介质,包括与能够摄像的电子装置结合使用的计算机程序,所述计算机程序可被处理器执行以完成上述实施方式所述的图像处理方法。The computer-readable storage medium of the embodiments of the present invention includes a computer program used in conjunction with an electronic device capable of imaging, and the computer program can be executed by a processor to complete the image processing method described in the above-mentioned embodiments.
本发明实施方式的图像处理方法、装置和电子装置,通过按照从第一区域向第一区域四周延伸的方向,连续从结构光发射器中的光源阵列中选取一个光源点集合,开启光源点集合,通过光源点集合向当前用户投射结构光并在投射完结构光之后关闭光源点集合,控制图像采集器拍摄每次经当前用户调制的结构光图像并进行图像叠加,得到目标图像。由于在拍摄过程中按照从中间向四周方向延伸的方式选取光源点集合并开启光源点进行拍摄,在拍摄时可以控制结构光发射器每次仅投射较少数量的结构光,并可以分为多次进行投射。由于每次仅投射较少数量的结构光能够有效降低拍摄时的瞬时功耗,有利于散热,避免移动终端出现明显的发热现象,解决现有技术中开启所有光源点投射结构光导致移动终端的瞬时功耗较大的技术问题。进一步地,由于通过多次投射的方式可以覆盖到所有光源点,能够使得拍摄对象的成像完整,保证成像质量。The image processing method, device and electronic device according to the embodiments of the present invention continuously select a light source point set from the light source array in the structured light emitter according to the direction extending from the first area to the periphery of the first area, and turn on the light source point set , project structured light to the current user through the light source point set and turn off the light source point set after projecting the structured light, control the image collector to capture the structured light image modulated by the current user each time and superimpose the image to obtain the target image. Since the light source point set is selected in the way of extending from the middle to the surrounding directions during the shooting process and the light source points are turned on for shooting, the structured light emitter can be controlled to project only a small amount of structured light each time during shooting, and can be divided into multiple light sources. to cast. Because only a small amount of structured light is projected each time, the instantaneous power consumption during shooting can be effectively reduced, which is conducive to heat dissipation, avoids obvious heating of the mobile terminal, and solves the problem of the mobile terminal in the prior art when all light sources are turned on to project structured light. The technical problem of large instantaneous power consumption. Further, since all light source points can be covered by means of multiple projections, the imaging of the photographed object can be completed and the imaging quality can be ensured.
本发明附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the present invention will be set forth, in part, from the following description, and in part will be apparent from the following description, or may be learned by practice of the invention.
附图说明Description of drawings
本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of embodiments taken in conjunction with the accompanying drawings, wherein:
图1为本发明一实施例提出的图像处理方法的流程示意图;FIG. 1 is a schematic flowchart of an image processing method proposed by an embodiment of the present invention;
图2为均匀排布的光源点阵组成的光源阵列示意图;FIG. 2 is a schematic diagram of a light source array composed of uniformly arranged light source lattices;
图3为本发明另一实施例提出的图像处理方法的流程示意图;3 is a schematic flowchart of an image processing method proposed by another embodiment of the present invention;
图4为本发明一实施例提出的图像处理装置的结构示意图;FIG. 4 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention;
图5为本发明一实施例提出的电子装置的结构示意图;以及FIG. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention; and
图6为本发明一实施例提出的终端中的图像处理电路的结构示意图。FIG. 6 is a schematic structural diagram of an image processing circuit in a terminal according to an embodiment of the present invention.
具体实施方式Detailed ways
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本发明,而不能理解为对本发明的限制。The following describes in detail the embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary and are intended to explain the present invention and should not be construed as limiting the present invention.
下面参考附图描述本发明实施例的图像处理方法、装置和电子装置。The image processing method, device, and electronic device according to the embodiments of the present invention are described below with reference to the accompanying drawings.
图1为本发明一实施例提出的图像处理方法的流程示意图,该方法可以用于电子装置中,该电子装置可以是手机、平板电脑等移动终端。该电子装置包括结构光发射器和图像采集器,其中,结构光发射器用于向拍摄对象投射结构光,图像采集器用于拍摄经拍摄对象调制后的结构光图像。FIG. 1 is a schematic flowchart of an image processing method proposed by an embodiment of the present invention. The method can be used in an electronic device, and the electronic device can be a mobile terminal such as a mobile phone and a tablet computer. The electronic device includes a structured light emitter and an image collector, wherein the structured light emitter is used for projecting structured light to a shooting object, and the image collector is used for shooting a structured light image modulated by the shooting object.
如图1所示,该图像处理方法包括以下步骤:As shown in Figure 1, the image processing method includes the following steps:
步骤101,按照从第一区域向第一区域四周延伸的方向,连续从结构光发射器中的光源阵列中选取一个光源点集合。Step 101, continuously select a light source point set from the light source array in the structured light emitter according to the direction extending from the first area to the periphery of the first area.
其中,第一区域位于光源阵列的中心位置。Wherein, the first area is located at the center of the light source array.
目前,随着移动终端技术的发展,移动终端的功能也越来越丰富,人脸识别功能逐渐成为移动终端的标准配置。比如,越来越多的移动终端支持人脸解锁、人脸支付等。当用户使用需要进行人脸识别的相关功能时,相关功能开启后,移动终端调用内置的摄像头进行图像采集,以获取包含人脸的图像。At present, with the development of mobile terminal technology, the functions of the mobile terminal are becoming more and more abundant, and the face recognition function has gradually become a standard configuration of the mobile terminal. For example, more and more mobile terminals support face unlocking, face payment, etc. When a user uses a related function that needs to perform face recognition, after the related function is enabled, the mobile terminal calls the built-in camera to perform image acquisition, so as to obtain an image containing a human face.
在实际拍照时,用户通常喜欢将被拍摄对象的最关键部分显示在图像的中间位置,也就是说,在拍照时,摄像头的中间位置一般对准被拍摄对象的关键部分。比如,用户在自拍时,用户的人脸图像通常显示在移动终端的屏幕中间。因此,在拍摄照片时,尤其是在使用人脸解锁、人脸支付等功能采集当前用户的人脸图像时,可以控制摄像头优先采集被拍摄对象最关键部位的图像。When actually taking pictures, the user usually likes to display the most critical part of the object to be photographed in the middle position of the image, that is, when taking pictures, the middle position of the camera is generally aimed at the key part of the object to be photographed. For example, when the user takes a selfie, the user's face image is usually displayed in the middle of the screen of the mobile terminal. Therefore, when taking a photo, especially when using functions such as face unlocking and face payment to collect the face image of the current user, the camera can be controlled to preferentially collect images of the most critical parts of the subject.
从而,本实施例中,可以将结构光发射器中光源阵列的中心位置所包含的光源点所在的区域设置为第一区域,进而从第一区域开始,按照从第一区域向第一区域四周延伸的方向,连续从结构光发射器中的光源阵列中选取一个光源点集合。Therefore, in this embodiment, the area where the light source points included in the center position of the light source array in the structured light emitter are located can be set as the first area, and then starting from the first area, according to the order from the first area to the surrounding area of the first area In the direction of extension, a set of light source points is continuously selected from the light source array in the structured light emitter.
图2为均匀排布的光源点阵组成的光源阵列示意图,为便于理解,下面以如图2所示的光源阵列为例进行解释说明。图2中所示的光源阵列由8*8个光源点组成,假设该光源阵列中的每一列按照从左至右的顺序进行编号,依次为第1列、第2列、…,第8列;该光源阵列中的每一行按照从上到下的顺序进行编号,依次为第1行、第2行、…,第8行,如图2所示,并且假设图2中所示的区域21为第一区域,即第一区域包含4个光源点,分别为第4行中第4列、第5列的两个光源点,以及第5行中第4列、第5列的两个光源点。FIG. 2 is a schematic diagram of a light source array composed of uniformly arranged light source lattices. For ease of understanding, the light source array shown in FIG. 2 is used as an example for explanation below. The light source array shown in Figure 2 is composed of 8*8 light source points. It is assumed that each column in the light source array is numbered in the order from left to right, which is the first column, the second column, ..., the eighth column. ; Each row in the light source array is numbered in order from top to bottom, followed by row 1, row 2, ..., row 8, as shown in Figure 2, and assuming the area 21 shown in Figure 2 is the first area, that is, the first area contains 4 light source points, which are the two light source points in the 4th column and the 5th column in the 4th row, and the two light sources in the 4th column and the 5th column in the 5th row. point.
应当理解的是,实际应用中,光源阵列可以由圆形斑纹、十字斑纹等类型的光源点组成,且光源阵列的大小要比图2中所示的光源阵列的大小大得多,图2所示的光源阵列仅作为示例,而不能作为对本发明的限制。It should be understood that, in practical applications, the light source array can be composed of light source points of circular pattern, cross pattern, etc., and the size of the light source array is much larger than that of the light source array shown in Fig. 2. The light source array shown is only an example, not a limitation of the present invention.
作为一种示例,在选取光源点集合时,每次选取的光源点集合均可以包含第一区域在内。以图2所示的光源阵列为例,第一次选取的光源点集合可以为第一区域所包含的光源点,即图2中区域21内的光源点;第二次选取的光源点集合包含第一次选取的光源点集合在内,比如第二次选取的光源点集合可以为图2中区域22内包含的光源点组成的集合;第三次选取的光源点集合包含第二次选取的光源点集合在内,比如第三次选取的光源点集合可以为图2中区域23内包含的光源点组成的集合;以此类推。As an example, when a light source point set is selected, the light source point set selected each time may include the first region. Taking the light source array shown in FIG. 2 as an example, the light source point set selected for the first time may be the light source points included in the first area, that is, the light source points in the area 21 in FIG. 2 ; the light source point set selected for the second time includes The light source point set selected for the first time is included. For example, the light source point set selected for the second time may be the set composed of the light source points contained in the area 22 in FIG. 2; the light source point set selected for the third time includes the light source point set selected for the second time. Including the light source point set, for example, the light source point set selected for the third time may be the set composed of the light source points included in the area 23 in FIG. 2 ; and so on.
作为另一种示例,在选取光源点集合时,除第一次选取的光源点集合中包含第一区域之外,之后每次选取的光源点集合均不包含第一区域内的光源点。仍以图2所示的光源阵列为例,第一次选取的光源点集合可以为第一区域所包含的光源点,即图2中区域21内的光源点;第二次选取的光源点集合中不包含第一次选取的光源点集合中的光源点,比如,第二次选取的光源点集合可以为区域21与区域22之间的环形区域内的光源点组成的集合;第三次选取的光源点集合中不包含前两次选取的光源点集合中的光源点,比如,第三次选取的光源点集合可以为区域22与区域23之间的环形区域内的光源点组成的集合;以此类推。As another example, when the light source point set is selected, except that the light source point set selected for the first time includes the first region, the light source point set selected each time thereafter does not include the light source points in the first region. Still taking the light source array shown in FIG. 2 as an example, the light source point set selected for the first time may be the light source points contained in the first area, that is, the light source points in the area 21 in FIG. 2; the light source point set selected for the second time does not include the light source points in the light source point set selected for the first time, for example, the light source point set selected for the second time can be the set composed of the light source points in the annular area between area 21 and area 22; The light source point set of 1 does not include the light source points in the first two selected light source point sets, for example, the third selected light source point set may be the set of light source points in the annular area between the area 22 and the area 23; And so on.
此处需要说明的是,第一次选取的光源点集合可以不只包含第一区域内的光源点,还可以包含第一区域四周的光源点,比如,可以将图2中的区域22内包含的光源点组成第一次选取的光源点集合。上述举例仅作为示例,不能作为对本发明的限制。It should be noted here that the set of light source points selected for the first time may not only include the light source points in the first area, but also include the light source points around the first area. For example, the light source points included in the area 22 in FIG. The light source points form the set of light source points selected for the first time. The above examples are only used as examples and cannot be used to limit the present invention.
步骤102,开启光源点集合。Step 102: Turn on the light source point set.
本实施例中,从结构光发射器的光源阵列中选定光源点集合之后,可以控制结构光发射器开启所选定的光源点集合内的所有光源点。In this embodiment, after the light source point set is selected from the light source array of the structured light transmitter, the structured light transmitter can be controlled to turn on all light source points in the selected light source point set.
步骤103,通过光源点集合向当前用户投射结构光并在投射完结构光之后关闭光源点集合。Step 103 , project the structured light to the current user through the light source point set, and turn off the light source point set after the structured light is projected.
针对每次开启的光源点集合,电子装置可以控制结构光发射器通过当前开启的光源点集合向当前用户投射结构光,并在结构光发射器投射完结构光之后,关闭当前开启的光源点集合内的光源点。For the light source point set that is turned on each time, the electronic device can control the structured light emitter to project structured light to the current user through the currently turned on light source point set, and close the currently turned on light source point set after the structured light emitter finishes projecting the structured light. light source inside.
步骤104,控制图像采集器拍摄每次经当前用户调制的结构光图像并进行图像叠加,得到目标图像。Step 104 , controlling the image collector to capture the structured light image modulated by the current user each time and superimpose the images to obtain the target image.
本实施例中,当前开启的光源点集合内的所有光源点向当前用户投射完结构光之后,结构光到达当前用户,并在到达当前用户后因当前用户的调制而发生变化,此时,电子装置控制图像采集器拍摄经当前用户调制的结构光图像。结构光发射器每次通过此次开启的光源点集合投射完结构光之后,图像采集器拍摄对应的结构光图像,并将所得的结构光图像进行图像叠加,得到目标图像。In this embodiment, after all the light source points in the currently turned on light source point set project the structured light to the current user, the structured light reaches the current user and changes due to the modulation of the current user after reaching the current user. The device controls the image collector to capture the structured light image modulated by the current user. After the structured light emitter projects the structured light through the set of light source points turned on each time, the image collector captures the corresponding structured light image, and superimposes the obtained structured light image to obtain the target image.
本实施例的图像处理方法,通过按照从第一区域向第一区域四周延伸的方向,连续从结构光发射器中的光源阵列中选取一个光源点集合,开启光源点集合,通过光源点集合向当前用户投射结构光并在投射完结构光之后关闭光源点集合,控制图像采集器拍摄每次经当前用户调制的结构光图像并进行图像叠加,得到目标图像。由于在拍摄过程中按照从中间向四周方向延伸的方式选取光源点集合并开启光源点进行拍摄,在拍摄时可以控制结构光发射器每次仅投射较少数量的结构光,并可以分为多次进行投射。由于每次仅投射较少数量的结构光能够有效降低拍摄时的瞬时功耗,有利于散热,避免移动终端出现明显的发热现象,解决现有技术中开启所有光源点投射结构光导致移动终端的瞬时功耗较大的技术问题。进一步地,由于通过多次投射的方式可以覆盖到所有光源点,能够使得拍摄对象的成像完整,保证成像质量。In the image processing method of this embodiment, a light source point set is continuously selected from the light source array in the structured light emitter according to the direction extending from the first area to the periphery of the first area, the light source point set is turned on, and the light source point set is sent to the light source point set. The current user projects the structured light and turns off the light source point set after projecting the structured light, and controls the image collector to capture the structured light image modulated by the current user each time and superimpose the images to obtain the target image. Since the light source point set is selected in the way of extending from the middle to the surrounding directions during the shooting process and the light source points are turned on for shooting, the structured light emitter can be controlled to project only a small amount of structured light each time during shooting, and can be divided into multiple light sources. to cast. Because only a small amount of structured light is projected each time, the instantaneous power consumption during shooting can be effectively reduced, which is conducive to heat dissipation, avoids obvious heating of the mobile terminal, and solves the problem of the mobile terminal in the prior art when all light sources are turned on to project structured light. The technical problem of large instantaneous power consumption. Further, since all light source points can be covered by means of multiple projections, the imaging of the photographed object can be completed and the imaging quality can be ensured.
为了更加清楚地说明上一实施例,本发明实施例提出了另一种图像处理方法,图3为本发明另一实施例提出的图像处理方法的流程示意图。In order to explain the previous embodiment more clearly, the embodiment of the present invention proposes another image processing method, and FIG. 3 is a schematic flowchart of the image processing method proposed by another embodiment of the present invention.
如图3所示,该图像处理方法可以包括以下步骤:As shown in Figure 3, the image processing method may include the following steps:
步骤201,将第一区域内的光源点选取为光源点集合。Step 201: Select the light source points in the first area as the light source point set.
由于在拍摄时,摄像头的中间区域一般对准被拍摄对象的关键部分,因此在拍摄时,可以控制图像采集器先采集关键部分的图像。从而,本实施例中,在拍摄结构光图像时,可以先控制结构光发射器中光源阵列的中心位置的光源点向当前用户投射结构光,以优先获取关键部分的结构光图像。Since the middle area of the camera is generally aimed at the key part of the object when shooting, the image collector can be controlled to first collect the image of the key part when shooting. Therefore, in this embodiment, when capturing a structured light image, the light source point at the center of the light source array in the structured light emitter can be controlled to project structured light to the current user, so as to preferentially acquire the structured light image of key parts.
本实施例中,可以预先设置光源阵列中心位置的光源点所在的区域作为第一区域,在拍摄时,可以将第一区域内的光源点选取为光源点集合。本发明对第一区域的大小不作限定,比如图2中所示的光源阵列中的区域21可以作为第一区域,区域22也可以作为第一区域。In this embodiment, the area where the light source point at the center of the light source array is located may be preset as the first area, and when shooting, the light source points in the first area may be selected as the light source point set. The present invention does not limit the size of the first area. For example, the area 21 in the light source array shown in FIG. 2 can be used as the first area, and the area 22 can also be used as the first area.
步骤202,开启光源点集合。Step 202: Turn on the light source point set.
步骤203,通过光源点集合向当前用户投射结构光并在投射完结构光之后关闭光源点集合。Step 203, project the structured light to the current user through the light source point set, and turn off the light source point set after the structured light is projected.
本实施例中,每次选定了光源点集合之后,电子装置可以控制开启所选定的光源点集合中的光源点,并通过开启的光源点集合向当前用户投射结构光。在所开启的光源点集合内的所有光源点均投射完结构光之后,电子装置控制光源点集合内的光源点关闭。In this embodiment, after each light source point set is selected, the electronic device can control to turn on the light source points in the selected light source point set, and project structured light to the current user through the turned on light source point set. After all the light source points in the turned on light source point set have finished projecting the structured light, the electronic device controls the light source points in the light source point set to turn off.
步骤204,在第一区域对应的光源点集合投射完结构光之后,按照从第一区域向第一区域四周延伸的方向,从第一区域的边界开始,根据预设的距离间隔确定下一区域的边界。Step 204, after the structured light is projected from the light source point set corresponding to the first area, according to the direction extending from the first area to the periphery of the first area, starting from the boundary of the first area, and determining the next area according to the preset distance interval border.
针对第一次选取的光源点集合,在第一区域对应的光源点集合投射完结构光之后,在控制图像采集器拍摄经当前用户调制的结构光图像时,还可以按照从第一区域向第一区域四周延伸的方向,从第一区域的边界开始,根据预设的距离确定下一区域的边界。For the light source point set selected for the first time, after the light source point set corresponding to the first area has projected the structured light, when controlling the image collector to capture the structured light image modulated by the current user, you can also follow the steps from the first area to the first area. The direction extending around an area starts from the boundary of the first area, and determines the boundary of the next area according to a preset distance.
其中,预设的距离可以是预定数量的光源点的间隔,比如以两个光源点之间的距离作为预设的距离,以两个光源点之间的距离作为预设的距离等。The preset distance may be an interval of a predetermined number of light source points, for example, the distance between two light source points is used as the preset distance, and the distance between the two light source points is used as the preset distance.
以图2所示的光源阵列为例,第一次选取的光源点集合为第一区域,在第一区域(图2中的区域21)内的光源点投射完结构光之后,可以以同一行中两个相邻光源点之间的间隔作为预设的距离来确定下一区域的边界,此时,可以确定第一区域之后下一区域的边界为区域22的边界,再下一区域的边界为区域23的边界。或者,也可以以同一行中相邻三个光源点之间的间隔作为预设的距离来确定下一区域的边界,此时,可以确定第一区域之后下一区域的边界为区域23的边界。Taking the light source array shown in FIG. 2 as an example, the set of light source points selected for the first time is the first area, and after the light source points in the first area (area 21 in FIG. The interval between two adjacent light source points is used as a preset distance to determine the boundary of the next area. At this time, the boundary of the next area after the first area can be determined as the boundary of the area 22, and then the boundary of the next area can be determined. is the boundary of area 23. Alternatively, the interval between the three adjacent light source points in the same row can also be used as a preset distance to determine the boundary of the next area. In this case, the boundary of the next area after the first area can be determined as the boundary of the area 23 .
步骤205,从第一次拍摄到结构光图像开始,将当前拍摄到的结构光图像与上一次得到的结构光图像进行图像叠加,得到第一图像。Step 205 , starting from the structured light image captured for the first time, image superimposition of the currently captured structured light image and the last obtained structured light image to obtain a first image.
当第一次选定并开启光源点集合时,在光源点集合内的所有光源点均投射完结构光之后,电子装置控制图像采集器进行拍摄,得到第一张结构光图像,由于当前拍摄为第一次拍摄,之前没有结构光图像能够与第一张结构光图像进行叠加,则第一张结构光图像即可作为第一次拍摄后所得的第一图像。When the light source point set is selected and turned on for the first time, after all the light source points in the light source point set have projected the structured light, the electronic device controls the image collector to shoot to obtain the first structured light image. For the first shooting, there is no structured light image that can be superimposed with the first structured light image before, so the first structured light image can be used as the first image obtained after the first shooting.
当第二次选定光源点集合并开启光源点集合内的所有光源点时,在光源点集合内的所有光源点均投射完结构光之后,电子装置控制图像采集器进行第二次拍摄,得到第二张结构光图像,并将第二张结构光图像与第一张结构光图像进行图像叠加,得到叠加后的结构光图像,并将叠加后的结构光图像作为第一图像。When the light source point set is selected for the second time and all the light source points in the light source point set are turned on, after all the light source points in the light source point set have finished projecting the structured light, the electronic device controls the image collector to perform a second shooting, and obtains A second structured light image is obtained, and the second structured light image is superimposed with the first structured light image to obtain a superimposed structured light image, and the superimposed structured light image is used as the first image.
当第三次选定光源点集合并开启光源点集合内的所有光源点时,在光源点集合内的所有光源点均投射完结构光之后,电子装置控制图像采集器进行第三次拍摄,得到第三张结构光图像,并将当前拍摄到的第三张结构光图像与第二次拍摄完成后所得的叠加后的结构光图像进行图像叠加,得到叠加后的结构光图像并作为第一图像。也就是说,在第三次拍摄完成后得到的第一图像中,包含了第一张结构光图像、第二张结构光图像和第三张结构光图像。When the light source point set is selected for the third time and all the light source points in the light source point set are turned on, after all the light source points in the light source point set project the structured light, the electronic device controls the image collector to shoot for the third time, and obtains The third structured light image, and superimpose the currently captured third structured light image with the superimposed structured light image obtained after the second shooting, to obtain the superimposed structured light image and use it as the first image . That is to say, the first image obtained after the third shooting includes the first structured light image, the second structured light image and the third structured light image.
以此类推,直至拍摄结束。And so on until the shooting ends.
概括地说,本实施例中,除了第一次拍摄所得的结构光图像外,后续拍摄过程中所得的第一图像中,包含了此次拍摄所得的结构光图像以及之前每次拍摄所得的结构光图像。Generally speaking, in this embodiment, in addition to the structured light image obtained by the first shooting, the first image obtained in the subsequent shooting process includes the structured light image obtained this time and the structure obtained by each previous shooting. light image.
步骤206,判断从第一图像中是否可提取出完整的人脸图像。Step 206, judging whether a complete face image can be extracted from the first image.
本实施例中,针对每次开启光源点集合,并通过当前开启的光源点集合内的所有光源点向当前用户投射结构光,在完成当前拍摄并得到第一图像后,可以进一步判断是否能够从所得的第一图像中提取出完整的人脸图像。In this embodiment, every time the light source point set is turned on, and the structured light is projected to the current user through all the light source points in the currently turned on light source point set, after the current shooting is completed and the first image is obtained, it can be further judged whether it can be obtained from the A complete face image is extracted from the obtained first image.
具体地,在判断时,可以先从第一图像中提取出包括面部特征的第二图像,其中,面部特征可以包括眉毛、眼睛、鼻子、嘴巴和耳朵等。比如,可以采用相关的人脸识别技术,从第一图像中提取出第二图像。将所提取的第二图像与存储在电子装置上的授权人脸图像进行匹配,其中,授权人脸图像可以是一个或多个图像,可以是一个授权用户的多个不同的图像,也可以是多个不同的授权用户的多个图像,授权人脸图像可以预先存储于电子装置的存储器中。Specifically, when judging, a second image including facial features may be first extracted from the first image, where the facial features may include eyebrows, eyes, nose, mouth, ears, and the like. For example, a related face recognition technology can be used to extract the second image from the first image. Matching the extracted second image with the authorized face image stored on the electronic device, wherein the authorized face image may be one or more images, may be multiple different images of an authorized user, or may be Multiple images of multiple different authorized users, and authorized face images may be pre-stored in the memory of the electronic device.
在将所提取的第二图像与授权人脸图像进行匹配时,可以先从第二图像中提取出当前用户的面部器官的特征,进而将提取出的面部器官的特征与授权人脸图像中的面部器官的特征进行对比,当提取出的每个面部器官的特征与其中至少一个授权人脸图像中对应的面部器官的特征均一致时,则将其中至少一个授权人脸图像作为目标授权人脸图像。When matching the extracted second image with the authorized face image, the features of the current user's facial organs can be extracted from the second image first, and then the extracted features of the facial organs can be compared with those in the authorized face image. The features of facial organs are compared, and when the extracted features of each facial organ are consistent with the features of the corresponding facial organs in at least one of the authorized face images, then at least one of the authorized face images is used as the target authorized face. image.
当从电子装置中存储的授权人脸图像中匹配到目标授权人脸图像时,则判定从第一图像中提取出完整的人脸图像,进而执行步骤208;当从电子装置中存储的授权人脸图像中未匹配到目标授权人脸图像时,则判定不能从第一图像中提取出完整的人脸图像,则执行步骤207,继续选定光源点集合并拍摄新的结构光图像。When the target authorized face image is matched from the authorized face image stored in the electronic device, it is determined that a complete face image is extracted from the first image, and then step 208 is executed; When the target authorized face image is not matched in the face image, it is determined that a complete face image cannot be extracted from the first image, and step 207 is executed to continue to select the light source point set and shoot a new structured light image.
进一步地,在本发明实施例一种可能的实现方式中,当电子装置当前处于锁定状态时,在匹配到目标授权人脸图像之后,还可以解锁电子装置。Further, in a possible implementation manner of the embodiment of the present invention, when the electronic device is currently in a locked state, after matching the target authorized face image, the electronic device can also be unlocked.
由于第二图像与授权人脸图像匹配识别时,存在第二图像不完整,以及第二图像完整但不是授权用户的人脸图像两种情况,从而,在本发明实施例一种可能的实现方式中,从第二图像中提取出面部器官的特征之后,可以先判断所提取的面部器官的特征是否完整,即从第二图像中提取出的面部器官的特征是否能够完整地表示当前用户的面部器官,若提取的面部器官的特征不完整,则执行步骤207;若提取的面部器官的特征完整,则进一步将所提取的面部器官的特征与存储在电子装置上的授权人脸图像中的面部器官的特征进行匹配,并在匹配通过后,执行步骤208;若匹配未通过,则执行步骤209并结束拍摄,此时,若电子装置处于锁定状态,则保持锁定状态,若电子装置的人脸支付功能被启用,则拒绝支付。Because when the second image matches and recognizes the authorized face image, there are two situations: the second image is incomplete, and the second image is complete but not the authorized user's face image. Therefore, in the embodiment of the present invention, a possible implementation manner , after extracting the features of the facial organs from the second image, you can first determine whether the features of the extracted facial organs are complete, that is, whether the features of the facial organs extracted from the second image can completely represent the face of the current user Organs, if the features of the extracted facial organs are incomplete, then perform step 207; if the features of the extracted facial organs are complete, then further compare the features of the extracted facial organs with the faces in the authorized face image stored on the electronic device The features of the organs are matched, and after the matching is passed, step 208 is performed; if the matching fails, step 209 is performed and the shooting is ended. At this time, if the electronic device is in a locked state, the locked state is maintained. The payment function is enabled, the payment is refused.
步骤207,逐步选取两个相邻区域的边界之间的光源点作为光源点集合。Step 207, gradually selecting the light source points between the boundaries of two adjacent regions as the light source point set.
比如,以图2为例,当以同一行中两个相邻光源点之间的间隔作为预设的距离来确定下一区域的边界时,可以选取区域21的边界和区域22的边界之间的光源点作为光源点集合,此时,该光源点集合中包含12个光源点;当以同一行中相邻三个光源点之间的间隔作为预设的距离来确定下一区域的边界时,可以选取区域21的边界和区域23的边界之间的光源点作为光源点集合,此时,该光源点集合中包含32个光源点。For example, taking FIG. 2 as an example, when the interval between two adjacent light source points in the same row is used as the preset distance to determine the boundary of the next area, the boundary between the boundary of the area 21 and the boundary of the area 22 can be selected. The light source point of , as the light source point set, at this time, the light source point set contains 12 light source points; when the interval between the three adjacent light source points in the same row is used as the preset distance to determine the boundary of the next area , the light source points between the boundary of the area 21 and the boundary of the area 23 may be selected as the light source point set, and at this time, the light source point set includes 32 light source points.
选定了下一个光源点集合之后,可以返回执行步骤202,以开始该光源点集合,并通过该光源点集合中的光源点向当前用户投射结构光,以使图像采集器能够获得新的第一图像。After selecting the next light source point set, you can return to step 202 to start the light source point set, and project structured light to the current user through the light source points in the light source point set, so that the image collector can obtain a new first light source point set. an image.
此处需要说明的是,在第二次及其之后每次选定光源点集合执行步骤202和203之后,仅执行步骤205及其后续步骤,而不在执行步骤204。It should be noted here that, after steps 202 and 203 are performed for the second and subsequent selected light source point sets, only step 205 and its subsequent steps are performed, and step 204 is not performed.
步骤208,将第一图像作为目标图像。Step 208, using the first image as the target image.
本实施例中,当匹配到目标授权人脸图像时,判定从第一图像中提取出完整的人脸图像,此时,将第一图像作为目标图像。In this embodiment, when a target authorized face image is matched, it is determined that a complete face image is extracted from the first image, and at this time, the first image is used as the target image.
步骤209,控制结构光发射器停止结构光的发射。Step 209, controlling the structured light emitter to stop the emission of structured light.
为了进一步降低电子装置的功耗,本实施例中,在判定从第一图像中提取出完整的人脸图像之后,电子装置可以控制结构光发射器停止结构光的发射。In order to further reduce the power consumption of the electronic device, in this embodiment, after determining that a complete face image is extracted from the first image, the electronic device can control the structured light emitter to stop emitting structured light.
本实施例的图像处理方法,通过按照从中间向四周方向延伸的方式,从第一区域的边界开始,根据预设的距离间隔确定下一区域的边界,逐步选取两个相邻区域的边界之间的光源点作为光源点集合,在拍摄过程中,连续选取光源点集合并开启光源点进行拍摄,在拍摄时可以控制结构光发射器每次仅投射较少数量的结构光,并可以分为多次进行投射,能够有效降低拍摄时的瞬时功耗,有利于散热,避免移动终端出现明显的发热现象。通过对每次拍摄的图像进行叠加得到第一图像,并判断第一图像中是否可提取出完整的人脸图像,并在提取出完整的人脸图像时,将第一图像作为目标图像,并控制结构光发射器停止结构光的发射,从而能够减少结构光的投射数量,降低电子装置的功耗。In the image processing method of this embodiment, the boundary of the next area is determined according to the preset distance interval, starting from the boundary of the first area, and the boundary of the two adjacent areas is gradually selected by extending from the middle to the surrounding direction. The light source points in between are used as the light source point set. During the shooting process, the light source point set is continuously selected and the light source point is turned on for shooting. During shooting, the structured light emitter can be controlled to project only a small amount of structured light each time, and can be divided into Performing multiple projections can effectively reduce the instantaneous power consumption during shooting, which is conducive to heat dissipation and avoids obvious heating of the mobile terminal. The first image is obtained by superimposing the images taken each time, and it is judged whether a complete face image can be extracted from the first image, and when the complete face image is extracted, the first image is used as the target image, and The structured light emitter is controlled to stop the emission of the structured light, so that the projected quantity of the structured light can be reduced and the power consumption of the electronic device can be reduced.
为了实现上述实施例,本发明还提出一种图像处理装置。In order to realize the above embodiments, the present invention also provides an image processing apparatus.
图4为本发明一实施例提出的图像处理装置的结构示意图,该图像处理装置用于电子装置中,该电子装置可以是手机、平板电脑等移动终端。4 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention. The image processing apparatus is used in an electronic apparatus, and the electronic apparatus may be a mobile terminal such as a mobile phone and a tablet computer.
如图4所示,该图像处理装置40包括:结构光发射器410、图像采集器420,以及处理器430。其中,As shown in FIG. 4 , the image processing apparatus 40 includes: a structured light emitter 410 , an image collector 420 , and a processor 430 . in,
结构光发射器410,用于向当前用户发射结构光。The structured light transmitter 410 is used for transmitting structured light to the current user.
图像采集器420,用于拍摄经当前用户调制的结构光图像。The image collector 420 is used for capturing the structured light image modulated by the current user.
处理器430,处理器430用于:A processor 430, the processor 430 is used to:
按照从第一区域向第一区域四周延伸的方向,连续从结构光发射器410中的光源阵列中选取一个光源点集合;其中,第一区域位于光源阵列的中心位置;According to the direction extending from the first area to the periphery of the first area, a light source point set is continuously selected from the light source array in the structured light emitter 410; wherein, the first area is located at the center of the light source array;
开启光源点集合;Open the light source point collection;
通过光源点集合向当前用户投射结构光并在投射完结构光之后关闭光源点集合;Project structured light to the current user through the light source point set and turn off the light source point set after projecting the structured light;
控制图像采集器420拍摄每次经当前用户调制的结构光图像并进行图像叠加,得到目标图像。The image collector 420 is controlled to capture the structured light image modulated by the current user each time and superimpose the images to obtain the target image.
具体地,处理器430选取光源点集合的过程可以包括:将第一区域内的光源点选取为光源点集合;在第一区域对应的光源点集合投射完结构光之后,按照从第一区域向第一区域四周延伸的方向,从第一区域的边界开始,根据预设的距离间隔确定下一区域的边界;逐步选取两个相邻区域的边界之间的光源点作为光源点集合。Specifically, the process of selecting the light source point set by the processor 430 may include: selecting the light source points in the first area as the light source point set; The direction extending around the first area starts from the boundary of the first area, and determines the boundary of the next area according to a preset distance interval; and gradually selects the light source points between the boundaries of two adjacent areas as the light source point set.
处理器430控制图像采集器420拍摄每次经当前用户调制的结构光图像并进行图像叠加,得到目标图像时,可以从第一次拍摄到结构光图像开始,将当前拍摄到的结构光图像与上一次得到的结构光图像进行图像叠加,得到第一图像,进而判断从第一图像中是否可提取出完整的人脸图像,并在能够提取出完整的人脸图像时,将第一图像作为目标图像。进一步地,在得到目标图像后,可以控制结构光发射器410停止结构光的发射。The processor 430 controls the image collector 420 to capture the structured light image modulated by the current user each time and superimpose the images to obtain the target image, starting from the structured light image captured for the first time, and combining the currently captured structured light image with the image. The structured light image obtained last time is superimposed to obtain a first image, and then it is judged whether a complete face image can be extracted from the first image, and when a complete face image can be extracted, the first image is used as target image. Further, after the target image is obtained, the structured light emitter 410 can be controlled to stop the emission of structured light.
具体地,处理器430判断从第一图像中是否可提取出完整的人脸图像的过程可以包括:从第一图像中提取包括面部特征的第二图像,将第二图像与存储在电子装置上的授权人脸图像进行匹配,如果匹配到目标授权人脸图像,则判定从第一图像中提取出完整的人脸图像。Specifically, the process of determining whether a complete face image can be extracted from the first image by the processor 430 may include: extracting a second image including facial features from the first image, and storing the second image with the electronic device on the electronic device The authorized face image is matched, and if the target authorized face image is matched, it is determined that a complete face image is extracted from the first image.
进一步地,处理器430可以从第二图像中提取面部器官的特征;将提取出的面部器官的特征与授权人脸图像中的面部器官的特征进行对比;当提取出的每个面部器官的特征与其中一个授权人脸图像中对应的面部器官的特征均一致时,则将其中一个授权人脸图像作为目标授权人脸图像。Further, the processor 430 can extract the features of the facial parts from the second image; compare the extracted features of the facial parts with the features of the facial parts in the authorized face image; when the extracted features of each facial part are When the features of the corresponding facial organs in one of the authorized face images are consistent, one of the authorized face images is used as the target authorized face image.
当电子装置当前处于锁定状态时,在匹配到目标授权人脸图像后,则解锁电子装置。When the electronic device is currently in a locked state, after matching the target authorized face image, the electronic device is unlocked.
需要说明的是,前述对图像处理方法实施例的解释说明也适用于该实施例的图像处理装置,其实现原理类似,此处不再赘述。It should be noted that, the foregoing explanations of the image processing method embodiments are also applicable to the image processing apparatus of this embodiment, and the implementation principles thereof are similar, which will not be repeated here.
本实施例的图像处理装置,通过按照从第一区域向第一区域四周延伸的方向,连续从结构光发射器中的光源阵列中选取一个光源点集合,开启光源点集合,通过光源点集合向当前用户投射结构光并在投射完结构光之后关闭光源点集合,控制图像采集器拍摄每次经当前用户调制的结构光图像并进行图像叠加,得到目标图像。由于在拍摄过程中按照从中间向四周方向延伸的方式选取光源点集合并开启光源点进行拍摄,在拍摄时可以控制结构光发射器每次仅投射较少数量的结构光,并可以分为多次进行投射。由于每次仅投射较少数量的结构光能够有效降低拍摄时的瞬时功耗,有利于散热,避免移动终端出现明显的发热现象,解决现有技术中开启所有光源点投射结构光导致移动终端的瞬时功耗较大的技术问题。进一步地,由于通过多次投射的方式可以覆盖到所有光源点,能够使得拍摄对象的成像完整,保证成像质量。The image processing apparatus of this embodiment selects a light source point set from the light source array in the structured light emitter continuously according to the direction extending from the first area to the periphery of the first area, starts the light source point set, and sends the light source point set to the light source point set. The current user projects the structured light and turns off the light source point set after projecting the structured light, and controls the image collector to capture the structured light image modulated by the current user each time and superimpose the images to obtain the target image. Since the light source point set is selected in the way of extending from the middle to the surrounding directions during the shooting process and the light source points are turned on for shooting, the structured light emitter can be controlled to project only a small amount of structured light each time during shooting, and can be divided into multiple light sources. to cast. Because only a small amount of structured light is projected each time, the instantaneous power consumption during shooting can be effectively reduced, which is conducive to heat dissipation, avoids obvious heating of the mobile terminal, and solves the problem of the mobile terminal in the prior art when all light sources are turned on to project structured light. The technical problem of large instantaneous power consumption. Further, since all light source points can be covered by means of multiple projections, the imaging of the photographed object can be completed and the imaging quality can be ensured.
为了实现上述实施例,本发明还提出一种电子装置。In order to realize the above embodiments, the present invention also provides an electronic device.
图5为本发明一实施例提出的电子装置的结构示意图。如图5所示,该电子装置50包括:一个或多个处理器501、存储器502和一个或多个程序503。其中,一个或多个程序503被存储在存储器502中,并且被配置成由一个或多个处理器501执行,程序503包括用于执行前述任一实施例所述的图像处理方法的指令。FIG. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. As shown in FIG. 5 , the electronic device 50 includes: one or more processors 501 , a memory 502 and one or more programs 503 . Wherein, one or more programs 503 are stored in the memory 502 and configured to be executed by one or more processors 501 , and the programs 503 include instructions for executing the image processing method described in any of the foregoing embodiments.
本发明实施例还提出一种终端,包括图像处理电路,图像处理电路可以利用硬件和/或软件组件实现,可包括定义ISP(Image Signal Processing,图像信号处理)管线的各种处理单元。图6为本发明一实施例提出的终端中的图像处理电路的结构示意图。为便于说明,如图6所示,仅示出与本发明实施例相关的图像处理技术的各个方面。An embodiment of the present invention further provides a terminal, including an image processing circuit, which may be implemented by hardware and/or software components, and may include various processing units that define an ISP (Image Signal Processing, image signal processing) pipeline. FIG. 6 is a schematic structural diagram of an image processing circuit in a terminal according to an embodiment of the present invention. For convenience of description, as shown in FIG. 6 , only various aspects of the image processing technology related to the embodiments of the present invention are shown.
如图6所示,图像处理电路110包括成像设备1110、ISP处理器1130和控制逻辑器1140。成像设备1110可包括具有一个或多个透镜1112、图像传感器1114的照相机和结构光发射器1116。结构光发射器1116将结构光投影至被测物。其中,该结构光图案可为激光条纹、格雷码、正弦条纹、或者,随机排列的散斑图案等。图像传感器1114捕捉投影至被测物形成的结构光图像,并将结构光图像发送至ISP处理器1130,由ISP处理器1130对结构光图像进行图像叠加得到目标图像。同时,图像传感器1114也可以捕捉被测物的色彩信息。当然,也可以由两个图像传感器1114分别捕捉被测物的结构光图像和色彩信息。As shown in FIG. 6 , the image processing circuit 110 includes an imaging device 1110 , an ISP processor 1130 and a control logic 1140 . Imaging device 1110 may include a camera with one or more lenses 1112, image sensor 1114, and structured light emitter 1116. The structured light emitter 1116 projects the structured light to the measured object. Wherein, the structured light pattern may be a laser stripe, a Gray code, a sinusoidal stripe, or a randomly arranged speckle pattern, or the like. The image sensor 1114 captures the structured light image projected onto the object to be measured, and sends the structured light image to the ISP processor 1130, and the ISP processor 1130 superimposes the structured light image to obtain the target image. At the same time, the image sensor 1114 can also capture the color information of the measured object. Of course, the structured light image and color information of the object to be measured can also be captured by the two image sensors 1114 respectively.
在ISP处理器1130接收到图像传感器1114捕捉到的被测物的色彩信息之后,可被测物的色彩信息对应的图像数据进行处理。ISP处理器1130对图像数据进行分析以获取可用于确定成像设备1110的一个或多个控制参数的图像统计信息。图像传感器1114可包括色彩滤镜阵列(如Bayer滤镜),图像传感器1114可获取用图像传感器1114的每个成像像素捕捉的光强度和波长信息,并提供可由ISP处理器1130处理的一组原始图像数据。After the ISP processor 1130 receives the color information of the measured object captured by the image sensor 1114, the image data corresponding to the color information of the measured object can be processed. The ISP processor 1130 analyzes the image data to obtain image statistics that can be used to determine one or more control parameters of the imaging device 1110 . Image sensor 1114 may include an array of color filters (eg, Bayer filters), image sensor 1114 may obtain light intensity and wavelength information captured with each imaging pixel of image sensor 1114 and provide a set of raw materials that may be processed by ISP processor 1130. image data.
ISP处理器1130按多种格式逐个像素地处理原始图像数据。例如,每个图像像素可具有8、10、12或14比特的位深度,ISP处理器1130可对原始图像数据进行一个或多个图像处理操作、收集关于图像数据的图像统计信息。其中,图像处理操作可按相同或不同的位深度精度进行。The ISP processor 1130 processes raw image data pixel by pixel in various formats. For example, each image pixel may have a bit depth of 8, 10, 12, or 14 bits, and the ISP processor 1130 may perform one or more image processing operations on the raw image data, collect image statistics about the image data. Among them, the image processing operations can be performed with the same or different bit depth precision.
ISP处理器1130还可从图像存储器1120接收像素数据。图像存储器1120可为存储器装置的一部分、存储设备、或电子设备内的独立的专用存储器,并可包括DMA(DirectMemory Access,直接存储器存取)特征。ISP processor 1130 may also receive pixel data from image memory 1120 . The image memory 1120 may be a part of a memory device, a storage device, or an independent dedicated memory within an electronic device, and may include a DMA (Direct Memory Access, direct memory access) feature.
当接收到原始图像数据时,ISP处理器1130可进行一个或多个图像处理操作。When raw image data is received, the ISP processor 1130 may perform one or more image processing operations.
目标图像的图像数据可发送给图像存储器1120,以便在被显示之前进行另外的处理。ISP处理器1130从图像存储器1120接收处理数据,并对所述处理数据进行原始域中以及RGB和YCbCr颜色空间中的图像数据处理。三维图像的图像数据可输出给显示器1160,以供用户观看和/或由图形引擎或GPU(Graphics Processing Unit,图形处理器)进一步处理。此外,ISP处理器1130的输出还可发送给图像存储器1120,且显示器1160可从图像存储器1120读取图像数据。在一个实施例中,图像存储器1120可被配置为实现一个或多个帧缓冲器。此外,ISP处理器1130的输出可发送给编码器/解码器1150,以便编码/解码图像数据。编码的图像数据可被保存,并在显示于显示器1160设备上之前解压缩。编码器/解码器1150可由CPU或GPU或协处理器实现。The image data for the target image may be sent to image memory 1120 for additional processing before being displayed. The ISP processor 1130 receives processed data from the image memory 1120 and performs image data processing in the original domain and in the RGB and YCbCr color spaces on the processed data. The image data of the three-dimensional image may be output to the display 1160 for viewing by the user and/or further processed by a graphics engine or a GPU (Graphics Processing Unit, graphics processor). In addition, the output of the ISP processor 1130 may also be sent to the image memory 1120 , and the display 1160 may read image data from the image memory 1120 . In one embodiment, image memory 1120 may be configured to implement one or more frame buffers. Also, the output of the ISP processor 1130 may be sent to the encoder/decoder 1150 for encoding/decoding the image data. The encoded image data can be saved and decompressed prior to display on the display 1160 device. The encoder/decoder 1150 may be implemented by a CPU or GPU or a coprocessor.
ISP处理器1130确定的图像统计信息可发送给控制逻辑器1140单元。控制逻辑器1140可包括执行一个或多个例程(如固件)的处理器和/或微控制器,一个或多个例程可根据接收的图像统计信息,确定成像设备1110的控制参数。The image statistics determined by the ISP processor 1130 may be sent to the control logic 1140 unit. Control logic 1140 may include a processor and/or microcontroller executing one or more routines (eg, firmware) that may determine control parameters of imaging device 1110 based on received image statistics.
运用图6中的图像处理技术,能够实现上述图像处理方法。Using the image processing technology in FIG. 6 , the above-mentioned image processing method can be realized.
为了实现上述实施例,本发明还提出一种计算机可读存储介质,包括与能够摄像的电子装置50结合使用的计算机程序,所述计算机程序可被处理器501执行以完成前述任一实施例所述的图像处理方法。In order to realize the above-mentioned embodiments, the present invention also provides a computer-readable storage medium, including a computer program used in conjunction with the electronic device 50 capable of taking a picture, and the computer program can be executed by the processor 501 to complete any of the above-mentioned embodiments. The described image processing method.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of this specification, description with reference to the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples", etc., mean specific features described in connection with the embodiment or example , structure, material or feature is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. 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, those skilled in the art may combine and combine the different embodiments or examples described in this specification, as well as the features of the different embodiments or examples, without conflicting each other.
此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本发明的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。In addition, the terms "first" and "second" are only used for descriptive purposes, and should not be construed as indicating or implying relative importance or implying the number of indicated technical features. Thus, a feature delimited with "first", "second" may expressly or implicitly include at least one of that feature. In the description of the present invention, "plurality" means at least two, such as two, three, etc., unless otherwise expressly and specifically defined.
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现定制逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本发明的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本发明的实施例所属技术领域的技术人员所理解。Any process or method description in the flowcharts or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing custom logical functions or steps of the process , and the scope of the preferred embodiments of the invention includes alternative implementations in which the functions may be performed out of the order shown or discussed, including performing the functions substantially concurrently or in the reverse order depending upon the functions involved, which should It is understood by those skilled in the art to which the embodiments of the present invention belong.
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。The logic and/or steps represented in flowcharts or otherwise described herein, for example, may be considered an ordered listing of executable instructions for implementing the logical functions, may be embodied in any computer-readable medium, For use with, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other system that can fetch instructions from and execute instructions from an instruction execution system, apparatus, or apparatus) or equipment. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport the program for use by or in connection with an instruction execution system, apparatus, or apparatus. More specific examples (non-exhaustive list) of computer readable media include the following: electrical connections with one or more wiring (electronic devices), portable computer disk cartridges (magnetic devices), random access memory (RAM), Read Only Memory (ROM), Erasable Editable Read Only Memory (EPROM or Flash Memory), Fiber Optic Devices, and Portable Compact Disc Read Only Memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program may be printed, as the paper or other medium may be optically scanned, for example, followed by editing, interpretation, or other suitable medium as necessary process to obtain the program electronically and then store it in computer memory.
应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。如,如果用硬件来实现和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that various parts of the present invention may be implemented in hardware, software, firmware or a combination thereof. In the above-described embodiments, 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, it can be implemented by any one of the following techniques known in the art, or a combination thereof: discrete with logic gates for implementing logic functions on data signals Logic circuits, application specific integrated circuits with suitable combinational logic gates, Programmable Gate Arrays (PGA), Field Programmable Gate Arrays (FPGA), etc.
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。Those skilled in the art can understand that all or part of the steps carried by the methods of the above embodiments can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium, and the program can be stored in a computer-readable storage medium. When executed, one or a combination of the steps of the method embodiment is included.
此外,在本发明各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing module, or each unit may exist physically alone, or two or more units may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium.
上述提到的存储介质可以是只读存储器,磁盘或光盘等。尽管上面已经示出和描述了本发明的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施例进行变化、修改、替换和变型。The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, and the like. Although the embodiments of the present invention have been shown and described above, it should be understood that the above-mentioned embodiments are exemplary and should not be construed as limiting the present invention. Embodiments are subject to variations, modifications, substitutions and variations.
Claims (9)
Priority Applications (5)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711021392.XA CN107800962B (en) | 2017-10-27 | 2017-10-27 | Image processing method, device and electronic device |
| CN201911101745.6A CN110798619B (en) | 2017-10-27 | 2017-10-27 | Image processing method and device and electronic device |
| EP18871067.7A EP3697078B1 (en) | 2017-10-27 | 2018-10-26 | Image processing method and device as well as electronic device |
| PCT/CN2018/112156 WO2019080934A1 (en) | 2017-10-27 | 2018-10-26 | Image processing method and device as well as electronic device |
| US16/856,526 US11315268B2 (en) | 2017-10-27 | 2020-04-23 | Image processing methods, image processing apparatuses and electronic devices |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711021392.XA CN107800962B (en) | 2017-10-27 | 2017-10-27 | Image processing method, device and electronic device |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201911101745.6A Division CN110798619B (en) | 2017-10-27 | 2017-10-27 | Image processing method and device and electronic device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN107800962A CN107800962A (en) | 2018-03-13 |
| CN107800962B true CN107800962B (en) | 2019-12-10 |
Family
ID=61547961
Family Applications (2)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201711021392.XA Expired - Fee Related CN107800962B (en) | 2017-10-27 | 2017-10-27 | Image processing method, device and electronic device |
| CN201911101745.6A Active CN110798619B (en) | 2017-10-27 | 2017-10-27 | Image processing method and device and electronic device |
Family Applications After (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201911101745.6A Active CN110798619B (en) | 2017-10-27 | 2017-10-27 | Image processing method and device and electronic device |
Country Status (1)
| Country | Link |
|---|---|
| CN (2) | CN107800962B (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP3697078B1 (en) * | 2017-10-27 | 2022-05-25 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Image processing method and device as well as electronic device |
| WO2020019704A1 (en) | 2018-07-27 | 2020-01-30 | Oppo广东移动通信有限公司 | Control system of structured light projector, and electronic device |
| CN109005370B (en) * | 2018-07-27 | 2020-07-03 | Oppo广东移动通信有限公司 | Control system and electronic device for structured light projector |
| CN111327836B (en) | 2020-03-20 | 2021-06-25 | 合肥埃科光电科技有限公司 | Camera exposure processing method and system |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102760234A (en) * | 2011-04-14 | 2012-10-31 | 财团法人工业技术研究院 | Depth image acquisition device, system and method |
| CN102780845A (en) * | 2012-06-14 | 2012-11-14 | 清华大学 | Light source alternate strobe synchronous camera shooting method and vision detection system |
| CN103838371A (en) * | 2012-11-21 | 2014-06-04 | 英飞凌科技股份有限公司 | Dynamic savings in imaging power |
| JP2015161776A (en) * | 2014-02-27 | 2015-09-07 | キヤノン株式会社 | Imaging system, light-emitting device, and focal point detection method |
| CN106900039A (en) * | 2017-02-24 | 2017-06-27 | 惠州市友联兴电子科技有限公司 | A kind of mobile phone display screen backlight subarea lighting method and device |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4823129B2 (en) * | 2007-04-13 | 2011-11-24 | キヤノン株式会社 | Camera system and interchangeable lens |
| CN102221553B (en) * | 2011-03-25 | 2013-05-01 | 上海交通大学 | Structured light-based high-speed detection system and method for railway fastener |
-
2017
- 2017-10-27 CN CN201711021392.XA patent/CN107800962B/en not_active Expired - Fee Related
- 2017-10-27 CN CN201911101745.6A patent/CN110798619B/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102760234A (en) * | 2011-04-14 | 2012-10-31 | 财团法人工业技术研究院 | Depth image acquisition device, system and method |
| CN102780845A (en) * | 2012-06-14 | 2012-11-14 | 清华大学 | Light source alternate strobe synchronous camera shooting method and vision detection system |
| CN103838371A (en) * | 2012-11-21 | 2014-06-04 | 英飞凌科技股份有限公司 | Dynamic savings in imaging power |
| JP2015161776A (en) * | 2014-02-27 | 2015-09-07 | キヤノン株式会社 | Imaging system, light-emitting device, and focal point detection method |
| CN106900039A (en) * | 2017-02-24 | 2017-06-27 | 惠州市友联兴电子科技有限公司 | A kind of mobile phone display screen backlight subarea lighting method and device |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107800962A (en) | 2018-03-13 |
| CN110798619A (en) | 2020-02-14 |
| CN110798619B (en) | 2021-04-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107820005B (en) | Image processing method, device and electronic device | |
| CN109068058B (en) | Shooting control method, device and electronic device in super night scene mode | |
| CN107800962B (en) | Image processing method, device and electronic device | |
| CN107563304B (en) | Terminal device unlocking method and device, and terminal device | |
| CN107395974B (en) | Image processing system and method | |
| CN107465906B (en) | Scene panorama shooting method, device and terminal device | |
| CN107483845B (en) | Photographing method and device | |
| US9092659B2 (en) | Subject determination apparatus that determines whether or not subject is specific subject | |
| CN108846807A (en) | Light efficiency processing method, device, terminal and computer readable storage medium | |
| CN107370951B (en) | Image processing system and method | |
| JP2005353010A (en) | Image processing apparatus and imaging apparatus | |
| CN108111768B (en) | Method, apparatus, electronic device, and computer-readable storage medium for controlling focus | |
| CN107493427A (en) | Focusing method and device for mobile terminal and mobile terminal | |
| CN107657652A (en) | Image processing method and device | |
| CN107493411B (en) | Image processing system and method | |
| US11315268B2 (en) | Image processing methods, image processing apparatuses and electronic devices | |
| CN107437268A (en) | Photographing method, device, mobile terminal and computer storage medium | |
| KR20090022710A (en) | Digital recording device, its control method and recording medium storing program for executing same | |
| CN109325905B (en) | Image processing method, image processing device, computer readable storage medium and electronic apparatus | |
| CN105744179A (en) | Image Capture Apparatus Capable of Processing Photographed Images | |
| CN107705356A (en) | Image processing method and device | |
| CN104935805B (en) | Image processing apparatus, image processing method and recording medium | |
| CN107493412B (en) | Image processing system and method | |
| CN107800963B (en) | Image processing method, image processing apparatus, electronic apparatus, and computer-readable storage medium | |
| CN107622192A (en) | Video picture processing method, device and mobile terminal |
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 | ||
| CB02 | Change of applicant information | ||
| CB02 | Change of applicant information |
Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd. |
|
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20191210 |