A virtual model processing method, device, electronic device and storage medium
By identifying and processing positioning maps to operate virtual models, the problem of handling virtual models in a real environment is solved, intuitive editing operations and good visual experience are achieved, and the iterative efficiency of virtual models is improved.
Patent Information
- Application Number
- CN202011164832.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-27
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2040-10-27
AI Technical Summary
The prior art is difficult to process virtual models in real environments, resulting in unintuitive editing operations and poor visual experience.
By identifying at least two positioning maps to be detected, the preset virtual model is displayed, and the processing method corresponding to each positioning map is obtained. Determine the positional relationship between the positional map and the virtual model. When the positional relationship of the positional map changes, the virtual model is processed based on the processing method.
It realizes the display and simple adjustment of virtual models in a real environment, improves the intuitiveness and visual experience of editing operations, and improves the iterative adjustment efficiency of virtual models.
Smart Images

Figure CN114494425B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology. Specifically, the present application relates to a method, device, electronic device and computer-readable storage medium for processing a virtual model. Background Art
[0002] AR: Augmented Reality (AR for short), also known as augmented reality, is a relatively new technology that integrates real-world information and virtual-world information. It simulates and processes physical information that is difficult to experience in the real world based on computer and other scientific technologies, and effectively applies virtual information in the real world. In the process, it can be perceived by human senses, thus achieving a sensory experience beyond reality. After the real environment and virtual objects overlap, they can exist simultaneously in the same screen and space.
[0003] Nowadays, virtual models are edited using multi-dimensional design software on a computer, or by touching the screen to adjust the virtual model. Since the display screen is flat, the editing operation is not intuitive enough and the visual experience is not good. Summary of the invention
[0004] The present application provides a method, device, electronic device and computer-readable storage medium for processing a virtual model, which can solve the problem that the virtual model cannot be processed in a real environment. The technical solution is as follows:
[0005] In a first aspect, a method for processing a virtual model is provided, the method comprising:
[0006] When at least two positioning maps to be detected for processing the virtual model are identified, the preset virtual model is displayed, and processing methods corresponding to the at least two positioning maps are obtained;
[0007] Determine the positional relationship between at least two positioning maps and the virtual model;
[0008] When it is detected that the positional relationship between the at least two positioning maps and the virtual model changes, the virtual model is processed based on the processing methods corresponding to the at least two positioning maps.
[0009] Preferably, it also includes:
[0010] Before identifying at least two positioning maps to be detected for processing the virtual model, including:
[0011] Collect at least two images as positioning maps;
[0012] Establish a one-to-one correspondence between each image and each preset processing method;
[0013] At least two collected positioning maps, processing methods and association relationships are stored.
[0014] Preferably, before identifying at least two positioning maps to be detected for processing the virtual model, the method includes:
[0015] Matching at least two images to be detected with the stored positioning map;
[0016] If the match is successful, it is determined that at least two images to be detected are positioning images.
[0017] Preferably, determining the positional relationship between at least two positioning maps and the virtual model includes:
[0018] Determine the spatial coordinates corresponding to at least two positioning maps, and determine the spatial coordinates of the virtual model.
[0019] The positional relationship between the at least two positioning maps and the virtual model is determined based on the spatial coordinates corresponding to the at least two positioning maps and the spatial coordinates of the virtual model.
[0020] Preferably, when it is detected that the positional relationship between the at least two positioning maps and the virtual model changes, the virtual model is processed based on the processing methods corresponding to the at least two positioning maps, including:
[0021] When it is detected that the positional relationship between at least two positioning maps and the virtual model changes, the variable value of the parameter corresponding to each processing method is determined;
[0022] The virtual model is processed using the corresponding processing method based on the variable value of each parameter.
[0023] Preferably, the virtual model is processed based on the processing methods corresponding to the at least two positioning maps, including:
[0024] The virtual model is processed based on the variable values of each parameter using a corresponding processing method and a preset model algorithm.
[0025] Preferably, it also includes:
[0026] The processed virtual model is stored;
[0027] Display preset virtual models, including:
[0028] If at least two positioning images are identified for the first time, a preset original virtual model is obtained and displayed;
[0029] If at least two positioning maps are not recognized for the first time, the virtual model is processed and displayed according to the position change of the positioning map at this moment.
[0030] In a second aspect, a virtual model processing device is provided, the device comprising:
[0031] The recognition module, when identifying at least two positioning maps to be detected for processing the virtual model, displays the preset virtual model and obtains the processing methods corresponding to the at least two positioning maps;
[0032] A determination module, used to determine the positional relationship between at least two positioning maps and the positional relationship with the virtual model;
[0033] The processing module is used to process the virtual model based on the processing methods corresponding to the at least two positioning maps when it is detected that the positional relationship between the at least two positioning maps and the virtual model changes.
[0034] Preferably, before identifying at least two positioning maps for processing the virtual model, the method includes:
[0035] Collect at least two images as positioning maps;
[0036] Establish a one-to-one correspondence between each image and each preset processing method;
[0037] At least two collected positioning maps, processing methods and association relationships are stored.
[0038] Preferably, it also includes:
[0039] Before identifying at least two positioning maps to be detected for processing the virtual model, including:
[0040] Matching at least two images to be detected with the stored positioning map;
[0041] If the match is successful, it is determined that at least two images to be detected are positioning images.
[0042] Preferably, the determination module is also used to determine the spatial coordinates corresponding to each of the at least two positioning maps and the spatial coordinates of the virtual model, and to determine the positional relationship between the at least two positioning maps and the positional relationship with the virtual model based on the spatial coordinates corresponding to each of the at least two positioning maps and the spatial coordinates of the virtual model.
[0043] Preferably, the processing module is also used to determine the variable values of the parameters corresponding to each processing method when a change in the positional relationship between at least two positioning maps and the virtual model is detected, and then process the virtual model using the corresponding processing method based on the variable values of each parameter.
[0044] Preferably, the processing module is also used to adopt corresponding processing methods and model algorithms for processing based on the variable values of various parameters.
[0045] Preferably, it also includes:
[0046] A storage module stores the virtual model obtained after processing;
[0047] Preferably, it also includes:
[0048] The display module is used to display the preset virtual model, including:
[0049] If at least two positioning images are identified for the first time, a preset original virtual model is obtained and displayed;
[0050] If at least two positioning images are not recognized for the first time, the virtual model is processed and displayed according to the position change of the positioning image at this moment.
[0051] In a third aspect, an electronic device is provided, the electronic device comprising:
[0052] processor, memory, and bus;
[0053] A bus, used to connect the processor and the memory;
[0054] A memory, used for storing operation instructions;
[0055] The processor is used to execute the virtual model processing method as shown in the first aspect of the present application by calling the operation instruction.
[0056] In a fourth aspect, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, at least one program, a code set or an instruction set is loaded and executed by a processor to implement the virtual model processing method as shown in the first aspect of the present application.
[0057] The beneficial effects of the technical solution provided by this application are:
[0058] When at least two positioning maps to be detected for processing the virtual model are identified, the preset virtual model is displayed, and the processing methods corresponding to the at least two positioning maps are obtained; the positional relationship between the at least two positioning maps and the positional relationship with the virtual model are determined; when it is detected that the positional relationship between the at least two positioning maps and the virtual model changes, the virtual model is processed based on the processing methods corresponding to the at least two positioning maps. In this way, the virtual model can be displayed and simply adjusted in a real environment, injecting the visual experience and simulation operation of the real environment into traditional development, making the editing operation more intuitive and the visual experience better. On the other hand, presenting the processing method of the virtual model in front of you can greatly improve the iterative adjustment efficiency of the virtual model for the virtual model that needs to be associated with the real world. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.
[0060] Figure 1 A flowchart of a method for processing a virtual model provided by an embodiment of the present application;
[0061] Figure 2 The original rendering of the virtual model of this application;
[0062] Figure 3 This is an enlarged rendering of the virtual model of this application;
[0063] Figure 4 A flowchart of a method for processing a detailed virtual model provided in another embodiment of the present application;
[0064] Figure 5 A schematic diagram of the structure of a virtual model processing device provided in yet another embodiment of the present application;
[0065] Figure 6 A schematic structural diagram of an electronic device for virtual model processing provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0066] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present invention.
[0067] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.
[0068] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0069] It will be understood by those skilled in the art that the "terminal" and "terminal device" used herein include both devices with wireless signal receivers, which are devices with only wireless signal receivers without transmission capabilities, and devices with receiving and transmitting hardware, which are devices with receiving and transmitting hardware capable of two-way communication over a two-way communication link. Such devices may include: cellular or other communication devices, which have a single-line display or a multi-line display or a cellular or other communication device without a multi-line display; PCS (Personal Communications Service), which may combine voice, data processing, fax and / or data communication capabilities; PDA (Personal Digital Assistant), which may include a radio frequency receiver, a pager, Internet / intranet access, a web browser, a notepad, a calendar and / or a GPS (Global Positioning System) receiver; conventional laptop and / or palmtop computers or other devices, which have and / or include a conventional laptop and / or palmtop computer or other device with and / or including a radio frequency receiver. The "terminal" or "terminal device" used herein may be portable, transportable, installed in a vehicle (air, sea and / or land), or adapted and / or configured to operate locally, and / or in a distributed form, at any other location on the earth and / or in space. The "terminal" or "terminal device" used herein may also be a communication terminal, an Internet terminal, a music / video playing terminal, such as a PDA, a MID (Mobile Internet Device) and / or a mobile phone with a music / video playing function, or a smart TV, a set-top box and other devices.
[0070] The virtual model processing method, device, electronic device and computer-readable storage medium provided in this application are intended to solve the above technical problems in the prior art.
[0071] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0072] Before specifically introducing the method of the embodiment of the present invention, the following generally describes augmented reality:
[0073] Augmented Reality (AR) is a technology that calculates the position and angle of camera images in real time and adds corresponding images. It is a new technology that "seamlessly" integrates real-world information and virtual-world information. The goal of this technology is to put the virtual world on the real world on the screen and interact with it. Augmented reality technology is a new technology that "seamlessly" integrates real-world information and virtual-world information. It uses computers and other scientific technologies to simulate and superimpose entity information (visual information, sound, taste, touch, etc.) that is difficult to experience within a certain time and space range in the real world, and then applies virtual information to the real world, which is perceived by human senses, thereby achieving a sensory experience beyond reality. The real environment and virtual objects are superimposed on the same screen or space in real time and exist simultaneously.
[0074] In addition, augmented reality technology not only displays information from the real world, but also displays virtual information at the same time. The two types of information complement and overlap each other. In visual augmented reality, users use helmet displays to combine the real world with computer graphics, so that they can see the real world around them. Augmented reality technology includes new technologies and methods such as multimedia, three-dimensional modeling, real-time video display and control, multi-sensor fusion, real-time tracking and registration, and scene fusion. Augmented reality provides information that is different from what humans can perceive under normal circumstances.
[0075] In one embodiment, a method for processing a virtual model is provided, such as Figure 1 As shown, the method includes:
[0076] Step S101, when at least two positioning maps to be detected for processing a virtual model are identified, a preset virtual model is displayed, and processing methods corresponding to the at least two positioning maps are obtained;
[0077] A virtual model refers to a virtual object that has been initially edited and superimposed on a real environment, and is displayed in a real environment by using an AR device; a positioning map is a real and characteristic picture, and one positioning map is different from another. The positioning map can be scanned by a scanning device to realize the recognition of the positioning map. A virtual model corresponds to at least two positioning maps, and different positioning maps correspond to different processing functions. The processing of the virtual model can be realized by moving the positioning map. The processing functions corresponding to the positioning map include but are not limited to the following operations: adjusting size, height, rotation, stretching, customized adjustment of components, etc. This model processing method can be applied to product prototype design, furniture placement preview and other fields. For example, there is a virtual model V, two pictures A and B, and pictures A and B are stored. Picture A is set as the positioning map A of the virtual model V, and the processing method of the positioning map A is set to zoom in and out a certain part of the virtual model V; picture B is set as the positioning map B of the virtual model V, and the processing method of the positioning map B is set to rotate the entire virtual model V.
[0078] Step S102, determining the positional relationship between at least two positioning images and the positional relationship with the virtual model;
[0079] The virtual model appears around the positioning map. There is a positional relationship between the positioning maps and the virtual model. The position of the virtual model refers to the center of the virtual model. As the virtual model rotates, the whole (or a specific position) is enlarged (reduced), and the position of the virtual model will change. After the positioning map is recognized, the virtual model is displayed. If the positioning map has not moved or rotated at this time, the positional relationship between the virtual model and the virtual model is the initial positional relationship of this recognition, that is, the initial positional relationship here refers to the positional relationship between the virtual model and the positioning map when the positioning map has not moved or rotated. At this time, the virtual model has not been processed and corresponds to the original state. Each subsequent recognition is based on the initial position.
[0080] Step S103: When it is detected that the positional relationship between at least two positioning maps and the virtual model changes, the virtual model is processed based on the processing methods corresponding to the at least two positioning maps.
[0081] There is an initial position relationship between the positioning map and the virtual model, and the virtual model has not been processed at this time. When the positioning map is moved or rotated, the position relationship between the positioning map and the virtual model also changes, and the processing method corresponding to the positioning map will perform its own processing operation to process the virtual model, thereby processing the appearance of the virtual model.
[0082] For example, the processing method corresponding to the positioning map A is to enlarge or reduce a certain part of the virtual model V, and the processing method corresponding to the positioning map B is to rotate the entire virtual model V. The initial position relationship between the positioning map A and the virtual model V is: the positioning map A is located to the left of the virtual model V; the position relationship between the positioning map B and the virtual model is: the positioning map B is located to the right of the virtual model V. When it is detected that the distance between the positioning map A and the virtual model V becomes larger (smaller), a certain part of the virtual model is enlarged (reduced). Figure 2 This is the effect of the original size before the virtual model is enlarged. Figure 3 This is the effect of enlarging a certain part of the virtual model; when it is detected that the position between the positioning map B and the virtual model changes from the original right side to the non-right front side, the virtual model rotates to the corresponding angle.
[0083] In an embodiment of the present invention, when at least two positioning maps to be detected for processing a virtual model are identified, a preset virtual model is displayed, and the processing methods corresponding to the at least two positioning maps are obtained; the positional relationship between the at least two positioning maps and the virtual model is determined; when it is detected that the positional relationship between the at least two positioning maps and the virtual model changes, the virtual model is processed based on the processing methods corresponding to the at least two positioning maps. In this way, the virtual model can be displayed and simply adjusted in a real environment, injecting the visual experience and simulation operation of the real environment into traditional development, making the editing operation more intuitive and the visual experience better. On the other hand, presenting the processing method of the virtual model in front of you can greatly improve the iterative adjustment efficiency of the virtual model for the virtual model that needs to be associated with the real world.
[0084] In another embodiment, another possible implementation is provided, such as Figure 4 As shown, including:
[0085] Step S201, collecting at least two images as positioning maps;
[0086] The user can capture at least two images by taking photos, and then input the captured at least two images into the AR device, and set each image as a positioning map and store it. In this way, when the AR device detects an image to be detected, it can match the image to be detected with the stored positioning map to determine whether the image to be detected is a positioning map.
[0087] Step S202, establishing a one-to-one association relationship between each image and each preset processing method;
[0088] Each positioning map has a corresponding preset processing method, which includes but is not limited to: adjusting size, height, rotation, stretching, and customized adjustment of components. Positioning maps have the following categories: independent attributes, multiple mixed attributes, and relative attributes. Independent attributes mean that a positioning map can correspond to a preset processing method for a specific position of the virtual model; multiple mixed attributes mean that two (or more) positioning maps are combined and the positioning maps can influence each other, corresponding to multiple processing methods, and can perform mixed processing on the virtual model; relative attributes refer to the movement or rotation of a positioning map relative to other positioning maps, thereby adjusting the virtual model. For example, there is an existing virtual model V, positioning diagrams A, B, C and D. The processing method corresponding to positioning diagram A is to adjust the size of the virtual model, and the processing method corresponding to positioning diagram B is to rotate the virtual model as a whole. Positioning diagrams A and B can also be combined to jointly control the position, upper right corner size and rotation angle of the virtual model. If positioning diagrams A and B correspond to independent processing methods, positioning diagram C is set to adjust the position of the virtual model V. If positioning diagrams A and B are combined to control the position, size and rotation angle of the virtual model, positioning diagram C is set to adjust the height of the virtual model. At this time, positioning diagram C corresponds to an independent attribute. The processing method of positioning diagram D is set to protrude or shrink the upper right corner of the virtual model.
[0089] Step S203: storing the collected at least two positioning maps, processing methods and association relationships.
[0090] The at least two acquired positioning maps and the association between the positioning maps and the processing methods are stored, so that when the image is identified, it can be determined whether the image is a preset positioning map. If it is a preset positioning map, the processing method corresponding to the positioning map can be obtained at the same time. Step S204: When at least two positioning maps for processing the virtual model are identified, the preset virtual model is displayed, and the processing methods corresponding to the at least two positioning maps are obtained;
[0091] A virtual model refers to a virtual object that has been initially edited and superimposed on a real environment, and is displayed in a real environment by using an AR device; a positioning map is a real, characteristic picture, and one positioning map is different from another. The positioning map can be scanned by a scanning device to identify the positioning map. A virtual model corresponds to at least two positioning maps, and different positioning maps correspond to different processing functions. The processing of the virtual model can be achieved by moving or rotating the positioning map. The processing functions corresponding to the positioning map include but are not limited to the following operations: adjusting the size, height, rotation, and customized adjustment of stretching components, etc. For example, there is a virtual model V and two pictures A and B. Pictures A and B are stored, and picture A is set as the positioning map A of the virtual model V, and the processing method of positioning map A is set to adjust the size of the virtual model V; picture B is set as the positioning map B of the virtual model V, and the processing method of positioning map B is set to rotate the entire virtual model V.
[0092] Step S205, determining the positional relationship between at least two positioning images and the positional relationship with the virtual model;
[0093] The virtual model appears around the positioning map. There is a positional relationship between the positioning maps and the virtual model. The position of the virtual model refers to the center of the virtual model. As the virtual model rotates, the whole (or a specific position) is enlarged (reduced), and the position of the virtual model will change. After the positioning map is recognized, the virtual model is displayed. If the positioning map has not moved or rotated at this time, the positional relationship between the virtual model and the virtual model is the initial positional relationship of this recognition. The initial positional relationship here refers to the positional relationship between the virtual model and the positioning map when the positioning map has not been moved or rotated. At this time, the virtual model has not been processed and corresponds to the original state.
[0094] Step S206: When it is detected that the positional relationship between at least two positioning maps and the virtual model changes, the virtual model is processed based on the processing methods corresponding to the at least two positioning maps.
[0095] There is an initial position relationship between the positioning map and the virtual model, and the virtual model has not been processed at this time. When the positioning map moves or rotates, the position relationship between the positioning map and the virtual model also changes, and the corresponding processing method of the positioning map will execute the corresponding processing method to process the virtual model, thereby processing the appearance of the virtual model.
[0096] For example, the processing method corresponding to positioning map A is to adjust the size of virtual model V, and the processing method corresponding to positioning map B is to rotate the entire virtual model V. The initial position relationship between positioning map A and virtual model V is: positioning map A is located to the left of virtual model V; the position relationship between positioning map B and virtual model is: positioning map B is located to the right of virtual model V. When it is detected that the distance between positioning map A and virtual model V becomes larger (smaller), the virtual model is enlarged (reduced). When it is detected that the position between positioning map B and virtual model changes from the original right to non-right front, the virtual model is rotated by a corresponding angle.
[0097] In a preferred embodiment of the present invention, before identifying at least two positioning maps to be detected for processing the virtual model, the method includes:
[0098] Matching at least two images to be detected with the stored positioning map;
[0099] If the match is successful, it is determined that at least two images to be detected are positioning images.
[0100] In actual applications, there may be multiple pictures, but not all pictures are positioning maps. The picture needs to be scanned and matched with the stored positioning maps. If the match is successful, the picture is determined to be a positioning map.
[0101] In a preferred embodiment of the present invention, determining the positional relationship between at least two positioning maps and the positional relationship with the virtual model includes:
[0102] Determine the spatial coordinates corresponding to at least two positioning maps, and determine the spatial coordinates of the virtual model;
[0103] Based on the spatial coordinates corresponding to the at least two positioning maps and the spatial coordinates of the virtual model, the positional relationship between the at least two positioning maps and the positional relationship with the virtual model are determined.
[0104] The virtual model is processed by moving or rotating the positioning map, so it is necessary to determine the positional relationship between the positioning map and the virtual model. The virtual model appears around the positioning map. A positioning map can be set as the coordinate origin to determine the coordinates of other positioning maps and the virtual model, and further determine the positional relationship between the positioning maps and the positional relationship between the positioning maps and the virtual model.
[0105] There is an initial position relationship between the positioning maps, and a virtual position relationship between the positioning map and the virtual model. The initial position relationship is determined after the first recognition, and each subsequent recognition is carried out on this basis. According to the position of the positioning map at the specified coordinate origin, the changes in the positional relationship between the positioning maps and the position changes between the positioning maps and the virtual model are determined.
[0106] In actual applications, the virtual model may exist in the air. In order to facilitate adjustment, the virtual model can be fixed, such as sticking the positioning map on the wall, or placing it on the ground and moving it. The virtual model can be adjusted by its position relative to other positioning maps.
[0107] In a preferred embodiment of the present invention, when it is detected that the positional relationship between at least two positioning maps and the virtual model changes, the virtual model is processed based on the processing methods corresponding to the at least two positioning maps, including:
[0108] When it is detected that the positional relationship between at least two positioning maps and the virtual model changes, the variable value of the parameter corresponding to each processing method is determined;
[0109] The virtual model is processed using the corresponding processing method based on the variable value of each parameter.
[0110] There is an initial position relationship between the virtual model and the positioning map. The virtual model corresponding to the initial position is not processed, and the positioning map has not been moved or rotated. By moving or rotating the positioning map, the distance between the positioning map and the virtual model changes. At this time, it is necessary to determine the variable values of the parameters corresponding to the processing methods corresponding to the positioning map. Further, the virtual model is processed using the corresponding processing methods according to the variable values of each parameter to obtain the processed model. For example, the processing method corresponding to the positioning map A adjusts the overall size of the virtual model. The initial position relationship between the positioning map A and the virtual model V is: the positioning map A is located to the left of the virtual model V. The positioning map A is moved backward along the horizontal straight line, so that the distance changes by 1 times, that is, the distance between the positioning map A and the virtual model V becomes twice the original. At the same time, the virtual model V will also be doubled to obtain the enlarged virtual model V.
[0111] In a preferred embodiment of the present invention, the virtual model is processed based on the processing methods corresponding to at least two positioning maps, including:
[0112] Based on the variable values of each parameter, the virtual model is processed using the corresponding processing method and the preset model algorithm.
[0113] When the position of the positioning map changes, the positional relationship between the positioning map and the virtual model changes, so that the parameter values corresponding to the processing method change, and the virtual model is processed accordingly based on the variable values of each parameter; the model algorithm processes the virtual model by controlling the positional relationship between the virtual model and the positioning map.
[0114] Step S207, storing the virtual model obtained after processing;
[0115] Display preset virtual models, including:
[0116] If at least two positioning images are identified for the first time, a preset original virtual model is obtained and displayed;
[0117] If at least two positioning images are not recognized for the first time, the virtual model is processed and displayed according to the position change of the positioning image at this moment.
[0118] After processing the virtual model each time, there are two ways to store the virtual model: Method 1: Temporary saving: Keep the relative position of the positioning map and the positioning map unchanged, so that the virtual model obtained is the virtual model processed last time. Method 2: Device storage and saving: Store the virtual model to the terminal device, set an independent positioning map, and when this positioning map is recognized, the processed virtual model stored to the terminal device last time is displayed. Assuming an existing virtual model V, set the processing method corresponding to the positioning map A and the positioning map B to multiple mixed attributes, adjust the position, size and rotation of the virtual model V, and the initial position relationship between the positioning map and the virtual model is: positioning map A is located to the left of the virtual model, positioning map B is located to the right of the virtual model, the distance between positioning map A and positioning map B is M, and the distance between the virtual model V and the two is equal; if the positioning map A or positioning map B is moved, the virtual model immediately updates the new position and immediately generates a new size and rotation angle. If the positioning map is recognized for the first time, in this case, when positioning map A and positioning map B are successfully recognized, the virtual model's left side will be automatically adjusted to the position of positioning map A, and the virtual model's right side will be adjusted to the position of positioning map B according to the actual placement positions of positioning map A and positioning map B. At the same time, the algorithm will automatically adjust the size and rotation angle of the model to match the change in position; if the positioning map is not recognized for the first time: if the position of the positioning map remains unchanged after the last recognition, the virtual model obtained after the last recognition is displayed. If the position of the positioning map changes after the last recognition, the virtual model is processed accordingly according to the change values of the initial position relationship parameters of the positions of positioning map A and positioning map B (changes in the position, size and rotation angle of the virtual model, etc.).
[0119] In an embodiment of the present invention, when at least two positioning maps to be detected for processing a virtual model are identified, a preset virtual model is displayed, and the processing methods corresponding to the at least two positioning maps are obtained; the positional relationship between the at least two positioning maps and the virtual model is determined; when changes are detected in the positional relationship between the at least two positioning maps and the positional relationship with the virtual model, the virtual model is processed based on the processing methods corresponding to the at least two positioning maps. In this way, the virtual model can be displayed and simply adjusted in a real environment, injecting the visual experience and simulation operation of the real environment into traditional development, making the editing operation more intuitive and the visual experience better. On the other hand, presenting the processing method of the virtual model in front of you can greatly improve the iterative adjustment efficiency of the virtual model for the virtual model that needs to be associated with the real world.
[0120] In yet another embodiment, a virtual model processing device is provided, such as Figure 5 As shown, the virtual model processing device 30 may include:
[0121] The identification module 301, when identifying at least two positioning maps to be detected for processing the virtual model, displays the preset virtual model and obtains the processing methods corresponding to the at least two positioning maps;
[0122] A determination module 302, for determining a positional relationship between at least two positioning images and a positional relationship with a virtual model;
[0123] The processing module 303 is used to process the virtual model based on the processing methods corresponding to the at least two positioning maps when it is detected that the positional relationship between the at least two positioning maps and the virtual model changes.
[0124] In a preferred embodiment of the present invention, it also includes:
[0125] A collection module, used for collecting at least two images as positioning maps before identifying at least two positioning maps for processing the virtual model;
[0126] A generation module is used to establish a one-to-one association relationship between each image and each preset processing method;
[0127] The storage module is used to store at least two acquired positioning maps, processing methods and association relationships.
[0128] In a preferred embodiment of the present invention, it also includes:
[0129] The matching module is used to match at least two images to be detected with the stored positioning maps before identifying at least two positioning maps to be detected for processing the virtual model; if the match is successful, it is determined that the at least two images to be detected are positioning maps.
[0130] In a preferred embodiment of the present invention, the determination module is also used to determine the spatial coordinates corresponding to each of the at least two positioning maps and the spatial coordinates of the virtual model, and to determine the positional relationship between the at least two positioning maps and the positional relationship with the virtual model based on the spatial coordinates corresponding to each of the at least two positioning maps and the spatial coordinates of the virtual model.
[0131] The processing module is also used to determine the variable values of the parameters corresponding to each processing method when a change in the positional relationship between at least two positioning maps and the virtual model is detected, and then process the virtual model using the corresponding processing method based on the variable values of each parameter.
[0132] The processing module is also used to adopt corresponding processing methods and model algorithms for processing based on the variable values of various parameters.
[0133] In a preferred embodiment of the present invention, it also includes:
[0134] A storage module stores the virtual model obtained after processing;
[0135] In a preferred embodiment of the present invention, it also includes:
[0136] The display module is used to display the preset virtual model, specifically for:
[0137] If at least two positioning images are identified for the first time, a preset original virtual model is obtained and displayed; or,
[0138] If at least two positioning images are not recognized for the first time, the virtual model is processed and displayed according to the position change of the positioning image at this moment.
[0139] The virtual model processing device of this embodiment can execute the virtual model processing method shown in the first embodiment and the second embodiment of the present application. The implementation principles are similar and will not be repeated here.
[0140] In an embodiment of the present invention, when at least two positioning maps to be detected for processing a virtual model are identified, a preset virtual model is displayed, and the processing methods corresponding to the at least two positioning maps are obtained; the positional relationship between the at least two positioning maps and the virtual model is determined; when changes are detected in the positional relationship between the at least two positioning maps and the positional relationship with the virtual model, the virtual model is processed based on the processing methods corresponding to the at least two positioning maps. In this way, the virtual model can be displayed and simply adjusted in a real environment, injecting the visual experience and simulation operation of the real environment into traditional development, making the editing operation more intuitive and the visual experience better. On the other hand, presenting the processing method of the virtual model in front of you can greatly improve the iterative adjustment efficiency of the virtual model for the virtual model that needs to be associated with the real world.
[0141] In another embodiment of the present application, an electronic device is provided, the electronic device comprising: a memory and a processor; at least one program stored in the memory, and when executed by the processor, compared with the prior art, the following can be achieved:
[0142] In an embodiment of the present invention, when at least two positioning maps to be detected for processing a virtual model are identified, a preset virtual model is displayed, and the processing methods corresponding to the at least two positioning maps are obtained; the positional relationship between the at least two positioning maps and the virtual model is determined; when changes are detected in the positional relationship between the at least two positioning maps and the positional relationship with the virtual model, the virtual model is processed based on the processing methods corresponding to the at least two positioning maps. In this way, the virtual model can be displayed and simply adjusted in a real environment, injecting the visual experience and simulation operation of the real environment into traditional development, making the editing operation more intuitive and the visual experience better. On the other hand, presenting the processing method of the virtual model in front of you can greatly improve the iterative adjustment efficiency of the virtual model for the virtual model that needs to be associated with the real world.
[0143] In an alternative embodiment, an electronic device is provided, such as Figure 6 As shown, Figure 6 The electronic device 4000 shown includes: a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, such as through a bus 4002. Optionally, the electronic device 4000 may also include a transceiver 4004. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.
[0144] Processor 4001 may be a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0145] The bus 4002 may include a path to transmit information between the above components. The bus 4002 may be a PCI bus or an EISA bus, etc. The bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0146] Memory 4003 can be ROM or other types of static storage devices that can store static information and instructions, RAM or other types of dynamic storage devices that can store information and instructions, or it can be EEPROM, CD-ROM or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to this.
[0147] The memory 4003 is used to store application code for executing the solution of the present application, and the execution is controlled by the processor 4001. The processor 4001 is used to execute the application code stored in the memory 4003 to implement the content shown in any of the above method embodiments.
[0148] Among them, electronic devices include but are not limited to: mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc.
[0149] Another embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer-readable storage medium is run on a computer, the computer can execute the corresponding content in the aforementioned method embodiment. Compared with the prior art, when at least two positioning maps to be detected for processing a virtual model are identified, a preset virtual model is displayed, and the processing methods corresponding to the at least two positioning maps are obtained; the positional relationship between the at least two positioning maps and the virtual model is determined; when the positional relationship between the at least two positioning maps and the positional relationship with the virtual model is detected to change, the virtual model is processed based on the processing methods corresponding to the at least two positioning maps. In this way, the virtual model can be displayed and simply adjusted in a real environment, and the visual experience and simulation operation of the real environment are injected into the traditional development, making the editing operation more intuitive and the visual experience better. On the other hand, the processing method of the virtual model is presented in front of the eyes, which can greatly improve the iterative adjustment efficiency of the virtual model for the virtual model that needs to be associated with the real world.
[0150] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0151] The above descriptions are only partial embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A method for processing a virtual model, characterized in that: include: When at least two positioning maps to be detected for processing the virtual model are identified, the preset virtual model is displayed, and processing methods corresponding to the at least two positioning maps are obtained; Determining a positional relationship between the at least two positioning maps and a positional relationship with the virtual model; When it is detected that the positional relationship between at least one of the at least two positioning maps and the virtual model changes, the virtual model is processed based on the processing methods corresponding to the positioning maps whose positional relationship with the virtual model changes; The processing of the virtual model based on the processing methods corresponding to the positioning graphs whose positional relationships with the virtual model have changed includes: Determine the variable value of the parameter corresponding to each treatment method; The virtual model is processed using the corresponding processing method based on the variable value of each parameter.
2. The method for processing a virtual model according to claim 1, characterized in that: Before identifying at least two positioning maps to be detected for processing the virtual model, including: Collect at least two images as positioning maps; Establish a one-to-one correspondence between each image and each preset processing method; The at least two acquired positioning maps, the processing method and the association relationship are stored.
3. The method for processing a virtual model according to claim 1 or 2, characterized in that: Before identifying at least two positioning maps to be detected for processing the virtual model, including: Matching the at least two images to be detected with the stored positioning map; If the match is successful, it is determined that the at least two pictures to be detected are positioning pictures.
4. The method for processing a virtual model according to claim 1, characterized in that: Determining the positional relationship between at least two positioning maps and the positional relationship with the virtual model includes: Determine the spatial coordinates corresponding to each of the at least two positioning maps, and determine the spatial coordinates of the virtual model; Based on the spatial coordinates corresponding to the at least two positioning maps and the spatial coordinates of the virtual model, the positional relationship between the at least two positioning maps and the positional relationship with the virtual model are determined.
5. The method for processing a virtual model according to claim 1, characterized in that: The processing of the virtual model based on the processing methods corresponding to the positioning graphs whose positional relationships with the virtual model have changed includes: The virtual model is processed based on the variable values of each parameter using a corresponding processing method and a preset model algorithm.
6. The method for processing a virtual model according to claim 1, characterized in that: Also includes: The processed virtual model is stored; The display of the preset virtual model includes: If the at least two positioning images are identified for the first time, obtaining a preset original virtual model and displaying it; If the at least two positioning maps are not recognized for the first time, the virtual model is processed and displayed according to the position change of the positioning map at this moment.
7. A virtual model processing device, characterized in that: include: The recognition module, when identifying at least two positioning maps to be detected for processing the virtual model, displays the preset virtual model and obtains the processing methods corresponding to the at least two positioning maps; A determination module, used to determine the positional relationship between the at least two positioning maps and the virtual model; a processing module, configured to process the virtual model based on the processing methods corresponding to the positioning maps whose positional relationship with the virtual model has changed when it is detected that the positional relationship between at least one of the at least two positioning maps and the virtual model has changed; The processing of the virtual model based on the processing methods corresponding to the positioning graphs whose positional relationships with the virtual model have changed includes: Determine the variable value of the parameter corresponding to each treatment method; The virtual model is processed using the corresponding processing method based on the variable value of each parameter.
8. An electronic device, characterized in that: It includes: processor, memory, and bus; The bus is used to connect the processor and the memory; The memory is used to store operation instructions; The processor is used to execute the virtual model processing method described in any one of claims 1 to 6 by calling the operation instruction.
9. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the virtual model processing method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Augmented reality model adjustment method, device, storage medium and electronic equipment
CN108537889A
Virtual content display method and device, terminal equipment and storage medium
CN111199583A