Image generation method, device, computer readable storage medium and electronic device

By obtaining the borders and screen coordinates of the map area, and automatically intercepting and adjusting thumbnails, the problem of low-efficiency in thumbnail generation in the map area is solved, and efficient thumbnail generation is achieved.

CN114968002BActive Publication Date: 2024-12-20INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210854070.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-13
Publication Date
2024-12-20
Estimated Expiration
2042-07-13

AI Technical Summary

Technical Problem

In the prior art, the generation of map area thumbnails is inefficient, and it relies on manual operations, and there is a lack of efficient automation solutions.

Method used

By obtaining the target map area, determining the border surrounding the area, seizing the screen coordinates of the display area, generating the target thumbnail, adjusting the border length and width ratio to adapt to the target thumbnail size, and realizing automated thumbnail generation.

Benefits of technology

The thumbnail generation efficiency is improved, and the thumbnail generation of any irregular polygonal area is realized, solving the problem of inefficiency caused by manual operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114968002B_ABST
    Figure CN114968002B_ABST
Patent Text Reader

Abstract

The present invention discloses an image generation method, device, computer-readable storage medium and electronic device. Involving the field of financial technology or other related fields, the method comprises: obtaining a target area selected by a target object in a target map; determining a first target frame surrounding the target area; determining a second target frame based on the target area and the first target frame, wherein the area surrounded by the second target frame is less than or equal to the display area of ​​a target screen, and the target screen is used to display the target map; determining the screen coordinates corresponding to the vertices of the second target frame to obtain the first screen coordinates; based on the first screen coordinates, intercepting the area surrounded by the second target frame to obtain a target thumbnail. The present invention solves the technical problem of low efficiency in thumbnail generation caused by the prior art relying on manually making the selected map area into thumbnails.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of financial technology or other related fields, and in particular, to an image generation method, device, computer-readable storage medium and electronic device. Background Art

[0002] A map is a graphic or image that selectively represents certain phenomena of the earth (or other planets) in two-dimensional or multi-dimensional forms and means on a plane or sphere according to certain rules. With the continuous development of science and technology and the continuous improvement of the sophistication of maps, the scope of map application is also expanding.

[0003] In some application scenarios (such as land surveying), it is often necessary to focus on only a part of the map area. When the user wants to save or use this part of the map area, he usually can only manually make the selected map area into a corresponding thumbnail, which leads to the problem of low thumbnail generation efficiency.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present invention provide an image generation method, device, computer-readable storage medium and electronic device to at least solve the technical problem of low thumbnail generation efficiency caused by relying on manual production of thumbnails of selected map areas in the prior art.

[0006] According to one aspect of an embodiment of the present invention, there is provided an image generation method, comprising: acquiring a target area selected by a target object in a target map; determining a first target border surrounding the target area; determining a second target border based on the target area and the first target border, wherein the area surrounded by the second target border is less than or equal to the display area of ​​a target screen, and the target screen is used to display the target map; determining screen coordinates corresponding to vertices of the second target border to obtain first screen coordinates; and intercepting the area surrounded by the second target border based on the first screen coordinates to obtain a target thumbnail.

[0007] Furthermore, the image generation method also includes: determining a third target frame, wherein the third target frame is a minimum frame used to enclose a target area; determining a frame aspect ratio corresponding to the third target frame, wherein the frame aspect ratio is determined based on screen coordinates corresponding to the third target frame; determining an aspect ratio of a target thumbnail based on a target size, wherein the target size is used to determine the size of the target thumbnail; if the frame aspect ratio is greater than the aspect ratio of the target thumbnail, extending the third target frame in a first direction to obtain a first target frame; if the frame aspect ratio is less than the aspect ratio of the target thumbnail, extending the third target frame in a second direction to obtain a first target frame, wherein the first direction is different from the second direction.

[0008] Furthermore, the image generation method also includes: determining the screen coordinates corresponding to the vertices of the third target border to obtain the second screen coordinates; determining the border length and border width corresponding to the third target border based on the second screen coordinates; and determining the border aspect ratio based on the border length and border width.

[0009] Furthermore, the image generation method also includes: determining the screen coordinates corresponding to the vertices of the first target border to obtain a third screen coordinate; determining the geographic coordinates corresponding to the third screen coordinates; and determining the second target border based on the geographic coordinates, the target area and the first target border.

[0010] Furthermore, the image generation method also includes: determining the screen coordinates corresponding to the vertices of the first target border to obtain a third screen coordinate; determining the geographic coordinates corresponding to the third screen coordinates; and determining the second target border based on the geographic coordinates, the target area and the first target border.

[0011] Furthermore, the image generation method also includes: capturing a display area of ​​the target screen to obtain a first image; cropping the first image based on the first screen coordinates to obtain a second image; and adjusting the second image based on the target size to obtain a target thumbnail.

[0012] According to another aspect of an embodiment of the present invention, an image generating device is also provided, including: an acquisition module, used to acquire a target area selected by a target object in a target map; a first determination module, used to determine a first target border surrounding the target area; a second determination module, used to determine a second target border based on the target area and the first target border, wherein the area surrounded by the second target border is less than or equal to the display area of ​​a target screen, and the target screen is used to display the target map; a third determination module, used to determine the screen coordinates corresponding to the vertices of the second target border to obtain the first screen coordinates; and a processing module, used to intercept the area surrounded by the second target border based on the first screen coordinates to obtain a target thumbnail.

[0013] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the above-mentioned image generating method when it is run.

[0014] According to another aspect of an embodiment of the present invention, an electronic device is also provided, which includes one or more processors; a memory for storing one or more programs, which, when the one or more programs are executed by the one or more processors, enables the one or more processors to run the programs, wherein the programs are configured to execute the above-mentioned image generation method when running.

[0015] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program / instruction, and when the computer program / instruction is executed by a processor, the above-mentioned image generating method is implemented.

[0016] In an embodiment of the present invention, a corresponding target thumbnail is generated according to a frame used to surround the map area selected by the target object, by obtaining the target area selected by the target object in the target map, and then determining a first target frame surrounding the target area, and then determining a second target frame based on the target area and the first target frame, and determining the screen coordinates corresponding to the vertices of the second target frame to obtain the first screen coordinates, thereby intercepting the area surrounded by the second target frame based on the first screen coordinates to obtain a target thumbnail. Wherein, the area surrounded by the second target frame is less than or equal to the display area of ​​the target screen, and the target screen is used to display the target map.

[0017] In the above process, by determining the first target frame surrounding the target area, and determining the second target frame based on the target area and the first target frame, the target area selected by the target object in the target map is fully displayed on the target screen. The interception range corresponding to the target area is determined, and by determining the screen coordinates corresponding to the vertices of the second target frame, the specific interception position corresponding to the target area is determined. Further, the area surrounded by the second target frame is intercepted based on the first screen coordinates to obtain a target thumbnail, thereby achieving the effect of automatically generating a fully viewable thumbnail based on any irregular polygonal area selected by the user on the map, thereby improving the efficiency of thumbnail generation.

[0018] It can be seen that the solution provided in the present application achieves the purpose of generating a corresponding target thumbnail based on the border of the map area selected to surround the target object, thereby achieving the technical effect of improving the efficiency of thumbnail generation, and further solving the technical problem of low thumbnail generation efficiency caused by the prior art relying on manual production of the selected map area into thumbnails. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0020] Figure 1 is a schematic diagram of an optional image generation method according to an embodiment of the present invention;

[0021] Figure 2 is a schematic diagram of an optional target area according to an embodiment of the present invention;

[0022] Figure 3 is a schematic diagram of an optional third target frame according to an embodiment of the present invention;

[0023] Figure 4 is a schematic diagram of an optional first target border according to an embodiment of the present invention;

[0024] Figure 5 is a schematic diagram of an optional second target frame according to an embodiment of the present invention;

[0025] Figure 6 is a schematic diagram of an optional target thumbnail according to an embodiment of the present invention;

[0026] Figure 7 is a schematic diagram of an optional application of a target thumbnail according to an embodiment of the present invention;

[0027] Figure 8 is a schematic diagram of an optional image generating device according to an embodiment of the present invention;

[0028] Fig. 9 is a schematic diagram of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0031] It should be noted that the image generation method, device, computer-readable storage medium and electronic device determined in the present disclosure can be used in the field of financial technology, and can also be used in any field other than the field of financial technology. The application field of the image generation method, device, computer-readable storage medium and electronic device determined in the present disclosure is not limited.

[0032] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.

[0033] Example 1

[0034] According to an embodiment of the present invention, an embodiment of an image generating method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0035] Figure 1 is a schematic diagram of an optional image generation method according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:

[0036] Step S101, obtaining a target area selected by a target object in a target map.

[0037] In step S101, the target area selected by the target object in the target map can be obtained through electronic devices, application systems, servers and other devices. In this embodiment, the target area selected by the target object in the target map can be obtained through a target application installed in the electronic device, and the target application can be an application related to land surveying. Among them, the target application can load the target map into the application interface through a relevant development framework for loading and rendering maps (such as: ArcGIS Runtime SDK for iOS) to allow the user to select the target area. Part of the icon area is as follows Figure 2 The shape of the target area is not limited according to different user requirements.

[0038] Step S102: determining a first target frame surrounding the target area.

[0039] In step S102, the target application may first obtain the frame size preset by the user, and determine the frame shape desired by the user based on the preset frame size, thereby determining the frame shape of the first target frame according to the preset frame shape. Optionally, the first target frame may be the minimum frame surrounding the target area under the preset frame shape, or may be enlarged according to preset requirements to generate a certain amount of blank space in the target area.

[0040] It should be noted that by determining the first target frame, a thumbnail of a desired shape can be obtained subsequently.

[0041] Step S103, determining a second target frame based on the target area and the first target frame, wherein the area enclosed by the second target frame is smaller than or equal to the display area of ​​the target screen, and the target screen is used to display the target map.

[0042] In step S103, since the relevant user usually zooms in on the map when selecting the target area, Figure 2 As shown, the target area cannot be completely displayed in the display area of ​​the target screen. Therefore, after the target application determines the first target border, it can synchronously reduce the target area and the first target border, that is, reduce it until the first target border can be completely displayed in the display area of ​​the target screen, thereby obtaining the reduced first target border, that is, the second target border. Preferably, the second target border is equal in length or width to the display area of ​​the target screen. Optionally, if the relevant user adjusts the display area to be too small after selecting the display area, the target application can also synchronously enlarge the target area and the first target border after determining the first target border, that is, enlarge it until the first target border is equal in length or width to the display area of ​​the target screen.

[0043] It should be noted that by determining the second target frame based on the target area and the first target frame, the interception range corresponding to the target area is determined when the target area selected by the target object in the target map is fully displayed in the target screen.

[0044] Step S104, determining the screen coordinates corresponding to the vertices of the second target frame to obtain the first screen coordinates.

[0045] In step S104, the target application may directly determine the screen coordinates corresponding to all vertices of the second target border to obtain the first screen coordinates, or may first directly determine the coordinates corresponding to some vertices of the second target border, and then indirectly determine the coordinates corresponding to some vertices of the second target border according to a preset border shape, thereby obtaining the first screen coordinates. The screen coordinates are preferably logical coordinates.

[0046] It should be noted that the first screen coordinates are determined to determine the interception position for intercepting the display area in the target screen.

[0047] Step S105 , capturing the area surrounded by the second target frame based on the first screen coordinates to obtain a target thumbnail.

[0048] In step S105, the target application can directly capture the area surrounded by the second target border based on the first screen coordinates to obtain an initial thumbnail; the target application can also capture the complete display area of ​​the target screen and then perform a second capture on the area surrounded by the second target border in the captured image based on the first screen coordinates to obtain an initial thumbnail.

[0049] Furthermore, the target application may also scale the initial thumbnail based on a border size preset by the user to obtain a target thumbnail that meets the user's expectations.

[0050] It should be noted that, by performing image capture based on the first screen coordinates to obtain a target thumbnail, an effect of automatically generating a fully viewable thumbnail according to any irregular polygonal area selected by the user on the map is achieved.

[0051] Based on the scheme defined in the above steps S101 to S105, it can be known that in an embodiment of the present invention, a method of generating a corresponding target thumbnail according to a border used to surround the map area selected by the target object is adopted, by obtaining the target area selected by the target object in the target map, and then determining a first target border surrounding the target area, and then determining a second target border based on the target area and the first target border, and determining the screen coordinates corresponding to the vertices of the second target border to obtain the first screen coordinates, thereby intercepting the area surrounded by the second target border based on the first screen coordinates to obtain a target thumbnail. Among them, the area surrounded by the second target border is less than or equal to the display area of ​​the target screen, and the target screen is used to display the target map.

[0052] It is easy to notice that in the above process, by determining the first target frame surrounding the target area, and determining the second target frame based on the target area and the first target frame, the target area selected by the target object in the target map is fully displayed on the target screen. The interception range corresponding to the target area is determined, and by determining the screen coordinates corresponding to the vertices of the second target frame, the specific interception position corresponding to the target area is determined. Further, the area surrounded by the second target frame is intercepted based on the first screen coordinates to obtain a target thumbnail, thereby achieving the effect of automatically generating a fully viewable thumbnail based on any irregular polygonal area selected by the user on the map, thereby improving the efficiency of thumbnail generation.

[0053] It can be seen that the solution provided in the present application achieves the purpose of generating a corresponding target thumbnail based on the border of the map area selected to surround the target object, thereby achieving the technical effect of improving the efficiency of thumbnail generation, and further solving the technical problem of low thumbnail generation efficiency caused by the prior art relying on manual production of the selected map area into thumbnails.

[0054] In an optional embodiment, in the process of determining the first target frame surrounding the target area, the target application can determine the third target frame and determine the frame aspect ratio corresponding to the third target frame, so as to determine the aspect ratio of the target thumbnail based on the target size. If the frame aspect ratio is greater than the aspect ratio of the target thumbnail, the third target frame is extended in the first direction to obtain the first target frame. If the frame aspect ratio is less than the aspect ratio of the target thumbnail, the third target frame is extended in the second direction to obtain the first target frame. The third target frame is the minimum frame used to surround the target area, the frame aspect ratio is determined based on the screen coordinates corresponding to the third target frame, the target size is used to determine the size of the target thumbnail, and the first direction is different from the second direction.

[0055] Optionally, in this embodiment, the aforementioned development framework for loading and rendering maps can be ArcGIS Runtime API For iOS. The target application can call the relevant interface of ArcGIS Runtime API For iOS to determine Figure 3 The minimum frame surrounding the target area shown is also the third target frame.

[0056] Afterwards, the target application can determine the frame aspect ratio corresponding to the third target frame, and based on the frame size preset by the user, that is, the target size, determine the length (t_width) and width (t_height) of the target thumbnail, thereby determining the aspect ratio t_width / t_height of the target thumbnail to be generated.

[0057] Furthermore, the target application may compare the frame aspect ratio corresponding to the third target frame with the aspect ratio of the target thumbnail. When the frame aspect ratio corresponding to the third target frame is larger, the target application may extend the third target frame downward in the vertical direction by a certain distance so that the frame aspect ratio corresponding to the third target frame is equal to the aspect ratio of the target thumbnail, thereby obtaining the first target frame. Conversely, when the frame aspect ratio corresponding to the third target frame is smaller, the target application may extend the third target frame to the right in the horizontal direction by a certain distance so that the frame aspect ratio corresponding to the third target frame is equal to the aspect ratio of the target thumbnail, thereby obtaining the following. Figure 4 The first target frame shown. It should be noted that when the third target frame is extended in the vertical direction, the extension direction may also be upward, and when the third target frame is extended in the horizontal direction, the extension direction may also be leftward. Optionally, if the frame aspect ratio is equal to the target thumbnail aspect ratio, the third target frame may not be processed and may be directly used as the first target frame.

[0058] It should be noted that by first determining a minimum frame for surrounding the target area and then adjusting the minimum frame to obtain a first target frame having the same shape as the user's expected shape, the position of the first target frame can be determined efficiently and accurately.

[0059] In an optional embodiment, in the process of determining the border aspect ratio corresponding to the third target border, the target application can determine the screen coordinates corresponding to the vertices of the third target border, obtain the second screen coordinates, and then determine the border length and border width corresponding to the third target border based on the second screen coordinates, thereby determining the border aspect ratio based on the border length and border width.

[0060] Optionally, the target application can call the ArcGIS Runtime API For iOS related interfaces to determine Figure 3 The screen coordinates of the vertices of the third target border shown are used to obtain the second screen coordinates p1, p2, p3 and p4, so that the border length e_w and border width e_h of the third target border can be determined according to the second screen coordinates, and then the border aspect ratio e_w / e_h can be determined.

[0061] It should be noted that, by determining the frame aspect ratio based on the screen coordinates corresponding to the vertices of the third target frame, accurate determination of the frame aspect ratio is achieved.

[0062] In an optional embodiment, in the process of determining the second target border based on the target area and the first target border, the target application can determine the screen coordinates corresponding to the vertices of the first target border, obtain the third screen coordinates, and then determine the geographic coordinates corresponding to the third screen coordinates, thereby determining the second target border based on the geographic coordinates, the target area and the first target border.

[0063] Optionally, the target application can call the ArcGIS Runtime API For iOS related interfaces to determine Figure 4 The screen coordinates corresponding to the vertices of the first target frame shown are used to obtain the third screen coordinates p1, p2', p3, p4'. Afterwards, the target application can determine the geographic coordinates corresponding to the third screen coordinates based on the mapping relationship between the screen coordinates and the geographic coordinates.

[0064] Further, after determining the geographic coordinates corresponding to the third screen coordinates, the target application can call the relevant interface of ArcGIS Runtime API For iOS to reduce the target map based on the geographic coordinates corresponding to the third screen coordinates, so that the first target frame and the target area surrounded by it can be displayed in the display area of ​​the target screen, thereby using the reduced first target frame as the Figure 5 The second target border is shown.

[0065] It should be noted that by adjusting the first target frame based on the geographic coordinates corresponding to the first target frame, it is ensured that the target area surrounded by the first target frame can be completely displayed in the display area of ​​the target screen after adjustment.

[0066] In an optional embodiment, in the process of determining the screen coordinates corresponding to the vertices of the second target border to obtain the first screen coordinates, the target application can determine the geographic coordinates corresponding to the vertices of the second target border, and thus determine the screen coordinates corresponding to the vertices of the second target border based on the geographic coordinates corresponding to the vertices of the second target border to obtain the first screen coordinates.

[0067] Optionally, the target application can call the ArcGIS Runtime API For iOS related interfaces to determine Figure 5 The geographic coordinates corresponding to the vertices of the second target border shown are determined according to the mapping relationship between the new screen coordinates and the geographic coordinates, based on the geographic coordinates corresponding to the vertices of the second target border, to obtain the first screen coordinates p1', p3', p2" and p4".

[0068] It should be noted that, by determining the screen coordinates corresponding to the vertices of the second target border based on the geographic coordinates corresponding to the vertices of the second target border, the first screen coordinates are accurately determined.

[0069] In an optional embodiment, in the process of capturing the area enclosed by the second target border based on the first screen coordinates to obtain the target thumbnail, the target application can capture the display area of ​​the target screen to obtain the first image, and then crop the first image based on the first screen coordinates to obtain the second image, thereby adjusting the second image based on the target size to obtain the target thumbnail.

[0070] Optionally, after determining the first screen coordinates, the target application may take a screenshot of the display area of ​​the target screen to obtain a first image and store the first image. Afterwards, the target application may crop the first image based on the aforementioned first screen coordinates p1', p3', p2", and p4", to obtain a second image. Furthermore, since the shape of the second image is the same as the border shape preset by the user, but the size of the second image is not necessarily the same as the border size preset by the user (that is, the target size), the target application may scale the second image based on the target size to obtain a second image of the size expected by the user. Figure 6 Target thumbnail shown.

[0071] Optionally, when this embodiment is applied to a land surveying scenario, Figure 1 After the target area shown in FIG. 1 is processed according to the above method, the following can be obtained: Figure 7 The target thumbnail is shown. Figure 7 In , when the target application generates a target thumbnail, the target thumbnail can be displayed to the customer, and the corresponding application information can be displayed below the target thumbnail, such as Figure 7 The area information about the target area in the target thumbnail (such as Figure 7 area, perimeter), and related controls that can interact with the user, such as price calculation, plot information (such as Figure 7 Fill in the plot name, area, crop type), add photos, etc., and save controls.

[0072] It should be noted that by adjusting the second image in combination with the target size to obtain the target thumbnail, the thumbnail of the size desired by the user is effectively obtained.

[0073] It can be seen that the solution provided in the present application achieves the purpose of generating a corresponding target thumbnail based on the border of the map area selected to surround the target object, thereby achieving the technical effect of improving the efficiency of thumbnail generation, and further solving the technical problem of low thumbnail generation efficiency caused by the prior art relying on manual production of the selected map area into thumbnails.

[0074] Example 2

[0075] According to an embodiment of the present invention, an embodiment of an image generating device is provided, wherein: Figure 8 is a schematic diagram of an optional image generating device according to an embodiment of the present invention. Figure 8 As shown, the device comprises:

[0076] An acquisition module 801 is used to acquire a target area selected by a target object in a target map;

[0077] A first determination module 802 is used to determine a first target frame surrounding a target area;

[0078] A second determination module 803 is used to determine a second target frame based on the target area and the first target frame, wherein the area enclosed by the second target frame is smaller than or equal to the display area of ​​the target screen, and the target screen is used to display the target map;

[0079] A third determination module 804 is used to determine the screen coordinates corresponding to the vertices of the second target border to obtain the first screen coordinates;

[0080] The processing module 805 is used to intercept the area surrounded by the second target frame based on the first screen coordinates to obtain a target thumbnail.

[0081] It should be noted that the above-mentioned acquisition module 801, first determination module 802, second determination module 803, third determination module 804 and processing module 805 correspond to steps S101 to S105 in the above-mentioned embodiment, and the examples and application scenarios implemented by the five modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above-mentioned embodiment 1.

[0082] Optionally, the first determination module also includes: a first sub-determination module, used to determine a third target border, wherein the third target border is a minimum border used to enclose the target area; a second sub-determination module, used to determine a border aspect ratio corresponding to the third target border, wherein the border aspect ratio is determined based on the screen coordinates corresponding to the third target border; a third sub-determination module, used to determine the aspect ratio of the target thumbnail based on the target size, wherein the target size is used to determine the size of the target thumbnail; a first sub-processing module, used to extend the third target border in a first direction to obtain a first target border if the border aspect ratio is greater than the aspect ratio of the target thumbnail; and a second sub-processing module, used to extend the third target border in a second direction to obtain a first target border if the border aspect ratio is less than the aspect ratio of the target thumbnail, wherein the first direction is different from the second direction.

[0083] Optionally, the first sub-determination module includes: a fourth sub-determination module, used to determine the screen coordinates corresponding to the vertices of the third target border to obtain the second screen coordinates; a fifth sub-determination module, used to determine the border length and border width corresponding to the third target border based on the second screen coordinates; and a sixth sub-determination module, used to determine the border aspect ratio based on the border length and border width.

[0084] Optionally, the second determination module includes: a seventh sub-determination module, used to determine the screen coordinates corresponding to the vertices of the first target border to obtain a third screen coordinate; an eighth sub-determination module, used to determine the geographic coordinates corresponding to the third screen coordinates; and a ninth sub-determination module, used to determine the second target border based on the geographic coordinates, the target area and the first target border.

[0085] Optionally, the third determination module includes: a tenth sub-determination module, used to determine the geographic coordinates corresponding to the vertices of the second target border; an eleventh sub-determination module, used to determine the screen coordinates corresponding to the vertices of the second target border based on the geographic coordinates corresponding to the vertices of the second target border, to obtain the first screen coordinates.

[0086] Optionally, the processing module includes: a capture module, used to capture the display area of ​​the target screen to obtain a first image; a cropping module, used to crop the first image based on the first screen coordinates to obtain a second image; and an adjustment module, used to adjust the second image based on the target size to obtain a target thumbnail.

[0087] Example 3

[0088] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned image generating method when running.

[0089] Example 4

[0090] According to another aspect of an embodiment of the present invention, there is also provided an electronic device, wherein: Fig. 9 is a schematic diagram of an optional electronic device according to an embodiment of the present invention, such as Fig. 9 As shown, the electronic device includes one or more processors; a memory for storing one or more programs, which, when the one or more programs are executed by the one or more processors, enables the one or more processors to run the programs, wherein the programs are configured to execute the above-mentioned image generation method when running.

[0091] Example 5

[0092] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program / instruction, and when the computer program / instruction is executed by a processor, the above-mentioned image generating method is implemented.

[0093] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0094] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0095] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0096] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0097] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0098] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0099] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for generating an image, It is characterized in that include: Obtain the target area selected by the target object in the target map; Determine a first target frame surrounding the target area; Determine a second target frame based on the target area and the first target frame, wherein the area enclosed by the second target frame is smaller than or equal to the display area of ​​a target screen, and the target screen is used to display the target map; Determine the screen coordinates corresponding to the vertices of the second target border to obtain the first screen coordinates; Based on the first screen coordinates, intercept the area surrounded by the second target frame to obtain a target thumbnail; Determining a first target frame surrounding the target area includes: determining a third target frame, wherein the third target frame is a minimum frame for surrounding the target area; determining a frame aspect ratio corresponding to the third target frame, wherein the frame aspect ratio is determined based on screen coordinates corresponding to the third target frame; determining an aspect ratio of the target thumbnail based on a target size, wherein the target size is used to determine the size of the target thumbnail, and the target size is a frame size preset by a user; if the frame aspect ratio is greater than the aspect ratio of the target thumbnail, extending the third target frame in a first direction to obtain the first target frame; if the frame aspect ratio is less than the aspect ratio of the target thumbnail, extending the third target frame in a second direction to obtain the first target frame, wherein the first direction is different from the second direction; Determining a second target frame based on the target area and the first target frame includes: determining screen coordinates corresponding to vertices of the first target frame to obtain third screen coordinates; determining geographic coordinates corresponding to the third screen coordinates; determining the second target frame based on the geographic coordinates, the target area, and the first target frame, wherein the second target frame is the first target frame after being reduced; Determining the geographic coordinates corresponding to the third screen coordinates includes: determining the geographic coordinates corresponding to the third screen coordinates based on a mapping relationship between screen coordinates and geographic coordinates.

2. The method according to claim 1, It is characterized in that Determining the frame aspect ratio corresponding to the third target frame includes: Determine the screen coordinates corresponding to the vertices of the third target border to obtain second screen coordinates; Determine the frame length and frame width corresponding to the third target frame based on the second screen coordinates; The border aspect ratio is determined based on the border length and the border width.

3. The method according to claim 1, It is characterized in that Determining the screen coordinates corresponding to the vertices of the second target border to obtain the first screen coordinates includes: Determining geographic coordinates corresponding to vertices of the second target bounding box; Based on the geographic coordinates corresponding to the vertices of the second target border, the screen coordinates corresponding to the vertices of the second target border are determined to obtain the first screen coordinates.

4. The method according to claim 1, It is characterized in that Based on the first screen coordinates, an area surrounded by the second target frame is intercepted to obtain a target thumbnail, including: Intercepting a display area of ​​the target screen to obtain a first image; Cropping the first image based on the first screen coordinates to obtain a second image; The second image is adjusted based on the target size to obtain the target thumbnail.

5. An image generating device, It is characterized in that include: An acquisition module, used for acquiring a target area selected by a target object in a target map; A first determining module, used to determine a first target frame surrounding the target area; A second determination module is used to determine a second target frame based on the target area and the first target frame, wherein the area enclosed by the second target frame is smaller than or equal to the display area of ​​a target screen, and the target screen is used to display the target map; A third determination module, used to determine the screen coordinates corresponding to the vertices of the second target border to obtain the first screen coordinates; A processing module, configured to intercept the area surrounded by the second target frame based on the first screen coordinates to obtain a target thumbnail; The first determination module further includes: a first sub-determination module, configured to determine a first target frame surrounding the target area, including: determining a third target frame, wherein the third target frame is a minimum frame for surrounding the target area; A second sub-determination module is used to determine a frame length-width ratio corresponding to the third target frame, wherein the frame length-width ratio is determined based on the screen coordinates corresponding to the third target frame; a third sub-determination module, configured to determine the aspect ratio of the target thumbnail based on a target size, wherein the target size is used to determine the size of the target thumbnail; A first sub-processing module, configured to extend the third target frame in a first direction to obtain the first target frame if the frame aspect ratio is greater than the target thumbnail aspect ratio; A second sub-processing module, configured to extend the third target frame in a second direction to obtain the first target frame if the frame aspect ratio is smaller than the target thumbnail aspect ratio, wherein the first direction is different from the second direction; The second determination module includes: a seventh sub-determination module, configured to determine the screen coordinates corresponding to the vertices of the first target border to obtain a third screen coordinate; an eighth sub-determination module, configured to determine the geographic coordinates corresponding to the third screen coordinates; and a ninth sub-determination module, configured to determine the second target border based on the geographic coordinates, the target area, and the first target border, wherein the second target border is the first target border after being reduced; Determining the geographic coordinates corresponding to the third screen coordinates includes: determining the geographic coordinates corresponding to the third screen coordinates based on a mapping relationship between screen coordinates and geographic coordinates.

6. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the image generating method described in any one of claims 1 to 4 when executed.

7. An electronic device, It is characterized in that The electronic device includes one or more processors; A memory for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to run the programs, wherein the programs are configured to execute the image generation method described in any one of claims 1 to 4 when run.

8. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instructions are executed by a processor, the image generation method according to any one of claims 1 to 4 is implemented.