WO2021244399A1 - Projection apparatus and automatic focusing method therefor - Google Patents

Projection apparatus and automatic focusing method therefor Download PDF

Info

Publication number
WO2021244399A1
WO2021244399A1 PCT/CN2021/096460 CN2021096460W WO2021244399A1 WO 2021244399 A1 WO2021244399 A1 WO 2021244399A1 CN 2021096460 W CN2021096460 W CN 2021096460W WO 2021244399 A1 WO2021244399 A1 WO 2021244399A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual focus
spectrum information
spot
preset virtual
frequency spectrum
Prior art date
Application number
PCT/CN2021/096460
Other languages
French (fr)
Chinese (zh)
Inventor
余新
吴超
许擎栋
赵鹏
Original Assignee
深圳光峰科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳光峰科技股份有限公司 filed Critical 深圳光峰科技股份有限公司
Publication of WO2021244399A1 publication Critical patent/WO2021244399A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/12Picture reproducers
    • H04N9/31Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]
    • H04N9/3141Constructional details thereof
    • H04N9/317Convergence or focusing systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/12Picture reproducers
    • H04N9/31Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]

Definitions

  • This application relates to the field of projection technology, in particular to a projection device and an automatic focusing method thereof.
  • the focal length of the lens group is generally adjusted accordingly.
  • Existing focusing methods usually use contrast focusing to achieve auto focusing, that is, to intercept a small area of the virtual focus projected image.
  • the small area contains the image area with high original contrast, such as the edge area of the color block. Because the virtual focus will reduce the contrast of the image, the contrast is calculated and the motor is driven to move the lens group to find the position of the lens group when the image contrast is the highest, so as to complete the autofocus.
  • the main technical problem to be solved by this application is to provide a projection device and an auto-focusing method thereof, which can reduce the calculation performance requirements of the focusing process, and improve the efficiency of auto-focusing and the response speed of auto-focusing.
  • An embodiment of the present application provides an automatic focusing method of a projection device, including:
  • the motor is controlled to drive the lens group to move the target defocus distance to achieve focusing.
  • An embodiment of the application also provides a projection device, including:
  • the first acquisition module is used to acquire the projected screen image after the structured light pattern is projected onto the plane as the current virtual focus screen image
  • the analysis module is configured to perform a frequency spectrum analysis on the current virtual focus picture image to obtain the first frequency spectrum information of the current virtual focus picture image;
  • a second acquisition module configured to acquire second spectrum information of a current virtual focus spot according to the first spectrum information, where the current virtual focus spot is a spot formed by any pixel of the current virtual focus picture image;
  • the third acquisition module is configured to search for spectrum information matching the second spectrum information from the pre-stored spectrum information of a plurality of preset virtual focus light spots to acquire target spectrum information, wherein each preset virtual focus light spot The frequency spectrum information corresponding to a defocus distance, and then the defocus distance corresponding to the target frequency spectrum information is obtained, and then the target defocus distance is obtained;
  • the control module is used to control the motor to drive the lens group to move the target defocus distance to achieve focusing.
  • the spectrum information of the current defocused light spot is obtained according to the spectrum information of the current defocused picture image, and the current defocused light spot is the current defocused picture image
  • the spectrum information of the multiple preset virtual focus spots stored in advance is searched for the spectrum information that matches the spectrum information of the current virtual focus spot to obtain the target spectrum information, which can then be obtained
  • the defocus distance corresponding to the target spectrum information and then control the motor to drive the lens group to move the target defocus distance to achieve focusing. Therefore, this solution directly obtains the defocus distance of the current virtual focus image by performing spectrum analysis on the current virtual focus image.
  • the motor controls the lens group to move to the target position in one step (that is, the position after moving the target defocus distance) to complete focusing, without the need for the motor to control the movement of the lens group step by step, which can greatly improve the focusing efficiency and help improve The response rate of auto focus, and it does not need to do the contrast calculation repeatedly, which can reduce the calculation performance requirements.
  • FIG. 1 is a schematic flowchart of an automatic focusing method of a projection device provided by an embodiment of the present application
  • Fig. 2 is a schematic structural diagram of a projection device provided by an embodiment of the present application.
  • the automatic focusing method of the projection device of the embodiment of the present application includes the following steps:
  • the projection device When the projection device is turned on, the projection device projects structured light onto the plane, thereby projecting a picture of the structured light pattern on the plane, which is the projected picture image after the structured light pattern is projected onto the plane.
  • the projection device is provided with a photographing mechanism for photographing the projection screen to obtain the projection screen image, and the projection screen image obtained by the shooting is used as the current virtual focus screen image.
  • the structured light pattern may be, for example, a cosine structured light pattern, or may also be another structured light pattern with a simple frequency spectrum and controllable frequency components.
  • Cosine structured light is a structured light with a cosine distribution of light intensity in the horizontal direction.
  • the image is actually a two-dimensional matrix with spatial information.
  • the frequency spectrum of the image is its two-dimensional discrete Fourier transform.
  • the spectrum analysis of the image is the analysis of the amplitude of the image spectrum. Therefore, in this embodiment of the present application, the acquired first spectrum information includes the amplitude spectrum of the current virtual focus picture image.
  • the projection image produces a virtual focus, that is, the projection image is blurred, that is, each pixel in the virtual focus image forms a spot larger than the actual size of the pixel, and because the illuminance of the projection range is relatively uniform, each pixel is formed
  • the expansion law of the light spot is basically the same, and it is distributed in the form of a Gaussian light spot.
  • the virtual focus picture image can be considered as a clear picture image obtained by convolution of a certain size of convolution kernel, and the size of the convolution kernel is related to the degree of defocus of the virtual focus picture, and the distribution form of the convolution kernel is related to the intensity distribution of the beam.
  • the defocused picture image is a clear picture image obtained by Gaussian kernel convolution
  • the defocused light spot is a Gaussian light spot. Therefore, the virtual focus of the defocused picture image can be expressed in mathematical form as The convolution of the defocused light spot and the clear picture image, and further, the spatial convolution of the Gaussian light spot and the clear picture image.
  • the frequency spectrum of the result of spatial convolution is equivalent to the product of the two spectrums of the convolution. Therefore, the frequency spectrum of the imaginary image image is equal to the product of the Gaussian spot spectrum and the frequency spectrum of the clear image image. . Therefore, after determining the frequency spectrum information of the virtual focus picture image and the frequency spectrum information of the clear picture image, the spectrum information of the Gaussian spot can be obtained in reverse.
  • step S1 acquiring the second spectrum information of the current virtual focus spot according to the first spectrum information may specifically include the following sub-steps:
  • the predetermined clear picture image is a clear cosine structured light pattern picture image.
  • the spectrum information of a clear picture image can be pre-stored as the third spectrum information, so that the pre-stored third spectrum information of the clear picture image can be directly obtained; or a clear picture image can be preset to be used during the focusing process. Obtain the clear picture image and perform spectrum analysis on it to obtain the spectrum information of the clear picture image as the third spectrum information.
  • the first extreme value and the second extreme value may be the maximum value of the amplitude spectrum.
  • the spectrum information of the virtual focus spot that is, the second spectrum information
  • step S4 the following steps are further included:
  • the projection device can be controlled to perform pixel point projection, and the position of the lens group can be changed by moving the motor, so that different virtual focus spots can be obtained.
  • a picture image of the preset defocused light spot is acquired by the shooting mechanism.
  • the pixels on the projection plane can be considered to be formed by the convergence of a small light cone, and the virtual focus spot is the light spot formed after the pixel points are blurred. Therefore, the virtual focus light spot is also formed by the convergence of the light cone.
  • the spreading law of the light spot is related to the opening angle of the light cone. According to the principle of conservation of optical expansion, the opening angle of the light cone on the virtual focus spot is determined by the size of the spatial light modulator, the opening angle of the light cone on the spatial light modulator, and the size of the projection screen where the preset virtual focus spot is obtained.
  • the defocus distance corresponding to each preset virtual focus spot is calculated according to the frequency spectrum information of each preset virtual focus spot and the light cone opening angle on the corresponding preset virtual focus spot.
  • the defocus distance corresponding to a series of preset virtual focus spots can be calculated, and then the spectral information and the corresponding defocus distance of each preset virtual focus spot are stored, and the corresponding relationship between the two is established .
  • step S4 when the second spectrum information of the current virtual focus spot is determined, the second spectrum information is matched with the spectrum information of a plurality of preset virtual focus spots stored in advance, when the second spectrum information is When the spectrum information of one of the preset virtual focus spots is matched, the defocus distance corresponding to the matched spectrum information is taken as the target defocus distance.
  • the defocus distance of the current virtual focus picture image can be directly obtained, so that the motor control lens group can move to the target position in one step (that is, the moving target distance The position after the focal distance) to complete the focusing without the need for the motor to control the movement of the lens group step by step.
  • This can greatly improve the focusing efficiency and help improve the response rate of autofocus. There is no need to repeat the contrast calculation, which can reduce the calculation. Performance requirements.
  • an embodiment of the present application also provides a projection device, which includes a first acquisition module 201, an analysis module 202, a second acquisition module 203, a third acquisition module 204, and a control module 205.
  • the first acquisition module 201 may be, for example, a photographing mechanism, such as a camera, for acquiring a projection screen image after the structured light pattern is projected onto a plane, as the current virtual focus screen image.
  • a photographing mechanism such as a camera
  • the first acquisition module 201 acquires the projection screen image by shooting the projection screen, and the projection screen image obtained by shooting is used as the current virtual focus screen image.
  • the structured light pattern may be, for example, a cosine structured light pattern, or may also be another structured light pattern with a simple frequency spectrum and controllable frequency components.
  • Cosine structured light is a structured light with a cosine distribution of light intensity in the horizontal direction.
  • the analysis module 202 is configured to perform a frequency spectrum analysis on the current virtual focus picture image to obtain the first frequency spectrum information of the current virtual focus picture image.
  • the image is actually a two-dimensional matrix with spatial information.
  • the frequency spectrum of the image is its two-dimensional discrete Fourier transform.
  • the spectrum analysis of the image is the analysis of the amplitude of the image spectrum. Therefore, in this embodiment of the present application, the acquired first spectrum information includes the amplitude spectrum of the current virtual focus picture image.
  • the second acquisition module 203 is configured to acquire the second spectrum information of the current virtual focus light spot according to the first spectrum information, and the current virtual focus light spot is a light spot formed by any pixel of the current virtual focus picture image.
  • the defocused picture image is obtained by Gaussian kernel convolution of the clear picture image, and the defocused light spot is Gaussian light spot. Therefore, the virtual focus of the defocused picture image can be expressed as the convolution of the defocused light spot and the clear picture image in mathematical form. , Further speaking, perform spatial convolution for the Gaussian spot and the clear picture image. Among them, according to the Fourier analysis principle, the frequency spectrum of the result of spatial convolution is equivalent to the product of the two spectrums of the convolution. Therefore, the frequency spectrum of the imaginary image image is equal to the product of the Gaussian spot spectrum and the frequency spectrum of the clear image image. . Therefore, after determining the frequency spectrum information of the virtual focus picture image and the frequency spectrum information of the clear picture image, the spectrum information of the Gaussian spot can be obtained in reverse.
  • the second obtaining module 203 is specifically configured to obtain the third spectrum information of the predetermined clear image; then obtain the first extreme value of the current virtual focus image spectrum according to the first spectrum information, and obtain the predetermined clear image spectrum according to the third spectrum information According to the ratio of the second extreme value and the first extreme value, the second spectrum information of the current virtual focus spot is obtained.
  • the third acquiring module 204 is configured to search for spectrum information matching the second spectrum information from the pre-stored spectrum information of a plurality of preset virtual focus light spots, so as to acquire target spectrum information, wherein the frequency spectrum of each preset virtual focus light spot The information corresponds to a defocus distance, and then the defocus distance corresponding to the target spectrum information is obtained, and then the target defocus distance is obtained.
  • the projection device further includes a calculation module 206 and a storage module 207.
  • the first acquiring module 201 is also used to acquire a plurality of preset virtual focus spot picture images, and the multiple preset virtual focus spot pictures are the projection device in a dark environment, A picture formed by sequentially projecting a plurality of preset virtual focus light spots onto the plane.
  • the analysis module 202 is further configured to perform a spectrum analysis on the picture image of each preset virtual focus light spot, so as to obtain the frequency spectrum information of each preset virtual focus light spot.
  • the calculation module 206 is configured to calculate the defocus distance corresponding to each preset virtual focus light spot according to the frequency spectrum information of each preset virtual focus light spot, and establish that the frequency spectrum information of each preset virtual focus light spot corresponds to each preset virtual focus light spot Correspondence between the defocus distances.
  • the pixel points on the projection plane can be considered to be formed by the convergence of a small light cone, and the virtual focus spot is the light spot formed after the pixel points are blurred. Therefore, the virtual focus light spot is also formed by the convergence of the light cone.
  • the spreading law of the light spot is related to the opening angle of the light cone. According to the principle of conservation of optical expansion, the opening angle of the light cone on the virtual focus spot is determined by the size of the spatial light modulator, the opening angle of the light cone on the spatial light modulator, and the size of the projection screen where the preset virtual focus spot is obtained.
  • the calculation module 206 calculates the defocus distance corresponding to each preset virtual focus light spot according to the frequency spectrum information of each preset virtual focus light spot and the light cone opening angle on the corresponding preset virtual focus light spot.
  • the storage module 207 is configured to store the frequency spectrum information of each preset virtual focus spot and the corresponding defocus distance.
  • the third acquisition module 203 can search for spectrum information matching the second spectrum information from the spectrum information of a plurality of pre-stored preset virtual focus spots, so as to acquire the target spectrum information, and obtain the spectrum information corresponding to the target spectrum information. Focus distance to get the target defocus distance.
  • the control module 205 is used to control the motor-driven lens group to move the target defocus distance to achieve focusing.
  • the defocus distance of the current virtual focus image can be directly obtained, so that the motor-controlled lens group can move to the target position in one step (that is, the moving target is out of focus).
  • the position after the distance) to complete the focusing without the need for the motor to control the movement of the lens group step by step which can greatly improve the focusing efficiency and help improve the response rate of autofocus, and does not require repeated contrast calculations, which can reduce the calculation performance Require.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Automatic Focus Adjustment (AREA)
  • Projection Apparatus (AREA)
  • Transforming Electric Information Into Light Information (AREA)

Abstract

Disclosed in the present application are a projection apparatus and an automatic focusing method therefor. The method comprises: by performing spectrum analysis on a currently projected virtual focus picture image, acquiring spectrum information of a current virtual focal spot according to spectrum information of the current virtual focus picture image, the current virtual focal spot being a spot formed by any one pixel point of the current virtual focus picture image; afterwards, searching for spectrum information that matches the spectrum information of the current virtual focal spot from spectrum information of multiple prestored preset virtual focal spots, so as to obtain target spectrum information, then a defocus distance corresponding to the target spectrum information may be acquired, and then controlling a motor to drive a lens group to move a target defocus distance, so as to implement focusing. By the means of the foregoing, the present application can reduce the calculation performance requirements of a focusing process, increase the efficiency of automatic focusing and increase the response speed of automatic focusing.

Description

一种投影装置及其自动对焦方法Projection device and its automatic focusing method 技术领域Technical field
本申请涉及投影技术领域,特别是涉及一种投影装置及其自动对焦方法。This application relates to the field of projection technology, in particular to a projection device and an automatic focusing method thereof.
背景技术Background technique
投影机在使用过程中,由于使用场景的不同,投影机与投影面的距离也有所不同,为了获得更清晰的投影画面图像,一般要对镜头组的焦距进行相应的调节。During the use of the projector, the distance between the projector and the projection surface is also different due to the different use scenes. In order to obtain a clearer projection image, the focal length of the lens group is generally adjusted accordingly.
现有的调焦方式通常采用对比度对焦来实现自动对焦,即截取虚焦的投影画面图像的一小范围区域,该小范围区域所包含的图像区域原始对比度较高,例如为色块边缘区域,由于虚焦会降低图像的对比度,因此通过计算对比度,并通过驱动马达以移动镜头组,以寻找到图像对比度最大时镜头组所处的位置,从而完成自动对焦。Existing focusing methods usually use contrast focusing to achieve auto focusing, that is, to intercept a small area of the virtual focus projected image. The small area contains the image area with high original contrast, such as the edge area of the color block. Because the virtual focus will reduce the contrast of the image, the contrast is calculated and the motor is driven to move the lens group to find the position of the lens group when the image contrast is the highest, so as to complete the autofocus.
然而,上述对焦方式中,需要不断地进行图像对比度的计算,且每得到一个计算结果就要驱动一次马达,直至寻找到图像的最大对比度为止,如此不仅计算量大,效率低,且容易出现超调现象,增加自动对焦的响应时间。However, in the above focusing method, it is necessary to continuously calculate the image contrast, and each time a calculation result is obtained, the motor must be driven until the maximum contrast of the image is found. This is not only a large amount of calculation, low efficiency, and prone to overshoot. Adjust the phenomenon, increase the response time of auto focus.
发明内容Summary of the invention
本申请主要解决的技术问题是提供一种投影装置及其自动对焦方法,能够降低对焦过程的计算性能要求,提高自动对焦的效率以及自动对焦的响应速度。The main technical problem to be solved by this application is to provide a projection device and an auto-focusing method thereof, which can reduce the calculation performance requirements of the focusing process, and improve the efficiency of auto-focusing and the response speed of auto-focusing.
本申请实施例提供一种投影装置的自动对焦方法,包括:An embodiment of the present application provides an automatic focusing method of a projection device, including:
获取结构光图案投射到平面之后的投影画面图像,以作为当前虚焦画面图像;Obtain the projected picture image after the structured light pattern is projected onto the plane as the current virtual focus picture image;
对所述当前虚焦画面图像进行频谱分析,以获取当前虚焦画面图像的第一频谱信息;Performing frequency spectrum analysis on the current virtual focus picture image to obtain first frequency spectrum information of the current virtual focus picture image;
根据所述第一频谱信息获取当前虚焦光斑的第二频谱信息,所述当前虚焦光斑为所述当前虚焦画面图像的任意一像素点所形成的光斑;Acquiring second spectrum information of a current virtual focus light spot according to the first spectrum information, where the current virtual focus light spot is a light spot formed by any pixel of the current virtual focus picture image;
从预存储的多个预设虚焦光斑的频谱信息中查找与所述第二频谱信息相匹配的频谱信息,以获取目标频谱信息,其中每个预设虚焦光斑的频谱信息对应一个离焦距离,然后获取所述目标频谱信息对应的离焦距离,进而得到目标离焦距离;Search for spectrum information matching the second spectrum information from the pre-stored spectrum information of a plurality of preset virtual focus spots to obtain target spectrum information, wherein the spectrum information of each preset virtual focus spot corresponds to a defocus Distance, and then obtain the defocus distance corresponding to the target spectrum information, and then obtain the target defocus distance;
控制马达驱动镜头组移动所述目标离焦距离,以实现对焦。The motor is controlled to drive the lens group to move the target defocus distance to achieve focusing.
本申请实施例还提供一种投影装置,包括:An embodiment of the application also provides a projection device, including:
第一获取模块,用于获取结构光图案投射到平面之后的投影画面图像,以作为当前虚焦画面图像;The first acquisition module is used to acquire the projected screen image after the structured light pattern is projected onto the plane as the current virtual focus screen image;
分析模块,用于对所述当前虚焦画面图像进行频谱分析,以获取当前虚焦画面图像的第一频谱信息;The analysis module is configured to perform a frequency spectrum analysis on the current virtual focus picture image to obtain the first frequency spectrum information of the current virtual focus picture image;
第二获取模块,用于根据所述第一频谱信息获取当前虚焦光斑的第二频谱信息,所述当前虚焦光斑为所述当前虚焦画面图像的任意一像素点所形成的光斑;A second acquisition module, configured to acquire second spectrum information of a current virtual focus spot according to the first spectrum information, where the current virtual focus spot is a spot formed by any pixel of the current virtual focus picture image;
第三获取模块,用于从预存储的多个预设虚焦光斑的频谱信息中查找与所述第二频谱信息相匹配的频谱信息,以获取目标频谱信息,其中每个预设虚焦光斑的频谱信息对应一个离焦距离,然后获取所述目标频谱信息对应的离焦距离,进而得到目标离焦距离;The third acquisition module is configured to search for spectrum information matching the second spectrum information from the pre-stored spectrum information of a plurality of preset virtual focus light spots to acquire target spectrum information, wherein each preset virtual focus light spot The frequency spectrum information corresponding to a defocus distance, and then the defocus distance corresponding to the target frequency spectrum information is obtained, and then the target defocus distance is obtained;
控制模块,用于控制马达驱动镜头组移动所述目标离焦距离,以实现对焦。The control module is used to control the motor to drive the lens group to move the target defocus distance to achieve focusing.
本申请的自动对焦方法中,通过对当前投影的虚焦画面图像进行频谱分析,然后根据当前虚焦画面图像的频谱信息获取当前虚焦光斑的频谱信息,当前虚焦光斑为当前虚焦画面图像的任意一像素点所形成的光斑,之后从预先存储的多个预设虚焦光斑的频谱信息中查找与当前虚焦光斑的频谱信息相匹配的频谱信息,以获得目标频谱信息,进而可以获取目标频谱信息对应的离焦距离,然后控制马达驱动镜头组移动目标离焦距离,以实现对焦,因此本方案通过对当前虚焦画面图像进行频谱分析,直接得到当前虚焦画面图像的离焦距离,从而使马达控制镜头组一 步到位移动到目标位置(即移动目标离焦距离后所在的位置)来完成对焦,而不需要使马达亦步亦趋地控制镜头组移动,可以大大提高对焦效率,有利于提高自动对焦的响应速率,且不需要反复地做对比度计算,可以降低计算性能要求。In the auto-focusing method of the present application, spectrum analysis is performed on the currently projected defocused picture image, and then the spectrum information of the current defocused light spot is obtained according to the spectrum information of the current defocused picture image, and the current defocused light spot is the current defocused picture image For the spot formed by any one pixel point, the spectrum information of the multiple preset virtual focus spots stored in advance is searched for the spectrum information that matches the spectrum information of the current virtual focus spot to obtain the target spectrum information, which can then be obtained The defocus distance corresponding to the target spectrum information, and then control the motor to drive the lens group to move the target defocus distance to achieve focusing. Therefore, this solution directly obtains the defocus distance of the current virtual focus image by performing spectrum analysis on the current virtual focus image. , So that the motor controls the lens group to move to the target position in one step (that is, the position after moving the target defocus distance) to complete focusing, without the need for the motor to control the movement of the lens group step by step, which can greatly improve the focusing efficiency and help improve The response rate of auto focus, and it does not need to do the contrast calculation repeatedly, which can reduce the calculation performance requirements.
附图说明Description of the drawings
图1是本申请实施例提供的投影装置的自动对焦方法的流程示意图;FIG. 1 is a schematic flowchart of an automatic focusing method of a projection device provided by an embodiment of the present application;
图2是本申请实施例提供的投影装置的结构示意图。Fig. 2 is a schematic structural diagram of a projection device provided by an embodiment of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,均属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
参阅图1,本申请实施例的投影装置的自动对焦方法中,包括以下步骤:Referring to FIG. 1, the automatic focusing method of the projection device of the embodiment of the present application includes the following steps:
S1、获取结构光图案投射到平面之后的投影画面图像,以作为当前虚焦画面图像。S1. Obtain a projection screen image after the structured light pattern is projected onto a plane, and use it as a current virtual focus screen image.
当投影装置开启后,投影装置向平面投射结构光,从而在平面上投影出结构光图案的画面,该画面即结构光图案投射到平面之后的投影画面图像。本申请实施例中,投影装置中设置有拍摄机构,用于对投影画面进行拍摄,以获取投影画面图像,拍摄获得的投影画面图像作为当前虚焦画面图像。When the projection device is turned on, the projection device projects structured light onto the plane, thereby projecting a picture of the structured light pattern on the plane, which is the projected picture image after the structured light pattern is projected onto the plane. In the embodiment of the present application, the projection device is provided with a photographing mechanism for photographing the projection screen to obtain the projection screen image, and the projection screen image obtained by the shooting is used as the current virtual focus screen image.
其中,结构光图案例如可以是余弦结构光图案,或者也可以是具有简单频谱且频率成分可控的其他结构光图案。余弦结构光也即在水平方向上光强度呈余弦分布的结构光。Among them, the structured light pattern may be, for example, a cosine structured light pattern, or may also be another structured light pattern with a simple frequency spectrum and controllable frequency components. Cosine structured light is a structured light with a cosine distribution of light intensity in the horizontal direction.
S2、对当前虚焦画面图像进行频谱分析,以获取当前虚焦画面图像的第一频谱信息。S2. Perform frequency spectrum analysis on the current virtual focus picture image to obtain first frequency spectrum information of the current virtual focus picture image.
图像实际上是一个具有空间信息的二维矩阵,图像的频谱是其二维离散傅里叶变换,对图像的频谱分析即是对图像频谱的幅值进行分析。 因此,本申请实施例中,所获取的第一频谱信息包括当前虚焦画面图像的幅值频谱。The image is actually a two-dimensional matrix with spatial information. The frequency spectrum of the image is its two-dimensional discrete Fourier transform. The spectrum analysis of the image is the analysis of the amplitude of the image spectrum. Therefore, in this embodiment of the present application, the acquired first spectrum information includes the amplitude spectrum of the current virtual focus picture image.
S3、根据第一频谱信息获取当前虚焦光斑的第二频谱信息,当前虚焦光斑为当前虚焦画面图像的任意一像素点所形成的光斑。S3. Acquire the second spectrum information of the current virtual focus spot according to the first spectrum information, where the current virtual focus spot is a spot formed by any pixel of the current virtual focus picture image.
投影画面产生虚焦也即投影画面产生了模糊,即在虚焦画面中每个像素点都形成了一个大于像素实际尺寸的光斑,且由于投影范围的照度相对均匀,因此每个像素点形成的光斑的扩展规律基本相同,为呈高斯光斑的形式分布。虚焦画面图像可以认为是清晰画面图像经过一定尺寸的卷积核卷积得到,而卷积核的尺寸与虚焦画面的离焦程度有关,卷积核的分布形式与光束的强度分布相关,一般情况下为高斯核,也就是说,虚焦画面图像为清晰画面图像经过高斯核卷积得到,而虚焦光斑为高斯光斑,因此,虚焦画面图像的虚焦在数学形式上可以表示为虚焦光斑与清晰画面图像进行的卷积,更进一步而言,为高斯光斑与清晰画面图像进行空域卷积。The projection image produces a virtual focus, that is, the projection image is blurred, that is, each pixel in the virtual focus image forms a spot larger than the actual size of the pixel, and because the illuminance of the projection range is relatively uniform, each pixel is formed The expansion law of the light spot is basically the same, and it is distributed in the form of a Gaussian light spot. The virtual focus picture image can be considered as a clear picture image obtained by convolution of a certain size of convolution kernel, and the size of the convolution kernel is related to the degree of defocus of the virtual focus picture, and the distribution form of the convolution kernel is related to the intensity distribution of the beam. In general, it is a Gaussian kernel, that is to say, the defocused picture image is a clear picture image obtained by Gaussian kernel convolution, and the defocused light spot is a Gaussian light spot. Therefore, the virtual focus of the defocused picture image can be expressed in mathematical form as The convolution of the defocused light spot and the clear picture image, and further, the spatial convolution of the Gaussian light spot and the clear picture image.
其中,根据傅里叶分析原理可知,空域卷积的结果,其频谱等价于卷积的双方频谱的乘积,因此,虚焦画面图像的频谱等于高斯光斑的频谱和清晰画面图像的频谱的乘积。由此,在确定虚焦画面图像的频谱信息和清晰画面图像的频谱信息后,可以反向得出高斯光斑的频谱信息。Among them, according to the Fourier analysis principle, the frequency spectrum of the result of spatial convolution is equivalent to the product of the two spectrums of the convolution. Therefore, the frequency spectrum of the imaginary image image is equal to the product of the Gaussian spot spectrum and the frequency spectrum of the clear image image. . Therefore, after determining the frequency spectrum information of the virtual focus picture image and the frequency spectrum information of the clear picture image, the spectrum information of the Gaussian spot can be obtained in reverse.
因此,步骤S1中,根据第一频谱信息获取当前虚焦光斑的第二频谱信息具体可以包括如下子步骤:Therefore, in step S1, acquiring the second spectrum information of the current virtual focus spot according to the first spectrum information may specifically include the following sub-steps:
(11)获取预定清晰画面图像的第三频谱信息。(11) Acquire the third frequency spectrum information of the predetermined clear picture image.
本申请实施例中,预定清晰画面图像为清晰的余弦结构光图案画面图像。其中,可以预先存储一清晰画面图像的频谱信息,作为第三频谱信息,从而可以直接获取预存储的清晰画面图像的第三频谱信息;或者也可以是预先设定一清晰画面图像,在对焦过程中获取该清晰画面图像并对其进行频谱分析,以获取该清晰画面图像的频谱信息,作为第三频谱信息。In the embodiment of the present application, the predetermined clear picture image is a clear cosine structured light pattern picture image. Among them, the spectrum information of a clear picture image can be pre-stored as the third spectrum information, so that the pre-stored third spectrum information of the clear picture image can be directly obtained; or a clear picture image can be preset to be used during the focusing process. Obtain the clear picture image and perform spectrum analysis on it to obtain the spectrum information of the clear picture image as the third spectrum information.
(12)根据第一频谱信息获取当前虚焦画面图像频谱的第一极值,以及根据第三频谱信息获取预定清晰画面图像频谱的第二极值。(12) Acquire the first extreme value of the spectrum of the current virtual-focus image according to the first frequency spectrum information, and acquire the second extreme value of the frequency spectrum of the predetermined clear image according to the third frequency spectrum information.
其中,第一极值和第二极值可以是幅值频谱的最大值。Wherein, the first extreme value and the second extreme value may be the maximum value of the amplitude spectrum.
(13)根据第二极值和第一极值的比值,获取当前虚焦光斑的第二频谱信息。(13) According to the ratio of the second extreme value to the first extreme value, obtain the second frequency spectrum information of the current virtual focus spot.
由此,通过第一极值和第二极值的比值,可以反向推测出虚焦光斑的频谱信息,即第二频谱信息。Thus, by using the ratio of the first extreme value and the second extreme value, the spectrum information of the virtual focus spot, that is, the second spectrum information, can be inferred backward.
S4、从预存储的多个预设虚焦光斑的频谱信息中查找与第二频谱信息相匹配的频谱信息,以获取目标频谱信息,其中每个预设虚焦光斑的频谱信息对应一个离焦距离,然后获取目标频谱信息对应的离焦距离,进而得到目标离焦距离。S4. Search for spectrum information matching the second spectrum information from the pre-stored spectrum information of a plurality of preset virtual focus spots to obtain target spectrum information, wherein the spectrum information of each preset virtual focus spot corresponds to a defocus Distance, and then obtain the defocus distance corresponding to the target spectrum information, and then obtain the target defocus distance.
其中,在步骤S4之前,还包括如下步骤:Wherein, before step S4, the following steps are further included:
(21)在黑暗环境下,向平面依次投射多个预设虚焦光斑。(21) In a dark environment, project a number of preset virtual focus spots on the plane in sequence.
其中,可以通过控制投影装置进行像素点投射,通过移动马达来改变镜头组的位置,从而可以获得不同的虚焦光斑。Among them, the projection device can be controlled to perform pixel point projection, and the position of the lens group can be changed by moving the motor, so that different virtual focus spots can be obtained.
(22)获取每个预设虚焦光斑画面图像。(22) Obtain the picture image of each preset virtual focus spot.
其中,每投射一个预设虚焦光斑,则通过拍摄机构获取预设虚焦光斑画面图像。Among them, each time a preset defocused light spot is projected, a picture image of the preset defocused light spot is acquired by the shooting mechanism.
(23)对每个预设虚焦光斑画面图像进行频谱分析,以获取每个预设虚焦光斑的频谱信息。(23) Perform frequency spectrum analysis on the picture image of each preset virtual focus light spot to obtain the frequency spectrum information of each preset virtual focus light spot.
(24)根据每个预设虚焦光斑的频谱信息计算每个预设虚焦光斑对应的离焦距离,建立每个预设虚焦光斑的频谱信息与每个预设虚焦光斑对应的离焦距离之间的对应关系。(24) Calculate the defocus distance corresponding to each preset virtual focus spot according to the spectral information of each preset virtual focus spot, and establish the spectral information of each preset virtual focus spot and the separation distance corresponding to each preset virtual focus spot. Correspondence between focal distances.
具体地,投影平面上的像素点可以认为是由一个很小的光锥汇聚而成,而虚焦光斑为像素点模糊后所形成的光斑,因此虚焦光斑也是由光锥汇聚形成,虚焦光斑的扩展规律与光锥张角有关。根据光学扩展量守恒原理可知,虚焦光斑上的光锥张角由空间光调制器的尺寸、空间光调制器上的光锥张角、以及获取预设虚焦光斑所在投影画面的尺寸决定。因此,首先获取获取空间光调制器上的光锥张角、空间光调制器的尺寸、以及获取预设虚焦光斑所在投影画面的尺寸,然后根据公式Ω Screen·S Screen=Ω SLM·S SLM,计算预设虚焦光斑上的光锥张角,其中Ω Screen表示预设 虚焦光斑的光锥张角,S Screen表示预设虚焦光斑所在的投影画面的尺寸,Ω SLM表示空间光调制器上的光锥张角,S SLM表示空间光调制器的尺寸。 Specifically, the pixels on the projection plane can be considered to be formed by the convergence of a small light cone, and the virtual focus spot is the light spot formed after the pixel points are blurred. Therefore, the virtual focus light spot is also formed by the convergence of the light cone. The spreading law of the light spot is related to the opening angle of the light cone. According to the principle of conservation of optical expansion, the opening angle of the light cone on the virtual focus spot is determined by the size of the spatial light modulator, the opening angle of the light cone on the spatial light modulator, and the size of the projection screen where the preset virtual focus spot is obtained. Therefore, first obtain the light cone opening angle on the spatial light modulator, the size of the spatial light modulator, and the size of the projection screen where the preset virtual focus spot is obtained, and then according to the formula Ω Screen ·S ScreenSLM ·S SLM , Calculate the light cone aperture angle on the preset virtual focus spot, where Ω Screen represents the light cone aperture angle of the preset virtual focus light spot, S Screen represents the size of the projection screen where the preset virtual focus light spot is located, and Ω SLM represents spatial light modulation The opening angle of the light cone on the sensor, S SLM represents the size of the spatial light modulator.
之后,根据每个预设虚焦光斑的频谱信息和对应预设虚焦光斑上的光锥张角,计算每个预设虚焦光斑对应的离焦距离。具体地,根据每个预设虚焦光斑的频谱信息确定用以表示每个预设虚焦光斑的高斯函数,然后根据公式Ω Screen·d=9πσ 2,计算每个预设虚焦光斑对应的离焦距离,其中d表示预设虚焦光斑对应的离焦距离,σ表示预设虚焦光斑对应的高斯函数的标准差。 Afterwards, the defocus distance corresponding to each preset virtual focus spot is calculated according to the frequency spectrum information of each preset virtual focus spot and the light cone opening angle on the corresponding preset virtual focus spot. Specifically, the Gaussian function representing each preset virtual focus spot is determined according to the frequency spectrum information of each preset virtual focus spot, and then according to the formula Ω Screen ·d=9πσ 2 , the corresponding value of each preset virtual focus spot is calculated Defocus distance, where d represents the defocus distance corresponding to the preset virtual focus spot, and σ represents the standard deviation of the Gaussian function corresponding to the preset virtual focus spot.
(25)存储每个预设虚焦光斑的频谱信息及各自对应的离焦距离。(25) Store the frequency spectrum information of each preset virtual focus spot and the corresponding defocus distance.
通过上述方式,可以计算出一系列预设虚焦光斑对应的离焦距离,然后将每个预设虚焦光斑的频谱信息和对应的离焦距离进行存储,并建立两者之间的对应关系。Through the above method, the defocus distance corresponding to a series of preset virtual focus spots can be calculated, and then the spectral information and the corresponding defocus distance of each preset virtual focus spot are stored, and the corresponding relationship between the two is established .
由此,在步骤S4中,当确定当前虚焦光斑的第二频谱信息后,通过将第二频谱信息与预先存储的多个预设虚焦光斑的频谱信息进行匹配,当第二频谱信息与其中一个预设虚焦光斑的频谱信息匹配时,则将匹配的频谱信息对应的离焦距离作为目标离焦距离。Therefore, in step S4, when the second spectrum information of the current virtual focus spot is determined, the second spectrum information is matched with the spectrum information of a plurality of preset virtual focus spots stored in advance, when the second spectrum information is When the spectrum information of one of the preset virtual focus spots is matched, the defocus distance corresponding to the matched spectrum information is taken as the target defocus distance.
S5、控制马达驱动镜头组移动目标离焦距离,以实现对焦。S5. Control the motor to drive the lens group to move the target defocus distance to achieve focusing.
因此,本申请实施例中,通过对当前虚焦画面图像进行频谱分析,从而可以直接得到当前虚焦画面图像的离焦距离,从而使马达控制镜头组一步到位移动到目标位置(即移动目标离焦距离后所在的位置)来完成对焦,而不需要使马达亦步亦趋地控制镜头组移动,可以大大提高对焦效率,有利于提高自动对焦的响应速率,且不需要反复地做对比度计算,可以降低计算性能要求。Therefore, in the embodiment of the present application, by performing spectrum analysis on the current virtual focus picture image, the defocus distance of the current virtual focus picture image can be directly obtained, so that the motor control lens group can move to the target position in one step (that is, the moving target distance The position after the focal distance) to complete the focusing without the need for the motor to control the movement of the lens group step by step. This can greatly improve the focusing efficiency and help improve the response rate of autofocus. There is no need to repeat the contrast calculation, which can reduce the calculation. Performance requirements.
参阅图2,本申请实施例还提供一种投影装置,包括第一获取模块201、分析模块202、第二获取模块203、第三获取模块204以及控制模块205。Referring to FIG. 2, an embodiment of the present application also provides a projection device, which includes a first acquisition module 201, an analysis module 202, a second acquisition module 203, a third acquisition module 204, and a control module 205.
其中,第一获取模块201例如可以是拍摄机构,如摄像头,用于获取结构光图案投射到平面之后的投影画面图像,以作为当前虚焦画面图像。Wherein, the first acquisition module 201 may be, for example, a photographing mechanism, such as a camera, for acquiring a projection screen image after the structured light pattern is projected onto a plane, as the current virtual focus screen image.
当投影装置开启后,投影装置向平面投射结构光,从而在平面上投影出结构光图案的画面,该画面即结构光图案投射到平面之后的投影画面图像。第一获取模块201则通过对投影画面进行拍摄,以获取投影画面图像,拍摄获得的投影画面图像作为当前虚焦画面图像。When the projection device is turned on, the projection device projects structured light onto the plane, thereby projecting a picture of the structured light pattern on the plane, which is the projected picture image after the structured light pattern is projected onto the plane. The first acquisition module 201 acquires the projection screen image by shooting the projection screen, and the projection screen image obtained by shooting is used as the current virtual focus screen image.
其中,结构光图案例如可以是余弦结构光图案,或者也可以是具有简单频谱且频率成分可控的其他结构光图案。余弦结构光也即在水平方向上光强度呈余弦分布的结构光。Among them, the structured light pattern may be, for example, a cosine structured light pattern, or may also be another structured light pattern with a simple frequency spectrum and controllable frequency components. Cosine structured light is a structured light with a cosine distribution of light intensity in the horizontal direction.
分析模块202用于对当前虚焦画面图像进行频谱分析,以获取当前虚焦画面图像的第一频谱信息。The analysis module 202 is configured to perform a frequency spectrum analysis on the current virtual focus picture image to obtain the first frequency spectrum information of the current virtual focus picture image.
图像实际上是一个具有空间信息的二维矩阵,图像的频谱是其二维离散傅里叶变换,对图像的频谱分析即是对图像频谱的幅值进行分析。因此,本申请实施例中,所获取的第一频谱信息包括当前虚焦画面图像的幅值频谱。The image is actually a two-dimensional matrix with spatial information. The frequency spectrum of the image is its two-dimensional discrete Fourier transform. The spectrum analysis of the image is the analysis of the amplitude of the image spectrum. Therefore, in this embodiment of the present application, the acquired first spectrum information includes the amplitude spectrum of the current virtual focus picture image.
第二获取模块203用于根据第一频谱信息获取当前虚焦光斑的第二频谱信息,当前虚焦光斑为当前虚焦画面图像的任意一像素点所形成的光斑。The second acquisition module 203 is configured to acquire the second spectrum information of the current virtual focus light spot according to the first spectrum information, and the current virtual focus light spot is a light spot formed by any pixel of the current virtual focus picture image.
虚焦画面图像为清晰画面图像经过高斯核卷积得到,而虚焦光斑为高斯光斑,因此,虚焦画面图像的虚焦在数学形式上可以表示为虚焦光斑与清晰画面图像进行的卷积,更进一步而言,为高斯光斑与清晰画面图像进行空域卷积。其中,根据傅里叶分析原理可知,空域卷积的结果,其频谱等价于卷积的双方频谱的乘积,因此,虚焦画面图像的频谱等于高斯光斑的频谱和清晰画面图像的频谱的乘积。由此,在确定虚焦画面图像的频谱信息和清晰画面图像的频谱信息后,可以反向得出高斯光斑的频谱信息。The defocused picture image is obtained by Gaussian kernel convolution of the clear picture image, and the defocused light spot is Gaussian light spot. Therefore, the virtual focus of the defocused picture image can be expressed as the convolution of the defocused light spot and the clear picture image in mathematical form. , Further speaking, perform spatial convolution for the Gaussian spot and the clear picture image. Among them, according to the Fourier analysis principle, the frequency spectrum of the result of spatial convolution is equivalent to the product of the two spectrums of the convolution. Therefore, the frequency spectrum of the imaginary image image is equal to the product of the Gaussian spot spectrum and the frequency spectrum of the clear image image. . Therefore, after determining the frequency spectrum information of the virtual focus picture image and the frequency spectrum information of the clear picture image, the spectrum information of the Gaussian spot can be obtained in reverse.
因此,第二获取模块203具体用于获取预定清晰图像的第三频谱信息;然后根据第一频谱信息获取当前虚焦画面图像频谱的第一极值,以及根据第三频谱信息获取预定清晰图像频谱的第二极值,从而根据所述第二极值和第一极值的比值,获取当前虚焦光斑的第二频谱信息。Therefore, the second obtaining module 203 is specifically configured to obtain the third spectrum information of the predetermined clear image; then obtain the first extreme value of the current virtual focus image spectrum according to the first spectrum information, and obtain the predetermined clear image spectrum according to the third spectrum information According to the ratio of the second extreme value and the first extreme value, the second spectrum information of the current virtual focus spot is obtained.
第三获取模块204用于从预存储的多个预设虚焦光斑的频谱信息中 查找与第二频谱信息相匹配的频谱信息,以获取目标频谱信息,其中每个预设虚焦光斑的频谱信息对应一个离焦距离,然后获取目标频谱信息对应的离焦距离,进而得到目标离焦距离。The third acquiring module 204 is configured to search for spectrum information matching the second spectrum information from the pre-stored spectrum information of a plurality of preset virtual focus light spots, so as to acquire target spectrum information, wherein the frequency spectrum of each preset virtual focus light spot The information corresponds to a defocus distance, and then the defocus distance corresponding to the target spectrum information is obtained, and then the target defocus distance is obtained.
进一步地,投影装置还包括计算模块206和存储模块207。其中,在第三获取模块204获取目标频谱信息之前,第一获取模块201还用于获取多个预设虚焦光斑画面图像,该多个预设虚焦光斑画面为投影装置在黑暗环境下,向平面依次投射多个预设虚焦光斑而形成的画面。分析模块202还用于对每个预设虚焦光斑画面图像进行频谱分析,以获取每个预设虚焦光斑的频谱信息。Further, the projection device further includes a calculation module 206 and a storage module 207. Wherein, before the third acquiring module 204 acquires the target spectrum information, the first acquiring module 201 is also used to acquire a plurality of preset virtual focus spot picture images, and the multiple preset virtual focus spot pictures are the projection device in a dark environment, A picture formed by sequentially projecting a plurality of preset virtual focus light spots onto the plane. The analysis module 202 is further configured to perform a spectrum analysis on the picture image of each preset virtual focus light spot, so as to obtain the frequency spectrum information of each preset virtual focus light spot.
计算模块206用于根据每个预设虚焦光斑的频谱信息计算每个预设虚焦光斑对应的离焦距离,建立每个预设虚焦光斑的频谱信息与每个预设虚焦光斑对应的离焦距离之间的对应关系。The calculation module 206 is configured to calculate the defocus distance corresponding to each preset virtual focus light spot according to the frequency spectrum information of each preset virtual focus light spot, and establish that the frequency spectrum information of each preset virtual focus light spot corresponds to each preset virtual focus light spot Correspondence between the defocus distances.
具体地,投影平面上的像素点可以认为是由一个很小的光锥汇聚而成,而虚焦光斑为像素点模糊后所形成的光斑,因此虚焦光斑也是由光锥汇聚形成,虚焦光斑的扩展规律与光锥张角有关。根据光学扩展量守恒原理可知,虚焦光斑上的光锥张角由空间光调制器的尺寸、空间光调制器上的光锥张角、以及获取预设虚焦光斑所在投影画面的尺寸决定。因此,计算模块206具体用于获取获取空间光调制器上的光锥张角、空间光调制器的尺寸、以及获取预设虚焦光斑所在投影画面的尺寸,然后根据公式Ω Screen·S Screen=Ω SLM·S SLM,计算预设虚焦光斑上的光锥张角,其中Ω Screen表示预设虚焦光斑的光锥张角,S Screen表示预设虚焦光斑所在的投影画面的尺寸,Ω SLM表示空间光调制器上的光锥张角,S SLM表示空间光调制器的尺寸。 Specifically, the pixel points on the projection plane can be considered to be formed by the convergence of a small light cone, and the virtual focus spot is the light spot formed after the pixel points are blurred. Therefore, the virtual focus light spot is also formed by the convergence of the light cone. The spreading law of the light spot is related to the opening angle of the light cone. According to the principle of conservation of optical expansion, the opening angle of the light cone on the virtual focus spot is determined by the size of the spatial light modulator, the opening angle of the light cone on the spatial light modulator, and the size of the projection screen where the preset virtual focus spot is obtained. Therefore, the calculation module 206 is specifically configured to obtain the aperture angle of the light cone on the spatial light modulator, the size of the spatial light modulator, and the size of the projection screen where the preset virtual focus spot is located, and then according to the formula Ω Screen ·S Screen = Ω SLM · S SLM , calculate the light cone opening angle on the preset virtual focus spot, where Ω Screen represents the light cone opening angle of the preset virtual focus light spot, S Screen represents the size of the projection screen where the preset virtual focus light spot is located, Ω SLM represents the opening angle of the light cone on the spatial light modulator, and S SLM represents the size of the spatial light modulator.
之后,计算模块206根据每个预设虚焦光斑的频谱信息和对应预设虚焦光斑上的光锥张角,计算每个预设虚焦光斑对应的离焦距离。具体地,根据每个预设虚焦光斑的频谱信息确定用以表示每个预设虚焦光斑的高斯函数,然后根据公式Ω Screen·d=9πσ 2,计算每个预设虚焦光斑对应的离焦距离,其中d表示预设虚焦光斑对应的离焦距离,σ表示预设虚焦光斑对应的高斯函数的标准差。 After that, the calculation module 206 calculates the defocus distance corresponding to each preset virtual focus light spot according to the frequency spectrum information of each preset virtual focus light spot and the light cone opening angle on the corresponding preset virtual focus light spot. Specifically, the Gaussian function representing each preset virtual focus spot is determined according to the frequency spectrum information of each preset virtual focus spot, and then according to the formula Ω Screen ·d=9πσ 2 , the corresponding value of each preset virtual focus spot is calculated Defocus distance, where d represents the defocus distance corresponding to the preset virtual focus spot, and σ represents the standard deviation of the Gaussian function corresponding to the preset virtual focus spot.
存储模块207用于存储模块存储每个预设虚焦光斑的频谱信息及各自对应的离焦距离。The storage module 207 is configured to store the frequency spectrum information of each preset virtual focus spot and the corresponding defocus distance.
由此,第三获取模块203能够从预存储的多个预设虚焦光斑的频谱信息中查找与第二频谱信息相匹配的频谱信息,以获取目标频谱信息,并获取目标频谱信息对应的离焦距离,以得到目标离焦距离。Thus, the third acquisition module 203 can search for spectrum information matching the second spectrum information from the spectrum information of a plurality of pre-stored preset virtual focus spots, so as to acquire the target spectrum information, and obtain the spectrum information corresponding to the target spectrum information. Focus distance to get the target defocus distance.
控制模块205用于控制马达驱动镜头组移动目标离焦距离,以实现对焦。The control module 205 is used to control the motor-driven lens group to move the target defocus distance to achieve focusing.
因此,本实施例中,通过对当前虚焦画面图像进行频谱分析,从而可以直接得到当前虚焦画面图像的离焦距离,从而使马达控制镜头组一步到位移动到目标位置(即移动目标离焦距离后所在的位置)来完成对焦,而不需要使马达亦步亦趋地控制镜头组移动,可以大大提高对焦效率,有利于提高自动对焦的响应速率,且不需要反复地做对比度计算,可以降低计算性能要求。Therefore, in this embodiment, by performing spectrum analysis on the current virtual focus image, the defocus distance of the current virtual focus image can be directly obtained, so that the motor-controlled lens group can move to the target position in one step (that is, the moving target is out of focus). The position after the distance) to complete the focusing without the need for the motor to control the movement of the lens group step by step, which can greatly improve the focusing efficiency and help improve the response rate of autofocus, and does not require repeated contrast calculations, which can reduce the calculation performance Require.
以上仅为本申请的实施方式,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only implementations of this application, and do not limit the scope of this application. Any equivalent structure or equivalent process transformation made using the content of the description and drawings of this application, or directly or indirectly applied to other related technical fields, The same reasoning is included in the scope of patent protection of this application.

Claims (10)

  1. 一种投影装置的自动对焦方法,其特征在于,包括:An automatic focusing method of a projection device, characterized in that it comprises:
    获取结构光图案投射到平面之后的投影画面图像,以作为当前虚焦画面图像;Obtain the projected picture image after the structured light pattern is projected onto the plane as the current virtual focus picture image;
    对所述当前虚焦画面图像进行频谱分析,以获取当前虚焦画面图像的第一频谱信息;Performing frequency spectrum analysis on the current virtual focus picture image to obtain first frequency spectrum information of the current virtual focus picture image;
    根据所述第一频谱信息获取当前虚焦光斑的第二频谱信息,所述当前虚焦光斑为所述当前虚焦画面图像的任意一像素点所形成的光斑;Acquiring second spectrum information of a current virtual focus light spot according to the first spectrum information, where the current virtual focus light spot is a light spot formed by any pixel of the current virtual focus picture image;
    从预存储的多个预设虚焦光斑的频谱信息中查找与所述第二频谱信息相匹配的频谱信息,以获取目标频谱信息,其中每个预设虚焦光斑的频谱信息对应一个离焦距离,然后获取所述目标频谱信息对应的离焦距离,进而得到目标离焦距离;Search for spectrum information matching the second spectrum information from the pre-stored spectrum information of a plurality of preset virtual focus spots to obtain target spectrum information, wherein the spectrum information of each preset virtual focus spot corresponds to a defocus Distance, and then obtain the defocus distance corresponding to the target spectrum information, and then obtain the target defocus distance;
    控制马达驱动镜头组移动所述目标离焦距离,以实现对焦。The motor is controlled to drive the lens group to move the target defocus distance to achieve focusing.
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述第一频谱信息获取当前虚焦光斑的第二频谱信息,包括:The method according to claim 1, wherein the acquiring the second spectrum information of the current virtual focus spot according to the first spectrum information comprises:
    获取预定清晰画面图像的第三频谱信息;Acquiring third frequency spectrum information of a predetermined clear picture image;
    根据所述第一频谱信息获取当前虚焦画面图像频谱的第一极值,以及根据所述第三频谱信息获取预定清晰画面图像频谱的第二极值;Acquiring a first extreme value of a current virtual focus image frequency spectrum according to the first frequency spectrum information, and acquiring a second extreme value of a predetermined clear image image frequency spectrum according to the third frequency spectrum information;
    根据所述第二极值和第一极值的比值,获取所述当前虚焦光斑的第二频谱信息。According to the ratio of the second extremum to the first extremum, the second spectrum information of the current virtual focus spot is acquired.
  3. 根据权利要求1所述的方法,其特征在于,所述获取结构光图案投射到平面之后的投影画面图像之前,还包括:The method according to claim 1, characterized in that, before acquiring the projection screen image after the structured light pattern is projected onto the plane, the method further comprises:
    在黑暗环境下,向平面依次投射多个预设虚焦光斑;In a dark environment, project multiple preset virtual focus spots to the plane in sequence;
    获取每个预设虚焦光斑画面图像;Obtain the picture image of each preset virtual focus spot;
    对每个预设虚焦光斑画面图像进行频谱分析,以获取每个预设虚焦光斑的频谱信息;Perform spectrum analysis on the picture image of each preset virtual focus spot to obtain the spectrum information of each preset virtual focus spot;
    根据每个预设虚焦光斑的频谱信息计算每个预设虚焦光斑对应的离焦距离,建立每个预设虚焦光斑的频谱信息与每个预设虚焦光斑对应的离焦距离之间的对应关系;Calculate the defocus distance corresponding to each preset virtual focus spot according to the spectral information of each preset virtual focus spot, and establish the difference between the spectral information of each preset virtual focus spot and the defocus distance corresponding to each preset virtual focus spot Correspondence between;
    存储每个预设虚焦光斑的频谱信息及各自对应的离焦距离。Store the frequency spectrum information of each preset virtual focus spot and the corresponding defocus distance.
  4. 根据权利要求3所述的方法,其特征在于,所述根据每个预设虚焦光斑的频谱信息计算每个预设虚焦光斑对应的离焦距离,包括:The method according to claim 3, wherein the calculating the defocus distance corresponding to each preset virtual focus spot according to the frequency spectrum information of each preset virtual focus spot comprises:
    获取空间光调制器上的光锥张角、空间光调制器的尺寸、以及获取预设虚焦光斑所在投影画面的尺寸;Acquiring the light cone opening angle on the spatial light modulator, the size of the spatial light modulator, and acquiring the size of the projection screen where the preset virtual focus spot is located;
    根据公式Ω Screen·S Screen=Ω SLM·S SLM,计算预设虚焦光斑上的光锥张角,其中Ω Screen表示预设虚焦光斑的光锥张角,S Screen表示预设虚焦光斑所在的投影画面的尺寸,Ω SLM表示空间光调制器上的光锥张角,S SLM表示空间光调制器的尺寸; According to the formula Ω Screen ·S ScreenSLM ·S SLM , calculate the light cone aperture angle on the preset virtual focus spot, where Ω Screen represents the light cone aperture angle of the preset virtual focus light spot, and S Screen represents the preset virtual focus light spot The size of the projection screen where Ω SLM represents the opening angle of the light cone on the spatial light modulator, and S SLM represents the size of the spatial light modulator;
    根据每个预设虚焦光斑的频谱信息和对应预设虚焦光斑上的光锥张角,计算每个预设虚焦光斑对应的离焦距离。According to the frequency spectrum information of each preset virtual focus spot and the light cone opening angle on the corresponding preset virtual focus spot, the defocus distance corresponding to each preset virtual focus spot is calculated.
  5. 根据权利要求4所述的方法,其特征在于,所述根据每个预设虚焦光斑的频谱信息和对应预设虚焦光斑的光锥张角,计算每个预设虚焦光斑对应的离焦距离,包括:The method according to claim 4, characterized in that, according to the spectral information of each preset virtual focus spot and the light cone opening angle corresponding to the preset virtual focus spot, the distance corresponding to each preset virtual focus spot is calculated Focus distance, including:
    根据每个预设虚焦光斑的频谱信息确定用以表示每个预设虚焦光斑的高斯函数,Determine the Gaussian function representing each preset virtual focus spot according to the frequency spectrum information of each preset virtual focus spot,
    根据公式Ω Screen·d=9πσ 2,计算每个预设虚焦光斑对应的离焦距离,其中d表示预设虚焦光斑对应的离焦距离,σ表示预设虚焦光斑对应的高斯函数的标准差。 According to the formula Ω Screen ·d=9πσ 2 , calculate the defocus distance corresponding to each preset virtual focus spot, where d represents the defocus distance corresponding to the preset virtual focus spot, and σ represents the Gaussian function of the preset virtual focus spot. Standard deviation.
  6. 一种投影装置,其特征在于,包括:A projection device, characterized in that it comprises:
    第一获取模块,用于获取结构光图案投射到平面之后的投影画面图像,以作为当前虚焦画面图像;The first acquisition module is used to acquire the projected screen image after the structured light pattern is projected onto the plane as the current virtual focus screen image;
    分析模块,用于对所述当前虚焦画面图像进行频谱分析,以获取当前虚焦画面图像的第一频谱信息;The analysis module is configured to perform a frequency spectrum analysis on the current virtual focus picture image to obtain the first frequency spectrum information of the current virtual focus picture image;
    第二获取模块,用于根据所述第一频谱信息获取当前虚焦光斑的第二频谱信息,所述当前虚焦光斑为所述当前虚焦画面图像的任意一像素点所形成的光斑;A second acquisition module, configured to acquire second spectrum information of a current virtual focus spot according to the first spectrum information, where the current virtual focus spot is a spot formed by any pixel of the current virtual focus picture image;
    第三获取模块,用于从预存储的多个预设虚焦光斑的频谱信息中查找与所述第二频谱信息相匹配的频谱信息,以获取目标频谱信息,其中 每个预设虚焦光斑的频谱信息对应一个离焦距离,然后获取所述目标频谱信息对应的离焦距离,进而得到目标离焦距离;The third acquisition module is configured to search for spectrum information matching the second spectrum information from the pre-stored spectrum information of a plurality of preset virtual focus light spots to acquire target spectrum information, wherein each preset virtual focus light spot The frequency spectrum information corresponding to a defocus distance, and then the defocus distance corresponding to the target frequency spectrum information is obtained, and then the target defocus distance is obtained;
    控制模块,用于控制马达驱动镜头组移动所述目标离焦距离,以实现对焦。The control module is used to control the motor to drive the lens group to move the target defocus distance to achieve focusing.
  7. 根据权利要求6所述的投影装置,其特征在于,所述第二获取模块具体用于:The projection device according to claim 6, wherein the second acquisition module is specifically configured to:
    获取预定清晰图像的第三频谱信息;Acquiring third frequency spectrum information of a predetermined clear image;
    根据所述第一频谱信息获取当前虚焦画面图像频谱的第一极值,以及根据所述第三频谱信息获取预定清晰图像频谱的第二极值;Acquiring a first extreme value of a current virtual focus image frequency spectrum according to the first frequency spectrum information, and acquiring a second extreme value of a predetermined clear image frequency spectrum according to the third frequency spectrum information;
    根据所述第二极值和第一极值的比值,获取所述当前虚焦光斑的第二频谱信息。According to the ratio of the second extremum to the first extremum, the second spectrum information of the current virtual focus spot is acquired.
  8. 根据权利要求6所述的投影装置,其特征在于,还包括计算模块和存储模块;The projection device according to claim 6, further comprising a calculation module and a storage module;
    所述第一获取模块还用于获取多个预设虚焦光斑画面图像,所述多个预设虚焦光斑画面为投影装置在黑暗环境下,向平面依次投射多个预设虚焦光斑而形成的画面;The first acquisition module is also used to acquire a plurality of preset virtual focus spot screen images, the plurality of preset virtual focus spot images are generated by the projection device sequentially projecting a plurality of preset virtual focus spots onto a plane in a dark environment The picture formed;
    所述分析模块还用于对每个预设虚焦光斑画面图像进行频谱分析,以获取每个预设虚焦光斑的频谱信息;The analysis module is also used to perform spectrum analysis on the picture image of each preset virtual focus spot to obtain the frequency spectrum information of each preset virtual focus spot;
    所述计算模块用于根据每个预设虚焦光斑的频谱信息计算每个预设虚焦光斑对应的离焦距离,建立每个预设虚焦光斑的频谱信息与每个预设虚焦光斑对应的离焦距离之间的对应关系;The calculation module is used to calculate the defocus distance corresponding to each preset virtual focus light spot according to the frequency spectrum information of each preset virtual focus light spot, and establish the frequency spectrum information of each preset virtual focus light spot and each preset virtual focus light spot Correspondence between the corresponding defocus distances;
    所述存储模块存储每个预设虚焦光斑的频谱信息及各自对应的离焦距离。The storage module stores the frequency spectrum information of each preset virtual focus spot and the corresponding defocus distance.
  9. 根据权利要求8所述的投影装置,其特征在于,所述计算模块具体用于:The projection device according to claim 8, wherein the calculation module is specifically configured to:
    获取空间光调制器的尺寸和光锥张角,以及获取预设虚焦光斑所在投影画面图像的尺寸;Obtain the size and light cone opening angle of the spatial light modulator, and obtain the size of the projection screen image where the preset virtual focus spot is located;
    根据公式Ω Screen·S Screen=Ω SLM·S SLM,计算预设虚焦光斑的光锥张角,其中Ω Screen表示预设虚焦光斑的光锥张角,S Screen表示预设虚焦光斑所在的 投影画面图像的尺寸,Ω SLM表示空间光调制器的光锥张角,S SLM表示空间光调制器的尺寸; According to the formula Ω Screen ·S ScreenSLM ·S SLM , calculate the light cone opening angle of the preset virtual focus spot, where Ω Screen represents the light cone opening angle of the preset virtual focus light spot, and S Screen represents the preset virtual focus light spot. The size of the projected screen image, Ω SLM represents the light cone opening angle of the spatial light modulator, and S SLM represents the size of the spatial light modulator;
    根据每个预设虚焦光斑的频谱信息和对应预设虚焦光斑的光锥张角,计算每个预设虚焦光斑对应的离焦距离。According to the frequency spectrum information of each preset virtual focus spot and the light cone opening angle corresponding to the preset virtual focus spot, the defocus distance corresponding to each preset virtual focus spot is calculated.
  10. 根据权利要求9所述的投影装置,其特征在于,所述计算模块具体用于:The projection device according to claim 9, wherein the calculation module is specifically configured to:
    根据每个预设虚焦光斑的频谱信息确定用以表示每个预设虚焦光斑的高斯函数,Determine the Gaussian function representing each preset virtual focus spot according to the frequency spectrum information of each preset virtual focus spot,
    根据公式Ω Screen·d=9πσ 2,计算每个预设虚焦光斑对应的离焦距离,其中d表示预设虚焦光斑对应的离焦距离,σ表示预设虚焦光斑对应的高斯函数的标准差。 According to the formula Ω Screen ·d=9πσ 2 , calculate the defocus distance corresponding to each preset virtual focus spot, where d represents the defocus distance corresponding to the preset virtual focus spot, and σ represents the Gaussian function of the preset virtual focus spot. Standard deviation.
PCT/CN2021/096460 2020-06-02 2021-05-27 Projection apparatus and automatic focusing method therefor WO2021244399A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010488775.3A CN113766193A (en) 2020-06-02 2020-06-02 Projection device and automatic focusing method thereof
CN202010488775.3 2020-06-02

Publications (1)

Publication Number Publication Date
WO2021244399A1 true WO2021244399A1 (en) 2021-12-09

Family

ID=78782332

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/096460 WO2021244399A1 (en) 2020-06-02 2021-05-27 Projection apparatus and automatic focusing method therefor

Country Status (2)

Country Link
CN (1) CN113766193A (en)
WO (1) WO2021244399A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116339046A (en) * 2021-12-24 2023-06-27 深圳光峰科技股份有限公司 Focusing method of projection device and projection device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100128145A1 (en) * 2008-11-25 2010-05-27 Colvin Pitts System of and Method for Video Refocusing
US8072650B1 (en) * 2008-01-11 2011-12-06 Google Inc. Automated focus adjustment using a varying light pattern
CN106707674A (en) * 2015-11-17 2017-05-24 深圳市绎立锐光科技开发有限公司 Automatic focusing method of projection equipment and the projection equipment
CN108369649A (en) * 2015-12-18 2018-08-03 索尼公司 Focus detection
CN111010554A (en) * 2019-12-24 2020-04-14 成都极米科技股份有限公司 Projection processing method, projection processing device, projector and readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8072650B1 (en) * 2008-01-11 2011-12-06 Google Inc. Automated focus adjustment using a varying light pattern
US20100128145A1 (en) * 2008-11-25 2010-05-27 Colvin Pitts System of and Method for Video Refocusing
CN106707674A (en) * 2015-11-17 2017-05-24 深圳市绎立锐光科技开发有限公司 Automatic focusing method of projection equipment and the projection equipment
CN108369649A (en) * 2015-12-18 2018-08-03 索尼公司 Focus detection
CN111010554A (en) * 2019-12-24 2020-04-14 成都极米科技股份有限公司 Projection processing method, projection processing device, projector and readable storage medium

Also Published As

Publication number Publication date
CN113766193A (en) 2021-12-07

Similar Documents

Publication Publication Date Title
EP1348148B2 (en) Camera
US10755429B2 (en) Apparatus and method for capturing images using lighting from different lighting angles
EP3879172B1 (en) Machine vision based intelligent focusing method for a moving head lamp
WO2022057670A1 (en) Real-time focusing method, apparatus and system, and computer-readable storage medium
JP3907008B2 (en) Method and means for increasing the depth of field for a photograph
WO2021244399A1 (en) Projection apparatus and automatic focusing method therefor
WO2022036868A1 (en) Zoom projection method and projector
CN108292084B (en) Image projection apparatus
RU2389050C1 (en) Automatic focusing method
JP2000098301A (en) Optical system with enlarged depth of field
CN102752484A (en) Fast non-global uniform image shaking blur removal algorithm and system thereof
MXPA04005523A (en) Selective focus system for use in photography.
JP2020122827A (en) Projection display device
US20210190999A1 (en) Tunable acoustic gradient lens system utilizing amplitude adjustments for acquiring images focused at different z-heights
WO2021128600A1 (en) Two direction-based compensation method and device for projection thermal defocusing, and readable storage medium
CN116339046A (en) Focusing method of projection device and projection device
Sun et al. Binocular high dynamic range imaging system based on digital micromirror device
JP7414441B2 (en) Imaging device, method of controlling the imaging device, and program
CN118784807A (en) Projector automatic focusing method and device, projector, equipment and medium
CN117528240A (en) Full-pixel automatic focusing method, device, equipment and medium
Yamamoto et al. A Projector-Camera System Using Hybrid Pixels with Projection and Capturing Capabilities
CN117492164A (en) Automatic focusing system and method based on DLP (digital light processing) structured light and motor system
JP2016192621A (en) Imaging apparatus, image processing operation apparatus, and image processing method
CN115314688A (en) Focal length measuring method and device of DMD projection system and storage medium
CN102023459B (en) Method for accessorily detecting focal distance by utilizing flash lamp

Legal Events

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

Ref document number: 21817527

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21817527

Country of ref document: EP

Kind code of ref document: A1