Image processing method and device
By generating a second image associated with the original screenshot, the problem that users cannot view more detailed road details or wider map areas is solved, and a convenient map browsing experience is achieved.
Patent Information
- Application Number
- CN202210058534.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-18
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2042-01-18
AI Technical Summary
In the prior art, users cannot view more detailed road details or wider map areas through screenshots, and the operation is cumbersome, so they need to reopen the map application for navigation.
Provided a picture processing method and device, by receiving a user's enlargement or reduction input, generate a second picture associated with the original screenshot, displaying more detailed road details or wider areas, including generating a first association picture and a second association Image and replace the original screenshot area when user inputs.
It enables users to easily view more local map details or global map routes when viewing screenshots, making the operation more convenient and avoids the cumbersome process of reopening the map application.
Smart Images

Figure CN114491309B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of image processing technology, and specifically relates to an image processing method and an image processing device. Background Art
[0002] When traveling, users often use map applications for navigation. For example, users can first enter the map application to query the route and save a screenshot of the route. In this way, users can view the entire route map without opening the map application while traveling.
[0003] In the related art, when viewing a screenshot, the user can only zoom in on the original image, and cannot view more detailed and rich road details or browse a wider map area. If the user needs more detailed and rich road details or browse a wider map area, he can only open the map application, re-initiate navigation, and then view more road details in the map application, which is cumbersome. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method and device for image processing, which can solve the problem that users cannot view more detailed content or browse a wider area when zooming in on a screenshot.
[0005] In a first aspect, an embodiment of the present application provides a method for processing an image, the method comprising:
[0006] receiving a first input from a user on a first picture, wherein the first input is used to zoom in or out at least a portion of the first picture;
[0007] In response to the first input, if the first picture includes an associated picture, generating a second picture according to the associated picture and the first picture and displaying the second picture;
[0008] Alternatively, when the first picture does not include any associated pictures, the first picture is enlarged or reduced according to the input parameters of the first input.
[0009] In a second aspect, an embodiment of the present application provides a picture processing device, the device comprising:
[0010] A receiving module, configured to receive a first input from a user on a first picture, wherein the first input is used to zoom in or out at least a portion of the first picture;
[0011] a generating module, configured to generate, in response to the first input, a second picture according to the associated picture and the first picture when the first picture includes an associated picture;
[0012] A display module, used for displaying the second picture;
[0013] The control module is used to enlarge or reduce the first picture according to the input parameters of the first input when the first picture does not include the associated picture.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0015] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0016] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0017] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0018] In an embodiment of the present application, when the electronic device receives a user input to zoom in or out of at least part of a first image, it will generate and display a second image based on the associated image and the first image when the first image includes an associated image. Therefore, when the user zooms in or out of the first image, more local map details or global map routes can be viewed through the generated second image, and the operation is more convenient. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 is a flowchart of the image processing method provided in an embodiment of the present application;
[0020] Figure 2 This is one of the display interface schematic diagrams of the electronic device provided in the embodiment of the present application;
[0021] Figure 3a This is the second schematic diagram of the display interface of the electronic device provided in the embodiment of the present application;
[0022] Figure 3b This is the third schematic diagram of the display interface of the electronic device provided in the embodiment of the present application;
[0023] Figure 4 This is the fourth schematic diagram of the display interface of the electronic device provided in the embodiment of the present application;
[0024] Figure 5 This is the fifth schematic diagram of the display interface of the electronic device provided in the embodiment of the present application;
[0025] Figure 6 is a flowchart of an example of a picture processing method provided by this application;
[0026] Figure 7 is a flowchart of another example of a picture processing method provided by the present application;
[0027] Figure 8 is a flow chart of a picture processing device provided in an embodiment of the present application;
[0028] Fig. 9 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0029] Fig.10 It is a structural schematic diagram of an electronic device provided in another embodiment of the present application. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0031] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0032] The image processing method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0033] Please see Figure 1 , which is a flow chart of a picture processing method provided in an embodiment of the present application. The method can be applied to an electronic device, which can be a mobile phone, a tablet computer, a laptop computer, etc. Figure 1 As shown, the method may include steps 1100 to 1300, which are described in detail below.
[0034] Step 1100: Receive a first input from a user on a first picture, where the first input is used to zoom in or out at least a portion of the first picture.
[0035] In an optional embodiment, the first picture is a screenshot picture generated by taking a screenshot of the first interface displayed on the display screen of the electronic device, and the first picture is located in the album. For example, the display screen of the electronic device displays the first interface of the user navigating through a map application, and the first interface includes the navigation route of the user navigating through the map application, then the first picture is a screenshot picture including the navigation route, and when the network condition is not good during the user's travel, the user can zoom in or out the first picture for viewing.
[0036] It is understandable that the first input may be an input for at least partially enlarging the first image, for example, the first input may be an input for swiping apart the first image with the thumb and index finger. The first input may also be an input for at least partially reducing the first image, for example, the first input may be an input for bringing the first image together with the thumb and index finger.
[0037] In this embodiment, the image processing method of the embodiment of the present disclosure further includes the following steps 2100 to 2300:
[0038] Step 2100: When the first interface is displayed, receive a second input from the user, where the second input is used to take a screenshot of the first interface.
[0039] The second input is a screenshot input for taking a screenshot of the first interface. In this embodiment, the user can trigger the second input by means of a physical combination key, a status bar shortcut key, a first interface shortcut function button, etc.
[0040] Step 2200, generating the first picture in response to the second input.
[0041] In this step 2200, when the electronic device receives the screenshot input of the user to the first interface, it can generate the first picture in response to the screenshot input of the user to the first interface. For example, the user can trigger the screenshot input through the above physical combination key, status bar shortcut key, display interface shortcut function button, etc. to control the electronic device to take a screenshot and generate the first picture.
[0042] For example, after the user enters the starting location "Station A" and the end location "Station C" through the search control of the map application and clicks search, the map application can provide a navigation route of the starting location "Station A" and the end location "Station C". Here, the user can input a control instruction through the physical combination key of the electronic device to control the electronic device to take a screenshot, thereby generating a first picture containing the navigation route. The first picture can be Figure 2shown.
[0043] Step 2300: When the first picture meets a preset condition, generate an associated picture associated with the first picture.
[0044] In this embodiment, when the electronic device generates the first picture, it also detects whether the first picture meets the preset condition, and generates an associated picture associated with the first picture if the first picture meets the preset condition. The associated picture can be Figure 3a and Figure 3b The picture shown, and the associated picture is stored in the electronic device in the form of a hidden file, that is, the associated picture is not displayed in the electronic device to prevent the user from directly browsing the associated picture.
[0045] It is understandable that the first area of the first picture corresponds to the second area of the associated picture. The first area of the first picture is the area where the navigation route is located, and the second area of the associated picture is also the area where the navigation route is located, that is, the range of the map indicated by the first area of the first picture and the second area of the second picture is the same.
[0046] For example, Figure 2 The square area formed by the upper left point A, the lower right point B, the lower left point C and the lower right point D in the first picture shown, that is, the navigation route area of "Station A" and the terminal location "Station C", is the first area. Figure 3a The square area formed by the upper left corner point A1, the upper right corner point B1, the lower left corner point C1 and the lower right corner point D1 in the associated picture shown, that is, the navigation route area of "Station A" and the terminal location "Station C", is the second area. Figure 3b The square area formed by the upper left corner point A2, the upper right corner point B2, the lower left corner point C2 and the lower right corner point D2 in the associated picture, that is, the navigation route area of "Station A" and the end point "Station C" is the second area. Figure 2 and Figure 3a It can be seen that the range of the map indicated by the first area of the first image and the second area of the associated image is the same. For example, the leftmost boundary of the first area is 200m behind Station C, and the rightmost boundary of the first area is 500m behind Station A. Then the leftmost boundary of the second area is also 200m behind Station C, and the rightmost boundary of the second area is also 500m behind Station A. Figure 2 and Figure 3b It can be seen that the range of the map indicated by the first area of the first picture and the second area of the associated picture is also the same.
[0047] In an optional embodiment, the associated picture may include a first associated picture and a second associated picture, and the first picture, the first associated picture, and the second associated picture all include first elements. The number of first elements in the first associated picture is greater than the number of first elements in the first picture, and the number of first elements in the second associated picture is less than the number of first elements in the first picture. As in the above example, the first associated picture may be Figure 3a The associated picture shown, the second associated picture can be Figure 3b Associated images shown.
[0048] The above first element may be an element set according to actual application scenarios and actual needs. For example, for the first picture including a subway navigation route, the first element may be a subway station on the subway navigation route, and the number of first elements in the first picture may be the number of subway stations on the subway navigation route in the first picture. Then the number of first elements in the first associated picture may be the number of subway stations on the subway navigation route in the first associated picture. The number of first elements in the second associated picture may be the number of subway stations on the subway navigation route in the second associated picture.
[0049] For example, Figure 2 The subway stations on the subway navigation route in the first picture include "Station A", "Station B" and "Station C", so the number of the first element in the first picture is 3. Similarly, it can be seen that Figure 3a The number of first elements in the first associated picture shown is 11, Figure 3b The number of first elements in the second associated picture shown is 2.
[0050] In this embodiment, in this step 2300, when the first image meets the preset conditions, generating an associated image associated with the first image may further include: when the number of first elements in the first image is a first number, performing a target operation, the target operation including at least one of the following: zooming in on the first interface to generate a first associated image, and zooming out on the first interface to generate a second associated image; wherein the number of first elements in the first associated image is greater than the first number, and the number of first elements in the second associated image is less than the first number.
[0051] In an optional embodiment, whether the electronic device performs one or two of the target operations is related to the size of the first quantity. For example, when the first quantity is within the first range, both the first associated picture and the second associated picture can be generated. For another example, when the first quantity is within the second range, only the first associated picture can be generated. For another example, when the first quantity is within the third range, only the second associated picture can be generated. In addition, the above first range, second range and third range do not overlap, specifically, the minimum value of the second range is greater than the maximum value of the first range, and the minimum value of the third range is less than the maximum value of the second range. In addition, the first range, the second range and the third range can be values set according to actual application scenarios and actual needs.
[0052] It can be understood that when the number of first elements in the first picture is small, only the first associated picture can be generated; when the number of first elements in the first picture is large, only the second associated picture can be generated; when the number of first elements in the first picture is moderate, both the first associated picture and the second associated picture can be generated.
[0053] Specifically, when generating the first picture, the electronic device will also detect the number of first elements in the first picture, and when the number of first elements in the first picture is within a first range, it will enlarge the first interface to generate a first associated picture, and reduce the first interface to generate a second associated picture.
[0054] Exemplarily, the electronic device generates Figure 2 In the case of the first picture shown in FIG. 1 , when it is detected that the number of first elements in the first picture is 3 (the number 3 is within the first range), the first interface is enlarged to generate a first associated picture, and the first interface is reduced to generate a second picture. The first associated picture can be as follows Figure 3a The first associated picture includes the second area, and the first associated picture includes more road details, that is, including "Station A", "Station B", "Station C", "Station A1", "Station A2", "Station A3", "Station A4", "Station A5", "Station B1", "Station B2", "Station B3", that is, the number of first elements in the first associated picture is 11, which is greater than the first number 3. The second associated picture can be as follows Figure 3b As shown in the associated picture, the second associated picture includes a second area, and the second associated picture involves a wider area range, for example, a panoramic view of "Station C". At the same time, the number of first elements in the second associated picture is 2, which is less than the first number 3.
[0055] It is understandable that after generating the first picture and the associated picture, the electronic device will also write the coordinate mapping relationship between the first picture and the associated picture into the attribute information of the first picture.
[0056] For example, Figure 2 and Figure 3a As shown, the coordinates of the first area of the first image, i.e., the coordinates of the upper left corner point A, the coordinates of the upper right corner point B, the coordinates of the lower left corner point C, and the coordinates of the lower right corner point D, and the coordinates of the second area of the first associated image, i.e., the coordinates of the upper left corner point A1, the coordinates of the upper right corner point B1, the coordinates of the lower left corner point C1, and the coordinates of the lower right corner point D1 are recorded, and a mapping relationship between point A and point A1, point B and point B1, point C and point C1, and point D and point D is established. It can be understood that the range of the map pointed to by the box area composed of the upper left corner A, the upper right corner B, the lower left corner C, and the lower right corner D and the box area composed of the upper left corner A1, the upper right corner B1, the lower left corner C1, and the lower right corner D1 is the same, except that the scale in the map interface is different, resulting in a certain difference in the area of the box area.
[0057] Similarly, for example, Figure 2 and Figure 3b As shown, the coordinates of the first area of the first image, i.e., the coordinates of the upper left corner point A, the coordinates of the upper right corner point B, the coordinates of the lower left corner point C, and the coordinates of the lower right corner point D, and the coordinates of the second area of the second associated image, i.e., the coordinates of the upper left corner point A2, the coordinates of the upper right corner point B2, the coordinates of the lower left corner point C2, and the coordinates of the lower right corner point D2 are recorded, and a mapping relationship between point A and point A2, point B and point B2, point C and point C2, and point D and point D2 is established. It can be understood that the range of the map pointed to by the box area composed of the upper left corner A, the lower left corner B, the upper right corner C, and the lower right corner D and the box area composed of the upper left corner A2, the upper right corner B2, the lower left corner C2, and the lower right corner D2 is the same, except that the scale in the map interface is different, resulting in a certain difference in the area of the box area.
[0058] According to the above steps 2100 to 2300, when the user initiates a screenshot, the electronic device will not only generate the current screenshot image, but will also enlarge the first interface to generate a first associated image, and shrink the first interface to generate a second associated image, so that more detailed and rich road details can be viewed through the first associated image and the second associated image, or a wider map area can be browsed.
[0059] After receiving a first input of a first picture from a user, the method further includes:
[0060] Step 1200: In response to the first input, when the first picture includes an associated picture, generate a second picture according to the associated picture and the first picture, and display the second picture.
[0061] In an optional embodiment, in step 1200, generating a second picture according to the associated picture and the first picture and displaying the second picture may further include the following steps 1210a to 1230a:
[0062] Step 1210a, obtaining a first area of the first image and a second area of an associated image; wherein the first area corresponds to the second area.
[0063] Example 1, when the first input is Figure 2 In the case of an input of at least a portion of the first image shown in FIG. Figure 2 The first area of the first picture shown is replaced by Figure 3a The second area of the first associated picture is shown. Figure 2 The square area formed by the upper left corner point A, the upper right corner point B, the lower left corner point C, and the lower right corner point D of the first picture is the first area. Figure 3a The square area formed by the upper left corner A1, the upper right corner B1, the lower left corner C1 and the lower right corner D1 of the first associated image is the second area, in which the electronic device will obtain Figure 2 The first area of the first picture shown and Figure 3a A second area of the first associated picture is shown.
[0064] Example 2, when the first input is Figure 2 In the case of at least a partially reduced input of the first picture shown, the electronic device will Figure 1 The first area of the first picture shown is replaced by Figure 3b The second area of the second associated picture is shown. Figure 2 The square area formed by the upper left corner point A, the upper right corner point B, the lower left corner point C, and the lower right corner point D of the first picture is the first area. Figure 3b The box area formed by the upper left corner point A2, the upper right corner point B2, the lower left corner point C2 and the lower right corner point D2 in the second associated picture is the second area, in which the electronic device will obtain Figure 2 The first area of the first picture shown and Figure 3b A second area of the second associated picture is shown.
[0065] Step 1220a: Replace the first area of the first image with the second area to generate the second image.
[0066] In this step 1220a, after acquiring the first area of the first image and the second area of the associated image, the electronic device replaces the first area with the second area to generate the second image.
[0067] It can be understood that according to the above analysis, the first area and the second area have different scales, which will result in different areas indicating the same map range. Here, when replacing the first area with the second area, the size corresponding to the second area can be enlarged or reduced to a certain extent so that the size corresponding to the adjusted second area matches the image size corresponding to the first area. In this way, the adjusted second area can be fully combined with other areas in the first image (areas other than the first area) to form a new second image.
[0068] Continuing with the above example 1, the electronic device obtains Figure 2 The first area of the first picture shown and Figure 3a After the second area of the associated image is shown, you can Figure 2 The first area of the first picture shown is replaced by Figure 3a The second area of the associated picture is shown as follows Figure 4 The second picture shown includes more road details.
[0069] Continuing with the above example 2, the electronic device obtains Figure 2 The first area of the first picture shown and Figure 3b After the second area of the associated image is shown, you can Figure 2 The first area of the first picture shown is replaced by Figure 3b The second area of the associated picture shown is obtained Figure 5 The second picture shown includes a wider map area.
[0070] Step 1230a, display the second picture.
[0071] In this embodiment, after the second image is generated, the second image can be displayed on the display screen of the electronic device.
[0072] According to the above steps 1210a to 1230a, the first area of the first image and the second area of the associated image will be obtained. Since the first area and the second area correspond to each other, the first area of the first image can be replaced by the second area to generate a second image, and then more local map details can be viewed through the second image, or the global map route can be viewed, and the operation is more convenient.
[0073] In an optional embodiment, the associated picture includes the above first associated picture and the above second associated picture. As described above, the first picture, the first associated picture, and the second associated picture all include the first element. Moreover, the number of first elements in the first associated picture is greater than the number of first elements in the first picture, and the number of first elements in the second associated picture is less than the number of first elements in the first picture. In this step 1200, generating the second picture and displaying the second picture according to the associated picture and the first picture may further include the following steps 1210b to 1220b:
[0074] Step 1210b, when the first input is an input that at least partially enlarges the first image, the second image is generated based on the first associated image and the first image, or, when the first input is an input that at least partially reduces the first image, the second image is generated based on the second associated image and the first image.
[0075] In this step 1210b, since the associated pictures include the first associated pictures and the second associated pictures, the electronic device will first determine whether to generate the second picture in combination with the first associated picture or the second associated picture based on the user's first input, and then generate the second picture based on the selected first associated picture or the second associated picture.
[0076] Example 1: When a user wants to Figure 1 When viewing more subway stations on the subway navigation route from the first picture shown, an input of at least partially enlarging the first picture is implemented, such as a swiping input implemented by the user's thumb and index finger. Figure 3a The number of first elements of the first associated picture shown is greater than Figure 1 The number of first elements of the first picture shown, therefore, the electronic device generates a second picture according to the first picture and the first associated picture. Figure 1 The first area of the first picture shown is replaced by Figure 3a The second area of the first associated picture is obtained Figure 4 The second picture shown, through which more subway stations can be viewed.
[0077] Example 2: When the user wants to Figure 1 When the first image shown in the figure is used to view a wider map area, an input for at least partially zooming out of the first image is implemented, such as a pinching input implemented by the user's thumb and index finger. When the electronic device receives the input for at least partially zooming out of the first image from the user, due to Figure 3b The number of first elements of the second associated picture shown is less than Figure 1The number of first elements of the first picture shown, therefore, the electronic device generates a second picture according to the first picture and the second associated picture. Figure 1 The first area of the first picture shown is replaced by Figure 3b The second area of the second associated picture shown is obtained Figure 5 The second picture shown allows a wider map area to be viewed.
[0078] Step 1220b, display the second picture.
[0079] In this step 1220b, after the second image is generated, the second image can be displayed on the display screen of the electronic device.
[0080] According to the above steps 1210b to 1220b, when the first input is an input for at least partially enlarging the first image, the electronic device will generate a second image based on the first associated image and the first image. Since the first associated image is an image generated by enlarging the first interface, when the user zooms in on the first image, more detailed route information can be viewed through the generated second image. When the first input is an input for at least partially reducing the first image, the electronic device will generate a second image based on the second associated image and the first image. Since the second associated image is an image generated by reducing the first interface, when the user zooms out on the first image, a wider map area can be viewed through the generated second image.
[0081] Step 1300: When the first picture does not include any associated pictures, the first picture is enlarged or reduced according to the input parameters of the first input.
[0082] In this embodiment, when the first picture does not include any associated pictures, the first picture can be directly enlarged or reduced according to the input parameters of the first input.
[0083] For example, when the first input is an input for at least partially enlarging the first picture, when the first picture does not include an associated picture, the electronic device can obtain the magnification factor of the first input and enlarge the first picture according to the magnification factor.
[0084] For another example, when the first input is an input of at least partially reducing the first picture, when the first picture does not include an associated picture, the electronic device can obtain the reduction factor of the first input and reduce the first picture according to the reduction factor.
[0085] According to an embodiment of the present application, when an electronic device receives a user input to zoom in or out at least partially on a first image, when the first image includes an associated image, a second image is generated and displayed based on the associated image and the first image. Thus, when the user zooms in or out on the first image, more local map details or global map routes can be viewed through the generated second image, making the operation more convenient.
[0086] Next, we will take the map application as an example to illustrate an example of image processing method. Figure 6 and Figure 7 As shown, the image processing method includes the following steps:
[0087] Step 601: When the first interface is displayed, receiving a screenshot input of the navigation interface by the user.
[0088] Step 602: Generate a first picture in response to a user's screen capture input of a navigation interface.
[0089] Step 603, obtaining the number of first elements in the first picture.
[0090] Step 604 , when the number of the first elements is within the first range, the navigation interface is enlarged to generate a first associated picture, and the navigation interface is reduced to generate a second associated picture.
[0091] Step 605: When the number of the first elements is within a second range, the navigation interface is reduced to generate a second associated picture.
[0092] Step 606: When the number of the first elements is within a third range, enlarge the navigation interface to generate a first associated picture.
[0093] Step 607: Write the coordinate mapping relationship between the first area of the first image and the second area of the associated image into the attribute information of the first image.
[0094] Step 701: Receive a first input of a first picture from a user.
[0095] Step 702 , when the first input is an input of at least a portion of the first image being enlarged, detect whether the first image includes a first associated image, if so, execute step 703 , otherwise, execute step 704 .
[0096] Step 703, when the first picture includes the first associated picture, load the corresponding first associated picture according to the coordinate mapping relationship, replace the first area of the first picture with the second area of the first associated picture, obtain and display the second picture, and the process ends.
[0097] Step 704: if the first picture does not include the first associated picture, the first picture is enlarged according to the first input magnification factor, and the process ends.
[0098] Step 705 , when the first input is at least a partially reduced input of the first image, detect whether the first image includes the second associated image, if yes, execute step 706 , otherwise execute step 707 .
[0099] Step 706, when the first image includes a second associated image, load the corresponding second associated image according to the coordinate mapping relationship, replace the first area of the first image with the second area of the second associated image, obtain the second image, display the second image, and the process ends.
[0100] Step 707, when the first picture does not include the second associated picture, the first picture is reduced according to the first input reduction factor, and the process ends.
[0101] The picture processing method provided in the embodiment of the present application can be executed by a picture processing device. In the embodiment of the present application, a picture processing method executed by a picture processing device is taken as an example to illustrate the picture processing device provided in the embodiment of the present application.
[0102] Corresponding to the above embodiment, see Figure 8 The embodiment of the present application also provides a picture processing device 800, which includes a receiving module 810, a generating module 820, a display module 830 and a control module 840.
[0103] The receiving module 810 is used to receive a first input from a user on a first picture, where the first input is used to zoom in or out at least a portion of the first picture.
[0104] The generating module 820 is configured to generate, in response to the first input, a second picture according to the associated picture and the first picture when the first picture includes an associated picture.
[0105] The display module 830 is configured to display the second picture.
[0106] The control module 840 is configured to, when the first picture does not include any associated pictures, enlarge or reduce the first picture according to the input parameters of the first input.
[0107] In one embodiment, the generating module 820 is specifically used to: obtain a first area of the first image and a second area of the associated image; wherein the first area corresponds to the second area; and replace the first area of the first image with the second area to generate the second image.
[0108] The display module is specifically used for:
[0109] The second picture is displayed.
[0110] In one embodiment, the associated pictures include a first associated picture and a second associated picture, and the first picture, the first associated picture, and the second associated picture all include a first element.
[0111] The generation module 820 is specifically used to: generate the second image according to the first associated image and the first image when the first input is an input that at least partially enlarges the first image, or generate the second image according to the second associated image and the first image when the first input is an input that at least partially reduces the first image, wherein the number of the first elements in the first associated image is greater than the number of the first elements in the first image, and the number of the first elements in the second associated image is less than the number of the first elements in the first image.
[0112] The display module 830 is specifically configured to display the second image.
[0113] In one embodiment, the receiving module 810 is further used to receive a second input from the user when the first interface is displayed, where the second input is used to take a screenshot of the first interface.
[0114] The generating module 820 is further configured to generate the first image in response to the second input; and, when the first image satisfies a preset condition, generate an associated image associated with the first image.
[0115] The first area in the first picture corresponds to the second area in the associated picture.
[0116] In one embodiment, the associated pictures include a first associated picture and a second associated picture.
[0117] The generating module 820 is specifically used to: when the number of first elements in the first picture is a first number, perform a target operation, and the target operation includes at least one of the following: enlarging the first interface to generate a first associated picture, and reducing the first interface to generate a second associated picture.
[0118] The number of the first elements in the first associated picture is greater than a first number, and the number of the first elements in the second associated picture is less than the first number.
[0119] According to an embodiment of the present disclosure, when an electronic device receives a user input to zoom in or out at least partially on a first picture, it will generate and display a second picture based on the associated picture and the first picture when the first picture includes an associated picture. Thus, when the user zooms in or out on the first picture, more local map details or global map routes can be viewed through the generated second picture, and the operation is more convenient.
[0120] The image processing device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0121] The image processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0122] The image processing device provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0123] Alternatively, if Fig. 9 As shown, an embodiment of the present application further provides an electronic device 900, including a processor 901 and a memory 902, wherein the memory 902 stores programs or instructions that can be executed on the processor 901, and when the program or instructions are executed by the processor 901, the various steps of the above-mentioned image processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0124] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0125] Fig.10 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0126] The electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010 and other components.
[0127] Those skilled in the art will appreciate that the electronic device 1000 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1000 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.10 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0128] Among them, processor 1010 is used to receive a first input from a user on a first picture, and the first input is used to enlarge or reduce at least a portion of the first picture; in response to the first input, when the first picture includes an associated picture, a second picture is generated and displayed based on the associated picture and the first picture; or, when the first picture does not include an associated picture, the first picture is enlarged or reduced according to input parameters of the first input.
[0129] According to an embodiment of the present disclosure, when an electronic device receives a user input to zoom in or out at least partially on a first picture, it will generate and display a second picture based on the associated picture and the first picture when the first picture includes an associated picture. Thus, when the user zooms in or out on the first picture, more local map details or global map routes can be viewed through the generated second picture, and the operation is more convenient.
[0130] Optionally, the processor 1010 is further used to obtain a first area of the first image and a second area of the associated image; wherein the first area corresponds to the second area; replace the first area of the first image with the second area to generate the second image; and display the second image.
[0131] Optionally, the associated pictures include a first associated picture and a second associated picture, and the first picture, the first associated picture, and the second associated picture all include the first element. The processor 1010 is further configured to generate the second picture according to the first associated picture and the first picture when the first input is an input of at least partially enlarging the first picture, or generate the second picture according to the second associated picture and the first picture when the first input is an input of at least partially reducing the first picture, wherein the number of the first elements in the first associated picture is greater than the number of the first elements in the first picture, and the number of the first elements in the second associated picture is less than the number of the first elements in the first picture; and display the second picture.
[0132] Optionally, processor 1010 is further used to receive a second input from a user when the first interface is displayed, the second input being used to take a screenshot of the first interface; generate the first image in response to the second input; and generate an associated image associated with the first image when the first image meets a preset condition; wherein the first area in the first image corresponds to the second area in the associated image.
[0133] Optionally, the associated picture includes a first associated picture and a second associated picture. The processor 1010 is further configured to, when the number of first elements in the first picture is a first number, perform a target operation, wherein the target operation includes at least one of the following: zooming in on the first interface to generate a first associated picture, zooming out on the first interface to generate a second associated picture; wherein the number of the first elements in the first associated picture is greater than the first number, and the number of the first elements in the second associated picture is less than the first number.
[0134] It should be understood that in the embodiment of the present application, the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 11041 and a microphone 10042, and the graphics processor 10041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0135] The memory 1009 can be used to store software programs and various data. The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0136] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1010.
[0137] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned image processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0138] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0139] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned image processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0140] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0141] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned image processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0142] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0143] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0144] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A method for processing an image, characterized in that: The method comprises: receiving a first input from a user on a first picture, wherein the first input is used to zoom in or out at least a portion of the first picture; In response to the first input, if the first picture includes an associated picture, generating a second picture according to the associated picture and the first picture and displaying the second picture; Alternatively, when the first picture does not include any associated pictures, the first picture is enlarged or reduced according to the input parameters of the first input; The associated pictures include a first associated picture and a second associated picture, and the first picture, the first associated picture and the second associated picture all include a first element. The step of generating a second picture according to the associated picture and the first picture and displaying the second picture includes: When the first input is an input of at least partially enlarging the first picture, the second picture is generated according to the first associated picture and the first picture; or, when the first input is an input of at least partially reducing the first picture, the second picture is generated according to the second associated picture and the first picture, wherein the number of the first elements in the first associated picture is greater than the number of the first elements in the first picture, and the number of the first elements in the second associated picture is less than the number of the first elements in the first picture; The second picture is displayed.
2. The method according to claim 1, characterized in that The step of generating a second picture according to the associated picture and the first picture and displaying the second picture includes: Acquire a first area of the first image and a second area of the associated image; wherein the first area corresponds to the second area; replacing a first region of the first image with a second region to generate the second image; The second picture is displayed.
3. The method according to claim 1, characterized in that: Before receiving a first input of a first picture from a user, the method further comprises: When the first interface is displayed, receiving a second input from the user, where the second input is used to take a screenshot of the first interface; In response to the second input, generating the first picture; When the first picture meets a preset condition, generating an associated picture associated with the first picture; The first area in the first picture corresponds to the second area in the associated picture.
4. The method according to claim 3, characterized in that The associated pictures include a first associated picture and a second associated picture. The step of generating an associated picture associated with the first picture when the first picture satisfies a preset condition includes: When the number of first elements in the first picture is a first number, performing a target operation, the target operation comprising at least one of the following: enlarging the first interface to generate a first associated picture, and reducing the first interface to generate a second associated picture; The number of the first elements in the first associated picture is greater than the first number, and the number of the first elements in the second associated picture is less than the first number.
5. A picture processing device, characterized in that: The device comprises: A receiving module, configured to receive a first input from a user on a first picture, wherein the first input is used to zoom in or out at least a portion of the first picture; a generating module, configured to generate, in response to the first input, a second picture according to the associated picture and the first picture when the first picture includes an associated picture; A display module, used for displaying the second picture; a control module, configured to, when the first picture does not include any associated pictures, enlarge or reduce the first picture according to input parameters of the first input; The associated pictures include a first associated picture and a second associated picture, and the first picture, the first associated picture and the second associated picture all include a first element. The generating module is specifically configured to: generate the second image according to the first associated image and the first image when the first input is an input of at least partially enlarging the first image, or generate the second image according to the second associated image and the first image when the first input is an input of at least partially reducing the first image, wherein the number of the first elements in the first associated image is greater than the number of the first elements in the first image, and the number of the first elements in the second associated image is less than the number of the first elements in the first image; The display module is specifically used to display the second picture.
6. The device according to claim 5, characterized in that The generation module is specifically used for: Acquire a first area of the first image and a second area of the associated image; wherein the first area corresponds to the second area; replacing a first region of the first image with a second region to generate the second image; The display module is specifically used for: The second picture is displayed.
7. The device according to claim 5, characterized in that The receiving module is further used to receive a second input from a user when the first interface is displayed, where the second input is used to take a screenshot of the first interface; The generating module is further configured to generate the first picture in response to the second input; and When the first picture meets a preset condition, generating an associated picture associated with the first picture; The first area in the first picture corresponds to the second area in the associated picture.
8. The device according to claim 7, characterized in that The associated pictures include a first associated picture and a second associated picture. The generation module is specifically used for: When the number of first elements in the first picture is a first number, performing a target operation, the target operation including at least one of the following: Enlarging the first interface to generate a first associated picture, and reducing the first interface to generate a second associated picture; The number of the first elements in the first associated picture is greater than a first number, and the number of the first elements in the second associated picture is less than the first number.
Citation Information
Patent Citations
Methods, apparatuses, and computer program products for hiding access to information in an image
CN105556530A
Image display method and mobile terminal
CN106791400A
Page display method and apparatus, electronic device and storage medium
CN107256259A
Picture processing method and device, computer device and computer readable storage medium
CN107507159A
Automatic electronic image playing method and device, equipment and storage medium
CN111599449A
