Optical index test method and device, wearable display equipment and storage medium

By capturing and aligning images from different perspectives, determining the image gradient direction, and gradually reducing pixel values ​​to generate a stitched image, the problem of pixel value jumps at the stitching line in existing technologies is solved, thus improving the accuracy of optical index testing.

CN121962035APending Publication Date: 2026-05-01GEER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GEER TECH CO LTD
Filing Date
2025-12-29
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing technology causes pixel values ​​to jump on both sides of the splicing line in the overlapping area, which affects the accuracy of optical index testing.

Method used

The test image card is photographed from different angles to obtain at least two images to be stitched together; the images to be stitched together are aligned to form an overlapping area; the image gradient direction of each repeated image in the overlapping area is determined, and the pixel value of the repeated image is gradually reduced according to the direction, and the pixel values ​​are superimposed to generate a stitched image.

Benefits of technology

This effectively avoids pixel value jumps at the splicing line and improves the accuracy of optical index testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121962035A_ABST
    Figure CN121962035A_ABST
Patent Text Reader

Abstract

The invention discloses an optical index testing method and device, wearable display equipment and a storage medium, and the method comprises the steps: carrying out the shooting of a test graphic card at different visual angles, and obtaining at least two to-be-spliced images; aligning the images to be spliced to form an overlapping region; the image gradual change direction of each repeated image in the overlapping area is determined, and the image gradual change direction is the direction from the to-be-spliced image side from which the repeated image comes to the other adjacent to-be-spliced image side; the pixel values of the corresponding repeated images are gradually reduced in the overlapping area according to the image gradual change direction, the pixel values of the repeated images are overlapped, a spliced image is generated, and the overlapped pixel values of the repeated images in the overlapping area are consistent with the pixel values of the to-be-spliced images; the optical index is tested according to the spliced image, so that an obvious boundary trace is prevented from appearing at the splicing line of the overlapped region, and the accuracy of the optical index test is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of virtual reality technology, and in particular to an optical index testing method, apparatus, wearable display device, and storage medium. Background Technology

[0002] With the rapid development of Virtual Reality (VR) technology, the requirements for optical performance testing of VR devices are increasing. Optical test charts, which are calibration boards printed with standard patterns, are an important tool for evaluating the imaging quality of VR devices. They need to cover a large field of view to comprehensively test various optical indicators of VR devices.

[0003] Due to the limited field of view of VR devices, a single shot cannot capture the entire optical test chart; therefore, multi-view shooting followed by image stitching is necessary. To accurately stitch two images together, it is essential that adjacent images have a significant overlap during shooting. This overlap consists of repeated images from each other (e.g., the left half of the right image and the right half of the left image capture the same area of ​​the chart). Existing technology arbitrarily selects a line within the overlapping area as the stitching line. All pixels to the left of this line are filled with the left image, and all pixels to the right are filled with the right image, thus completing the geometric stitching of the two images.

[0004] However, since the two images were taken from different perspectives, even for the same physical point, the imaging will have slight differences due to inherent imaging characteristics such as lens vignetting, lighting angle, or sensor response. This causes the pixel values ​​on both sides of the stitching line in the overlapping area to jump, and obvious boundary marks to appear at the stitching line, affecting the accuracy of optical index testing. Summary of the Invention

[0005] The main objective of this application is to provide an optical index testing method, apparatus, wearable display device, and storage medium, aiming to solve the technical problem in the prior art where pixel values ​​on both sides of the splicing line in the overlapping area jump, resulting in obvious boundary marks at the splicing line and affecting the accuracy of optical index testing.

[0006] To achieve the above objectives, this application proposes an optical index testing method, which is applied to wearable display devices, and the method includes: Take photos of the test image card from different angles to obtain at least two images to be stitched together; The images to be stitched are aligned to form an overlapping region, which includes repeating images from the images to be stitched. Determine the image gradient direction of each repeated image in the overlapping region. The image gradient direction is the direction from the side of the image to be stitched from which the repeated image originates, to the side of another adjacent image to be stitched. In the overlapping region, the pixel values ​​of the corresponding repeating images are gradually reduced according to the image gradient direction, and the pixel values ​​of each repeating image are superimposed to generate a stitched image. The pixel values ​​of each repeating image in the overlapping region are superimposed and are consistent with the pixel values ​​of each image to be stitched. Optical parameters are tested based on the stitched image.

[0007] In one embodiment, the images to be stitched include a first image to be stitched and a second image to be stitched, and the step of aligning the images to be stitched to form an overlapping region includes: Obtain a first reference image corresponding to the same viewpoint as the first image to be stitched, and a second reference image corresponding to the same viewpoint as the second image to be stitched; The first geometric transformation relationship between different viewpoints is determined based on the feature correspondence between the first reference image and the second reference image; The first image to be stitched is projected onto the first canvas according to the first geometric transformation relationship, and the second image to be stitched is placed at the corresponding position on the second canvas, so that the image data in the first canvas and the second canvas form an overlapping area; The overlapping region includes a first repeating image from the first canvas and a second repeating image from the second canvas.

[0008] In one embodiment, the step of projecting the first image to be stitched onto the first canvas according to the first geometric transformation relationship, and placing the second image to be stitched at the corresponding position on the second canvas, so that the image data on the first canvas and the second canvas form an overlapping area, includes: The offset information between different viewpoints is determined based on the first geometric transformation relationship; The first geometric transformation relationship is updated based on the offset information to obtain the second geometric transformation relationship; The first image to be stitched is projected onto the first canvas according to the second geometric transformation relationship; The second image to be stitched is placed at the corresponding position in the second canvas according to the offset information, so that the image data in the first canvas and the second canvas form an overlapping area.

[0009] In one embodiment, the step of determining the offset information between different viewpoints based on the first geometric transformation relationship includes: Determine the preset coordinate points in the first reference image; The mapping coordinates of the preset coordinate points in the second reference image are determined based on the first geometric transformation relationship; Offset information is determined based on the preset coordinate point and the mapped coordinate point.

[0010] In one embodiment, the step of progressively reducing the pixel values ​​of corresponding repeating images in the overlapping region according to the image gradient direction, and superimposing the pixel values ​​of each repeating image to generate a stitched image includes: The seam position of the overlapping area is determined based on the offset information; Extend the preset sliding window width to both sides of the seam position to form a fusion transition area in the overlapping area; In the fusion transition region, the pixel values ​​of the corresponding repeating images are gradually reduced according to the image gradient direction, and the pixel values ​​of each repeating image are superimposed to generate a stitched image.

[0011] In one embodiment, the step of gradually reducing the pixel values ​​of corresponding repeating images in the fusion transition region according to the image gradient direction, and superimposing the pixel values ​​of each repeating image to generate a stitched image, includes: A first fusion weight distribution is generated for the first repeated image in the fusion transition region. The weight values ​​of the first fusion weight distribution gradually decrease from a first value to a second value along the gradient direction of the first image. The gradient direction of the first image points from the image data distribution side in the first canvas to the image data distribution side in the second canvas. A second fusion weight distribution is generated for the second repeated image in the fusion transition region. The weight values ​​of the second fusion weight distribution gradually decrease from the first value to the second value along the gradient direction of the second image. The gradient direction of the second image points from the image data distribution side in the second canvas to the image data distribution side in the first canvas. The pixel values ​​in the fusion transition region are weighted and summed according to the first weight distribution and the second weight distribution to generate a stitched image.

[0012] In one embodiment, the step of generating a stitched image by weighted summation of corresponding pixel values ​​in the fusion transition region according to the first weight distribution and the second weight distribution includes: The pixel values ​​of the first repeated image are weighted according to the first fusion weight distribution to obtain the first weighted image; The pixel values ​​of the second repeated image are weighted according to the second fusion weight distribution to obtain the second weighted image; The first weighted image and the second weighted image are superimposed to generate a stitched image.

[0013] Furthermore, to achieve the above objectives, this application also proposes an optical index testing device, the device comprising: The image acquisition module is used to capture images of the test chart from different perspectives to obtain at least two images to be stitched together. An image alignment module is used to align the images to be stitched together to form an overlapping region, wherein the overlapping region includes repeating images from the images to be stitched together. The direction determination module is used to determine the image gradient direction of each repeated image in the overlapping area. The image gradient direction is the direction from the side of the image to be stitched from which the repeated image originates, to the side of another adjacent image to be stitched. An image stitching module is used to gradually reduce the pixel values ​​of corresponding repeating images in the overlapping area according to the image gradient direction, and to superimpose the pixel values ​​of each repeating image to generate a stitched image. The superimposed pixel values ​​of each repeating image in the overlapping area are consistent with the pixel values ​​of each image to be stitched. The index testing module is used to test optical indexes based on the stitched image.

[0014] In addition, to achieve the above objectives, this application also proposes a wearable display device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the optical index testing method as described above.

[0015] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the optical index testing method described above.

[0016] One or more technical solutions proposed in this application have at least the following technical effects: This application obtains at least two images to be stitched by photographing a test image card from different perspectives; aligns the images to be stitched to form an overlapping region, which includes repeated images from each image to be stitched; determines the image gradient direction of each repeated image in the overlapping region, the image gradient direction being the direction from the side of the image to be stitched from the side of the repeated image to the side of the adjacent image to be stitched; gradually reduces the pixel value of the corresponding repeated image in the overlapping region according to the image gradient direction, and superimposes the pixel values ​​of each repeated image to generate a stitched image, the superimposed pixel values ​​of each repeated image in the overlapping region being consistent with the pixel values ​​of each image to be stitched; and tests optical indicators based on the stitched image. Compared to existing technologies, this application eliminates the need to select stitching lines within the overlapping area. By configuring an image gradient direction for each repeating image in the overlapping area, this gradient direction points from the side of the image to be stitched to the side of the adjacent image to be stitched. By gradually reducing the pixel values ​​of each repeating image in the overlapping area according to the image gradient direction, the pixel values ​​of each repeating image in the generated stitched image are superimposed and consistent with the pixel values ​​of each image to be stitched. This avoids the situation where pixel values ​​jump on both sides of the stitching line in the overlapping area, resulting in obvious boundary marks at the stitching line, and effectively improves the accuracy of optical index testing. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating the first embodiment of the optical performance testing method of this application; Figure 2 The image to be stitched is shown from the left-hand perspective of the optical testing method of this application. Figure 3 The image to be stitched is shown from the right perspective in the optical testing method of this application; Figure 4 This is a flowchart illustrating the second embodiment of the optical index testing method of this application; Figure 5 This is a schematic diagram of canvas expansion in the second embodiment of this application; Figure 6 This is a flowchart illustrating the third embodiment of the optical performance testing method of this application; Figure 7 This is a schematic diagram of the first fusion weight distribution in the third embodiment of this application; Figure 8 This is a schematic diagram of the second fusion weight distribution in the third embodiment of this application; Figure 9 This is a schematic diagram of the module structure of the optical performance testing device of this application; Figure 10 This is a schematic diagram of the wearable display device of this application.

[0020] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0021] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0022] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0023] The main solution of this application embodiment is as follows: The test image card is photographed from different perspectives to obtain at least two images to be stitched; the images to be stitched are aligned to form an overlapping region, which includes repeated images from each image to be stitched; the image gradient direction of each repeated image in the overlapping region is determined, the image gradient direction being the direction from the side of the image to be stitched from which the repeated image originates, pointing to the side of another adjacent image to be stitched; the pixel values ​​of the corresponding repeated images are gradually reduced in the overlapping region according to the image gradient direction, and the pixel values ​​of each repeated image are superimposed to generate a stitched image, the superimposed pixel values ​​of each repeated image in the overlapping region being consistent with the pixel values ​​of each image to be stitched; and optical indicators are tested based on the stitched image.

[0024] Because existing technology arbitrarily selects a line as the stitching line within the overlapping area, and because the two images are taken from different perspectives, even for the same physical point, the imaging will have slight differences due to inherent imaging characteristics such as lens vignetting, lighting angle, or sensor response. This causes the pixel values ​​on both sides of the stitching line in the overlapping area to jump, resulting in obvious boundary marks at the stitching line and affecting the accuracy of optical index testing.

[0025] This application provides a solution that eliminates the need to select a stitching line within the overlapping area. By configuring an image gradient direction for each repeating image in the overlapping area, this gradient direction points from the side of the image to be stitched to the side of the adjacent image to be stitched. By gradually reducing the pixel values ​​of each repeating image in the overlapping area according to the image gradient direction, the pixel values ​​of each repeating image in the generated stitched image are superimposed and match the pixel values ​​of each image to be stitched. This avoids abrupt changes in pixel values ​​on both sides of the stitching line in the overlapping area, preventing obvious boundary marks at the stitching line and effectively improving the accuracy of optical index testing.

[0026] It should be noted that the executing entity in this embodiment can be a wearable display device with data processing, network communication, and program execution functions. Wearable display devices specifically refer to devices whose optical imaging systems require performance testing, such as VR devices and augmented reality (AR) glasses. Those skilled in the art will understand that when performing similar optical tests on other types of electronic devices (such as tablets, personal computers, and mobile phones), it is sufficient to treat them as the object under test and adapt them to this method; the core process and steps of the method remain unchanged.

[0027] Based on this, embodiments of this application provide an optical index testing method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the optical performance testing method of this application.

[0028] In this embodiment, the optical index testing method is applied to a wearable display device, including steps S10~S50: Step S10: Take pictures of the test image card from different angles to obtain at least two images to be stitched together.

[0029] It should be noted that the test pattern card can be a flat card plate with a specific optical test pattern precisely printed on it.

[0030] Understandably, the image to be stitched together can be a digital photograph containing a standard optical test pattern, captured by the lens of the wearable display device itself.

[0031] In practice, the wearable display device is fixed on a test platform whose rotation or translation can be precisely controlled, ensuring that its optical center (lens) maintains a defined relative relationship with the test chart plane. The test platform moves the wearable display device sequentially to at least two different preset viewing angle positions. At each viewing angle position, the wearable display device's built-in camera captures images of the test chart in front of it, obtaining at least two images to be stitched together. To ensure correct stitching of subsequent images, the shooting ranges of adjacent viewing angles must partially overlap, meaning that adjacent images to be stitched together must contain the same area of ​​content on the test chart.

[0032] For example, refer to Figure 2 and Figure 3 , Figure 2 The image to be stitched is shown from the left-hand perspective of the optical testing method described in this application. Figure 3 This is the image to be stitched from the right-angle view in the optical testing method of this application. It was obtained by first moving the wearable display device to the left-angle view for shooting. Figure 2 The image to be stitched, shown in the left-view image, was then captured by moving the wearable display device to the right-view perspective. Figure 3 The image to be stitched is shown from the right perspective.

[0033] The image to be stitched was obtained by photographing the test chart; therefore, the content on the test chart is identical to the image to be stitched. This can be used as a reference. Figure 2 or Figure 3 The patterns on the test chart illustrate the test pattern. Specifically, the test chart is printed with precise standard test patterns. These standard test patterns include, but are not limited to: checkerboard patterns (for geometric calibration and distortion analysis), resolution line pairs (for sharpness and modulation transfer function analysis), and grayscale levels and color blocks (for color and contrast response analysis). Because all the standard test patterns and their physical dimensions on this test chart are precisely known references, when the image is captured by the lens of a wearable display device and then stitched together, the difference between the captured image and the standard test patterns on the test chart can be used to quantitatively calculate the deviation of various optical indicators of the device. Due to the limited field of view of wearable display devices, a single shot cannot cover the entire test chart; therefore, multiple shots from different angles must be taken and subsequently stitched together to obtain a complete test image for comprehensive evaluation.

[0034] Among them, the aforementioned optical indicators can be key parameters for evaluating the imaging quality of wearable display devices, including but not limited to: distortion (geometric error describing the curvature of a straight line after it is imaged by a lens), resolution (an indicator describing the lens's ability to resolve details and its contrast transfer characteristics), viewing angle (describing the range of images that a single eye can see), and color uniformity (describing the consistency of colors in different areas of the image and the color shift at the edges).

[0035] Step S20: Align each of the images to be stitched together to form an overlapping region, wherein the overlapping region includes repeated images from each of the images to be stitched together.

[0036] In practical implementation, wearable display devices can perform spatial coordinate transformation on each image to be stitched based on pre-calibrated feature correspondences between different viewpoints, transforming each image to be stitched into a unified coordinate system to achieve alignment. After alignment, the same test image area, originally captured by different viewpoints in the physical world, will occupy the same or highly overlapping positions in the unified coordinate system, and this overlapping area automatically forms the overlapping region.

[0037] It should be understood that duplicate images are image contents from different images to be stitched together, but actually originating from the same area of ​​the test chart, within the overlapping region. For example, the rightmost part of the image to be stitched from the left perspective and the leftmost part of the image to be stitched from the right perspective spatially correspond to the same central area of ​​the test chart; these two parts constitute a pair of duplicate images. Essentially, each duplicate image is an image version with slight differences in pixel values ​​generated after the same physical pattern is captured by lenses from different perspectives. These differences stem from inherent imaging variations such as lens vignetting, perspective, and lighting.

[0038] Step S30: Determine the image gradient direction of each repeated image in the overlapping region.

[0039] The image gradient direction is from the side of the image to be stitched, which is the source of the repeating image, to the side of another adjacent image to be stitched.

[0040] It should be noted that the image gradation direction is a spatial direction defined individually for each repeating image within the overlapping region. That is, for any repeating image within the overlapping region, its image gradation direction is defined as pointing from the main distribution side of the image to be stitched from which the repeating image originates in space to the main distribution side of another adjacent image to be stitched.

[0041] For example, in a scenario where left and right perspectives are stitched together: for repeated images originating from the left perspective, the image gradient direction is from left to right (i.e., from the left perspective image side to the right perspective image side). For repeated images originating from the right perspective, the image gradient direction is from right to left (i.e., from the right perspective image side to the left perspective image side), meaning that the image gradient directions of adjacent images to be stitched together are opposite.

[0042] Step S40: In the overlapping area, the pixel values ​​of the corresponding repeating images are gradually reduced according to the image gradient direction, and the pixel values ​​of each repeating image are superimposed to generate a stitched image.

[0043] The pixel values ​​of the repeated images in the overlapping region are superimposed and are consistent with the pixel values ​​of the images to be stitched together.

[0044] In practical implementation, wearable display devices can gradually reduce pixel values ​​within the overlapping region along their respective image gradient directions, based on the image gradient direction of each repeating image. For example, a decay function that directly affects pixel values ​​can be constructed, ensuring that the pixel values ​​of each repeating image in the overlapping region smoothly decay from high to low along the image gradient direction. Furthermore, the decay trends of adjacent images to be stitched are complementary, and their change amplitudes are matched, ensuring that for any position within the overlapping region, the pixel value of the superimposed images can be a constant value, and this constant value is consistent with the pixel values ​​of each image to be stitched in the non-overlapping region.

[0045] It should be understood that at the initial boundary of the overlapping region (the side closer to the main distribution side of the image to be stitched), the fusion result approaches the pixel values ​​of the image to be stitched entirely, thus smoothly connecting with the non-overlapping areas from that image. At the final boundary of the overlapping region (the side closer to the adjacent image), the fusion result approaches the pixel values ​​of the adjacent image to be stitched entirely. Throughout the overlapping region, each final output pixel value is fused from the pixel values ​​of each image to be stitched in a continuously varying proportion, thus visually creating a seamless and natural transition from one image to another, eliminating hard seams caused by abrupt changes in pixel values.

[0046] Step S50: Test the optical parameters based on the stitched image.

[0047] In practical implementation, wearable display devices can quantitatively calculate the deviation of various optical indicators by comparing the differences between the stitched image and the standard test pattern on the test chart, thereby evaluating the optical indicators based on the degree of deviation. For example, the distortion distribution of the lens can be calculated by detecting the deformation of standard geometric patterns such as checkerboard or dot matrix in the stitched image; the sharpness can be evaluated by plotting the modulation transfer function curve by analyzing the contrast attenuation of resolution line pairs at different spatial frequencies; the actual field of view of the device can be calculated by identifying the complete visible boundary of the test chart in the image; and the accuracy of color reproduction and screen uniformity can be evaluated by comparing the imaging data of color and grayscale areas.

[0048] This embodiment obtains at least two images to be stitched by photographing the test image card from different perspectives; aligns the images to be stitched to form an overlapping region, which includes repeated images from each image to be stitched; determines the image gradient direction of each repeated image in the overlapping region, the image gradient direction being the direction from the side of the image to be stitched from the side of the repeated image to the side of the adjacent image to be stitched; gradually reduces the pixel value of the corresponding repeated image in the overlapping region according to the image gradient direction, and superimposes the pixel values ​​of each repeated image to generate a stitched image, the superimposed pixel values ​​of each repeated image in the overlapping region being consistent with the pixel values ​​of each image to be stitched; and tests the optical indicators based on the stitched image. Compared to existing technologies, this embodiment eliminates the need to select stitching lines within the overlapping area. By configuring an image gradient direction for each repeating image in the overlapping area—the gradient direction pointing from the side of the image to be stitched to the side of the adjacent image to be stitched—the pixel values ​​of each repeating image are gradually reduced in the overlapping area according to the image gradient direction. This ensures that the pixel values ​​of each repeating image in the generated stitched image are consistent with the pixel values ​​of each image to be stitched. This avoids abrupt changes in pixel values ​​on both sides of the stitching line in the overlapping area, preventing obvious boundary marks at the stitching line and effectively improving the accuracy of optical index testing.

[0049] Based on the first embodiment of this application, a second embodiment of this application is proposed. In the second embodiment, content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 4 , Figure 4 This is a flowchart illustrating the second embodiment of the optical index testing method of this application.

[0050] In this embodiment, the images to be stitched include a first image to be stitched and a second image to be stitched, and step S20 includes steps S201 to S203: Step S201: Obtain a first reference image corresponding to the same viewpoint as the first image to be stitched, and a second reference image corresponding to the same viewpoint as the second image to be stitched.

[0051] It should be noted that the first image to be stitched and the second image to be stitched can be adjacent images to be stitched, such as the image to be stitched from the left perspective and the image to be stitched from the right perspective.

[0052] In practical implementation, a dedicated feature map card can be placed at the test position. The wearable display device is then controlled to move sequentially to a first viewpoint and a second viewpoint. The wearable display device captures an image of the feature map card from the first viewpoint to obtain a first reference image, and then captures an image of the feature map card from the second viewpoint to obtain a second reference image. Subsequently, without moving the wearable display device and the test platform, the feature map card is replaced with a test map card. Then, the wearable display device is again controlled to move sequentially to the same first and second viewpoints for a second capture. Specifically, the wearable display device captures an image of the test map card from the first viewpoint to obtain a first image to be stitched, and then captures an image of the test map card from the second viewpoint to obtain a second image to be stitched.

[0053] The aforementioned feature card can be a planar image printed with a non-repeating pattern (such as randomly distributed dots, special QR codes, or ArUco marks) that is easily recognized and distinguished by the processor of a wearable display device.

[0054] Step S202: Determine the first geometric transformation relationship between different viewpoints based on the feature correspondence between the first reference image and the second reference image.

[0055] It should be noted that the first geometric transformation relationship can be described as a feature correspondence relationship for transforming images from different viewpoints. It defines how any point on the first reference image is mapped to the corresponding position on the second reference image through projection transformation, that is, it describes the imaging correspondence of the same physical plane (test chart) under two viewpoints. This first geometric transformation relationship can be mathematically expressed as a homography matrix describing all perspective deformations from the first viewpoint to the second viewpoint, comprehensively characterizing all geometric deformations such as rotation, translation, scaling, affine transformation, and perspective caused by changes in viewpoint.

[0056] In practical implementation, wearable display devices can use feature extraction algorithms (such as scale-invariant feature transform algorithms) to detect salient and unique feature points from the first and second reference images, respectively, and generate feature descriptors for each key point. Subsequently, by comparing the similarity between the feature descriptors in the first and second reference images, a preliminary correspondence is established between the first and second reference images, forming a series of feature point matching pairs.

[0057] Since the initial matching will contain erroneous points (i.e., mismatched points), a robust estimation algorithm (such as the random sampling consensus algorithm) can then be used to find the correct matching point pairs that satisfy the geometric transformation relation for the largest number of feature matching point pairs, thereby automatically eliminating erroneous matching pairs (outliers). Finally, based on the selected correct matching point pairs, the optimal homography matrix is ​​calculated using the least squares method or other optimization algorithms. This homography matrix is ​​the first geometric transformation relation.

[0058] Step S203: Project the first image to be stitched onto the first canvas according to the first geometric transformation relationship, and place the second image to be stitched at the corresponding position in the second canvas, so that the image data in the first canvas and the second canvas form an overlapping area.

[0059] The overlapping region includes a first repeated image from the first canvas and a second repeated image from the second canvas. The first repeated image comes from a first image to be stitched together, and the second repeated image comes from a second image to be stitched together. The image content of both the first and second repeated images originates from the same test chart area.

[0060] In its implementation, the wearable display device can perform a projection transformation on the first image to be stitched using a unified coordinate system based on the second viewpoint and a first geometric transformation relationship. This transformation recalculates the position of each pixel in the first image to be stitched in the new coordinate system of the first canvas, according to its perspective relationship with the second viewpoint. After this transformation, the first image to be stitched is projected onto the first canvas, and its geometric shape is consistent with the image that should be generated by perspective projection of the original test chart from the second viewpoint, that is, the perspective distortion caused by the difference in viewpoint is corrected, aligning it with the imaging plane of the second viewpoint.

[0061] Meanwhile, since the second viewpoint uses a unified coordinate system, the wearable display device can directly place the second image to be stitched onto the corresponding position on the second canvas by copying it, that is, the origin of the second image to be stitched is aligned with the origin of the second canvas coordinate system. Because the first geometric transformation describes the imaging correspondence of the same physical plane (test chart) under two viewpoints, the image data of the first image to be stitched projected onto the second canvas and the image data of the second image to be stitched directly placed on the second canvas will have a spatially consistent overlapping area.

[0062] It should be understood that, using a unified coordinate system based on the first viewpoint, the second image to be stitched can be projected onto the first canvas according to the first geometric transformation relationship, and the first image to be stitched can be placed at the corresponding position on the second canvas, so that the image data on the first canvas and the second canvas form an overlapping area. The specific process can be referred to the above description, and will not be repeated here. In this embodiment, the following description uses a unified coordinate system based on the second viewpoint.

[0063] In one feasible implementation, step S203 includes steps S2031 to S2034: Step S2031: Determine the offset information between different viewpoints based on the first geometric transformation relationship.

[0064] It should be noted that the offset information can be a translation vector that quantifies the relative rigid positional relationship between two different imaging viewpoints.

[0065] In a specific implementation, the wearable display device can perform parameter analysis on the first geometric transformation relationship, determine the mathematical structure of the first geometric transformation relationship (e.g., perform parameter decoupling or specific operations on the homography matrix), and extract the translation parameters describing the displacement of the origin from the mathematical structure of the first geometric transformation relationship as offset information.

[0066] In one feasible implementation, step S2031 includes steps S20311 to S20313: Step S20311: Determine the preset coordinate points in the first reference image.

[0067] It should be noted that the preset coordinate point can be a pre-defined coordinate point in the first reference image, such as the origin of the coordinate system located at the upper left corner of the image.

[0068] Step S20312: Determine the mapped coordinates of the preset coordinate points in the second reference image based on the first geometric transformation relationship.

[0069] In a specific implementation, the wearable display device can map the preset coordinate points to the coordinate system of the second reference image according to the first geometric transformation relationship, and determine the mapped coordinate points of the preset coordinate points in the second reference image.

[0070] Let's take a preset coordinate point as the two-dimensional coordinate (0, 0) as an example. The two-dimensional coordinate (0, 0) is represented as homogeneous coordinates [0, 0, 1]^T; then [0, 0, 1]^T is multiplied by the homography matrix H (the mathematical form of the first geometric transformation relationship): [x', y', w']^T = H · [0, 0, 1]^T, and the resulting [x', y', w']^T is the mapped homogeneous coordinate; finally, by converting the homogeneous coordinates into standard two-dimensional pixel coordinates (x' / w', y' / w'), the converted two-dimensional pixel coordinates are the mapped coordinates of the two-dimensional coordinate (0, 0) in the second reference image.

[0071] Step S20313: Determine offset information based on the preset coordinate point and the mapped coordinate point.

[0072] In the first step, the wearable display device can subtract the preset coordinate point from the mapped coordinate point to obtain the vector difference, which is the offset information.

[0073] Continuing with the example above, the default coordinate point is a two-dimensional coordinate (0, 0). The offset information = mapped coordinate point - default coordinate point = the coordinate value of the mapped coordinate point itself (x' / w', y' / w'). The coordinate value of the mapped coordinate point itself (x' / w', y' / w') includes the sign (i.e., positive or negative). For example, if the result is (400, -20), then the surface offset information is: 400 pixels to the right and 20 pixels up.

[0074] Step S2032: Update the first geometric transformation relationship according to the offset information to obtain the second geometric transformation relationship.

[0075] In a specific implementation, the wearable display device can construct a translation matrix using offset information, and perform a combination operation (such as multiplying the two) on the translation matrix and the first geometric transformation relationship, thereby updating the first geometric transformation relationship using offset information to obtain the second geometric transformation relationship.

[0076] For example, suppose the translation matrix is ​​of the form:

[0077] In the formula, x=x' / w', y=y' / w'.

[0078] The second geometric transformation relation can be:

[0079] In the formula, H new H represents the second geometric transformation relation, and H represents the first geometric transformation relation.

[0080] It should be understood that the first geometric transformation relation maps the first viewpoint to the second viewpoint. Multiplying the first geometric transformation relation by the translation matrix on the left is equivalent to performing a reverse translation compensation on the coordinates of the first viewpoint before applying the first geometric transformation relation (-). x, - The second geometric transformation is applied to ensure that the mapping result of the preset coordinate point of the first reference image in the second reference image remains consistent or close to that of the preset coordinate point after the second geometric transformation. For example, if the preset coordinate point is (0, 0), the mapping result of the preset coordinate point in the second reference image after the second geometric transformation is still (0, 0) or near (0, 0).

[0081] Furthermore, before step S2033 below, or after determining the offset information, a first initial canvas with the same size as the first image to be stitched can be created, and a second initial canvas with the same size as the second image to be stitched can be created. Then, the first initial canvas is expanded using the offset information to obtain the first canvas, and the second initial canvas is expanded using the offset information to obtain the second canvas.

[0082] Assuming the offset information is ( x, (y), the canvas can be expanded using the following formula:

[0083] In the formula, canvas size The expanded canvas size is defined by test_pic_size, the initial canvas size, and ori_offset, which is any component of the offset information.

[0084] Specifically, refer to Figure 5 , Figure 5 This is a schematic diagram of canvas expansion in the second embodiment of this application. Figure 5 In the middle, take the offset information. Substituting x into the above formula, first take... The absolute value, then The absolute value of x is added to the initial width of the canvas (i.e., the width of the first initial canvas or the width of the second initial canvas) to obtain the expanded width offset_x (i.e., the width of the first canvas or the width of the second canvas).

[0085] Similarly, take the offset information from Substituting y into the above formula, first take... The absolute value of y, then The absolute value of y is added to the initial height of the canvas (i.e., the height of the first initial canvas or the height of the second initial canvas) to obtain the expanded height offset_y (i.e., the height of the first canvas or the height of the second canvas).

[0086] It should be understood that the first image to be stitched will subsequently be projected onto the first canvas based on the second geometric transformation relationship. This transformation may cause the distribution range of image pixels to exceed its original boundaries (e.g., spreading to the lower right corner). If the canvas is not expanded, the excess portion will be cropped and lost. The second image to be stitched will subsequently be translated as a whole according to the offset information. When x is positive, the image needs to be shifted to the right, and the content on its right side will exceed the original width. If... When y is positive, the image needs to be shifted downwards, and its bottom content will exceed the original height. Therefore, it is necessary to expand the first and second initial canvases to obtain corresponding first and second canvases, ensuring that both the first and second canvases can fully accommodate the first and second images to be stitched together.

[0087] Step S2033: Project the first image to be stitched onto the first canvas according to the second geometric transformation relationship.

[0088] In its implementation, the wearable display device uses a unified coordinate system based on the second viewpoint and performs a projection transformation on the first image to be stitched using a second geometric transformation relationship. This transformation recalculates the position of each pixel in the first image to be stitched in the new coordinate system of the first canvas, based on its corrected perspective relationship with the second viewpoint. The first canvas is obtained by incorporating offset information correction into the first geometric transformation relationship, which optimizes and regularizes the spatial layout (especially its starting position) of the projection result of the first image to be stitched on the canvas. After this transformation, the first image to be stitched is accurately projected onto the first canvas, and its geometric shape is consistent with the image that should be generated by perspective projection of the original test chart from the second viewpoint, that is, the perspective distortion caused by the difference in viewpoint is corrected, aligning it with the imaging plane of the second viewpoint.

[0089] Step S2034: Place the second image to be stitched in the corresponding position in the second canvas according to the offset information, so that the image data in the first canvas and the second canvas form an overlapping area.

[0090] In practical implementation, since the second perspective uses a unified coordinate system, the wearable display device places the second image to be stitched onto the precise position determined by the calculated offset information on the second canvas. Specifically, this position is the coordinate point after translating the origin of the second image to be stitched relative to the origin of the second canvas coordinate system. Because both the second geometric transformation relationship and the offset information originate from the first geometric transformation relationship, the first image data to be stitched projected onto the first canvas and the second image data to be stitched precisely placed on the second canvas based on the offset information will have a spatially consistent overlapping area.

[0091] It should be understood that by employing a projection transformation of the first image to be stitched and a translation positioning of the second image to be stitched, the complex problem of dual-image registration is transformed into an operation of precise projection of one image and simple translation of the other image. This significantly reduces the overall computational complexity and avoids the additional interpolation errors and image quality loss that may be caused by the secondary projection transformation of the second image to be stitched. While ensuring high alignment accuracy, it improves processing efficiency and better maintains the integrity of the original image data.

[0092] Based on the first and second embodiments of this application, a third embodiment of this application is proposed. In this third embodiment, content that is the same as or similar to the first and second embodiments described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 6 , Figure 6 This is a flowchart illustrating the third embodiment of the optical performance testing method of this application.

[0093] In this embodiment, step S40 includes steps S401 to S403: Step S401: Determine the seam position of the overlapping area based on the offset information.

[0094] In practical implementation, wearable display devices can display the absolute value of the horizontal displacement in the offset information ( (This is set as the x-coordinate of the seam position.) The overlapping area... This is the location for the seam.

[0095] It should be understood that offset information ( x, y) precisely quantifies the relative displacement between the first-person and second-person perspectives. In a typical scene where left and right perspectives are horizontally stitched together, the horizontal displacement... x is dominant. Horizontal displacement. The geometric meaning of 'x' is: on the canvas, after the second image to be stitched is translated and aligned, the horizontal distance between its left edge and the left edge of the projected image in the first canvas. Therefore, the position corresponding to the horizontal displacement naturally constitutes the center reference line for the deep fusion of the two image contents.

[0096] The seam mentioned above is not the physical boundary of the overlapping area, but rather the baseline for subsequent gradient fusion processing.

[0097] Step S402: Extend the preset sliding window width to both sides of the seam position to form a fusion transition area in the overlapping area.

[0098] It should be noted that the preset sliding window width is a configurable parameter, and its value can be preset according to the image resolution, the size of the overlapping area, and the requirements for smooth transition. Furthermore, the preset sliding window width is smaller than the total width of the overlapping area to ensure that the blended transition area is completely contained within the overlapping area.

[0099] In a practical implementation, the wearable display device can generate a center baseline perpendicular to the seam position, and extend a preset sliding window width to the left and right sides of the center baseline, thereby generating a strip-shaped area centered on the center baseline in the overlapping area. This strip-shaped area is the blending transition area.

[0100] Step S403: In the fusion transition region, the pixel values ​​of the corresponding repeating images are gradually reduced according to the image gradient direction, and the pixel values ​​of each repeating image are superimposed to generate a stitched image.

[0101] In a specific implementation, the wearable display device can gradually reduce the pixel value along the corresponding image gradient direction in the fusion transition area according to the image gradient direction of each repeated image. Moreover, the attenuation trends of the first image to be stitched and the second image to be stitched are complementary and the change amplitude is matched, ensuring that at any position in the fusion transition area, the pixel value of the two images to be stitched can be a constant value, and this constant value is consistent with the pixel value of each image to be stitched in the non-overlapping area.

[0102] It should be understood that in the overlapping area far from the seam, the content of the two images is highly consistent, and simply selecting the pixel values ​​of one image will not create a visual seam. If a gradient blend is forced across the entire overlapping area, these originally sharp areas will suffer unnecessary, slight blurring or contrast loss due to pixel averaging. By limiting the gradient blend operation to the blending transition area, the detail and sharpness of the sharp, unaffected areas in the original image can be preserved to the greatest extent, ensuring a high overall quality of the final stitched image.

[0103] In one feasible implementation, step S403 includes steps S4031 to S4033: Step S4031: Generate a first fusion weight distribution for the first repeating image in the fusion transition region.

[0104] The weight values ​​of the first fusion weight distribution gradually decrease from a first value to a second value along the first image gradient direction, and the first image gradient direction points from the image data distribution side in the first canvas to the image data distribution side in the second canvas.

[0105] For example, regarding the first image gradient direction, assuming the first canvas carries an image taken from a left-viewpoint, its image data is mainly distributed on the left side of the first canvas; the second canvas carries an image taken from a right-viewpoint, its data is mainly distributed on the right side of the second canvas. The first image gradient direction is: from the left side of the canvas to the right side of the canvas (i.e., horizontally to the right). That is, the first fusion weight distribution generated by the first canvas (left image) will continuously decrease from the first value to the second value from left to right within the fusion transition region.

[0106] The first value can be the upper limit of the weight distribution, corresponding to the state when the contribution of the image in the fusion reaches its maximum. When the fusion weight of a certain pixel position is assigned the first value, it means that the pixel value at that position will contribute fully (or at the highest proportion) to the final fusion result. For example, if the first value is set to 1, when the weight value in the first fusion weight distribution is 1, the corresponding pixel of the first duplicate image will appear 100% in the final image.

[0107] The second value can be the lower bound of the weight distribution, corresponding to the state where the contribution of the image in the fusion is minimized. When the fusion weight of a certain pixel position is assigned the second value, it means that the pixel value at that position will not contribute to the final fusion result at all (or at the lowest proportion). For example, if the first value is set to 0, when the weight value in the first fusion weight distribution is 0, the corresponding pixel of the first duplicate image will appear 0% in the final image, that is, it will be completely invisible.

[0108] In the specific implementation, refer to Figure 7 , Figure 7 This is a schematic diagram of the first fusion weight distribution in the third embodiment of this application. Figure 7 In the middle, on the left side of the blending transition area, the weight value of the first blending weight distribution is always the first value (e.g., 1, representing full display); on the right side of the blending transition area, the weight value of the first blending weight distribution is always the second value (e.g., 0, representing no display at all); within the blending transition area, the weight value of the first blending weight distribution is interpolated along the gradient direction of the first image, that is, it continuously and linearly decreases from the first value to the second value.

[0109] Step S4032: Generate a second fusion weight distribution for the second repeated image in the fusion transition region.

[0110] The weight values ​​of the second fusion weight distribution gradually decrease from the first value to the second value along the second image gradient direction, and the second image gradient direction points from the image data distribution side in the second canvas to the image data distribution side in the first canvas.

[0111] For example, regarding the second image gradient direction, assuming the first canvas carries an image taken from a left-viewpoint, its image data is mainly distributed on the left side of the first canvas; the second canvas carries an image taken from a right-viewpoint, its data is mainly distributed on the right side of the second canvas. The second image gradient direction is: from the right side of the canvas to the left side of the canvas (i.e., horizontally to the left). The second image gradient direction is opposite to the first image gradient direction. In the second image gradient direction, the second fusion weight distribution generated by the second canvas (right figure) will continuously decrease from the first value to the second value from right to left within the fusion transition region.

[0112] In the specific implementation, refer to Figure 8 , Figure 8 This is a schematic diagram of the second fusion weight distribution in the third embodiment of this application. Figure 8 In the middle, on the right side of the blending transition area, the weight value of the second blending weight distribution is always the first value (e.g., 1, representing full display); on the left side of the blending transition area, the weight value of the second blending weight distribution is always the second value (e.g., 0, representing no display at all); within the blending transition area, the weight value of the second blending weight distribution is interpolated along the gradient direction of the second image, that is, it continuously and linearly decreases from the first value to the second value.

[0113] Step S4033: The pixel values ​​corresponding to the fusion transition region are weighted and summed according to the first weight distribution and the second weight distribution to generate a stitched image.

[0114] It should be noted that the wearable display device can multiply the image data in the first canvas in the fusion transition area with the first fusion weight distribution pixel by pixel, and multiply the image data in the second canvas with the second fusion weight distribution pixel by pixel. Then, the multiplication results are superimposed pixel by pixel to achieve image gradual fusion and obtain the stitched image.

[0115] Accordingly, step S4033 includes steps S40331 to S40333: Step S40331: The pixel values ​​of the first repeated image are weighted according to the first fusion weight distribution to obtain the first weighted image.

[0116] In its implementation, the wearable display device applies a first fusion weight distribution to the pixel data of the corresponding first repeating image in the first canvas. For each pixel location within the fusion transition region, a scalar multiplication operation is performed between the weight value of the first fusion weight distribution at that location (a scalar between 0 and 1) and the corresponding pixel value (typically RGB or luminance value) in the first canvas. This process generates a new image, namely the first weighted image. In this first weighted image, the intensity or color value of each pixel has been scaled proportionally by its corresponding weight value. Outside the fusion transition region, because the weight value is a first value (e.g., 1), the first weighted image is consistent with the original image data.

[0117] Step S40332: The pixel values ​​of the second repeated image are weighted according to the second fusion weight distribution to obtain the second weighted image.

[0118] In its implementation, the wearable display device applies a second fusion weight distribution to the pixel data of the corresponding second repeating image in the second canvas. For each pixel location within the fusion transition region, a scalar multiplication operation is performed between the weight value of the second fusion weight distribution at that location (a scalar between 0 and 1) and the corresponding pixel value in the second canvas. This process generates a new image, namely the second weighted image. In this second weighted image, the intensity or color value of each pixel has been scaled proportionally by its corresponding weight value. Outside the fusion transition region, because the weight value is a first value (e.g., 1), the second weighted image is consistent with the original image data.

[0119] Step S40333: Overlay the first weighted image and the second weighted image to generate a stitched image.

[0120] In practical implementation, the wearable display device can perform pixel-by-pixel addition of the first enhanced image and the second enhanced image in the same coordinate system. That is, for any pixel position within the fusion transition region, its final pixel value is obtained by directly adding the first weighted pixel value and the second weighted pixel value at that position.

[0121] It should be understood that at any position, the sum of the weight values ​​of the first weight distribution and the second weight distribution is always a constant value. This constant value is the first value (such as 1), so that the calculation of the final pixel value is a weighted average of the two source pixel values. This prevents artificial artifacts such as signal oversaturation (too bright) or cancellation (too dark) that may be caused by direct superposition, and achieves a smooth and natural transition of brightness and color in the overlapping area, ultimately achieving a visually seamless fusion.

[0122] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the optical index testing method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0123] This application also provides an optical index testing device; please refer to... Figure 9 , Figure 9 This is a schematic diagram of the module structure of the optical performance testing device of this application. The optical performance testing device includes: The image acquisition module 10 is used to capture images of the test chart from different perspectives to obtain at least two images to be stitched together.

[0124] The image alignment module 20 is used to align the images to be stitched together to form an overlapping region, wherein the overlapping region includes repeated images from the images to be stitched together.

[0125] The direction determination module 30 is used to determine the image gradient direction of each repeated image in the overlapping area. The image gradient direction is the direction from the side of the image to be stitched from which the repeated image originates, to the side of another adjacent image to be stitched.

[0126] The image stitching module 40 is used to gradually reduce the pixel values ​​of the corresponding repeating images in the overlapping area according to the image gradient direction, and to superimpose the pixel values ​​of each repeating image to generate a stitched image. The pixel values ​​of each repeating image in the overlapping area are consistent with the pixel values ​​of each image to be stitched.

[0127] The index testing module 50 is used to test optical indexes based on the stitched image.

[0128] The optical index testing device provided in this application, employing the optical index testing method in the above embodiments, can solve the technical problem in the prior art where pixel values ​​on both sides of the splicing line in the overlapping area jump, resulting in obvious boundary marks at the splicing line and affecting the accuracy of optical index testing. Compared with the prior art, the beneficial effects of the optical index testing device provided in this application are the same as those of the optical index testing method provided in the above embodiments, and other technical features in the optical index testing device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0129] This application provides a wearable display device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the optical index testing method in Embodiment 1 above.

[0130] The following is for reference. Figure 10 , Figure 10 This is a schematic diagram of the structure of the wearable display device of this application. The wearable display device in the embodiments of this application may include, but is not limited to, VR devices, AR glasses, etc. Figure 10 The wearable display device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0131] like Figure 10As shown, the wearable display device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the wearable display device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the wearable display device to communicate wirelessly or wiredly with other devices to exchange data. While wearable display devices with various systems are shown in the figures, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0132] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0133] The wearable display device provided in this application, employing the optical index testing method described in the above embodiments, solves the technical problem in the prior art where pixel values ​​jump on both sides of the splicing line in the overlapping area, resulting in obvious boundary marks at the splicing line and affecting the accuracy of optical index testing. Compared with the prior art, the beneficial effects of the wearable display device provided in this application are the same as those of the optical index testing method provided in the above embodiments, and other technical features in this wearable display device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.

[0134] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0135] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0136] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the optical index testing method in the above embodiments.

[0137] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0138] The aforementioned computer-readable storage medium may be included in the wearable display device; or it may exist independently and not assembled into the wearable display device.

[0139] The aforementioned computer-readable storage medium carries one or more programs that, when executed by a wearable display device, cause the wearable display device to: capture images of a test chart from different viewing angles to obtain at least two images to be stitched together; align the images to be stitched together to form an overlapping region, the overlapping region including repeated images from each of the images to be stitched together; determine the image gradient direction of each repeated image in the overlapping region, the image gradient direction being a direction from the side of the image to be stitched from which the repeated image originates, pointing to the side of another adjacent image to be stitched together; progressively reduce the pixel values ​​of the corresponding repeated images in the overlapping region according to the image gradient direction, and superimpose the pixel values ​​of each repeated image to generate a stitched image, the superimposed pixel values ​​of each repeated image in the overlapping region being consistent with the pixel values ​​of each image to be stitched together; and test optical indicators based on the stitched image.

[0140] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0141] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0142] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0143] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described optical index testing method. This solves the technical problem in the prior art where pixel values ​​on both sides of the splicing line in the overlapping area jump, resulting in obvious boundary marks at the splicing line and affecting the accuracy of optical index testing. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the optical index testing method provided in the above embodiments, and will not be repeated here.

[0144] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for testing optical indicators, characterized in that, The method is applied to a wearable display device, and the method includes: Take photos of the test image card from different angles to obtain at least two images to be stitched together; The images to be stitched are aligned to form an overlapping region, which includes repeating images from the images to be stitched. Determine the image gradient direction of each repeated image in the overlapping region. The image gradient direction is the direction from the side of the image to be stitched from which the repeated image originates, to the side of another adjacent image to be stitched. In the overlapping region, the pixel values ​​of the corresponding repeating images are gradually reduced according to the image gradient direction, and the pixel values ​​of each repeating image are superimposed to generate a stitched image. The pixel values ​​of each repeating image in the overlapping region are superimposed and are consistent with the pixel values ​​of each image to be stitched. Optical parameters are tested based on the stitched image.

2. The optical index testing method as described in claim 1, characterized in that, The images to be stitched include a first image to be stitched and a second image to be stitched. The step of aligning the images to be stitched to form an overlapping region includes: Obtain a first reference image corresponding to the same viewpoint as the first image to be stitched, and a second reference image corresponding to the same viewpoint as the second image to be stitched; The first geometric transformation relationship between different viewpoints is determined based on the feature correspondence between the first reference image and the second reference image; The first image to be stitched is projected onto the first canvas according to the first geometric transformation relationship, and the second image to be stitched is placed at the corresponding position on the second canvas, so that the image data in the first canvas and the second canvas form an overlapping area; The overlapping region includes a first repeating image from the first canvas and a second repeating image from the second canvas.

3. The optical index testing method as described in claim 2, characterized in that, The step of projecting the first image to be stitched onto the first canvas according to the first geometric transformation relationship, and placing the second image to be stitched at the corresponding position on the second canvas, so that the image data on the first canvas and the second canvas form an overlapping area, includes: The offset information between different viewpoints is determined based on the first geometric transformation relationship; The first geometric transformation relationship is updated based on the offset information to obtain the second geometric transformation relationship; The first image to be stitched is projected onto the first canvas according to the second geometric transformation relationship; The second image to be stitched is placed at the corresponding position in the second canvas according to the offset information, so that the image data in the first canvas and the second canvas form an overlapping area.

4. The optical index testing method as described in claim 3, characterized in that, The step of determining the offset information between different viewpoints based on the first geometric transformation relationship includes: Determine the preset coordinate points in the first reference image; The mapping coordinates of the preset coordinate points in the second reference image are determined based on the first geometric transformation relationship; Offset information is determined based on the preset coordinate point and the mapped coordinate point.

5. The optical index testing method as described in claim 3, characterized in that, The step of progressively reducing the pixel values ​​of corresponding repeating images in the overlapping region according to the image gradient direction, and then superimposing the pixel values ​​of each repeating image to generate a stitched image includes: The seam position of the overlapping area is determined based on the offset information; Extend the preset sliding window width to both sides of the seam position to form a fusion transition area in the overlapping area; In the fusion transition region, the pixel values ​​of the corresponding repeating images are gradually reduced according to the image gradient direction, and the pixel values ​​of each repeating image are superimposed to generate a stitched image.

6. The optical index testing method as described in claim 5, characterized in that, The step of gradually reducing the pixel values ​​of the corresponding repeating images in the fusion transition region according to the image gradient direction, and superimposing the pixel values ​​of each repeating image to generate a stitched image includes: A first fusion weight distribution is generated for the first repeated image in the fusion transition region. The weight values ​​of the first fusion weight distribution gradually decrease from a first value to a second value along the gradient direction of the first image. The gradient direction of the first image points from the image data distribution side in the first canvas to the image data distribution side in the second canvas. A second fusion weight distribution is generated for the second repeated image in the fusion transition region. The weight values ​​of the second fusion weight distribution gradually decrease from the first value to the second value along the gradient direction of the second image. The gradient direction of the second image points from the image data distribution side in the second canvas to the image data distribution side in the first canvas. The pixel values ​​in the fusion transition region are weighted and summed according to the first weight distribution and the second weight distribution to generate a stitched image.

7. The optical index testing method as described in claim 6, characterized in that, The step of generating a stitched image by weighted summation of corresponding pixel values ​​in the fusion transition region according to the first weight distribution and the second weight distribution includes: The pixel values ​​of the first repeated image are weighted according to the first fusion weight distribution to obtain the first weighted image; The pixel values ​​of the second repeated image are weighted according to the second fusion weight distribution to obtain the second weighted image; The first weighted image and the second weighted image are superimposed to generate a stitched image.

8. An optical index testing device, characterized in that, The device includes: The image acquisition module is used to capture images of the test chart from different perspectives to obtain at least two images to be stitched together. An image alignment module is used to align the images to be stitched together to form an overlapping region, wherein the overlapping region includes repeating images from the images to be stitched together. The direction determination module is used to determine the image gradient direction of each repeated image in the overlapping area. The image gradient direction is the direction from the side of the image to be stitched from which the repeated image originates, to the side of another adjacent image to be stitched. An image stitching module is used to gradually reduce the pixel values ​​of corresponding repeating images in the overlapping area according to the image gradient direction, and to superimpose the pixel values ​​of each repeating image to generate a stitched image. The superimposed pixel values ​​of each repeating image in the overlapping area are consistent with the pixel values ​​of each image to be stitched. The index testing module is used to test optical indexes based on the stitched image.

9. A wearable display device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the optical index testing method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the optical index testing method as described in any one of claims 1 to 7.