AR-supported file preview method, electronic device, and storage medium
By measuring the area of the real viewing space and calculating the spatial perspective relationship, the virtual image of the file is projected into the space, which solves the problem of being unable to visually preview the actual effect in file preview and improves the preview experience.
Patent Information
- Application Number
- CN202010596127.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-28
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2040-06-28
AI Technical Summary
The existing technology cannot quickly find the required page in the file preview, especially when previewing a large file or poster rendering, the actual effect cannot be seen intuitively.
By measuring the area of the real viewing space, calculating the spatial perspective relationship, and projecting the virtual image of the file to be previewed onto the real viewing space, virtual preview of the file is achieved.
Improved the user's file preview experience, allowing quick preview of the actual effect of the file, especially in the preview of multi-page documents and huge posters.
Smart Images

Figure CN111722722B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to augmented reality (AR) technology, and in particular to a file preview method supporting AR, an electronic device and a computer-readable storage medium. Background Art
[0002] In the prior art, when previewing files in the form of ppt, pdf or word, the page to be previewed cannot be found quickly due to the excessive number of pages in the file. In addition, when previewing a large poster effect, the actual effect of the poster cannot be intuitively seen on the display interface of the electronic device. Summary of the invention
[0003] In order to solve the problem that the actual effect cannot be intuitively previewed in the existing file preview, the embodiments of the present invention creatively provide a file preview method, an electronic device and a computer-readable storage medium supporting AR.
[0004] According to a first aspect of the present invention, there is provided a file preview method supporting AR, which is applied to an electronic device, and the method comprises: measuring an area of a real framing space, wherein the real framing space is located in front of the electronic device; determining a file to be previewed; calculating a spatial perspective relationship based on the measured area of the real framing space and the file to be previewed; and projecting a virtual image of the file to be previewed onto the real framing space according to the calculated spatial perspective relationship.
[0005] According to one embodiment of the present invention, the calculating of the spatial perspective relationship based on the measured area of the actual framing space and the file to be previewed includes: determining the area of the virtual image corresponding to the file to be previewed; calculating the size ratio between the area of the measured actual framing space and the area of the virtual image corresponding to the file to be previewed; and determining the size ratio as the spatial perspective relationship.
[0006] According to one embodiment of the present invention, the file to be previewed includes multiple page files; determining the virtual image area corresponding to the file to be previewed includes: determining the virtual image area of the tiled matrix formed by the multiple page files according to specific tiling parameters; correspondingly, calculating the size ratio between the area of the measured real framing space and the virtual image area corresponding to the file to be previewed includes: calculating the size ratio between the area of the measured real framing space and the virtual image area of the tiled matrix formed by the multiple page files.
[0007] According to one embodiment of the present invention, according to the calculated spatial perspective relationship, the virtual image of the file to be previewed is projected onto the real viewing space, including: according to the calculated spatial perspective relationship, the virtual images of multiple page files of the file to be previewed are projected onto the real viewing space in the form of a tiling matrix according to the specific tiling parameters.
[0008] According to one embodiment of the present invention, the calculating of the spatial perspective relationship based on the measured area of the real framing space and the file to be previewed includes: determining the actual area of the real object corresponding to the file to be previewed; when the actual area is smaller than the area of the real framing space, calculating the size ratio between the actual area and the virtual image area corresponding to the file to be previewed; and determining the size ratio as the spatial perspective relationship.
[0009] According to one embodiment of the present invention, projecting the virtual image of the file to be previewed onto the real framing space according to the calculated spatial perspective relationship includes: projecting the virtual image of the file to be previewed onto the real framing space with the area size of the real object according to the calculated spatial perspective relationship.
[0010] According to the second aspect of the present invention, there is further provided an electronic device, comprising: a measuring module for measuring the area of a real framing space, wherein the real framing space is located in front of the electronic device; a determining module for determining a file to be previewed; a calculating module for calculating a spatial perspective relationship based on the measured area of the real framing space and the file to be previewed; and a projection module for projecting a virtual image of the file to be previewed onto the real framing space according to the calculated spatial perspective relationship.
[0011] According to one embodiment of the present invention, the calculation module includes: a determination unit for the virtual image area corresponding to the file to be previewed; a calculation unit for calculating the size ratio between the area of the measured real framing space and the virtual image area corresponding to the file to be previewed; the determination unit is also used to determine the size ratio as a spatial perspective relationship.
[0012] According to one embodiment of the present invention, the file to be previewed includes multiple page files; the determination unit is specifically used to determine the virtual image area of the tile matrix formed by the multiple page files according to specific tiling parameters; correspondingly, the calculation unit is specifically used to calculate the size ratio between the area of the measured real framing space and the virtual image area of the tile matrix formed by the multiple page files.
[0013] According to an embodiment of the present invention, the projection module is specifically used to project the virtual images of the multiple page files of the to-be-previewed file onto the real viewing space in the form of a tiling matrix according to the specific tiling parameters according to the calculated spatial perspective relationship.
[0014] According to one embodiment of the present invention, the calculation module includes: a determination unit, which determines the actual area of the real object corresponding to the file to be previewed; a calculation unit, which is used to calculate the size ratio between the actual area and the virtual image area corresponding to the file to be previewed when the actual area is smaller than the area of the real framing space; the determination unit is also used to determine the size ratio as a spatial perspective relationship.
[0015] According to an embodiment of the present invention, the projection module is specifically configured to project the virtual image of the file to be previewed onto the real viewing space with the area size of the real object according to the calculated spatial perspective relationship.
[0016] According to a third aspect of the present invention, a computer-readable storage medium is provided, the storage medium comprising a set of computer-executable instructions, which are used to execute any of the aforementioned AR-supported file preview methods when the instructions are executed.
[0017] The file preview method, electronic device and computer-readable storage medium supporting AR in the embodiment of the present invention first measure the area of the real framing space in front of the electronic device; then determine the file to be previewed, and calculate the spatial perspective relationship based on the measured area of the real framing space and the file to be previewed; then project the virtual image of the file to be previewed onto the real framing space according to the calculated spatial perspective relationship. In this way, the present invention can project the virtual image of the file to be previewed onto the real framing space by means of AR technology through the spatial perspective relationship determined by the area of the real framing space and the file to be previewed, so as to preview the actual effect of the file in advance and effectively improve the user's file preview experience.
[0018] It should be understood that the teachings of the present invention are not required to achieve all of the beneficial effects described above, but specific technical solutions can achieve specific technical effects, and other embodiments of the present invention can also achieve beneficial effects not mentioned above. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, in which:
[0020] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.
[0021] Figure 1 The following is a schematic diagram showing the implementation process of the AR-supported file preview method according to an embodiment of the present invention. Figure 1 ;
[0022] Figure 2The following is a schematic diagram showing the implementation process of the AR-supported file preview method according to an embodiment of the present invention. Figure 2 ;
[0023] Figure 3 A file preview effect diagram supporting AR is shown in an application example of the present invention;
[0024] Figure 4 The following is a schematic diagram showing the implementation process of the AR-supported file preview method according to an embodiment of the present invention. Figure 3 ;
[0025] Figure 5 A file preview effect diagram supporting AR according to another application example of the present invention is shown;
[0026] Figure 6 A schematic diagram of the structure of an electronic device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0027] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.
[0028] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0029] Figure 1 The following is a schematic diagram showing the implementation process of the AR-supported file preview method according to an embodiment of the present invention. Figure 1 .
[0030] refer to Figure 1 The present invention provides an AR-supported file preview method, which is applied to an electronic device. The method includes: operation 101, measuring the area of a real framing space; operation 102, determining a file to be previewed; operation 103, calculating a spatial perspective relationship based on the measured area of the real framing space and the file to be previewed; and operation 104, projecting a virtual image of the file to be previewed onto the real framing space according to the calculated spatial perspective relationship.
[0031] In operation 101, the real view space is usually located in front of the electronic device. In order to conveniently and quickly support the actual preview effect of AR, the space located directly in front of the electronic device is usually selected as the real view space. Specifically, the real view space can be collected by a camera, gyroscope or sensor installed on the electronic device to measure the area of the real view space.
[0032] In operation 102, the file to be previewed may be a file in a format such as ppt, pdf or word, etc. The file to be previewed may be a file stored locally on the electronic device, or may be a file that is viewed or previewed online in real time by the electronic device.
[0033] In operations 103-104, the implementation scheme of calculating the spatial perspective relationship based on the measured area of the real viewing space and the file to be previewed is closely related to the file preview method. Further, after the spatial perspective relationship is calculated, the virtual image of the file to be previewed can be projected onto the real viewing space.
[0034] Specifically, in operation 103, the virtual image area corresponding to the file to be previewed may be first determined; then the size ratio between the measured area of the real framing space and the virtual image area corresponding to the file to be previewed is calculated, and the size ratio is determined as the spatial perspective relationship.
[0035] In one example, when a tiled preview is required for a file of multiple pages, the ratio between the measured area of the actual viewing space and the area of the virtual image of the tiled matrix formed by the multiple page files is calculated as a spatial perspective relationship.
[0036] In another example, for files such as posters or photos that need to be printed, when they need to be flattened and previewed at actual size, the size ratio between the actual area of the real object corresponding to the file and the virtual image area corresponding to the file to be previewed will be calculated as the spatial perspective relationship.
[0037] The embodiment of the present invention supports an AR file preview method. Through the spatial perspective relationship determined by the area of the real viewing space and the file to be previewed, the virtual image of the file to be previewed can be projected onto the real viewing space with the help of AR technology, so as to preview the actual effect of the file in advance, effectively improving the user's file preview experience.
[0038] Figure 2 The following is a schematic diagram showing the implementation process of the AR-supported file preview method according to an embodiment of the present invention. Figure 2 ;
[0039] Figure 3 A file preview effect diagram supporting AR in an application example of the present invention is shown.
[0040] refer to Figure 2The file preview method supporting AR in an embodiment of the present invention includes: operation 201, measuring the area of a real view space, where the real view space is located in front of an electronic device; operation 202, determining a file to be previewed, where the file to be previewed includes a plurality of page files; operation 203, determining a virtual image area of a tile matrix formed by the plurality of page files according to a specific tile parameter; operation 204, calculating a size ratio between the measured area of the real view space and the virtual image area of the tile matrix formed by the plurality of page files, and determining the size ratio as a spatial perspective relationship; operation 205, projecting the virtual images of the plurality of page files of the file to be previewed onto the real view space in the form of a tile matrix according to the specific tile parameter according to the calculated spatial perspective relationship.
[0041] In operation 201, the real view space is usually located in front of the electronic device. In order to conveniently and quickly support the actual preview effect of AR, the space located directly in front of the electronic device is usually selected as the real view space. Specifically, the real view space can be collected by a camera, gyroscope or sensor installed on the electronic device to measure the area of the real view space.
[0042] In operation 202, the file to be previewed includes a plurality of page files, such as Figure 3 As shown, the file to be previewed is a 25-page ppt with a tiling parameter of 5*5.
[0043] In operations 203 to 204, firstly, the virtual image area of the tile matrix formed by multiple page files is determined according to specific tile parameters, such as 5*5; then the size ratio between the measured area of the actual viewing space and the virtual image area of the tile matrix formed by multiple page files is calculated, and the size ratio is determined as the spatial perspective relationship.
[0044] In operation 205, according to the calculated spatial perspective relationship, the virtual images of the multiple page files of the file to be previewed are projected onto the real viewing space in the form of a tile matrix according to specific tile parameters, thereby forming a Figure 3 The preview effect is shown.
[0045] In this way, the present invention displays multiple page files in the real viewing space in the form of a tiled matrix according to the size of the real viewing space, so that users can preview multiple page files at the same time, thereby improving preview efficiency.
[0046] Figure 4 The following is a schematic diagram showing the implementation process of the AR-supported file preview method according to an embodiment of the present invention. Figure 3 ; Figure 5 A file preview effect diagram supporting AR according to another application example of the present invention is shown.
[0047] refer to Figure 4The file preview method supporting AR in an embodiment of the present invention includes: operation 401, measuring the area of a real framing space, where the real framing space is located in front of an electronic device; operation 402, determining a file to be previewed; operation 403, determining the actual area of a real object corresponding to the file to be previewed; operation 404, when the actual area is smaller than the area of the real framing space, calculating the size ratio between the actual area and the area of a virtual image corresponding to the file to be previewed, and determining the size ratio as a spatial perspective relationship; operation 405, according to the calculated spatial perspective relationship, projecting the virtual image of the file to be previewed onto the real framing space with the area size of the real object.
[0048] In operation 401, the real view space is usually located in front of the electronic device. In order to conveniently and quickly support the actual preview effect of AR, the space located directly in front of the electronic device is usually selected as the real view space. Specifically, the real view space can be collected by a camera, gyroscope or sensor installed on the electronic device to measure the area of the real view space.
[0049] In operation 402, the file to be previewed is a file such as a poster or a photo that needs to be printed, so before printing, it needs to be previewed in a tiled display manner according to the actual size of the file corresponding to the real object.
[0050] In operations 403 to 404, in order to preview files such as posters or banners that need to be printed in a tiled display according to the actual size of the real object corresponding to the file, it is first necessary to determine the actual area of the real object corresponding to the file to be previewed; after further determining that the actual area is smaller than the area of the actual framing space, calculate the size ratio between the actual area and the virtual image area corresponding to the file to be previewed, and determine the size ratio as a spatial perspective relationship.
[0051] In operation 405, according to the calculated spatial perspective relationship, the virtual image of the file to be previewed is projected onto the real viewing space with the area size of the real object, thereby forming a virtual image of the file to be previewed. Figure 5 The preview effect is shown.
[0052] In this way, the present invention can preview the actual printing effect in advance with the help of AR before printing a large poster or banner, thereby improving the preview effect.
[0053] Similarly, based on the AR-supported file preview method described above, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program, and when the program is executed by a processor, the processor performs at least the following operation steps: operation 101, measuring the area of the real framing space; operation 102, determining the file to be previewed; operation 103, calculating the spatial perspective relationship based on the measured area of the real framing space and the file to be previewed; operation 104, projecting the virtual image of the file to be previewed onto the real framing space according to the calculated spatial perspective relationship.
[0054] Furthermore, based on the AR-supported file preview method described above, an embodiment of the present invention further provides an electronic device, such as Figure 6 As shown, the electronic device 60 includes: a measuring module 601, used to measure the area of a real framing space, where the real framing space is located in front of the electronic device; a determining module 602, used to determine a file to be previewed; a calculating module 603, used to calculate a spatial perspective relationship based on the measured area of the real framing space and the file to be previewed; and a projection module 604, used to project a virtual image of the file to be previewed onto the real framing space according to the calculated spatial perspective relationship.
[0055] According to one embodiment of the present invention, the calculation module 603 includes: a determination unit for determining the area of the virtual image corresponding to the file to be previewed; a calculation unit for calculating the size ratio between the area of the measured real framing space and the area of the virtual image corresponding to the file to be previewed; and the determination unit is further used to determine the size ratio as a spatial perspective relationship.
[0056] According to one embodiment of the present invention, the file to be previewed includes multiple page files; the determination unit is specifically used to determine the virtual image area of the tile matrix formed by the multiple page files according to specific tiling parameters; correspondingly, the calculation unit is specifically used to calculate the size ratio between the area of the measured real framing space and the virtual image area of the tile matrix formed by the multiple page files.
[0057] According to an embodiment of the present invention, the projection module 604 is specifically configured to project virtual images of multiple page files of the file to be previewed onto the real viewing space in the form of a tiling matrix according to the specific tiling parameters according to the calculated spatial perspective relationship.
[0058] According to one embodiment of the present invention, the calculation module 603 includes: a determination unit, which determines the actual area of the real object corresponding to the file to be previewed; a calculation unit, which is used to calculate the size ratio between the actual area and the virtual image area corresponding to the file to be previewed when the actual area is smaller than the area of the real framing space; the determination unit is also used to determine the size ratio as a spatial perspective relationship.
[0059] According to an embodiment of the present invention, the projection module 604 is specifically configured to project the virtual image of the file to be previewed onto the real viewing space with the area size of the real object according to the calculated spatial perspective relationship.
[0060] It should be noted that: the above description of the electronic device embodiment is different from the above description of the electronic device embodiment. Figures 1 to 5 The description of the method embodiment shown is similar, with the same Figures 1 to 5 The method embodiment shown in the figure has similar beneficial effects, so it will not be described in detail. For technical details not disclosed in the electronic device embodiment of the present invention, please refer to the aforementioned Figures 1 to 5 The method embodiment shown in the figure can be understood by referring to the description, and will not be described in detail for the sake of saving space.
[0061] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0062] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0063] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0064] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0065] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.
[0066] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0067] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A file preview method supporting augmented reality (AR), characterized in that: Applied to electronic equipment, the method comprises: Measuring an area of a real viewing space, where the real viewing space is located in front of the electronic device; Determine a file to be previewed, wherein the file to be previewed includes a plurality of page files; Calculate the spatial perspective relationship according to the measured area of the actual viewing space and the file to be previewed; According to the calculated spatial perspective relationship, projecting the virtual image of the file to be previewed onto the real viewing space; The step of calculating the spatial perspective relationship based on the measured area of the actual viewing space and the file to be previewed includes: Determine the virtual image area of the tile matrix formed by the plurality of page files according to a specific tile parameter; Calculating a ratio between an area of the measured real viewing space and an area of a virtual image of a tile matrix formed by the plurality of page files; Determining the size ratio as a spatial perspective relationship; The step of calculating the spatial perspective relationship based on the measured area of the actual viewing space and the file to be previewed includes: Determine the actual area of the real object corresponding to the file to be previewed; When the actual area is smaller than the area of the real viewing space, calculating the size ratio between the actual area and the virtual image area corresponding to the file to be previewed; The size ratio is determined as a spatial perspective relationship.
2. The method according to claim 1, characterized in that: According to the calculated spatial perspective relationship, projecting the virtual image of the file to be previewed onto the real viewing space includes: According to the calculated spatial perspective relationship, the virtual images of the plurality of page files of the file to be previewed are projected onto the real viewing space in the form of a tiling matrix according to the specific tiling parameters.
3. The method according to claim 1, characterized in that: According to the calculated spatial perspective relationship, projecting the virtual image of the file to be previewed onto the real viewing space includes: According to the calculated spatial perspective relationship, the virtual image of the file to be previewed is projected onto the real viewing space with the area size of the real object.
4. An electronic device, characterized in that: The electronic device comprises: A measuring module, used to measure the area of a real viewing space, where the real viewing space is located in front of the electronic device; A determination module, used to determine the file to be previewed; A calculation module, used for calculating the spatial perspective relationship according to the measured area of the actual viewing space and the file to be previewed; A projection module, used for projecting a virtual image of the file to be previewed onto the real viewing space according to the calculated spatial perspective relationship; Wherein, the calculation module includes: A determination unit, used for determining a virtual image area corresponding to the file to be previewed; A calculation unit, used for calculating the size ratio between the measured area of the real framing space and the area of the virtual image corresponding to the file to be previewed; The determining unit is further used to determine the size ratio as a spatial perspective relationship; Wherein, the file to be previewed includes multiple page files; The determining unit is specifically used to determine the virtual image area of the tile matrix formed by the multiple page files according to a specific tile parameter; Accordingly, the calculation unit is specifically used to calculate the size ratio between the area of the measured real framing space and the virtual image area of the tile matrix formed by the multiple page files; Wherein, the determining unit is specifically used to determine the actual area of the real object corresponding to the file to be previewed; The calculation unit is specifically configured to calculate the size ratio between the actual area and the virtual image area corresponding to the file to be previewed when the actual area is smaller than the area of the real framing space; The determining unit is further configured to determine the size ratio as a spatial perspective relationship.
5. A computer-readable storage medium, characterized in that: The storage medium includes a set of computer executable instructions, which, when executed, are used to execute the file preview method supporting augmented reality (AR) as described in any one of claims 1 to 3.
