Projection device and automatic focusing method thereof

文档序号:1941766 发布日期:2021-12-07 浏览:5次 中文

阅读说明:本技术 一种投影装置及其自动对焦方法 (Projection device and automatic focusing method thereof ) 是由 余新 吴超 许擎栋 赵鹏 于 2020-06-02 设计创作,主要内容包括:本申请公开了一种投影装置及其自动对焦方法,所述方法中,通过对当前投影的虚焦画面图像进行频谱分析,然后根据当前虚焦画面图像的频谱信息获取当前虚焦光斑的频谱信息,当前虚焦光斑为当前虚焦画面图像的任意一像素点所形成的光斑,之后从预先存储的多个预设虚焦光斑的频谱信息中查找与当前虚焦光斑的频谱信息相匹配的频谱信息,以获得目标频谱信息,进而可以获取目标频谱信息对应的离焦距离,然后控制马达驱动镜头组移动目标离焦距离,以实现对焦,通过上述方式,本申请能够降低对焦过程的计算性能要求,提高自动对焦的效率以及自动对焦的响应速度。(The application discloses a projection device and an automatic focusing method thereof, in the method, by carrying out frequency spectrum analysis on a virtual focus picture image projected currently, then obtaining the frequency spectrum information of the current virtual focus light spot according to the frequency spectrum information of the current virtual focus picture image, the current virtual focus light spot is formed by any pixel point of the current virtual focus picture image, then the frequency spectrum information matched with the frequency spectrum information of the current virtual focus light spot is searched from the frequency spectrum information of a plurality of preset virtual focus light spots stored in advance, so as to obtain the target spectrum information and further obtain the defocus distance corresponding to the target spectrum information, and then controlling the motor to drive the lens group to move the target out-of-focus distance so as to realize focusing.)

1. An auto-focusing method of a projection device, comprising:

acquiring a projection picture image of the structured light pattern projected to a plane as a current virtual focus picture image;

performing spectrum analysis on the current virtual focus picture image to acquire first spectrum information of the current virtual focus picture image;

acquiring second frequency spectrum information of a current virtual focus light spot according to the first frequency spectrum information, wherein the current virtual focus light spot is formed by any pixel point of the current virtual focus picture image;

searching spectrum information matched with the second spectrum information from prestored spectrum information of a plurality of preset virtual focus light spots to obtain target spectrum information, wherein the spectrum information of each preset virtual focus light spot corresponds to an out-of-focus distance, and then obtaining the out-of-focus distance corresponding to the target spectrum information to further obtain a target out-of-focus distance;

and controlling a motor to drive the lens group to move the target out-of-focus distance so as to realize focusing.

2. The method according to claim 1, wherein the obtaining second spectrum information of the current virtual focus spot according to the first spectrum information comprises:

acquiring third spectral information of a preset clear picture image;

acquiring a first extreme value of the frequency spectrum of the current virtual focus image according to the first frequency spectrum information, and acquiring a second extreme value of the frequency spectrum of the preset clear image according to the third frequency spectrum information;

and acquiring second frequency spectrum information of the current virtual focus light spot according to the ratio of the second extreme value to the first extreme value.

3. The method of claim 1, wherein prior to acquiring the projection screen image after the structured light pattern is projected onto the plane, further comprising:

in a dark environment, sequentially projecting a plurality of preset virtual focus light spots to a plane;

acquiring each preset virtual focus light spot picture image;

carrying out spectrum analysis on each preset virtual focus light spot picture image to obtain spectrum information of each preset virtual focus light spot;

calculating the out-of-focus distance corresponding to each preset virtual focus light spot according to the frequency spectrum information of each preset virtual focus light spot, and establishing a corresponding relation between the frequency spectrum information of each preset virtual focus light spot and the out-of-focus distance corresponding to each preset virtual focus light spot;

and storing the frequency spectrum information of each preset virtual focus light spot and the corresponding defocus distance.

4. The method according to claim 3, wherein calculating the defocus distance corresponding to each virtual focus spot according to the spectrum information of each virtual focus spot comprises:

acquiring a light cone angle on a spatial light modulator, the size of the spatial light modulator and the size of a projection picture where a preset virtual focus light spot is located;

according to the formula omegaScreen·SScreen=ΩSLM·SSLMCalculating the light cone angle on the preset virtual focus light spot, wherein omegaScreenAngle of light cone, S, representing a predetermined virtual focal spotScreenRepresents the size, omega, of the projected picture in which the preset virtual focus spot is locatedSLMRepresenting the angle of cone of light, S, on a spatial light modulatorSLMRepresents the size of the spatial light modulator;

and calculating the corresponding defocusing distance of 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.

5. The method according to claim 4, wherein calculating the defocus distance corresponding to each virtual focus spot according to the spectrum information of each virtual focus spot and the light cone angle of the corresponding virtual focus spot comprises:

determining a Gaussian function for representing each preset virtual focus light spot according to the frequency spectrum information of each preset virtual focus light spot,

according to the formula omegaScreen·d=9πσ2And calculating the defocusing distance corresponding to each preset virtual focus light spot, wherein d represents the defocusing distance corresponding to the preset virtual focus light spot, and sigma represents the standard deviation of the Gaussian function corresponding to the preset virtual focus light spot.

6. A projection device, comprising:

the first acquisition module is used for acquiring a projection picture image after the structured light pattern is projected to a plane to serve as a current virtual focus picture image;

the analysis module is used for carrying out spectrum analysis on the current virtual focus picture image so as to obtain first spectrum information of the current virtual focus picture image;

a second obtaining module, configured to obtain 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 one pixel point of the current virtual focus image;

the third acquisition module is used for searching the frequency spectrum information matched with the second frequency spectrum information from the pre-stored frequency spectrum information of a plurality of preset virtual focus light spots to acquire target frequency spectrum information, wherein the frequency spectrum information of each preset virtual focus light spot corresponds to one defocus distance, and then acquiring the defocus distance corresponding to the target frequency spectrum information to further acquire the target defocus distance;

and the control module is used for controlling the motor to drive the lens group to move the target defocusing distance so as to realize focusing.

7. The projection device of claim 6, wherein the second acquisition module is specifically configured to:

acquiring third spectral information of a preset clear image;

acquiring a first extreme value of the frequency spectrum of the current virtual focus image according to the first frequency spectrum information, and acquiring a second extreme value of the frequency spectrum of a preset clear image according to the third frequency spectrum information;

and acquiring second frequency spectrum information of the current virtual focus light spot according to the ratio of the second extreme value to the first extreme value.

8. The projection device of claim 6, further comprising a computing module and a storage module;

the first acquisition module is further used for acquiring a plurality of preset virtual focus light spot picture images, and the preset virtual focus light spot pictures are formed by sequentially projecting a plurality of preset virtual focus light spots to a plane by the projection device in a dark environment;

the analysis module is further used for carrying out spectrum analysis on each preset virtual focus light spot picture image so as to obtain spectrum information of each preset virtual focus light spot;

the calculating module is used for calculating the out-of-focus distance corresponding to each preset virtual focus light spot according to the frequency spectrum information of each preset virtual focus light spot, and establishing the corresponding relation between the frequency spectrum information of each preset virtual focus light spot and the out-of-focus distance corresponding to each preset virtual focus light spot;

the storage module stores the frequency spectrum information of each preset virtual focus light spot and the corresponding defocus distance.

9. The projection device of claim 8, wherein the computing module is specifically configured to:

acquiring the size and the light cone angle of the spatial light modulator, and acquiring the size of a projection picture image where a preset virtual focus light spot is located;

according to the formula omegaScreen·SScreen=ΩSLM·SSLMCalculating the light cone angle of the preset virtual focus light spot, wherein omegaScreenAngle of light cone, S, representing a predetermined virtual focal spotScreenRepresents the size, omega, of the projected picture image in which the preset virtual focus spot is locatedSLMRepresenting the angle of cone of light, S, of a spatial light modulatorSLMRepresents the size of the spatial light modulator;

and calculating the corresponding defocusing distance of 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 corresponding to the preset virtual focus light spot.

10. The projection device of claim 9, wherein the computing module is specifically configured to:

determining a Gaussian function for representing each preset virtual focus light spot according to the frequency spectrum information of each preset virtual focus light spot,

according to the formula omegaScreen·d=9πσ2And calculating the defocusing distance corresponding to each preset virtual focus light spot, wherein d represents the defocusing distance corresponding to the preset virtual focus light spot, and sigma represents the standard deviation of the Gaussian function corresponding to the preset virtual focus light spot.

Technical Field

The present disclosure relates to the field of projection technologies, and in particular, to a projection apparatus and an auto-focusing method thereof.

Background

In the using process of the projector, due to different using scenes, the distance between the projector and the projection plane is also different, and in order to obtain a clearer projection picture image, the focal length of the lens group is generally adjusted correspondingly.

The existing focusing method usually adopts contrast focusing to realize automatic focusing, that is, a small range area of a virtual focus projection picture image is captured, the original contrast of an image area contained in the small range area is higher, for example, a color block edge area, and as the virtual focus can reduce the contrast of the image, the position of a lens group when the contrast of the image is maximum is found by calculating the contrast and driving a motor to move the lens group, thereby completing the automatic focusing.

However, in the above focusing method, the contrast of the image needs to be calculated continuously, and the motor is driven once every time a calculation result is obtained until the maximum contrast of the image is found, so that the calculation amount is large, the efficiency is low, the overshoot phenomenon is easy to occur, and the response time of the automatic focusing is increased.

Disclosure of Invention

The projection device and the automatic focusing method thereof can reduce the calculation performance requirement of the focusing process, and improve the automatic focusing efficiency and the automatic focusing response speed.

The embodiment of the application provides an automatic focusing method of a projection device, which comprises the following steps:

acquiring a projection picture image of the structured light pattern projected to a plane as a current virtual focus picture image;

performing spectrum analysis on the current virtual focus picture image to acquire first spectrum information of the current virtual focus picture image;

acquiring second frequency spectrum information of a current virtual focus light spot according to the first frequency spectrum information, wherein the current virtual focus light spot is formed by any pixel point of the current virtual focus picture image;

searching spectrum information matched with the second spectrum information from prestored spectrum information of a plurality of preset virtual focus light spots to obtain target spectrum information, wherein the spectrum information of each preset virtual focus light spot corresponds to an out-of-focus distance, and then obtaining the out-of-focus distance corresponding to the target spectrum information to further obtain a target out-of-focus distance;

and controlling a motor to drive the lens group to move the target out-of-focus distance so as to realize focusing.

An embodiment of the present application further provides a projection apparatus, including:

the first acquisition module is used for acquiring a projection picture image after the structured light pattern is projected to a plane to serve as a current virtual focus picture image;

the analysis module is used for carrying out spectrum analysis on the current virtual focus picture image so as to obtain first spectrum information of the current virtual focus picture image;

a second obtaining module, configured to obtain 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 one pixel point of the current virtual focus image;

the third acquisition module is used for searching the frequency spectrum information matched with the second frequency spectrum information from the pre-stored frequency spectrum information of a plurality of preset virtual focus light spots to acquire target frequency spectrum information, wherein the frequency spectrum information of each preset virtual focus light spot corresponds to one defocus distance, and then acquiring the defocus distance corresponding to the target frequency spectrum information to further acquire the target defocus distance;

and the control module is used for controlling the motor to drive the lens group to move the target defocusing distance so as to realize focusing.

In the automatic focusing method, the spectral analysis is carried out on the virtual focus picture image projected currently, then the spectral information of the current virtual focus light spot is obtained according to the spectral information of the current virtual focus picture image, the current virtual focus light spot is a light spot formed by any pixel point of the current virtual focus picture image, then the spectral information matched with the spectral information of the current virtual focus light spot is searched from the pre-stored spectral information of a plurality of preset virtual focus light spots to obtain the target spectral information, and further the defocusing distance corresponding to the target spectral information can be obtained, and then the motor is controlled to drive the lens group to move the target defocusing distance to realize focusing, so that the scheme directly obtains the defocusing distance of the current virtual focus picture image by carrying out the spectral analysis on the current virtual focus picture image, thereby the motor controls the lens group to move to the target position (namely the position after the target defocusing distance is moved) in one step to complete focusing, the lens group does not need to be controlled by a motor or the like step by step, so that the focusing efficiency can be greatly improved, the response rate of automatic focusing is favorably improved, the contrast calculation does not need to be carried out repeatedly, and the calculation performance requirement can be reduced.

Drawings

Fig. 1 is a schematic flowchart illustrating an auto-focusing method of a projection apparatus according to an embodiment of the present disclosure;

fig. 2 is a schematic structural diagram of a projection apparatus according to 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 with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

Referring to fig. 1, the auto-focusing method of the projection apparatus according to the embodiment of the present application includes the following steps:

and S1, acquiring a projection picture image of the structured light pattern projected behind the plane as a current virtual focus picture image.

When the projection device is turned on, the projection device projects the structured light to the plane, so that a picture of the structured light pattern is projected on the plane, namely a projected picture image of the structured light pattern projected behind the plane. In the embodiment of the application, the projection device is provided with a shooting mechanism for shooting a projection picture to obtain a projection picture image, and the obtained projection picture image is shot as a current virtual focus picture image.

The structured light pattern may be, for example, a cosine structured light pattern, or may be another structured light pattern having a simple spectrum and controllable frequency components. Cosine structured light is structured light in which the light intensity is distributed in a cosine manner in the horizontal direction.

And S2, performing spectrum analysis on the current virtual focus picture image to acquire first 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 a two-dimensional discrete Fourier transform of the image, and the spectral analysis of the image is to analyze the amplitude of the frequency spectrum of the image. Therefore, in the embodiment of the present application, the acquired first spectrum information includes an amplitude spectrum of the current virtual focus picture image.

And S3, acquiring second frequency spectrum information of the current virtual focus light spot according to the first frequency spectrum information, wherein the current virtual focus light spot is a light spot formed by any pixel point of the current virtual focus picture image.

The projection picture generates virtual focus, namely the projection picture generates blur, namely each pixel point in the virtual focus picture forms a light spot with the actual size larger than the pixel, and because the illumination of the projection range is relatively uniform, the expansion rule of the light spots formed by each pixel point is basically the same and the light spots are distributed in the form of Gaussian light spots. The virtual focus picture image can be obtained by convoluting a clear picture image through a convolution kernel with a certain size, the size of the convolution kernel is related to the defocusing degree of the virtual focus picture, the distribution form of the convolution kernel is related to the intensity distribution of the light beam, and the convolution kernel is a Gaussian kernel in general, that is, the virtual focus picture image is obtained by convoluting the clear picture image through the Gaussian kernel, and the virtual focus light spot is a Gaussian light spot, so that the virtual focus of the virtual focus picture image can be represented in a mathematical form as the convolution of the virtual focus light spot and the clear picture image, and further, the Gaussian light spot and the clear picture image are subjected to space-domain convolution.

As can be seen from the fourier analysis principle, the frequency spectrum of the result of the spatial convolution is equivalent to the product of the two frequency spectrums of the convolution, and therefore, the frequency spectrum of the virtual focus image is equal to the product of the frequency spectrum of the gaussian spot and the frequency spectrum of the clear image. Therefore, after the frequency spectrum information of the virtual focus picture image and the frequency spectrum information of the clear picture image are determined, the frequency spectrum information of the Gaussian spots can be reversely obtained.

Therefore, in step S1, the obtaining of the second spectrum information of the current virtual focal spot according to the first spectrum information may specifically include the following sub-steps:

(11) and acquiring third spectral information of the preset clear picture image.

In the embodiment of the present application, 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 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 may be preset, and the clear picture image is acquired during the focusing process and subjected to spectrum analysis to acquire the spectrum information of the clear picture image as third spectrum information.

(12) And acquiring a first extreme value of the frequency spectrum of the current virtual focus image according to the first frequency spectrum information, and acquiring a second extreme value of the frequency spectrum of the preset clear image according to the third frequency spectrum information.

Wherein the first extreme value and the second extreme value may be a maximum of the amplitude spectrum.

(13) And acquiring second frequency spectrum information of the current virtual focus light spot according to the ratio of the second extreme value to the first extreme value.

Therefore, the frequency spectrum information of the virtual focal spot, namely the second frequency spectrum information can be reversely estimated through the ratio of the first extreme value to the second extreme value.

S4, searching spectrum information matched with the second spectrum information from the prestored spectrum information of the plurality of preset virtual focus light spots to obtain target spectrum information, wherein the spectrum information of each preset virtual focus light spot corresponds to one defocus distance, and then obtaining the defocus distance corresponding to the target spectrum information to further obtain the target defocus distance.

Before step S4, the method further includes the following steps:

(21) and under a dark environment, sequentially projecting a plurality of preset virtual focus light spots to the plane.

The projection device can be controlled to project pixel points, and the position of the lens group is changed by moving the motor, so that different virtual focus light spots can be obtained.

(22) And acquiring each preset virtual focus light spot picture image.

And when a preset virtual focus light spot is projected, acquiring a preset virtual focus light spot picture image through a shooting mechanism.

(23) And carrying out spectrum analysis on each preset virtual focus light spot picture image to obtain the spectrum information of each preset virtual focus light spot.

(24) Calculating the out-of-focus distance corresponding to each preset virtual focus light spot according to the frequency spectrum information of each preset virtual focus light spot, and establishing the corresponding relation between the frequency spectrum information of each preset virtual focus light spot and the out-of-focus distance corresponding to each preset virtual focus light spot.

Specifically, the pixel points on the projection plane can be considered to be formed by converging a very small light cone, and the virtual focal light spot is a light spot formed after the pixel points are blurred, so that the virtual focal light spot is also formed by converging the light cone, and the expansion rule of the virtual focal light spot is related to the light cone opening angle. According to the principle of conservation of etendue, the flare angle of the light cone on the virtual focus light spot is determined by the size of the spatial light modulator, the flare angle of the light cone on the spatial light modulator, and the size of the projection picture where the preset virtual focus light spot is obtained. Therefore, the light cone angle on the spatial light modulator, the size of the spatial light modulator and the size of the projection picture where the preset virtual focus light spot is located are obtained firstly, and then the formula omega is obtainedScreen·SScreen=ΩSLM·SSLMCalculating the light cone angle on the preset virtual focus light spot, wherein omegaScreenAngle of light cone, S, representing a predetermined virtual focal spotScreenRepresents the size, omega, of the projected picture in which the preset virtual focus spot is locatedSLMRepresenting the angle of cone of light, S, on a spatial light modulatorsLMRepresenting the size of the spatial light modulator.

And then, calculating the corresponding defocusing distance of 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 spectrum information used for representing each preset virtual focus light spot is determined according to the spectrum information of each preset virtual focus light spotThen according to the formula omegaScreen·d=9πσ2And calculating the defocusing distance corresponding to each preset virtual focus light spot, wherein d represents the defocusing distance corresponding to the preset virtual focus light spot, and sigma represents the standard deviation of the Gaussian function corresponding to the preset virtual focus light spot.

(25) And storing the frequency spectrum information of each preset virtual focus light spot and the corresponding defocus distance.

By the method, the defocusing distances corresponding to a series of preset virtual focus light spots can be calculated, then the frequency spectrum information of each preset virtual focus light spot and the corresponding defocusing distance are stored, and the corresponding relation between the preset virtual focus light spots and the defocusing distances is established.

Thus, in step S4, after the second spectrum information of the current virtual focus spot is determined, by matching the second spectrum information with the spectrum information of a plurality of preset virtual focus spots stored in advance, when the second spectrum information matches with the spectrum information of one of the preset virtual focus spots, the defocus distance corresponding to the matched spectrum information is taken as the target defocus distance.

And S5, controlling the motor to drive the lens group to move the target out-of-focus distance so as to realize focusing.

Therefore, in the embodiment of the application, the defocusing distance of the current virtual focus image can be directly obtained by performing spectrum analysis on the current virtual focus image, so that the motor control lens group moves to the target position (namely, the position where the target is moved after the defocusing distance is moved) in one step to complete focusing, the motor does not need to control the lens group to move step by step, the focusing efficiency can be greatly improved, the response rate of automatic focusing is favorably improved, the contrast calculation does not need to be repeatedly performed, and the calculation performance requirement can be reduced.

Referring to fig. 2, an embodiment of the present application further provides a projection apparatus, which includes a first obtaining module 201, an analyzing module 202, a second obtaining module 203, a third obtaining module 204, and a control module 205.

The first acquiring module 201 may be, for example, a shooting mechanism, such as a camera, for acquiring a projection picture image after the structured light pattern is projected onto a plane, as a current virtual focus picture image.

When the projection device is turned on, the projection device projects the structured light to the plane, so that a picture of the structured light pattern is projected on the plane, namely a projected picture image of the structured light pattern projected behind the plane. The first obtaining module 201 obtains a projection image by shooting the projection image, and shoots the obtained projection image as a current virtual focus image.

The structured light pattern may be, for example, a cosine structured light pattern, or may be another structured light pattern having a simple spectrum and controllable frequency components. Cosine structured light is structured light in which the light intensity is distributed in a cosine manner in the horizontal direction.

The analysis module 202 is configured to perform spectrum analysis on the current virtual focus picture image to obtain first 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 a two-dimensional discrete Fourier transform of the image, and the spectral analysis of the image is to analyze the amplitude of the frequency spectrum of the image. Therefore, in the embodiment of the present application, the acquired first spectrum information includes an amplitude spectrum of the current virtual focus picture image.

The second obtaining module 203 is configured to obtain 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 one pixel point of the current virtual focus image.

The virtual focus picture image is obtained by performing Gaussian kernel convolution on the clear picture image, and the virtual focus light spots are Gaussian light spots, so that the virtual focus of the virtual focus picture image can be represented in a mathematical form as the convolution of the virtual focus light spots and the clear picture image, and further, the Gaussian light spots and the clear picture image are subjected to space-domain convolution. As can be seen from the fourier analysis principle, the frequency spectrum of the result of the spatial convolution is equivalent to the product of the two frequency spectrums of the convolution, and therefore, the frequency spectrum of the virtual focus image is equal to the product of the frequency spectrum of the gaussian spot and the frequency spectrum of the clear image. Therefore, after the frequency spectrum information of the virtual focus picture image and the frequency spectrum information of the clear picture image are determined, the frequency spectrum information of the Gaussian spots can be reversely obtained.

Therefore, the second obtaining module 203 is specifically configured to obtain third spectral information of a predetermined sharp image; and then acquiring a first extreme value of the frequency spectrum of the current virtual focus image according to the first frequency spectrum information, and acquiring a second extreme value of the frequency spectrum of the preset clear image according to the third frequency spectrum information, so as to acquire second frequency spectrum information of the current virtual focus light spot according to the ratio of the second extreme value to the first extreme value.

The third obtaining module 204 is configured to search, from the pre-stored spectrum information of the plurality of preset virtual focus light spots, spectrum information matched with the second spectrum information to obtain target spectrum information, where the spectrum information of each preset virtual focus light spot corresponds to a defocus distance, and then obtain a defocus distance corresponding to the target spectrum information, so as to obtain a target defocus distance.

Further, the projection apparatus further includes a calculation module 206 and a storage module 207. Before the third obtaining module 204 obtains the target spectrum information, the first obtaining module 201 is further configured to obtain a plurality of preset virtual focus light spot image images, where the preset virtual focus light spot images are images formed by sequentially projecting a plurality of preset virtual focus light spots to a plane by the projection apparatus in a dark environment. The analysis module 202 is further configured to perform spectrum analysis on each preset virtual focus light spot picture image to obtain spectrum information of each preset virtual focus light spot.

The calculating module 206 is configured to calculate the defocus distance corresponding to each preset virtual focus spot according to the spectrum information of each preset virtual focus spot, and establish a correspondence between the spectrum information of each preset virtual focus spot and the defocus distance corresponding to each preset virtual focus spot.

Specifically, the pixel points on the projection plane can be considered to be formed by converging a very small light cone, and the virtual focal light spot is a light spot formed after the pixel points are blurred, so that the virtual focal light spot is also formed by converging the light cone, and the expansion rule of the virtual focal light spot is related to the light cone opening angle. According to the principle of conservation of optical expansion, the light cone opening angle on the virtual focus light spot is determined by the size of the spatial light modulator, the light cone opening angle on the spatial light modulator and the projection picture where the preset virtual focus light spot is locatedThe size of the face determines. Therefore, the calculating module 206 is specifically configured to obtain the light cone angle on the spatial light modulator, the size of the spatial light modulator, and the size of the projection picture where the preset virtual focus light spot is located, and then obtain the size according to the formula ΩScreen·SScreen=ΩSLM·SSLMCalculating the light cone angle on the preset virtual focus light spot, wherein omegaScreenAngle of light cone, S, representing a predetermined virtual focal spotScreenRepresents the size, omega, of the projected picture in which the preset virtual focus spot is locatedSLMRepresenting the angle of cone of light, S, on a spatial light modulatorSLMRepresenting the size of the spatial light modulator.

Then, the calculating module 206 calculates the defocus distance corresponding to each preset virtual focus spot according to the spectrum information of each preset virtual focus spot and the light cone angle on the corresponding preset virtual focus spot. Specifically, a gaussian function for representing each preset virtual focus spot is determined according to the frequency spectrum information of each preset virtual focus spot, and then the formula omega is usedScreen·d=9πσ2And calculating the defocusing distance corresponding to each preset virtual focus light spot, wherein d represents the defocusing distance corresponding to the preset virtual focus light spot, and sigma represents the standard deviation of the Gaussian function corresponding to the preset virtual focus light spot.

The storage module 207 is configured to store the frequency spectrum information of each preset virtual focus light spot and the corresponding defocus distance.

Therefore, the third obtaining module 203 can search for the spectrum information matched with the second spectrum information from the prestored spectrum information of a plurality of preset virtual focus light spots to obtain the target spectrum information, and obtain the defocus distance corresponding to the target spectrum information to obtain the target defocus distance.

The control module 205 is used to control the motor to drive the lens group to move the target defocus distance to achieve focusing.

Therefore, in this embodiment, the defocus distance of the current virtual-focus image can be directly obtained by performing spectrum analysis on the current virtual-focus image, so that the motor control lens group moves to the target position (i.e., the position where the target is moved after the defocus distance is moved) in one step to complete focusing, and the motor does not need to control the lens group to move step by step, which can greatly improve focusing efficiency, facilitate improvement of the response rate of automatic focusing, and reduce the requirement on calculation performance without repeatedly performing contrast calculation.

The above embodiments are merely examples and are not intended to limit the scope of the present disclosure, and all modifications, equivalents, and flow charts using the contents of the specification and drawings of the present disclosure or those directly or indirectly applied to other related technical fields are intended to be included in the scope of the present disclosure.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:多屏投影显示系统的校正方法、装置、存储介质及设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类