CN110941375B - Method, device and storage medium for locally amplifying image - Google Patents

Method, device and storage medium for locally amplifying image Download PDF

Info

Publication number
CN110941375B
CN110941375B CN201911175802.5A CN201911175802A CN110941375B CN 110941375 B CN110941375 B CN 110941375B CN 201911175802 A CN201911175802 A CN 201911175802A CN 110941375 B CN110941375 B CN 110941375B
Authority
CN
China
Prior art keywords
image
area
local area
region
mask layer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911175802.5A
Other languages
Chinese (zh)
Other versions
CN110941375A (en
Inventor
袁佳平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911175802.5A priority Critical patent/CN110941375B/en
Publication of CN110941375A publication Critical patent/CN110941375A/en
Application granted granted Critical
Publication of CN110941375B publication Critical patent/CN110941375B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0485Scrolling or panning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04806Zoom, i.e. interaction techniques or interactors for controlling the zooming operation

Abstract

The disclosure provides a method, a device and a storage medium for locally amplifying an image, and belongs to the technical field of image amplification processing. The method comprises the following steps: acquiring a first local area to be amplified on a checked image and an amplified image corresponding to the checked image; determining a second local area corresponding to the first local area in the enlarged image; covering a second area image in the second local area on a first area image in the first local area to obtain a view image covered with the second area image; displaying a viewing image overlaid with the second area image. By adopting the method and the device, the flexibility of viewing the locally-enlarged image by a user can be improved.

Description

Method, device and storage medium for locally amplifying image
Technical Field
The present disclosure relates to the field of image magnification processing technologies, and in particular, to a method, an apparatus, and a storage medium for locally magnifying an image.
Background
The user can view the image on the terminal. In order to more clearly observe the detailed portion of the image, a local area of the image may be enlarged, and the terminal may display a locally enlarged image corresponding to the local area.
The terminal in the related art may store the view image and the partial enlarged images corresponding to the partial areas of the view image, and when the user clicks a certain partial area in the view image, if the partial enlarged image corresponding to the partial area is stored in the terminal, the terminal may display the partial enlarged image corresponding to the partial area, and if the partial enlarged image corresponding to the partial area is not stored in the terminal, the terminal may not display the partial enlarged image corresponding to the partial area.
The user can only view the pre-stored locally-enlarged image, but cannot view the locally-enlarged image corresponding to any region in the viewed image, so that the flexibility of viewing the locally-enlarged image by the user is poor.
Disclosure of Invention
The embodiment of the disclosure provides a method, a device and a storage medium for locally amplifying an image, which can be used for solving the problems in the related art. The technical scheme is as follows:
in one aspect, a method of locally magnifying an image is provided, the method comprising:
acquiring a first local area to be amplified on a checked image and an amplified image corresponding to the checked image;
Determining a second local area corresponding to the first local area in the enlarged image;
covering a second area image in the second local area on a first area image in the first local area to obtain a view image covered with the second area image;
displaying a viewing image overlaid with the second area image.
In another aspect, a method of locally magnifying an image is provided, the method comprising:
opening a target application when detecting an operation of opening the target application;
when an operation instruction for displaying a view image is detected, displaying the view image through an image viewing tool of the target application program;
when detecting the amplifying operation triggered in the first local area on the checked image, displaying the checked image covered with a second area image, wherein the second area image is the image content in a second local area corresponding to the first local area in the amplified image;
the magnified image is another image with the same display content as the view image but higher resolution, or the magnified image is an image obtained by magnifying the view image according to a target multiple.
In another aspect, there is provided an apparatus for locally magnifying an image, the apparatus comprising:
the acquisition module is used for acquiring a first local area to be amplified on the checked image and an amplified image corresponding to the checked image;
a first determining module, configured to determine a second local area corresponding to the first local area in the enlarged image;
the second determining module is used for covering the second area image in the second local area on the first area image in the first local area to obtain a view image covered with the second area image;
and the display module is used for displaying the view image covered with the second area image.
In another aspect, there is provided an apparatus for locally magnifying an image, the apparatus comprising:
an opening module, configured to open a target application when an operation of opening the target application is detected;
the first display module is used for displaying the view image through an image view tool of the target application program when detecting an operation instruction for displaying the view image;
the second display module is used for displaying a view image covered with a second area image when detecting the amplifying operation triggered in the first local area on the view image, wherein the second area image is the image content in a second local area corresponding to the first local area in the amplifying image;
The magnified image is another image with the same display content as the view image but higher resolution, or the magnified image is an image obtained by magnifying the view image according to a target multiple.
In another aspect, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, the at least one instruction loaded and executed by the processor to implement the method of locally magnifying an image described above.
In another aspect, a computer readable storage medium having stored therein at least one instruction loaded and executed by a processor to implement the above-described method of locally magnifying an image is provided.
The technical scheme provided by the embodiment of the application has the beneficial effects that at least:
in the embodiment of the disclosure, when a user performs local amplification on any local area, such as the first local area, on the checked image, the terminal can firstly acquire the first local area on the checked image and an amplified image corresponding to the checked image; then, a second partial region corresponding to the first partial region in the enlarged image may be determined; then, the second area image in the second local area can be overlaid on the first area image in the first local area, and a view image overlaid with the second area image can be obtained and displayed. Therefore, by using the method, any local area in the image can be enlarged, and the flexibility of viewing the locally enlarged image by a user can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and other drawings may be obtained according to these drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 is a flow chart of a method for locally magnifying an image according to an embodiment of the present disclosure;
FIG. 2 is a schematic illustration of a partial magnification of an image provided by an embodiment of the present disclosure;
FIG. 3 is a schematic view of a scene with partial enlargement of an image provided by an embodiment of the present disclosure;
FIG. 4 is a schematic view of a scene with partial enlargement of an image provided by an embodiment of the present disclosure;
FIG. 5 is a schematic illustration of a first partial region of a viewed image provided by an embodiment of the present disclosure;
FIG. 6 is a schematic illustration of a first partial region of a viewed image provided by an embodiment of the present disclosure;
FIG. 7 is a schematic illustration of a first partial region of a viewed image provided by an embodiment of the present disclosure;
FIG. 8 is a flow diagram of a method of determining a viewed image overlaid with a second area image provided by an embodiment of the present disclosure;
FIG. 9 is a flow diagram of a method of determining a viewed image overlaid with a second area image provided by an embodiment of the present disclosure;
FIG. 10 is a flow chart of a method for locally magnifying an image provided by an embodiment of the present disclosure;
FIG. 11 is a schematic view of a game scene image partially magnified by an application in a network game application provided in an embodiment of the present disclosure;
FIG. 12 is a schematic view of a game scene image partially magnified by an application in a network game application provided in an embodiment of the present disclosure;
FIG. 13 is a schematic view of a game scene image partially magnified by an application in a network game application provided in an embodiment of the present disclosure;
FIG. 14 is a schematic view of a game scene image partially magnified by an application in a network game application provided in an embodiment of the present disclosure;
FIG. 15 is a schematic view of a game scene image partially magnified by an application in a network game application provided in an embodiment of the present disclosure;
FIG. 16 is a schematic view of an apparatus for locally magnifying an image according to an embodiment of the present disclosure;
fig. 17 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
Detailed Description
For the purposes of clarity, technical solutions and advantages of the present disclosure, the following further details the embodiments of the present disclosure with reference to the accompanying drawings.
The embodiment of the disclosure provides a method for locally amplifying an image, which can be implemented by a terminal with a display function, wherein the terminal can be a mobile phone, a tablet computer, a notebook computer, a desktop computer and the like, and a user can use various application programs based on different requirements during the use of the terminal, for example, the terminal can be provided with the application program for viewing the image. The image may be an image stored locally by the terminal. The image may also be an image obtained by the terminal from the server through an application program, for example, the application program may be a network game application program, and the image may be a game scene image obtained by the terminal from a background server of the network game application program.
As shown in fig. 1, the process flow of the method may include the following steps:
in step 101, the terminal acquires a first local area to be enlarged on the viewing image and an enlarged image corresponding to the viewing image.
The view image may be an image that has not undergone any enlargement processing, or may be an enlarged image.
The magnified image corresponding to the view image is an enlarged image based on the view image. Correspondingly, the magnified image can be an image after magnification, such as an image after magnification of a target multiple, on the basis of the image without any magnification treatment; the image after being amplified again, such as the image after being amplified again by the target multiple, may also be based on the image after being amplified. For convenience of description, the example may be given by taking the image that is not enlarged as the viewing image.
In some examples, the magnified image is another image that is the same as the display of the viewed image, but at a higher resolution. For example, the magnified image may be an image that is the same as the display content of the viewed image and is of equal size, but of higher resolution than the resolution of the viewed image; for another example, the enlarged image may be an image having the same display content as the viewing image, but a size larger than that of the viewing image and a resolution higher than that of the viewing image.
Therefore, the enlarged image may be an image obtained by enlarging the size of the view image, an image obtained by enlarging the resolution of the view image, or an image obtained by enlarging the size and the resolution of the view image. For convenience of description, the description and the related drawings may be illustrated with size enlargement, and the resolution enlargement is similar to the above, and will not be described in detail.
The magnified image may also be referred to as a clone image of the viewed image, because the display content in the viewed image and the magnified image are the same, and the size is different, or the resolution is different, or both the size and the resolution are different.
In one example, when a user intends to view a certain image (which may be noted as a view image), the view image may be acquired from the terminal locally or from a server and displayed on a display interface of the terminal. The first location on the display interface may be clicked on if the user intends to view a partial magnified view at a certain location on the display interface (which may be noted as the first location). When the terminal detects that the touch amplifying operation is triggered at the first position on the display interface, a first local area to be amplified on the checked image can be obtained based on the first position.
The first location may be a coordinate location of a click location of the user on the display interface, and the first local area is a local area in the view image determined according to the first location, and may be a circular area, a rectangular area, a polygonal area, or the like, which is exemplified by a circular area in this embodiment.
In an example, when the terminal detects that the touch zoom-in operation is triggered at the first position on the display interface, not only the first local area to be zoomed in on the view image, but also the zoomed-in image corresponding to the view image may be obtained. The terminal may acquire the first local area first, and then acquire the enlarged image corresponding to the view image, or may acquire the enlarged image corresponding to the view image first, and then acquire the first local area first, or may acquire the enlarged image and the first local area at the same time, where the order of acquiring the first local area and the enlarged image is not limited in this embodiment.
The magnified image may be an image that the terminal prestores, n being a number greater than 1 relative to the image that is magnified n times the view image. Alternatively, the magnified image is another image that is the same as the display content of the viewed image, but at a higher resolution.
In step 102, the terminal determines a second local area in the enlarged image corresponding to the first local area.
The second local area is a local area in the enlarged image, and the first local area and the second local area are different in size and size, but the image content in the areas is the same.
In one example, the terminal may determine a second partial region in the magnified image corresponding to the first partial region image based on a magnification of the magnified image relative to the viewed image and a position of the first partial region in the viewed image.
In step 103, the terminal overlays the second area image in the second local area on the first area image in the first local area to obtain a viewing image overlaid with the second area image.
In one example, after determining the second partial region in the magnified image, the terminal may overlay the second region image within the second partial region over the first region image within the first partial region, resulting in a viewing image overlaid with the second region image.
In step 104, the terminal displays a viewing image overlaid with the second area image.
In one example, after the terminal obtains the view image overlaid with the second area image, the view image overlaid with the second area image may be displayed. In this way, on the display interface of the terminal, the second area image may be displayed at the first partial area on the viewing image, while the other areas not covered by the second area image are still displayed with the same proportion of the image as the viewing image. Further, a local magnification of a local area of the view image can be achieved.
In one example, reference may be made to FIG. 2, where a in FIG. 2 represents a view image and a' represents an enlarged image corresponding to the view image. When the user intends to view the enlarged image of any partial area on the view image a, for example, when the user intends to view the enlarged image corresponding to the partial area a, the terminal may acquire the partial area a on the view image a, and the enlarged image a ' corresponding to the view image a and the partial area image a ' corresponding to the partial area image a on the enlarged image a '. Then, the terminal may overlay the partial area image a 'on the enlarged image a' on the viewing image a, and the partial area image a 'is overlaid on the partial area image a, resulting in the viewing image a overlaid with the partial area image a' shown on the right side of the arrow of fig. 2. Thereafter, as shown on the right side of the arrow with reference to fig. 2, a viewing image a overlaid with the partial area image a' may be displayed on the display interface of the terminal.
In one possible application scenario, as shown in fig. 3, after a user opens a view image, the user may click on the display interface at the location of the "mushroom" indicated by the arrow in fig. 3. The partial area where the "mushroom" is located as indicated by the arrow in fig. 4 may be enlarged on the display interface of the terminal, whereas the area image in the other area than the partial area where the "mushroom" is located in the view image in fig. 4 is not enlarged.
Therefore, when the user uses the method to amplify the local area of the image, the user can click any position on the view image on the display interface, and the terminal can locally amplify the local area clicked by the corresponding user in the view image according to the method, so that the flexibility of the user in viewing the locally amplified image can be improved.
As described above, when the terminal detects that the touch amplifying operation is triggered at the first position on the display interface, the first local area to be amplified on the view image may be acquired based on the first position. The process of acquiring the first local area by the terminal specifically from the first position may be as follows:
when the user clicks the first position on the display interface, the terminal can detect that the first position on the display interface triggers touch amplification operation, and the terminal can determine to view the second position corresponding to the first position on the image based on the first position on the display interface. While the second location may be farther from the edge line of the viewed image, the second location may also be closer to the edge line of the viewed image, in both cases, the manner in which the first local area is determined may be as follows:
If the second position is far from the edge line of the checked image, that is, if the distance between the second position and the edge line of the checked image is greater than or equal to the target value, determining a circular area which takes the second position as a center and takes the target value as a radius on the checked image as a first local area to be amplified on the checked image.
If the second position is closer to the edge line of the checked image, that is, if the distance between the second position and the edge line of the checked image is smaller than the target value, determining an area surrounded by the edge line of the checked image and an arc area which takes the second position as a center and takes the target value as a radius as a first local area to be amplified on the checked image.
The target value may be a value preset by a technician, or may be a value determined by the terminal according to the size of the checked image, for example, the target value may be a quarter of the short side length of the checked image.
In one example, as shown in fig. 5, where the second location is further from the edge line of the viewed image, the first localized area is a circular area as shown in fig. 5. As shown in fig. 6, the second position is closer to an edge line of the view image, and the first local area is an area surrounded by the edge line of the view image closer to the edge line and the arc-shaped area as shown in fig. 6. As shown in fig. 7, the second position is closer to both edge lines of the viewed image, and the first local area is an area surrounded by the two edge lines closer to the viewed image and the arc-shaped area as shown in fig. 7.
When the terminal detects that the touch amplifying operation is triggered at the first position on the display interface, the terminal can acquire not only the first local area on the checked image, but also the amplified image corresponding to the checked image.
In one example, the magnified image may be an image obtained by the terminal copying and re-listing pixels of the viewed image. For example, the terminal may copy and arrange pixels of the view image in advance based on the magnification ratio of the magnified image to the view image, and store data corresponding to the pixels of the view image after processing. Therefore, when the amplified image is acquired, the pixel points do not need to be copied and arranged, and time can be saved.
In one example, the magnified image may also be an image that a technician draws through drawing software in terms of the viewed image, both greater in size and resolution than the viewed image. For example, a technician may use drawing software to draw an enlarged image having a size greater than the size of the viewed image based on the magnification of the enlarged image relative to the viewed image, in accordance with the content of the image displayed by the viewed image. For example, the magnified image may be three times the magnification of the viewed image, and accordingly, a technician may draw a magnified image three times the size of the viewed image through drawing software.
Wherein, in order to further improve the definition of the magnified image so as to make the second region image within the second local region clearer, correspondingly, the resolution of the magnified image is higher than that of the viewed image. In this way, when a viewing image superimposed with the second area image is displayed, the displayed second area image is not only large in size but also high in sharpness.
The above is a process in which the terminal acquires the first partial area on the view image and the enlarged image corresponding to the view image, and after the terminal acquires the first partial area and the enlarged image, the terminal may determine the second partial area corresponding to the first partial area in the enlarged image based on the enlargement ratio of the enlarged image with respect to the view image. The specific method can be as follows:
first, the terminal may determine location information of a first center point of the first partial region in the viewing image. For example, referring again to fig. 2, the viewing image a is rectangular in shape, and the position information of the first center point of the first partial area a on the viewing image a may be noted as (α, β) with the upper left corner of the rectangle as the origin of coordinates.
Then, the terminal may determine the position information of the second center point corresponding to the first center point in the enlarged image based on the enlargement ratio of the enlarged image with respect to the viewing image and the position information of the first center point in the viewing image. For example, with reference to fig. 2 again, where the magnification ratio of the magnified image with respect to the viewed image is 3 times, still with the upper left corner of the magnified image as the origin of coordinates, the position where the positional information is (3α,3β) in the magnified image a 'may be determined as the second center point corresponding to the first center point of the first partial region a in the magnified image a'.
Finally, the terminal may determine, in the enlarged image, a second partial region having the same region shape as the first partial region with the second center point as the center point based on the position information of the second center point in the enlarged image, the enlargement ratio, and the region shape of the first partial region.
For example, referring again to fig. 2, the first partial region is a circular region having (α, β) as a center and r as a radius, and the second partial region is a circular region having (3α,3β) as a center and 3r as a radius. As another example, as shown in fig. 6 and 7, if the first partial region is a region surrounded by an arc-shaped region and an edge line of the viewed image, the second partial region is also a region surrounded by an arc-shaped region and an edge line of the enlarged image, wherein the size of the second partial region is three times the size of the first partial region.
The above is a procedure in which the terminal determines the first partial area located on the view image and the second partial area located on the enlarged image, and after the terminal determines the first partial area and the second partial area, the terminal can cover the second area image in the second partial area on the first area image in the first partial area to obtain the view image covered with the second area image. The specific flow can be as follows:
Wherein the terminal may obtain the view image covered with the second area image by a masking technique, i.e. a technique in which a partial area of the masked layer is displayed by the masking layer. The principle of masking technology is generally as follows:
the mask layer and the masked layer are two layers, the size of the mask layer is smaller than that of the masked layer, the transparency of the mask layer is larger than zero, and the transparency of the mask layer is larger than zero, namely the transparency of each pixel point of the mask layer is larger than zero. In application, the masking layer is overlaid over the masked layer, the image of the masking layer is not displayed, the image in the area overlaid by the masking layer on the masking layer may be displayed, and the image in the area not overlaid by the masking layer may not be displayed. By this principle, a mask layer having a size smaller than the magnified image and a transparency greater than zero can be overlaid on the magnified image. Further, the enlarged image may display an image in the region covered by the mask layer, and may not display an image in other regions.
The specific implementation process may be performed according to the process shown in fig. 8:
in step 1031, the terminal obtains a mask layer, the mask layer matches the second local area and the transparency of the mask layer is greater than zero.
In one example, the mask layer matches the second partial region, i.e., the size of the mask layer matches the size of the second partial region, and the shape of the mask layer matches the shape of the second partial region. For example, if the second partial region is a circular region, the mask layer may be the same circular region as the circular region; while if the second partial region is a region surrounded by an arc-shaped region and an edge line of the enlarged image, the mask layer may still be a circular region corresponding to the arc-shaped region. That is, the mask layer is a complete circular area, whether or not the second partial area is a complete circular area.
The implementation code for setting the mask layer to be circular may be: bg.2 mask=masksp.
The code of the above implementation is merely an example, and the embodiment is not specifically limited.
In step 1032, the terminal overlays the mask layer over the magnified image to obtain a second region image within the second local region.
In one example, after the terminal acquires the mask layer, the mask layer may be aligned to a second local area of the magnified image and overlaid on the magnified image, and a second area image within the second local area may be obtained according to principles of masking techniques. If the second partial region on the magnified image is a full circular region, the mask layer is over the second partial region of the magnified image with the circular edge of the mask layer aligned with the circular edge of the second partial region. If the second partial area on the enlarged image is an area surrounded by the arc-shaped area and the edge line of the enlarged image, the circular mask layer covers the second partial area on the enlarged image, and the circular edge of the mask layer is aligned with the circular edge of the arc-shaped area of the second partial area.
As can be seen from the above, the resulting second area image is a magnified image covered with a mask layer, wherein the mask layer is aligned with the second partial area of the magnified image.
In step 1033, the terminal overlays the second region image on the first region image of the first partial region, resulting in a viewing image overlaid with the second region image.
In one example, after the terminal overlays the second partial region with the mask layer over the magnified image, a second region image within the second partial region may be obtained, after which the second region image may be overlaid over the first region image within the first partial region over the viewing image, and further the viewing image overlaid with the second region image may be obtained.
Therefore, the checked image which is determined to be covered with the second area image is obtained by firstly aligning the acquired mask layer with the second local area of the enlarged image and covering the enlarged image to obtain a second area image of the second local area; the magnified image covered with the mask layer is then overlaid on the viewed image with the mask layer aligned with the first localized region of the viewed image. Since only the portion of the magnified image that is covered by the mask layer can be displayed and the mask layer does not affect the lowermost viewed image, a viewed image covered with the second area image can be obtained.
In one example, obtaining a viewed image overlaid with a second area image may also be performed in accordance with a flow as shown in fig. 9:
in step 1031', the terminal overlays the magnified image over the viewed image in such a way that the first localized area corresponds to the second localized area.
In one example, the terminal may align the second localized area with the first localized area, overlaying the magnified image over the viewed image. For example, if the first partial region and the second partial region are both circular regions, the center of the second partial region may be aligned with the center of the first partial region, overlaying the magnified image over the viewed image. For another example, if the first partial region and the second partial region are each a region including an arc-shaped region and an edge line, the terminal may align a center point of the arc-shaped region of the second partial region with a center of the arc-shaped region of the first partial region, align the edge line of the second partial region with the edge line of the first partial region, and then overlay the magnified image on the viewing image.
The implementation code for overlaying the magnified image subjected to triple magnification on the viewing image may be:
Let bg2=new Sprite();
Laya.stage.addChild(bg2);
bg2.graphics.drawTexture(bgRes);
bg2.scale(3,3).
the code of the above implementation is merely an example, and the embodiment is not specifically limited.
In step 1032', the terminal obtains a mask layer that matches the second local region and has a transparency greater than zero.
Wherein, after the terminal overlays the magnified image on the viewing image, a pre-stored mask layer may be acquired. As mentioned above, the mask layer may be a circular area matching the second partial area, i.e. the circular area of the mask layer matches the circular area of the second partial area, or the circular area of the mask layer matches the arc-shaped area of the second partial area.
In step 1033', the terminal overlays the mask layer over the magnified image resulting in a viewed image overlaid with the second area image.
In one example, after the terminal overlays the magnified image over the viewed image, a mask layer may be overlaid at a second partial region of the magnified image resulting in a viewed image overlaid with a second region image.
It can be seen that the above-described procedure of determining a viewing image overlaid with a second partial region image is to overlay the magnified image over the viewing image first, wherein the second partial region is aligned with the first partial region; a masking layer is then overlaid on the magnified image, wherein the masking layer is aligned with the second localized region. Since only the portion of the magnified image that is covered by the mask layer can be displayed and the mask layer does not affect the lowermost viewed image, a viewed image covered with the second area image can be obtained.
Based on the above, the obtained viewing image covered with the second area image by the flow shown in fig. 8 and by the flow shown in fig. 9 may include three layers: a viewing image at the lowest layer, a magnified image overlaying the viewing image, and a mask layer overlaying the magnified image. Because the mask layer only generates a mask effect on the image layer below the mask layer, the image displayed on the display interface of the terminal is a view image covered with the second area image, and because the second area image is an area image in the enlarged image, the area, which is not covered by the second area image, of the view image is still an area image in the view image, and further, the local enlargement of the view image can be realized.
In one exemplary application, the user may also slide on the display interface, and the enlarged local area on the viewed image changes dynamically during the sliding process, so that the first local area to be enlarged on the viewed image remains consistent with the user's operating position on the display interface.
When the user slides on the display interface, the process of acquiring the first local area to be amplified on the view image by the terminal may be as follows:
When the terminal detects a sliding amplifying operation from a starting position to an ending position on the display interface, acquiring a first local area to be amplified on the checked image based on a first position, wherein the first position is a real-time sliding position between the starting position and the ending position on the display interface.
The first position is the starting position when the user starts to slide; the end position is a position where the user ends the slide on the display interface, and the first position is the end position when the user ends the slide.
The sliding of the user on the display interface may be sliding on the display interface by a finger or sliding on the display interface by a mouse, and the implementation manner of sliding on the display interface is not limited in this embodiment.
In one example, when the user performs a sliding zoom-in operation on the display interface, the terminal may detect a first position touched by the user on the display interface in real time and then determine to view a first partial region to be zoomed in on the image based on the detected first position. The manner in which the terminal determines the first local area based on the first location has been described above, and reference may be made to the above, which will not be described herein.
In one possible application, when the user slides to the B position during the sliding process on the display interface, the corresponding area of the B position on the magnified image is the B area image, and the viewing image covering the B area image may be displayed on the display interface according to the above method. When the user continues to slide from the B position to the C position, the corresponding area of the C position on the magnified image is the C area image, and a view image covering the C area image can be displayed on the display interface according to the method. In the process of sliding from the B position to the C position, the overlapping part of the B region image and the C region image is still in the amplifying effect, and the non-overlapping part of the B region image and the C region image can be switched to the same display scale as the viewing image, that is, to the effect before amplifying.
In this way, when the user performs the sliding zoom operation on the display interface, the area of the display interface that locally zooms in on the viewing image also changes dynamically, so that the area image of the zoomed-in image that is overlaid on the viewing image is consistent with the real-time sliding position of the user at the current operation position on the display interface.
When the terminal performs sliding amplifying operation by moving the amplified image and the mask layer, the local area to be amplified on the checked image is consistent with the current operation position of the user on the display interface, wherein the code for implementing the amplifying image and the mask layer movement can be as follows:
Laya.stage.on(Laya.Event.MOUSE_MOVE,10is,()=>{
bg2.x=-Laya.stage.mouseX*2;
bg2.y=-Laya.stage.mouseY*2;
maskSp.x=Laya.stage.mouseX;
maskSp.y=Laya.stage.mouseY;}).
The code of the above implementation is merely an example, and the embodiment is not specifically limited.
Based on the above, one scenario in which the method locally enlarges the view image may be that after a user opens a target application installed on the terminal, the target application may be searched for the view image to be viewed, and a zoom image of the view image may be displayed on a display interface of the terminal. After clicking the zoom image of the view image, the terminal can display the complete view image on the display interface through an image viewing tool of the target application program.
Alternatively, another possible scenario may be that after the user opens the target application, thumbnail images of multiple images may be displayed on the display interface of the terminal, when the user intends to view one of the images, the image that the user intends to view may be recorded as a view image, and the user may click on the thumbnail image corresponding to the view image. The terminal may then display the complete viewing image on the display interface through the image viewing tool of the target application.
As shown in the flowchart of fig. 10, after step S1, that is, after displaying the view image on the display interface of the terminal, the user may perform the operation of locally zooming in on the display interface. The user can directly perform local amplification operation on the display interface, or can perform local amplification operation after starting the local amplification function. For example, in the latter case, a function icon corresponding to the local zoom-in function is provided on the display interface on which the view image is displayed, and after the user clicks the function icon, the local zoom-in function may be turned on, and thereafter, the user may perform a local zoom-in operation on the display interface.
As shown in the flowchart of fig. 10, when the terminal detects that the touch zoom-in operation is triggered on the display interface, step S2 may be performed next to determine a first local area to be zoomed in on the view image, then steps S3 and S4 may be performed by the terminal to obtain a zoomed-in image corresponding to the view image, and determine a second local area corresponding to the first local area on the zoomed-in image, and then step S5 is performed by the terminal to obtain a mask layer adapted to the second local area.
In this embodiment, the sequence of the step S3 and the step S5 is not limited, and may be executed simultaneously, or the step S5 may be performed before the step S3.
Then, in step S6, the terminal may obtain a viewing image covered with a mask layer and a magnified image, wherein the mask layer is located on the magnified image and corresponds to the second partial region, the magnified image is located on the viewing image, and the first partial region corresponds to the second partial region. Further, according to the principle of the masking technique, in step S7, a view image covered with the second area image in the second partial area may be displayed on the display interface, that is, a view image having a partial enlargement effect may be displayed on the display interface.
And then, when the terminal detects that the sliding operation is triggered on the display interface, correspondingly, the first local area which needs to be enlarged on the checked image is updated, and then, the second local area which corresponds to the first local area on the enlarged image is also updated. In step S8, the terminal may implement updating of the second local area by moving the enlarged image and the mask layer according to the updating condition of the first local area, so that the viewing image may cover the updated area image in the second local area, and in step S9, the viewing image covered with the updated area image in the second local area may be displayed on the display interface.
Therefore, the process of locally amplifying the checked image by the user through the method is similar to that of the process of holding the magnifying glass by the user, and the visual effect of holding the magnifying glass to view the checked image can be achieved when the user views the regional image in the local region of the checked image.
Based on the above, one possible application scenario may be that the view image may be a game scenario image in a network game application program, and the user may perform local magnification processing on the game scenario image in the network game application program. For example, a plurality of application programs may be installed on a terminal of a user, where the application programs may include an online game application program, and as shown in fig. 11, a plurality of application program icons are displayed on a desktop of the terminal, and an application program icon clicked by the user is an application program icon corresponding to a certain online game application program.
After clicking an application icon corresponding to a certain network game application, the user enters a start interface of the network game application, as shown in fig. 12, and after clicking a start game button, the user can enter a mode selection interface of the game shown in fig. 13. Then, after the user selects a certain mode, the game interface shown in fig. 14 may be entered, where fig. 14 is a game scene image of a certain frame in the network game application. The user may click on any position on the game scene image to perform local amplification processing, for example, as shown in fig. 14, the position pointed by the finger of the user is the position where the user intends to perform local amplification. After the user clicks the position to be locally enlarged, the game scene image which is locally enlarged at the position clicked by the user as shown in fig. 15 may be displayed on the display interface of the terminal.
Here, the scene graphs of fig. 11 to 15 in which the partial enlargement processing is performed on the game scene image are merely an example, and are not particularly limited.
In the embodiment of the disclosure, when a user performs local amplification on any local area, such as a first local area, on a viewing image, the terminal may first acquire the first local area on the viewing image and an amplified image corresponding to the viewing image; then, a second partial region corresponding to the first partial region in the enlarged image may be determined; then, the second area image in the second local area can be overlaid on the first area image in the first local area, and a view image overlaid with the second area image can be obtained and displayed. Therefore, by using the method, any local area in the image can be enlarged, and the flexibility of viewing the locally enlarged image by a user can be improved.
The embodiment of the disclosure also provides a method for locally amplifying the image, which can be realized by the terminal with the display function. The method may include: when a terminal detects an operation of opening a target application program, opening the target application program; when the terminal detects an operation instruction for displaying a view image, displaying the view image through an image viewing tool of the target application program; and when detecting the enlargement operation triggered in the first local area on the view image, displaying the view image covered with a second area image, wherein the second area image is the image content in a second local area corresponding to the first local area in the enlarged image.
The magnified image is another image with the same display content as the view image but higher resolution, or the magnified image is an image obtained by magnifying the view image according to a target multiple.
The target application is an application selected by a user installed on the terminal, for example, a media application installed on the terminal, a browsing application, and the like.
Wherein the image viewing tool may be a plug-in the target application for executing the display image.
In one example, the target application may be a browsing application, and accordingly, the user may double-click open the target application on an icon corresponding to the target application on the desktop of the terminal. After a user opens a target application program, the target application program can be searched for a to-be-viewed image, and a zoom image of the to-be-viewed image can be displayed on a display interface of the terminal. After clicking the zoom image of the view image, the terminal can display the complete view image on the display interface through an image viewing tool of the target application program. The user may then zoom in locally on the display interface displaying the viewed image, according to the method described above, for specific procedures, see the embodiments described above.
Alternatively, the target application may be a media application, and accordingly, the user may double-click open the target application on an icon corresponding to the target application on the desktop of the terminal. After the user opens the target application program, the thumbnail of the plurality of images can be displayed on the display interface of the terminal, when the user intends to view one of the images, the image which the user intends to view can be recorded as the view image, and the user can click the thumbnail corresponding to the view image. The terminal may then display the complete viewing image on the display interface through the image viewing tool of the target application. The user may then zoom in locally on the display interface displaying the viewed image, according to the method described above, for specific procedures, see the embodiments described above.
Based on the same technical concept, the embodiment of the present disclosure further provides an apparatus for locally amplifying an image, as shown in fig. 16, including:
an obtaining module 910, configured to obtain a first local area to be amplified on a view image and an amplified image corresponding to the view image;
a first determining module 920, configured to determine a second local area corresponding to the first local area in the enlarged image;
a second determining module 930, configured to overlay a second area image in the second local area on the first area image in the first local area, to obtain a view image overlaid with the second area image;
and a display module 940, configured to display a viewing image covered with the second area image.
Optionally, the second determining module 930 is specifically configured to:
acquiring a mask layer, wherein the mask layer is matched with the second local area, and the transparency of the mask layer is larger than zero;
covering the mask layer on the enlarged image to obtain a second area image in the second local area;
and overlaying the second area image on the first area image of the first local area to obtain a view image overlaid with the second area image.
Optionally, the second determining module 930 is specifically configured to:
overlaying the magnified image on the viewed image in a manner that the first localized area corresponds to the second localized area;
acquiring a mask layer, wherein the mask layer is matched with the second local area, and the transparency of the mask layer is larger than zero;
and covering the mask layer on the magnified image to obtain a viewing image covered with the second area image.
Optionally, the acquiring module 910 is specifically configured to acquire, when a touch zoom-in operation is triggered at a first position on the display interface, a first local area to be zoomed in on the view image based on the first position.
Optionally, the acquiring module 910 is specifically configured to:
when the touch amplification operation is triggered at the first position on the display interface, determining a second position corresponding to the first position on the view image based on the first position on the display interface;
if the distance between the second position and the edge line of the checked image is greater than or equal to a target value, determining a circular area which takes the second position as a center and takes the target value as a radius on the checked image as a first local area to be amplified on the checked image;
And if the distance between the second position and the edge line of the checked image is smaller than a target value, determining an area surrounded by the edge line of the checked image and an arc area which takes the second position as a center and takes the target value as a radius as a first local area to be amplified on the checked image.
Optionally, the acquiring module 910 is specifically configured to, when detecting a sliding zoom-in operation from a start position to an end position on a display interface, acquire a first local area to be zoomed in on a view image based on a first position, where the first position is a real-time sliding position on the display interface between the start position and the end position.
Optionally, the first determining module 920 is specifically configured to:
a second local region in the magnified image corresponding to the first local region is determined based on a magnification ratio of the magnified image relative to the viewed image and a position of the first local region in the viewed image.
Optionally, the first determining module 920 is specifically configured to:
determining position information of a first center point of the first local area in the view image;
Determining, in the magnified image, positional information of a second center point corresponding to the first center point based on a magnification ratio of the magnified image relative to the viewed image and positional information of the first center point in the viewed image;
and determining a second local area which takes the second center point as a center point and has the same area shape as the first local area in the enlarged image based on the position information of the second center point in the enlarged image, the enlargement ratio and the area shape of the first local area.
Based on the same technical concept, the embodiment of the disclosure further provides an apparatus for locally amplifying an image, the apparatus including:
an opening module, configured to open a target application when an operation of opening the target application is detected;
the first display module is used for displaying the view image through an image view tool of the target application program when detecting an operation instruction for displaying the view image;
the second display module is used for displaying a view image covered with a second area image when detecting the amplifying operation triggered in the first local area on the view image, wherein the second area image is the image content in a second local area corresponding to the first local area in the amplifying image;
The magnified image is another image with the same display content as the view image but higher resolution, or the magnified image is an image obtained by magnifying the view image according to a target multiple.
In the embodiment of the disclosure, when a user performs local amplification on any local area, such as a first local area, on a viewing image, the device may first acquire the first local area on the viewing image and an amplified image corresponding to the viewing image; then, a second partial region corresponding to the first partial region in the enlarged image may be determined; then, the second area image in the second local area can be overlaid on the first area image in the first local area, and a view image overlaid with the second area image can be obtained and displayed. Therefore, any local area in the image can be enlarged by using the device, and the flexibility of viewing the locally enlarged image by a user can be improved.
It should be noted that: the device for locally amplifying an image provided in the above embodiment only illustrates the division of the above functional modules when locally amplifying an image, and in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for locally amplifying the image provided in the above embodiment and the method embodiment for locally amplifying the image belong to the same concept, and the specific implementation process of the device is detailed in the method embodiment, which is not described herein again.
Fig. 17 shows a block diagram of a terminal 1000 according to an exemplary embodiment of the present application. The terminal 1000 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion picture expert compression standard audio plane 3), an MP4 (Moving Picture Experts Group Audio Layer IV, motion picture expert compression standard audio plane 4) player, a notebook computer, or a desktop computer. Terminal 1000 can also be referred to by other names of user equipment, portable terminal, laptop terminal, desktop terminal, etc.
In general, terminal 1000 can include: a processor 1001 and a memory 1002.
The processor 1001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 1001 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 1001 may also include a main processor, which is a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit ), and a coprocessor; a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1001 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 1001 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
Memory 1002 may include one or more computer-readable storage media, which may be non-transitory. Memory 1002 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 1002 is used to store at least one instruction for execution by processor 1001 to implement the method of locally magnifying an image provided by an embodiment of the method in the present application.
In some embodiments, terminal 1000 can optionally further include: a peripheral interface 1003, and at least one peripheral. The processor 1001, the memory 1002, and the peripheral interface 1003 may be connected by a bus or signal line. The various peripheral devices may be connected to the peripheral device interface 1003 via a bus, signal wire, or circuit board. Specifically, the peripheral device includes: at least one of radio frequency circuitry 1004, touch display 1005, camera assembly 1006, audio circuitry 1007, and power supply 1009.
Peripheral interface 1003 may be used to connect I/O (Input/Output) related at least one peripheral to processor 1001 and memory 1002. In some embodiments, processor 1001, memory 1002, and peripheral interface 1003 are integrated on the same chip or circuit board; in some other embodiments, either or both of the processor 1001, memory 1002, and peripheral interface 1003 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
Radio Frequency circuit 1004 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. Radio frequency circuitry 1004 communicates with a communication network and other communication devices via electromagnetic signals. The radio frequency circuit 1004 converts an electrical signal into an electromagnetic signal for transmission, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1004 includes: antenna systems, RF transceivers, one or more amplifiers, tuners, oscillators, digital signal processors, codec chipsets, subscriber identity module cards, and so forth. Radio frequency circuitry 1004 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity ) networks. In some embodiments, the radio frequency circuitry 1004 may also include NFC (Near Field Communication ) related circuitry, which is not limiting of the application.
The display screen 1005 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display 1005 is a touch screen, the display 1005 also has the ability to capture touch signals at or above the surface of the display 1005. The touch signal may be input to the processor 1001 as a control signal for processing. At this time, the display 1005 may also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards. In some embodiments, display 1005 may be one, providing a front panel of terminal 1000; in other embodiments, display 1005 may be provided in at least two, separately provided on different surfaces of terminal 1000 or in a folded configuration; in still other embodiments, display 1005 may be a flexible display disposed on a curved surface or a folded surface of terminal 1000. Even more, the display 1005 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The display 1005 may be made of LCD (Liquid Crystal Display ), OLED (Organic Light-Emitting Diode) or other materials.
The camera assembly 1006 is used to capture images or video. Optionally, camera assembly 1006 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal and the rear camera is disposed on the rear surface of the terminal. In some embodiments, the at least two rear cameras are any one of a main camera, a depth camera, a wide-angle camera and a tele camera, so as to realize that the main camera and the depth camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize a panoramic shooting and Virtual Reality (VR) shooting function or other fusion shooting functions. In some embodiments, camera assembly 1006 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The dual-color temperature flash lamp refers to a combination of a warm light flash lamp and a cold light flash lamp, and can be used for light compensation under different color temperatures.
The audio circuit 1007 may include a microphone and a speaker. The microphone is used for collecting sound waves of users and environments, converting the sound waves into electric signals, and inputting the electric signals to the processor 1001 for processing, or inputting the electric signals to the radio frequency circuit 1004 for voice communication. For purposes of stereo acquisition or noise reduction, the microphone may be multiple, each located at a different portion of terminal 1000. The microphone may also be an array microphone or an omni-directional pickup microphone. The speaker is used to convert electrical signals from the processor 1001 or the radio frequency circuit 1004 into sound waves. The speaker may be a conventional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, not only the electric signal can be converted into a sound wave audible to humans, but also the electric signal can be converted into a sound wave inaudible to humans for ranging and other purposes. In some embodiments, audio circuit 1007 may also include a headphone jack.
Power supply 1009 is used to power the various components in terminal 1000. The power source 1009 may be alternating current, direct current, disposable battery or rechargeable battery. When the power source 1009 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 1000 can further include one or more sensors 1010. The one or more sensors 1010 include, but are not limited to: acceleration sensor 1011, gyro sensor 1012, pressure sensor 1013, optical sensor 1015, and proximity sensor 1016.
The acceleration sensor 1011 can detect the magnitudes of accelerations on three coordinate axes of the coordinate system established with the terminal 1000. For example, the acceleration sensor 1011 may be used to detect components of gravitational acceleration in three coordinate axes. The processor 1001 may control the touch display 1005 to display a user interface in a landscape view or a portrait view according to the gravitational acceleration signal acquired by the acceleration sensor 1011. The acceleration sensor 1011 may also be used for the acquisition of motion data of a game or a user.
The gyro sensor 1012 may detect the body direction and the rotation angle of the terminal 1000, and the gyro sensor 1012 may collect the 3D motion of the user to the terminal 1000 in cooperation with the acceleration sensor 1011. The processor 1001 may implement the following functions according to the data collected by the gyro sensor 1012: motion sensing (e.g., changing UI according to a tilting operation by a user), image stabilization at shooting, game control, and inertial navigation.
Pressure sensor 1013 may be disposed on a side frame of terminal 1000 and/or on an underlying layer of touch display 1005. When the pressure sensor 1013 is provided at a side frame of the terminal 1000, a grip signal of the terminal 1000 by a user can be detected, and the processor 1001 performs right-and-left hand recognition or quick operation according to the grip signal collected by the pressure sensor 1013. When the pressure sensor 1013 is provided at the lower layer of the touch display 1005, the processor 1001 controls the operability control on the UI interface according to the pressure operation of the user on the touch display 1005. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
The optical sensor 1015 is used to collect ambient light intensity. In one embodiment, the processor 1001 may control the display brightness of the touch display 1005 based on the ambient light intensity collected by the optical sensor 1015. Specifically, when the intensity of the ambient light is high, the display brightness of the touch display screen 1005 is turned up; when the ambient light intensity is low, the display brightness of the touch display screen 1005 is turned down. In another embodiment, the processor 1001 may dynamically adjust the shooting parameters of the camera module 1006 according to the ambient light intensity collected by the optical sensor 1015.
Proximity sensor 1016, also referred to as a distance sensor, is typically located on the front panel of terminal 1000. Proximity sensor 1016 is used to collect the distance between the user and the front of terminal 1000. In one embodiment, when proximity sensor 1016 detects a gradual decrease in the distance between the user and the front face of terminal 1000, processor 1001 controls touch display 1005 to switch from the bright screen state to the off screen state; when proximity sensor 1016 detects a gradual increase in the distance between the user and the front face of terminal 1000, processor 1001 controls touch display 1005 to switch from the off-screen state to the on-screen state.
Those skilled in the art will appreciate that the structure shown in fig. 17 is not limiting and that terminal 1000 can include more or fewer components than shown, or certain components can be combined, or a different arrangement of components can be employed.
Yet another embodiment of the present disclosure provides a computer-readable storage medium, which when executed by a processor of a terminal, enables the terminal to perform the above-described method of locally magnifying an image.
The foregoing description of the preferred embodiments of the present disclosure is not intended to limit the application to the particular embodiments disclosed, but on the contrary, the intention is to cover all modifications, equivalents, alternatives, and alternatives falling within the spirit and principles of the disclosure.

Claims (18)

1. A method of locally magnifying an image, the method comprising:
acquiring a first local area to be amplified on a checked image based on a first position on a display interface, and acquiring an amplified image corresponding to the checked image;
determining position information of a first center point of the first local area in the view image;
determining, in the magnified image, positional information of a second center point corresponding to the first center point based on a magnification ratio of the magnified image relative to the viewed image and positional information of the first center point in the viewed image;
determining a second local area with the second center point as a center point in the enlarged image based on the position information of the second center point in the enlarged image, the enlargement ratio, and the area shape of the first local area, wherein the second local area and the first local area have the same area shape, and the ratio of the sizes of the second local area and the first local area is the enlargement ratio, or the ratio of the radii of the second local area and the first local area is the enlargement ratio;
Overlaying a second area image in the second local area on a first area image in the first local area to obtain a view image overlaid with the second area image, displaying the view image overlaid with the second area image, wherein the view image overlaid with the second area image comprises the view image, the enlarged image overlaid with the view image and a mask layer overlaid with the enlarged image, the mask layer is matched with and aligned with the second local area, the second local area is aligned with the first local area, the mask layer generates a mask effect on the enlarged image, and the mask effect is used for enabling the enlarged image to display the second area image in the second local area covered by the mask layer and not display images in other areas;
displaying a part of the second region image, which is overlapped with a third region image, according to the enlargement ratio in the process of sliding from the first position to a third position, and displaying a part of the second region image, which is not overlapped with the third region image, according to the same display ratio as the viewing image, wherein the third region image is an image in a third local region, and the third local region is a region corresponding to the third position on the enlargement image;
And when the image is slid to the third position, the magnified image and the mask layer are moved, a view image covered with the third area image is obtained, and the view image covered with the third area image is displayed.
2. The method of claim 1, wherein overlaying the second region image within the second local region over the first region image within the first local region results in a viewing image overlaid with the second region image, comprising:
acquiring the mask layer, wherein the transparency of the mask layer is larger than zero;
covering the mask layer on the enlarged image to obtain a second area image in the second local area;
and overlaying the second area image on the first area image in the first local area to obtain the view image overlaid with the second area image.
3. The method of claim 1, wherein overlaying the second region image within the second local region over the first region image within the first local region results in a viewing image overlaid with the second region image, comprising:
Overlaying the magnified image on the viewed image in a manner that the first localized area corresponds to the second localized area;
acquiring the mask layer, wherein the transparency of the mask layer is larger than zero;
and overlaying the mask layer on the magnified image to obtain the viewing image overlaid with the second region image.
4. A method according to any one of claims 1 to 3, wherein the acquiring a first partial area to be enlarged on the viewing image based on a first position on the display interface comprises:
when the touch amplifying operation is detected to be triggered at the first position on the display interface, a first local area to be amplified on the checked image is obtained based on the first position.
5. The method of claim 4, wherein the acquiring a first local area to be magnified on the view image based on the first location when the touch magnification operation is detected to be triggered at the first location on the display interface comprises:
when the touch amplification operation is triggered at the first position on the display interface, determining a second position corresponding to the first position on the view image based on the first position on the display interface;
If the distance between the second position and the edge line of the checked image is greater than or equal to a target value, determining a circular area which takes the second position as a center and takes the target value as a radius on the checked image as a first local area to be amplified on the checked image;
and if the distance between the second position and the edge line of the checked image is smaller than a target value, determining an area surrounded by the edge line of the checked image and an arc area which takes the second position as a center and takes the target value as a radius as a first local area to be amplified on the checked image.
6. A method according to any one of claims 1 to 3, wherein the acquiring a first partial area to be enlarged on the viewing image based on a first position on the display interface comprises:
when the sliding amplifying operation from the starting position to the ending position on the display interface is detected, acquiring a first local area to be amplified on a checked image based on the first position, wherein the first position is a real-time sliding position between the starting position and the ending position on the display interface.
7. The method according to claim 1, wherein the enlarged image is an image having a resolution larger than that of the viewing image, which is drawn in advance in accordance with the viewing image; or the magnified image is an image obtained by magnifying the view image by a target multiple.
8. A method of locally magnifying an image, the method comprising:
opening a target application when detecting an operation of opening the target application;
when an operation instruction for displaying a view image is detected, displaying the view image through an image viewing tool of the target application program;
when a zoom-in operation triggered in a first partial area on the view image is detected, displaying the view image covered with a second area image, wherein the second area image is image content in a second partial area corresponding to the first partial area in the zoom-in image, the first partial area is acquired based on a first position on a display interface, the view image covered with the second area image comprises the view image, the zoom-in image covered on the view image and a mask layer covered on the zoom-in image, the mask layer is matched with and aligned with the second partial area, the second partial area is aligned with the first partial area, and the mask layer generates a mask effect on the zoom-in image, and the mask effect is used for enabling the zoom-in image to display the second area image covered by the mask layer and not display images in other areas;
Displaying a part of the second region image, which is overlapped with a third region image, according to an enlarged scale in the process of detecting the sliding from the first position to a third position, and displaying a part of the second region image, which is not overlapped with the third region image, according to the same display scale as the viewing image, wherein the third region image is an image in a third local region, and the third local region is a region corresponding to the third position on the enlarged image;
moving the magnified image and the mask layer while sliding to the third position to obtain a viewing image covered with the third region image, and displaying the viewing image covered with the third region image;
the center point of the second local area is a second center point, the second local area and the first local area have the same area shape, the ratio of the sizes of the second local area and the first local area is the amplification ratio, or the ratio of the radiuses of the second local area and the first local area is the amplification ratio;
the second local area is determined based on the position information of the second center point in the enlarged image, the enlargement ratio and the area shape of the first local area, the position information of the second center point in the enlarged image is determined based on the enlargement ratio and the position information of the first center point of the first local area in the view image, and the second center point corresponds to the first center point;
The magnified image is another image which is the same as the display content of the view image but has higher resolution, or the magnified image is an image obtained by magnifying the view image according to a target multiple.
9. An apparatus for locally magnifying an image, the apparatus comprising:
the acquisition module is used for acquiring a first local area to be amplified on a checked image based on a first position on a display interface and acquiring an amplified image corresponding to the checked image;
a first determining module, configured to determine location information of a first center point of the first local area in the view image; determining, in the magnified image, positional information of a second center point corresponding to the first center point based on a magnification ratio of the magnified image relative to the viewed image and positional information of the first center point in the viewed image; determining a second local area with the second center point as a center point in the enlarged image based on the position information of the second center point in the enlarged image, the enlargement ratio, and the area shape of the first local area, wherein the second local area and the first local area have the same area shape, and the ratio of the sizes of the second local area and the first local area is the enlargement ratio, or the ratio of the radii of the second local area and the first local area is the enlargement ratio;
A second determining module, configured to overlay a second area image in the second local area on a first area image in the first local area, to obtain a view image overlaid with the second area image, where the view image overlaid with the second area image includes the view image, the magnified image overlaid with the view image, and a mask layer overlaid with the magnified image, the mask layer being matched with and aligned with the second local area, the second local area being aligned with the first local area, and the mask layer generating a mask effect on the magnified image, and the mask effect being used to cause the magnified image to display the second area image in the second local area covered by the mask layer, and not to display images in other areas;
the display module is used for displaying the view image covered with the second area image; displaying a part of the second region image, which is overlapped with a third region image, according to the enlargement ratio in the process of sliding from the first position to a third position, and displaying a part of the second region image, which is not overlapped with the third region image, according to the same display ratio as the viewing image, wherein the third region image is an image in a third local region, and the third local region is a region corresponding to the third position on the enlargement image; and when the image is slid to the third position, the magnified image and the mask layer are moved, a view image covered with the third area image is obtained, and the view image covered with the third area image is displayed.
10. The apparatus of claim 9, wherein the second determining module is configured to obtain the mask layer, and the transparency of the mask layer is greater than zero; covering the mask layer on the enlarged image to obtain a second area image in the second local area; and overlaying the second area image on the first area image in the first local area to obtain the view image overlaid with the second area image.
11. The apparatus of claim 9, wherein the second determining module is configured to overlay the magnified image on the viewed image in such a way that the first localized area corresponds to the second localized area; acquiring the mask layer, wherein the transparency of the mask layer is larger than zero; and overlaying the mask layer on the magnified image to obtain the viewing image overlaid with the second region image.
12. The apparatus according to any one of claims 9 to 11, wherein the obtaining module is configured to obtain, when it is detected that the touch zoom operation is triggered at the first location on the display interface, a first local area to be zoomed in on the view image based on the first location.
13. The apparatus of claim 12, wherein the obtaining module is configured to determine, based on a first location on the display interface, a second location on the viewed image corresponding to the first location when the touch up operation is triggered at the first location on the display interface; if the distance between the second position and the edge line of the checked image is greater than or equal to a target value, determining a circular area which takes the second position as a center and takes the target value as a radius on the checked image as a first local area to be amplified on the checked image; and if the distance between the second position and the edge line of the checked image is smaller than a target value, determining an area surrounded by the edge line of the checked image and an arc area which takes the second position as a center and takes the target value as a radius as a first local area to be amplified on the checked image.
14. The apparatus according to any one of claims 9 to 11, wherein the obtaining module is configured to obtain, when a sliding zoom-in operation from a start position to an end position on the display interface is detected, a first partial area to be zoomed in on a view image based on the first position, where the first position is a real-time sliding position on the display interface between the start position and the end position.
15. The apparatus of claim 9, wherein the magnified image is an image that is pre-rendered at a resolution greater than a resolution of the viewed image; or the magnified image is an image obtained by magnifying the view image by a target multiple.
16. An apparatus for locally magnifying an image, the apparatus comprising:
an opening module, configured to open a target application when an operation of opening the target application is detected;
the first display module is used for displaying the view image through an image view tool of the target application program when detecting an operation instruction for displaying the view image;
a second display module configured to, when an enlargement operation triggered in a first partial area on the view image is detected, display a view image covered with a second area image, the second area image being image content in a second partial area corresponding to the first partial area in an enlarged image, the first partial area being acquired based on a first position on a display interface, the view image covered with the second area image including the view image, the enlarged image covered on the view image, and a mask layer covered on the enlarged image, the mask layer being matched with and aligned with the second partial area, the second partial area being aligned with the first partial area, the mask layer producing a mask effect on the enlarged image, the mask effect being for causing the enlarged image to display the second area image in the second partial area covered by the mask layer and not displaying images in other areas;
The second display module is further configured to display, according to an enlarged scale, a portion where the second area image overlaps with a third area image in a process of detecting that the second area image slides from the first position to a third position, and display, according to the same display scale as the view image, a portion where the second area image does not overlap with the third area image, where the third area image is an image in a third local area, and the third local area is an area corresponding to the third position on the enlarged image; moving the magnified image and the mask layer while sliding to the third position to obtain a viewing image covered with the third region image, and displaying the viewing image covered with the third region image;
the center point of the second local area is a second center point, the second local area and the first local area have the same area shape, the ratio of the sizes of the second local area and the first local area is the amplification ratio, or the ratio of the radiuses of the second local area and the first local area is the amplification ratio; the second local area is determined based on the position information of the second center point in the enlarged image, the enlargement ratio and the area shape of the first local area, the position information of the second center point in the enlarged image is determined based on the enlargement ratio and the position information of the first center point of the first local area in the view image, and the second center point corresponds to the first center point; the magnified image is another image which is the same as the display content of the view image but has higher resolution, or the magnified image is an image obtained by magnifying the view image according to a target multiple.
17. A computer device comprising a processor and a memory having stored therein at least one instruction that is loaded and executed by the processor to implement the method of locally magnifying an image according to any of claims 1 to 8.
18. A computer readable storage medium having stored therein at least one instruction that is loaded and executed by a processor to implement the method of locally magnifying an image according to any of claims 1 to 8.
CN201911175802.5A 2019-11-26 2019-11-26 Method, device and storage medium for locally amplifying image Active CN110941375B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911175802.5A CN110941375B (en) 2019-11-26 2019-11-26 Method, device and storage medium for locally amplifying image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911175802.5A CN110941375B (en) 2019-11-26 2019-11-26 Method, device and storage medium for locally amplifying image

Publications (2)

Publication Number Publication Date
CN110941375A CN110941375A (en) 2020-03-31
CN110941375B true CN110941375B (en) 2023-09-05

Family

ID=69908697

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911175802.5A Active CN110941375B (en) 2019-11-26 2019-11-26 Method, device and storage medium for locally amplifying image

Country Status (1)

Country Link
CN (1) CN110941375B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111541845B (en) * 2020-04-30 2022-06-24 维沃移动通信(杭州)有限公司 Image processing method and device and electronic equipment
CN111489295B (en) * 2020-06-29 2020-11-17 平安国际智慧城市科技股份有限公司 Image processing method, electronic device, and storage medium
CN113364976B (en) * 2021-05-10 2022-07-15 荣耀终端有限公司 Image display method and electronic equipment
CN114356191B (en) * 2022-03-04 2022-07-12 北京阿丘科技有限公司 Circuit board image display method, device, equipment and storage medium

Citations (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101510008A (en) * 2008-01-14 2009-08-19 捷讯研究有限公司 Using a shape-changing display as an adaptive lens for selectively magnifying information displayed onscreen
CN102129338A (en) * 2010-01-12 2011-07-20 宏碁股份有限公司 Image amplification method and computer system
CN102157011A (en) * 2010-12-10 2011-08-17 北京大学 Method for carrying out dynamic texture acquisition and virtuality-reality fusion by using mobile shooting equipment
CN102208171A (en) * 2010-03-31 2011-10-05 安凯(广州)微电子技术有限公司 Local detail playing method on portable high-definition video player
CN102339469A (en) * 2010-07-21 2012-02-01 腾讯科技(深圳)有限公司 Image processing method and device
CN102662566A (en) * 2012-03-21 2012-09-12 中兴通讯股份有限公司 Magnifying display method and terminal for screen content
CN103019537A (en) * 2012-11-19 2013-04-03 广东欧珀移动通信有限公司 Image preview method and image preview device
CN103076952A (en) * 2012-12-21 2013-05-01 天津三星光电子有限公司 Amplifying method and amplifying device for display contents in display interface of intelligent camera
CN103226806A (en) * 2013-04-03 2013-07-31 广东欧珀移动通信有限公司 Method and camera system for enlarging picture partially
JP2014067208A (en) * 2012-09-26 2014-04-17 Sharp Corp Image display system and control method therefor
CN104036453A (en) * 2014-07-03 2014-09-10 上海斐讯数据通信技术有限公司 Image local deformation method and image local deformation system and mobile phone with image local deformation method
CN104077387A (en) * 2014-06-27 2014-10-01 北京奇虎科技有限公司 Webpage content display method and browser device
JP2015060144A (en) * 2013-09-20 2015-03-30 株式会社Nttドコモ Map image display device
CN104750389A (en) * 2015-03-31 2015-07-01 努比亚技术有限公司 Picture displaying method and device
CN105120366A (en) * 2015-08-17 2015-12-02 宁波菊风系统软件有限公司 A presentation method for an image local enlarging function in video call
CN105155153A (en) * 2015-08-28 2015-12-16 深圳思瑞普科技有限公司 Processing method for displaying local patterns in computerized embroidery machine
CN105159581A (en) * 2015-08-27 2015-12-16 广东欧珀移动通信有限公司 Picture browsing method and mobile terminal
CN106056038A (en) * 2012-03-12 2016-10-26 佳能株式会社 Image display apparatus and image display method
CN106055247A (en) * 2016-05-25 2016-10-26 努比亚技术有限公司 Picture display device, method and mobile terminal
CN106126088A (en) * 2016-06-15 2016-11-16 青岛海信移动通信技术股份有限公司 A kind of picture amplifies the method and device of display
CN106909274A (en) * 2017-02-27 2017-06-30 努比亚技术有限公司 A kind of method for displaying image and device
CN109062405A (en) * 2018-07-23 2018-12-21 努比亚技术有限公司 Mobile terminal display methods, mobile terminal and computer readable storage medium
CN109324736A (en) * 2018-08-31 2019-02-12 阿里巴巴集团控股有限公司 The exchange method and device of partial enlargement picture
CN109901768A (en) * 2019-02-27 2019-06-18 深圳市沃特沃德股份有限公司 Amplification display method, device, storage medium and the computer equipment of interface image

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI549096B (en) * 2011-05-13 2016-09-11 華晶科技股份有限公司 Image processing device and processing method thereof

Patent Citations (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101510008A (en) * 2008-01-14 2009-08-19 捷讯研究有限公司 Using a shape-changing display as an adaptive lens for selectively magnifying information displayed onscreen
CN102129338A (en) * 2010-01-12 2011-07-20 宏碁股份有限公司 Image amplification method and computer system
CN102208171A (en) * 2010-03-31 2011-10-05 安凯(广州)微电子技术有限公司 Local detail playing method on portable high-definition video player
CN102339469A (en) * 2010-07-21 2012-02-01 腾讯科技(深圳)有限公司 Image processing method and device
CN102157011A (en) * 2010-12-10 2011-08-17 北京大学 Method for carrying out dynamic texture acquisition and virtuality-reality fusion by using mobile shooting equipment
CN106056038A (en) * 2012-03-12 2016-10-26 佳能株式会社 Image display apparatus and image display method
CN102662566A (en) * 2012-03-21 2012-09-12 中兴通讯股份有限公司 Magnifying display method and terminal for screen content
JP2014067208A (en) * 2012-09-26 2014-04-17 Sharp Corp Image display system and control method therefor
CN103019537A (en) * 2012-11-19 2013-04-03 广东欧珀移动通信有限公司 Image preview method and image preview device
CN103076952A (en) * 2012-12-21 2013-05-01 天津三星光电子有限公司 Amplifying method and amplifying device for display contents in display interface of intelligent camera
CN103226806A (en) * 2013-04-03 2013-07-31 广东欧珀移动通信有限公司 Method and camera system for enlarging picture partially
JP2015060144A (en) * 2013-09-20 2015-03-30 株式会社Nttドコモ Map image display device
CN104077387A (en) * 2014-06-27 2014-10-01 北京奇虎科技有限公司 Webpage content display method and browser device
CN104036453A (en) * 2014-07-03 2014-09-10 上海斐讯数据通信技术有限公司 Image local deformation method and image local deformation system and mobile phone with image local deformation method
CN104750389A (en) * 2015-03-31 2015-07-01 努比亚技术有限公司 Picture displaying method and device
CN105120366A (en) * 2015-08-17 2015-12-02 宁波菊风系统软件有限公司 A presentation method for an image local enlarging function in video call
CN105159581A (en) * 2015-08-27 2015-12-16 广东欧珀移动通信有限公司 Picture browsing method and mobile terminal
CN105155153A (en) * 2015-08-28 2015-12-16 深圳思瑞普科技有限公司 Processing method for displaying local patterns in computerized embroidery machine
CN106055247A (en) * 2016-05-25 2016-10-26 努比亚技术有限公司 Picture display device, method and mobile terminal
CN106126088A (en) * 2016-06-15 2016-11-16 青岛海信移动通信技术股份有限公司 A kind of picture amplifies the method and device of display
CN106909274A (en) * 2017-02-27 2017-06-30 努比亚技术有限公司 A kind of method for displaying image and device
CN109062405A (en) * 2018-07-23 2018-12-21 努比亚技术有限公司 Mobile terminal display methods, mobile terminal and computer readable storage medium
CN109324736A (en) * 2018-08-31 2019-02-12 阿里巴巴集团控股有限公司 The exchange method and device of partial enlargement picture
CN109901768A (en) * 2019-02-27 2019-06-18 深圳市沃特沃德股份有限公司 Amplification display method, device, storage medium and the computer equipment of interface image

Also Published As

Publication number Publication date
CN110941375A (en) 2020-03-31

Similar Documents

Publication Publication Date Title
CN110941375B (en) Method, device and storage medium for locally amplifying image
CN108595239B (en) Picture processing method, device, terminal and computer readable storage medium
WO2020156466A1 (en) Photographing method and terminal device
CN108449641B (en) Method, device, computer equipment and storage medium for playing media stream
CN109862412B (en) Method and device for video co-shooting and storage medium
CN108196755B (en) Background picture display method and device
CN111010512A (en) Display control method and electronic equipment
CN110225390B (en) Video preview method, device, terminal and computer readable storage medium
CN111880712A (en) Page display method and device, electronic equipment and storage medium
CN112825040B (en) User interface display method, device, equipment and storage medium
CN112565806A (en) Virtual gift presenting method, device, computer equipment and medium
CN111083526B (en) Video transition method and device, computer equipment and storage medium
CN110677713B (en) Video image processing method and device and storage medium
CN114140342A (en) Image processing method, image processing device, electronic equipment and storage medium
CN110992268B (en) Background setting method, device, terminal and storage medium
CN111370096A (en) Interactive interface display method, device, equipment and storage medium
CN113467682B (en) Method, device, terminal and storage medium for controlling movement of map covering
CN113613053B (en) Video recommendation method and device, electronic equipment and storage medium
CN114594885A (en) Application icon management method, device and equipment and computer readable storage medium
CN110335224B (en) Image processing method, image processing device, computer equipment and storage medium
CN108881715B (en) Starting method and device of shooting mode, terminal and storage medium
CN112612405A (en) Window display method, device, equipment and computer readable storage medium
CN113592874A (en) Image display method and device and computer equipment
CN112257594A (en) Multimedia data display method and device, computer equipment and storage medium
CN112732133A (en) Message processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40021087

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant