Method, device, electronic device and storage medium for generating marking pattern

By obtaining the application scenario and object appearance attributes to generate adaptive marking patterns, the problem of single reference marks in the prior art is solved, the object recognition efficiency and visual aesthetics are improved, and flexible marking in different scenarios is achieved.

CN115100649BActive Publication Date: 2025-01-07XIMMERSE LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210488161.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-06
Publication Date
2025-01-07
Estimated Expiration
2042-05-06

AI Technical Summary

Technical Problem

In the prior art, the reference mark is single, and it is impossible to flexibly deal with different objects in various scenarios, affecting the recognition effect of object identity and position information.

Method used

By obtaining the appearance attributes of the application scenarios and objects to be deployed, an appropriate marking pattern is generated, which is used to position objects in real scenes. Combining the appearance attributes and application scenarios of the target object, a marking pattern is generated to improve recognition efficiency and visual aesthetics. sex.

Benefits of technology

It realizes flexible marking of different objects in different scenarios, improves the recognition effect of object identity and position information, and ensures the visual aesthetics of the marking pattern, and generates an adaptive relative position relationship without subsequent calibration steps.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115100649B_ABST
    Figure CN115100649B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for generating a marking pattern, and relates to the field of display technology. The method comprises: obtaining an application scenario for a mark to be deployed as a target application scenario; determining an object for a mark to be deployed in the target application scenario as a target object; obtaining the appearance attributes of the target object; generating a marking pattern according to the appearance attributes and the target application scenario, wherein the marking pattern is used to be deployed on the target object in the real scene corresponding to the application scenario, and the marking pattern is used to locate the target object. In this way, it is possible to flexibly cope with the marking of different objects in various scenarios, that is, to generate a more suitable marking pattern for different objects in different scenarios, while ensuring the visual aesthetics after the deployment of the marking pattern, and also improving the recognition effect of the identity and posture information of the object based on the marking pattern. According to this rule or nested deployment method, the relative position relationship of all deployed feature styles can be generated without subsequent calibration steps.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of display technology, and more specifically, to a method, device, electronic device and storage medium for generating a marking pattern. Background Art

[0002] Fiducial markers are artificial visual features designed for automatic detection. In order to achieve identification, positioning and tracking of objects, corresponding fiducial markers are usually set on the corresponding objects. The object’s identity and posture information are then obtained through identification and positioning of the corresponding fiducial markers.

[0003] However, in the related art, the set reference markers are relatively simple and cannot flexibly cope with the markings of different objects in various scenes, thereby affecting the subsequent identification of the identity and posture information of the object based on the set reference markers. Summary of the invention

[0004] In view of this, the present application proposes a method, device, electronic device and storage medium for generating a marking pattern.

[0005] In a first aspect, an embodiment of the present application provides a method for generating a marking pattern, the method comprising: obtaining an application scenario for the marking to be deployed as a target application scenario; determining an object for the marking to be deployed in the target application scenario as a target object; obtaining appearance attributes of the target object; generating a marking pattern based on the appearance attributes and the target application scenario, the marking pattern being used to be deployed on the target object in a real scene corresponding to the application scenario, generating a relative position relationship of the marking pattern compared to the appearance attributes of the target object, and the marking pattern being used to locate the target object.

[0006] In the second aspect, the embodiment of the present application provides a device for generating a marking pattern, the device comprising: a scene acquisition module, an object determination module, an attribute acquisition module and a pattern generation module. The scene acquisition module is used to acquire the application scene of the mark to be deployed as the target application scene; the object determination module is used to determine the object to be deployed in the target application scene as the target object; the attribute acquisition module is used to acquire the appearance attributes of the target object; the pattern generation module is used to generate a marking pattern according to the appearance attributes and the target application scene, the marking pattern is used to be deployed on the target object in the real scene corresponding to the application scene, and the relative position relationship of the marking pattern compared to the appearance attributes of the target object is generated, and the marking pattern is used to locate the target object.

[0007] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the marking pattern generation method provided in the first aspect.

[0008] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored. The program code can be called by a processor to execute the method for generating a marking pattern provided in the first aspect.

[0009] In the solution provided by the present application, an application scenario to be deployed with a mark is obtained as a target application scenario; an object to be deployed with a mark in the target application scenario is determined as a target object; the appearance attributes of the target object are obtained; a marking pattern is generated according to the appearance attributes and the target application scenario, and the marking pattern is used to be deployed on the target object in the real scene corresponding to the application scenario, and the marking pattern is used to locate the target object. In this way, in combination with the appearance attributes of the target object and the target application scenario in which the target object is located, it is possible to flexibly respond to the marking of different objects in various scenes, that is, to generate a more suitable marking pattern for different objects in different scenes, while ensuring the visual aesthetics after the deployment of the marking pattern, and also improving the recognition effect of the identity and posture information of the object based on the marking pattern. According to this rule or nested deployment method, the relative position relationship of all deployed feature styles can be generated without subsequent calibration steps. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0011] Figure 1 A schematic flow chart of a method for generating a marking pattern provided in an embodiment of the present application is shown.

[0012] Figure 2 A schematic diagram of a single-style marking pattern provided in an embodiment of the present application is shown.

[0013] Figure 3 A schematic diagram showing various marking patterns provided in one embodiment of the present application is shown.

[0014] Figure 4 A schematic flow chart of a method for generating a marking pattern provided in another embodiment of the present application is shown.

[0015] Figure 5 A schematic flow chart of a method for generating a marking pattern provided in yet another embodiment of the present application is shown.

[0016] Figure 6 A schematic flow chart of a method for generating a marking pattern provided in yet another embodiment of the present application is shown.

[0017] Figure 7 A schematic flow chart of a method for generating a marking pattern provided in yet another embodiment of the present application is shown.

[0018] Figure 8 It is a block diagram of a marking pattern generating device provided according to an embodiment of the present application.

[0019] Fig. 9 It is a block diagram of an electronic device for executing a method for generating a marking pattern according to an embodiment of the present application.

[0020] Fig.10 It is a storage unit of an embodiment of the present application for storing or carrying a program code for implementing a method for generating a marking pattern according to an embodiment of the present application. DETAILED DESCRIPTION

[0021] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0022] Fiducial markers are artificial visual features designed for automatic detection. In order to achieve identification, positioning and tracking of objects, corresponding fiducial markers are usually set on the corresponding objects. The object’s identity and posture information are then obtained through identification and positioning of the corresponding fiducial markers.

[0023] However, in the related art, the set reference markers are relatively simple and cannot flexibly cope with the markings of different objects in various scenes, thereby affecting the subsequent identification of the identity and posture information of the object based on the set reference markers.

[0024] In view of the above problems, the inventor proposes a method and device for generating a marking pattern, which obtains an application scenario of a to-be-marked device as a target application scenario; determines an object to be marked in the target application scenario as a target object; obtains the appearance attributes of the target object; and generates a marking pattern according to the appearance attributes and the target application scenario. The content is described in detail below.

[0025] Please refer to Figure 1 , Figure 1 A schematic diagram of a flow chart of a method for generating a marking pattern provided in an embodiment of the present application. Figure 1The method for generating a marking pattern provided in an embodiment of the present application is described in detail. The method for generating a marking pattern may include the following steps:

[0026] Step S110: Acquire the application scenario marked to be deployed as the target application scenario.

[0027] In this embodiment, the application scenarios of the markers to be deployed include but are not limited to camera calibration, robot positioning, augmented reality, and mixed reality. In the aforementioned application scenarios, in order to improve the positioning accuracy of electronic devices for objects in real scenes corresponding to the application scenarios, corresponding marking patterns can be set on objects in the real scenes corresponding to the application scenarios, so that the electronic device can recognize the marking patterns, obtain the posture relationship between the camera and the marking pattern, and then determine the posture relationship between the real object with the marking pattern in the aforementioned real scene and the camera.

[0028] In some implementations, the application scenario of the to-be-deployed mark can be selected by the user from a plurality of preset application scenarios, that is, the electronic device uses one or more preset application scenarios selected by the user as the application scenario of the to-be-deployed mark, i.e., the target application scenario. In this way, the user can complete the selection of the target application scenario through a simple selection operation.

[0029] In other embodiments, the application scenario of the to-be-deployed mark can also be determined by the user inputting a real environment image, and correspondingly, the electronic device uses the scene corresponding to the real environment image as the application scenario of the to-be-deployed mark, that is, the above-mentioned target application scenario. In other words, it is equivalent to providing the user with a scene customization setting, and the user inputs the real environment image, so that the electronic device uses the scene corresponding to the real environment image as the above-mentioned target application scenario.

[0030] It can be seen that this embodiment provides users with a variety of application scenario selection methods. Users can use appropriate application scenario selection methods to select the aforementioned target application scenarios according to actual needs, which not only enriches the user's selection operations, but also improves the efficiency of determining the target application scenarios.

[0031] Step S120: determining an object to be deployed and marked in the target application scene as a target object.

[0032] Furthermore, after acquiring the target application scene, the marked objects to be deployed in the target application scene can be further determined as the target objects. The marked objects to be deployed can be some objects in the target application scene, or all objects in the target application scene, or can be selected by the user, that is, the electronic device uses the marked objects to be deployed selected by the user as the target objects, which is not limited in this embodiment.

[0033] For example, the target application scenario may be a bedroom scene including a target bedroom, wherein the target bedroom includes objects such as a bed, a desk, a window, and a wardrobe. Optionally, all objects in the target bedroom may be used as the above-mentioned target objects; optionally, only any one object among the bed, desk, window, and wardrobe in the target bedroom may be used as the above-mentioned target object; optionally, if the user selects a window, the electronic device uses the window as the above-mentioned target object.

[0034] Step S130: Acquire the appearance attributes of the target object.

[0035] In this embodiment, the marking pattern deployed on the target object needs to be easily detected and identified by the electronic device. Therefore, the marking pattern should have nothing in common with the appearance of the target object as much as possible so that the marking pattern deployed on the target object can be more easily detected and identified.

[0036] Therefore, after determining the target object, in order to improve the detectability and recognizability of the generated marking pattern for deployment on the target object, the appearance attributes of the target object can be further obtained. The appearance attributes include but are not limited to size attributes, color attributes, and shape attributes. The appearance attributes of the target object can be obtained by obtaining a scene image containing the target application scene, and performing image recognition on the scene image through image processing technology to obtain the appearance attributes of the target object; of course, it can also be the appearance attributes input by the user, that is, the electronic device receives the size attributes, color attributes, shape attributes and other attributes input by the user as the appearance attributes of the target object, which is not limited in this embodiment.

[0037] Among them, electronic devices include but are not limited to augmented reality (AR) head-mounted display devices, mixed reality (MR) head-mounted display devices, smart phones, tablet computers, laptops and other devices.

[0038] Step S140: Generate a marking pattern based on the appearance attributes and the target application scenario, wherein the marking pattern is used to be deployed on the target object in the real scene corresponding to the application scenario, and generate a relative position relationship between the marking pattern and the appearance attributes of the target object, wherein the marking pattern is used to locate the target object.

[0039] In practical applications, the detection and recognition effect of the marking pattern on an object may also be related to the application scenario. For example, if the application scenario is a dimly lit scene, if the marking pattern is mainly composed of black, it may lead to difficulties in detecting and identifying the marking pattern, reduced accuracy, and poor positioning effects. Therefore, in dimly lit scenes, the marking pattern needs to avoid using dark patterns such as black and gray as much as possible. Furthermore, in order to improve visual aesthetics, the marking pattern deployed in the real scene also needs to be adapted to the appearance of the real scene as much as possible, so as to avoid the marking pattern deployed in the real scene being inconsistent with the appearance of the real scene, affecting the visual effect. Therefore, the marking pattern can be generated based on the appearance attributes of the target object obtained above and combined with the target application scenario.

[0040] It can be understood that after the marking pattern is generated, the marking pattern can be printed and placed in the target object in the real scene corresponding to the application scenario. Then, by obtaining a marking image containing the marking pattern in the real scene, and by performing posture recognition on the marking pattern in the marking image, the relative position relationship of the marking pattern compared to the appearance attributes of the target object can be generated, thereby achieving the positioning of the target object.

[0041] In some embodiments, a preset marking pattern that matches both the appearance attribute and the target application scenario may be obtained from a plurality of preset marking patterns according to the appearance attribute and the target application scenario as the above-mentioned marking pattern for deployment on the target object. The preset marking pattern may be a pattern pre-stored in an electronic device, so that after the appearance attribute and the target application scenario are determined, the preset marking pattern that matches both the appearance attribute and the target application scenario may be quickly called as the marking pattern for deployment on the target object, thereby improving the efficiency of the user deploying the marking pattern on the target object in the real scene corresponding to the application scene.

[0042] In other embodiments, the corresponding reference pattern may be determined based on the appearance attributes and the target application scenario, and the corresponding reference patterns may be combined in a specified arrangement to obtain the above-mentioned marking pattern for deployment on the target object. Optionally, the electronic device may also combine the reference patterns in different arrangements to obtain a plurality of candidate marking patterns, and the user may select from the plurality of candidate marking patterns. Correspondingly, the electronic device uses the candidate marking pattern selected by the user as the above-mentioned marking pattern for deployment on the target object. The reference pattern may be a pattern pre-stored in the electronic device, such as a square pattern, a rectangular pattern, a diamond pattern, a triangular pattern, a polygonal pattern, an irregular pattern, etc. The corresponding reference pattern determined above may be one or more, and this embodiment does not limit this; please refer to Figure 2, Figure 2 The marking patterns in are all patterns composed of a combination of reference patterns. The marking patterns generated above can be Figure 2 Any of the seven marking patterns in ; see 3, Figure 3 The marking pattern in is a pattern composed of a plurality of reference patterns. The marking pattern generated above can be Figure 3 Any of the 6 marking patterns in the Figure 2 and Figure 3 This embodiment does not limit other marking patterns other than the marking patterns shown. In this way, more styles of marking patterns can be generated based on one or more reference patterns, providing users with richer marking patterns, thereby making the marking patterns deployed in real scenes more consistent with the appearance of the real scenes and improving the visual effect.

[0043] In this embodiment, the appearance attributes of the target object and the target application scenario in which the target object is located are combined to generate a marking pattern for deployment on the target object, so that a marking pattern that is easier to detect and identify can be obtained, thereby improving the efficiency of marking recognition and thus improving the efficiency of positioning the target object; at the same time, since the target application scenario is also combined when generating the marking pattern, the generated marking pattern can be more compatible with the appearance of the real scene, thereby improving the visual aesthetics after the marking pattern is deployed in the real scene. It can be seen that, by combining the appearance attributes of the target object and the target application scenario in which the target object is located, it is possible to flexibly respond to the marking of different objects in various scenes, that is, to generate a more suitable marking pattern for different objects in different scenes, while ensuring the visual aesthetics after the deployment of the marking pattern, it also improves the recognition effect of the identity and posture information of the object based on the marking pattern. According to this rule or nested deployment method, the relative position relationship of all deployed feature styles can be generated without subsequent calibration steps.

[0044] Please refer to Figure 4 , Figure 4 A schematic diagram of a flow chart of a method for generating a marking pattern provided in another embodiment of the present application. Figure 4 The method for generating a marking pattern provided in an embodiment of the present application is described in detail. The method for generating a marking pattern may include the following steps:

[0045] Step S210: Acquire the application scenario marked to be deployed as the target application scenario.

[0046] Step S220: Determine an object to be deployed and marked in the target application scene as a target object.

[0047] Step S230: Acquire the appearance attributes of the target object.

[0048] In this embodiment, the specific implementation of step S210 to step S230 can refer to the content of the above-mentioned embodiment, which will not be repeated here.

[0049] Step S240: Determine a first reference pattern, a target feature style, and a target deployment rule according to the appearance attributes and the target application scenario.

[0050] In this embodiment, the appearance attribute includes a color attribute and a size attribute. The color attribute may include all colors contained in the appearance of the target object, and the size attribute may be understood as the size of the target object.

[0051] In some embodiments, the electronic device may obtain a preset reference pattern that matches the color attribute as the first reference pattern. Specifically, from a plurality of preset reference patterns, a preset reference pattern that is different from the color included in the color attribute is obtained as the first reference pattern. In this way, the first reference pattern obtained may have nothing in common with the target object in terms of color. The preset reference pattern may be a planar pattern or a non-planar pattern.

[0052] And, a preset deployment rule matching the size attribute is obtained as the target deployment rule, wherein the target deployment rule is the arrangement rule for arranging and combining the first reference pattern; specifically, at least one arrangement direction of the first reference pattern, the number of patterns in each arrangement direction, and the spacing between adjacent arranged patterns (such as equal spacing or unequal spacing) can be determined according to the size of the target object. In this way, the combined marking pattern can be made more consistent with the size of the target object, making it easy to deploy the marking pattern in a real scene. It can be understood that if the target object is too large, it is also possible to generate only a marking pattern for deployment in a partial area of ​​the target object to reduce the production cost of the marking pattern.

[0053] At the same time, the electronic device can obtain a preset feature style that matches the target application scenario as the target feature style. Among them, the preset feature styles include but are not limited to artificial code styles and LED light source styles. Specifically, the ambient brightness value in the real scene corresponding to the target application scenario can be obtained to determine whether the ambient brightness value is greater than a preset threshold value. If it is greater than, the artificial code style is used as the target feature style; if it is not greater than, the LED light source style is used as the target feature style. In this way, it can be ensured that in real scenes with low ambient brightness, the LED light source is used as the feature style, so that the electronic device can more easily detect and identify the marking pattern, reducing the influence of external factors of the ambient light on the recognition of the marking pattern. It can be understood that if the LED light source style is used, the electronic device can output prompt information to prompt the user when deploying the marking pattern in the real scene, on which reference patterns in the marking pattern the corresponding LED light-emitting device needs to be installed.

[0054] Step S250: embedding the characteristic pattern corresponding to the target characteristic pattern into the first reference pattern to obtain a second reference pattern.

[0055] Based on this, after determining the first reference pattern, the target characteristic pattern and the target deployment rule, the electronic device can embed the characteristic pattern corresponding to the target characteristic pattern into the first reference pattern, that is, each first reference pattern is embedded with a characteristic pattern corresponding to the target characteristic pattern. Among them, the characteristic pattern can be used to represent the coding bit 1 and the coding bit 0, and the characteristic pattern includes but is not limited to a solid color filling pattern, a letter pattern, a special symbol pattern, etc.

[0056] Exemplarily, taking the characteristic pattern as a solid color fill pattern as an example, the characteristic pattern corresponding to the target characteristic style may include two solid color fill patterns, for example, a blue fill pattern and a white fill pattern, the blue fill pattern is used to represent the coding bit 1, and the white fill pattern is used to represent the coding bit 0.

[0057] Exemplarily, taking the characteristic pattern as a solid color fill pattern as an example, the characteristic pattern corresponding to the target characteristic style may include a plurality of solid color fill patterns, for example, a blue fill pattern, a green fill pattern and a white fill pattern, the blue fill pattern being used to represent the coding bit 1, the white fill pattern being used to represent the coding bit 0, and the green fill pattern being used to represent the non-coding bit; or, the blue fill pattern being used to represent the coding bit 1, and the white fill pattern and the green fill pattern being both used to represent the coding bit 0, so as to enrich the appearance style of the marking pattern.

[0058] Step S260: Based on the target deployment rule, the second reference pattern is deployed and combined to obtain the marking pattern.

[0059] Finally, the second reference pattern can be arranged and combined based on the target deployment rule to obtain a marking pattern. In this way, the marking pattern obtained by the arrangement and combination can be distinguished from the appearance of the target object, which is easy to identify, and can also avoid the influence of ambient light in the real scene, which leads to problems such as incorrect or difficult recognition of the marking pattern. In addition, since the target deployment rule is determined based on the size attribute of the target object, when the marking pattern is deployed in the real scene, the marking pattern is also easier to lay on the target object, more closely fits the size of the target object, and has a higher laying accuracy.

[0060] In other embodiments, the first reference patterns may be deployed and combined based on target deployment rules to obtain a reference combination pattern, and then a feature pattern corresponding to the target feature style may be embedded into the boundary between every two first reference patterns in the reference combination pattern to obtain the above-mentioned marking pattern.

[0061] In some other embodiments, the electronic device can also obtain two marking patterns through the above two embodiments, namely, a marking pattern in which a characteristic pattern is embedded in each first reference pattern and a marking pattern in which a characteristic pattern is embedded at the junction of every two first reference patterns. The user selects which of the two marking patterns to use as the marking pattern for deployment on the target object, and correspondingly, the electronic device uses the marking pattern selected by the user as the aforementioned marking pattern for deployment on the target object. In this way, the styles of the marking patterns are enriched, providing more choices for users to select marking patterns.

[0062] In this embodiment, the electronic device determines the first reference pattern, the target feature style and the target deployment rule according to the appearance attributes of the target object and the target application scenario, and then nests the target feature style into the first reference pattern, and arranges and combines the second reference pattern after the nested target feature style based on the target deployment rule to obtain the marking pattern. In this way, the marking pattern can be distinguished from the appearance of the target object for easy identification, and the influence of ambient light in the real scene can be avoided, which may lead to problems such as incorrect or difficult identification of the marking pattern. In addition, since the target deployment rule is determined based on the size attribute of the target object, when the marking pattern is deployed in the real scene, the marking pattern is also easier to lay on the target object, more closely fits the size of the target object, and has a higher laying accuracy.

[0063] Please refer to Figure 5 , Figure 5 A schematic diagram of a flow chart of a method for generating a marking pattern provided in another embodiment of the present application. Figure 5 The method for generating a marking pattern provided in an embodiment of the present application is described in detail. The method for generating a marking pattern may include the following steps:

[0064] Step S310: Obtain the application scenario marked to be deployed as the target application scenario.

[0065] Step S320: Determine an object to be deployed and marked in the target application scene as a target object.

[0066] Step S330: Acquire appearance attributes of the target object, where the appearance attributes include size attributes.

[0067] In this embodiment, the specific implementation of step S310 to step S330 can refer to the content of the above-mentioned embodiment, which will not be repeated here.

[0068] Step S340: if the size attribute satisfies a preset size attribute rule, a plurality of marking patterns are generated according to the appearance attribute and the target application scenario.

[0069] In this embodiment, after acquiring the appearance attributes of the target object, it is possible to further determine whether the size attribute in the appearance attributes satisfies the preset size attribute rule, which is that the size of the target object exceeds the preset size; further, if the size attribute satisfies the preset size attribute rule, it indicates that the size of the target object has exceeded the preset size, that is, the target object is large, and multiple marking patterns can be generated, and multiple marking patterns are simultaneously used to deploy on the target object in the real scene to improve the accuracy of positioning the larger object. If the size attribute does not satisfy the preset size attribute rule, it indicates that the size of the target object does not exceed the preset size, that is, the target object is small, and only one marking pattern can be generated and deployed on the target object in the real scene.

[0070] For example, if the target object that exceeds the preset size is a picture frame that is 1 meter long and 2 meters wide, then multiple marking patterns can be generated for deployment on the picture frame to improve the accuracy of the position positioning of the picture frame and avoid problems such as insufficient positioning precision and poor accuracy due to only containing one marking pattern.

[0071] For another example, if the target object that does not exceed the preset size is a ping-pong ball, at this time, the size of the ping-pong ball is relatively small, and only one marking pattern can be generated to achieve accurate positioning of the position of the ping-pong ball relative to the electronic device.

[0072] Step S350: Acquire a scene image corresponding to the target application scene as a first scene image.

[0073] In this embodiment, the first scene image can be a scene image corresponding to the target application scene that is captured in real time by the electronic device through an image capture device; it can also be a scene image corresponding to the target application scene that is uploaded to the electronic device by the user through other devices; it can also be a preset image corresponding to a preset application scene selected by the user, which is used by the electronic device as the scene image corresponding to the target application scene; it can also be a virtual scene image generated by the electronic device based on the scene attributes of the target application scene input by the user, and this embodiment does not impose any restrictions on this.

[0074] Step S360: Superimpose the multiple marking patterns on the target object in the first scene image according to a preset combination rule to obtain a second scene image, wherein the second scene image is used to provide a reference for deploying the multiple marking patterns on the target object in the real scene corresponding to the application scenario.

[0075] Based on this, since multiple marking patterns to be deployed are generated, in order to prevent the user from placing the marking patterns incorrectly in the real scene, the multiple marking patterns can be superimposed on the target object in the first scene image according to the preset combination rule to obtain the second scene image. Among them, the preset combination rule can be generated at the same time when the multiple marking patterns are generated, that is, the preset combination rule contains the superposition position of each marking pattern on the target object, and the electronic device can superimpose each marking pattern on the corresponding superposition position of the target object in the first scene image according to the superposition position in the preset combination rule to obtain the second scene image. In this way, when the user deploys multiple marking patterns on the target object in the real scene, the position of each marking pattern in the target object in the image in the second scene image can be referred to, thereby ensuring the accuracy of deploying multiple marking patterns in the real scene.

[0076] In some embodiments, if the electronic device is an AR head-mounted display device or an MR head-mounted display device, when the user deploys multiple marker patterns in a real scene, the multiple marker patterns can be directly superimposed and displayed in the AR head-mounted display device or the MR head-mounted display device, and the user can place each marker pattern at the corresponding position of the target object in the real scene according to the position of the multiple marker patterns superimposed and displayed. In this way, it is more convenient for the user to perform the deployment operation of the marker pattern, and it will also improve the accuracy of the position where the user places the marker pattern.

[0077] In some embodiments, in MR application scenarios or AR application scenarios, multiple marking patterns can also be generated based on the appearance attributes of a pre-set virtual image corresponding to each marking pattern, so that each generated marking pattern is similar to the appearance attributes of the corresponding superimposed virtual image to improve the visual effect. For example, in an MR application scenario, if a doll is superimposed and displayed in the corner of a target object (such as a sofa), then a marking pattern with similar appearance attributes can be generated based on the appearance attributes of the virtual image of the doll, that is, a marking pattern in the shape of a doll, so that when the user prints out the marking pattern and puts it on the target object, the aesthetics of the real scene can be improved after the marking pattern is placed, thereby improving the visual effect.

[0078] In this embodiment, when the size attribute of the target object meets the preset size attribute rule, multiple marking patterns are generated according to the appearance attribute and the target application scene, and the multiple marking patterns are superimposed on the target object in the first scene image according to the preset combination rule to obtain the second scene image, which provides a reference for the user to deploy the multiple marking patterns on the target object in the real scene corresponding to the application scene. In this way, in order to prevent the user from placing the marking pattern incorrectly in the real scene, the accuracy of the marking pattern deployment is improved, and the accuracy of the subsequent tracking and positioning of the target object based on the multiple marking patterns is guaranteed.

[0079] Please refer to Figure 6 , Figure 6 A schematic diagram of a flow chart of a method for generating a marking pattern provided in another embodiment of the present application. Figure 6 The method for generating a marking pattern provided in an embodiment of the present application is described in detail. The method for generating a marking pattern may include the following steps:

[0080] Step S410: displaying a plurality of preset application scenarios and first prompt information, wherein the first prompt information is used to prompt selection of an application scenario marked for deployment.

[0081] In this embodiment, the electronic device may pre-store multiple preset application scenarios, such as a camera calibration scenario, a robot positioning scenario, an augmented reality scenario, or a mixed reality scenario. It is understandable that each preset application scenario may also include multiple sub-application scenarios, such as a type A game scenario and a type B game scenario in a mixed reality scenario. The electronic device may display multiple preset application scenarios and the first prompt information to prompt the user to select an application scenario for which a mark is to be deployed.

[0082] Step S420: In response to a first selection operation input based on the first prompt information, a preset application scenario selected by the first selection operation is used as the target application scenario.

[0083] Based on this, the user can input a first selection operation based on the first prompt information by clicking, voice or touch to select the application scenario to be deployed; correspondingly, the electronic device responds to the first selection operation and uses the preset application scenario selected by the first selection operation as the target application scenario.

[0084] For example, if the user selects a type A game scene in the mixed reality scene through the first selection operation, then the electronic device uses the type A game scene as the target application scene.

[0085] Step S430: obtaining a preset marked object in a preset application scene corresponding to the first selection operation as the target object.

[0086] It can be understood that the user selects a target application scenario to represent the marking pattern of the objects contained in the target application scenario that he wants to deploy in the real scene; therefore, the electronic device can obtain the preset marking object in the preset application scenario corresponding to the first selection operation as the target object. Among them, one or more preset marking objects are preset in each preset application scenario.

[0087] For example, a type A game scene corresponds to a living room in a real scene, and the preset marked objects in the type A game scene include objects such as televisions, air conditioners, remote controls, and lamps; at this time, the electronic device can use all the preset marked objects as target objects.

[0088] In some embodiments, a third prompt information may be output to prompt the user to select a preset marked object to be marked from a plurality of preset marked objects according to actual needs as the target object; correspondingly, the electronic device uses the preset marked object selected by the user based on the third prompt information as the target object. In this way, the user can make a selection again according to actual needs, which can avoid generating redundant marking patterns due to the absence of objects in the preset application scene in the real scene, thereby wasting the computing power resources of the electronic device.

[0089] Step S440: Acquire the appearance attributes of the target object.

[0090] Step S450: Generate a marking pattern based on the appearance attributes and the target application scenario, wherein the marking pattern is used to be deployed on the target object in the real scene corresponding to the application scenario, and generate a relative position relationship between the marking pattern and the appearance attributes of the target object, wherein the marking pattern is used to locate the target object.

[0091] In this embodiment, the specific implementation of step S440 to step S450 can refer to the content of the above-mentioned embodiment, which will not be repeated here.

[0092] In this embodiment, the electronic device provides a plurality of pre-stored preset application scenarios for the user to choose from, and uses the preset application scenario selected by the user as the target application scenario to be deployed, and then directly uses the object in the preset application scenario as the target object to be deployed, and then correspondingly obtains the marking pattern for deployment on the target object. In this way, the operation is simple and user-friendly for the user, and the electronic device can also quickly generate the corresponding marking pattern according to the preset marking object in the preset application scenario selected by the user, which greatly improves the efficiency of obtaining the marking pattern, and then improves the efficiency of deploying the marking pattern.

[0093] Please refer to Figure 7 , Figure 7 A flow chart of a method for generating a marking pattern provided in yet another embodiment of the present application is provided. Figure 7 The method for generating a marking pattern provided in an embodiment of the present application is described in detail. The method for generating a marking pattern may include the following steps:

[0094] Step S510: receiving an input real environment image.

[0095] Step S520: taking the scene corresponding to the real environment image as the target application scene.

[0096] Step S530: displaying the real environment image and second prompt information, wherein the second prompt information is used to prompt the user to select an object to be marked from objects in the real environment image.

[0097] In this embodiment, the electronic device may also receive a real environment image input by the user through other devices, and use the scene corresponding to the input real environment image as the target application scene. Further, the electronic device displays the real environment image and the second prompt information to prompt the user to select an object to be marked from the objects in the real environment image.

[0098] Step S540: In response to a second selection operation input based on the second prompt information, the object selected by the second selection operation is used as the target object.

[0099] Furthermore, the electronic device responds to a second selection operation input by the user based on the second prompt information, and uses the object selected by the second selection operation as the target object, wherein the second selection operation includes but is not limited to a click operation, a voice operation, and a touch operation.

[0100] Step S550: Acquire the appearance attributes of the target object.

[0101] Step S560: Generate a marking pattern based on the appearance attributes and the target application scenario, and the marking pattern is used to be deployed on the target object in the real scene corresponding to the application scenario, and generate a relative position relationship between the marking pattern and the appearance attributes of the target object, and the marking pattern is used to locate the target object.

[0102] In this embodiment, the specific implementation of step S550 to step S560 can refer to the content of the above-mentioned embodiment, which will not be repeated here.

[0103] In this embodiment, the electronic device can receive an input real environment image, and prompt the user to select an object to be marked from the real environment image, and then use the object selected by the user as the target object, and finally generate a marking pattern according to the appearance attributes and application scenario of the target object. It can be understood that the user is provided with the option of customizing the application scenario and the target object, which can be more suitable for the generation of marking patterns for users with different needs, that is, for users with different needs, a targeted marking pattern that fits the target object and the application scenario can also be generated.

[0104] Please refer to Figure 8, which shows a structural block diagram of a marking pattern generation device 600 provided in an embodiment of the present application. The device 600 may include: a scene acquisition module 610, an object determination module 620, an attribute acquisition module 630 and a pattern generation module 640.

[0105] The scenario acquisition module 610 is used to acquire the application scenario of the to-be-deployed mark as the target application scenario.

[0106] The object determination module 620 is used to determine the object to be deployed and marked in the target application scene as the target object.

[0107] The attribute acquisition module 630 is used to acquire the appearance attributes of the target object.

[0108] The pattern generation module 640 is used to generate a marking pattern based on the appearance attributes and the target application scenario. The marking pattern is used to be deployed on the target object in the real scene corresponding to the application scenario, and a relative position relationship of the marking pattern compared to the appearance attributes of the target object is generated. The marking pattern is used to locate the target object.

[0109] In some embodiments, the pattern generation module 640 may include a pattern information acquisition unit, a feature embedding unit, and a pattern generation unit. The pattern information acquisition unit may be used to determine a first reference pattern, a target feature style, and a target deployment rule according to the appearance attribute and the target application scenario. The feature embedding unit may be used to embed a feature pattern corresponding to the target feature style into the first reference pattern to obtain a second reference pattern. The pattern generation unit may be used to deploy and combine the second reference pattern based on the deployment rule to obtain the marking pattern.

[0110] In this manner, the appearance attributes include color attributes and size attributes, and the pattern information acquisition unit can be specifically used to: obtain a preset reference pattern that matches the color attribute as the first reference pattern; obtain a preset deployment rule that matches the size attribute as the target deployment rule; obtain a preset feature style that matches the target application scenario as the target feature style.

[0111] In some embodiments, the appearance attribute includes a size attribute, and the pattern generating unit may be specifically configured to generate a plurality of marking patterns according to the appearance attribute and the target application scenario if the size attribute satisfies a preset size attribute rule.

[0112] In this manner, the marking pattern generating device 600 may further include: a first image acquisition module and a second image acquisition module. The first image acquisition module may be used to acquire a scene image corresponding to the target application scenario as a first scene image after the multiple marking patterns are generated. The second image acquisition module may be used to superimpose the multiple marking patterns on the target object in the first scene image according to a preset combination rule to obtain a second scene image, and the second scene image is used to provide a reference for deploying the multiple marking patterns on the target object in the real scene corresponding to the application scenario.

[0113] In some embodiments, the scenario acquisition module 610 can be specifically used to: display multiple preset application scenarios and a first prompt information, wherein the first prompt information is used to prompt the selection of an application scenario to be marked for deployment; in response to a first selection operation input based on the first prompt information, the preset application scenario selected by the first selection operation is used as the target application scenario.

[0114] In this manner, the object determination module 620 may be specifically configured to obtain a preset marked object in a preset application scene corresponding to the first selection operation as the target object.

[0115] In some other implementations, the scene acquisition module 610 may be specifically used to: receive an input real environment image; and use the scene corresponding to the real environment image as the target application scene.

[0116] In this manner, the object determination module 620 can be specifically used to display the display environment image and second prompt information, wherein the second prompt information is used to prompt the selection of an object to be deployed and marked from objects in the display environment image; in response to a second selection operation input based on the second prompt information, the object selected by the second selection operation is used as the target object.

[0117] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0118] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical or other forms of coupling.

[0119] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0120] In summary, in the solution provided by the embodiment of the present application, the appearance attributes of the target object and the target application scenario in which the target object is located are combined to generate a marking pattern for deployment on the target object, so that a marking pattern that is easier to detect and identify can be obtained, thereby improving the efficiency of marking recognition, and thus improving the efficiency of positioning the target object; at the same time, because the target application scenario is also combined when generating the marking pattern, the generated marking pattern can be more compatible with the appearance of the real scene, thereby improving the visual aesthetics after the marking pattern is deployed in the real scene. It can be seen that, by combining the appearance attributes of the target object and the target application scenario in which the target object is located, it is possible to flexibly respond to the marking of different objects in various scenes, that is, to generate a more suitable marking pattern for different objects in different scenes, while ensuring the visual aesthetics after the deployment of the marking pattern, it also improves the recognition effect of the identity and posture information of the object based on the marking pattern. According to this rule or nested deployment method, the relative position relationship of all deployed feature styles can be generated without the need for subsequent calibration steps.

[0121] The following will be combined Fig. 9 An electronic device provided by the present application is described.

[0122] Reference Fig. 9 , Fig. 9 The structure block diagram of an electronic device 700 provided in the embodiment of the present application is shown, and the tag recognition method provided in the embodiment of the present application can be executed by the electronic device 700. The electronic device 700 can be a device capable of running an application program.

[0123] The electronic device 700 in the embodiment of the present application may include one or more of the following components: a processor 701, a memory 702, and one or more applications, wherein the one or more applications may be stored in the memory 702 and configured to be executed by one or more processors 701, and the one or more programs are configured to execute the method as described in the aforementioned method embodiment.

[0124] The processor 701 may include one or more processing cores. The processor 701 uses various interfaces and lines to connect various parts of the entire electronic device 700, and executes various functions and processes data of the electronic device 700 by running or executing instructions, programs, code sets or instruction sets stored in the memory 702, and calling data stored in the memory 702. Optionally, the processor 701 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 701 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem can also be integrated into the processor 701 and implemented separately through a communication chip.

[0125] The memory 702 may include a random access memory (RAM) or a read-only memory (ROM). The memory 702 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 702 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data (such as the various corresponding relationships described above) created by the electronic device 700 during use.

[0126] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0127] In several embodiments provided in the present application, the coupling or direct coupling or communication connection between the modules shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or modules, which may be electrical, mechanical or other forms.

[0128] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0129] Please refer to Fig.10 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 800 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.

[0130] The computer readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 that performs any method step of the above method. These program codes can be read from or written to one or more computer program products. The program code 810 can be compressed, for example, in an appropriate form.

[0131] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for generating a marking pattern, characterized in that: The method comprises: Obtain the application scenario marked to be deployed as the target application scenario; Determine an object to be deployed and marked in the target application scenario as a target object; Acquire appearance attributes of the target object; A marking pattern is generated based on the appearance attributes and the target application scenario. The marking pattern is used to be deployed on the target object in the real scene corresponding to the application scenario, and a relative position relationship of the marking pattern compared to the appearance attributes of the target object is generated, so that in the process of positioning the target object in the real scene corresponding to the target application scenario, the target object in the real scene corresponding to the target application scenario is positioned by identifying the marking pattern on the target object and based on the relative position relationship.

2. The method according to claim 1, characterized in that: The generating of the marking pattern according to the appearance attribute and the target application scenario includes: Determining a first reference pattern, a target feature style, and a target deployment rule according to the appearance attribute and the target application scenario; Embedding a characteristic pattern corresponding to the target characteristic pattern into the first reference pattern to obtain a second reference pattern; Based on the target deployment rule, the second reference pattern is deployed and combined to obtain the marking pattern.

3. The method according to claim 2, characterized in that The appearance attributes include color attributes and size attributes, and determining the first reference pattern, the target feature style, and the target deployment rule according to the appearance attributes and the target application scenario includes: Acquire a preset reference pattern matching the color attribute as the first reference pattern; Acquire a preset deployment rule matching the size attribute as the target deployment rule; A preset feature pattern matching the target application scenario is obtained as the target feature pattern.

4. The method according to claim 2, characterized in that: The appearance attribute includes a size attribute, and generating a marking pattern according to the appearance attribute and the target application scenario includes: If the size attribute satisfies a preset size attribute rule, generating a plurality of marking patterns according to the appearance attribute and the target application scenario; After generating a plurality of marking patterns, the method further comprises: Acquire a scene image corresponding to the target application scene as a first scene image; The multiple marking patterns are superimposed on the target object in the first scene image according to a preset combination rule to obtain a second scene image, and the second scene image is used to provide a reference for deploying the multiple marking patterns on the target object in the real scene corresponding to the application scenario.

5. The method according to claim 1, characterized in that The step of obtaining the application scenario marked to be deployed as the target application scenario includes: Display multiple preset application scenarios and first prompt information, where the first prompt information is used to prompt the user to select an application scenario marked for deployment; In response to a first selection operation input based on the first prompt information, a preset application scenario selected by the first selection operation is used as the target application scenario.

6. The method according to claim 5, characterized in that The step of determining the object to be deployed and marked in the target application scenario as the target object includes: A preset marked object in a preset application scene corresponding to the first selection operation is obtained as the target object.

7. The method according to claim 1, characterized in that The step of obtaining the application scenario marked to be deployed as the target application scenario includes: Receiving an input real environment image; The scene corresponding to the real environment image is used as the target application scene.

8. The method according to claim 7, characterized in that The step of determining the object to be deployed and marked in the target application scenario as the target object includes: Displaying the real environment image and second prompt information, where the second prompt information is used to prompt the user to select an object to be marked from objects in the real environment image; In response to a second selection operation input based on the second prompt information, an object selected by the second selection operation is used as the target object.

9. A device for generating a marking pattern, characterized in that: The device comprises: A scenario acquisition module is used to acquire the application scenario marked to be deployed as the target application scenario; An object determination module, used to determine an object to be deployed and marked in the target application scenario as a target object; An attribute acquisition module, used to acquire the appearance attributes of the target object; A pattern generation module is used to generate a marking pattern according to the appearance attributes and the target application scenario, wherein the marking pattern is used to be deployed on the target object in the real scene corresponding to the application scenario, and a relative position relationship between the marking pattern and the appearance attributes of the target object is generated, so that in the process of positioning the target object in the real scene corresponding to the target application scenario, the marking pattern on the target object is identified, and the target object in the real scene corresponding to the target application scenario is positioned according to the relative position relationship.

10. An electronic device, characterized in that: include: one or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Scene fusion positioning system and method based on virtual reality technology

    CN112561994A