Augmented reality content display method and apparatus, electronic device, and storage medium
By determining a sparse point set in a real-world scene image and assigning it three-dimensional depth coordinates, and iteratively detecting the cross coefficient, the problem of fixed rendering position in virtual content fusion technology is solved, enabling adaptive virtual content display that is suitable for various scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MIGU CO LTD
- Filing Date
- 2022-08-23
- Publication Date
- 2026-04-28
AI Technical Summary
Existing technologies for integrating virtual content with the real world either rely on recognition libraries and have relatively fixed rendering locations, limiting their applicability, or involve complex processes that make large-scale production difficult.
By acquiring the planar coordinate point set and edge feature point set of the real scene image, the target sparse point set is determined and assigned a three-dimensional spatial depth coordinate. The cross coefficient between the virtual content and the edge feature point set is iteratively detected, and points with a cross coefficient less than a threshold are selected as the positioning points of the display area to achieve adaptive display of virtual content.
It achieves adaptive positioning of virtual content in real-world scenes, avoids occlusion of real-world objects, simplifies preparation, does not rely on recognition libraries or 3D spatial models, and is suitable for various scenarios.
Smart Images

Figure CN115619985B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of augmented display technology, specifically to an augmented reality content display method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] Currently, with the increasing maturity of AR / MR devices and the gradual unveiling of the metaverse era, virtual content in real life will emerge explosively. This will inevitably include a large amount of high-frequency virtual content, such as social media content. How to effectively integrate this high-frequency, small-sized content into the real world and present it in a relatively appropriate position within people's field of vision will be a common problem that needs to be solved.
[0003] In implementing the embodiments of this invention, the inventors discovered that existing technologies for integrating virtual content with the real world either rely entirely on recognition libraries and have relatively fixed rendering positions, limiting their applicability, or have complex processes that are difficult to mass-produce. Therefore, there is an urgent need for a simple, adaptive augmented reality content display method that does not rely on images or real-world environmental features. Summary of the Invention
[0004] In view of the above problems, embodiments of the present invention provide an augmented reality content display method, apparatus, electronic device, and computer-readable storage medium to solve the technical problem of the inability to adaptively perform positioning in the prior art.
[0005] According to one aspect of the present invention, an augmented reality content display method is provided, the method comprising:
[0006] Acquire images of the real-world scene and the virtual content to be displayed;
[0007] A display area is determined from the real-world scene image, wherein the overlap between the scene content and the virtual content in the display area is less than a threshold.
[0008] The virtual content is displayed in the display area of the real-world scene image.
[0009] In one optional approach, determining the display area from the real-world scene image, wherein the overlap between the scene content and the virtual content in the display area is less than a threshold, includes: acquiring a set of planar coordinate points and a set of edge feature points corresponding to a first region in a two-dimensional plane of the real-world scene image; determining a target sparse point set based on the set of planar coordinate points and the set of edge feature points; assigning three-dimensional spatial depth coordinates to the set of planar coordinate points; iteratively detecting the cross-coefficient between the virtual content and the set of edge feature points within the range of the three-dimensional spatial depth coordinates; using points in the target sparse point set whose cross-coefficient is less than the threshold as positioning points; and determining the display area based on the positioning points.
[0010] In one alternative approach, iteratively detecting the cross coefficient between the virtual content and the edge feature point set within the range of the three-dimensional spatial depth coordinates includes: assigning three-dimensional spatial depth coordinates to the target sparse point set, establishing a cube of the size of the virtual content at each point in the target sparse point set, and iteratively calculating the cross coefficient between the cube and the edge feature point set within the range of the three-dimensional spatial depth coordinates.
[0011] In an optional embodiment, the method further includes: acquiring a set of planar coordinate points of the real-world scene image; acquiring a set of edge feature points of key distinguishing points in the real-world scene image; determining a target sparse point set based on the set of planar coordinate points and the set of edge feature points; assigning three-dimensional spatial depth coordinates to the target sparse point set; establishing a cube of the size of the virtual content at each point in the target sparse point set; iteratively calculating the cross coefficient between the cube and the set of edge feature points within the range of the three-dimensional spatial depth coordinates; and using the point with the smallest cross coefficient in the target sparse point set as the positioning point of the display area.
[0012] In one optional approach, obtaining the planar coordinate point set and edge feature point set corresponding to the first region in the two-dimensional plane of the real-world scene image includes: acquiring planar point sets of the real-world scene image according to a preset sampling rate to obtain an initial point set; searching for neighboring points of each point in the initial point set to obtain a neighbor matrix of the initial point set; taking the smallest neighbor feature value in the neighbor matrix of the initial point set as the normal vector of the initial point set; constructing an initial plane with each point in the initial point set and the normal vector; counting the number of interior points of all remaining points in the initial point set excluding the points that form the initial plane with the normal vector, and determining the initial plane as a target plane when the number of interior points is greater than a preset first threshold; taking the target plane with the maximum number of interior points as the output plane to obtain the planar coordinate point set corresponding to the output plane.
[0013] In one optional approach, determining the target sparse point set based on the planar coordinate point set and the edge feature point set includes: when the planar coordinate point set is empty, using points within a first preset range of the center point of the real-world scene image as the initial sparse point set; when the planar coordinate point set is not empty, using points within a second preset range of the center point of the output plane corresponding to the planar coordinate point set as the initial sparse point set; counting the number of edge feature point sets contained in the initial sparse point set with each point as a cluster center; and selecting a preset second number of points in the initial sparse point set with the smallest number of edge feature point sets contained in the initial sparse point set with each point as a cluster center to constitute the target sparse point set.
[0014] In one optional approach, assigning three-dimensional spatial depth coordinates to the target sparse point set, and using each point in the target sparse point set as the center of the virtual content, iteratively calculating the cross coefficient between the virtual content and the edge feature point set within the range of the three-dimensional spatial depth coordinates, includes: mapping the coordinates of each point in the target sparse point set to three-dimensional coordinates to obtain a three-dimensional point set; assigning new three-dimensional spatial depth coordinates to the three-dimensional point set; for each three-dimensional point in the three-dimensional point set, constructing a cube of the same size as the virtual content with the three-dimensional point as the center; according to a three-dimensional spatial cross detection algorithm, counting the intersection points of rays emanating from the edge feature points in the edge feature point set and the cube to obtain an intersection point set; calculating the cross coefficient corresponding to each three-dimensional point based on the intersection point set; and determining the three-dimensional point with the smallest cross coefficient as the positioning point of the display area.
[0015] In one optional approach, calculating the cross coefficient corresponding to each of the three-dimensional points based on the set of intersection points includes: determining the planar area of the set of intersection points and the number of intersection points in the set of intersection points; and calculating the cross coefficient of the three-dimensional points based on the planar area and the number of intersection points.
[0016] According to another aspect of the present invention, an augmented reality content display device is provided, comprising:
[0017] The acquisition module is used to acquire images of the real-world scene and the virtual content to be displayed.
[0018] The determining module is used to determine a display area from the real scene image, wherein the overlap area between the scene content and the virtual content in the display area is less than a threshold.
[0019] A display module is used to display the virtual content in the display area of the real-world scene image.
[0020] According to another aspect of the present invention, an electronic device is provided, comprising:
[0021] The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus.
[0022] The memory is used to store at least one executable instruction that causes the processor to perform the operation of the augmented reality content display method.
[0023] According to another aspect of the present invention, a computer-readable storage medium is provided, the storage medium storing at least one executable instruction, which, when executed on an electronic device, causes the electronic device to perform the operation of the augmented reality content display method.
[0024] This invention, through acquiring real-world scene images and virtual content, determines a region in the real-world scene image with minimal overlap with the scene content as the display area for the virtual content, and displays the virtual content within that display area. This achieves the technical effect of adaptively selecting the optimal display position for virtual content without relying on tracking specific objects or images in reality or on a three-dimensional spatial model of the real-world environment. Instead, it knows the specific range of the virtual content and adaptively calculates the best presentation position based on the analysis of current environmental characteristics.
[0025] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0026] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0027] Figure 1 A flowchart illustrating the augmented reality content display method provided in an embodiment of the present invention is shown;
[0028] Figure 2 A flowchart illustrating an augmented reality content display method according to another embodiment of the present invention is shown;
[0029] Figure 3 This diagram illustrates a target planar point set in the augmented reality content display method provided in an embodiment of the present invention.
[0030] Figure 4 This diagram illustrates the edge feature point set in the augmented reality content display method provided in an embodiment of the present invention.
[0031] Figure 5 A schematic diagram of cross-detection in the augmented reality content display method provided in an embodiment of the present invention is shown;
[0032] Figure 6 The diagram shows the display effect of the augmented reality content display method provided in the embodiment of the present invention;
[0033] Figure 7 A schematic diagram of the structure of the augmented reality content display device provided in an embodiment of the present invention is shown;
[0034] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present invention is shown. Detailed Implementation
[0035] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0036] In the metaverse era, people will encounter a great deal of virtual content daily, such as virtual billboards, virtual graffiti walls, virtual photo walls, and message boards. The presentation of this content addresses a common problem: how to place this virtual content in a relatively suitable position within the field of vision, ensuring it is easily visible, relatively aligned with the real world, and without obstructing key objects in the viewer's field of vision. Currently, AR engines do not have automatic positioning capabilities; this requires developers to implement it using specific algorithms and strategies.
[0037] Current AR engines have two main directions in virtual content positioning:
[0038] 1. Image Tracking and Object Recognition: A recognition library needs to be pre-built, and the relative position of each virtual content item to the object to be recognized needs to be set. The AR engine has built-in image recognition and object recognition algorithms (or a recognition model algorithm implemented based on a specific dataset through machine learning can be used). When the AR device detects an image or object included in the recognition library in the lens, it renders the virtual content to the pre-set position (main drawback: completely dependent on the recognition library, and the rendering position is relatively fixed, limiting applicable scenarios). Here, the image is not the entire scene seen by the AR camera, but a specific image in real life, such as a poster, a logo, or a QR code. The object refers to a small object in real life (such as a cup or speaker; the object recognition library requires at least six photos taken from different angles to build).
[0039] This approach, based on image or object recognition, involves the following preparations: creating a recognition library (using an AR SDK library or a custom-developed machine learning library) and setting the relative positions of virtual content. Images or objects from the recognition library are then placed within a preset area. Triggering the reaction: The system detects a tracked image or object from the library in the current environment. Localization: The image is rendered to the pre-defined relative position of the object. Applicable scenarios: educational publications, AR books.
[0040] 2. Environmental Recognition:
[0041] 1) 3D spatial modeling: This requires creating a digital twin world for a predetermined spatial area, which is a 3D point cloud model (e.g., Figure 1 In this process, developers need to pre-edit virtual content in a 3D point cloud model and set its position coordinates. Once the AR device enters the predetermined spatial range and detects that the current environmental features match the features in the 3D point cloud model, it establishes a real-world coordinate system that matches the 3D point cloud space and renders the pre-defined virtual content to the corresponding position. The main drawbacks are: complex process, difficulty in large-scale production, suitability only for indoor spaces, and the need for relatively stable spatial features.
[0042] 2) Plane Recognition: This requires pre-setting the position of the virtual content relative to the center point of a plane. The AR engine has a built-in plane recognition algorithm (a customized algorithm can also be used according to business needs, such as using LiDAR to better detect vertical and horizontal planes). The AR device analyzes the current scene features in real time, obtains the coordinates of the plane's center point when a planar area is detected, and renders the virtual content to the pre-set position. The disadvantage is that it cannot guarantee a large-scale overlap between the virtual object and the real environment.
[0043] This environment-based approach involves several steps: Preparation: Creating a 3D point cloud model of a predefined area and placing virtual billboards within the model. Triggering: Successfully matching current environmental features with the 3D point cloud model and establishing a corresponding coordinate system. Positioning: Rendering the image to a pre-defined location within the 3D point cloud model. Applicable scenarios: Indoor AR navigation, AR exhibitions in museums.
[0044] In implementing the embodiments of this invention, the inventors discovered that the aforementioned technologies for integrating virtual content with the real world either rely entirely on a recognition library and have relatively fixed rendering positions, limiting their applicability, or involve complex processes that are difficult to mass-produce. Based on this, the embodiments of this invention provide an augmented reality content display method that solves the problem of virtual content positioning in specific business scenarios. A significant difference from existing technologies is that it eliminates the need for extensive pre-modeling and pre-setting preparation work, relying entirely on graphics analysis software. It does not use radar waves, infrared sensors, or other detection equipment, nor does it depend on spatial point cloud modeling technology. Instead, it uses a real-time adaptive positioning strategy to present virtual content in the optimal position in the real world.
[0045] Figure 1 The illustration shows a flowchart of a method for displaying augmented reality content provided in an embodiment of the present invention. This method is executed by an electronic device. The electronic device can be a computer device, such as a personal computer, tablet computer, terminal device, wearable device, AR / MR device, display device, etc., and the embodiments of the present invention do not impose specific limitations. Figure 1 As shown, the method includes the following steps:
[0046] Step 110: Obtain images of the real-world scene and the virtual content to be displayed.
[0047] In this embodiment of the invention, when a user wears a wearable device (such as an AR / MR device), the screen of the wearable device can be detected, and images of the real-world scene captured by the wearable device can be acquired in real time. The virtual content can be pre-set in a database, can be associated with the real-world scene, or can be randomly set content. The virtual content can be multimedia content such as images, videos, text, GIFs, or image elements; this embodiment of the invention does not impose specific limitations.
[0048] Step 120: Determine a display area from the real-world scene image, wherein the overlap between the scene content and the virtual content in the display area is less than a threshold. This embodiment of the invention obtains the set of planar coordinate points and edge feature points corresponding to a first region in a two-dimensional plane of the real-world scene image; determines a target sparse point set based on the planar coordinate point set and the edge feature point set; assigns three-dimensional spatial depth coordinates to the planar coordinate point set; iteratively detects the cross-coefficient between the virtual content and the edge feature point set in the real-world scene image based on the range of the three-dimensional spatial depth coordinates of the planar coordinate point set; and uses the point with the smallest cross-coefficient in the target sparse point set as the positioning point of the display area to obtain the display area. The first region is a vacant area with relatively little scene content within the two-dimensional plane of the real-world scene image. Multiple first regions may exist within the two-dimensional plane of a real-world scene image.
[0049] In one embodiment of the present invention, the following steps are included:
[0050] Step 1201: Obtain the set of planar coordinate points of the real-world scene image. After obtaining the real-world scene image and virtual content, it is necessary to estimate whether the points in a certain region of the image can be connected to form a plane, thus constituting a set of planar coordinate points. To improve detection efficiency, this embodiment of the invention employs the Fast Plane Detection Algorithm (OPS) to obtain the set of planar coordinate points. The OPS algorithm only needs to sample one directed point to generate a planar hypothesis. The detection process of the OPS algorithm is as follows:
[0051] 1. Point set normal vector estimation:
[0052] 1) Collect the initial plane point set at a certain sampling rate.
[0053] Specifically, the real-world scene image is sampled using a planar point set according to a preset sampling rate to obtain an initial point set: Where R1 represents the radius of the initial point set, This represents the i-th point in the initial point set S.
[0054] 2) Search for the neighboring points of each point in the initial point set to obtain the neighbor matrix of the initial point set.
[0055] Specifically, the Kd tree method (short for k-dimensional tree, a data structure for partitioning k-dimensional data space) is used to search for the neighboring points of each point in the initial point set, resulting in the neighbor matrix Mi of the initial point set. The neighbor matrix Mi includes the neighbor value M between each point in the initial point set and its neighboring points. The lower the value of M, the closer the point is to the center point.
[0056] The formula for calculating the proximity matrix Mi of the initial point set is:
[0057]
[0058] Where, p i M represents the i-th point in the initial point set. i p represents the i-th point in the initial point set. i The nearest neighbor matrix for p; i p when performing the j-th search on the nearest neighbor. i The center point between it and its neighboring points is denoted as q. ij The center point can be obtained through clustering calculation. Q represents the center point of the initial point set. σ represents the distance threshold parameter, which can be set according to the specific scenario.
[0059] 3) Take the smallest neighbor eigenvalue M in the neighbor matrix of the initial point set as the normal vector of the initial point set. Each point in the initial point set and this normal vector can form a plane.
[0060] 2. Plane estimation
[0061] An initial plane is constructed using each point in the initial point set and the normal vector. The number of interior points belonging to the points in the initial point set (excluding those forming the initial plane with the normal vector) is counted. When the number of interior points exceeds a preset first threshold, the initial plane is determined to be a target plane. In one embodiment of the invention, the target plane with the largest number of interior points can be used as the output plane, and the corresponding set of planar coordinate points PS is obtained.
[0062] Specifically, assuming that each point in the initial point set and its normal vector define an initial plane, calculate the distance from the remaining points in the initial point set to this plane, determine whether it is a point in the plane using a threshold theta-h, count the points in the plane to obtain the number of inliers, and if the number of inliers is greater than theta-N, then predict that this point and its normal vector can define a target plane.
[0063] Specifically, the points in the initial point set that form the initial plane with the normal vector are iteratively updated according to the following iterative formula, and then the above steps of calculating whether they belong to the plane and counting the number of interior points are iterated:
[0064]
[0065] Where p is the probability that at least one random sample contains no outliers (meaning there are one or more values that differ significantly from the others), and e is the proportion of outliers among all points. e is updated after each iteration. Finally, the target plane with the largest number of interior points is obtained. This target plane is used as the output plane, and all interior points on this output plane are obtained as the set of plane coordinate points PS corresponding to the output plane. Figure 3 As shown, the normal vector of the output plane is re-estimated, resulting in a matrix output consisting of the center point of the output plane and its normal vector.
[0066] Step 1202: Obtain the edge feature point set of key distinguishing points in the real scene image.
[0067] In this embodiment of the invention, feature extraction is performed to obtain edge features of some key distinguishing points in local regions of the real-world scene image, thereby obtaining an edge feature point set FS. For example... Figure 4 As shown, these key distinguishing points include corner points, edge points, bright spots in dark areas, and dark spots in bright areas.
[0068] Step 1203: Determine the target sparse point set based on the set of planar coordinate points and the set of edge feature points.
[0069] In this invention, the sparse point set refers to the set of points in the most open area from a perspective viewpoint. In this embodiment, the virtual content must ultimately be placed in a relatively open position within the real-world scene image to avoid excessive intersection and occlusion with real-world objects. Furthermore, the virtual content should not be located at the edge of the current image; ideally, it should be at the center of the water surface. After obtaining the planar coordinate point set PS and the edge feature point set FS, the target sparse point set can be determined using the following method:
[0070] First, a certain number of points are selected from the set of planar coordinate points as an initial sparse point set. When the set of planar coordinate points is empty (i.e., no output plane is detected in the real-world scene image), points within a first preset range from the center point of the real-world scene image are used as the initial sparse point set. Specifically, the initial sparse point set can be determined by the following formula: KS'={(x,y)│x∈W / 2-R2,y∈H / 2-R2}, where W and H are the width and height of the entire real-world scene image, respectively, and R2 is the distance from the center point of the image. R2 (i.e., the first preset range) can be set according to the specific scene. In other words, in this embodiment of the invention, when no output plane PS is detected in the real-world scene image, points within a first preset range from the center point of the real-world scene image are selected from the initial point set.
[0071] When the set of planar coordinate points is not empty (i.e., the output plane is detected in the real-world scene image), the set of planar coordinate points is cropped, and only points within a second preset range R3 from the center point of the output plane are selected as the initial sparse point set. Specifically, the initial sparse point set can be determined by the following formula: KS'={(x,y)│x∈PW / 2-R3,y∈PH / 2-R3}, where PW and PH are the width and height of the output plane, respectively, and R3 is the second preset range, i.e., the distance from the center point of the output plane. Those skilled in the art can set the second preset range accordingly based on the specific scenario, and this embodiment of the invention does not impose specific limitations.
[0072] Then, after determining the initial sparse point set, the number of edge feature point sets KN contained in the initial sparse point set with each point as the cluster center is counted; the second preset number of points in the initial sparse point set with the smallest number of edge feature point sets KN contained with each point as the cluster center (within the range of K values) is selected to form the target sparse point set KS.
[0073] Step 1204: Assign three-dimensional spatial depth coordinates to the target sparse point set, establish a cube of the virtual content size at each point in the target sparse point set, and iteratively calculate the cross coefficient between the cube and the edge feature point set within the range of the three-dimensional spatial depth coordinates.
[0074] In this embodiment of the invention, the target sparse point set can be mapped to the current camera's three-dimensional coordinate system, and its optimal depth coordinate z can be further inferred.
[0075] First, the coordinates of each point in the target sparse point set KS can be mapped to three-dimensional coordinates to obtain a three-dimensional point set KZS. Specifically, this can be achieved using the following transformation formula: KZS = KS * T, where T is the transformation matrix, determined by the current camera parameters.
[0076] Then, the three-dimensional point set KZS is assigned new three-dimensional spatial depth coordinates. The range of the three-dimensional spatial depth coordinates can be set to (1~3), so the three-dimensional point set is assigned new three-dimensional spatial depth coordinates: KZS=(Xi,Yi,1)~(Xi,Yi,3).
[0077] Specifically, for each 3D point in the 3D point set KZS, a cube is constructed on the 3D point as its center, and the size of the cube is the same as that of the virtual content. For example... Figure 5 As shown, if (x,y,z) is a point in the three-dimensional point set KZS, a CUBE is created at that point, with a size comparable to the size of the virtual content.
[0078] In this embodiment of the invention, according to a three-dimensional spatial cross-detection algorithm, the intersection points of rays emanating from the edge feature points in the edge feature point set and the cube are counted to obtain an intersection point set CS. The intersection point set CS and the cube lie on the same plane.
[0079] After obtaining the intersection point set, the cross coefficient corresponding to each of the three-dimensional points is calculated based on the intersection point set. Specifically, the planar area of the intersection point set and the number of intersection points in the set are determined; the cross coefficient of the three-dimensional point is calculated based on the planar area and the number of intersection points. The specific formula for calculating the cross coefficient is: RN = Planar area of CS / Number of CS.
[0080] Step 1205: Use the points in the target sparse point set whose cross coefficient is less than the threshold as the positioning points of the display area.
[0081] Wherein, when the cross coefficient of a point in the target sparse point set is less than the threshold, it indicates that when that point is used as the positioning point (center point) of the display area, the overlap area between the scene content and the virtual content in the display area is less than the threshold. In one embodiment of the present invention, the point with the smallest cross coefficient in the target sparse point set can be used as the positioning point of the display area.
[0082] Specifically, after obtaining the cross coefficient of each point in the three-dimensional point set KZS, the point with the smallest RN is selected as the positioning point of the final display area.
[0083] Step 130: Display the virtual content in the display area of the real-world scene image.
[0084] Among them, such as Figure 6 As shown, after determining the positioning point of the display area, the virtual content is rendered and anchored to that point. In this embodiment of the invention, to avoid frequent switching, once the positioning is successful, it is not repositioned.
[0085] This invention, through acquiring real-world scene images and virtual content, determines a region in the real-world scene image with minimal overlap with the scene content as the display area for the virtual content, and displays the virtual content within that display area. This achieves the technical effect of adaptively selecting the optimal display position for virtual content without relying on tracking specific objects or images in reality or on a three-dimensional spatial model of the real-world environment. Instead, it knows the specific range of the virtual content and adaptively calculates the best presentation position based on the analysis of current environmental characteristics.
[0086] Figure 2 A flowchart of an augmented reality content display method according to another embodiment of the present invention is shown, which is executed by an electronic device. Figure 2 As shown, the method includes the following steps:
[0087] Step 210: Detect the planar coordinate set PS in the real-world scene image.
[0088] Step 220: Detect the edge feature point set FS in the real scene image.
[0089] Step 230: Select a relatively sparse and open set of sparse points KS in the real-world scene image. From the planar coordinate set PS or the range of K values of the entire image center point, select N points that contain the fewest feature points FS.
[0090] Step 240: Map the points in the sparse point set KS to the 3D coordinates of the current camera, assign depth coordinates z, and iteratively calculate the cross coefficient RN of each point in the sparse point set KS within the range of z values.
[0091] Step 250: Select the point with the smallest RN coordinates as the final positioning point, and render the virtual content onto the positioning point.
[0092] The augmented reality content display method in this embodiment is largely the same as the method embodiment described above, and will not be repeated here.
[0093] This invention, through acquiring real-world scene images and virtual content, determines a region in the real-world scene image with minimal overlap with the scene content as the display area for the virtual content, and displays the virtual content within that display area. This achieves the technical effect of adaptively selecting the optimal display position for virtual content without relying on tracking specific objects or images in reality or on a three-dimensional spatial model of the real-world environment. Instead, it knows the specific range of the virtual content and adaptively calculates the best presentation position based on the analysis of current environmental characteristics.
[0094] Figure 7 A schematic diagram of the augmented reality content display device provided in an embodiment of the present invention is shown. Figure 7 As shown, the device 300 includes:
[0095] The acquisition module 310 is used to acquire images of the real scene and virtual content to be displayed;
[0096] The determining module 320 is used to determine a display area from the real scene image, wherein the overlap area between the scene content and the virtual content in the display area is less than a threshold.
[0097] The display module 330 is used to display the virtual content in the display area of the real scene image.
[0098] Acquire images of the real-world scene and the virtual content to be displayed;
[0099] A display area is determined from the real-world scene image, wherein the overlap between the scene content and the virtual content in the display area is less than a threshold.
[0100] The virtual content is displayed in the display area of the real-world scene image.
[0101] In one optional approach, determining the display area from the real-world scene image, wherein the overlap between the scene content and the virtual content in the display area is less than a threshold, includes: acquiring a set of planar coordinate points and a set of edge feature points corresponding to a first region in a two-dimensional plane of the real-world scene image; determining a target sparse point set based on the set of planar coordinate points and the set of edge feature points; assigning three-dimensional spatial depth coordinates to the set of planar coordinate points; iteratively detecting the cross coefficient between the virtual content and the set of edge feature points within the range of the three-dimensional spatial depth coordinates; and using points in the target sparse point set whose cross coefficient is less than the threshold as the positioning points of the display area.
[0102] In one alternative approach, iteratively detecting the cross coefficient between the virtual content and the edge feature point set within the range of the three-dimensional spatial depth coordinates includes: assigning three-dimensional spatial depth coordinates to the target sparse point set, establishing a cube of the size of the virtual content at each point in the target sparse point set, and iteratively calculating the cross coefficient between the cube and the edge feature point set within the range of the three-dimensional spatial depth coordinates.
[0103] In an optional embodiment, the method further includes: acquiring a set of planar coordinate points of the real-world scene image; acquiring a set of edge feature points of key distinguishing points in the real-world scene image; determining a target sparse point set based on the set of planar coordinate points and the set of edge feature points; assigning three-dimensional spatial depth coordinates to the target sparse point set; establishing a cube of the size of the virtual content at each point in the target sparse point set; iteratively calculating the cross coefficient between the cube and the set of edge feature points within the range of the three-dimensional spatial depth coordinates; using the point with the smallest cross coefficient in the target sparse point set as a positioning point; and determining the display area based on the positioning point.
[0104] In one optional approach, obtaining the planar coordinate point set corresponding to the first region in the two-dimensional plane of the real-world scene image includes: acquiring planar point sets from the real-world scene image at a preset sampling rate to obtain an initial point set; searching for neighboring points of each point in the initial point set to obtain a neighbor matrix of the initial point set; taking the smallest neighboring feature value in the neighbor matrix of the initial point set as the normal vector of the initial point set; constructing an initial plane with each point in the initial point set and the normal vector; counting the number of interior points of all remaining points in the initial point set excluding the points that form the initial plane with the normal vector, and determining the initial plane as a target plane when the number of interior points is greater than a preset first threshold; taking the target plane with the maximum number of interior points as the output plane to obtain the planar coordinate point set corresponding to the output plane.
[0105] In one optional approach, determining the target sparse point set based on the planar coordinate point set and the edge feature point set includes: when the planar coordinate point set is empty, using points within a first preset range of the center point of the real-world scene image as the initial sparse point set; when the planar coordinate point set is not empty, using points within a second preset range of the center point of the output plane corresponding to the planar coordinate point set as the initial sparse point set; counting the number of edge feature point sets contained in the initial sparse point set with each point as a cluster center; and selecting a preset second number of points in the initial sparse point set with the smallest number of edge feature point sets contained in the initial sparse point set with each point as a cluster center to constitute the target sparse point set.
[0106] In one optional approach, assigning three-dimensional spatial depth coordinates to the target sparse point set, and using each point in the target sparse point set as the center of the virtual content, iteratively calculating the cross coefficient between the virtual content and the edge feature point set within the range of the three-dimensional spatial depth coordinates, includes: mapping the coordinates of each point in the target sparse point set to three-dimensional coordinates to obtain a three-dimensional point set; assigning new three-dimensional spatial depth coordinates to the three-dimensional point set; for each three-dimensional point in the three-dimensional point set, constructing a cube of the same size as the virtual content with the three-dimensional point as the center; according to a three-dimensional spatial cross detection algorithm, counting the intersection points of rays emanating from the edge feature points in the edge feature point set and the cube to obtain an intersection point set; calculating the cross coefficient corresponding to each three-dimensional point based on the intersection point set; and determining the three-dimensional point with the smallest cross coefficient as the positioning point of the display area.
[0107] In one optional approach, calculating the cross coefficient corresponding to each of the three-dimensional points based on the set of intersection points includes: determining the planar area of the set of intersection points and the number of intersection points in the set of intersection points; and calculating the cross coefficient of the three-dimensional points based on the planar area and the number of intersection points.
[0108] The specific working process of the augmented reality content display device in this embodiment of the invention is largely the same as the specific steps of the method embodiment described above, and will not be repeated here.
[0109] This invention, through acquiring real-world scene images and virtual content, determines a region in the real-world scene image with minimal overlap with the scene content as the display area for the virtual content, and displays the virtual content within that display area. This achieves the technical effect of adaptively selecting the optimal display position for virtual content without relying on tracking specific objects or images in reality or on a three-dimensional spatial model of the real-world environment. Instead, it knows the specific range of the virtual content and adaptively calculates the best presentation position based on the analysis of current environmental characteristics.
[0110] Figure 8 The diagram shows a structural schematic of an electronic device provided in an embodiment of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the electronic device.
[0111] like Figure 8 As shown, the electronic device may include: a processor 402, a communications interface 404, a memory 406, and a communications bus 408.
[0112] The processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408. Communication interface 404 is used to communicate with other network elements such as clients or other servers. The processor 402 executes program 410, specifically performing the relevant steps described in the embodiment of the augmented reality content display method.
[0113] Specifically, program 410 may include program code, which includes computer-executable instructions.
[0114] Processor 402 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The electronic device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or they may be processors of different types, such as one or more CPUs and one or more ASICs.
[0115] Memory 406 is used to store program 410. Memory 406 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0116] Specifically, program 410 can be called by processor 402 to cause the electronic device to perform the following operations:
[0117] In one optional approach, determining the display area from the real-world scene image, wherein the overlap between the scene content and the virtual content in the display area is less than a threshold, includes: acquiring a set of planar coordinate points and a set of edge feature points corresponding to a first region in a two-dimensional plane of the real-world scene image; determining a target sparse point set based on the set of planar coordinate points and the set of edge feature points; assigning three-dimensional spatial depth coordinates to the set of planar coordinate points; iteratively detecting the cross-coefficient between the virtual content and the set of edge feature points within the range of the three-dimensional spatial depth coordinates; and using the point with the smallest cross-coefficient in the target sparse point set as the positioning point of the display area.
[0118] In one alternative approach, iteratively detecting the cross coefficient between the virtual content and the edge feature point set within the range of the three-dimensional spatial depth coordinates includes: assigning three-dimensional spatial depth coordinates to the target sparse point set, establishing a cube of the size of the virtual content at each point in the target sparse point set, and iteratively calculating the cross coefficient between the cube and the edge feature point set within the range of the three-dimensional spatial depth coordinates.
[0119] In an optional embodiment, the method further includes: acquiring a set of planar coordinate points of the real-world scene image; acquiring a set of edge feature points of key distinguishing points in the real-world scene image; determining a target sparse point set based on the set of planar coordinate points and the set of edge feature points; assigning three-dimensional spatial depth coordinates to the target sparse point set; establishing a cube of the size of the virtual content at each point in the target sparse point set; iteratively calculating the cross coefficient between the cube and the set of edge feature points within the range of the three-dimensional spatial depth coordinates; using points in the target sparse point set whose cross coefficient is less than the threshold as positioning points; and determining the display area based on the positioning points.
[0120] In one optional approach, obtaining the planar coordinate point set and edge feature point set corresponding to the first region in the two-dimensional plane of the real-world scene image includes: acquiring planar point sets of the real-world scene image according to a preset sampling rate to obtain an initial point set; searching for neighboring points of each point in the initial point set to obtain a neighbor matrix of the initial point set; taking the smallest neighbor feature value in the neighbor matrix of the initial point set as the normal vector of the initial point set; constructing an initial plane with each point in the initial point set and the normal vector; counting the number of interior points of all remaining points in the initial point set excluding the points that form the initial plane with the normal vector, and determining the initial plane as a target plane when the number of interior points is greater than a preset first threshold; taking the target plane with the maximum number of interior points as the output plane to obtain the planar coordinate point set corresponding to the output plane.
[0121] In one optional approach, determining the target sparse point set based on the planar coordinate point set and the edge feature point set includes: when the planar coordinate point set is empty, using points within a first preset range of the center point of the real-world scene image as the initial sparse point set; when the planar coordinate point set is not empty, using points within a second preset range of the center point of the output plane corresponding to the planar coordinate point set as the initial sparse point set; counting the number of edge feature point sets contained in the initial sparse point set with each point as a cluster center; and selecting a preset second number of points in the initial sparse point set with the smallest number of edge feature point sets contained in the initial sparse point set with each point as a cluster center to constitute the target sparse point set.
[0122] In one optional approach, assigning three-dimensional spatial depth coordinates to the target sparse point set, and using each point in the target sparse point set as the center of the virtual content, iteratively calculating the cross coefficient between the virtual content and the edge feature point set within the range of the three-dimensional spatial depth coordinates, includes: mapping the coordinates of each point in the target sparse point set to three-dimensional coordinates to obtain a three-dimensional point set; assigning new three-dimensional spatial depth coordinates to the three-dimensional point set; for each three-dimensional point in the three-dimensional point set, constructing a cube of the same size as the virtual content with the three-dimensional point as the center; according to a three-dimensional spatial cross detection algorithm, counting the intersection points of rays emanating from the edge feature points in the edge feature point set and the cube to obtain an intersection point set; calculating the cross coefficient corresponding to each three-dimensional point based on the intersection point set; and determining the three-dimensional point with the smallest cross coefficient as the positioning point of the display area.
[0123] In one optional approach, calculating the cross coefficient corresponding to each of the three-dimensional points based on the set of intersection points includes: determining the planar area of the set of intersection points and the number of intersection points in the set of intersection points; and calculating the cross coefficient of the three-dimensional points based on the planar area and the number of intersection points.
[0124] The specific working process of the electronic device in this embodiment of the invention is largely the same as the specific steps of the method embodiment described above, and will not be repeated here.
[0125] This invention, through acquiring real-world scene images and virtual content, determines a region in the real-world scene image with minimal overlap with the scene content as the display area for the virtual content, and displays the virtual content within that display area. This achieves the technical effect of adaptively selecting the optimal display position for virtual content without relying on tracking specific objects or images in reality or on a three-dimensional spatial model of the real-world environment. Instead, it knows the specific range of the virtual content and adaptively calculates the best presentation position based on the analysis of current environmental characteristics.
[0126] This invention provides a computer-readable storage medium storing at least one executable instruction that, when executed on an electronic device, causes the electronic device to perform the augmented reality content display method in any of the above method embodiments.
[0127] Executable instructions can be used to cause an electronic device to perform the following operations:
[0128] Acquire images of the real-world scene and the virtual content to be displayed;
[0129] A display area is determined from the real-world scene image, wherein the overlap between the scene content and the virtual content in the display area is less than a threshold.
[0130] The virtual content is displayed in the display area of the real-world scene image.
[0131] In one optional approach, determining the display area from the real-world scene image, wherein the overlap between the scene content and the virtual content in the display area is less than a threshold, includes: acquiring a set of planar coordinate points and a set of edge feature points corresponding to a first region in a two-dimensional plane of the real-world scene image; determining a target sparse point set based on the set of planar coordinate points and the set of edge feature points; assigning three-dimensional spatial depth coordinates to the set of planar coordinate points; iteratively detecting the cross coefficient between the virtual content and the set of edge feature points within the range of the three-dimensional spatial depth coordinates; using the point with the smallest cross coefficient in the target sparse point set as a positioning point; and determining the display area based on the positioning point.
[0132] In one alternative approach, iteratively detecting the cross coefficient between the virtual content and the edge feature point set within the range of the three-dimensional spatial depth coordinates includes: assigning three-dimensional spatial depth coordinates to the target sparse point set, establishing a cube of the size of the virtual content at each point in the target sparse point set, and iteratively calculating the cross coefficient between the cube and the edge feature point set within the range of the three-dimensional spatial depth coordinates.
[0133] In an optional embodiment, the method further includes: acquiring a set of planar coordinate points of the real-world scene image; acquiring a set of edge feature points of key distinguishing points in the real-world scene image; determining a target sparse point set based on the set of planar coordinate points and the set of edge feature points; assigning three-dimensional spatial depth coordinates to the target sparse point set; establishing a cube of the size of the virtual content at each point in the target sparse point set; iteratively calculating the cross coefficient between the cube and the set of edge feature points within the range of the three-dimensional spatial depth coordinates; and using points in the target sparse point set whose cross coefficient is less than the threshold as positioning points of the display area.
[0134] In one optional approach, obtaining the planar coordinate point set and edge feature point set corresponding to the first region in the two-dimensional plane of the real-world scene image includes: acquiring planar point sets of the real-world scene image according to a preset sampling rate to obtain an initial point set; searching for neighboring points of each point in the initial point set to obtain a neighbor matrix of the initial point set; taking the smallest neighbor feature value in the neighbor matrix of the initial point set as the normal vector of the initial point set; constructing an initial plane with each point in the initial point set and the normal vector; counting the number of interior points of all remaining points in the initial point set excluding the points that form the initial plane with the normal vector, and determining the initial plane as a target plane when the number of interior points is greater than a preset first threshold; taking the target plane with the maximum number of interior points as the output plane to obtain the planar coordinate point set corresponding to the output plane.
[0135] In one optional approach, determining the target sparse point set based on the planar coordinate point set and the edge feature point set includes: when the planar coordinate point set is empty, using points within a first preset range of the center point of the real-world scene image as the initial sparse point set; when the planar coordinate point set is not empty, using points within a second preset range of the center point of the output plane corresponding to the planar coordinate point set as the initial sparse point set; counting the number of edge feature point sets contained in the initial sparse point set with each point as a cluster center; and selecting a preset second number of points in the initial sparse point set with the smallest number of edge feature point sets contained in the initial sparse point set with each point as a cluster center to constitute the target sparse point set.
[0136] In one optional approach, assigning three-dimensional spatial depth coordinates to the target sparse point set, and using each point in the target sparse point set as the center of the virtual content, iteratively calculating the cross coefficient between the virtual content and the edge feature point set within the range of the three-dimensional spatial depth coordinates, includes: mapping the coordinates of each point in the target sparse point set to three-dimensional coordinates to obtain a three-dimensional point set; assigning new three-dimensional spatial depth coordinates to the three-dimensional point set; for each three-dimensional point in the three-dimensional point set, constructing a cube of the same size as the virtual content with the three-dimensional point as the center; according to a three-dimensional spatial cross detection algorithm, counting the intersection points of rays emanating from the edge feature points in the edge feature point set and the cube to obtain an intersection point set; calculating the cross coefficient corresponding to each three-dimensional point based on the intersection point set; and determining the three-dimensional point with the smallest cross coefficient as the positioning point of the display area.
[0137] In one optional approach, calculating the cross coefficient corresponding to each of the three-dimensional points based on the set of intersection points includes: determining the planar area of the set of intersection points and the number of intersection points in the set of intersection points; and calculating the cross coefficient of the three-dimensional points based on the planar area and the number of intersection points.
[0138] This invention, through acquiring real-world scene images and virtual content, determines a region in the real-world scene image with minimal overlap with the scene content as the display area for the virtual content, and displays the virtual content within that display area. This achieves the technical effect of adaptively selecting the optimal display position for virtual content without relying on tracking specific objects or images in reality or on a three-dimensional spatial model of the real-world environment. Instead, it knows the specific range of the virtual content and adaptively calculates the best presentation position based on the analysis of current environmental characteristics.
[0139] This invention provides an augmented reality content display device for performing the above-described augmented reality content display method.
[0140] This invention provides a computer program that can be called by a processor to cause an electronic device to execute the augmented reality content display method in any of the above method embodiments.
[0141] This invention provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions, which, when executed on a computer, cause the computer to perform the augmented reality content display method in any of the above method embodiments.
[0142] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, the embodiments of the present invention are not directed to any particular programming language. It should be understood that the content of the invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of the invention.
[0143] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0144] Similarly, it should be understood that, in order to streamline the invention and aid in understanding one or more of the various aspects of the invention, features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the above description of exemplary embodiments of the invention. However, this disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim.
[0145] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0146] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.
Claims
1. A method for displaying augmented reality content, characterized in that, The method includes: Acquire images of the real-world scene and the virtual content to be displayed; A display area is determined from the real-world scene image, wherein the overlap between the scene content and the virtual content in the display area is less than a threshold; wherein, a set of planar coordinate points and a set of edge feature points corresponding to a first region in a two-dimensional plane of the real-world scene image are obtained; a target sparse point set is determined based on the set of planar coordinate points and the set of edge feature points; a three-dimensional spatial depth coordinate is assigned to the set of planar coordinate points; within the range of the three-dimensional spatial depth coordinates, the cross coefficient between the virtual content and the set of edge feature points is iteratively detected; points in the target sparse point set whose cross coefficient is less than the threshold are used as positioning points; the display area is determined based on the positioning points; Determining a target sparse point set based on the planar coordinate point set and the edge feature point set includes: when the planar coordinate point set is empty, using points within a first preset range of the center point of the real-world scene image as the initial sparse point set; when the planar coordinate point set is not empty, using points within a second preset range of the center point of the output plane corresponding to the planar coordinate point set as the initial sparse point set; counting the number of edge feature point sets contained in the initial sparse point set with each point as a cluster center; and selecting a preset second number of points in the initial sparse point set with the smallest number of edge feature point sets contained in the initial sparse point set with each point as a cluster center to form the target sparse point set. The virtual content is displayed in the display area of the real-world scene image.
2. The method according to claim 1, characterized in that, Within the range of the three-dimensional spatial depth coordinates, iteratively detecting the cross coefficient between the virtual content and the edge feature point set includes: Assign three-dimensional spatial depth coordinates to the target sparse point set, establish a cube of the virtual content size at each point in the target sparse point set, and iteratively calculate the cross coefficient between the cube and the edge feature point set within the range of the three-dimensional spatial depth coordinates.
3. The method according to claim 1, characterized in that, The step of obtaining the set of planar coordinate points corresponding to the first region in the two-dimensional plane of the real-world scene image includes: The real-world scene image is sampled using a planar point set according to a preset sampling rate to obtain an initial point set. Search for the neighboring points of each point in the initial point set to obtain the neighbor matrix of the initial point set; The smallest neighbor eigenvalue in the neighbor matrix of the initial point set is taken as the normal vector of the initial point set; An initial plane is constructed by using each point in the initial point set and the normal vector. The number of interior points belonging to the points in the initial plane, excluding those points that form the initial plane with the normal vector, is counted. When the number of interior points is greater than a preset first threshold, the initial plane is determined to be a target plane. The target plane with the maximum number of interior points is used as the output plane to obtain the set of plane coordinate points corresponding to the output plane.
4. The method according to claim 2, characterized in that, Assigning three-dimensional spatial depth coordinates to the target sparse point set, establishing a cube of the virtual content size at each point in the target sparse point set, and iteratively calculating the cross coefficient between the cube and the edge feature point set within the range of the three-dimensional spatial depth coordinates includes: Map the coordinates of each point in the target sparse point set to three-dimensional coordinates to obtain a three-dimensional point set; Assign new three-dimensional spatial depth coordinates to the set of three-dimensional points; For each three-dimensional point in the set of three-dimensional points, a cube of the same size as the virtual content is constructed with the three-dimensional point as the center. According to the three-dimensional spatial cross detection algorithm, the intersection points of rays emanating from the edge feature points in the edge feature point set and the cube are counted to obtain the intersection point set; Based on the set of intersection points, calculate the cross coefficient corresponding to each of the three-dimensional points.
5. The method according to claim 4, characterized in that, The step of calculating the intersection coefficient corresponding to each of the three-dimensional points based on the intersection set includes: Determine the planar area of the intersection point set and the number of intersection points in the intersection point set; The intersection coefficient of the three-dimensional points is calculated based on the area of the plane and the number of intersection points.
6. An augmented reality content display device, characterized in that, The device includes: The acquisition module is used to acquire images of the real-world scene and the virtual content to be displayed. A determination module is used to determine a display area from the real-world scene image, wherein the overlap between the scene content and the virtual content in the display area is less than a threshold. This includes: acquiring a set of planar coordinate points and an edge feature point set corresponding to a first region in a two-dimensional plane of the real-world scene image; determining a target sparse point set based on the planar coordinate point set and the edge feature point set; assigning three-dimensional spatial depth coordinates to the planar coordinate point set; iteratively detecting the cross-coefficient between the virtual content and the edge feature point set within the range of the three-dimensional spatial depth coordinates; using points in the target sparse point set whose cross-coefficient is less than the threshold as positioning points; and determining the display area based on the positioning points. The step of determining the target sparse point set based on the planar coordinate point set and the edge feature point set includes: when the planar coordinate point set is empty, using points within a first preset range of the center point of the real scene image as the initial sparse point set; when the planar coordinate point set is not empty, using points within a second preset range of the center point of the output plane corresponding to the planar coordinate point set as the initial sparse point set; counting the number of edge feature point sets contained in the initial sparse point set with each point as a cluster center; and selecting a preset second number of points in the initial sparse point set with the smallest number of edge feature point sets contained in the initial sparse point set with each point as a cluster center to form the target sparse point set. A display module is used to display the virtual content in the display area of the real-world scene image.
7. An electronic device, characterized in that, include: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the operation of the augmented reality content display method as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The storage medium stores at least one executable instruction, which, when executed on an electronic device, causes the electronic device to perform the operation of the augmented reality content display method as described in any one of claims 1-5.
Citation Information
Patent Citations
Image display method and device, equipment and computer readable storage medium
CN111833458A
Reality sense generation method of virtual object in teaching scene
CN112509151A