WO2023083274A1 - Method for improving uneven light intensity of stripes, camera, storage medium, and program - Google Patents

Method for improving uneven light intensity of stripes, camera, storage medium, and program Download PDF

Info

Publication number
WO2023083274A1
WO2023083274A1 PCT/CN2022/131227 CN2022131227W WO2023083274A1 WO 2023083274 A1 WO2023083274 A1 WO 2023083274A1 CN 2022131227 W CN2022131227 W CN 2022131227W WO 2023083274 A1 WO2023083274 A1 WO 2023083274A1
Authority
WO
WIPO (PCT)
Prior art keywords
light intensity
value
stripes
rotation
depth camera
Prior art date
Application number
PCT/CN2022/131227
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 WO2023083274A1 publication Critical patent/WO2023083274A1/en

Links

Images

Classifications

    • G06T5/94
    • G06T5/90
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds

Abstract

The present application provides a method for improving uneven light intensity of stripes, a camera, a storage medium, and a program. The method comprises: forming grating stripes on a projection surface by using a structured light depth camera; taking a plurality of calibration points on a straight line which is perpendicular to the grating stripes, wherein the number of the calibration points is greater than the number of the grating stripes; and adjusting the rotation angle speed of a galvanometer of the structured light depth camera in a segmented manner according to a grayscale value of each calibration point. The accuracy of a subsequent image recognition result is improved.

Description

条纹光强不均匀的改善方法、相机、存储介质及程序Method for improving uneven light intensity of stripes, camera, storage medium and program
本申请要求于2021年11月10日提交中国专利局,申请号为202111329098.1,申请名称为“条纹光强不均匀的改善方法、装置、设备、介质及相机”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application submitted to the China Patent Office on November 10, 2021, with the application number 202111329098.1. The entire contents are incorporated by reference in this application.
技术领域technical field
本申请涉及光学相机技术领域,尤其涉及改善结构光深度相机光栅条纹光强不均匀的方法,具体涉及一种条纹光强不均匀的改善方法、相机、存储介质及程序。The present application relates to the technical field of optical cameras, in particular to a method for improving uneven light intensity of grating stripes in a structured light depth camera, and in particular to a method for improving uneven light intensity of stripes, a camera, a storage medium, and a program.
背景技术Background technique
结构光深度相机因为具有稳定的性能、较低的成本,使其在3D(三维)扫描、体感交互、手势识别等方面得以广泛的应用。Due to its stable performance and low cost, the structured light depth camera can be widely used in 3D (three-dimensional) scanning, somatosensory interaction, gesture recognition and other aspects.
在实现本申请构思的过程中,发明人发现现有结构光相机至少存在如下问题:环境光及反射率不完全一致,也会导致投影面上的光条纹的亮度不均匀。亮度不均匀性具体呈现为光栅条纹最亮部分的亮度是光栅条纹最暗部分亮度的3~4倍,其中,30%~40%的亮度不均匀性是由于光栅条纹移动不恒定造成的,剩余亮度不均匀性是由于环境光的影响,以及振镜以不同角度反射激光时反射率不完全一致造成的。亮度不均匀性会直接造成图像传感器采集的光栅条纹的亮度不均匀,直接影响后续的图像处理及分析结果。In the process of realizing the concept of the present application, the inventors found that the existing structured light cameras have at least the following problems: the ambient light and the reflectivity are not completely consistent, which will also lead to uneven brightness of the light stripes on the projection surface. The brightness unevenness is specifically manifested as the brightness of the brightest part of the grating stripe is 3 to 4 times the brightness of the darkest part of the grating stripe, of which 30% to 40% of the brightness unevenness is caused by the inconstant movement of the grating stripe, and the remaining The non-uniformity of brightness is due to the influence of ambient light and the inconsistency of the reflectivity when the galvanometer reflects the laser light at different angles. The uneven brightness will directly cause the uneven brightness of the grating stripes collected by the image sensor, which will directly affect the subsequent image processing and analysis results.
因此,所属领域技术人员亟需研发一种条纹光强不均匀的改善方法,借以解决上述技术问题。Therefore, those skilled in the art urgently need to develop a method for improving the uneven light intensity of stripes, so as to solve the above technical problems.
发明内容Contents of the invention
有鉴于此,本申请要解决的技术问题在于提供一种条纹光强不均匀的改善方法、相机、存储介质及程序,解决了现有结构光深度相机的振镜以恒定的角速度转动,投影面上产生的条纹亮度不均匀,直接影响后续图像处理及分析结果的问题。In view of this, the technical problem to be solved in this application is to provide a method for improving the uneven light intensity of stripes, a camera, a storage medium and a program, which solve the problem that the vibrating mirror of the existing structured light depth camera rotates at a constant angular speed, and the projection surface The brightness of the stripes generated on the image is uneven, which directly affects the subsequent image processing and analysis results.
为了解决上述技术问题,本申请的提供一种条纹光强不均匀的改善方法, 包括:In order to solve the above technical problems, the present application provides a method for improving uneven light intensity of stripes, including:
采用结构光深度相机在投影面上形成光栅条纹;Using a structured light depth camera to form grating stripes on the projection surface;
在沿垂直于所述光栅条纹的直线上取多个标定点,其中,所述标定点的数量大于所述光栅条纹的数量;Taking a plurality of calibration points along a straight line perpendicular to the grating stripes, wherein the number of the calibration points is greater than the number of the grating stripes;
根据每个所述标定点的灰度值分段调整所述结构光深度相机的振镜的转动角速度。The rotational angular velocity of the vibrating mirror of the structured light depth camera is adjusted segmentally according to the gray value of each calibration point.
本申请的具体实施方式还提供一种结构光深度相机,包括:一个或多个处理器;存储装置,用于存储可执行指令,所述可执行指令在被所述处理器执行时,实现条纹光强不均匀的改善方法。The specific embodiment of the present application also provides a structured light depth camera, including: one or more processors; a storage device for storing executable instructions, and when the executable instructions are executed by the processors, the stripes are realized. Improvement method for uneven light intensity.
本申请的具体实施方式还提供一种计算机可读存储介质,其上存储有可执行指令,该可执行指令被处理器执行时实现条纹光强不均匀的改善方法。The specific embodiment of the present application also provides a computer-readable storage medium on which executable instructions are stored, and when the executable instructions are executed by a processor, a method for improving uneven light intensity of stripes is realized.
本申请的具体实施方式还提供一种计算机程序,上述计算机程序包括计算机可执行指令,该计算机可执行指令在被执行时用于实现条纹光强不均匀的改善方法。A specific embodiment of the present application further provides a computer program, the above-mentioned computer program includes computer-executable instructions, and the computer-executable instructions are used to implement a method for improving uneven light intensity of stripes when executed.
本申请,分段调整振镜的转动角速度,对光栅条纹亮度较暗的区域进行补偿,使得投影面上的光栅条纹的亮度均匀,可以至少部分地解决现有结构光深度相机(即光栅投影相机)的振镜以恒定的角速度转动,投影面上产生的光栅条纹亮度不均匀,直接影响后续图像处理及分析结果的问题,并因此可以实现投影面上产生的光栅条纹亮度均匀,提高图像处理及分析结果精度的技术效果。In this application, the rotational angular velocity of the galvanometer is adjusted in sections to compensate the darker areas of the grating stripes, so that the brightness of the grating stripes on the projection surface is uniform, which can at least partially solve the problem of existing structured light depth cameras (ie, grating projection cameras). ) of the galvanometer rotates at a constant angular velocity, and the brightness of the grating stripes generated on the projection surface is not uniform, which directly affects the subsequent image processing and analysis results. The technical effect of analyzing the precision of the results.
应了解的是,上述一般描述及以下具体实施方式仅为示例性及阐释性的,其并不能限制本申请所欲主张的范围。It should be understood that the above general description and the following specific embodiments are only exemplary and explanatory, and are not intended to limit the scope of the present application.
附图说明Description of drawings
下面的所附附图是本申请的说明书的一部分,其绘示了本申请的示例实施例,所附附图与说明书的描述一起用来说明本申请的原理。The accompanying drawings that follow are a part of the specification of this application, illustrate example embodiments of the application, and together with the description serve to explain the principles of the application.
图1为本申请提供的一种结构光深度相机的结构示意图;FIG. 1 is a schematic structural diagram of a structured light depth camera provided by the present application;
图2为本申请提供的一种条纹光强不均匀的改善方法的流程示意图;Fig. 2 is a schematic flow chart of a method for improving uneven light intensity of stripes provided by the present application;
图3为本申请提供的另一种条纹光强不均匀的改善方法的流程示意图;FIG. 3 is a schematic flow chart of another method for improving uneven light intensity of stripes provided by the present application;
图4为本申请提供的另一种条纹光强不均匀的改善方法的流程示意图;FIG. 4 is a schematic flow diagram of another method for improving uneven light intensity of stripes provided by the present application;
图5为本申请提供的另一种条纹光强不均匀的改善方法的流程示意图;Fig. 5 is a schematic flow chart of another method for improving uneven light intensity of stripes provided by the present application;
图6为本申请提供的一种结构光深度相机的结构示意图;FIG. 6 is a schematic structural diagram of a structured light depth camera provided by the present application;
图7为本申请提供的一种获取投影面上光栅条纹的多个标定点的示意图;FIG. 7 is a schematic diagram of multiple calibration points for obtaining grating stripes on the projection surface provided by the present application;
图8为本申请提供的一种多个标定点灰度值的示意图;Fig. 8 is a schematic diagram of a plurality of calibration point gray values provided by the present application;
图9为利用余弦曲线计算图8中多个标定点灰度值的极大值和极小值的示意图;Fig. 9 is a schematic diagram of using a cosine curve to calculate the maximum and minimum values of the gray values of multiple calibration points in Fig. 8;
图10A为对图9中的极大值和极小值筛选后,多个标定点对应的调制光强的示意图;Fig. 10A is a schematic diagram of the modulated light intensity corresponding to multiple calibration points after screening the maximum value and minimum value in Fig. 9;
图10B为不对图9中的极大值和极小值进行筛选,多个标定点对应的调制光强的示意图;Figure 10B is a schematic diagram of the modulated light intensity corresponding to multiple calibration points without screening the maximum and minimum values in Figure 9;
图11A为对图10A中的调制光强进行聚类,得到多个聚类中心值的示意图;Fig. 11A is a schematic diagram of clustering the modulated light intensities in Fig. 10A to obtain multiple cluster center values;
图11B为对图10B中的调制光强进行聚类,得到多个聚类中心值的示意图;Fig. 11B is a schematic diagram of clustering the modulated light intensities in Fig. 10B to obtain multiple cluster center values;
图12A为根据图11A获得的比值,分段调整振镜的转动角速度,得到多个标定点灰度值的示意图;Fig. 12A is a schematic diagram of adjusting the rotational angular velocity of the vibrating mirror in sections according to the ratio obtained in Fig. 11A to obtain gray values of multiple calibration points;
图12B为根据图11B获得的比值,分段调整振镜的转动角速度,得到多个标定点灰度值的示意图。FIG. 12B is a schematic diagram of adjusting the rotational angular velocity of the vibrating mirror in sections according to the ratio obtained in FIG. 11B to obtain gray values of multiple calibration points.
附图标记说明:Explanation of reference signs:
1  激光器              2  鲍威尔透镜1 Laser Laser 2 Powell Lens
3  振镜                4  图像传感器3 Galvanometer 4 Image Sensor
5  图像处理器          10 激光发射器5 Image Processor 10 Laser Transmitter
20 透镜                30 振镜20 lens 30 vibrating mirror
40 图像采集器          50 图像处理器40 Image Collector 50 Image Processor
60 驱动电机60 drive motor
具体实施方式Detailed ways
为使本申请实施例的目的、技术方案和优点更加清楚明白,下面将以附图及详细叙述清楚说明本申请所揭示内容的精神,任何所属技术领域技术人员在了解本申请内容的实施例后,当可由本申请内容所教示的技术,加以改变及修饰,其并不脱离本申请内容的精神与范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the following will clearly illustrate the spirit of the content disclosed in the application with the accompanying drawings and detailed descriptions. After any person skilled in the art understands the embodiments of the content of the application , when it can be changed and modified by the technology taught in the content of the application, it does not depart from the spirit and scope of the content of the application.
本申请的示意性实施例及其说明用于解释本申请,但并不作为对本申请的限定。另外,在附图及实施方式中所使用相同或类似标号的元件/构件是用来代表相同或类似部分。The exemplary embodiments and descriptions of the present application are used to explain the present application, but not to limit the present application. In addition, elements/members with the same or similar numbers used in the drawings and embodiments are used to represent the same or similar parts.
关于本文中所使用的“第一”、“第二”、…等,并非特别指称次序或顺位的意思,也非用以限定本申请,其仅为了区别以相同技术用语描述的元件或操作。The terms "first", "second", ... etc. used herein do not specifically refer to a sequence or order, nor are they used to limit the present application, but are only used to distinguish elements or operations described with the same technical terms .
关于本文中所使用的方向用语,例如:上、下、左、右、前或后等,仅是参考附图的方向。因此,使用的方向用语是用来说明并非用来限制本创作。Regarding the directional terms used herein, such as: up, down, left, right, front or rear, etc., only refer to the directions of the drawings. Accordingly, the directional terms used are for illustration and not for limitation of the present invention.
关于本文中所使用的“包含”、“包括”、“具有”、“含有”等等,均为开放性的用语,即意指包含但不限于。As used herein, "comprising", "comprising", "having", "comprising" and so on are all open terms, meaning including but not limited to.
关于本文中所使用的“及/或”,包括事物的任一或全部组合。As used herein, "and/or" includes any or all combinations of things.
关于本文中的“多个”包括“两个”及“两个以上”;关于本文中的“多组”包括“两组”及“两组以上”。The "plurality" herein includes "two" and "two or more"; the "multiple groups" herein includes "two groups" and "two or more groups".
关于本文中所使用的用语“大致”、“约”等,用以修饰任何可以微变化的数量或误差,但这些微变化或误差并不会改变其本质。一般而言,此类用语所修饰的微变化或误差的范围在部分实施例中可为20%,在部分实施例中可为10%,在部分实施例中可为5%或是其他数值。本领域技术人员应当了解,前述提及的数值可依实际需求而调整,并不以此为限。The terms "approximately" and "about" used herein are used to modify any quantity or error that may vary slightly, but these slight changes or errors will not change its essence. Generally speaking, the range of slight changes or errors modified by such terms may be 20% in some embodiments, 10% in some embodiments, 5% in some embodiments or other numerical values. Those skilled in the art should understand that the aforementioned values can be adjusted according to actual needs, and are not limited thereto.
图1为本申请提供的一种结构光深度相机的结构示意图。FIG. 1 is a schematic structural diagram of a structured light depth camera provided in the present application.
本申请实施例中,如图1所示,结构光深度相机的主要部件包括激光器1、鲍威尔透镜2、振镜3、图像传感器4和图像处理器5等,激光器发射激光点,鲍威尔透镜将激光点转变为线型光,振镜反射线型光,由于激光器周期性开关,随着振镜以恒定的角速度转动,振镜反射的线型光可以在物体、地面或墙面等投影面上形成明暗相间的光栅条纹,图像传感器采集投影面的光栅条纹图像,图像处理器分析图像传感器采集的光栅条纹图像。In the embodiment of the present application, as shown in Figure 1, the main components of the structured light depth camera include a laser 1, a Powell lens 2, a vibrating mirror 3, an image sensor 4, and an image processor 5, etc. The laser emits a laser point, and the Powell lens converts the laser The point is transformed into linear light, and the vibrating mirror reflects the linear light. Due to the periodic switching of the laser, as the vibrating mirror rotates at a constant angular velocity, the linear light reflected by the vibrating mirror can be formed on the projection surface such as the object, the ground or the wall. There are light and dark grating stripes, the image sensor collects the grating stripe image on the projection surface, and the image processor analyzes the grating stripe image collected by the image sensor.
振镜反射线型光时,如果振镜转动的角速度恒定,激光器周期性开关,振镜反射的线型光可以在投影面上形成明暗相间的条纹,对于光栅条纹来说,由于投影面上的不同点与振镜之间的距离不同,致使在投影面上距离振镜越远,光栅条纹移动越快,曝光量越低,从而导致投影面上的光栅条纹的亮度不均匀。When the galvanometer reflects linear light, if the angular velocity of the galvanometer is constant and the laser is switched on and off periodically, the linear light reflected by the galvanometer can form light and dark stripes on the projection surface. For grating stripes, due to the The distance between the different points and the galvanometer is different, so that the farther away from the galvanometer on the projection surface, the faster the grating stripes move and the lower the exposure, resulting in uneven brightness of the grating stripes on the projection surface.
图2为本申请提供的一种条纹光强不均匀的改善方法的流程示意图,该方法应用于结构光深度相机或激光相机或电子设备。其中,电子设备可以为表示各种形式的数字计算机。诸如,蜂窝电话、智能电话、膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。如图2所示,该方法包括:FIG. 2 is a schematic flowchart of a method for improving uneven light intensity of stripes provided by the present application, and the method is applied to a structured light depth camera or a laser camera or an electronic device. Wherein, the electronic device may represent various forms of digital computers. Such as, cellular phones, smart phones, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. As shown in Figure 2, the method includes:
步骤S201,采用结构光深度相机在投影面上形成光栅条纹。Step S201, using a structured light depth camera to form grating stripes on a projection surface.
本申请实施例中,采用结构深度相机在物体、地面或墙面等投影面上形成明暗相间的光栅条纹。In the embodiment of the present application, a structured depth camera is used to form light and dark grating stripes on projection surfaces such as objects, ground, or walls.
可选地,结构光深度相机与投影面之间无障碍物,投影面为平面,其上无物体,可以认为投影面的反射率一致,可以基本忽略投影面反射率对光栅条纹亮度的影响。可以在窗口为3×3的范围内选取多个标定点。Optionally, there is no obstacle between the structured light depth camera and the projection surface, and the projection surface is a plane with no objects on it. It can be considered that the reflectivity of the projection surface is consistent, and the influence of the reflectivity of the projection surface on the brightness of the grating stripes can be basically ignored. Multiple calibration points can be selected within a window size of 3×3.
步骤S202,在沿垂直于光栅条纹的直线上取多个标定点,其中,标定点的数量大于光栅条纹的数量。Step S202, taking a plurality of calibration points along a straight line perpendicular to the grating stripes, wherein the number of calibration points is greater than the number of grating stripes.
本申请实施例中,在沿垂直于光栅条纹的直线上选取多个标定点,该标定点的数量大于光栅条纹的数量,标定点的数量越多,结果越准确,但数据计算量越大;标定点的数量越少,结果越不准确,计算量越小。In the embodiment of the present application, multiple calibration points are selected along a straight line perpendicular to the grating stripes, the number of the calibration points is greater than the number of the grating stripes, the more the number of calibration points, the more accurate the result, but the greater the amount of data calculation; The fewer the number of calibration points, the less accurate the result and the smaller the calculation.
步骤S203,根据每个标定点的灰度值分段调整结构光深度相机的振镜的转动角速度。Step S203, adjusting the rotational angular velocity of the vibrating mirror of the structured light depth camera in sections according to the gray value of each calibration point.
本申请实施例中,获取每个标定点的灰度值,具体地,基于每个标定点对应的环境光强和处理后的调制光强计算得到各标定点的灰度值,其中,处理后的调制光强是由标定点对应的调制光强和振镜的预设相位场的余弦值计算得到的,进一步根据每个标定点的灰度值分段调整结构光深度相机的振镜的转动角速度。In the embodiment of the present application, the gray value of each calibration point is obtained, specifically, the gray value of each calibration point is calculated based on the ambient light intensity corresponding to each calibration point and the processed modulated light intensity, wherein, after processing The modulated light intensity is calculated from the modulated light intensity corresponding to the calibration point and the cosine value of the preset phase field of the galvanometer, and the rotation of the galvanometer of the structured light depth camera is adjusted in sections according to the gray value of each calibration point angular velocity.
由于受环境光强、结构光深度相机发射的激光与振镜的夹角不同则振镜反射激光的反射率不同、振镜与投影面的距离不同则振镜反射激光的在投影面上的曝光量不同等因素的影响,不同光栅条纹的亮度不同,即标定点的灰度值不同,这将影响直接影响后续的图像处理及图像识别结果。通常情况下,振镜与投影面的距离越大,光栅条纹在投影面上的移动速度越快,振镜反射激光的在投影面上的曝光量越小,振镜与投影面的距离越小,光栅条纹在投影面上的移动速度越慢,振镜反射激光的在投影面上的曝光量越大。Due to the different angles between the laser emitted by the ambient light intensity and the structured light depth camera and the galvanometer, the reflectivity of the laser reflected by the galvanometer is different, and the distance between the galvanometer and the projection surface is different, so the exposure of the laser reflected by the galvanometer on the projection surface The brightness of different grating stripes is different, that is, the gray value of the calibration point is different, which will directly affect the subsequent image processing and image recognition results. Generally, the larger the distance between the galvanometer and the projection surface, the faster the grating stripes move on the projection surface, the smaller the exposure of the laser reflected by the galvanometer on the projection surface, and the smaller the distance between the galvanometer and the projection surface , the slower the moving speed of the grating stripes on the projection surface, the greater the exposure of the laser reflected by the galvanometer on the projection surface.
本申请实施例中,根据灰度值分段调整结构光深度相机的振镜的转动角速度,可以使得光栅条纹在投影面上的亮度相对均衡,即使得标定点的灰度值相对一致,提高后续图像识别结果的精准度。In the embodiment of the present application, adjusting the rotational angular velocity of the galvanometer of the structured light depth camera in sections according to the gray value can make the brightness of the grating stripes on the projection surface relatively balanced, that is, make the gray values of the calibration points relatively consistent, and improve the follow-up The accuracy of image recognition results.
图3为本申请提供的另一种条纹光强不均匀的改善方法的流程示意图,该方法应用于结构光深度相机或激光相机或电子设备,如图3所示,该方法包括:Fig. 3 is a schematic flow chart of another method for improving uneven light intensity of stripes provided by the present application. This method is applied to a structured light depth camera or a laser camera or an electronic device. As shown in Fig. 3, the method includes:
步骤S301,采用结构光深度相机在投影面上形成光栅条纹。Step S301, using a structured light depth camera to form grating stripes on a projection surface.
在本实施例中,步骤S301与步骤S201具有相同的技术特征,具体描述可参考步骤201,在此不做赘述。In this embodiment, step S301 has the same technical features as step S201, and for a specific description, refer to step 201, and details are not repeated here.
步骤S302,在沿垂直于光栅条纹的直线上均匀或随机选取多个标定点,其中,标定点的数量是光栅条纹数量的预设倍数以上。In step S302, a plurality of calibration points are uniformly or randomly selected along a straight line perpendicular to the grating stripes, wherein the number of calibration points is more than a preset multiple of the number of grating stripes.
在本实施例中,标定点的数量大于光栅条纹的数量,且标定点的数量是 光栅条纹数量的预设倍数以上。例如,标定点的数量是光栅条纹数量的3倍、4倍、5倍等,可以保证每条光栅条纹上均有标定点。标定点的数量越多,结果越准确,但数据计算量越大;标定点的数量越少,结果越不准确,计算量越小。In this embodiment, the number of calibration points is greater than the number of grating stripes, and the number of calibration points is more than a preset multiple of the number of grating stripes. For example, the number of calibration points is 3 times, 4 times, 5 times of the number of grating stripes, etc., which can ensure that each grating stripe has a calibration point. The larger the number of calibration points, the more accurate the result, but the greater the amount of data calculation; the fewer the number of calibration points, the less accurate the result, and the smaller the amount of calculation.
步骤S303,根据每个标定点的灰度值分段调整结构光深度相机的振镜的转动角速度。Step S303, adjusting the rotational angular velocity of the vibrating mirror of the structured light depth camera in sections according to the gray value of each calibration point.
在本实施例中,步骤S303与步骤S203具有相同的技术特征,具体描述可参考步骤203,在此不做赘述。In this embodiment, step S303 has the same technical features as step S203, and for a specific description, refer to step 203, which will not be repeated here.
在一种可能的实现方式中,根据每个标定点的灰度值分段调整结构光深度相机的振镜的转动角速度,包括:In a possible implementation, the rotational angular velocity of the galvanometer of the structured light depth camera is adjusted in segments according to the gray value of each calibration point, including:
步骤S3031,利用余弦曲线计算每个标定点灰度值的极大值和极小值。Step S3031, using the cosine curve to calculate the maximum value and minimum value of the gray value of each calibration point.
本申请实施例中,可以利用余弦曲线计算每个标定点灰度值,具体地,基于每个标定点对应的环境光强和处理后的调制光强计算得到各标定点的灰度值,其中,处理后的调制光强是由标定点对应的调制光强和振镜的预设相位场的余弦值计算得到的,其中,余弦值等于1时,得到标定点灰度值的极大值;余弦值等于0时,得到标定点灰度值的极小值。In the embodiment of the present application, the gray value of each calibration point can be calculated using a cosine curve, specifically, the gray value of each calibration point is calculated based on the ambient light intensity corresponding to each calibration point and the processed modulated light intensity, where , the processed modulated light intensity is calculated from the modulated light intensity corresponding to the calibration point and the cosine value of the preset phase field of the galvanometer, wherein, when the cosine value is equal to 1, the maximum value of the gray value of the calibration point is obtained; When the cosine value is equal to 0, the minimum value of the gray value of the calibration point is obtained.
可选地,利用余弦曲线计算每个标定点灰度值的极大值和极小值,包括:Optionally, using a cosine curve to calculate the maximum value and minimum value of the gray value of each calibration point, including:
步骤S20311,获取每个标定点对应的环境光强和调制光强。Step S20311, obtaining the ambient light intensity and modulated light intensity corresponding to each calibration point.
在本实施例中,获取每个标定点对应的环境光强和对应的调制光强。In this embodiment, the ambient light intensity corresponding to each calibration point and the corresponding modulated light intensity are acquired.
步骤S20312,根据调制光强和振镜的预设相位场的余弦值,得到处理后的调制光强。Step S20312, obtain the processed modulated light intensity according to the modulated light intensity and the cosine value of the preset phase field of the vibrating mirror.
在本实施例中,计算每个标定点对应的调制光强和振镜的预设相位场的余弦值的乘积,得到处理后的调制光强。In this embodiment, the product of the modulated light intensity corresponding to each calibration point and the cosine value of the preset phase field of the vibrating mirror is calculated to obtain the processed modulated light intensity.
步骤S20313,根据处理后的调制光强和环境光强,得到标定点灰度值的极大值和极小值;其中,预设相位场为0时,得到标定点灰度值的极小值,预设相位场为1时,得到标定点灰度值的极大值。Step S20313, according to the processed modulated light intensity and ambient light intensity, obtain the maximum value and minimum value of the gray value of the calibration point; wherein, when the preset phase field is 0, obtain the minimum value of the gray value of the calibration point , when the default phase field is 1, the maximum value of the gray value of the calibration point is obtained.
在本实施例中,将处理后的调制光强和环境光强代入公式(1)计算标定点灰度值,公式(1)表示为:In this embodiment, the processed modulated light intensity and ambient light intensity are substituted into formula (1) to calculate the gray value of the calibration point, and formula (1) is expressed as:
I(x,y)=I′(x,y)+I″(x,y)cos[θ(x,y)]   公式(1)I(x,y)=I′(x,y)+I″(x,y)cos[θ(x,y)] Formula (1)
其中,I(x,y)表示标定点的灰度值;I′(x,y)表示标定点对应的环境光强;I″(x,y)表示标定点对应的调制光强,调制光强即是调整结构光深度相机的振镜的转动角速度后,标定点对应的结构光深度相机发射的激光经振镜反射后投影到投影面上的光强;θ(x,y)表示振镜的预设相位场,cos[θ(x,y)]表示振镜的预设相位场的余弦值,I″(x,y)cos[θ(x,y)]表示处理后的调制光强。Among them, I(x, y) represents the gray value of the calibration point; I′(x, y) represents the ambient light intensity corresponding to the calibration point; I″(x, y) represents the modulation light intensity corresponding to the calibration point, and the modulation light Intensity is the light intensity of the laser emitted by the structured light depth camera corresponding to the calibration point after adjusting the rotation angular velocity of the galvanometer of the structured light depth camera, reflected by the galvanometer and projected onto the projection surface; θ(x,y) represents the light intensity of the galvanometer The preset phase field of , cos[θ(x,y)] represents the cosine value of the preset phase field of the vibrating mirror, I″(x,y)cos[θ(x,y)] represents the modulated light intensity after processing .
调整结构光深度相机的振镜的转动角速度时,预设相位场为1时,即cos[θ(x,y)]等于1时,标定点灰度值的极大值表示为I max(x,y)=I′(x,y)+I″(x,y);预设相位场为0时,即cos[θ(x,y)]等于0时,标定点灰度值的极小值表示为I min(x,y)=I′(x,y)。 When adjusting the rotation angular velocity of the galvanometer of the structured light depth camera, when the preset phase field is 1, that is, when cos[θ(x,y)] is equal to 1, the maximum value of the gray value of the calibration point is expressed as I max (x ,y)=I′(x,y)+I″(x,y); when the default phase field is 0, that is, when cos[θ(x,y)] is equal to 0, the minimum gray value of the calibration point Values are expressed as I min (x,y)=I'(x,y).
步骤S3032:根据极大值和极小值计算每个标定点对应的调制光强。Step S3032: Calculate the modulated light intensity corresponding to each calibration point according to the maximum value and the minimum value.
本申请实施例中,根据每个标定点灰度值的极大值及标定点灰度值的极小值计算得到各标定点对应的调制光强,在水平方向(X轴方向)寻找距离每个极大值最近的极小值对应的标定点,将该极小值作为该极大值对应标定点的背景光强,将该极大值与该极小值作差,得到标定点对应的调制光强。In the embodiment of the present application, the modulated light intensity corresponding to each calibration point is calculated according to the maximum value of the gray value of each calibration point and the minimum value of the gray value of each calibration point, and the distance is found in the horizontal direction (X-axis direction). The calibration point corresponding to the nearest minimum value of a maximum value, the minimum value is used as the background light intensity of the calibration point corresponding to the maximum value, and the difference between the maximum value and the minimum value is obtained to obtain the corresponding calibration point Modulates light intensity.
在一种可能的实现方式中,根据极大值和极小值计算每个标定点对应的调制光强,包括:In a possible implementation, the modulation light intensity corresponding to each calibration point is calculated according to the maximum value and the minimum value, including:
步骤S30321,计算每个标定点灰度值的极大值与极小值的差值,将差值确定为各标定点对应的调制光强。Step S30321, calculating the difference between the maximum value and the minimum value of the gray value of each calibration point, and determining the difference as the modulated light intensity corresponding to each calibration point.
在本实施例中,根据公式(2)计算标定点灰度值,公式(2)表示为:In the present embodiment, the calibration point gray value is calculated according to the formula (2), and the formula (2) is expressed as:
I(x,y)=I′(x,y)+I″(x,y)cos[θ(x,y)]   公式(2)I(x,y)=I′(x,y)+I″(x,y)cos[θ(x,y)] Formula (2)
其中,I(x,y)表示标定点的灰度值;I′(x,y)表示标定点对应的环境光强;I″(x,y)表示标定点对应的调制光强,调制光强即是调整结构光深度相机的振镜的转动角速度后,标定点对应的结构光深度相机发射的激光经振镜反射后投影到投影面上的光强;θ(x,y)表示振镜的预设相位场,cos[θ(x,y)]表示振镜的预设相位场的余弦值,I″(x,y)cos[θ(x,y)]表示处理后的调制光强。Among them, I(x, y) represents the gray value of the calibration point; I′(x, y) represents the ambient light intensity corresponding to the calibration point; I″(x, y) represents the modulation light intensity corresponding to the calibration point, and the modulation light Intensity is the light intensity of the laser emitted by the structured light depth camera corresponding to the calibration point after adjusting the rotation angular velocity of the galvanometer of the structured light depth camera, reflected by the galvanometer and projected onto the projection surface; θ(x,y) represents the light intensity of the galvanometer The preset phase field of , cos[θ(x,y)] represents the cosine value of the preset phase field of the vibrating mirror, I″(x,y)cos[θ(x,y)] represents the modulated light intensity after processing .
调整结构光深度相机的振镜的转动角速度时,预设相位场为1时,即cos[θ(x,y)]等于1时,标定点灰度值的极大值表示为I max(x,y)=I′(x,y)+I″(x,y);预设相位场为0时,即cos[θ(x,y)]等于0时,标定点灰度值的极小值表示为I min(x,y)=I′(x,y)。 When adjusting the rotation angular velocity of the galvanometer of the structured light depth camera, when the preset phase field is 1, that is, when cos[θ(x,y)] is equal to 1, the maximum value of the gray value of the calibration point is expressed as I max (x ,y)=I′(x,y)+I″(x,y); when the default phase field is 0, that is, when cos[θ(x,y)] is equal to 0, the minimum gray value of the calibration point Values are expressed as I min (x,y)=I'(x,y).
通过公式(2)计算出每个标定点灰度值的极大值和灰度值的极小值,将每个标定点灰度值的极大值与灰度值的极小值代入公式(3):The maximum value and the minimum value of the gray value of each calibration point are calculated by the formula (2), and the maximum value of the gray value of each calibration point and the minimum value of the gray value are substituted into the formula ( 3):
I max(x,y)-I min(x,y)=I′(x,y)+I″(x,y)-I′(x,y)=I″(x,y)   公式(3) I max (x,y)-I min (x,y)=I′(x,y)+I″(x,y)-I′(x,y)=I″(x,y) Formula (3 )
其中,标定点灰度值的极大值表示为I max(x,y)=I′(x,y)+I″(x,y),标定点灰度值的极小值表示为I min(x,y)=I′(x,y),极大值和极小值的差值即为标定点对应的调制光强。 Among them, the maximum value of the gray value of the calibration point is expressed as I max (x, y) = I′ (x, y) + I″ (x, y), and the minimum value of the gray value of the calibration point is expressed as I min (x, y)=I'(x, y), the difference between the maximum value and the minimum value is the modulated light intensity corresponding to the calibration point.
步骤S3033,对多个标定点对应的调制光强进行聚类得到多个聚类中心值。Step S3033, clustering the modulated light intensities corresponding to the multiple calibration points to obtain multiple cluster center values.
本申请实施例中,对结构光深度相机的振镜的整个转动周期进行分段调整,因此,可以对多个标定点对应的调制光强进行聚类得到多个聚类中心值。然后,可以利用多个聚类中心值将振镜的整个转动周期进行分成多段。In the embodiment of the present application, the entire rotation cycle of the galvanometer of the structured light depth camera is adjusted in segments, so the modulated light intensities corresponding to multiple calibration points can be clustered to obtain multiple cluster center values. Then, the entire rotation period of the galvanometer can be divided into multiple segments by using multiple cluster center values.
步骤S3034,根据多个聚类中心值分段调整结构光深度相机的振镜的转动角速度,其中,每个聚类中心值对应分段中的一个转动阶段。Step S3034, adjusting the rotation angular velocity of the galvanometer of the structured light depth camera in segments according to multiple cluster center values, where each cluster center value corresponds to a rotation stage in the segment.
本申请实施例中,可以计算各聚类中心值之间的比值,例如可以得到下列比值:In the embodiment of this application, the ratio between the cluster center values can be calculated, for example, the following ratio can be obtained:
1:1.412251778:2.543979698:4.643095647:9.454755853:23.46813881:1.412251778:2.543979698:4.643095647:9.454755853:23.4681388
本申请实施例中,可以根据上述比值在振镜的不同转动阶段调整结构光深度相机的振镜的转动角速度,其中,每个聚类中心值对应分段中一个转动阶段,如,比值1对应第一转动阶段,比值1.412251778对应第二转动阶段,比值2.543979698对应第三转动阶段,比值4.643095647对应第四转动阶段,比值9.454755853对应第五转动阶段,比值23.4681388对应第六转动阶段。在振镜的第一转动阶段,振镜的转动角速度为ω在振镜的第二转动阶段,振镜的转动角速度为1.412251778ω,在振镜的第三转动阶段,振镜的转动角速度为2.543979698ω;在振镜的第四转动阶段,振镜的转动角速度为4.643095647ω;在振镜的第五转动阶段,振镜的转动角速度为9.454755853ω;在振镜的第六转动阶段,振镜的转动角速度为23.4681388ω。In the embodiment of the present application, the rotational angular velocity of the oscillating mirror of the structured light depth camera can be adjusted according to the above-mentioned ratio at different rotational stages of the galvanometer, wherein each cluster center value corresponds to a rotational stage in the segment, for example, a ratio of 1 corresponds to For the first rotation stage, the ratio 1.412251778 corresponds to the second rotation stage, the ratio 2.543979698 corresponds to the third rotation stage, the ratio 4.643095647 corresponds to the fourth rotation stage, the ratio 9.454755853 corresponds to the fifth rotation stage, and the ratio 23.4681388 corresponds to the sixth rotation stage. In the first rotation stage of the galvanometer, the rotational angular velocity of the galvanometer is ω. In the second rotational stage of the galvanometer, the rotational angular velocity of the galvanometer is 1.412251778ω. In the third rotational stage of the galvanometer, the rotational angular velocity of the galvanometer is 2.543979698 ω; in the fourth rotation stage of the vibrating mirror, the angular velocity of the vibrating mirror is 4.643095647ω; in the fifth rotating stage of the vibrating mirror, the angular velocity of the vibrating mirror is 9.454755853ω; The rotational angular velocity is 23.4681388ω.
本申请实施例中,根据上述聚类中心值的比值在振镜的不同转动阶段调整结构光深度相机的振镜的转动角速度,可以精准改善条纹光强的不均匀,为后续图像识别、分析打下良好的基础。In the embodiment of the present application, adjusting the rotational angular velocity of the oscillating mirror of the structured light depth camera according to the ratio of the above-mentioned clustering center values at different rotational stages of the galvanizing mirror can accurately improve the uneven light intensity of the fringes, laying a solid foundation for subsequent image recognition and analysis. good foundation.
图4为本申请提供的另一种条纹光强不均匀的改善方法的流程示意图,该方法应用于结构光深度相机或激光相机或电子设备,如图4所示,根据极大值和极小值计算每个标定点对应的调制光强,包括以下步骤:Figure 4 is a schematic flow chart of another method for improving uneven light intensity of stripes provided by the present application. This method is applied to a structured light depth camera or a laser camera or an electronic device. Calculate the modulated light intensity corresponding to each calibration point, including the following steps:
步骤S401,利用理论极大值去除极大值中无效的数值,以获得有效极大值。Step S401, using the theoretical maximum value to remove invalid values in the maximum value to obtain an effective maximum value.
在本实施例中,获取预设的理论极大值,如,理论极大值可以设置为11,若极大值中的数值小于11,则去除无效极大值,得到有效极大值。需要说明的是,理论极大值可根据实际情况设定,并不限于上述数值。In this embodiment, a preset theoretical maximum value is obtained. For example, the theoretical maximum value can be set to 11. If the value in the maximum value is less than 11, the invalid maximum value is removed to obtain an effective maximum value. It should be noted that the theoretical maximum value can be set according to the actual situation, and is not limited to the above-mentioned value.
步骤S402,利用理论极小值去除极小值中无效的数值,以获得有效极小值。Step S402, using the theoretical minimum value to remove invalid values in the minimum value to obtain an effective minimum value.
本申请实施例中,获取预设的理论极小值,如,理论极小值可以设置为12,若极小值的数值大于12,则去除无效极小值,得到有效极小值。需要说明的是,理论极小值可根据实际情况设定,并不限于上述数值。In the embodiment of the present application, a preset theoretical minimum value is obtained. For example, the theoretical minimum value can be set to 12. If the value of the minimum value is greater than 12, the invalid minimum value is removed to obtain an effective minimum value. It should be noted that the theoretical minimum value can be set according to the actual situation, and is not limited to the above-mentioned values.
步骤S403:计算每个标定点灰度值的有效极大值与有效极小值的差值,将差值确定为各标定点对应的调制光强。Step S403: Calculate the difference between the effective maximum value and the effective minimum value of the gray value of each calibration point, and determine the difference as the modulated light intensity corresponding to each calibration point.
本申请实施例中,将每个标定点灰度值的有效极大值与灰度值的有效极 小值代入公式(4):In the embodiment of this application, the effective maximum value and the effective minimum value of the gray value of each calibration point are substituted into the formula (4):
I max(x,y)-I min(x,y)=I′(x,y)+I″(x,y)-I′(x,y)=I″(x,y)   公式(4) I max (x,y)-I min (x,y)=I′(x,y)+I″(x,y)-I′(x,y)=I″(x,y) Formula (4 )
其中,标定点灰度值的有效极大值表示为I max(x,y)=I′(x,y)+I″(x,y),标定点灰度值的有效极小值表示为I min(x,y)=I′(x,y),有效极大值和有效极小值的差值即为标定点对应的调制光强,得到各标定点对应的调制光强。 Among them, the effective maximum value of the gray value of the calibration point is expressed as I max (x, y) = I′ (x, y) + I″ (x, y), and the effective minimum value of the gray value of the calibration point is expressed as I min (x, y) = I'(x, y), the difference between the effective maximum value and the effective minimum value is the modulated light intensity corresponding to the calibration point, and the modulated light intensity corresponding to each calibration point is obtained.
本申请实施例中,利用理论极大值去除极大值中无效的数值,并利用理论极小值去除极小值中无效的数值。采用有效极大值与有效极小值计算调制光强,可以提高后续分析的准确度。去除无效数值后,再计算每个标定点对应的调制光强,再对所有调制光强进行聚类,得到所有聚类中心值之间的比值,根据比值在振镜的不同转动阶段调整结构光深度相机的振镜的转动角速度,可以进一步改善条纹光强的不均匀,为后续图像识别、分析打下良好的基础。In the embodiment of the present application, the theoretical maximum value is used to remove invalid values in the maximum value, and the theoretical minimum value is used to remove invalid values in the minimum value. Using the effective maximum value and the effective minimum value to calculate the modulated light intensity can improve the accuracy of subsequent analysis. After removing invalid values, calculate the modulated light intensity corresponding to each calibration point, and then cluster all modulated light intensities to obtain the ratio between all cluster center values, and adjust the structured light according to the ratio in different rotation stages of the galvanometer The rotational angular velocity of the galvanometer of the depth camera can further improve the uneven light intensity of the stripes, laying a good foundation for subsequent image recognition and analysis.
图5为本申请提供的另一种条纹光强不均匀的改善方法的流程示意图,该方法应用于结构光深度相机或激光相机或电子设备,如图5所示,根据多个聚类中心值分段调整结构光深度相机的振镜的转动角速度,包括以下步骤:Fig. 5 is a schematic flow chart of another method for improving uneven light intensity of stripes provided by the present application. This method is applied to a structured light depth camera or a laser camera or an electronic device. As shown in Fig. 5, according to multiple cluster center values Adjusting the rotation angular velocity of the galvanometer of the structured light depth camera in sections includes the following steps:
步骤S501,从多个聚类中心值中查找最小的聚类中心值作为基准聚类中心值。Step S501, find the smallest cluster center value from multiple cluster center values as the reference cluster center value.
本申请实施例中,聚类中心值越小,说明灰度值越小,应当减小振镜的转动角速度;聚类中心值越大,说明灰度值越大,应当增加振镜的转动角速度,从多个聚类中心值中查找最小的聚类中心值,将其作为基准聚类中心值。In the embodiment of this application, the smaller the cluster center value, the smaller the grayscale value, and the rotational angular velocity of the vibrating mirror should be reduced; the larger the clustering central value, the larger the grayscale value, and the rotational angular velocity of the vibrating mirror should be increased , find the smallest cluster center value from multiple cluster center values, and use it as the benchmark cluster center value.
步骤S502,计算每个聚类中心值与基准聚类中心值的比值。Step S502, calculating the ratio of each cluster center value to the reference cluster center value.
本申请实施例中,计算每个聚类中心值与基准聚类中心值的比值,例如可以为下列值:In the embodiment of this application, the ratio of each cluster center value to the reference cluster center value is calculated, for example, the following values can be:
1:1.412251778:2.543979698:4.643095647:9.454755853:23.46813881:1.412251778:2.543979698:4.643095647:9.454755853:23.4681388
1:1.237281749:1.632876235:2.308164404:3.063120874:4.7110067261: 1.237281749: 1.632876235: 2.308164404: 3.063120874: 4.711006726
步骤S503,根据每个比值在振镜的不同转动阶段调整结构光深度相机的振镜的转动角速度。Step S503, adjusting the rotation angular velocity of the vibration mirror of the structured light depth camera at different rotation stages of the vibration mirror according to each ratio.
本申请实施例中,聚类中心值越小,说明灰度值越小,应当减小振镜的转动角速度;聚类中心值越大,说明灰度值越大,应当增加振镜的转动角速度。例如,在振镜的第一转动阶段,振镜的转动角速度为ω,那么在振镜的第二转动阶段,振镜的转动角速度为1.412251778ω,在振镜的第三转动阶段,振镜的转动角速度为2.543979698ω,在振镜的第四转动阶段,振镜的转动角速度为4.643095647ω,在振镜的第五转动阶段,振镜的转动角速度为9.454755853ω,在振镜的第六转动阶段,振镜的转动角速度为23.4681388ω。 再例如,在振镜的第一转动阶段,振镜的转动角速度为ω,那么在振镜的第二转动阶段,振镜的转动角速度为1.237281749ω,在振镜的第三转动阶段,振镜的转动角速度为1.632876235ω,在振镜的第四转动阶段,振镜的转动角速度为2.308164404ω,在振镜的第五转动阶段,振镜的转动角速度为3.063120874ω,在振镜的第六转动阶段,振镜的转动角速度为4.711006726ω。In the embodiment of this application, the smaller the cluster center value, the smaller the grayscale value, and the rotational angular velocity of the vibrating mirror should be reduced; the larger the clustering central value, the larger the grayscale value, and the rotational angular velocity of the vibrating mirror should be increased . For example, in the first rotation stage of the vibrating mirror, the rotational angular velocity of the vibrating mirror is ω, then in the second rotating stage of the vibrating mirror, the rotational angular velocity of the vibrating mirror is 1.412251778ω; The rotation angular velocity is 2.543979698ω. In the fourth rotation stage of the galvanometer, the rotation angular velocity of the galvanometer is 4.643095647ω. In the fifth rotation stage of the galvanometer, the rotation angular velocity of the galvanometer is 9.454755853ω. In the sixth rotation stage of the galvanometer , the rotational angular velocity of the vibrating mirror is 23.4681388ω. For another example, in the first rotation stage of the vibrating mirror, the rotational angular velocity of the vibrating mirror is ω, then in the second rotating stage of the vibrating mirror, the rotational angular velocity of the vibrating mirror is 1.237281749ω, The rotation angular velocity of the vibration mirror is 1.632876235ω. In the fourth rotation stage of the vibration mirror, the rotation angular velocity of the vibration mirror is 2.308164404ω. In the fifth rotation stage of the vibration mirror, the rotation angular velocity of the vibration mirror is 3.063120874ω. stage, the rotational angular velocity of the galvanometer is 4.711006726ω.
本申请实施例中,根据所有聚类中心值与基准聚类中心值的比值在振镜的不同转动阶段调整结构光深度相机的振镜的转动角速度,可以精准改善条纹光强的不均匀,为后续图像识别、分析打下良好的基础。In the embodiment of the present application, adjusting the rotation angular velocity of the vibration mirror of the structured light depth camera according to the ratio of all cluster center values to the reference cluster center value at different rotation stages of the vibration mirror can accurately improve the unevenness of the light intensity of the stripes, as Follow-up image recognition and analysis lay a good foundation.
在一种可能的实施方式中,根据每个比值在振镜的不同转动阶段调整结构光深度相机的振镜的转动角速度,包括:In a possible implementation manner, adjusting the rotation angular velocity of the vibration mirror of the structured light depth camera at different rotation stages of the vibration mirror according to each ratio includes:
步骤S5031,根据多个比值将振镜的转动范围划分为与比值对应的转动区间,其中,转动范围由转动区间组成。Step S5031, divide the rotation range of the vibrating mirror into rotation intervals corresponding to the ratios according to a plurality of ratios, wherein the rotation range is composed of rotation intervals.
在本实施例中,如比值为:1:1.237281749:1.632876235:2.308164404:3.063120874,利用上述比值为将振镜的转动范围划分为与比值对应的转动区间,转动范围由转动区间组成。In this embodiment, if the ratio is: 1:1.237281749:1.632876235:2.308164404:3.063120874, the above ratio is used to divide the rotation range of the galvanometer into rotation intervals corresponding to the ratio, and the rotation range is composed of rotation intervals.
步骤S5032,根据比值调整振镜在对应的转动区间的转动角速度。Step S5032, adjust the rotational angular velocity of the oscillating mirror in the corresponding rotational interval according to the ratio.
本申请实施例中,进一步根据比值调整振镜在对应的转动区间的转动角速度,在振镜的不同转动阶段调整结构光深度相机的振镜的转动角速度,可以精准改善条纹光强的不均匀,为后续图像识别、图像分析打下良好的基础,提高图像识别的准确度。In the embodiment of the present application, the rotational angular velocity of the vibrating mirror in the corresponding rotational interval is further adjusted according to the ratio, and the rotational angular velocity of the vibrating mirror of the structured light depth camera is adjusted at different rotational stages of the vibrating mirror, which can accurately improve the unevenness of the fringe light intensity, Lay a good foundation for subsequent image recognition and image analysis, and improve the accuracy of image recognition.
在一种可能的实施方式中,根据比值调整振镜在对应的转动区间的转动角速度,包括:In a possible implementation manner, adjusting the rotational angular velocity of the vibrating mirror in the corresponding rotational interval according to the ratio includes:
步骤S50321,对N个比值按照预设顺序进行排序,得到比值排序M 1、M 2、M 3……M N;其中,N为正整数;M为比值。 Step S50321, sorting the N ratios according to a preset order to obtain ratio rankings M 1 , M 2 , M 3 . . . M N ; wherein, N is a positive integer; M is a ratio.
在本实施例中,对N个比值按照从小到大的顺序进行排序,得到比值排序比值为:1:1.237281749:1.632876235:2.308164404:3.063120874。In this embodiment, the N ratios are sorted in descending order, and the ratios of the ratios sorted are: 1:1.237281749:1.632876235:2.308164404:3.063120874.
步骤S50322,对比值排序进行处理,得到目标比值排序M N、M N-1、M N-2……M 1、……M N-2、M N-1、M NStep S50322, processing the ratio ranking to obtain the target ratio rankings M N , M N-1 , M N -2 . . . M 1 , . . . M N-2 , M N-1 , M N .
在本实施例中,由于结构光深度相机的振镜的转动轨迹为扇形,例如,对1:1.237281749:1.632876235:2.308164404:3.063120874进行处理,得到目标比值排序3.063120874,2.308164404,1.632876235,1.237281749,1,1.237281749,1.632876235,2.308164404,3.063120874。In this embodiment, since the rotation trajectory of the galvanometer of the structured light depth camera is fan-shaped, for example, 1: 1.237281749: 1.632876235: 2.308164404: 3.063120874 is processed to obtain the target ratio sorting 3.063120874, 2.308164404, 1.632876235, 1.237 281749, 1, 1.237281749 , 1.632876235, 2.308164404, 3.063120874.
步骤S50323,将转动范围划分为2N-1个转动区间,每个转动区间与目标比值排序中的比值一一对应。Step S50323, divide the rotation range into 2N-1 rotation intervals, and each rotation interval corresponds to the ratio in the target ratio sorting one by one.
在本实施例中,将转动范围划分为2N-1个转动区间,若比值数量N为5,则转动区间为9,利用上述目标比值排序3.063120874,2.308164404,1.632876235,1.237281749,1,1.237281749,1.632876235,2.308164404,3.063120874可以将结构光深度相机的振镜的一个转动周期分为9个区间,如分别为[0,259),[259,455),[455,627),[627,855),[855.1272),[1272,1532),[1532,1616),[1616,1770),[1770,2048)。In this embodiment, the rotation range is divided into 2N-1 rotation intervals. If the ratio number N is 5, the rotation interval is 9, and the above target ratios are used to sort 3.063120874, 2.308164404, 1.632876235, 1.237281749, 1, 1.237281749, 1.632876235, 2.308164404, 3.063120874 can divide a rotation period of the vibration mirror of the structured light depth camera into 9 intervals, such as [0,259), [259,455), [455,627), [627,855), [855.1272), [1272,1532) ,[1532,1616),[1616,1770),[1770,2048).
进一步的,每个转动区间与目标比值排序中的比值一一对应,结构光深度相机的振镜在转动区间[0,259)的转动角速度3.063120874ω,结构光深度相机的振镜在转动区间[259,455)的转动角速度2.308164404ω,结构光深度相机的振镜在转动区间[455,627)的转动角速度1.632876235ω,结构光深度相机的振镜在转动区间[627,855)的转动角速度1.237281749ω,结构光深度相机的振镜在转动区间[855.1272)的转动角速度1ω,结构光深度相机的振镜在转动区间[1272,1532)的转动角速度1.237281749ω,结构光深度相机的振镜在转动区间[1532,1616)的转动角速度1.632876235ω,结构光深度相机的振镜在转动区间[1616,1770)的转动角速度2.308164404ω,结构光深度相机的振镜在转动区间[1770,2048)的转动角速度3.063120874ω。Further, each rotation interval is in one-to-one correspondence with the ratio in the target ratio sorting, the rotation angular velocity of the oscillating mirror of the structured light depth camera in the rotation interval [0,259) is 3.063120874ω, and the oscillating mirror of the structured light depth camera is in the rotation interval [259,455) The rotation angular velocity of the structured light depth camera is 2.308164404ω, the rotation angular velocity of the oscillating mirror of the structured light depth camera in the rotation interval [455,627) is 1.632876235ω, the rotation angular velocity of the oscillating mirror of the structured light depth camera in the rotation interval [627,855) is 1.237281749ω, the vibration mirror of the structured light depth camera is The rotation angular velocity of the mirror in the rotation interval [855.1272) is 1ω, the rotation angular velocity of the oscillating mirror of the structured light depth camera in the rotation interval [1272,1532) is 1.237281749ω, the rotation of the oscillating mirror of the structured light depth camera in the rotation interval [1532,1616) The angular velocity is 1.632876235ω, the rotational angular velocity of the vibrating mirror of the structured light depth camera in the rotation interval [1616,1770) is 2.308164404ω, and the rotational angular velocity of the vibrating mirror of the structured light depth camera in the rotational interval [1770,2048) is 3.063120874ω.
本申请实施例中,在振镜的不同转动阶段调整结构光深度相机的振镜的转动角速度,可以精准改善条纹光强的不均匀,为后续图像识别、图像分析打下良好的基础,提高图像识别的准确度。In the embodiment of the present application, adjusting the rotational angular velocity of the galvanometer of the structured light depth camera at different rotation stages of the galvanometer can accurately improve the uneven light intensity of stripes, lay a good foundation for subsequent image recognition and image analysis, and improve image recognition. the accuracy.
在一种可能的实施方式中,根据每个比值在振镜的不同转动阶段调整结构光深度相机的振镜的转动角速度,包括:In a possible implementation manner, adjusting the rotation angular velocity of the vibration mirror of the structured light depth camera at different rotation stages of the vibration mirror according to each ratio includes:
步骤S503a,对多个比值进行规范化处理得到多个规范比值。Step S503a, performing normalization processing on multiple ratios to obtain multiple normative ratios.
本申请实施例中,为了便于工程实现,可以对比值进行规范化处理得到规范比值。例如,对比值1:1.237281749:1.632876235:2.308164404:3.063120874:4.711006726进行规范化处理后,得到1:1.25:1.5:2.0:3.0,舍弃4.711006726。In the embodiment of the present application, for the convenience of engineering implementation, the comparison value may be normalized to obtain the standard ratio. For example, after normalizing the comparison value 1:1.237281749:1.632876235:2.308164404:3.063120874:4.711006726, we get 1:1.25:1.5:2.0:3.0, discarding 4.711006726.
步骤S503b,根据多个规范比值将振镜的转动范围划分为与规范比值对应的转动区间,其中,转动范围由转动区间组成。Step S503b, dividing the rotation range of the vibrating mirror into rotation intervals corresponding to the standard ratios according to a plurality of standard ratios, wherein the rotation range is composed of rotation intervals.
本申请实施例中,由于结构光深度相机的振镜的转动轨迹为扇形,因此利用规范后的比值3,2,1.5,1.25,1,1.25,1.5,2,3可以将结构光深度相机的振镜的一个转动周期分为9个区间,分别为[0,259),[259,455),[455,627),[627,855),[855.1272),[1272,1532),[1532,1616),[1616,1770),[1770,2048)。In the embodiment of this application, since the rotation trajectory of the galvanometer of the structured light depth camera is fan-shaped, the standardized ratio of 3, 2, 1.5, 1.25, 1, 1.25, 1.5, 2, 3 can be used to convert the structured light depth camera to A rotation period of the galvanometer is divided into 9 intervals, which are [0,259), [259,455), [455,627), [627,855), [855.1272), [1272,1532), [1532,1616), [1616,1770 ), [1770, 2048).
步骤S503c,根据多个规范比值调整振镜在每个转动区间的转动角速度。Step S503c, adjusting the rotational angular velocity of the vibrating mirror in each rotational interval according to a plurality of standard ratios.
本申请实施例中,结构光深度相机的振镜在转动区间[0,259)的转动角速 度3ω,结构光深度相机的振镜在转动区间[259,455)的转动角速度2ω,结构光深度相机的振镜在转动区间[455,627)的转动角速度1.5ω,结构光深度相机的振镜在转动区间[627,855)的转动角速度1.25ω,结构光深度相机的振镜在转动区间[855.1272)的转动角速度1ω,结构光深度相机的振镜在转动区间[1272,1532)的转动角速度1.25ω,结构光深度相机的振镜在转动区间[1532,1616)的转动角速度1.5ω,结构光深度相机的振镜在转动区间[1616,1770)的转动角速度2ω,结构光深度相机的振镜在转动区间[1770,2048)的转动角速度3ω。In the embodiment of this application, the rotational angular velocity of the oscillating mirror of the structured light depth camera is 3ω in the rotation interval [0,259), the rotational angular velocity of the oscillating mirror of the structured light depth camera is 2ω in the rotational interval [259,455), and the oscillating mirror of the structured light depth camera is at The rotation angular velocity of the rotation interval [455,627) is 1.5ω, the rotation angular velocity of the vibration mirror of the structured light depth camera in the rotation interval [627,855) is 1.25ω, the rotation angular velocity of the vibration mirror of the structured light depth camera is 1ω in the rotation interval [855.1272), the structured light The rotational angular velocity of the galvanometer of the depth camera is 1.25ω in the rotation interval [1272,1532), the rotational angular velocity of the galvanometer of the structured light depth camera is 1.5ω in the rotational interval [1532,1616), and the oscillating mirror of the structured light depth camera is in the rotational interval [1616, 1770) with a rotation angular velocity of 2ω, and the oscillating mirror of the structured light depth camera in the rotation interval [1770, 2048) with a rotation angular velocity of 3ω.
本申请实施例中,在振镜的不同转动阶段调整结构光深度相机的振镜的转动角速度,可以精准改善条纹光强的不均匀,为后续图像识别、图像分析打下良好的基础,提高图像识别的准确度。In the embodiment of the present application, adjusting the rotational angular velocity of the galvanometer of the structured light depth camera at different rotation stages of the galvanometer can accurately improve the uneven light intensity of stripes, lay a good foundation for subsequent image recognition and image analysis, and improve image recognition. the accuracy.
本申请实施例中,一种结构光深度相机,可以包括:一个或多个处理器;存储装置,用于存储可执行指令,可执行指令在被处理器执行时,实现上述实施例中的条纹光强不均匀的改善方法。In an embodiment of the present application, a structured light depth camera may include: one or more processors; a storage device for storing executable instructions, and when the executable instructions are executed by the processors, the stripes in the above embodiments are realized Improvement method for uneven light intensity.
本申请实施例中,一种激光相机,可以包括:一个或多个处理器;存储装置,用于存储可执行指令,可执行指令在被处理器执行时,实现上述实施例中的条纹光强不均匀的改善方法。In an embodiment of the present application, a laser camera may include: one or more processors; a storage device for storing executable instructions, and when the executable instructions are executed by the processors, realize the fringe light intensity in the above-mentioned embodiments Uneven method of improvement.
本申请实施例中,一种电子设备,可以包括:一个或多个处理器;存储装置,用于存储可执行指令,可执行指令在被处理器执行时,实现上述实施例中的条纹光强不均匀的改善方法。In the embodiment of the present application, an electronic device may include: one or more processors; a storage device for storing executable instructions, and when the executable instructions are executed by the processors, realize the stripe light intensity in the above embodiments Uneven method of improvement.
本申请实施例中,一种计算机可读存储介质,其上存储有可执行指令,该可执行指令被处理器执行时实现上述实施例公开的条纹光强不均匀的改善方法。该计算机可读存储介质可以是上述实施例中描述的设备/装置/系统中所包含的;也可以是单独存在,而未装配入该设备/装置/系统中。上述计算机可读存储介质承载有一个或者多个程序,当上述一个或者多个程序被执行时,实现上述实施例公开的条纹光强不均匀的改善方法。In an embodiment of the present application, a computer-readable storage medium stores executable instructions thereon, and when the executable instructions are executed by a processor, the method for improving uneven light intensity of stripes disclosed in the above-mentioned embodiments is implemented. The computer-readable storage medium may be included in the device/apparatus/system described in the above embodiments; it may also exist independently without being assembled into the device/apparatus/system. The above-mentioned computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method for improving uneven light intensity of stripes disclosed in the above-mentioned embodiments is realized.
本申请实施例中,一种计算机程序,上述计算机程序包括计算机可执行指令,该计算机可执行指令在被执行时用于实现上述实施例公开的条纹光强不均匀的改善方法。该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以从网络上被下载和安装,和/或从可拆卸介质被安装。在该计算机程序被处理器执行时,执行本申请实施例的电子设备中限定的上述功能。根据本申请的实施例,上文描述的电子设备、设备、装置、模块、单元等可以通过计算机程序模块来实现。In an embodiment of the present application, a computer program includes computer-executable instructions, and the computer-executable instructions are used to implement the method for improving uneven light intensity of stripes disclosed in the above-mentioned embodiments when executed. The computer program contains program code for carrying out the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network, and/or from removable media. When the computer program is executed by the processor, the above-mentioned functions defined in the electronic device in the embodiment of the present application are executed. According to the embodiments of the present application, the above-described electronic devices, devices, devices, modules, units, etc. may be implemented by computer program modules.
图6为本申请提供的一种结构光深度相机的结构示意图。FIG. 6 is a schematic structural diagram of a structured light depth camera provided by the present application.
本申请实施例中,如图6所示,结构光深度相机可以包括激光发射器10、透镜20(例如,鲍威尔透镜)、振镜30、图像采集器40、图像处理器50和驱动电机60。其中,激光发射器10发射的点激光经过透镜20后变成线激光,线激光经过振镜30反射,投射在投影面上;驱动电机60驱动振镜30匀速旋转,激光发射器10周期开关,在投影面上形成光栅条纹;在图像采集器40的一个曝光时间内,采集投影面上的光栅条纹;图像处理器50分析光栅条纹上标定点的灰度值,并根据灰度值控制驱动电机60,进而分段调整振镜30的转动角速度。In the embodiment of the present application, as shown in FIG. 6 , the structured light depth camera may include a laser emitter 10 , a lens 20 (for example, a Powell lens), a vibrating mirror 30 , an image collector 40 , an image processor 50 and a drive motor 60 . Wherein, the point laser light emitted by the laser transmitter 10 passes through the lens 20 and becomes a line laser, and the line laser is reflected by the vibrating mirror 30 and projected on the projection surface; the driving motor 60 drives the vibrating mirror 30 to rotate at a constant speed, and the laser transmitter 10 cycles switch, Form grating stripes on the projection surface; within an exposure time of the image collector 40, collect the grating stripes on the projection surface; the image processor 50 analyzes the gray value of the marked point on the grating stripe, and controls the drive motor according to the gray value 60, and then adjust the rotational angular velocity of the vibrating mirror 30 in sections.
图7为本申请提供的一种获取投影面上光栅条纹的多个标定点的示意图。FIG. 7 is a schematic diagram of obtaining multiple calibration points of grating stripes on a projection plane provided by the present application.
本申请实施例中,如图7所示,x轴为所有光栅条纹的整体宽度,y为光栅条纹的高度。结构光深度相机在投影面上形成光栅条纹,在y=1200的直线上取多个标定点。投影面上无障碍物,可以认定反射率较为一致,则可基本忽略反射率的影响。In the embodiment of the present application, as shown in FIG. 7 , the x-axis is the overall width of all the grating stripes, and y is the height of the grating stripes. The structured light depth camera forms grating stripes on the projection surface, and takes multiple calibration points on the straight line of y=1200. If there are no obstacles on the projection surface, it can be assumed that the reflectivity is relatively consistent, and the influence of reflectivity can be basically ignored.
图8为本申请提供的一种多个标定点灰度值的示意图。FIG. 8 is a schematic diagram of gray values of multiple calibration points provided by the present application.
本申请实施例中,如图8所示,获取图7中每个标定点的灰度值,y轴表示灰度值的大小,x轴表示振镜的一个转动周期。灰度值I(x,y)可以利用以下公式表示:In the embodiment of the present application, as shown in FIG. 8 , the gray value of each calibration point in FIG. 7 is acquired, the y-axis represents the size of the gray value, and the x-axis represents a rotation period of the vibrating mirror. The gray value I(x,y) can be expressed by the following formula:
I(x,y)=I′(x,y)+I″(x,y)cos[θ(x,y)]I(x,y)=I'(x,y)+I"(x,y)cos[θ(x,y)]
上述公式中,I(x,y)表示标定点的灰度值;I′(x,y)表示标定点对应的环境光强;I″(x,y)表示标定点对应的调制光强,调制光强即是调整结构光深度相机的振镜的转动角速度后,标定点对应的结构光深度相机发射的激光经振镜反射后投影到投影面上的光强;θ(x,y)表示振镜的预设相位场,In the above formula, I(x,y) represents the gray value of the calibration point; I′(x,y) represents the ambient light intensity corresponding to the calibration point; I″(x,y) represents the modulation light intensity corresponding to the calibration point, The modulated light intensity is the light intensity of the laser light emitted by the structured light depth camera corresponding to the calibration point that is reflected by the galvanometer and projected onto the projection surface after adjusting the rotational angular velocity of the oscillating mirror of the structured light depth camera; θ(x,y) represents The preset phase field of the galvanometer,
cos[θ(x,y)]表示振镜的预设相位场的余弦值,I″(x,y)cos[θ(x,y)]表示处理后的调制光强。cos[θ(x,y)] represents the cosine value of the preset phase field of the vibrating mirror, and I″(x,y)cos[θ(x,y)] represents the modulated light intensity after processing.
图9为利用余弦曲线计算图8中多个标定点灰度值的极大值和极小值的示意图。FIG. 9 is a schematic diagram of calculating the maximum and minimum values of the gray values of multiple calibration points in FIG. 8 by using a cosine curve.
本申请实施例中,如图9所示,可以利用余弦曲线计算每个标定点灰度值的极大值和极小值。cos[θ(x,y)]等于1时,标定点灰度值的极大值表示为I max(x,y)=I′(x,y)+I″(x,y);cos[θ(x,y)]等于0时,标定点灰度值的极小值表示为I min(x,y)=I′(x,y)。 In the embodiment of the present application, as shown in FIG. 9 , a cosine curve may be used to calculate the maximum value and the minimum value of the gray value of each calibration point. When cos[θ(x,y)] is equal to 1, the maximum value of the gray value of the calibration point is expressed as I max (x,y)=I′(x,y)+I″(x,y); cos[ When θ(x, y)] is equal to 0, the minimum value of the gray value of the calibration point is expressed as I min (x, y) = I'(x, y).
图10A为对图9中的极大值和极小值筛选后,多个标定点对应的调制光强的示意图。FIG. 10A is a schematic diagram of modulated light intensities corresponding to multiple calibration points after filtering the maximum value and minimum value in FIG. 9 .
本申请实施例中,如图10A所示,利用理论极大值去除极大值中无效 的数值,并利用理论极小值去除极小值中无效的数值。理论极小值点基本满足I<12,理论极大值点基本满足I>11,在去除一些无效的灰度值的前提下,可以提高后续分析的准确度。In the embodiment of the present application, as shown in Figure 10A, the theoretical maximum value is used to remove invalid values in the maximum value, and the theoretical minimum value is used to remove invalid values in the minimum value. The theoretical minimum point basically satisfies I<12, and the theoretical maximum point basically satisfies I>11. On the premise of removing some invalid gray values, the accuracy of subsequent analysis can be improved.
图10B为不对图9中的极大值和极小值进行筛选,多个标定点对应的调制光强的示意图。FIG. 10B is a schematic diagram of the modulated light intensity corresponding to multiple calibration points without screening the maximum and minimum values in FIG. 9 .
本申请实施例中,如图10B所示,也可以不去除无效的灰度值,直接进行后续处理,减少数据处理量,提高结构光深度相机的反应速度,提高用户体验度。In the embodiment of the present application, as shown in FIG. 10B , it is also possible to directly perform subsequent processing without removing invalid gray values, reduce the amount of data processing, improve the response speed of the structured light depth camera, and improve user experience.
图11A为对图10A中的调制光强进行聚类,得到多个聚类中心值的示意图。图11B为对图10B中的调制光强进行聚类,得到多个聚类中心值的示意图。FIG. 11A is a schematic diagram of clustering the modulated light intensities in FIG. 10A to obtain multiple cluster center values. FIG. 11B is a schematic diagram of clustering the modulated light intensities in FIG. 10B to obtain multiple cluster center values.
本申请实施例中,如图11A所示,在去除一些无效的灰度值的前提下,可以对每个调制光强进行聚类得到多个聚类中心值,从而利于本申请的实施。In the embodiment of the present application, as shown in FIG. 11A , on the premise of removing some invalid gray values, clustering can be performed on each modulated light intensity to obtain multiple cluster center values, which facilitates the implementation of the present application.
本申请实施例中,如图11B所示,也可以不去除一些无效的灰度值的前提下,直接对每个调制光强进行聚类得到多个聚类中心值。In the embodiment of the present application, as shown in FIG. 11B , on the premise of not removing some invalid gray values, each modulated light intensity may be directly clustered to obtain multiple cluster center values.
图11A所示和图11B所示的示意图中,对每个调制光强进行聚类,利用得到多个聚类中心值分段调整振镜的转动角速度,而不是直接利用调制光强调制振镜的转动角速度,极大降低工程实现的复杂度,从而利于本申请的实现。In the schematic diagrams shown in Figure 11A and Figure 11B, each modulated light intensity is clustered, and the rotation angular velocity of the vibrating mirror is adjusted in segments by using multiple clustering center values, instead of directly using the modulated light intensity to control the vibrating mirror. The angular velocity of rotation greatly reduces the complexity of engineering realization, thereby facilitating the realization of this application.
图12A为根据图11A获得的比值,分段调整振镜的转动角速度,得到多个标定点灰度值的示意图。图12B为根据图11B获得的比值,分段调整振镜的转动角速度,得到多个标定点灰度值的示意图。FIG. 12A is a schematic diagram of adjusting the rotational angular velocity of the vibrating mirror in sections according to the ratio obtained in FIG. 11A to obtain gray values of multiple calibration points. FIG. 12B is a schematic diagram of adjusting the rotational angular velocity of the vibrating mirror in sections according to the ratio obtained in FIG. 11B to obtain gray values of multiple calibration points.
本申请实施例中,如图12A、图12B所示,可以计算各聚类中心值之间的比值,根据比值分段调整振镜的转动角速度,得到多个标定点灰度值。得到的多个标定点的灰度值基本趋于一致,可以基本消除背景光,以及振镜与投影面距离不同,光栅条纹在投影面上的亮度不均衡的问题,可以提高后续图像分析的准确度。In the embodiment of the present application, as shown in FIG. 12A and FIG. 12B , the ratio between each cluster center value can be calculated, and the rotational angular velocity of the vibrating mirror can be adjusted in sections according to the ratio to obtain gray values of multiple calibration points. The gray values of the obtained multiple calibration points are basically consistent, which can basically eliminate the background light, and the problem that the distance between the galvanometer and the projection surface is different, and the brightness of the grating stripes on the projection surface is uneven, which can improve the accuracy of subsequent image analysis. Spend.
本申请实施例中,根据灰度值分段调整结构光深度相机的振镜的转动角速度,可以使得光栅条纹在投影面上的亮度相对均衡,即使得标定点的灰度值相对一致或统一,提高后续图像识别结果的精准度。对所有标定点对应的调制光强进行聚类,利用得到多个聚类中心值分段调整振镜的转动角速度,而不是直接利用标定点对应的调制光强调制振镜的转动角速度,可以降低工程实现的复杂度,从而利于本申请的实现和推广。In the embodiment of the present application, the rotational angular velocity of the galvanometer of the structured light depth camera is adjusted in sections according to the gray value, so that the brightness of the grating stripes on the projection surface is relatively balanced, that is, the gray value of the calibration point is relatively consistent or uniform, Improve the accuracy of subsequent image recognition results. Cluster the modulated light intensities corresponding to all the calibration points, and adjust the rotational angular velocity of the vibrating mirror in segments by using multiple cluster center values, instead of directly using the modulated light intensity corresponding to the calibration points to control the rotational angular velocity of the vibrating mirror, which can reduce the The complexity of engineering realization is beneficial to the realization and popularization of this application.
附图中的流程图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code that includes one or more logical functions for implementing specified executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block in the block diagrams or flowchart illustrations, and combinations of blocks in the block diagrams or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a A combination of dedicated hardware and computer instructions.
本领域技术人员可以理解,本申请的各个实施例和/或权利要求中记载的特征可以进行多种组合或/或结合,即使这样的组合或结合没有明确记载于本申请中。特别地,在不脱离本申请精神和教导的情况下,本申请的各个实施例和/或权利要求中记载的特征可以进行多种组合和/或结合。所有这些组合和/或结合均落入本申请的范围。Those skilled in the art can understand that various combinations and/or combinations of the features described in the various embodiments and/or claims of the present application can be performed, even if such combinations or combinations are not explicitly described in the present application. In particular, without departing from the spirit and teaching of the present application, various combinations and/or combinations can be made of the features described in the various embodiments and/or claims of the present application. All such combinations and/or combinations fall within the scope of the present application.
以上对本申请的实施例进行了描述。但是,这些实施例仅仅是为了说明的目的,而并非为了限制本申请的范围。尽管在以上分别描述了各实施例,但是这并不意味着各个实施例中的措施不能有利地结合使用。本申请的范围由所附权利要求及其等同物限定。不脱离本申请的范围,本领域技术人员可以做出多种替代和修改,这些替代和修改都应落在本申请的范围之内。The embodiments of the present application have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the application. Although the various embodiments have been described separately above, this does not mean that the measures in the various embodiments cannot be advantageously used in combination. The scope of the application is defined by the claims appended hereto and their equivalents. Those skilled in the art can make various substitutions and modifications without departing from the scope of the present application, and these substitutions and modifications should all fall within the scope of the present application.

Claims (12)

  1. 一种条纹光强不均匀的改善方法,包括:A method for improving uneven light intensity of stripes, comprising:
    采用结构光深度相机在投影面上形成光栅条纹;Using a structured light depth camera to form grating stripes on the projection surface;
    在沿垂直于所述光栅条纹的直线上取多个标定点,其中,所述标定点的数量大于所述光栅条纹的数量;Taking a plurality of calibration points along a straight line perpendicular to the grating stripes, wherein the number of the calibration points is greater than the number of the grating stripes;
    根据每个所述标定点的灰度值分段调整所述结构光深度相机的振镜的转动角速度。The rotational angular velocity of the vibrating mirror of the structured light depth camera is adjusted segmentally according to the gray value of each calibration point.
  2. 根据权利要求1所述的条纹光强不均匀的改善方法,其中,所述根据每个所述标定点的灰度值分段调整所述结构光深度相机的振镜的转动角速度,包括:The method for improving uneven light intensity of stripes according to claim 1, wherein said segmental adjustment of the rotational angular velocity of the vibrating mirror of the structured light depth camera according to the gray value of each of the calibration points comprises:
    利用余弦曲线计算每个所述标定点灰度值的极大值和极小值;Using a cosine curve to calculate the maximum and minimum values of the gray value of each calibration point;
    根据所述极大值和所述极小值计算每个所述标定点对应的调制光强;calculating the modulated light intensity corresponding to each of the calibration points according to the maximum value and the minimum value;
    对多个标定点对应的调制光强进行聚类得到多个聚类中心值;Clustering the modulated light intensities corresponding to multiple calibration points to obtain multiple cluster center values;
    根据多个所述聚类中心值分段调整所述结构光深度相机的振镜的转动角速度,其中,每个聚类中心值对应所述分段中的一个转动阶段。The rotational angular velocity of the galvanometer of the structured light depth camera is adjusted segmentally according to the plurality of cluster center values, wherein each cluster center value corresponds to a rotation stage in the segment.
  3. 根据权利要求2所述的条纹光强不均匀的改善方法,其中,所述利用余弦曲线计算每个所述标定点灰度值的极大值和极小值,包括:The method for improving uneven light intensity of stripes according to claim 2, wherein said calculating the maximum value and minimum value of the gray value of each said calibration point by using a cosine curve comprises:
    获取每个标定点对应的环境光强和调制光强;Obtain the ambient light intensity and modulation light intensity corresponding to each calibration point;
    根据所述调制光强和振镜的预设相位场的余弦值,得到处理后的调制光强;Obtain the processed modulated light intensity according to the modulated light intensity and the cosine value of the preset phase field of the vibrating mirror;
    根据所述处理后的调制光强和所述环境光强,得到所述标定点灰度值的极大值和极小值;其中,预设相位场为0时,得到标定点灰度值的极小值,预设相位场为1时,得到标定点灰度值的极大值。According to the processed modulated light intensity and the ambient light intensity, the maximum value and the minimum value of the gray value of the calibration point are obtained; wherein, when the preset phase field is 0, the gray value of the calibration point is obtained Minimum value, when the default phase field is 1, the maximum value of the gray value of the calibration point is obtained.
  4. 根据权利要求2所述的条纹光强不均匀的改善方法,其中,所述根据所述极大值和所述极小值计算每个所述标定点对应的调制光强,包括:The method for improving uneven light intensity of stripes according to claim 2, wherein the calculation of the modulated light intensity corresponding to each of the calibration points according to the maximum value and the minimum value includes:
    计算每个所述标定点灰度值的极大值与极小值的差值,将所述差值确定为各所述标定点对应的调制光强。Calculate the difference between the maximum value and the minimum value of the gray value of each of the calibration points, and determine the difference as the modulated light intensity corresponding to each of the calibration points.
  5. 根据权利要求2所述的条纹光强不均匀的改善方法,其中,所述根据所述极大值和所述极小值计算每个所述标定点对应的调制光强,包括:The method for improving uneven light intensity of stripes according to claim 2, wherein the calculation of the modulated light intensity corresponding to each of the calibration points according to the maximum value and the minimum value includes:
    利用理论极大值去除所述极大值中无效的数值,以获得有效极大值;Using a theoretical maximum value to remove invalid values in the maximum value to obtain an effective maximum value;
    利用理论极小值去除所述极小值中无效的数值,以获得有效极小值;using a theoretical minimum to remove invalid values from said minimum to obtain an effective minimum;
    计算每个所述标定点灰度值的有效极大值与有效极小值的差值,将所述差值确定为各所述标定点对应的调制光强。Calculate the difference between the effective maximum value and the effective minimum value of the gray value of each calibration point, and determine the difference as the modulated light intensity corresponding to each calibration point.
  6. 根据权利要求2所述的条纹光强不均匀的改善方法,其中,所述根据多个所述聚类中心值分段调整所述结构光深度相机的振镜的转动角速度,包括:The method for improving uneven light intensity of stripes according to claim 2, wherein said adjusting the rotation angular velocity of the vibrating mirror of the structured light depth camera according to a plurality of said clustering center values, comprising:
    从多个所述聚类中心值中查找最小的聚类中心值作为基准聚类中心值;Finding the smallest cluster center value from multiple cluster center values as the benchmark cluster center value;
    计算每个所述聚类中心值与所述基准聚类中心值的比值;calculating the ratio of each cluster center value to the reference cluster center value;
    根据每个所述比值在振镜的不同转动阶段调整所述结构光深度相机的振镜的转动角速度。Adjusting the rotation angular velocity of the vibration mirror of the structured light depth camera at different rotation stages of the vibration mirror according to each of the ratios.
  7. 根据权利要求6所述的条纹光强不均匀的改善方法,其中,所述根据每个所述比值在振镜的不同转动阶段调整所述结构光深度相机的振镜的转动角速度,包括:The method for improving uneven light intensity of stripes according to claim 6, wherein said adjusting the rotation angular velocity of the vibration mirror of the structured light depth camera at different rotation stages of the vibration mirror according to each of the ratios includes:
    根据多个所述比值将所述振镜的转动范围划分为与所述比值对应的转动区间,其中,所述转动范围由所述转动区间组成;dividing the rotation range of the galvanometer into rotation intervals corresponding to the ratios according to the plurality of ratios, wherein the rotation range is composed of the rotation intervals;
    根据所述比值调整所述振镜在对应的转动区间的转动角速度。The rotational angular velocity of the vibrating mirror in the corresponding rotational interval is adjusted according to the ratio.
  8. 根据权利要求7所述的条纹光强不均匀的改善方法,其中,所述根据多个所述比值将所述振镜的转动范围划分为与所述比值对应的转动区间,包括:The method for improving uneven light intensity of stripes according to claim 7, wherein said dividing the rotation range of the vibrating mirror into rotation intervals corresponding to the ratios according to the plurality of ratios includes:
    对N个比值按照预设顺序进行排序,得到比值排序M 1、M 2、M 3……M N;其中,所述N为正整数;M为比值; Sorting the N ratios according to a preset order to obtain a ratio ranking M 1 , M 2 , M 3 ... M N ; wherein, the N is a positive integer; M is a ratio;
    对所述比值排序进行处理,得到目标比值排序M N、M N-1、M N-2……M 1、……M N-2、M N-1、M NProcessing the ratio rankings to obtain target ratio rankings M N , M N-1 , M N-2 ... M 1 , ... M N-2 , M N-1 , M N ;
    将所述转动范围划分为2N-1个转动区间,每个转动区间与所述目标比值排序中的比值一一对应。The rotation range is divided into 2N-1 rotation intervals, and each rotation interval is in one-to-one correspondence with the ratios in the target ratio sorting.
  9. 根据权利要求1至8所述的条纹光强不均匀的改善方法,其中,所述在沿垂直于所述光栅条纹的直线上取多个标定点,包括:The method for improving uneven light intensity of stripes according to claims 1 to 8, wherein said taking a plurality of calibration points along a straight line perpendicular to said grating stripes comprises:
    在沿垂直于所述光栅条纹的直线上均匀或随机选取多个标定点,其中,所述标定点的数量是所述光栅条纹数量的预设倍数以上。A plurality of calibration points are uniformly or randomly selected along a straight line perpendicular to the grating stripes, wherein the number of the calibration points is more than a preset multiple of the number of the grating stripes.
  10. 一种结构光深度相机,包括:A structured light depth camera, comprising:
    一个或多个处理器;one or more processors;
    存储装置,用于存储可执行指令,所述可执行指令在被所述处理器执行时,实现根据权利要求1至9中任一项所述的方法。A storage device for storing executable instructions, the executable instructions implement the method according to any one of claims 1 to 9 when executed by the processor.
  11. 一种计算机可读存储介质,其上存储有可执行指令,该可执行指令被处理器执行时实现根据权利要求1至9中任一项所述的方法。A computer-readable storage medium, on which executable instructions are stored, and the executable instructions implement the method according to any one of claims 1 to 9 when executed by a processor.
  12. 一种计算机程序,上述计算机程序包括计算机可执行指令,该计算机可执行指令在被执行时用于实现根据权利要求1至9中任一项所述的方法。A computer program comprising computer executable instructions for implementing the method according to any one of claims 1 to 9 when executed.
PCT/CN2022/131227 2021-11-10 2022-11-10 Method for improving uneven light intensity of stripes, camera, storage medium, and program WO2023083274A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111329098.1 2021-11-10
CN202111329098.1A CN116109492A (en) 2021-11-10 2021-11-10 Method, device, equipment, medium and camera for improving uneven stripe light intensity

Publications (1)

Publication Number Publication Date
WO2023083274A1 true WO2023083274A1 (en) 2023-05-19

Family

ID=86262578

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/131227 WO2023083274A1 (en) 2021-11-10 2022-11-10 Method for improving uneven light intensity of stripes, camera, storage medium, and program

Country Status (2)

Country Link
CN (1) CN116109492A (en)
WO (1) WO2023083274A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106405829A (en) * 2016-11-23 2017-02-15 青岛小优智能科技有限公司 Laser structure light 3D imaging method
CN111536902A (en) * 2020-04-22 2020-08-14 西安交通大学 Galvanometer scanning system calibration method based on double checkerboards
CN112799080A (en) * 2019-11-14 2021-05-14 深圳芯视微系统科技有限公司 Depth sensing device and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106405829A (en) * 2016-11-23 2017-02-15 青岛小优智能科技有限公司 Laser structure light 3D imaging method
CN112799080A (en) * 2019-11-14 2021-05-14 深圳芯视微系统科技有限公司 Depth sensing device and method
CN111536902A (en) * 2020-04-22 2020-08-14 西安交通大学 Galvanometer scanning system calibration method based on double checkerboards

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
XIE, ZEXIAO ET AL.: "Full Field Of View Laser Scanning System", JOURNAL OF MECHANICAL ENGINEERING, vol. 43, no. 11, 15 November 2007 (2007-11-15), XP009546122 *

Also Published As

Publication number Publication date
CN116109492A (en) 2023-05-12

Similar Documents

Publication Publication Date Title
CN109414145B (en) Speed measuring method based on optical flow sensor, slip detection method, movable electronic equipment, and path correction method and device
JP2015135294A (en) Three-dimensional shape measuring instrument and three-dimensional shape measurement method
US8909375B2 (en) Nodding mechanism for a single-scan sensor
US20120196679A1 (en) Real-Time Camera Tracking Using Depth Maps
US20210223056A1 (en) Method and apparatus for generating route planning model, and storage medium
US20190147624A1 (en) Method for Processing a Raw Image of a Time-of-Flight Camera, Image Processing Apparatus and Computer Program
CN111741286B (en) Geometric fusion of multiple image-based depth images using ray casting
CN106687887B (en) Projected interactive virtual desktop
Zuo et al. Devo: Depth-event camera visual odometry in challenging conditions
CN101589350A (en) Method and system for low speed control of a video surveillance system motor
CN105487555A (en) Hovering positioning method and hovering positioning device of unmanned aerial vehicle
KR20180040336A (en) Camera system and method for recognizing object thereof
CN103322937A (en) Method and device for measuring depth of object using structured light method
CN111578839B (en) Obstacle coordinate processing method and device, electronic equipment and readable storage medium
WO2019029991A1 (en) System and method for recalibrating a projector system
WO2023240918A1 (en) Display picture compensation method and apparatus, and electronic device and storage medium
CN113759342B (en) Laser radar scanning method and device, computer equipment and storage medium
WO2023083274A1 (en) Method for improving uneven light intensity of stripes, camera, storage medium, and program
CN108810499B (en) Correcting system for projection geometric deformation of optical fiber scanning imaging equipment
CN102385754A (en) Method and equipment for tracking object
JP2022034034A (en) Method for detecting obstacle, electronic device, roadside device and cloud control platform
US10499026B1 (en) Automation correction of projection distortion
WO2023202101A1 (en) A stroboscopic multiple fringe pattern modulation device based on incoherent light source
CN111819602A (en) Method for increasing point cloud sampling density, point cloud scanning system and readable storage medium
WO2023029277A1 (en) Projection method, apparatus and device, and storage medium

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: 22892067

Country of ref document: EP

Kind code of ref document: A1