Disclosure of Invention
In view of the above problems, an object of the present invention is to provide a method and an apparatus for testing interpupillary distance of AR glasses, so as to solve the problem that the AR glasses cannot be tested for interpupillary distance at present.
The invention provides a method for testing the interpupillary distance of AR glasses, which comprises the following steps:
controlling the camera to move a preset distance leftwards and rightwards respectively in the interpupillary distance direction of the AR glasses by taking the projection optical axis as the initial position of the camera and a preset step length as the moving distance, and taking the moving distance of each preset step length as the shooting position of the camera within the moved preset distance to shoot a projection picture projected on the lens of the AR glasses and obtain a shot picture of the corresponding shooting position;
performing definition analysis on the acquired shot picture to acquire a picture definition value of the shot picture at the corresponding shooting position;
acquiring a shooting position corresponding to a shooting picture with the highest picture definition value in all the shooting pictures according to the acquired picture definition values of the shooting pictures at the corresponding shooting positions;
and determining the interpupillary distance of the AR glasses according to the shooting position corresponding to the shooting picture with the highest picture definition value.
Further, a preferred embodiment is: in the process of controlling the camera to respectively move left and right by preset distances in the interpupillary distance direction of the AR glasses by taking the preset step length as the moving distance, setting the preset step length and the preset distance of the camera moving left in the interpupillary distance direction of the AR glasses as negative values, and setting the preset step length and the preset distance of the camera moving right in the interpupillary distance direction as positive values; the camera moves a preset distance leftwards in the direction of the interpupillary distance, namely the camera moves the preset distance from the initial position to the direction of the central line of the AR glasses lens; the camera moves to the right in the interpupillary distance direction by the preset distance means that the camera moves from the initial position to the direction in which the edge of the AR eyeglass lens is located by the preset distance.
Further, a preferred embodiment is: in the process of obtaining the shooting position corresponding to the shooting picture with the highest picture definition value in all the shooting pictures, curve fitting is carried out by taking the initial position as an original point, the shooting position of the camera as an X-axis coordinate and the picture definition value of the shooting picture at the corresponding shooting position as a Y-axis coordinate to obtain the vertex coordinate of the curve; the Y-axis coordinate value of the vertex coordinate is the shot picture with the highest picture definition value in all the shot pictures, and the X-axis coordinate of the vertex coordinate is the shooting position of the shot picture with the highest picture definition value.
Further, a preferred embodiment is: in the process of determining the interpupillary distance of the AR glasses according to the shooting position corresponding to the shooting picture with the highest definition value of the obtained picture, if the shooting position corresponding to the shooting picture with the highest definition value is in a preset test range, determining the interpupillary distance of the AR glasses according to the distance from a preset projection optical axis to the central line of the lens of the AR glasses and the shooting position corresponding to the shooting picture with the highest definition value; and if the shooting position corresponding to the shot picture with the highest definition value is not in the preset test range, determining that the AR glasses have the assembly problem.
Further, a preferred embodiment is: in the process of analyzing the definition of the acquired shot picture and acquiring the picture definition value of the shot picture at the corresponding shooting position, four areas, namely a picture center area and four picture corners, are selected from the shot picture as definition analysis points; and determining the picture definition value of the shot picture according to the definition value of each definition analysis point.
Further, a preferred embodiment is: in the process of determining the definition values of the pictures according to the definition values of all the definition analysis points, when the definition values of the definition analysis points in the center area of the pictures are all larger than the definition values of the definition analysis points in the four areas at the four corners of the pictures, and the difference value between the highest definition value of the definition analysis points in the four areas at the four corners of the pictures and the lowest definition value of the definition analysis points in the four areas at the four corners of the pictures is smaller than the preset range, the definition values of the pictures are the average values of the definition analysis points in the center area of the pictures and the definition values of the definition analysis points in the four areas at the four corners of the.
On the other hand, the invention provides an AR glasses interpupillary distance testing device, which utilizes the AR glasses interpupillary distance testing method to test the interpupillary distance of the AR glasses, and comprises a testing jig, a camera, a projection picture generating mechanism and an interpupillary distance analyzing mechanism; the testing jig is provided with a moving mechanism, the camera is fixed on the moving mechanism, the projection optical axis is used as the initial position of the camera, and the moving mechanism drives the camera to move left and right respectively by preset distances in the interpupillary distance direction of the AR glasses in preset steps; the projection picture generating mechanism is connected with the AR glasses to be detected and is used for controlling the AR glasses to be detected to generate projection pictures on the lenses so that the camera can shoot the generated projection pictures by taking the moving distance of each preset step length as a shooting position within a corresponding preset distance; the pupil distance analysis mechanism is connected with the camera and used for performing definition analysis on a shot picture shot by the camera, acquiring a shooting position corresponding to the shot picture with the highest picture definition value in the shot picture, and determining the pupil distance of the AR glasses to be detected according to the acquired shooting position of the shot picture with the highest definition value.
The method and the device for testing the interpupillary distance of the AR glasses provided by the invention control the camera to respectively move the preset distances leftwards and rightwards in the interpupillary distance direction of the AR glasses by taking the projection optical axis as the initial position of the camera and taking the preset step length as the moving distance, and shoot the projection picture projected on the lens of the AR glasses by taking the moving distance of each preset step length as the shooting position of the camera within the moved preset distance, so as to obtain the picture definition value of the shot picture at the corresponding shooting position; acquiring a shooting position corresponding to a shooting picture with the highest picture definition value in all the shooting pictures according to the acquired picture definition values of the shooting pictures at the corresponding shooting positions; and then determining the interpupillary distance of the AR glasses according to the shooting position corresponding to the shot picture with the highest picture definition value. The method and the device can realize the interpupillary distance test of the AR glasses, have high test precision, low cost and higher interpupillary distance test efficiency, and are suitable for testing the interpupillary distances of the AR glasses in large batch.
To the accomplishment of the foregoing and related ends, one or more aspects of the invention comprise the features hereinafter fully described. The following description and the annexed drawings set forth in detail certain illustrative aspects of the invention. These aspects are indicative, however, of but a few of the various ways in which the principles of the invention may be employed. Further, the present invention is intended to include all such aspects and their equivalents.
Detailed Description
Specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Aiming at the problem that the pupil distance test cannot be carried out on the AR glasses at present, the projection optical axis is taken as the initial position of the camera, the preset step length is taken as the moving distance to control the camera to respectively move the preset distances leftwards and rightwards in the pupil distance direction of the AR glasses, the moving distance of each preset step length is taken as the shooting position of the camera within the moved preset distance to shoot the projection picture projected on the lens of the AR glasses, and the picture definition value of the shot picture of the corresponding shooting position is obtained; acquiring a shooting position corresponding to a shooting picture with the highest picture definition value in all the shooting pictures according to the acquired picture definition values of the shooting pictures at the corresponding shooting positions; and then determining the interpupillary distance of the AR glasses according to the shooting position corresponding to the shot picture with the highest picture definition value. The method and the device can realize the interpupillary distance test of the AR glasses, have high test precision, low cost and higher interpupillary distance test efficiency, and are suitable for testing the interpupillary distances of the AR glasses in large batch.
Before explaining the method and the device for testing the interpupillary distance of the AR glasses provided by the invention, some concepts related in the invention are firstly explained, and for more clearly describing the concepts, fig. 1 shows the structure of the interpupillary distance according to the embodiment of the invention.
As shown in fig. 1, after the projection picture 3 is generated by the AR glasses, the projection picture is reflected to the human eyes 1 by the lenses 2 of the AR glasses, a virtual image is generated in front of the human eyes 1, and the virtual image is integrated with the real object in front of the eyes, so that the AR augmented reality effect is achieved. If twice the distance L1 from the projection optical axis 5 to the lens center position 4 is defined as the interpupillary distance of the AR glasses, then ideally, the projection optical axis 5 and the optical axis of the human eyes are coincident, and the interpupillary distance of the AR glasses can be measured by measuring the position of the projection optical axis.
It should be noted that the projection optical axis is a central line of the projection beam of the optical engine (here, the optical engine may be a camera or a human eye), and is a line perpendicular to the projection picture and passing through a central point of the projection picture.
Specifically, to describe the method for testing the interpupillary distance of the AR glasses provided by the present invention, fig. 2 shows a flow of the method for testing the interpupillary distance of the AR glasses according to the embodiment of the present invention.
As shown in fig. 2, the method for testing interpupillary distance of AR glasses provided by the present invention comprises:
s210: and taking the projection optical axis as the initial position of the camera, taking the preset step length as the moving distance to control the camera to respectively move the preset distance leftwards and rightwards in the interpupillary distance direction of the AR glasses, taking the moving distance of each preset step length as the shooting position of the camera to shoot the projection picture projected on the AR glasses lens within the moved preset distance, and acquiring the shooting picture of the corresponding shooting position.
In the process of controlling the camera to respectively move left and right by preset distances in the interpupillary distance direction of the AR glasses by taking the preset step length as the moving distance, setting the preset step length and the preset distance of the camera moving left in the interpupillary distance direction of the AR glasses as negative values, and setting the preset step length and the preset distance of the camera moving right in the interpupillary distance direction as positive values; the camera moves a preset distance leftwards in the direction of the interpupillary distance, namely the camera moves the preset distance from the initial position to the direction of the central line of the AR glasses lens; the camera moves to the right in the interpupillary distance direction by the preset distance means that the camera moves from the initial position to the direction in which the edge of the AR eyeglass lens is located by the preset distance.
S220: and analyzing the definition of the acquired shot picture to acquire the picture definition value of the shot picture at the corresponding shooting position.
The method comprises the steps that in the process of analyzing the definition of an acquired shot picture and acquiring the picture definition value of the shot picture at a corresponding shooting position, four areas, namely a picture center area and four picture corners, are selected from the shot picture as definition analysis points; and determining the picture definition value of the shot picture according to the definition value of each definition analysis point.
Further, in the process of determining the definition values of the pictures according to the definition values of all the definition analysis points, when the definition values of the definition analysis points in the center area of the picture are all larger than the definition values of the definition analysis points in the four areas at the four corners of the picture, and the difference value between the highest definition value of the definition analysis points in the four areas at the four corners of the picture and the lowest definition value of the definition analysis points in the four areas at the four corners of the picture is smaller than the preset range, the definition values of the pictures are the average value of the definition values of the definition analysis points in the center area of the picture and the definition values of the definition analysis points in the four areas at the four corners of the picture.
S230: and acquiring the shooting position corresponding to the shooting picture with the highest picture definition value in all the shooting pictures according to the acquired picture definition values of the shooting pictures at the corresponding shooting positions.
In the process of obtaining the shooting position corresponding to the shooting picture with the highest picture definition value in all the shooting pictures, curve fitting is carried out by taking the initial position as the origin, the shooting position of the camera as an X-axis coordinate and the picture definition value of the shooting picture at the corresponding shooting position as a Y-axis coordinate to obtain the vertex coordinate of the curve; the Y-axis coordinate of the vertex coordinate is the shooting position of the shooting picture with the highest picture definition value in all the shooting pictures, and the X-axis coordinate of the vertex coordinate is the shooting position of the shooting picture with the highest picture definition value.
S240: and determining the interpupillary distance of the AR glasses according to the shooting position corresponding to the shooting picture with the highest picture definition value.
In the process of determining the interpupillary distance of the AR glasses according to the shooting position corresponding to the shooting picture with the highest definition value of the obtained picture, if the shooting position corresponding to the shooting picture with the highest definition value is in a preset test range, determining the interpupillary distance of the AR glasses according to the distance from a preset projection optical axis to the central line of the lens of the AR glasses and the shooting position corresponding to the shooting picture with the highest definition value; and if the shooting position corresponding to the shot picture with the highest definition value is not in the preset test range, determining that the AR glasses have the assembly problem.
The preset test range needs to be determined according to the design specification of the specific AR glasses and the allowable pupil distance tolerance value thereof, for example, if the distance L1 from the projection optical axis of a certain type of AR glasses to the lens center position is set to be 30mm, and the allowable pupil distance tolerance value of the certain type of AR glasses is set to be ± 5mm, then the section of the preset test range is (25, 35).
The method for testing the interpupillary distance of the AR glasses provided by the invention is described in detail by way of example with reference to fig. 1 and 2. The method comprises the following specific steps:
according to the design specification of the AR glasses, the preset test range is (L1+ a, L1-a), wherein L1 is the distance from the projection optical axis of the AR glasses to the center position of the lens, and a is the allowed pupil distance tolerance value of the AR glasses. When testing the interpupillary distance of the AR glasses, firstly, taking a projection optical axis as an initial position of a camera, and controlling the camera to respectively move a distance b leftwards and rightwards in the interpupillary distance direction of the AR glasses by taking k as a step length, wherein b is larger than a.
For example, when the camera moves to the left in the pupil distance direction of the AR glasses, the camera performs moving shooting with a step size of-2 mm within a distance of-10 mm, and when the camera moves to the left in the pupil distance direction of the AR glasses, there are 5 shooting positions of the camera, and the moving distance corresponding to each shooting position is LC 1-2 mm, LC 2-4 mm, LC 3-6 mm, LC 4-8 mm, and LC 5-10 mm; similarly, when the camera moves to the right in the interpupillary direction of the AR glasses, and performs moving shooting with a step size of 2mm within a distance of 10mm, when the camera moves to the right in the interpupillary direction of the AR glasses, there are 5 shooting positions of the camera, and the moving distance corresponding to each shooting position is RC 1-2 mm, RC 2-4 mm, RC 3-6 mm, RC 4-8 mm, and RC 5-10 mm.
Through the movement of the camera, the shot picture can show a variable process of unclear-clear-unclear, and through obtaining the moving distance corresponding to each shooting position and the definition value of the shot picture shot at the shooting position, a definition curve which takes the initial position of the camera as the origin, the shooting position as the X axis and the picture definition value of the shot picture at the corresponding shooting position as the Y axis can be fitted, the definition curve is similar to a parabola, the shooting position of the X-axis coordinate of the vertex of the parabola is in the range of (L1+ a, L1-a), and the interpupillary distance of the AR glasses is twice of the sum of the moving distances corresponding to the shooting positions of the L1 and the X-axis coordinate of the vertex.
For example, in the above description, it is found by curve fitting that when the moving distance corresponding to the shooting position is LC3, the sharpness value of the shot picture taken by the camera is the highest, and the shooting position is within the range of (L1+ a, L1-a), then the interpupillary distance of the AR glasses is (L1+ LC3) × 2; if the imaging position is out of the range of (L1+ a, L1-a), it is necessary to check the structural dimensions of the key components of the AR glasses, the assembly error, and the like, which explains the problem of the interpupillary distance of the AR glasses.
Further, when the definition of the obtained shot picture is analyzed to obtain the picture definition value of the shot picture at the corresponding shooting position, four areas, namely a picture center area and four picture corners, are selected from the shot picture as definition analysis points; for example, assuming that the definition values of the definition analysis points in the central region of the shot picture are P1, and the definition values of the definition analysis points in the four regions of the four corners of the shot picture are P2, P3, P4 and P5, respectively, it can be known from the imaging principle of a camera and an optical machine that the definition value P1 of the definition analysis points in the central region of the picture is the highest, and therefore, in the process of obtaining the definition values of the shot picture at the corresponding shooting position, it is required to satisfy that P1 is greater than P2, P3, P4 and P5.
In addition, in order to ensure that the projection optical axis is not inclined vertically, the extreme difference R of the definition values of the definition analysis points of the four regions at the four corners of the picture needs to be smaller than K, wherein K is a constant, namely, on the premise that P1 is greater than P2, P3, P4 and P5, the difference R between the maximum value of P2-P5 and the minimum value of P2-P5 needs to be smaller than K, so that the picture definition value of the shot picture at the corresponding shooting position can be determined to be the average value of P1-P5.
In accordance with the above method, the present invention provides an AR glasses interpupillary distance measuring device for measuring the interpupillary distance of the AR glasses by using the above AR glasses interpupillary distance measuring method. Fig. 3 shows a structure of an AR glasses interpupillary distance testing apparatus according to an embodiment of the present invention.
As shown in fig. 3, the pupil distance testing device of the AR glasses provided by the present invention includes a testing fixture 31, a camera 32, a projection picture generating mechanism and a pupil distance analyzing mechanism; the AR glasses to be tested are fixed on the test fixture 31, a moving mechanism (not shown in the figure) is arranged on the test fixture 31, the camera is fixed on the moving mechanism, the projection optical axis 5 is used as an initial position of the camera, and the camera is driven by the moving mechanism to move left and right respectively by preset distances in the interpupillary distance direction of the AR glasses in a preset step length; the projection picture generating mechanism is connected with the AR glasses to be detected and is used for controlling the AR glasses to be detected to generate a projection picture 3 on the lens 2 so that the camera 32 can shoot the generated projection picture by taking the moving distance of each preset step length as a shooting position within a corresponding preset distance; the pupil distance analysis mechanism is connected with the camera 32 and is used for performing definition analysis on the shot picture shot by the camera 32, acquiring the shooting position corresponding to the shot picture with the highest picture definition value in the shot picture, and determining the pupil distance of the AR glasses to be detected according to the obtained shooting position of the shot picture with the highest definition value.
The projection image generating means and the interpupillary distance analyzing means are provided in the control system 33, which may be a computer, an industrial personal computer, or the like.
The pupil distance analysis mechanism further comprises a picture definition value acquisition module (not shown in the figure), and the definition value acquisition module is used for acquiring the definition value of a shot picture shot by the camera; in the process of obtaining the definition value of a shot picture shot by a camera, four areas, namely a picture center area and four picture corners, are selected from the shot picture as definition analysis points, and the picture definition value of the shot picture is determined according to the definition value of each definition analysis point.
Specifically, in the process of determining the definition values of the pictures according to the definition values of all the definition analysis points, when the definition values of the definition analysis points in the center area of the picture are all larger than the definition values of the definition analysis points in the four areas at the four corners of the picture, and the difference value between the highest definition value in the definition analysis points in the four areas at the four corners of the picture and the lowest definition value in the definition analysis points in the four areas at the four corners of the picture is smaller than the preset range, the definition value of the pictures is the average value of the definition values of the definition analysis points in the center area of the picture and the definition values of the definition analysis points in the four areas at the four corners of the picture.
Therefore, the method and the device for testing the interpupillary distance of the AR glasses are not influenced by the shape, the size and the interpupillary distance range of the AR glasses to be tested, are simple to operate, have strong passing performance, and can test the interpupillary distance of the AR glasses in large batch with high precision and low cost.
The method and apparatus for testing the interpupillary distance of AR glasses according to the present invention are described above by way of example with reference to the accompanying drawings. However, it should be understood by those skilled in the art that various modifications may be made to the method and apparatus for testing the pupil distance of the AR glasses without departing from the scope of the present invention. Therefore, the scope of the present invention should be determined by the contents of the appended claims.