Disclosure of Invention
In view of the above, it is desirable to provide a method and an apparatus for displaying augmented reality, which can improve the efficiency of identifying scanned items.
A method of augmented reality presentation, the method comprising:
calling a camera to identify the articles in the display area, and acquiring the characteristic information of the articles;
inquiring a matched preset picture according to the characteristic information;
calculating the identification time length in real time, and judging whether the preset picture is inquired within the preset time length or not;
if so, acquiring a visual element corresponding to the preset picture;
otherwise, calling a radio frequency identification function to connect with the radio frequency identification tag in the display area, and acquiring a visual element corresponding to the radio frequency identification tag;
and displaying the visual elements in the display area to form an augmented reality display effect.
In one embodiment, when the queried preset picture includes a plurality of preset pictures, the step of acquiring the visual element corresponding to the preset picture includes:
detecting whether the visual elements corresponding to each preset picture are the same or not, and if not, acquiring the visual elements corresponding to each preset picture;
the step of presenting the visual element into the presentation area comprises:
displaying the visual element into a location that matches the item.
In one embodiment, when there are a plurality of rfid tags in the display area, the step of obtaining the visual elements corresponding to the rfid tags includes:
detecting whether the visual elements corresponding to each radio frequency identification tag are the same or not, and if not, acquiring the visual elements corresponding to different articles;
the step of presenting the visual element into the presentation area comprises:
and uniformly displaying the visual elements in a split screen mode according to the number of the different articles.
In one embodiment, after the step of presenting the visual element into the presentation area, the method further comprises:
ceasing to display the visual element within a display area when the item is detected as not being within the display area.
In one embodiment, when the visual element corresponding to the preset picture includes a plurality of visual elements, the step of displaying the visual elements in the display area includes:
selecting one of the plurality of visual elements corresponding to the preset picture, and circularly displaying the selected visual element in the display area; or
And displaying the plurality of visual elements corresponding to the preset pictures according to a preset display sequence.
An augmented reality display apparatus, the apparatus comprising:
the characteristic information acquisition module is used for calling the camera to identify the articles in the display area and acquiring the characteristic information of the articles;
the preset picture matching module is used for inquiring the matched preset picture according to the characteristic information;
the judging module is used for calculating the identification time length in real time and judging whether the preset picture is inquired in the preset time length or not;
the visual element acquisition module is used for acquiring visual elements corresponding to the preset pictures;
the radio frequency identification module is used for calling a radio frequency identification function to be connected with the radio frequency identification tag in the display area when the preset picture is not inquired within a preset time length;
the visible element acquisition module is further used for acquiring visible elements corresponding to the radio frequency identification tag;
and the display module is used for displaying the visual elements into the display area to form an augmented reality display effect.
In one embodiment, the apparatus further comprises:
the first detection module is used for detecting the number of the inquired preset pictures;
the visual element acquisition module is further used for detecting whether the visual elements corresponding to each preset picture are the same or not when the inquired preset pictures comprise a plurality of preset pictures, and acquiring the visual elements corresponding to each preset picture if the visual elements are not the same;
the display module is further configured to display the visual element into a location that matches the item.
In one embodiment, the apparatus further comprises:
the second detection module is used for detecting the number of the radio frequency identification tags in the display area;
the visual element acquisition module is further used for detecting whether the visual elements corresponding to each radio frequency identification tag are the same or not when the radio frequency identification tags in the display area comprise a plurality of radio frequency identification tags, and acquiring the visual elements corresponding to different articles if the visual elements are different;
the display module is further used for performing uniform split-screen display on the visual elements according to the number of the different articles.
In one embodiment, the display module is further configured to stop displaying the visual element in the display area when the item is detected not to be in the display area.
In one embodiment, the display module is further configured to, when the visual elements corresponding to the preset picture include a plurality of visual elements, select one of the visual elements corresponding to the preset picture, and circularly display the selected visual element in the display area; or displaying the plurality of visual elements corresponding to the preset pictures according to a preset display sequence.
According to the augmented reality display method and device, the identification time is set, so that when the matching picture corresponding to the article in the display area is inquired within the identification time, the visual element is obtained according to the searched matching picture, if the matching picture cannot be obtained within the preset time, the radio frequency identification function is called to be connected with the radio frequency identification tag on the article to obtain the corresponding visual element, the obtained visual element is placed in the display area to form the augmented reality display effect, and therefore the accuracy and the obtaining speed of the visual element corresponding to the article in the display area are improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The augmented reality display method provided in the embodiment of the present invention may be applied to an application environment as shown in fig. 1. The terminal 102 and the server 104 are connected via a network. The terminal 102 is pre-installed with application software capable of realizing reality augmentation and a functional device for radio frequency identification, and the server 104 stores corresponding visual elements. The terminal 102 can identify the articles in the display area by using the camera to acquire the characteristic information of the articles; then inquiring a matched preset picture according to the characteristic information; calculating the recognition duration in real time, and judging whether a preset picture is inquired within the preset duration; if yes, acquiring visual elements corresponding to the preset pictures stored on the server 104; otherwise, calling a radio frequency identification function to connect with the radio frequency identification tag in the display area, and acquiring the visual element corresponding to the radio frequency identification tag stored on the server 104; and displaying the visual elements in the display area to form the display effect of augmented reality. By combining the functions of image identification and radio frequency identification, the accuracy and the acquisition speed of acquiring the visual elements corresponding to the articles in the display area can be improved.
In one embodiment, as shown in FIG. 2, an augmented reality display method is provided, which comprises the following steps 202-212.
Step 202, calling a camera to identify the articles in the display area, and acquiring the characteristic information of the articles.
In this embodiment, a display interface of the terminal may provide a corresponding display interface, and the display interface may be a display interface of pre-installed application software capable of performing augmented reality. The display interface comprises a starting button for augmented reality. When the trigger operation of the start button is detected, a recognition instruction for augmented reality may be generated. Or when the click starting of the user on the corresponding augmented reality application icon is detected, the augmented reality identification instruction is directly generated.
The terminal can call the camera to scan the display area according to the identification instruction. The area scanned by the camera and presented in the display interface of the terminal is the display area.
In one embodiment, after the terminal forms the identification instruction, whether the terminal has the authority to turn on the camera of the terminal can be detected. If not, a corresponding permission obtaining request can be generated, after the permission for opening the camera is obtained, the camera of the terminal is opened, and the display area is identified according to the camera.
The terminal may extract characteristic information of the item within the display area. The article may be any article, such as a gift package, a picture or a cup, etc. The characteristic information may be used to reflect characteristics of a corresponding item. The terminal can determine the number of the articles in the display area and extract the characteristic information of the articles according to one or more factors of the color, the texture, the area, the edge contour, the space shape and the like of the articles.
And step 204, inquiring the matched preset picture according to the characteristic information.
In this embodiment, the preset picture may be located in the database of the terminal itself or in the database of the server. When the preset picture is stored in the database of the terminal, the terminal can compare the extracted characteristic credit with the characteristic information of the preset picture in the database to find out the matched preset picture.
Specifically, a threshold of the matching degree may be preset, and the threshold of the matching degree may be a matching degree that is set arbitrarily, for example, 80% or 90%. And judging that the acquired shot image is matched with a pre-stored image only after judging that the matching degree of the shot image and the pre-stored image reaches or exceeds a matching degree threshold corresponding to the pre-stored image.
When the preset picture is stored in the database of the terminal, after the matched preset picture is inquired, a message indicating that the preset picture is inquired can be returned.
When the preset picture is located in the server, the terminal can establish communication connection with the server according to a preset communication mode, upload the extracted feature information to the server, and send a matching query request to the server, so that the server queries the preset picture matched with the feature information according to the received feature information. And after the preset picture is inquired, sending a message indicating that the preset picture is inquired to the terminal.
In one embodiment, when the matched preset pictures reaching or exceeding the threshold of the matching degree include a plurality of preset pictures, one with the highest matching degree is selected from the plurality of preset pictures as a final preset picture matched with the feature information.
When the matching degree of the extracted feature information and the feature information of the preset picture reaches the matching degree threshold value, the matched preset picture can be selected.
And step 206, calculating the identification time length in real time, and judging whether the preset picture is inquired in the preset time length. If so, go to step 208, otherwise, go to step 210.
In this embodiment, the terminal further sets a preset time duration, where the preset time duration may be any time duration, such as 1 second, 2 seconds, or 3 seconds. When the terminal is detected to start a camera for identifying the display area, the identification duration of the terminal can be calculated in real time.
The terminal may call the associated timing function to record the preset duration. If it is detected that the preset picture has been queried within the preset time period, step 208 is executed. When it is detected that the recognition duration has reached the preset duration and the corresponding preset picture has not been queried, step 210 is executed. Specifically, when it is detected that the message indicating that the preset picture is queried is acquired within the preset time period, it indicates that the matched preset picture is acquired, and step 208 is executed, otherwise, step 210 is executed.
And step 208, acquiring the visual elements corresponding to the preset pictures.
In this embodiment, each preset picture has an association relationship with one or more corresponding visual elements. Wherein the visual elements can be characters, pictures, animation videos and the like. Multiple preset pictures can correspond to the same visual element. When the visual elements corresponding to the preset picture can include a plurality of visual elements, one or more visual elements can be randomly selected from the plurality of visual elements.
The server stores a large number of visual elements, which can be any characters, pictures, animation videos and the like, such as advertisement information of various products. Each visual element has a corresponding relationship with one or more preset pictures. Similarly, different predetermined pictures may correspond to one or more visual elements. That is, the correspondence between the preset pictures and the visual elements may be a one-to-one, one-to-many, or many-to-many relationship.
For example, the scanned object is a packing box of a product, and the pattern information of each side of the packing box is different. Wherein, the pattern of every face all corresponds to there is a style picture, and every style picture all corresponds same visual element, and this visual element is the 3D advertisement of corresponding product. Then no matter which display surface pattern of this packing carton is scanned to the camera at terminal, all can acquire the style picture that corresponds with this display surface, and then can acquire the 3D advertisement of this product according to the corresponding relation of this style picture and corresponding visual element.
In one embodiment, step 208 includes: and acquiring a storage address of the visual element corresponding to the preset picture, and reading the visual element in the storage address.
In this embodiment, after the matched preset picture is queried, the returned message indicating that the preset picture is queried further includes a storage address of a visual element corresponding to the preset picture. The terminal can obtain the corresponding storage address from the message and read the visual elements stored in the storage address. When the corresponding visual elements include a plurality of visual elements, the message includes the storage address of each corresponding visual element, and the terminal can randomly select one or more visual elements from all the included storage addresses and acquire the corresponding visual elements.
Step 210, calling a radio frequency identification function to connect with the radio frequency identification tag in the display area, and acquiring the visual element corresponding to the radio frequency identification tag.
In this embodiment, when the preset picture cannot be queried within the preset time, it may be determined that the pattern information in the display area fails to be identified, and at this time, the corresponding visual element may be acquired by using the radio frequency identification function.
Specifically, the terminal is integrated with a radio frequency identification function, and the scanned objects in the display area are also provided with radio frequency identification tags. The terminal can be connected with the radio frequency identification tag by using a Bluetooth identification function, and the coded information in the radio frequency identification tag is read. Wherein each radio frequency identification tag has a unique code. The corresponding relationship between the code and one or more visual elements can be pre-established in the server, so that the corresponding visual elements can be obtained according to the corresponding relationship until the corresponding code.
After reading the coded information in the radio frequency identification tag, the terminal can send the coded information to the server, so that the server can find out the corresponding visual element according to the coded information and send the found visual element to the terminal. The terminal may acquire the visual elements transmitted by the server.
Step 212, displaying the visual elements in the display area to form the augmented reality display effect.
After the visual elements are obtained, the playing software corresponding to the visual elements can be called to display the visual elements, and the visual elements and the real scenes existing in the display area are displayed together to form a display effect of combining the virtual scenes and the real scenes, namely an augmented reality display effect.
In this embodiment, the identification duration is set, so that when a matching picture corresponding to an article in the display area is queried within the identification duration, a visual element is obtained according to the found matching picture, and if the matching picture cannot be obtained within the preset duration, a radio frequency identification function is called to connect with a radio frequency identification tag on the article to obtain the corresponding visual element, and the obtained visual element is put into the display area to form an augmented reality display effect, so that accuracy of obtaining the visual element corresponding to the article in the display area and obtaining speed are improved.
In one embodiment, when the queried preset picture includes a plurality of preset pictures, the step of obtaining the visual element corresponding to the preset picture includes: and detecting whether the visual elements corresponding to each preset picture are the same or not. And if not, acquiring the visual elements corresponding to each preset picture.
In this embodiment, when the number of the searched preset pictures is multiple, it means that there may be multiple items in the display area. The terminal can detect whether the visual elements corresponding to each preset picture are the same or not. Specifically, whether the storage addresses in the message corresponding to each preset picture are the same or not can be detected, and if the storage addresses are the same, the detected multiple articles are the same. The presentation of visual elements can be made in the same way as if there was only one item. If the display area is different from the display area, it is indicated that a plurality of different articles exist in the display area, and the terminal can acquire the visual element corresponding to each preset picture, that is, the visual element related to each article.
The step of presenting a visual element into a presentation area, comprising: the visual element is displayed in a location that matches the item.
When a plurality of articles corresponding to different visual elements exist, the position of each article in the display area can be obtained, the display interface of the terminal is divided into blocks with corresponding number according to the position information and the number of the articles, the size and the position of each block correspond to the corresponding article, and the visual elements are displayed at the positions of the corresponding blocks.
In this embodiment, when there are a plurality of articles having corresponding visual elements in the display area, each article is displayed in the display area in a virtual reality manner, so that the display diversity can be improved.
In one embodiment, when the plurality of rfid tags in the display area includes a plurality of rfid tags, the step of obtaining the visual elements corresponding to the rfid tags includes: and detecting whether the visual elements corresponding to each preset picture are the same or not, and if not, acquiring corresponding different visual elements.
In this embodiment, each object capable of being scanned carries an rfid tag, so that when a plurality of rfid tags are detected, it indicates that the same number of objects are present. The terminal can detect whether the visual elements corresponding to each radio frequency identification tag are the same or not. Specifically, whether the visual elements corresponding to the coded information in each rfid tag are the same or not may be detected, and if so, it indicates that the detected multiple articles are the same article. The presentation of visual elements can be made in the same way as if there was only one item. If not, it indicates that a plurality of different articles exist in the display area, and the terminal can acquire the visual elements corresponding to each different article.
The step of presenting a visual element into a presentation area, comprising: and performing uniform split-screen display on the visual elements according to the number of the radio frequency identification tags.
In this embodiment, the terminal may divide the display interface of the terminal into a corresponding number of blocks according to the number of different articles, the size of each block is the same, and the corresponding visual elements are displayed in the corresponding blocks.
In one embodiment, as shown in fig. 3, another augmented reality display method is provided, the method further comprising:
and step 214, stopping displaying the visual element in the display area when the article is detected not to be in the display area.
In this embodiment, the terminal may obtain the position of the scanned item in the display area in real time, and correspondingly change the position of the played visual element according to the position. When the article is detected not to exist in the display area, the display of the visual element is stopped, so that when the article in the display area disappears, the correspondingly displayed visual element also disappears, and the display diversity is further improved.
In one embodiment, when the visual elements corresponding to the preset pictures include a plurality of visual elements, the step of displaying the visual elements in the display area includes: and selecting one visual element from a plurality of visual elements corresponding to the preset picture, and circularly displaying the selected visual element in the display area.
In this embodiment, if there are a plurality of corresponding visual elements, one of the visual elements is selected from the plurality of visual elements and displayed together with an existing real scene on a display interface of the terminal, so as to form a display effect of combining a virtual scene with the real scene.
Specifically, one of the visual elements may be selected for circular display according to the scoring, the playing amount, the heat degree, and other factors of the corresponding visual element.
In one embodiment, when the visual elements corresponding to the preset pictures include a plurality of visual elements, the step of displaying the visual elements in the display area includes: and displaying the plurality of visual elements corresponding to the preset pictures according to a preset display sequence.
In this embodiment, when there are a plurality of corresponding visual elements, all the corresponding visual elements may be further acquired, and the corresponding visual elements are combined with the real scenes in the display area according to the preset playing sequence to be displayed one by one, so that the display diversity may be improved.
In one embodiment, after the step of displaying the visual element into the display area to form the display effect of the augmented reality, the method further comprises the following steps: receiving a shooting instruction of a display area; and shooting the augmented reality display content formed in the display area according to the shooting instruction.
In this embodiment, the shooting instruction includes any one of a shooting instruction and a recording instruction. The terminal receives an operation instruction of a user, and when the operation instruction is a shooting instruction, the display scene existing in the display interface and the superposed visual elements can be shot simultaneously, so that the shooting diversity can be improved.
In one embodiment, as shown in fig. 4, there is provided an augmented reality display apparatus, the apparatus comprising:
the characteristic information obtaining module 402 is configured to invoke a camera to identify an article in the display area, and obtain characteristic information of the article.
And a preset picture matching module 404, configured to query a matched preset picture according to the feature information.
The determining module 406 is configured to calculate the identification duration in real time, and determine whether to query the preset picture within the preset duration.
The visual element obtaining module 408 is configured to obtain a visual element corresponding to the preset picture.
The rfid module 410 is configured to call a rfid function to connect to a rfid tag in the display area when a preset picture is not queried within a preset duration.
The visual element acquiring module 408 is further configured to acquire a visual element corresponding to the rfid tag.
And the display module 412 is used for displaying the visual elements in the display area to form the display effect of the augmented reality.
In one embodiment, as shown in fig. 5, another augmented reality display apparatus is provided, the apparatus further comprising:
the first detecting module 405 is configured to detect the number of the queried preset pictures.
The visual element obtaining module 408 is further configured to detect whether the visual elements corresponding to each preset picture are the same or not when the queried preset picture includes multiple preset pictures, and if not, obtain the visual elements corresponding to each preset picture.
The display module 412 is also used to display visual elements into a position that matches the item.
In one embodiment, as shown in fig. 6, there is provided yet another augmented reality display apparatus, further comprising:
the second detecting module 411 is configured to detect the number of the rfid tags in the display area.
The visual element obtaining module 408 is further configured to detect whether the visual elements corresponding to each rfid tag are the same or not when the rfid tags in the display area include a plurality of rfid tags, and obtain the visual elements corresponding to different articles if the visual elements are different.
The display module 410 is also used for displaying the visual elements in a uniformly split screen according to the number of different articles.
In one embodiment, the display module 410 is further configured to stop displaying the visual element within the display area when the item is detected as not being within the display area.
In one embodiment, the displaying module 410 is further configured to, when the visual elements corresponding to the preset picture include a plurality of visual elements, select one of the visual elements corresponding to the preset picture, and cyclically display the selected visual element in the displaying area; or displaying the plurality of visual elements corresponding to the preset pictures according to a preset display sequence.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.