CN117666895A - Method, device, terminal and storage medium for adjusting image angle - Google Patents
Method, device, terminal and storage medium for adjusting image angle Download PDFInfo
- Publication number
- CN117666895A CN117666895A CN202311544356.7A CN202311544356A CN117666895A CN 117666895 A CN117666895 A CN 117666895A CN 202311544356 A CN202311544356 A CN 202311544356A CN 117666895 A CN117666895 A CN 117666895A
- Authority
- CN
- China
- Prior art keywords
- image
- angle
- area
- adjusting
- processing
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 110
- 238000012545 processing Methods 0.000 claims abstract description 106
- 230000006870 function Effects 0.000 claims description 48
- 230000008569 process Effects 0.000 claims description 31
- 230000009471 action Effects 0.000 claims description 28
- 230000000694 effects Effects 0.000 claims description 12
- 230000009467 reduction Effects 0.000 claims description 10
- 238000012544 monitoring process Methods 0.000 claims description 9
- 230000008859 change Effects 0.000 claims description 8
- 238000004891 communication Methods 0.000 claims description 5
- 230000008447 perception Effects 0.000 abstract description 11
- 238000010586 diagram Methods 0.000 description 14
- 238000007726 management method Methods 0.000 description 9
- 230000002159 abnormal effect Effects 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 3
- 238000003672 processing method Methods 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000000717 retained effect Effects 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 238000009966 trimming Methods 0.000 description 2
- 230000003796 beauty Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000011022 operating instruction Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011946 reduction process Methods 0.000 description 1
- 239000004984 smart glass Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
- 230000007723 transport mechanism Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction 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/04845—Interaction 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 for image manipulation, e.g. dragging, rotation, expansion or change of colour
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/60—Rotation of whole images or parts thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Human Computer Interaction (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The application provides a method, a device, a terminal and a storage medium for adjusting an image angle, wherein the method comprises the following steps: acquiring a first operation instruction of a first image to be adjusted on an image editing interface; determining rotation angle information of the first image according to the first operation instruction; performing rotation processing on the first image according to the rotation angle information to obtain a second image; and processing the second image according to a first area to obtain a third image, wherein the first area is determined according to the coverage area of the first image. In the technical scheme of the embodiment, a user can perform rotation processing at any angle on the image to be checked through the terminal, so that the image meeting the user checking requirement is obtained, the user does not need to check the image in a askew neck checking mode, and experience perception of checking the photo by the user is improved.
Description
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method, an apparatus, a terminal, and a storage medium for adjusting an image angle.
Background
The existing mobile phone and computer view the photo by rotating clockwise or anticlockwise at a fixed angle, and for the photo taken at an angle other than 90 degrees or 180 degrees, for example: the shooting angle is the photo that other abnormal angles such as 35 degrees, 110 degrees, 333 degrees were shot, and the user can't reach the user needs through terminal with above-mentioned rotatory mode rotation processing, leads to the user to need to warp the neck and look over, or the photo is editing the processing anyway and can't reach the angle that the user required normally looks over the photo, leads to the user to watch the experience perception of photo not good.
Disclosure of Invention
The present application aims to solve at least one of the technical problems existing in the prior art. Therefore, the application provides a method, a device, a terminal and a storage medium for adjusting the image angle, which can improve the experience perception of a user for viewing photos.
In a first aspect, an embodiment of the present application provides a method for adjusting an image angle, where the method includes:
the method comprises the following steps:
acquiring a first operation instruction of a first image to be adjusted on an image editing interface;
determining rotation angle information of the first image according to the first operation instruction;
Performing rotation processing on the first image according to the rotation angle information to obtain a second image;
and processing the second image according to a first area to obtain a third image, wherein the first area is determined according to the coverage area of the first image.
In some alternative embodiments, the rotation angle information is:
angle information determined according to the first operation instruction for enabling the gyroscope of the terminal to generate motion change; or,
angle information determined according to the first operation instruction acting on the first image in a terminal screen; or,
angle information determined according to the first operation instruction of the inputted text information; or,
and angle information determined according to a first operation instruction of a preset angle of a user.
In some optional embodiments, the processing the second image according to the first area to obtain a third image includes:
performing reduction processing on the first region according to the second image to obtain a second region, wherein the second region is in the range of the second image;
and cutting the second image according to the second region to obtain a third image.
In some optional embodiments, the cropping the second image according to the second area to obtain a third image includes:
acquiring first coordinate position information of the second region;
and cutting the second image according to the first coordinate position information to obtain a third image.
In some optional embodiments, the cropping the second image according to the first coordinate position information to obtain a third image includes:
generating an area frame according to the first coordinate position information;
performing image distinguishing processing on a first partial image in the second image so that the display effect of the first partial image is different from that of a second partial image, wherein the first partial image is an image, which is positioned outside the region frame, in the second image, and the second partial image is an image, which is positioned inside the region frame, in the second image;
acquiring an image determination instruction for determining the second partial image as a third image;
and responding to the image determining instruction, and clipping the second image according to the second part image to obtain a third image.
In some optional embodiments, the performing image distinguishing processing on the first partial image in the second image so that the display effect of the first partial image is different from that of the second partial image includes:
acquiring a moving instruction of the second image;
performing moving processing on the second image based on the coverage area frame according to the moving instruction to obtain a second image after the moving processing;
and performing image distinguishing processing on a first partial image in the second image after the moving processing so as to enable the display effect of the first partial image to be different from that of the second partial image.
In some optional embodiments, the first area is a rectangular area, there is an intersection point between a center line of the second image and a center line of the first area, and the first area is zoomed out according to the second image to obtain a second area, where the second area is within a range of the second image, and the method includes:
performing reduction processing on the first area according to the second image;
and in the process of the first region shrinking process, when a first end point of the first region is overlapped with the edge of the second image and all coordinates of the first region are not completely overlapped with the coordinates of the second image, the first end point is taken as a fixed point, and a second end point which is opposite to the first end point is taken as an active point, so that a second region in the range of the second image is obtained.
In some optional embodiments, the cropping process is performed on the second image according to the first area after the shrinking to obtain a third image, and the method further includes:
cutting the second image according to the second region, and amplifying the third image according to the first region to obtain a third image with the same coverage area as the first region;
and performing image top layer processing on the third image so that the third image covers other images on the terminal screen.
In some alternative embodiments, the method further comprises:
acquiring a second operation instruction for a target area in the third image;
determining a target image of the target area according to the second operation instruction;
acquiring a third operation instruction for the target image;
and adjusting the angle of the target image according to the third operation instruction to obtain a fourth image.
In a second aspect, an embodiment of the present application provides a method for adjusting an image angle, which is applied to a terminal, where the terminal includes a gyro sensor, and the method includes:
when judging that the state of a first image is an open state by calling an album management function, displaying the first image in a vertical state;
Acquiring an object of the gyroscope sensor through a sensor management module;
monitoring the offset angle value of the gyroscope sensor through a sensing monitoring method in a sensor management module;
inputting an offset angle value of the gyroscope sensor into an angle function of the first image so as to rotate the angle of the first image;
and when receiving the determining instruction, performing clipping processing of avoiding the square image on the rotated first image at the original image ratio through a clipping function.
In a third aspect, an embodiment of the present application provides a method for adjusting an image angle, which is applied to a terminal, where the terminal includes a touch screen, and the method includes:
determining a touch action of the touch screen through a touch event class function under the condition that the state of the first image is judged to be an open state by calling an album management function;
determining an adjustment angle value according to the touch action;
inputting the angle adjustment value into an angle function of the first image to rotate the angle of the first image;
and when receiving the determining instruction, performing clipping processing of avoiding the square image on the rotated first image at the original image ratio through a clipping function.
In a fourth aspect, an embodiment of the present application provides an apparatus for adjusting an image angle, including:
the acquisition module is configured to acquire a first operation instruction of a first image to be adjusted on the image editing interface;
a determining module configured to determine rotation angle information for the first image according to the first operation instruction;
the rotation module is configured to rotate the first image according to the rotation angle information to obtain a second image;
and the processing module is configured to process the second image according to a first area to obtain a third image, and the first area is determined according to the coverage area of the first image.
In some alternative embodiments, the processing module is further configured to:
the shrinking module is configured to shrink the first area according to the second image to obtain a second area, and the second area is in the range of the second image;
and the clipping module is configured to clip the second image according to the second area to obtain a third image.
In some alternative embodiments, the clipping module is further configured to:
A coordinate module configured to acquire first coordinate position information of the second region;
and the cutting module is configured to cut the second image according to the first coordinate position information to obtain a third image.
In some alternative embodiments, the trimming module is further configured to:
a generation module configured to generate an area frame according to the first coordinate position information;
the distinguishing module is configured to perform image distinguishing processing on a first partial image in the second image so that the display effect of the first partial image is different from that of a second partial image, wherein the first partial image is an image, which is positioned outside the region frame, in the second image, and the second partial image is an image, which is positioned inside the region frame, in the second image;
a determining module configured to acquire an image determining instruction to determine the second partial image as a third image;
and the cropping sub-module is configured to respond to the image determining instruction, and crop the second image according to the second partial image to obtain a third image.
In some alternative embodiments, the differentiating module is further configured to:
An instruction acquisition module configured to acquire a movement instruction of the second image;
the moving module is configured to perform moving processing on the second image based on the coverage area frame according to the moving instruction, so as to obtain the second image after the moving processing;
and the area sub-module is configured to perform image distinguishing processing on a first partial image in the second image after the moving processing so as to enable the display effect of the first partial image to be different from that of the second partial image.
In some alternative embodiments, the scaling module is further configured to: performing reduction processing on the first area according to the second image; and in the process of the first region shrinking process, when a first end point of the first region is overlapped with the edge of the second image and all coordinates of the first region are not completely overlapped with the coordinates of the second image, the first end point is taken as a fixed point, and a second end point which is opposite to the first end point is taken as an active point, so that a second region in the range of the second image is obtained.
In some optional embodiments, the apparatus further includes a magnification module configured to magnify the third image according to the first region, to obtain a third image having a coverage area identical to the first region; and performing image top layer processing on the third image so that the third image covers other images on the terminal screen.
In some alternative embodiments, the system further comprises a character image adjustment module configured to: acquiring a second operation instruction for a target area in the third image; determining a target image of the target area according to the second operation instruction; acquiring a third operation instruction for the target image; and adjusting the angle of the target image according to the third operation instruction to obtain a fourth image.
In a fifth aspect, embodiments of the present application provide a terminal comprising at least one control processor and a memory for communicatively coupling with the at least one control processor; the memory stores instructions executable by the at least one control processor to enable the at least one control processor to perform the method of adjusting an image angle as described in the first aspect above.
In a sixth aspect, embodiments of the present application provide a computer-readable storage medium storing computer-executable instructions for performing the method of adjusting an image angle as described in the first aspect above.
The method for adjusting the image angle has at least the following beneficial effects: the terminal is provided with a function of rotating the image at any angle, a user can adjust the angle of the image in a mode of inputting various different instructions, and when the user needs to adjust the photos shot at the abnormal angle, the user can operate according to different functional instruction settings of the terminal. And acquiring a first operation instruction of a first image to be adjusted by a user at the image editing interface, determining rotation angle information of the first image according to the first operation instruction, performing rotation processing on the first image according to the acquired rotation angle information to obtain a second image, wherein the content of the second image is consistent with that of the first image, but the angle of the second image is different from that of the second image, determining a first area based on the covered area of the first image, namely processing the second image at the angle of the first image to obtain a third image which has the same coverage area as the first area and meets the viewing requirement angle of the user, and displaying the third image to the user through a screen. In the technical scheme of the embodiment, a user can perform rotation processing at any angle on the image to be checked through the terminal, so that the image meeting the user checking requirement is obtained, the user does not need to check the image in a askew neck checking mode, and experience perception of checking the photo by the user is improved.
Drawings
FIG. 1 is a schematic diagram of a method for adjusting an image angle according to one embodiment of the present application;
FIG. 2 is a flow chart of a method of adjusting an image angle according to one embodiment of the present application;
FIG. 3 is a schematic diagram of a first operation instruction based on a swipe gesture in a method of adjusting an image angle according to an embodiment of the application;
FIG. 4 is a schematic diagram of a first operation instruction based on adjusting the gesture of a terminal in a method for adjusting an image angle according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a first operating instruction based on a virtual gyroscope in a method of adjusting an image angle according to one embodiment of the present application;
FIG. 6 is a schematic diagram of a first operation instruction based on an input box in a method of adjusting an image angle according to one embodiment of the present application;
FIG. 7 is a schematic diagram of generating a second image in a method of adjusting an image angle according to one embodiment of the present application;
FIG. 8 is a schematic diagram of generating a third image in a method of adjusting an image angle according to one embodiment of the present application;
FIG. 9 is a schematic diagram of generating a third image in a method of adjusting an image angle according to another embodiment of the present application;
FIG. 10 is a schematic diagram of adjusting image content of a third image in a method of adjusting image angle according to one embodiment of the present application;
FIG. 11 is a schematic diagram of generating a third image in a method of adjusting an image angle according to another embodiment of the present application;
FIG. 12 is a flow chart of a method of adjusting an image angle according to another embodiment of the present application;
FIG. 13 is a flow chart of a method of adjusting an image angle according to another embodiment of the present application;
FIG. 14 is a schematic view of an apparatus for adjusting an image angle according to an embodiment of the present application;
fig. 15 is a block diagram of a terminal according to another embodiment of the present application.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for the purpose of explaining the present application and are not to be construed as limiting the present application.
In the description of the present application, it should be understood that references to orientation descriptions, such as directions of up, down, front, back, left, right, etc., are based on the orientation or positional relationship shown in the drawings, are merely for convenience of describing the present application and simplifying the description, and do not indicate or imply that the apparatus or element referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present application.
In the description of the present application, the meaning of a number is one or more, the meaning of a number is two or more, greater than, less than, exceeding, etc. are understood to not include the present number, and the meaning of a number above, below, within, etc. are understood to include the present number. The description of the first and second is for the purpose of distinguishing between technical features only and should not be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the description of the present application, unless explicitly defined otherwise, terms such as arrangement, installation, connection, etc. should be construed broadly and the specific meaning of the terms in the present application can be reasonably determined by a person skilled in the art in combination with the specific contents of the technical solution.
For clarity and conciseness in the description of the following embodiments, a brief description of the related art will be given first:
various types of terminal devices (such as mobile phones, tablet computers, notebook computers and the like) support an image display function, when a user needs to view a certain image in a gallery of the terminal device, the image can be selected, and the terminal device displays a corresponding image based on the selection of the user.
When a user needs to process an image, for example, angle rotation process is performed on the image, a filter is added to the image, brightness of the image is adjusted, the image comprises portrait content, and beauty process can be performed on the portrait.
In the related art, when a user processes an image, a terminal device first displays the image according to the user's selection, and then adjusts an image currently displayed in a screen according to the user's processing operation, so that the screen of the terminal device adjusts the currently displayed image to a user-processed image.
In some embodiments, the terminal device may be a smart phone, and after the user selects a certain landscape image or an image of a person+landscape in the terminal device, the terminal device displays the image, and then the terminal device receives a processing operation performed on the image by the user, where the processing operation on the image is an angle of rotating the image, and after the processing operation is received, the image displayed by the terminal device is an image after the angle of rotation.
As can be seen from the above description of the prior art, in the prior art, the terminal device can only adjust the image with the adjustment unit having a rotation angle of 90 degrees, and for a photograph taken with an angle other than 90 degrees or 180 degrees, for example: the shooting angles are pictures shot at other abnormal angles such as 35 degrees, 110 degrees and 333 degrees, and even if the user adjusts the image for many times, the angle suitable for viewing the image cannot be obtained.
Aiming at the problem that in the prior art, after processing an image, a user cannot obtain the image conforming to the viewing angle, the embodiment of the application provides a method, a device, a terminal and a storage medium for adjusting the image angle.
The terminal device in the embodiment of the present application may be a terminal device having an image display function and an image editing function. In some embodiments, the terminal device may be a device capable of displaying images, such as a mobile phone, a tablet computer, a desktop, a laptop, a notebook, an ultra mobile personal computer (Ultramobile Personal Computer, UMPC), a handheld computer, a netbook, a personal digital assistant (Personal Digital Assistant, PDA), a wearable electronic device, and a smart watch, and the specific form of the terminal device is not particularly limited in this application.
In the present application, a method, an apparatus, a terminal, and a computer-readable storage medium for adjusting an image angle are provided, and are described in detail in the following embodiments.
Referring to fig. 1, at an image editing interface, a terminal side obtains a first operation instruction of a first image 110 to be adjusted by a user, then determines rotation angle information α of the first image 110 according to the first operation instruction, then performs rotation processing on the first image 110 according to the obtained rotation angle information α to obtain a second image 120, the content of the second image 120 is consistent with that of the first image 110, but the angle of the second image 120 is different from that of the second image 120, then determines a first area based on a covered area of the first image 110, that is, processes the second image 120 by the angle of the first image 110 to obtain a third image 130 which has the same coverage area as the first area and meets a user viewing requirement angle, and displays the third image to the user through a screen. In the technical scheme of the embodiment, a user can perform rotation processing at any angle on the image to be checked through the terminal, so that the image meeting the user checking requirement is obtained, the user does not need to check the image in a askew neck checking mode, and experience perception of checking the photo by the user is improved.
Referring to fig. 2, fig. 2 is a flowchart of a method for adjusting an image angle according to an embodiment of the present application, where the method for adjusting an image angle includes, but is not limited to, the following steps:
step S21, acquiring a first operation instruction of a first image to be adjusted in an image editing interface.
Specifically, a terminal to which the method for adjusting the angle of the image is applied is provided with a function of rotating the image at any angle, and a user can adjust the angle of the image in a plurality of different ways of inputting instructions. When a user encounters a photograph shot at an abnormal angle in the process of viewing an image and needs to adjust the photograph shot at the abnormal angle, the user can set and operate according to different functional instructions of the terminal, for example, in an image editing interface aiming at a first image, and the user can adjust the display angle of the first image on a screen by carrying out a first operation instruction on the first image.
The first operation instruction corresponds to an operation instruction of the user on the first image after the terminal enters the image editing interface related to the first image, and the first operation instruction may be an operation instruction of the user on a terminal screen or may be other operation instructions on the terminal. For example, it may be an instruction generated from a user's finger-swipe event of a first image in a terminal screen; for another example, the instruction may be generated from a user's finger swipe event of a virtual gyroscope generated on an image editing interface; for another example, the instruction may be generated according to an event in which the user adjusts the posture of the terminal to change the motion state of the gyroscope in the terminal; for another example, the instruction may be generated based on an event of the rotation angle value of the first image input by the user on the image editing interface. The present embodiment is not particularly limited thereto.
Step S22, rotation angle information of the first image is determined according to the first operation instruction.
Specifically, the terminal may analyze the first operation instruction through the processor according to different first operation instruction conditions, and determine that the user needs to perform rotation angle information on the first image, where the operation of the step is processed by the processor background and is not perceived by the user side. Performing angle adjustment control on a first image in a screen by a finger, for example, so as to determine rotation angle information according to specific actions; determining rotation angle information for the first image by, for example, rotating the attitude of the terminal to change the gyroscope motion variations; for example, the angle of the virtual gyroscope arranged on the screen is adjusted and controlled to determine the rotation angle information of the first image angle; for example, an angle adjustment text input box for the first image is set on the screen, rotation angle information of the first image is determined by inputting data in the text input box, and rotation angle information for the first image is determined according to the angle information preset by the user.
In some alternative embodiments, referring to fig. 3, a rotation action is applied to a first image to be adjusted in a screen by two fingers, first position information is recorded at the moment that the two fingers contact the screen, one finger is used as a fulcrum, a curve generated in the process of rotating the other finger on the screen is used as a center of a circle, two ends of the curve are connected with the center of the circle according to the center of the circle, a sector is generated, and rotation angle information of the first image is determined by reading the angle of the sector.
In some alternative embodiments, referring to fig. 4, after the first image is opened, data of a gyroscope of the terminal is determined as initial data based on the time of opening the first image, and then the angle of the terminal is rotated to change the gyroscope data, current data of the gyroscope is obtained, and rotation angle information of the first image is determined according to the difference between the current data of the gyroscope and the initial data.
In some alternative embodiments, referring to fig. 5, after the first image is opened, an image editing interface of the first image may be accessed, then a virtual gyroscope 510 is provided on the image editing interface, and the rotation angle information of the first image may be determined by clicking the virtual gyroscope 510 on a screen with a finger and performing a sliding action.
In some alternative embodiments, referring to fig. 6, after the first image is opened, an image editing interface of the first image may be accessed, and then an angle input box 610 is provided on the image editing interface, and rotation angle information of the first image may be input to the angle input box 610 on the screen by a finger.
Step S23, performing rotation processing on the first image according to the rotation angle information to obtain a second image.
Specifically, referring to fig. 7, after determining rotation angle information α about the first image 110 to be adjusted determined by a related instruction input by a user at the terminal, the terminal background processor performs rotation processing on the first image 110 according to the rotation angle information α, so as to obtain a second image 120 meeting an angle requirement input by the user.
The process of changing the second image may be displayed on the screen, or may be simply image data of one process in the background, which is not particularly limited in this embodiment, and may be set according to actual situations.
And step S24, processing the second image according to the first area to obtain a third image, wherein the first area is determined according to the coverage area of the first image.
Specifically, in the second image obtained after the rotation processing is performed on the first image, since the second image is mainly only the change of the image display angle relative to the first image, the first image displayed on the screen of the terminal is generally consistent with the size of the screen or the display screen of the image in the image editing interface, and the area covered by the first image on the screen of the terminal is determined as the first area, therefore, part of the second image is located in the first area, and the other part of the second image is located outside the first area, if the second image is not edited further, the second image displayed on the screen is an incomplete image, so that the user experience perception is bad. Therefore, the second image needs to be processed according to the first area, so that a third image with the same coverage area as the first area and meeting the viewing requirement angle of the user is obtained, and the third image is displayed to the user through the screen. In the technical scheme of the embodiment, a user can perform rotation processing at any angle on the image to be checked through the terminal, so that the image meeting the user checking requirement is obtained, the user does not need to check the image in a askew neck checking mode, and experience perception of checking the photo by the user is improved.
In some alternative embodiments, referring to fig. 8, the process of processing the second image 120 to obtain the third image 150 may be that, without changing the angle of the first area 130, the first area 130 is first subjected to a reduction process according to the second image 120 to obtain a second area within the coverage area of the second image 120, then the second image 120 is subjected to a clipping process according to the second area to obtain the third image 150, after the size of the third image 150 obtained after clipping is enlarged to be consistent with the size of the first area 130, the third image 150 is displayed through a screen, specifically, the third image 150 obtained after the enlargement process is enlarged according to the first area 130, then the third image 150 is subjected to an image top layer process, so that the third image 150 covers other images on the terminal screen, and the third image 150 can be completely presented to the user for viewing.
In some alternative embodiments, the third image may not be magnified to facilitate editing of other stitched images by a subsequent user. The embodiment is not particularly limited, and may be set according to an actual application scenario.
In some alternative embodiments, referring to fig. 9, in general, the first area 130 is matched with the screen size of the terminal, that is, the first area 130 is a rectangular area, there is an intersection point between the center line of the second image 120 and the center line of the first area 130, the first area 130 is scaled down according to the second image 120 to obtain the second area 140, the second area 140 may be in the range of the second image 120 by scaling down the first area 130 according to the second image 120, then during the scaling down process of the first area 130, the first end 910 of the first area 130 coincides with the edge of the second image 120, at this time, if all coordinates of the first area 130 do not completely coincide with the coordinates of the second image 120, it is proved that there is an end point outside the second image 120 in the first area 130, then the first end 910 may be regarded as a fixed point, and the second end 920 diagonally opposite to the first end 910 may be regarded as an active point to be scaled down in an equal proportion to obtain the second area 140 in the range of the second image 120. Then the second image 120 is subsequently cropped based on the second region 140, which ensures that the image content of the cropped third image 150 is the image content of the second image 120.
It should be noted that, the clipping method may be that, after the first coordinate position information of the first area is obtained after the shrinking, the first coordinate position information is the coordinate information of the frame of the first area, clipping is performed on the second image according to the first coordinate position information, so as to obtain a third image; or the first coordinate position information may be coordinate information of all points in the first area, and coordinate points other than the first coordinate position information on the second image may be removed according to the first coordinate position information, so as to obtain the third image.
In some alternative embodiments, the second image is an image obtained by rotating about a midpoint of the first image as a rotation point, so that in the process of performing reduction processing on the first area based on the rotation point, as long as one of four endpoints of the first area coincides with an edge of the second image, an endpoint of an opposite end of the endpoint also coincides with another edge of the second image, in the process of reducing, only the endpoint of a third first area coincides with the edge, then the second area obtained at this time is necessarily within the range of the second image and is the maximized area, and then the image content of the third image obtained by performing subsequent cutting processing on the second image based on the second area is the most reserved.
In some alternative embodiments, referring to fig. 10, in a case where the continued editing function needs to be retained for the rotated second image 120, in order for the user to better select the content of the second image 120 that needs to be retained, an area frame is generated according to the first coordinate position information, and then an image distinguishing process is performed on a first partial image in the second image 120, so that the display effect of the first partial image is different from that of the second partial image, where the first partial image is an image outside the area frame in the second image 120, and the second partial image is an image inside the area frame in the second image 120, for example: the second partial image can be clearly displayed, and the first partial image can be displayed in a blurring manner; then, if the user can perform the related determination instruction operation without continuing editing, the terminal acquires an image determination instruction to determine the second partial image as the third image 150, and then, in response to the image determination instruction, the terminal performs clipping processing on the second image 120 from the second partial image, thereby obtaining the third image 150. If the user needs to continuously edit the second image 120, the user may input a movement instruction to the second image 120, then the terminal may acquire the movement instruction of the second image 120, then the terminal may perform movement processing based on a coverage area frame on the second image 120 according to the movement instruction to obtain the second image 120 after the movement processing, where the number of times of editing by the user may be multiple, and the user may move according to his own needs to change the image content displayed in the area frame, and perform image distinguishing processing on the first partial image in the second image 120 after the movement processing, so that the display effect of the first partial image is different from that of the second partial image, and of course, the user may perform translation processing on the second image 120, and in this interface, the user may still perform rotation processing on the second image 120; when the user does not need to edit the second image 120 any more, a determining instruction may be input to the terminal, and the terminal may determine that the image of the second image 120 in the region frame is the third image 150 according to the determining instruction, and perform the enlarging process on the third image 150, to obtain an image having the same size as the first region and the same image content as the third image 150.
In some alternative embodiments, in addition to adjusting the angle of the entire image, the target image in the image may be adjusted, for example, the user may be satisfied with the angle of the background of the image, but not with the angle of the person image in the image, and then the angle of the person in the third image may be simply adjusted. Specifically, a second operation instruction for a target area in the third image is acquired first, for example, long-press is performed on an area where a person in the third image is located; then determining a target image of the target area according to the second operation instruction, namely selecting an image corresponding to the person in the third image; acquiring a third operation instruction for the target image, namely, an instruction for performing rotation processing on the selected character image; and then, according to a third operation instruction, adjusting the angle of the target image to obtain a fourth image after the angle of the person image is processed, so that fusion transition processing can be carried out on the background of the fourth image after the angle of the person image is adjusted and the person image.
In some alternative embodiments, referring to fig. 11, on the image editing interface, the terminal receives a first operation instruction for the first image 110 to be adjusted, the first operation instruction including rotation angle information; the terminal displays a third image 150 on a screen of the terminal in response to the first operation instruction, the third image 150 being an image generated by processing the first image 110 according to the rotation angle information. The method for generating the third image 150 includes: performing rotation processing on the first image 110 according to the rotation angle information to obtain a second image 120; clipping the second image 120 according to the first area 130 to obtain a third image 150, wherein the first area 130 is determined according to the coverage area of the first image 110; the third image 150 is magnified to the size of the first region 130, resulting in a third image 150. By the processing manner of the embodiment, the user only needs to perform the first operation instruction on the first image 110 on the terminal screen, so that the terminal can perform image processing on the first image 110 in the background and directly display the rotated third image 150 on the terminal screen.
In the method for adjusting the angle of the image, the terminal is provided with the function of rotating the image at any angle, the angle of the image can be adjusted by a user through various different modes of inputting instructions, and when the user needs to adjust the photos shot at the abnormal angle, the user can set and operate according to different functional instructions of the terminal. The terminal side obtains rotation angle information of a first image to be adjusted, which is input by a user, then rotates the first image according to the obtained rotation angle information to obtain a second image, the content of the second image is consistent with that of the first image, the angle of the second image is different from that of the second image, then a first area is determined based on the covered area of the first image, namely the second image is processed by the angle of the first image, a third image with the coverage area identical to that of the first area and meeting the viewing requirement angle of the user is obtained, and the third image is displayed to the user through a screen. In the technical scheme of the embodiment, a user can perform rotation processing at any angle on the image to be checked through the terminal, so that the image meeting the user checking requirement is obtained, the user does not need to check the image in a askew neck checking mode, and experience perception of checking the photo by the user is improved.
Referring to fig. 12, fig. 12 is a flowchart of another method for adjusting an image angle according to an embodiment of the present application, where the method for adjusting an image angle includes, but is not limited to, the following steps:
s121, when the state of the first image is judged to be an open state by calling an album management function, the first image is displayed in a vertical state;
s122, acquiring an object of a gyroscope sensor through a sensor management module;
s123, monitoring the offset angle value of the gyroscope sensor through a sensing monitoring method in the sensor management module;
s124, inputting the offset angle value of the gyroscope sensor into an angle function of the first image so as to rotate the angle of the first image;
s125, when a determination instruction is received, clipping processing of avoiding square images is performed on the rotated first image at the original image ratio through a clipping function.
In some alternative embodiments, firstly, an isalbumOpened () function (album management function) is called to judge whether the first image is opened, and if the first image is judged to have been opened, if the terminal is in a non-horizontal state, the user rotates the terminal, then the first image is kept in a vertical state according to the mobile phone gyroscope; then, a sensor manager is called to acquire an object of the gyro sensor, an event of the gyro sensor is monitored by using an onsensor changed () method (a sensing monitoring method), so that an offset angle value of the gyro sensor is acquired, the acquired offset angle value is used as a parameter and is transmitted into a setRotation function (an angle function of a first image) to perform real-time rotation processing on the first image until a satisfactory position, a user can save the rotated first image by inputting a determining instruction on a terminal screen, a rotation potential avoidance square photo of the rotated first image is cut, an original cutting function Captruesescreen is called, and the target image is obtained by cutting according to the ratio of the original image.
The user can carry out rotation processing through the gesture to the terminal to change the offset angle of gyroscope sensor and in order to carry out the rotation processing of arbitrary angle to the image that needs to look over, in order to obtain the image that accords with the user and look over the requirement, make the user not need look over the image through the mode that askew neck was looked over, improve the user and look over the experience perception of photo.
Referring to fig. 13, fig. 13 is a flowchart of another method for adjusting an image angle according to an embodiment of the present application, where the method for adjusting an image angle includes, but is not limited to, the following steps:
s131, determining a touch action of the touch screen through a touch event class function under the condition that the state of the first image is judged to be an open state by calling an album management function;
s132, determining an adjustment angle value according to the touch action;
s133, inputting the adjustment angle value into an angle function of the first image to rotate the angle of the first image;
s134, when a determination instruction is received, clipping processing of avoiding square images is performed on the rotated first image according to the original image ratio through a clipping function.
In some alternative embodiments, the angle of the photograph is adjusted by manually adjusting the puck in the editing mode, taking the horizontal orientation of the terminal on the desktop as an example. Firstly, an isalbumOpened () function is called to judge whether a first image is opened, then an ispotoInEditMode () function is called to judge whether a terminal is in an image editing state, if the terminal is judged to be in the image editing state, a compass for adjusting the angle of a photo is directly called to trigger and display, a touch action of a touch screen is determined through a touch event type function, when the touch action is an action of a user through adjusting the angle on the compass, an adjustment angle value can be determined according to the touch action, so that offset processing can be carried out on the angle of the first image according to the adjustment angle value, then the angle of the first image can be continuously calibrated and rotated through a manual interface, finally the angle is obtained and setrotationis called until the rotated first image is saved in a satisfactory position, then a square photo is avoided in the rotating state of the rotated first image, an original ecological cutting function CapteCreen is called, and cutting is carried out according to the ratio of the original photo, and a target image is obtained.
In some alternative embodiments, examples are when the terminal is in a non-editing state. Firstly calling an isalbumOpened () function to judge whether a first image is opened or not, then calling a motionEvent function (touch event function) to monitor a terminal touch screen to judge the touch Action of a finger, when the Action type is action_move, calculating the distance between two touch points, if the distance is greater than a preset threshold value (such as 100 pixel values), the terminal can consider that the finger generates a sliding Action on the touch screen, triggering a compass for adjusting the first image on the touch screen according to the sliding Action, enabling a user to offset a photo by adjusting the angle on the compass, namely, when the touch Action is the Action of the user by adjusting the angle on the compass, determining an adjustment angle value according to the touch Action, so as to offset the angle of the first image according to the adjustment angle value, then further calibrating the angle of the first image through a manual interface, finally obtaining the angle and calling the setration (angle) until the satisfied position stores the first image after the rotation processing, then conducting cutting-out of the first image after the rotation processing, conducting cutting-out of the original image after the rotation processing, calling the ecological crop function according to the original cut-out function, and obtaining the original cut-out target image.
In some alternative embodiments, examples are when the terminal is in a non-editing state. Firstly calling an isalbumOpened () function to judge whether a first image is opened or not, then calling a motionEvent function (touch event function), monitoring a terminal touch screen to judge the touch Action of fingers, when the Action type is an action_move, calculating the distance between two touch points, if the distance is larger than a preset threshold value (such as a 100 pixel value), the terminal can consider that a finger generates a sliding Action on the touch screen, triggering the sliding Action to enter an angle editing state of the first image according to the sliding Action, when the sliding Action obtained by monitoring the terminal touch screen is used for applying a rotation Action to the first image to be adjusted in the screen through two fingers, namely, recording first position information at the moment that two fingers touch the screen, wherein one finger is used as a fulcrum, when the other finger acts on a curve generated in the rotation process on the screen, connecting the two ends of the curve with the circle center, generating a fan-shaped adjusting angle value of the first image, calling the setrotting angle value to offset the angle of the first image, performing a rotation adjustment to the angle of the first image according to the angle, further performing a rotation angle adjustment to the first position adjustment to the trigger angle value, and then performing a satisfactory adjustment to the picture rotation angle adjustment to the first image, and then calling the position adjustment to the position of the first image by the trigger angle.
It should be noted that, the steps of clipping the square photo by performing rotation potential avoidance on the first image after rotation processing, calling the original clipping function CaptrueScreen, clipping according to the ratio of the original image, and obtaining the target image are specifically as follows: the method comprises the steps of defining a region covered by a first image before rotation adjustment as a first region, carrying out reduction processing on the first region according to the first image after rotation processing under the condition that the angle of the first region is not changed to obtain a second region within the coverage range of the first image after rotation processing, and then carrying out clipping processing on the first image after rotation processing according to the second region to obtain a target image.
It should be noted that, after the size of the target image obtained after clipping is enlarged to be consistent with the size of the first area, the target image is displayed through a screen, specifically, the target image is enlarged according to the first area, the enlarged target image which is consistent with the size of the first area is obtained, and then the target image is subjected to image top layer processing, so that the target image covers other images on the terminal screen, and the target image can be completely presented to a user for viewing.
The user can conduct rotation processing at any angle on the image to be checked through the touch action of the touch screen of the terminal, so that the image meeting the check requirement of the user is obtained, the user does not need to check the image in a mode of checking the image through a skewback, and experience perception of checking the photo by the user is improved.
Corresponding to the above method embodiments, the present application further provides an embodiment of an apparatus for adjusting an image angle, and fig. 14 shows a schematic structural diagram of an apparatus for adjusting an image angle according to an embodiment of the present application. As shown in fig. 14, the apparatus includes:
the acquiring module 1410 is configured to acquire, at the image editing interface, a first operation instruction of a first image to be adjusted;
a determination module 1430 configured to determine rotation angle information for the first image according to the first operation instruction;
a rotation module 1420 configured to perform rotation processing on the first image according to the rotation angle information to obtain a second image;
the processing module 1440 is configured to process the second image according to the first area, so as to obtain a third image, where the first area is determined according to the coverage area of the first image.
In some alternative embodiments, the processing module 1440 is further configured to:
The reduction module is configured to perform reduction processing on the first area according to the second image to obtain a second area, wherein the second area is in the range of the second image;
and the clipping module is configured to clip the second image according to the reduced first area to obtain a third image.
In some alternative embodiments, the clipping module is further configured to:
the coordinate module is configured to acquire first coordinate position information of the reduced first area;
and the cutting module is configured to cut the second image according to the first coordinate position information to obtain a third image.
In some alternative embodiments, the trimming module is further configured to:
a generation module configured to generate an area frame according to the first coordinate position information;
the distinguishing module is configured to perform image distinguishing processing on a first partial image in the second image so that the display effect of the first partial image is different from that of the second partial image, wherein the first partial image is an image, outside the region frame, in the second image, and the second partial image is an image, inside the region frame, in the second image;
a determination module 1430 configured to acquire an image determination instruction to determine the second partial image as a third image;
And the cropping sub-module is configured to respond to the image determining instruction, and crop the second image according to the second part of the image to obtain a third image.
In some alternative embodiments, the differentiating module is further configured to:
an instruction acquisition module 1410 configured to acquire a movement instruction of the second image;
the mobile module is configured to perform mobile processing based on the coverage area frame on the second image according to the mobile instruction to obtain a mobile processed second image;
and the area sub-module is configured to perform image distinguishing processing on the first partial image in the second image after the moving processing so as to enable the display effect of the first partial image to be different from that of the second partial image.
In some alternative embodiments, the scaling module is further configured to: performing reduction processing on the first area according to the second image; in the process of the first region shrinking process, a first end point of the first region is overlapped with the edge of the second image, and when all coordinates of the first region are not completely overlapped with the coordinates of the second image, the first end point is taken as a fixed point, and a second end point which is opposite to the first end point is taken as an active point, so that the second region in the range of the second image is obtained.
In some optional embodiments, the image processing device further comprises a magnifying module configured to magnify the third image according to the first area, so as to obtain a third image with the same coverage area as the first area; and performing image top layer processing on the third image so that the third image covers other images on the terminal screen.
In some alternative embodiments, the system further comprises a character image adjustment module configured to: acquiring a second operation instruction for a target area in a third image; determining a target image of the target area according to the second operation instruction; acquiring a third operation instruction for the target image; and adjusting the angle of the target image according to the third operation instruction to obtain a fourth image.
In the device for adjusting the image angle, through setting the function of rotating the image at any angle to the terminal, the user can adjust the angle of the image in a mode of inputting various different instructions, and when the user needs to adjust the photos shot at the abnormal angle, the user can set and operate according to different functional instructions of the terminal. The terminal side obtains rotation angle information of a first image to be adjusted, which is input by a user, then rotates the first image according to the obtained rotation angle information to obtain a second image, the content of the second image is consistent with that of the first image, the angle of the second image is different from that of the second image, then a first area is determined based on the covered area of the first image, namely the second image is processed at the angle of the first image, a third image meeting the viewing requirement angle of the user is obtained, and the third image is displayed to the user through a screen. In the technical scheme of the embodiment, a user can perform rotation processing at any angle on the image to be checked through the terminal, so that the image meeting the user checking requirement is obtained, the user does not need to check the image in a askew neck checking mode, and experience perception of checking the photo by the user is improved.
The above is a schematic scheme of an apparatus for adjusting an image angle of the present embodiment. It should be noted that, the technical solution of the device for adjusting an image angle and the technical solution of the method for adjusting an image angle belong to the same concept, and details of the technical solution of the device for adjusting an image angle, which are not described in detail, can be referred to the description of the technical solution of the method for adjusting an image angle.
As shown in fig. 15, fig. 15 shows a block diagram of a terminal 1500 according to an embodiment of the present application. The components of the terminal 1500 include, but are not limited to, a memory 1510 and a processor 1520. Processor 1520 is coupled to memory 1510 via bus 1530 and database 1550 is used to hold data.
Terminal 1500 also includes an access device 1540, the access device 1540 enabling the terminal 1500 to communicate via one or more networks 1560. Examples of such networks include the Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. Access device 1540 may include one or more of any type of network interface, wired or wireless (e.g., a Network Interface Card (NIC)), such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide interoperability for microwave access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the present application, the above-described components of the terminal 1500 and other components not shown in fig. 15 may also be connected to each other, for example, through a bus. It should be understood that the block diagram of the electronic device shown in fig. 15 is for exemplary purposes only and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as desired.
The terminal 1500 may be any type of stationary or mobile electronic device, including a mobile computer or mobile electronic device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), mobile telephone (e.g., smart phone), wearable electronic device (e.g., smart watch, smart glasses, etc.), or other type of mobile device, or a stationary electronic device such as a desktop computer or PC. The terminal 1500 may also be a mobile or stationary server.
Wherein the processor 1520 is configured to execute computer-executable instructions of an object processing method.
The foregoing is a schematic illustration of a computing device of this embodiment. It should be noted that, the technical solution of the computing device and the technical solution of the object processing method belong to the same concept, and details of the technical solution of the computing device, which are not described in detail, can be referred to the description of the technical solution of the object processing method.
The embodiment of the application also provides a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, and the computer program realizes the method for adjusting the image angle when being executed by a processor.
The memory, as a non-transitory computer readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory remotely located relative to the processor, the remote memory being connectable to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The apparatus embodiments described above are merely illustrative, in which the elements illustrated as separate components may or may not be physically separate, implemented to reside in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically include computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and may include any information delivery media.
While the preferred embodiments of the present application have been described in detail, the present application is not limited to the above embodiments, and various equivalent modifications and substitutions can be made by those skilled in the art without departing from the spirit and scope of the present application, and these equivalent modifications and substitutions are intended to be included in the scope of the present application as defined in the appended claims.
Claims (14)
1. A method of adjusting an angle of an image, the method comprising:
acquiring a first operation instruction of a first image to be adjusted on an image editing interface;
determining rotation angle information of the first image according to the first operation instruction;
performing rotation processing on the first image according to the rotation angle information to obtain a second image;
and processing the second image according to a first area to obtain a third image, wherein the first area is determined according to the coverage area of the first image.
2. The method for adjusting an image angle according to claim 1, wherein the rotation angle information is:
angle information determined according to the first operation instruction for enabling the gyroscope of the terminal to generate motion change; or,
angle information determined according to the first operation instruction acting on the first image in a terminal screen; or,
Angle information determined according to the first operation instruction of the inputted text information; or,
and angle information determined according to a first operation instruction of a preset angle of a user.
3. The method for adjusting an image angle according to claim 1 or 2, wherein the processing the second image according to the first region to obtain a third image includes:
performing reduction processing on the first region according to the second image to obtain a second region, wherein the second region is in the range of the second image;
and cutting the second image according to the second region to obtain a third image.
4. A method for adjusting an image angle according to claim 3, wherein the cropping the second image according to the second region to obtain a third image comprises:
acquiring first coordinate position information of the second region;
and cutting the second image according to the first coordinate position information to obtain a third image.
5. The method for adjusting an image angle according to claim 4, wherein the cropping the second image according to the first coordinate position information to obtain a third image comprises:
Generating an area frame according to the first coordinate position information;
performing image distinguishing processing on a first partial image in the second image so that the display effect of the first partial image is different from that of a second partial image, wherein the first partial image is an image, which is positioned outside the region frame, in the second image, and the second partial image is an image, which is positioned inside the region frame, in the second image;
acquiring an image determination instruction for determining the second partial image as a third image;
and responding to the image determining instruction, and clipping the second image according to the second part image to obtain a third image.
6. The method according to claim 5, wherein the performing image distinguishing processing on the first partial image in the second image so that the display effect of the first partial image is different from that of the second partial image, includes:
acquiring a moving instruction of the second image;
performing moving processing on the second image based on the coverage area frame according to the moving instruction to obtain a second image after the moving processing;
and performing image distinguishing processing on a first partial image in the second image after the moving processing so as to enable the display effect of the first partial image to be different from that of the second partial image.
7. A method for adjusting an image angle according to claim 3, wherein the first area is a rectangular area, there is an intersection point between a center line of the second image and a center line of the first area, the first area is scaled according to the second image to obtain a second area, and the second area is within a range of the second image, and the method comprises:
performing reduction processing on the first area according to the second image;
and in the process of the first region shrinking process, when a first end point of the first region is overlapped with the edge of the second image and all coordinates of the first region are not completely overlapped with the coordinates of the second image, the first end point is taken as a fixed point, and a second end point which is opposite to the first end point is taken as an active point, so that a second region in the range of the second image is obtained.
8. A method for adjusting an image angle according to claim 3, wherein the cropping of the second image according to the second region results in a third image, and the method further comprises:
cutting the second image according to the second region, and amplifying the third image according to the first region to obtain a third image with the same coverage area as the first region;
And performing image top layer processing on the third image so that the third image covers other images on the terminal screen.
9. The method of adjusting an image angle according to claim 1, further comprising:
acquiring a second operation instruction for a target area in the third image;
determining a target image of the target area according to the second operation instruction;
acquiring a third operation instruction for the target image;
and adjusting the angle of the target image according to the third operation instruction to obtain a fourth image.
10. A method of adjusting an angle of an image, applied to a terminal including a gyro sensor, the method comprising:
when judging that the state of a first image is an open state by calling an album management function, displaying the first image in a vertical state;
acquiring an object of the gyroscope sensor through a sensor management module;
monitoring the offset angle value of the gyroscope sensor through a sensing monitoring method in a sensor management module;
inputting an offset angle value of the gyroscope sensor into an angle function of the first image so as to rotate the angle of the first image;
And when receiving the determining instruction, performing clipping processing of avoiding the square image on the rotated first image at the original image ratio through a clipping function.
11. A method for adjusting an angle of an image, the method being applied to a terminal, the terminal including a touch screen, the method comprising:
determining a touch action of the touch screen through a touch event class function under the condition that the state of the first image is judged to be an open state by calling an album management function;
determining an adjustment angle value according to the touch action;
inputting the angle adjustment value into an angle function of the first image to rotate the angle of the first image;
and when receiving the determining instruction, performing clipping processing of avoiding the square image on the rotated first image at the original image ratio through a clipping function.
12. An apparatus for adjusting an angle of an image, comprising:
the acquisition module is configured to acquire a first operation instruction of a first image to be adjusted on the image editing interface;
a determining module configured to determine rotation angle information for the first image according to the first operation instruction;
The rotation module is configured to rotate the first image according to the rotation angle information to obtain a second image;
and the processing module is configured to process the second image according to a first area to obtain a third image, and the first area is determined according to the coverage area of the first image.
13. A terminal comprising at least one control processor and a memory for communication connection with the at least one control processor; the memory stores instructions executable by the at least one control processor to enable the at least one control processor to perform the method of adjusting an image angle as claimed in any one of claims 1 to 9, or to perform the method of adjusting an image angle as claimed in claim 10, or to perform the method of adjusting an image angle as claimed in claim 11.
14. A computer-readable storage medium storing computer-executable instructions for causing a computer to perform the method of adjusting an image angle according to any one of claims 1 to 9, or to perform the method of adjusting an image angle according to claim 10, or to perform the method of adjusting an image angle according to claim 11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311544356.7A CN117666895A (en) | 2023-11-17 | 2023-11-17 | Method, device, terminal and storage medium for adjusting image angle |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311544356.7A CN117666895A (en) | 2023-11-17 | 2023-11-17 | Method, device, terminal and storage medium for adjusting image angle |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117666895A true CN117666895A (en) | 2024-03-08 |
Family
ID=90072438
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311544356.7A Pending CN117666895A (en) | 2023-11-17 | 2023-11-17 | Method, device, terminal and storage medium for adjusting image angle |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117666895A (en) |
-
2023
- 2023-11-17 CN CN202311544356.7A patent/CN117666895A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3736676B1 (en) | User interfaces for capturing and managing visual media | |
US20230319394A1 (en) | User interfaces for capturing and managing visual media | |
DK180685B1 (en) | USER INTERFACES FOR RECEIVING AND HANDLING VISUAL MEDIA | |
TWI785258B (en) | Method, device, and storage medium for processing human face image | |
AU2012352520B2 (en) | Multiple-angle imagery of physical objects | |
EP2991339B1 (en) | Photographing method and electronic device | |
AU2022200966B2 (en) | User interfaces for capturing and managing visual media | |
CN110456967B (en) | Information processing method, information processing apparatus, and program | |
EP2568436A1 (en) | Image viewer for panoramic images | |
US20210084228A1 (en) | Tracking shot method and device, and storage medium | |
EP4287610A1 (en) | Focusing method and apparatus, electronic device, and medium | |
US20210120163A1 (en) | Image display method, device, gimbal and storage medium | |
CN104994293A (en) | Control method of wide angle camera and electronic terminal | |
JP2024504159A (en) | Photography methods, equipment, electronic equipment and readable storage media | |
CN112528107A (en) | Content data display method and device and server | |
CN117666895A (en) | Method, device, terminal and storage medium for adjusting image angle | |
US20150054854A1 (en) | Image Cropping Manipulation Method and Portable Electronic Device | |
US9530183B1 (en) | Elastic navigation for fixed layout content | |
US20150268919A1 (en) | Information Processing Method and Electronic Device | |
CN113905170A (en) | Zoom control method, device, storage medium and electronic device | |
JP2014222817A (en) | Image display apparatus, image magnification and display method, and program | |
KR20150026358A (en) | Method and Apparatus For Fitting A Template According to Information of the Subject | |
CN115118879A (en) | Image shooting and displaying method and device, electronic equipment and readable storage medium | |
CN112732148A (en) | Image display method and electronic equipment | |
CN117480772A (en) | Video display method and device, terminal equipment and computer 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 |