Imaging detection method and device of head-mounted device, medium and head-mounted device
By dataizing the grayscale value of the virtual image of the head-mounted device, the maximum grayscale value of the copied image is determined, which solves the problem of poor detection effect in the prior art and achieves more accurate and efficient imaging detection.
Patent Information
- Application Number
- CN202311302943.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-10
- Publication Date
- 2025-04-11
AI Technical Summary
The existing head-mounted device imaging detection methods rely on human eye observation, and the detection effect is poor, making it difficult to effectively test the quality of the optical display system.
By acquiring the virtual image, determining the detection area, filtering and retaining multiple copied images, marking and comparing the grayscale values of the copied images, if the maximum grayscale value is less than or equal to the preset value, it is determined that the virtual image is qualified.
Data-based methods are used to clarify the imaging effect of virtual images, avoid human eye estimates, improve the accuracy and efficiency of imaging detection of head-mounted devices, and further improve the yield rate.
Smart Images

Figure CN119803860A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an imaging detection method, device, medium and head-mounted device for a head-mounted device. Background Art
[0002] With the development of science and technology, head-mounted devices are gradually applied to users' lives. Smart glasses are a type of head-mounted devices. The head-mounted device includes an optical machine and a waveguide. The light output by the optical machine is transmitted through the waveguide and forms a virtual image in the waveguide, wherein the virtual image includes a reference image and a replica image corresponding to the reference image. At this time, the light output by the optical machine is coupled into the grating and coupled into the waveguide matrix, propagates in the waveguide matrix by total reflection, and forms a virtual image. Before being put into use, the virtual image in the optical display system of the head-mounted device needs to be tested to verify the quality of the optical display system of the head-mounted device.
[0003] In the prior art, image processing is performed on a virtual image, and multiple processed virtual images are displayed separately, each virtual image is observed by the human eye, and whether the virtual image is qualified is judged based on the user's intuitive selection, resulting in poor detection effect of the existing imaging detection method of the head-mounted device. Summary of the invention
[0004] The embodiments of the present application provide an imaging detection method, device, medium and head-mounted device for a head-mounted device, thereby, at least to a certain extent, being able to determine the imaging effect of a virtual image by the grayscale values of multiple replicated images, and using digitized means to clarify the imaging effect of the virtual image, thereby avoiding using the human eye to estimate the imaging effect of the virtual image, thereby improving the detection effect of the imaging detection method of the head-mounted device, and further testing the yield rate of the head-mounted device.
[0005] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0006] According to one aspect of an embodiment of the present application, an imaging detection method for a head-mounted device is provided, wherein the head-mounted device includes an optical machine and a waveguide, wherein light output by the optical machine is transmitted through the waveguide and forms a virtual image in the waveguide;
[0007] The imaging detection method of the head mounted device comprises:
[0008] Obtaining a virtual image;
[0009] determining a detection area based on the virtual image;
[0010] Determining a plurality of continuous regions according to the detection region, wherein the plurality of continuous regions include a reference image and a replica image corresponding to the reference image;
[0011] Screen multiple continuous areas and keep multiple replicate images;
[0012] Marking the gray values of a plurality of replicated images and determining the maximum gray value;
[0013] If the maximum grayscale value is less than or equal to the preset grayscale value, the virtual image is in a qualified state.
[0014] In some embodiments of the present application, determining a plurality of continuous areas according to the detection area includes:
[0015] Perform grayscale processing based on the detection area and determine the average grayscale value and grayscale variance;
[0016] Determine the target area according to the sum of the average gray value and the gray variance and the gray threshold;
[0017] An opening operation is performed based on the target region, and multiple continuous regions are determined.
[0018] In some embodiments of the present application, performing an opening operation based on the target area and determining a plurality of continuous areas includes:
[0019] Based on an opening operation of the target region, a separation region and a plurality of continuous regions are determined, wherein a gap exists between the separation region and the plurality of continuous regions;
[0020] Erodes separate regions and leaves multiple contiguous regions.
[0021] In some embodiments of the present application, screening multiple continuous areas and retaining multiple copy images includes:
[0022] determining the shape of the continuous region based on the outer contour of the continuous region;
[0023] Determine a non-circular shape or a circular shape based on the shape of the continuous region;
[0024] If the shape of the continuous region is non-circular, remove the continuous region;
[0025] Get multiple continuous areas corresponding to the circular shape;
[0026] In a plurality of continuous regions corresponding to the circular shape, the reference image is removed and a plurality of copy images are retained.
[0027] In some embodiments of the present application, determining the non-circular shape or the circular shape according to the shape of the continuous area includes:
[0028] Obtaining at least one of the area, circularity, and major semi-axis corresponding to the shape of the continuous region;
[0029] If at least one of the area, circularity and major semi-axis corresponding to the shape of the continuous region is greater than a preset parameter, the shape of the continuous region is a non-circular shape;
[0030] If at least one of the area, circularity and major semi-axis corresponding to the shape of the continuous region is smaller than a preset parameter, the shape of the continuous region is a circle.
[0031] In some embodiments of the present application, in a plurality of continuous areas corresponding to the circular shape, removing the reference image and retaining a plurality of copy images includes:
[0032] determining the reference image in a plurality of continuous regions based on the center position of the reference image;
[0033] The reference image is removed to obtain the position of each replicated image;
[0034] A plurality of duplicate images are determined based on a symmetric relationship between the position of each duplicate image and the center position of the reference image.
[0035] In some embodiments of the present application, marking the grayscale values of the plurality of replicated images and determining the maximum grayscale value includes:
[0036] Obtaining grayscale values corresponding to multiple copied images;
[0037] The grayscale values corresponding to the multiple copied images are sorted according to size, and the maximum grayscale value is determined.
[0038] According to one aspect of an embodiment of the present application, there is provided an imaging detection device for a head mounted device, comprising:
[0039] An acquisition module, used for acquiring a virtual image;
[0040] A first area module, used to determine a detection area based on a virtual image;
[0041] A second area module, used to determine a plurality of continuous areas according to the detection area, wherein the plurality of continuous areas include a reference image and a copy image corresponding to the reference image;
[0042] An image module, used for screening multiple continuous areas and retaining multiple replicate images;
[0043] A gray value module, used for marking gray values of a plurality of copied images and determining a maximum gray value;
[0044] The status module is used to determine that the virtual image is in a qualified state if the maximum grayscale value is less than or equal to a preset grayscale value.
[0045] According to one aspect of an embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the imaging detection method of the head-mounted device as described in the above embodiment is implemented.
[0046] According to one aspect of an embodiment of the present application, a head-mounted device is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the imaging detection method of the head-mounted device as described in the above embodiments.
[0047] According to one aspect of an embodiment of the present application, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the imaging detection method of the head-mounted device provided in the above embodiment.
[0048] In the technical solutions provided in some embodiments of the present application, a head-mounted device includes an optical machine and a waveguide, and the light output by the optical machine is transmitted through the waveguide to form a virtual image in the waveguide; wherein, the virtual image is obtained; a detection area is determined based on the virtual image; multiple continuous areas are determined according to the detection area; multiple continuous areas are screened, and multiple copy images are retained; the grayscale values of multiple copy images are marked, and the maximum grayscale value is determined; if the maximum grayscale value is less than or equal to the preset grayscale value, the virtual image is in a qualified state, so that the imaging effect of the virtual image is determined by the grayscale values of the multiple copy images, and the imaging effect of the virtual image is clarified by using data means, avoiding the use of human eyes to estimate the imaging effect of the virtual image, thereby improving the detection effect of the imaging detection method of the head-mounted device, and further testing the yield rate of the head-mounted device.
[0049] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0051] Figure 1 A schematic diagram showing a flow chart of an imaging detection method for a head mounted device according to an embodiment of the present application is shown;
[0052] Figure 2 Shows Figure 1 Schematic diagram of the process flow of S130;
[0053] Figure 3 Shows Figure 1 Schematic diagram of the process of S140;
[0054] Figure 4 Shows Figure 1 Schematic diagram of the process flow of S150;
[0055] Figure 5 A block diagram of an imaging detection device of a head mounted device according to an embodiment of the present application is shown;
[0056] Figure 6 A schematic diagram of the structure of a computer system suitable for implementing a head mounted device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0057] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0058] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0059] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0060] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0061] Head-mounted devices are gradually applied to users' lives. Smart glasses are a type of head-mounted devices. The head-mounted devices include an optical machine and a waveguide. The light output by the optical machine is transmitted through the waveguide and forms a virtual image in the waveguide. At this time, the light output by the optical machine is coupled into the grating and coupled into the waveguide matrix, propagates in the waveguide matrix by total reflection, and forms a virtual image.
[0062] Figure 1 A flow chart of an imaging detection method for a head-mounted device according to an embodiment of the present application is shown. The method can be applied to a head-mounted device. It is worth noting that the number of head-mounted devices can be one or more, such as two or more, and the present application does not specifically limit this. Head-mounted devices such as AR (Augmented Reality), VR (Virtual Reality), MR (Mixed Reality), etc. are not limited here.
[0063] The imaging detection method of the head mounted device includes at least steps S110 to S160, which are described in detail as follows (the following description is made by taking the application of the method to the head mounted device as an example):
[0064] In step S110 , a virtual image is acquired.
[0065] In this embodiment, the light output by the optical machine is coupled into the grating and coupled into the waveguide matrix, propagates in the waveguide matrix by total reflection, and forms a virtual image, which needs to be pre-processed before the replica image can be clearly presented.
[0066] When the virtual image is preprocessed, the virtual image has a black background and contains a bright central circle. At this time, the bright central circle serves as a reference image, and the copy image relative to the reference image is covered by the black background. The central circle is used as a reference image, and the characteristics of the circular shape are fully utilized to facilitate further comparison of the outer contour of the circle. Normally, the grayscale value of the reference image is about 40 times that of the copy image, and there is no restriction here.
[0067] At the same time, because the images collected when the same optical machine is used to detect different waveguides cannot be overexposed, in this case, some images collected by the brightness meter have a small overall grayscale value. In order to be able to reflect the copied image on the collected image, the acquisition system needs to collect 16-bit images. Optionally, the grayscale value range of the 16-bit image is 0-65535.
[0068] In step S120 , a detection area is determined based on the virtual image.
[0069] Specifically, the 16-bit Raw image is converted into an RGB three-color image and then into a grayscale image, so that the reference image and multiple copy images can be presented through the grayscale image, wherein the position of the reference image is located by threshold segmentation. At this time, a coordinate system is established based on the grayscale image, and the position coordinates of the reference image are determined according to the position of the reference image in the grayscale image and the coordinate system.
[0070] Take the center of the reference image as the center coordinate and draw a circle with a radius of 1200 pixels. Perform nonlinear grayscale transformation on the image in this area. The formula is as follows:
[0071] G'=G exponent
[0072] Among them, G is the gray value of the original image, G' is the gray value of the image after pow transformation; Exponent is the exponent, which is generally 0.25, 0.5, 2, 3, 4, etc.
[0073] Therefore, a nonlinear grayscale transformation is performed on the image of this region so as to limit the detection region of the virtual image and further narrow the scope of the detection region, so as to improve subsequent operations of the detection region and improve the processing efficiency of the copied image.
[0074] Furthermore, the grayscale image is normalized to facilitate contrast stretching. At this time,
[0075]
[0076] g represents the image before normalization, and g' represents the image after normalization.
[0077] Secondly, the background of the normalized image is removed, the image background imbalance problem is processed based on the background removal method, and the normalized image is subjected to a top-hat transform, and the reference image and the copy image are further processed to obtain an image whose background grayscale value is almost 0 and whose grayscale values of the copy image and the reference image are not 0. Optionally, the size of the structural element of the top-hat transform is larger than the diameter of the reference image.
[0078] Performing contrast processing on the detection area to expand the contrast of the image will make the black areas darker and the bright areas brighter, further highlighting the copy image and the reference image. At this time, g'=g*Mult+Add; g represents the grayscale value of the image before processing, and g' represents the grayscale value of the image after processing, where Mult takes a value of 10 and Add takes a value of 0.
[0079] Please refer to Figure 2 In step S130, a plurality of continuous regions are determined according to the detection region, wherein the plurality of continuous regions include a reference image and a copy image corresponding to the reference image.
[0080] In this embodiment, further regional processing is performed on the pre-processed detection area. At this time, multiple continuous areas are determined according to the detection area, and the separated areas are removed to reduce the impact of the separated areas, thereby ensuring subsequent processing of the multiple continuous areas, wherein the multiple continuous areas include a reference image and a copy image corresponding to the reference image.
[0081] The specific steps are as follows:
[0082] Step S131, performing grayscale processing based on the detection area, and determining the average grayscale value and grayscale variance;
[0083] Step S132, determining the target area according to the sum of the average gray value and the gray variance and the gray threshold;
[0084] In an embodiment of the present application, grayscale processing is performed on the detection area, and operations are performed based on the grayscale value of the detection area to facilitate determining the average grayscale value and the grayscale variance. When determining the average grayscale value and the grayscale variance, the target area is determined based on the sum of the average grayscale value and the grayscale variance and the grayscale threshold, so that the target area can be further segmented based on the detection area, thereby facilitating further operations on the target area, reducing the influence of other areas, and improving the computational efficiency of the reference image and multiple copy images.
[0085] Step S133: perform an opening operation based on the target area and determine a plurality of continuous areas.
[0086] In the embodiment of the present application, based on the opening operation of the target area, the separation area and multiple continuous areas are determined, wherein there is a gap between the separation area and the multiple continuous areas; the separation area is eroded, and the multiple continuous areas are retained. At this time, the opening operation is performed based on the target area, and the opening operation can remove isolated points, separation areas, burrs, etc. in the target area, so as to filter the isolated points, separation areas, and burrs in the target area, thereby highlighting the separation area and multiple continuous areas, wherein there is a gap between the separation area and the multiple continuous areas.
[0087] In an embodiment of the present application, for the zone operation of the target area, it is necessary to erode the separated area and retain multiple continuous areas. Therefore, the areas that may be stuck together are separated through the opening operation of the target area, thereby ensuring the subsequent processing of multiple continuous areas and avoiding the influence of the separated areas. Optionally, the size of the opening operation structure element is smaller than the radius of the reference image.
[0088] Please refer to Figure 3 , in step S140, a plurality of continuous regions are screened, and a plurality of copy images are retained.
[0089] In this embodiment, multiple continuous areas are screened, and further screened according to the shapes of the continuous areas, so as to filter based on the shapes of the continuous areas, thereby retaining circular continuous areas and further filtering the noise, so as to further clarify the copied image and improve the accuracy of the copied image.
[0090] The specific steps are as follows:
[0091] Step S141, determining the shape of the continuous region based on the outer contour of the continuous region;
[0092] In an embodiment of the present application, the outline of the continuous region is stroked, and the shape of the continuous region is determined based on the outer contour of the continuous region, and further screening is performed based on the shape of the continuous region.
[0093] Step S142, determining a non-circular shape or a circular shape according to the shape of the continuous area;
[0094] In an embodiment of the present application, at least one of the area, circularity and major semi-axis corresponding to the shape of the continuous region is obtained; if at least one of the area, circularity and major semi-axis corresponding to the shape of the continuous region is greater than a preset parameter, the shape of the continuous region is a non-circular shape; if at least one of the area, circularity and major semi-axis corresponding to the shape of the continuous region is less than a preset parameter, the shape of the continuous region is a circular shape.
[0095] At this time, the area, circularity and major semi-axis corresponding to the shape of the continuous region are used as parameters affecting the shape of the circle, so that the shape of the continuous region can be authenticated through multiple or single parameters, thereby achieving a higher degree of recognition of the shape of the continuous region, and determining the non-circular shape or circular shape in multiple aspects, and further screening the copied image, achieving a layer-by-layer screening effect.
[0096] Step S143: if the shape of the continuous region is non-circular, remove the continuous region;
[0097] In an embodiment of the present application, removal processing is performed on non-circular shapes. At this time, if the shape of the continuous area is non-circular, the continuous area is removed, and our copied image is circular. Therefore, the continuous area with a non-circular shape is removed to reduce the impact of noise and maximize the accuracy of the data of the copied image.
[0098] Step S144, obtaining a plurality of continuous regions corresponding to the circular shape;
[0099] Step S145 : In a plurality of continuous regions corresponding to the circular shape, remove the reference image and retain a plurality of copy images.
[0100] In an embodiment of the present application, multiple continuous regions corresponding to the circular shape are determined based on a comparison of at least one of the area, roundness and major semi-axis corresponding to the shape of the continuous region, so as to facilitate further image copying operations for the multiple continuous regions corresponding to the circular shape.
[0101] In multiple continuous areas corresponding to the circular shape, the reference image in the multiple continuous areas is determined based on the center position of the reference image; the reference image is removed to obtain the position of each replicated image; multiple replicated images are determined based on the symmetric relationship between the position of each replicated image and the center position of the reference image, and the symmetric relationship between the position of the replicated image and the center position of the reference image is fully utilized to authenticate the number of replicated images, which is sufficient to supplement the missing replicated images, so as to ensure the accuracy of the replicated images.
[0102] For the missing copy images, draw a circular area with a radius of 20 pixels, and find the intersection between the circular area and multiple continuous areas. If the intersection is not empty, the result is 1, otherwise it is 0; find the intersection between the circular area and the area after the opening operation of multiple continuous areas. If the intersection is not empty, the result is 1, otherwise it is 0. If the first intersection is 0 and the second intersection is 1, the area that intersects with the circle is added to the area of the multiple continuous areas as a copy image to form the final copy image result.
[0103] Please refer to Figure 4 In step S150, the grayscale values of the plurality of replicated images are marked, and the maximum grayscale value is determined.
[0104] The specific steps are as follows:
[0105] Step S151, obtaining grayscale values corresponding to a plurality of copied images;
[0106] Step S152, sorting the grayscale values corresponding to the plurality of copied images according to their size, and determining the maximum grayscale value;
[0107] In an embodiment of the present application, grayscale values of multiple replicated images are marked to facilitate grayscale value-based calculations and determine the maximum grayscale value, so that the replicated image with the maximum grayscale value is further compared to facilitate qualified testing among the multiple replicated images.
[0108] In step S160, if the maximum grayscale value is less than or equal to the preset grayscale value, the virtual image is in a qualified state.
[0109] In an embodiment of the present application, if the maximum grayscale value is less than or equal to the preset grayscale value, the virtual image is in a qualified state, so that the imaging effect of the virtual image is determined by the grayscale values of multiple replicated images, and the imaging effect of the virtual image is clarified by a digitized method, avoiding the use of the human eye to estimate the imaging effect of the virtual image, thereby improving the detection effect of the imaging detection method of the head-mounted device and further testing the yield rate of the head-mounted device. In addition, if the maximum grayscale value is greater than the preset grayscale value, the virtual image is in an unqualified state. Optionally, the preset grayscale value can be set according to human experience.
[0110] The following describes an apparatus embodiment of the present application, which can be used to perform the imaging detection method of the head-mounted device in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the embodiment of the imaging detection method of the head-mounted device in the above-mentioned embodiment of the present application.
[0111] Figure 5 A block diagram of an imaging detection device of a head mounted device according to an embodiment of the present application is shown.
[0112] Reference Figure 5 As shown, an imaging detection device for a head mounted device according to an embodiment of the present application includes:
[0113] An acquisition module 210, used for acquiring a virtual image;
[0114] A first area module 220, configured to determine a detection area based on a virtual image;
[0115] A second region module 230, configured to determine a plurality of continuous regions according to the detection region, wherein the plurality of continuous regions include a reference image and a replica image corresponding to the reference image;
[0116] An image module 240, for screening a plurality of continuous regions and retaining a plurality of duplicate images;
[0117] A gray value module 250, for marking gray values of a plurality of replicated images and determining a maximum gray value;
[0118] The status module 260 is used to determine that the virtual image is in a qualified state if the maximum grayscale value is less than or equal to a preset grayscale value.
[0119] In one embodiment of the present application, the second region module 230 is further used to: perform grayscale processing based on the detection region, and determine an average grayscale value and a grayscale variance;
[0120] Determine the target area according to the sum of the average gray value and the gray variance and the gray threshold;
[0121] An opening operation is performed based on the target region, and multiple continuous regions are determined.
[0122] In one embodiment of the present application, the second region module 230 is further used to: determine a separation region and a plurality of continuous regions based on an opening operation of the target region, wherein there is a gap between the separation region and the plurality of continuous regions;
[0123] Erodes separate regions and leaves multiple contiguous regions.
[0124] In one embodiment of the present application, the image module 240 is further used to: determine the shape of the continuous region based on the outer contour of the continuous region;
[0125] Determine a non-circular shape or a circular shape based on the shape of the continuous region;
[0126] If the shape of the continuous region is non-circular, remove the continuous region;
[0127] Get multiple continuous areas corresponding to the circular shape;
[0128] In a plurality of continuous regions corresponding to the circular shape, the reference image is removed and a plurality of copy images are retained.
[0129] In one embodiment of the present application, the image module 240 is further used to: obtain at least one of the area, circularity and major semi-axis corresponding to the shape of the continuous region;
[0130] If at least one of the area, circularity and major semi-axis corresponding to the shape of the continuous region is greater than a preset parameter, the shape of the continuous region is a non-circular shape;
[0131] If at least one of the area, circularity and major semi-axis corresponding to the shape of the continuous region is smaller than a preset parameter, the shape of the continuous region is a circle.
[0132] In one embodiment of the present application, the image module 240 is further used to: determine the reference image in a plurality of continuous regions based on the center position of the reference image;
[0133] The reference image is removed to obtain the position of each replicated image;
[0134] A plurality of duplicate images are determined based on a symmetric relationship between the position of each duplicate image and the center position of the reference image.
[0135] In one embodiment of the present application, the gray value module 250 is further used to: obtain gray values corresponding to a plurality of replicated images;
[0136] The grayscale values corresponding to the multiple copied images are sorted according to size, and the maximum grayscale value is determined.
[0137] Figure 6 A schematic diagram of the structure of a computer system suitable for implementing a head mounted device according to an embodiment of the present application is shown.
[0138] It should be noted that Figure 6 The computer system of the head mounted device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0139] like Figure 6 As shown, the computer system includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 302 or the program loaded from the storage part 308 to the random access memory (RAM) 303, such as executing the method described in the above embodiment. In RAM 303, various programs and data required for system operation are also stored. CPU 301, ROM 302 and RAM 303 are connected to each other through bus 304. Input / output (I / O) interface 305 is also connected to bus 304.
[0140] The following components are connected to the I / O interface 305: an input section 306 including a keyboard, a mouse, etc.; an output section 307 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed so that a computer program read therefrom is installed into the storage section 308 as needed.
[0141] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 309, and / or installed from a removable medium 311. When the computer program is executed by a central processing unit (CPU) 301, various functions defined in the system of the present application are executed.
[0142] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0143] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0144] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0145] As another aspect, the present application also provides a computer-readable medium, which may be included in the head-mounted device described in the above embodiment; or may exist independently without being assembled into the head-mounted device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a head-mounted device, the head-mounted device implements the method described in the above embodiment.
[0146] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0147] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0148] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.
[0149] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. An imaging detection method for a head mounted device, characterized in that: The head-mounted device includes an optical machine and a waveguide, and the light output by the optical machine is transmitted through the waveguide to form a virtual image in the waveguide; The imaging detection method of the head mounted device comprises: Obtaining a virtual image; determining a detection area based on the virtual image; Determining a plurality of continuous regions according to the detection region, wherein the plurality of continuous regions include a reference image and a replica image corresponding to the reference image; Screen multiple continuous areas and keep multiple replicate images; Marking the gray values of a plurality of replicated images and determining the maximum gray value; If the maximum grayscale value is less than or equal to the preset grayscale value, the virtual image is in a qualified state.
2. The method according to claim 1, characterized in that The determining of a plurality of continuous areas according to the detection area comprises: Perform grayscale processing based on the detection area and determine the average grayscale value and grayscale variance; Determine the target area according to the sum of the average gray value and the gray variance and the gray threshold; An opening operation is performed based on the target region, and multiple continuous regions are determined.
3. The method according to claim 2, characterized in that The opening operation is performed based on the target area, and a plurality of continuous areas are determined, including: Based on an opening operation of the target region, a separation region and a plurality of continuous regions are determined, wherein a gap exists between the separation region and the plurality of continuous regions; Erodes separate regions and leaves multiple contiguous regions.
4. The method according to claim 1, characterized in that: The screening of multiple continuous areas and retaining multiple copy images includes: determining the shape of the continuous region based on the outer contour of the continuous region; Determine a non-circular shape or a circular shape based on the shape of the continuous region; If the shape of the continuous region is non-circular, remove the continuous region; Get multiple continuous areas corresponding to the circular shape; In a plurality of continuous regions corresponding to the circular shape, the reference image is removed and a plurality of copy images are retained.
5. The method according to claim 4, characterized in that The determining of the non-circular shape or the circular shape according to the shape of the continuous region comprises: Obtaining at least one of the area, circularity, and major semi-axis corresponding to the shape of the continuous region; If at least one of the area, circularity and major semi-axis corresponding to the shape of the continuous region is greater than a preset parameter, the shape of the continuous region is a non-circular shape; If at least one of the area, circularity and major semi-axis corresponding to the shape of the continuous region is smaller than a preset parameter, the shape of the continuous region is a circle.
6. The method according to claim 4, characterized in that In the plurality of continuous areas corresponding to the circular shape, removing the reference image and retaining the plurality of duplicate images comprises: determining the reference image in a plurality of continuous regions based on the center position of the reference image; The reference image is removed to obtain the position of each replicated image; A plurality of duplicate images are determined based on a symmetric relationship between the position of each duplicate image and the center position of the reference image.
7. The method according to claim 1, characterized in that The step of marking the grayscale values of the plurality of replicated images and determining the maximum grayscale value comprises: Obtaining grayscale values corresponding to multiple copied images; The grayscale values corresponding to the multiple copied images are sorted according to size, and the maximum grayscale value is determined.
8. An imaging detection device for a head-mounted device, characterized in that: include: An acquisition module, used for acquiring a virtual image; A first area module, used to determine a detection area based on a virtual image; A second area module, used to determine a plurality of continuous areas according to the detection area, wherein the plurality of continuous areas include a reference image and a copy image corresponding to the reference image; An image module, used for screening multiple continuous areas and retaining multiple replicate images; A gray value module, used for marking gray values of a plurality of copied images and determining a maximum gray value; The status module is used to determine that the virtual image is in a qualified state if the maximum grayscale value is less than or equal to a preset grayscale value.
9. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the imaging detection method of the head mounted device according to any one of claims 1 to 7 is implemented.
10. A head mounted device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the imaging detection method of the head-mounted device as described in any one of claims 1 to 7.