Image acquisition method, device, equipment and storage medium

By rendering and collecting multiple panoramic images on the browser page, the problem of low image acquisition efficiency on the panoramic images is solved, automatic acquisition on the panoramic images is realized, and the acquisition efficiency and effect are improved.

CN111783014BInactive Publication Date: 2024-11-26BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010612821.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-30
Publication Date
2024-11-26
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art has low image acquisition efficiency on panoramic images, and cannot achieve automatic acquisition, and requires manual rotation and cropping.

Method used

By acquiring multiple panoramic images, rendering the browser page, and collecting images on the rendered page according to the preset acquisition parameters, automatically collecting images on the panoramic images.

Benefits of technology

The efficiency and effect of image acquisition on the panoramic map are improved, and the automatic acquisition of multiple panoramic maps is realized, especially in the case of massive panoramic maps, the acquisition efficiency is significantly improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111783014B_ABST
    Figure CN111783014B_ABST
Patent Text Reader

Abstract

The present application discloses an image acquisition method, device, equipment and storage medium, which relate to the fields of computer vision and deep learning. The specific implementation scheme is: obtaining multiple panoramas; rendering multiple preset browser pages according to the multiple panoramas; and acquiring images of the panoramas on the rendered browser pages according to preset acquisition parameters to obtain multiple acquired images. Therefore, the present application realizes the automatic acquisition of images on multiple panoramas, and improves the efficiency and effect of image acquisition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the fields of computer vision and deep learning in the field of computer technology, and in particular to an image acquisition method, apparatus, device and storage medium. Background Art

[0002] Panoramic images can be taken through holographic photography, and users can see 360 ​​degrees upward, 360 degrees downward, and 360 degrees horizontally through panoramas. Compared with flat, video, and 3D renderings, panoramas have the advantages of being interactive, low traffic, rich in display, and multi-terminal compatible.

[0003] When collecting images at a certain angle on a panorama, the panorama is usually manually rotated to the angle, and then the image at the angle is manually captured from the panorama. The image collection efficiency in this way is not high, and automatic image collection on the panorama cannot be achieved. Summary of the invention

[0004] The present application provides a more efficient image acquisition method, apparatus, device and storage medium.

[0005] According to one aspect of the present application, there is provided an image acquisition method, the method comprising:

[0006] Get multiple panoramas;

[0007] Rendering a plurality of preset browser pages according to the plurality of panoramic images;

[0008] According to preset acquisition parameters, image acquisition is performed on the panoramic image on the rendered browser page to obtain a plurality of acquired images.

[0009] According to another aspect of the present application, an image acquisition device is provided, the device comprising:

[0010] An acquisition module, used for acquiring multiple panoramic images;

[0011] A rendering module, used for rendering a plurality of preset browser pages according to the plurality of panoramic images;

[0012] The acquisition module is used to acquire images of the panoramic image on the rendered browser page according to preset acquisition parameters to obtain multiple acquired images.

[0013] According to another aspect of the present application, there is provided an electronic device, including:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the above-mentioned image acquisition method.

[0017] According to another aspect of the present application, a non-transitory computer-readable storage medium storing computer instructions is provided. When the computer instructions are executed by a computer, the method described in the above-mentioned image acquisition method is implemented.

[0018] According to another aspect of the present application, a computer program product is provided, which includes: a computer program, which is stored in a readable storage medium, and at least one processor of an electronic device can read the computer program from the readable storage medium, and the at least one processor executes the computer program so that the electronic device executes the method described in the above aspect.

[0019] The image acquisition method, apparatus, device and storage medium provided in the present application obtain multiple panoramas, render the panorama pages on multiple preset browser pages, and according to acquisition parameters, perform image acquisition on the panorama on the rendered browser page to obtain multiple acquired images, thereby realizing automatic image acquisition on multiple panoramas and effectively improving the efficiency of image acquisition on the panorama.

[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.

[0022] Figure 1 is a schematic diagram of a network architecture applicable to an embodiment of the present application;

[0023] Figure 2 is a flowchart of an image acquisition method provided by an embodiment of the present application;

[0024] Figure 3 is a flowchart of an image acquisition method provided by another embodiment of the present application;

[0025] Figure 4 is a flowchart of an image acquisition method provided by another embodiment of the present application;

[0026] Figure 5 is an example diagram of an image acquisition process on a panoramic image provided by another embodiment of the present application;

[0027] Figure 6 is a structural schematic diagram of an image acquisition device provided by an embodiment of the present application;

[0028] Figure 7 It is a block diagram of an electronic device used to implement the image acquisition method of an embodiment of the present application. DETAILED DESCRIPTION

[0029] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0030] Panoramas can be taken by holographic shooting methods. Through panoramas, users can see 360 ​​degrees upward, 360 degrees downward, and 360 degrees horizontally. Compared with planes, videos, and three-dimensional renderings, panoramas have the advantages of interactivity, low traffic, rich presentation, and multi-terminal compatibility. Today, the technology for generating panoramas has become mature, but for a large number of panoramas, there is still a lack of efficient way to collect images on the panorama.

[0031] Generally, when rendering a panorama in a browser, a cube can be used to analyze and render the panorama. Six pictures in six directions, namely, up, down, left, right, front, and back, are used as color texture maps of the six faces of a cube box. After rendering these maps through a three-dimensional development engine (such as ThreeJS), a scene loaded with textures can be obtained. At this time, by binding mouse events, the panorama on the browser page can be rotated to different angles manually, and the rotated panorama can be manually cropped to obtain the corresponding image.

[0032] It can be seen that when there are a large number of panoramas, the method of completing image acquisition by manually rotating and cropping the panoramas is not efficient and cannot achieve automatic image acquisition on the panorama.

[0033] The embodiments of the present application provide an image acquisition method, device, equipment and storage medium, which are applied to the computer vision field and deep learning field in the field of computer technology. In the embodiments of the present application, according to the acquired multiple panoramas, multiple browser pages are rendered, and according to the preset acquisition parameters, the panoramas are imaged on the rendered browser pages to obtain multiple acquired images, thereby realizing automatic acquisition of images on multiple panoramas, and effectively improving the efficiency of image acquisition on the panoramas.

[0034] Figure 1 A schematic diagram of a network architecture applicable to an embodiment of the present application is shown in FIG. Figure 1 As shown, the network architecture includes a terminal device 101 and a server 102. The panoramic image can be collected on the terminal device 101 or on the server 102. When the number of panoramic images is large, the panoramic image is collected on the server 102, which is more efficient than collecting images on the terminal device 101. The terminal device 101 and the server 102 can obtain the panoramic image from a remote server or obtain the pre-collected panoramic image from their own storage. Among them, the terminal device 101 can be a computer, a tablet computer or other device, and the server 101 can be a centralized server, a distributed server, or a cloud server.

[0035] Figure 2 FIG. 1 is a flow chart of an image acquisition method provided by an embodiment of the present application. Figure 2 As shown, the method includes:

[0036] S201, obtaining multiple panoramic images.

[0037] Specifically, multiple panoramas can be obtained from a local preset image library or from a remote server. Each panorama may include images in six directions: up, down, left, right, front, and back, namely, an upward view, a downward view, a left view, a right view, a front view, and a rear view. The images in the six directions in each panorama may constitute a panoramic view of a place.

[0038] S202: Render multiple preset browser pages according to the multiple panoramic images.

[0039] Specifically, after obtaining multiple panoramas, for each panorama, one of the multiple browser pages can be rendered based on the upward view, the downward view, the left view, the right view, the front view and the rear view in the panorama, so that the browser page displays the panoramic image. Among them, one browser page can be used to display a panorama, so multiple panoramas can be displayed on multiple browser pages by rendering multiple browser pages simultaneously. Among them, the process of rendering one of the multiple browser pages based on the upward view, the downward view, the left view, the right view, the front view and the rear view in the panorama can be implemented by a three-dimensional development engine. For example, the three-dimensional development engine can be ThreeJS.

[0040] S203 . According to preset acquisition parameters, on the rendered browser page, perform image acquisition on the panoramic image to obtain a plurality of acquired images.

[0041] Specifically, the panorama is displayed on each rendered browser page. Therefore, the panorama can be captured according to preset capture parameters on each rendered browser page to obtain multiple captured images.

[0042] In a feasible implementation, the acquisition parameters may include at least one rotation angle, where the rotation angle includes the direction of rotation and the angle value of rotation in that direction. When acquiring images, the panoramic image can be rotated according to the rotation angle on the browser page, and then the rotated panoramic image is cropped with the size of the entire browser page as the acquisition size. The cropped image is the acquired image, thereby obtaining the acquired image at the corresponding angle.

[0043] In a feasible implementation, the acquisition parameters may include at least one acquisition size and multiple acquisition coordinates corresponding to each acquisition coordinate. When acquiring an image, an image of the same size as the acquisition size may be cropped on the browser page with the acquisition coordinate as the starting point. The cropped image is the acquisition image, thereby obtaining an acquisition image of the corresponding position and size. The acquisition coordinates may be the coordinate system of the browser page or the pixel coordinates on the panoramic image.

[0044] In a feasible implementation, the acquisition parameters may include at least one rotation angle and at least one acquisition size and at least one acquisition coordinate corresponding to each rotation angle. When acquiring images, the panorama can be rotated according to the rotation angle on the browser page. On the rotated panorama, the image of the same size as the acquisition size is cropped with the acquisition coordinate as the starting point. The cropped image is the acquired image, thereby obtaining an acquired image of the corresponding angle, position and size.

[0045] In a feasible implementation, the manual operation parameters (including manual rotation angle, manual acquisition size, and manual acquisition coordinates) of different users when manually acquiring images on the browser page can be collected in advance, and the manual operation parameters can be preset as acquisition parameters, thereby improving the rationality of the acquisition parameter setting and making the acquired images more in line with user needs.

[0046] Furthermore, the manual operation parameter with the highest frequency of occurrence may be selected from among all the collected manual operation parameters, and the manual operation parameter with the highest frequency of occurrence may be determined as the collection parameter, thereby improving the rationality of the collection parameter setting and making the collected image more in line with user needs.

[0047] In an embodiment of the present application, page rendering is performed on multiple browser pages based on the multiple panoramic images obtained, and image capture is performed on the panoramic images on the rendered browser page based on preset capture parameters to obtain multiple captured images, thereby achieving automatic image capture on multiple panoramas, effectively improving the efficiency and effect of image capture on the panoramas.

[0048] Figure 3 FIG. 1 is a flow chart of an image acquisition method provided by another embodiment of the present application. Figure 3 As shown, the method includes:

[0049] S301, obtaining multiple panoramic images.

[0050] Specifically, multiple panoramas can be obtained from a local preset image library or from a remote server. Each panorama may include images in six directions: up, down, left, right, front, and back, namely, an upward view, a downward view, a left view, a right view, a front view, and a rear view. The images in the six directions in each panorama may constitute a panoramic view of a place.

[0051] S302: Loading a preset page template on each browser page.

[0052] Specifically, a page template can be written by a developer in advance, and the page template includes static content for the browser page to render the panorama. For example, the panorama is output in a preset display frame on the browser page, and a page template with a corresponding display frame can be written in advance. Therefore, by loading the page template through each browser page, the time consumption of page rendering can be reduced, and the consistency of the static content of each browser page can be ensured, thereby improving the efficiency and effect of subsequent image acquisition.

[0053] S303: Rendering multiple browser pages loaded with page templates respectively according to the multiple panoramic images.

[0054] Specifically, while each browser page is loading a page template, or after each browser page is loading a page template, each panorama can be used as a material to render the panorama on multiple browser pages. Among them, one browser page can be used to display one panorama, so multiple browser pages can be rendered simultaneously to display multiple panoramas on multiple browser pages. Among them, the process of rendering one of the multiple browser pages based on the upward view, the downward view, the left view, the right view, the front view and the rear view in the panorama can be implemented by a three-dimensional development engine. For example, the three-dimensional development engine can be ThreeJS.

[0055] In a feasible manner, a developer may pre-design a script file for rendering a panoramic image on a browser page, and by running the script file, a page template and a corresponding panoramic image are loaded onto the browser page, and the browser page is rendered according to the panoramic image during the loading process, thereby achieving page rendering of a browser page based on the panoramic image. The panoramic image is the dynamic content of the browser page.

[0056] S304: According to preset acquisition parameters, on the rendered browser page, perform image acquisition on the panoramic image to obtain a plurality of acquired images.

[0057] Specifically, the panorama is displayed on each rendered browser page. Therefore, the panorama can be captured according to preset capture parameters on each rendered browser page to obtain multiple captured images.

[0058] The process of collecting images of the panoramic image according to the preset collection parameters can refer to various feasible implementations of step S203, which will not be described in detail.

[0059] In a feasible implementation, the acquisition parameters may include at least one acquisition viewport, wherein the acquisition viewport is the visible area of ​​the panorama on the browser page, and adjusting the acquisition viewport of the panorama is equivalent to rotating the panorama, so that different areas of the panorama are displayed on the browser page. Therefore, when acquiring an image, the panorama on the browser page may be adjusted according to the acquisition viewport, and then the adjusted panorama may be cropped with the size of the entire browser page as the acquisition size, and the cropped image is the acquisition image, thereby obtaining the acquisition image under the corresponding acquisition viewport.

[0060] In a feasible implementation, the acquisition parameters may include at least one acquisition viewport, and the acquisition size and acquisition coordinates corresponding to each acquisition viewport. When acquiring images, the panorama on the browser page may be adjusted according to the acquisition viewport, and on the adjusted panorama, an image of the same size as the acquisition size may be cropped with the acquisition coordinates as the starting point, and the cropped image is the acquisition image, thereby obtaining an acquisition image of the corresponding acquisition viewport, position and size.

[0061] In a feasible implementation, the acquisition viewport includes the camera field angle and the camera position, wherein the camera field angle refers to the angle between the height and width of the camera field of view, and the camera position includes the camera position in the vertical direction and the horizontal direction. The camera here can be understood as a virtual camera set for the browser page. Therefore, the acquisition viewport can be determined according to the camera field angle and the camera position. When the camera field angle and / or the camera position changes, the acquisition viewport will also change accordingly. The acquisition viewport can be adjusted by adjusting the camera field angle and / or the camera position, thereby improving the convenience and accuracy of the acquisition viewport adjustment.

[0062] As an example, the camera field of view angle can be expressed as fov angle, and the camera position can be expressed as (h, y). The camera field of view angle and camera position can be set through the lookAt function in the programming language, thereby realizing the adjustment of the acquisition viewport.

[0063] In a feasible implementation manner, when multiple acquired images are obtained, each acquired image can be labeled separately according to the acquisition parameters corresponding to each acquired image, and each acquired image can be classified and saved according to the acquisition parameters, thereby improving the management effect of the acquired images and facilitating the provision of corresponding acquired images for users according to different acquisition parameters. Compared with manual labeling and classified saving of acquired images, automatic labeling and classified saving after acquiring images are more accurate and efficient.

[0064] As an example, the corresponding rotation angle, acquisition size and acquisition coordinates can be marked on each acquired image, and each acquired image can be classified according to the rotation angle, that is, the acquired images obtained at the same rotation angle are classified into one category. Therefore, when acquiring an acquired image, the user only needs to enter the rotation angle to obtain the acquired images of various acquisition sizes and acquisition coordinates at the rotation angle, which is more efficient and accurate than the user's manual rotation. Similarly, the corresponding acquisition viewport, acquisition size and acquisition coordinates can be marked on each acquired image, and each acquired image can be classified according to the acquisition viewport, that is, the acquired images obtained under the same acquisition viewport are classified into one category.

[0065] In a feasible implementation, after the acquisition of multiple panoramic images is completed, the next batch of panoramas can be obtained, and the browser page can be rendered based on the next batch of panoramas. Then, on the rendered browser page, the next batch of panoramas can be acquired for image acquisition, thereby realizing automatic batch acquisition of images on the panorama, and being able to automatically acquire images for massive panoramic images.

[0066] In an embodiment of the present application, a page template is pre-set, a page module is loaded on multiple browser pages, and page rendering is performed on multiple browser pages based on multiple panoramas. According to preset acquisition parameters, image acquisition is performed on the panorama on the rendered browser page to obtain multiple acquired images, thereby realizing automatic image acquisition on multiple panoramas, effectively improving the efficiency and effect of image acquisition on the panorama.

[0067] Figure 4 FIG. 1 is a flow chart of an image acquisition method provided by another embodiment of the present application. Figure 4 As shown, the method includes:

[0068] S401: Start multiple browsers, and each browser loads at least one browser page.

[0069] Specifically, a browser application can be pre-set on the current device, and multiple browsers can be started by starting multiple processes of the browser application. Each browser loads at least one browser page, so that subsequent panoramic image acquisition, browser page rendering, and image acquisition on the panoramic image can be synchronously performed through at least one browser page on the multiple browsers, effectively improving the image acquisition efficiency on the panoramic image and realizing automatic image acquisition of massive panoramic images.

[0070] In a feasible implementation, the browser may be a browser without a user interface (UI interface), also known as a headless mode of the browser, and may run in the background, that is, on a local server, thereby improving image acquisition efficiency through a browser without a user interface.

[0071] In a feasible implementation, the browser can be a browser in combination with the puppeteer tool, and the puppeteer tool can be understood as a crawler tool, and can also be understood as a node library (or nodeJS library), which is the JavaScript runtime environment of the browser engine, and can provide various operations such as rotation and cutting for the image on the browser page, and the grammar is concise. The puppeteer tool is easy to install and can be bundled with the browser so that the browser can run in the background of the mode without a user interface. Therefore, the browser in combination with the puppeteer tool can improve the performance of the browser and provide convenient image operations.

[0072] S402: Acquire multiple panoramic images.

[0073] Specifically, multiple panoramas can be obtained from a local preset image library or from a remote server. Each panorama may include images in six directions: up, down, left, right, front, and back, namely, an upward view, a downward view, a left view, a right view, a front view, and a rear view. The images in the six directions in each panorama may constitute a panoramic view of a place.

[0074] In a feasible implementation, multiple panoramic online addresses can be preset, and at least one browser page of each browser can send a data acquisition request to a remote server where the panoramic online address is located, so as to obtain the panoramic image corresponding to the panoramic online address returned by the remote server, so as to collect the panoramic image from the Internet according to the panoramic online address, thereby improving the convenience of panoramic image acquisition and the richness of the content of the panoramic image. Among them, the panoramic online address can be a Uniform Resource Locator (URL) that provides panoramic resources, a browser page sends a data acquisition request to a remote server where a panoramic online address is located, different browser pages send data acquisition requests to remote servers where different panoramic online addresses are located, and the data acquisition requests sent by different browser pages are asynchronous requests, indicating that the data acquisition requests sent by different browser pages do not interfere with each other, thereby utilizing the asynchronous and efficient characteristics of file reading to improve the stability and efficiency of panoramic image reading.

[0075] In a feasible implementation, multiple launched browsers can form an asynchronous queue, and each launched browser is a process in the asynchronous queue. Multiple browsers can be managed in the form of an asynchronous queue. For example, by closing a process, the browser corresponding to the process is closed, and by opening a process, the browser corresponding to the process is started, thereby improving the browser management effect.

[0076] In a feasible implementation, multiple browsers in an asynchronous queue obtain a preset number of panoramic online addresses from a preset plurality of panoramic online addresses, obtain the panoramas corresponding to the preset number of panoramic online addresses, perform image capture on these panoramas, and after completing the image capture of these panoramas, obtain the next batch of preset number of panoramic online addresses from the preset plurality of panoramic online addresses, perform image capture on the panoramas corresponding to the next preset number of panoramic online addresses, and so on, perform image capture on the panoramas corresponding to the preset number of panoramic online addresses in batches, thereby realizing automatic image capture of massive panoramic images.

[0077] In a feasible implementation, the asynchronous queue can be dynamically released through a preset timer to ensure that the memory management of the current device is maintained in a balanced state and to ensure the performance of the current device. Specifically, all processes in the asynchronous queue can be released once every preset time period through a preset timer to avoid more and more cached data of each browser in the asynchronous queue and slower and slower operating efficiency. Alternatively, a preset timer can be used to release processes in the asynchronous queue whose running time exceeds a preset time threshold to avoid browsers that have been stuck for too long in the asynchronous queue. After releasing processes whose running time exceeds the preset time threshold, one or more browsers can be restarted to avoid the number of browsers in the asynchronous queue after the release, affecting the efficiency of image acquisition on the panoramic map.

[0078] In a feasible implementation, the current device can be load tested in advance to determine the number of browsers running simultaneously on the current device and the number of browser pages on each browser, so as to increase the number of browsers and the number of browser pages on each browser as much as possible while ensuring the operating performance of the current device, thereby squeezing the performance of the memory limit of the current device, and realizing high-concurrency operations such as panoramic image acquisition, browser page rendering, and image acquisition on the panoramic image through asynchronous queues, effectively improving the efficiency of image acquisition on massive panoramas.

[0079] As an example, assuming that the browser bound to puppeteer is 80M (M represents the unit: megabyte, MByte), after a large number of load tests, the space of 16G (G represents the unit: gigabyte, GigaByte) memory can open up to 10 browsers at the same time for browser page rendering, and the fastest response is achieved when each browser loads a maximum of about 14 browser pages. Therefore, according to the results of the load test, a rough formula can be summarized to calculate the number of browser startups and the number of browser pages for each browser corresponding to the current device memory. The formula can be expressed as: (1 / 2*memory) browsers*(1*memory) browser pages. Among them, * is a multiplication sign, and the memory is the memory of the current device. The number of browsers and the number of browser pages calculated by this formula are both smaller than the number of browsers and the number of browser pages in the load test, so as to increase the range of devices applicable to the formula and reduce the probability of browser freeze or flashback. After testing, the number of browsers and browser page data are determined according to the above formula, and the startup speed and loading speed of each browser complete the response within 1 second.

[0080] As an example, after determining the number of browsers and the number of browser pages according to the above formula, the efficiency of image acquisition for 10,000 panoramas can be calculated. For example, assuming that the image acquisition rate is 42 panoramas per second, it takes about 4 minutes to acquire 10,000 panoramas. Compared with a single browser acquiring 10,000 panoramas, the method of acquiring images on the panoramas by determining the number of browsers and the number of browser pages according to the above formula is more stable and efficient. In particular, the more panoramas there are (for example, a million panoramas), the more outstanding the stability and efficiency of this method.

[0081] S403: Loading a preset page template on each browser page.

[0082] Specifically, a page template can be written by a developer in advance, and the page template includes static content for the browser page to render the panorama. For example, the panorama is output in a preset display frame on the browser page, and a page template with a corresponding display frame can be written in advance. Therefore, by loading the page template through each browser page, the time consumption of page rendering can be reduced, and the consistency of the static content of each browser page can be ensured, thereby improving the efficiency and effect of subsequent image acquisition.

[0083] S404: Rendering multiple browser pages loaded with page templates respectively according to the multiple panoramic images.

[0084] Specifically, while each browser page is loading a page template, or after each browser page is loading a page template, each panorama can be used as a material to render the panorama on multiple browser pages. Among them, one browser page can be used to display one panorama, so multiple browser pages can be rendered simultaneously to display multiple panoramas on multiple browser pages. Among them, based on the upward view, the downward view, the left view, the right view, the front view and the rear view in the panorama, the process of rendering one of the multiple browser pages can be realized by the three-dimensional development engine.

[0085] In a feasible manner, a developer may pre-design a script file for rendering a panoramic image on a browser page, and by running the script file, a page template and a corresponding panoramic image are loaded onto the browser page, and the browser page is rendered according to the panoramic image during the loading process, thereby achieving page rendering of a browser page based on the panoramic image. The panoramic image is the dynamic content of the browser page.

[0086] S405 . According to preset acquisition parameters, on the rendered browser page, perform image acquisition on the panoramic image to obtain a plurality of acquired images.

[0087] Specifically, the panorama is displayed on each rendered browser page. Therefore, the panorama can be captured according to preset capture parameters on each rendered browser page to obtain multiple captured images.

[0088] The process of collecting images of the panoramic image according to the preset collection parameters can refer to various feasible implementations of step S203 and various feasible implementations of step S304, which will not be described in detail.

[0089] In a feasible implementation, after the browser page is rendered, the acquisition parameters can be passed to the Page.evaluate() function in the nodeJS library, and the rotation and cropping of the panorama on the browser page can be realized through the Page.evaluate() function, and the acquired image can be saved after the acquisition object is obtained, thereby improving the convenience of image acquisition on the panorama. Among them, the acquisition parameters can be passed to the browser page through the node end on the local server, and after the browser page starts the Page.evaluate() function, Page.evaluate() reads the acquisition parameters.

[0090] In an embodiment of the present application, multiple browsers are started, each browser loads at least one browser page, preset page modules are loaded on the multiple browser pages, and page rendering is performed on the multiple browser pages according to the multiple panoramas, and according to the preset acquisition parameters, image acquisition is performed on the rendered browser page for the panorama to obtain multiple acquired images, thereby realizing automatic image acquisition on the panorama with high concurrency, and effectively improving the efficiency and effect of image acquisition on the panorama.

[0091] As an example, Figure 5 An example diagram of the image acquisition process on a panoramic map. Figure 6 The left side shows the process of material preparation and page template preparation. Figure 6The left side is the process of page rendering and image acquisition of the panorama through multiple browser pages of multiple browsers. First, multiple browsers are started, each browser can load multiple browser pages, each browser page can load page modules, and after loading the page template, the three-dimensional development engine ThreeJS and the panorama including the front view, rear view, left view, right view, top view and bottom view can be used on the browser page to render the page, and obtain a browser page showing the panorama. During rendering, a specific angle transmitted from the node end of the local server can be obtained, so that the image of the specific angle can also be displayed below the panorama. For example, when the panorama is an indoor picture, the specific angle can be the living room angle and the master bedroom angle, so that the image of the living room angle and the master bedroom angle can be displayed, wherein the specific angle can be obtained when the panorama is obtained from the remote server corresponding to the online address of the panorama. After the page rendering is completed, the panorama on each browser page can be rotated, cropped and saved through the functions in the nodeJS library, such as the Page.evaluate() function.

[0092] Figure 6 The structure diagram of the image acquisition device provided by one embodiment of the present application is shown in FIG. Figure 6 As shown, the device comprises:

[0093] An acquisition module 601 is used to acquire multiple panoramic images;

[0094] A rendering module 602 is used to render a plurality of preset browser pages according to the plurality of panoramic images;

[0095] The acquisition module 603 is used to acquire images of the panoramic image on the rendered browser page according to preset acquisition parameters to obtain multiple acquired images.

[0096] In a feasible implementation, the rendering module 602 is specifically configured to:

[0097] On each browser page, load the preset page template;

[0098] According to the multiple panoramic images, multiple browser pages loaded with page templates are rendered respectively.

[0099] In a feasible implementation manner, the acquisition parameters include an acquisition viewport, and an acquisition size and acquisition coordinates corresponding to the acquisition viewport.

[0100] In a feasible implementation manner, the acquisition viewport includes a camera field of view angle and a camera position.

[0101] In a feasible implementation, the acquisition module 603 is specifically used to:

[0102] Adjust the panorama on the browser page according to the acquisition viewport;

[0103] The image is captured for the adjusted panorama on the browser page according to the capture size and capture coordinates.

[0104] In a feasible implementation manner, the image acquisition device further includes:

[0105] The saving module is used to annotate and save multiple acquired images according to various acquisition parameters.

[0106] In a feasible implementation manner, the image acquisition device further includes:

[0107] The startup module is used to start multiple browsers, and each browser loads at least one browser page.

[0108] In a feasible implementation, the acquisition module 601 is specifically used to:

[0109] Get multiple preset panoramic online addresses;

[0110] The panoramic images corresponding to the online addresses of the panoramic images are obtained through at least one browser page of the multiple browsers.

[0111] In a feasible implementation manner, a plurality of browsers constitute an asynchronous queue; the device further comprises:

[0112] The management module is used to dynamically release the asynchronous queue according to a preset timer.

[0113] In an embodiment of the present application, page rendering is performed on multiple browser pages based on the multiple panoramic images obtained, and image capture is performed on the panoramic images on the rendered browser page based on preset capture parameters to obtain multiple captured images, thereby achieving automatic image capture on multiple panoramas, effectively improving the efficiency and effect of image capture on the panoramas.

[0114] The specific principles and implementation methods of the image acquisition device provided in the embodiments of the present application are Figure 2 to Figure 4 The method embodiments shown are similar and will not be described again here.

[0115] According to an embodiment of the present application, the present application also provides an electronic device and a readable storage medium.

[0116] like Figure 7, is a block diagram of an electronic device according to an image acquisition method according to an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0117] like Figure 7 As shown, the electronic device includes: one or more processors 701, a memory 702, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 701 is taken as an example.

[0118] The memory 702 is a non-transitory computer-readable storage medium provided in the present application. The memory stores instructions executable by at least one processor to enable the at least one processor to perform the image acquisition method provided in the present application. The non-transitory computer-readable storage medium of the present application stores computer instructions, which are used to enable a computer to perform the image acquisition method provided in the present application.

[0119] The memory 702 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the image acquisition method in the embodiment of the present application (for example, the attached Figure 6 The processor 701 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 702, that is, the image acquisition method in the above method embodiment is implemented.

[0120] The memory 702 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created according to the use of the electronic device for image acquisition, etc. In addition, the memory 702 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 702 may optionally include a memory remotely arranged relative to the processor 701, and these remote memories may be connected to the electronic device for image acquisition via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0121] The electronic device of the image acquisition method may further include: an input device 703 and an output device 704. The processor 701, the memory 702, the input device 703 and the output device 704 may be connected via a bus or other means. Figure 7 The example of connecting through bus is taken in the following.

[0122] The input device 703 can receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device for image acquisition, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick and other input devices. The output device 704 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display and a plasma display. In some embodiments, the display device may be a touch screen.

[0123] Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0124] These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for programmable processors and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or means (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0125] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0126] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0127] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

[0128] According to an embodiment of the present application, the present application also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the non-transitory computer-readable storage medium stores instructions that, when executed on a computer, enable the computer to execute a method as described in any of the above embodiments.

[0129] According to an embodiment of the present application, the present application also provides a computer program product, which includes: a computer program, the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the solution provided by any of the above embodiments.

[0130] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more.

[0131] It should be understood that the various numerical numbers involved in the embodiments of the present application are only distinguished for the convenience of description and are not used to limit the scope of the embodiments of the present application.

[0132] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.

[0133] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.

Claims

1. An image acquisition method, characterized in that: The method comprises: Get multiple panoramas; Rendering a plurality of preset browser pages according to the plurality of panoramic images includes: loading a preset page template on each of the browser pages; The step of loading a preset page template on each of the browser pages comprises: outputting the plurality of panoramas in a preset display frame on the corresponding browser page, and pre-compiled a page template provided with a corresponding display frame; According to preset acquisition parameters, on the rendered browser page, the panoramic image is acquired to obtain a plurality of acquired images; the acquisition parameters include an acquisition viewport, and an acquisition size and acquisition coordinates corresponding to the acquisition viewport; the acquisition viewport includes a camera field of view angle and a camera position; The method of performing image acquisition on the rendered browser page based on preset acquisition parameters includes: adjusting the panoramic image on the browser page according to the acquisition viewport; and performing image acquisition on the adjusted panoramic image on the browser page according to the acquisition size and the acquisition coordinates.

2. The method according to claim 1, characterized in that The rendering of a plurality of preset browser pages according to the plurality of panoramic images further includes: According to the multiple panoramic images, page rendering is performed respectively on the multiple browser pages loaded with the page template.

3. The method according to claim 1, characterized in that After performing image acquisition on the panoramic image on the rendered browser page according to the preset acquisition parameters to obtain a plurality of acquired images, the method further includes: According to each of the acquisition parameters, the multiple acquired images are annotated and saved.

4. The method according to any one of claims 1 to 3, characterized in that: Before acquiring the plurality of panoramic images, the method further includes: A plurality of browsers are started, each of the browsers loading at least one browser page.

5. The method according to claim 4, characterized in that The obtaining of multiple panoramic images includes: Get the preset online addresses of multiple panoramic images; The panoramic images corresponding to the online addresses of the panoramic images are obtained through at least one browser page of each of the browsers.

6. The method according to claim 4, characterized in that The multiple browsers constitute an asynchronous queue; the method further comprises: The asynchronous queue is dynamically released according to a preset timer.

7. An image acquisition device, characterized in that: The device comprises: An acquisition module, used for acquiring multiple panoramic images; A rendering module, used for rendering a plurality of preset browser pages according to the plurality of panoramic images, including: loading a preset page template on each of the browser pages; The step of loading a preset page template on each of the browser pages comprises: outputting the plurality of panoramas in a preset display frame on the corresponding browser page, and pre-compiled a page template provided with a corresponding display frame; A collection module, used for collecting images of the panorama on the rendered browser page according to preset collection parameters to obtain a plurality of collected images; the collection parameters include a collection viewport, and a collection size and collection coordinates corresponding to the collection viewport; the collection viewport includes a camera field of view angle and a camera position; The acquisition module is specifically used to: adjust the panoramic image on the browser page according to the acquisition viewport; and perform image acquisition on the adjusted panoramic image on the browser page according to the acquisition size and the acquisition coordinates.

8. The device according to claim 7, characterized in that The rendering module is specifically used for: According to the multiple panoramic images, page rendering is performed respectively on the multiple browser pages loaded with the page template.

9. The device according to claim 7, characterized in that The device also includes: A saving module is used to annotate and save the multiple acquired images according to the respective acquisition parameters.

10. The device according to any one of claims 7 to 9, characterized in that: The device also includes: The startup module is used to start multiple browsers, each of which loads at least one browser page.

11. The device according to claim 10, characterized in that The acquisition module is specifically used for: Get the preset online addresses of multiple panoramic images; The panoramic images corresponding to the online addresses of the panoramic images are obtained through at least one browser page of each of the browsers.

12. The device according to claim 10, characterized in that The multiple browsers constitute an asynchronous queue; the device also includes: The management module is used to dynamically release the asynchronous queue according to a preset timer.

13. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.

14. A non-transitory computer-readable storage medium storing computer instructions, wherein when the computer instructions are executed by a computer, the method according to any one of claims 1 to 6 is implemented.

15. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.