AR glasses ghosting detection method and system and storage medium

By employing dual-brightness scene image acquisition and automated detection methods, the problems of low efficiency and high labor costs in AR glasses ghost detection have been solved, achieving efficient and accurate ghost detection applicable to AR glasses with various optical architectures.

CN122048812APending Publication Date: 2026-05-15ZHUHAI MOJIE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202512059653.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-31
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing AR glasses suffer from low ghost detection efficiency, large subjective bias, high labor costs, and a lack of quantitative data support, leading to production bottlenecks and unstable product quality.

Method used

By employing dual-brightness scene image acquisition technology, and combining overexposed images with 18% gray images, the system locates and removes real-image areas. Using local and global detection methods, it automatically identifies ghost images and generates a detection report.

Benefits of technology

It achieves automated and accurate detection of ghosting in AR glasses, improving detection efficiency by 5-20 times, with a consistency of up to 99% in detection results, reducing labor costs, providing quantitative data support, and is applicable to AR glasses with various optical architectures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122048812A_ABST
    Figure CN122048812A_ABST
Patent Text Reader

Abstract

The invention discloses an AR glasses ghosting detection method and system and a storage medium. According to the embodiment of the invention, double-scene matching, real image elimination, layered detection and multi-round screening are adopted, interference of real images on ghosting detection is eliminated through the synergistic effect of overexposure images and 18% gray images, and then through a layering strategy of local detection (aiming at ghosting high-incidence areas) and global detection (covering full images), multi-round verification of brightness comparison, area screening and the like is combined, so that the ghosting detection accuracy is improved. And automatic and accurate detection of ghosts is realized. The whole process does not need manual intervention, seamless joint with an AR glasses production line can be achieved, and the efficient detection requirement of mass production scenes is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of augmented reality technology, and in particular to a method, system and storage medium for detecting ghosting in AR glasses. Background Technology

[0002] Augmented Reality (AR) technology, as a novel interactive technology that integrates virtual information with the real environment, has experienced rapid development in recent years across various fields, including consumer electronics, industrial manufacturing, healthcare, and education. AR glasses, as a core terminal device of AR technology, have become a focal point of industry competition due to their slim and portable design and immersive visual experience. Consumers' core demands for AR glasses focus on aspects such as field of view, weight, clarity, and wearing comfort, and the fulfillment of these demands highly depends on the optical architecture design of the AR glasses.

[0003] Currently, the optical architectures of AR glasses mainly include waveguide solutions (diffractive waveguides, arrayed waveguides), BirdBath solutions, and freeform surface solutions. Among these, waveguide solutions have become the mainstream choice for mid-to-high-end AR glasses due to their outstanding advantages such as thinness, wide field of view, and good compatibility with traditional glasses shapes. Diffractive waveguides use diffraction gratings to couple light input, propagation, and output, enabling large field-of-view imaging within a relatively small volume. Arrayed waveguides expand the pupil through multiple microprism arrays, also featuring thinness and a wide field of view. Together, they occupy the main market share of mid-to-high-end AR glasses optical architectures.

[0004] Despite the significant advantages of optical waveguide solutions, stray light control has always faced inherent technical challenges, and stray light is the core reason for the ghosting phenomenon in AR glasses. Ghosting refers to the superimposed virtual image generated by an unexpected optical path outside the target image (real image) projected by AR glasses. Its specific generation mechanism mainly includes the following three aspects: (1) Multi-order diffraction of diffraction grating: When incident light shines on the grating structure of the diffraction waveguide, in addition to generating the main diffraction order (effective optical path, forming real image) that meets the design requirements, multiple secondary diffraction orders will also be generated. The propagation path of these secondary diffracted lights deviates from the target optical path, and finally forms a virtual image that overlaps or is adjacent to the real image in the imaging area, i.e., ghosting. (2) Secondary reflection of prism surface: The optical waveguide structure contains multiple prisms or prism-like interfaces. When light propagates through these interfaces, in addition to normal refraction or diffraction, secondary reflection or even multiple reflections will occur. These reflected lights do not propagate according to the preset optical path, and finally form additional virtual images within the field of view, affecting the visual effect. (3) Optical path overlap of the pupil expander: The pupil expander is a key component for achieving a large field of view. Its function is to expand the coupled input light rays to the entire field of view. However, during the pupil expansion process, some light rays will overlap due to the limitations of the propagation path design, forming an unexpected superimposed image, which manifests as ghosting.

[0005] Compared to waveguide solutions, the BirdBath and freeform surface solutions exhibit relatively weaker ghosting. The BirdBath solution uses a semi-transparent mirror to achieve light reflection and transmission, resulting in a relatively simple optical path design and less stray light. The freeform surface solution optimizes the light propagation path through customized surface design, offering superior control over stray light. However, both solutions have insurmountable drawbacks: the BirdBath solution typically limits its field of view to below 30°, failing to meet the demands of mid-to-high-end AR glasses for a wide field of view, and its larger size leads to poor wearing comfort; the freeform surface solution involves extremely complex manufacturing processes, high production costs, and low yield rates. Furthermore, the physical characteristics of the curved surface design limit further weight reduction, contradicting the trend towards thinner and lighter AR glasses. Therefore, in the mid-to-high-end AR glasses market, waveguide solutions remain the irreplaceable mainstream choice, and the ghosting problem they cause has become a core pain point that the industry urgently needs to address.

[0006] Ghosting, as a typical visual perception defect of AR glasses, is far more difficult to detect than quantifiable optical indicators such as brightness uniformity and dark bands. It is mainly reflected in the following aspects: (1) Multiple factors affect the visibility of ghosting: The severity of ghosting depends not only on the stray light intensity of the optical system, but also on multiple factors such as the observation angle, ambient light conditions, and image content contrast. For example, the visibility of ghosting will decrease in strong light environment; while in weak light environment, ghosting will be more obvious; the position and clarity of ghosting may also change under different observation angles; high contrast target images will make ghosting easier to perceive, while low contrast images may cover ghosting. (2) It is difficult to distinguish between real images and ghosting: Ghosting is a virtual image of real images. Its brightness is usually lower than that of real images, but the two are adjacent or overlapped in spatial position, and their color and shape are related to real images to a certain extent, making it difficult to distinguish between the two through simple visual observation or single image analysis. (3) Lack of unified quantitative standards: Due to the visual perception characteristics of ghosting, there is no unified quantitative evaluation standard for ghosting in the industry. Different manufacturers and different testers have different judgments on whether ghosting exceeds the standard, which brings great challenges to the design of automated detection algorithms.

[0007] Due to the technical difficulties in ghost detection, existing AR glasses assembly plants typically use a subjective inspection mode with manual wear. The specific process of this mode is as follows: the inspector wears the AR glasses to be inspected, watches the preset test screen (usually a high-contrast screen), observes with the naked eye whether there is a ghost, and judges whether the ghost meets the product quality standards based on personal experience. This inspection method has the following defects: (1) Extremely low inspection efficiency: During the manual inspection process, the inspector needs to wear AR glasses, adjust the observation angle, and carefully distinguish the screen. The inspection time for a single AR glasses usually takes a long time. For mass production demand at the KK level (tens of thousands of units), the speed of manual inspection cannot match the pace of the production line, which will form a serious production bottleneck and restrict the increase in production capacity. (2) Large subjective judgment deviation: There are significant differences in the visual sensitivity, observation angle, and judgment standards of different inspectors. Even the same inspector may have inconsistent judgment results at different times and under different fatigue states. This leads to extremely poor repeatability and consistency of the inspection results, and it is easy to miss detection (slight ghosts are not detected) and misdetect (normal optical reflection is misjudged as ghosts), which seriously affects the stability of product quality. (3) High labor costs: To meet mass production demands, companies need to hire a large number of inspectors, which not only requires paying high salaries but also investing significant resources in personnel training and management. In the long run, labor costs remain high. (4) Inability to provide quantitative data support: Manual inspection can only provide qualitative results of passing or failing, and cannot record the specific parameters of ghosting (such as position, brightness, area, etc.). This quantitative data is crucial for optimizing the optical architecture of AR glasses and improving the production process. The limitations of manual inspection make it difficult for companies to drive product iteration and upgrades through inspection data.

[0008] The aforementioned deficiencies and problems urgently require improvement or resolution by those skilled in the art. Summary of the Invention

[0009] In view of this, the embodiments of this application aim to provide an AR glasses ghost detection method, system and storage medium to solve the defects of low efficiency, large subjective bias, high labor cost and lack of quantitative data support in the existing AR glasses ghost detection.

[0010] In a first aspect, the AR glasses ghost detection method provided in this application includes: controlling AR glasses to project a preset image; acquiring image data projected by the AR glasses through an imaging device to obtain original image data; setting two detection scenes with different brightness levels, and acquiring a first image and a second image respectively, wherein the first image is an overexposed image and the second image is a grayscale image; locating the illuminated area in the preset image based on the second image; mapping the position of the illuminated area to the first image, and blackening the pixel area in the first image corresponding to the illuminated area to obtain a processed image; drawing a pre-image above and below the illuminated area in the processed image. A detection rectangle with a defined height is defined, and the average brightness value of each detection rectangle is extracted. The average brightness value of each detection rectangle is compared with a preset brightness threshold. If the average brightness value exceeds a preset proportion of the preset brightness threshold, it is determined that a ghost image exists in the corresponding detection rectangle area. In the processed image, the illuminated area and the pixel area corresponding to the detection rectangle are removed, and the remaining area is subjected to global threshold segmentation to obtain candidate areas. Contour detection is performed on the candidate areas to filter out valid candidate areas with an area greater than a preset area threshold. The average brightness value of the valid candidate areas is calculated. If the average brightness value exceeds the preset brightness threshold, it is determined that a ghost image exists in the valid candidate areas.

[0011] Furthermore, the preset screen includes at least one illuminated area, the illuminated area being rectangular, circular, or polygonal in shape, and the illuminated area covering the main field of view of the AR glasses.

[0012] Furthermore, when acquiring the first image and the second image, the projection parameters of the AR glasses, the acquisition parameters of the imaging device, and the acquisition position are kept unchanged, and only the exposure time of the imaging device is adjusted to obtain images with different brightness.

[0013] Furthermore, the specific process of locating the illuminated area based on the second image is as follows: perform an overall brightness analysis on the second image to determine the average brightness value of the background, use a preset offset ratio of the average brightness value of the background as a brightness threshold, and determine the connected pixel areas in the second image whose brightness is higher than the brightness threshold as illuminated areas.

[0014] Furthermore, when mapping the illuminated area to the first image, a direct coordinate mapping method is used to ensure that the position of the illuminated area in the first image is completely consistent with that in the second image. During the blackout process, the brightness value of the corresponding area is set to the lowest brightness value.

[0015] Furthermore, the preset height is 5-50 pixels, the width of the detection rectangle is the same as the width of the illuminated area, and the detection rectangle and the illuminated area are adjacent without gaps.

[0016] Furthermore, the preset brightness threshold is the saturation brightness value of the overexposed area in the first image, the preset ratio is 5%-20%, and the preset ratio can be adaptively adjusted according to the product quality standards of AR glasses.

[0017] Furthermore, the threshold for global threshold segmentation is adaptively determined by the brightness distribution of the remaining region, specifically by taking the sum of the average brightness value of the remaining region and twice the standard deviation.

[0018] Furthermore, the preset area threshold is 50-500 pixels. When filtering valid candidate regions, only the regions corresponding to connected contours with an area greater than the preset area threshold are retained.

[0019] Furthermore, it also includes step S10: generating a ghost detection report, which includes AR glasses identification information, detection time, location, number, average brightness value, area, and pass / fail judgment result of ghosts.

[0020] Secondly, an AR glasses ghost detection system provided in this application includes: an image control module for sending control commands to AR glasses to project a preset image; a data acquisition module for acquiring image data projected by the AR glasses to obtain raw image data; a dual-scene image acquisition module for setting two detection scenes with different brightness levels to acquire an overexposed first image and a gray second image respectively; a lit area positioning module for locating lit areas in the preset image based on the brightness distribution of the second image; a blackening processing module for mapping the position of the lit areas to the first image and blackening the corresponding pixel areas to generate a processed image; a local ghost detection module for drawing detection rectangles in the processed image, extracting and comparing average brightness values ​​to determine local ghosts; and a global ghost detection module for removing interference areas and performing global threshold segmentation and contour filtering to determine global ghosts.

[0021] Implementing the embodiments of this application employs a dual-scene approach, real-image removal, layered detection, and multi-round screening. Through the synergistic effect of overexposed images and 18% gray images, interference from real-images on ghost detection is first eliminated. Then, a layered strategy of local detection (targeting high-ghost-occurrence areas) and global detection (covering the entire screen) is used, combined with multiple rounds of verification such as brightness comparison and area screening, to achieve automated and accurate ghost detection. The entire process requires no manual intervention and can seamlessly integrate with AR glasses production lines, meeting the high-efficiency detection needs of mass production scenarios.

[0022] For further technical effects of other implementation methods, please refer to the description in the specific implementation methods. Attached Figure Description

[0023] Figure 1A flowchart illustrating the AR glasses ghost detection method according to an embodiment of this application is shown; Figure 2 This shows a preset image projected by AR glasses; Figure 3 The images show two scenes with different brightness levels, with the one on the left being an overexposed image and the one on the right being an 18% gray image; Figure 4 The image shows the result of mapping the illuminated area and then setting the pixels at the same location to black. Figure 5 The image shown is believed to contain a ghostly figure. Detailed Implementation

[0024] To make the objectives, solutions, and advantages of this application clearer, the technical solutions of the embodiments of this application will be fully described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of this application can be arbitrarily combined with each other.

[0025] This application aims to provide a ghost detection solution for AR glasses. The basic idea is to first locate the real shadow area and remove its interference through image acquisition in a dual-brightness scene, and then combine local detection and global detection methods to comprehensively and accurately identify ghost shadows. The following is a detailed description with reference to the accompanying drawings and specific embodiments.

[0026] like Figure 1 As shown, the AR glasses ghost detection method in this application embodiment may include: Step S1: Control the AR glasses to project a preset image. Specifically, this step aims to provide a clear real-image area, laying the foundation for subsequent differentiation between real and ghost images. At least one illuminated area is set in the preset image. The shape of the illuminated area can be rectangular, circular, or polygonal (rectangle is preferred due to its clear boundaries, facilitating subsequent positioning and detection). The illuminated area must cover the main field of view of the AR glasses to ensure detection of the main usable area and avoid missing ghost images in critical areas. The brightness of the illuminated area is set to a high brightness value higher than the background brightness, while the background is set to low brightness (e.g., black) to highlight the illuminated area and facilitate subsequent positioning. Figure 2 This shows a preset image projected by AR glasses.

[0027] In practice, control commands can be sent to the AR glasses through the built-in control module or an external control device, so that the glasses can project a preset image according to preset parameters (brightness, contrast, resolution, etc.). The projection parameters remain fixed during the detection process to avoid affecting the detection results due to parameter changes.

[0028] Step S2: Acquire raw image data. Specifically, raw image data can be obtained by acquiring the image data projected by the AR glasses using an imaging device (such as an imaging luminance meter). During the acquisition process, the position and angle of the imaging device can be adjusted to ensure that its lens is directly facing the light output port of the AR glasses, so that the imaging range completely covers the image projected by the AR glasses, avoiding the omission of image information in any area. At the same time, the acquisition parameters of the imaging device (such as sensitivity, resolution, etc.) are fixed so that the acquired image can accurately reflect the brightness distribution of the image, providing a reliable data foundation for subsequent image processing.

[0029] Step S3: Acquire the first image (overexposed image) and the second image (18% gray image). Combine... Figure 3 As shown, specifically, two detection scenes with different brightness levels can be set up to acquire a first image and a second image respectively. The combination of these two images affects the accuracy of subsequent detection. The first image is an overexposed image. The purpose of overexposure is to ensure that the real-image area reaches saturated brightness while fully capturing the brightness of the originally low-brightness ghost image area, preventing the ghost image from being masked by background noise due to insufficient brightness. The degree of overexposure needs to be reasonably controlled to ensure that the real-image area is saturated without causing the entire image to be completely overexposed and lose details. This is usually achieved by adjusting the exposure time of the imaging device (e.g., adjusting the exposure time to 2-3 times the normal acquisition time). The second image is an 18% gray image: 18% gray is the standard mid-tone brightness in the image industry. At this brightness, the image contrast is moderate, the brightness difference between the illuminated area (real image) and the background is obvious, and there is no overexposure or underexposure, which can accurately identify the boundary and position of the real-image area. When acquiring the two images, except for the exposure time, the projection parameters of the AR glasses, other acquisition parameters of the imaging device, and the acquisition position remain unchanged, so that the position of the real-image area in the two images is completely consistent, providing a prerequisite for subsequent mapping processing.

[0030] Step S4: Locate the illuminated area based on the second image. Specifically, the illuminated area (i.e., the real-world area) can be located based on the second image. Utilizing the brightness uniformity of the 18% grayscale image, the real-world area and background are distinguished by brightness differences: An overall brightness analysis is performed on the second image to calculate the average brightness value of the background area; a preset offset ratio (e.g., 30%) of the average background brightness value is used as the brightness threshold, i.e., brightness threshold = average background brightness value × (1 + offset ratio); connected pixel areas in the second image with brightness higher than this threshold are identified as illuminated areas. Adjacent illuminated pixels are merged through connectivity analysis to form a complete illuminated area, and its coordinate information (e.g., top-left corner coordinates, width, and height) is recorded. This positioning method is highly adaptive and can adapt to the projection brightness differences of different AR glasses to ensure positioning accuracy.

[0031] Step S5: Map the illuminated area and black it out. The coordinates of the illuminated area located in Step S4 can be mapped to the first image. Since the acquisition conditions (except for exposure time) of the two images are completely identical, the coordinates of the illuminated area in the two images correspond perfectly, so direct coordinate mapping is sufficient. Subsequently, combined with... Figure 4 As shown, the pixel regions corresponding to the lit areas in the first image are blacked out (brightness value set to the lowest level, such as 0), resulting in the processed image. The purpose of blacking out is to remove real-image interference in the first image, so that only possible ghosting regions and background are retained in the processed image, thus clearing obstacles for subsequent ghosting detection.

[0032] Step S6: Draw detection rectangles and extract average brightness values. Specifically, based on industry practice and experimental data that ghosting typically occurs above and below the real image, detection rectangles are drawn above and below the illuminated area in the processed image. Detection rectangle parameter design: width is consistent with the illuminated area to ensure coverage of possible ghosting areas above and below the real image; preset height is 5-50 pixels (adjustable according to AR glasses type, such as 10-20 pixels for diffractive waveguide AR glasses); the detection rectangles are adjacent to the illuminated area without gaps, the lower boundary of the upper detection rectangle coincides with the upper boundary of the illuminated area, and the upper boundary of the lower detection rectangle coincides with the lower boundary of the illuminated area. Extract average brightness values: Brightness statistics are performed on all pixels within each detection rectangle to calculate the average brightness value. This value reflects the overall brightness level of the area, avoiding the influence of individual pixel noise.

[0033] Step S7: Compare brightness values ​​to determine local ghosting. Specifically, the saturation brightness value of the overexposed area in the first image can be used as a preset brightness threshold (e.g., 255). A preset ratio (5%-20%, default 10%) is set, and the judgment threshold is calculated as: Preset brightness threshold × Preset ratio. If the average brightness value of the detection rectangle exceeds the judgment threshold, then ghosting is determined to exist in that area. The preset ratio is set based on human visual characteristics and product standards: when the ghosting brightness reaches more than 5% of the actual image brightness, it can be perceived by the human eye in normal use scenarios. The default ratio of 10% can balance detection sensitivity and false positive rate, and can be adjusted according to product level (5%-8% for high-end products, 12%-20% for ordinary products).

[0034] (8) Step S8: Eliminate interference areas and perform global threshold segmentation. Specifically, to cover ghost images in other locations of the real image, global detection can be performed: Eliminate interference areas. In the processed image, except for the already blacked-out lit areas, eliminate the detection rectangle area in step S6 (set its brightness value to 0) to avoid duplicate detection and interference; Global threshold segmentation: Adaptively determine the segmentation threshold based on the brightness distribution of the remaining area (take the average brightness value of the remaining area + 2 times the standard deviation), retain pixels with brightness higher than the threshold to form candidate areas, and black out pixels with brightness lower than the threshold to eliminate background noise. This step can effectively filter out all areas with abnormal brightness in the image, providing targets for global ghost detection.

[0035] Step S9: Contour detection and effective candidate region filtering to determine global ghosting. Specifically, the candidate regions after global threshold segmentation may contain noise (small areas of high-brightness pixel clusters), which can be further filtered: Contour detection: Identify the connected contours of the candidate regions, and regard the connected regions composed of adjacent high-brightness pixels as a contour, with each contour corresponding to a candidate region; Area filtering: Set a preset area threshold (50-500 pixels, adjusted according to resolution), remove noise regions with an area smaller than the threshold, and retain effective candidate regions; Brightness determination: Calculate the average brightness value of the effective candidate regions. If it exceeds the determination threshold (preset brightness threshold × preset ratio), then ghosting is determined to exist.

[0036] Step S10: Generate a ghost detection report. This step can be considered an optional additional step. Specifically, it can integrate local and global detection results to generate a detection report containing the following information: AR glasses identifier (serial number), detection time, ghost location (coordinates or area description), quantity, average brightness value and area of ​​each ghost, and pass / fail result (if there are ghosts exceeding the standard, it is unqualified; otherwise, it is qualified). The report can be stored as an electronic document or exported for easy quality traceability and data statistics.

[0037] In summary, the AR glasses ghost detection method provided in the above-mentioned embodiments of this application will achieve the following technical effects: (1) Significantly improved detection efficiency: The automated process does not require manual intervention, the detection time of a single AR glasses is greatly shortened, meeting the mass production requirements of KK level, solving the production bottleneck, and improving production efficiency by 5-20 times compared with manual detection. (2) Highly consistent detection results: Based on fixed algorithm logic and judgment criteria, it is not affected by human factors, and the repeatability and consistency of detection can reach more than 99%, significantly reducing the false detection rate and the false detection rate, ensuring the stability of product quality. (3) Reduced labor costs: It does not require a large number of inspectors, only a small number of equipment maintenance personnel, greatly reducing human input and management costs, and the long-term economic benefits are significant. (4) Provides quantitative data support: It can record parameters such as the position, brightness, and area of ​​ghosts to form a detection database, providing data support for the optimization of AR glasses optical architecture and the improvement of production processes, and helping product iteration and upgrading. (5) Wide range of applications: It is applicable to AR glasses using mainstream optical architectures such as diffractive waveguides and arrayed waveguides. By adjusting the parameters, it can be adapted to AR glasses with different field of view and resolution, with strong compatibility. (6) Comprehensive and accurate detection: It adopts a combination of local detection and global detection, which not only targets areas with high ghosting incidence, but also covers the entire screen. With multiple rounds of screening mechanisms (blacking out, brightness comparison, area screening), it meets the requirements of comprehensiveness and accuracy of detection.

[0038] Furthermore, this application also discloses an AR glasses ghost detection system, including an image control module, a data acquisition module, a dual-scene image acquisition module, a lit area positioning module, a blackout processing module, a local ghost detection module, a global ghost detection module, and a report generation module. Each module corresponds to the function of the above method steps and works together to achieve automated ghost detection. Specifically, the image control module sends control commands to the AR glasses to project a preset image; the data acquisition module collects the image data projected by the AR glasses to obtain the original image data; the dual-scene image acquisition module sets two detection scenes with different brightness levels to acquire an overexposed first image and an 18% gray second image; the illuminated area positioning module locates the illuminated area in the preset image based on the brightness distribution of the second image; the blackening processing module maps the position of the illuminated area to the first image and blackens the corresponding pixel area to generate a processed image; the local ghost detection module draws a detection rectangle in the processed image, extracts and compares the average brightness value, and determines local ghosts; the global ghost detection module removes interference areas and performs global threshold segmentation and contour filtering to determine global ghosts; and the report generation module integrates the detection results to generate a detection report containing detailed ghost parameters and pass / fail criteria.

[0039] Alternatively, the AR glasses ghost detection system can be implemented in another way, namely, the AR glasses ghost detection system includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, communication interface, and memory communicate with each other through the bus; the memory is used to store computer programs; the processor is used to implement any of the AR glasses ghost detection methods described in the above embodiments when executing the computer program.

[0040] In addition, this application embodiment also provides a storage medium storing a computer program, which, when executed by a processor, performs any of the aforementioned AR glasses ghost detection methods. Since the AR glasses ghost detection methods of the aforementioned embodiments have the aforementioned technical effects, the AR glasses ghost detection system and storage medium of this embodiment also have corresponding technical effects, which will not be elaborated further here.

[0041] It should be noted that the storage medium can be a computer-readable signal medium or a computer-readable storage medium. Storage media can be, for example,—but not limited to—electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: 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 fibers, portable compact disk read-only memory (CD-ROM). ROM, optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.

[0042] Additionally, a computer-readable signal medium may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device.

[0043] Furthermore, the program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0044] Additionally, 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++, as well as conventional procedural programming languages ​​such as "C" 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 such as a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0045] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of this application. It should be understood that the above descriptions are merely specific embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for detecting ghosting in AR glasses, characterized in that, The steps include: controlling the AR glasses to project a preset image; acquiring the image data projected by the AR glasses through an imaging device to obtain the original image data; setting two detection scenes with different brightness, and acquiring a first image and a second image respectively, wherein the first image is an overexposed image and the second image is a grayscale image; Based on the second image, locate the illuminated area in the preset image; map the position of the illuminated area to the first image, and black out the pixel area corresponding to the illuminated area in the first image to obtain a processed image; in the processed image, draw detection rectangles of preset height above and below the illuminated area, and extract the average brightness value of each detection rectangle; compare the average brightness value of each detection rectangle with a preset brightness threshold, and if the average brightness value exceeds a preset proportion of the preset brightness threshold, it is determined that the corresponding detection rectangle area has a ghost image; in the processed image, remove the illuminated area and the pixel area corresponding to the detection rectangle, and perform global threshold segmentation on the remaining area to obtain candidate areas; perform contour detection on the candidate areas, filter out valid candidate areas with an area greater than a preset area threshold, calculate the average brightness value of the valid candidate areas, and if the average brightness value exceeds the preset brightness threshold, it is determined that the valid candidate areas have a ghost image.

2. The AR glasses ghost detection method according to claim 1, characterized in that, The preset screen includes at least one illuminated area, which is rectangular, circular, or polygonal in shape, and covers the main field of view of the AR glasses.

3. The AR glasses ghost detection method according to claim 1, characterized in that, When acquiring the first image and the second image, the projection parameters of the AR glasses, the acquisition parameters of the imaging device, and the acquisition position are kept unchanged. Only the exposure time of the imaging device is adjusted to obtain images with different brightness.

4. The AR glasses ghost detection method according to claim 1, characterized in that, The specific process of locating the illuminated area based on the second image is as follows: perform an overall brightness analysis on the second image to determine the average brightness value of the background, use a preset offset ratio of the average brightness value of the background as a brightness threshold, and determine the connected pixel areas in the second image whose brightness is higher than the brightness threshold as illuminated areas.

5. The AR glasses ghost detection method according to claim 1, characterized in that, When mapping the illuminated area to the first image, a direct coordinate mapping method is used to ensure that the position of the illuminated area in the first image is completely consistent with that in the second image. When processing to black out, the brightness value of the corresponding area is set to the lowest brightness value.

6. The AR glasses ghost detection method according to claim 1, characterized in that, The preset height is 5-50 pixels, the width of the detection rectangle is the same as the width of the illuminated area, and the detection rectangle and the illuminated area are adjacent without gaps.

7. The AR glasses ghost detection method according to claim 1, characterized in that, The preset brightness threshold is the saturation brightness value of the overexposed area in the first image, the preset ratio is 5%-20%, and the preset ratio can be adaptively adjusted according to the product quality standards of AR glasses.

8. The AR glasses ghost detection method according to claim 1, characterized in that, The threshold for global threshold segmentation is adaptively determined by the brightness distribution of the remaining region, specifically by taking the sum of the average brightness value of the remaining region and twice the standard deviation.

9. The AR glasses ghost detection method according to claim 1, characterized in that, The preset area threshold is 50-500 pixels. When filtering valid candidate regions, only regions corresponding to connected contours with an area greater than the preset area threshold are retained.

10. The AR glasses ghost detection method according to claim 1, characterized in that, It also includes step S10: generating a ghost detection report, which includes AR glasses identification information, detection time, location and number of ghosts, average brightness value, area and pass / fail judgment result.

11. A ghost detection system for AR glasses, characterized in that, include: The screen control module is used to send control commands to the AR glasses to project a preset image; The data acquisition module is used to acquire the image data projected by the AR glasses to obtain the original image data; the dual-scene image acquisition module is used to set two detection scenes with different brightness to acquire the overexposed first image and the gray second image respectively. The system includes a lit area localization module for locating lit areas in the preset image based on the brightness distribution of the second image; a blacking-out module for mapping the position of the lit areas to the first image and blacking out the corresponding pixel areas to generate a processed image; a local ghost detection module for drawing detection rectangles in the processed image, extracting and comparing average brightness values ​​to determine local ghosts; and a global ghost detection module for removing interference areas, performing global threshold segmentation and contour filtering to determine global ghosts.

12. A storage medium, characterized in that, It stores a computer program, characterized in that, when the computer program is executed by a processor, it implements the extended application control method according to any one of claims 1 to 10.