WO2021143642A1 - 图像裁剪方法及电子设备 - Google Patents

图像裁剪方法及电子设备 Download PDF

Info

Publication number
WO2021143642A1
WO2021143642A1 PCT/CN2021/071052 CN2021071052W WO2021143642A1 WO 2021143642 A1 WO2021143642 A1 WO 2021143642A1 CN 2021071052 W CN2021071052 W CN 2021071052W WO 2021143642 A1 WO2021143642 A1 WO 2021143642A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
input
cropped
size
cropping
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.)
Ceased
Application number
PCT/CN2021/071052
Other languages
English (en)
French (fr)
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to JP2022543577A priority Critical patent/JP7446441B2/ja
Priority to KR1020227022841A priority patent/KR102661343B1/ko
Priority to EP21741979.5A priority patent/EP4092613B1/en
Publication of WO2021143642A1 publication Critical patent/WO2021143642A1/zh
Priority to US17/865,365 priority patent/US12469101B2/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/403Edge-driven scaling; Edge-based scaling
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/04845Interaction 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/1613Constructional details or arrangements for portable computers
    • G06F1/1626Constructional details or arrangements for portable computers with a single-body enclosure integrating a flat display, e.g. Personal Digital Assistants [PDAs]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/1613Constructional details or arrangements for portable computers
    • G06F1/1633Constructional details or arrangements of portable computers not specific to the type of enclosures covered by groups G06F1/1615 - G06F1/1626
    • G06F1/1637Details related to the display arrangement, including those related to the mounting of the display in the housing
    • G06F1/1643Details related to the display arrangement, including those related to the mounting of the display in the housing the display being associated to a digitizer, e.g. laptops that can be used as penpads
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/1613Constructional details or arrangements for portable computers
    • G06F1/1633Constructional details or arrangements of portable computers not specific to the type of enclosures covered by groups G06F1/1615 - G06F1/1626
    • G06F1/1637Details related to the display arrangement, including those related to the mounting of the display in the housing
    • G06F1/1647Details related to the display arrangement, including those related to the mounting of the display in the housing including at least an additional display
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements
    • G06F1/1613Constructional details or arrangements for portable computers
    • G06F1/1633Constructional details or arrangements of portable computers not specific to the type of enclosures covered by groups G06F1/1615 - G06F1/1626
    • G06F1/1684Constructional details or arrangements related to integrated I/O peripherals not covered by groups G06F1/1635 - G06F1/1675
    • G06F1/169Constructional details or arrangements related to integrated I/O peripherals not covered by groups G06F1/1635 - G06F1/1675 the I/O peripheral being an integrated pointing device, e.g. trackball in the palm rest area, mini-joystick integrated between keyboard keys, touch pads or touch stripes
    • G06F1/1692Constructional details or arrangements related to integrated I/O peripherals not covered by groups G06F1/1635 - G06F1/1675 the I/O peripheral being an integrated pointing device, e.g. trackball in the palm rest area, mini-joystick integrated between keyboard keys, touch pads or touch stripes the I/O peripheral being a secondary touch screen used as control interface, e.g. virtual buttons or sliders
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/00Two-dimensional [2D] image generation
    • G06T11/60Creating or editing images; Combining images with text
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20132Image cropping

Definitions

  • the embodiments of the present invention relate to the field of communication technology, and in particular to an image cropping method and electronic equipment.
  • the embodiments of the present invention provide an image cropping method and electronic device, so as to solve the problem of complicated cropping operation and poor cropping effect when the existing electronic device finely crops pictures or video images.
  • the present invention is implemented as follows:
  • an embodiment of the present invention provides an image cropping method, which is applied to an electronic device including a first screen and a second screen, and includes:
  • the size of the image to be cropped and the size of the cropping frame are adjusted according to the same zoom ratio ;
  • an embodiment of the present invention also provides an electronic device, including:
  • a first receiving module configured to receive a first input to the second screen when the image to be cropped is displayed on the first screen and a crop frame is displayed on the image to be cropped;
  • the adjustment module is configured to respond to the first input and adjust the size of the image to be cropped and the size of the crop frame in accordance with the size of the image to be cropped and the crop frame while keeping the relative position of the image to be cropped and the cropping frame unchanged.
  • a second receiving module configured to receive a second input of the target border line of the cropping frame displayed on the first screen
  • the cropping module is configured to adjust the position of the target border line and crop the image to be cropped while keeping the display position of the image to be cropped in response to the second input.
  • an embodiment of the present invention also provides an electronic device, including a processor, a memory, and a computer program stored on the memory and running on the processor, and the computer program is executed by the processor.
  • the steps of the image cropping method as described above are realized during execution.
  • an embodiment of the present invention also provides a computer-readable storage medium having a computer program stored on the computer-readable storage medium, and when the computer program is executed by a processor, the above-mentioned image cropping method is implemented. step.
  • FIG. 1 is a schematic flowchart of an image clipping method provided by an embodiment of the present invention
  • FIG 2 is one of the schematic diagrams of the operation interface of the image cropping method according to the embodiment of the present invention.
  • FIG. 3 is a second schematic diagram of an operation interface for applying an image cropping method according to an embodiment of the present invention.
  • FIG. 4 is the third schematic diagram of the operation interface of the application of the image cropping method according to the embodiment of the present invention.
  • FIG. 5 is a fourth schematic diagram of an operation interface for applying an image cropping method according to an embodiment of the present invention.
  • FIG. 6 is the fifth schematic diagram of the operation interface of the application of the image cropping method according to the embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention.
  • FIG. 1 it is a schematic flowchart of an image cropping method provided by an embodiment of the present invention, which is applied to an electronic device including a first screen and a second screen.
  • the electronic device may be a double-sided screen electronic device, or a folding screen electronic device with at least two screens.
  • the method of the present invention may include:
  • Step 101 When the image to be cropped is displayed on the first screen and a crop frame is displayed on the image to be cropped, receiving a first input to the second screen;
  • the image to be cropped can be a picture or a video screen.
  • the image editing function of the electronic device can be turned on through a user operation, and the electronic device enters the image editing interface, that is, a crop frame is displayed on the image to be cropped.
  • the area selected by the cropping frame is the initial image area of the image to be cropped.
  • the first input is a preset input.
  • the first input may include but is not limited to at least one of click input, press input, long press input, pinch input, drag input, slide input, and swipe input, that is, the first input
  • An input can be one of the above-mentioned inputs, or can also be a combined operation of two or more of the inputs.
  • Step 102 In response to the first input, while keeping the relative position of the image to be cropped and the cropping frame unchanged, adjust the size of the image to be cropped and the size of the cropping frame to be the same Zoom ratio adjustment;
  • the first input to the second screen can realize the adjustment of the size of the image to be cropped and the size of the cropping frame displayed on the first screen, and can also avoid the user's operation on the first screen and affect the first screen.
  • the display effect of the content displayed on the screen can realize the adjustment of the size of the image to be cropped and the size of the cropping frame displayed on the first screen, and can also avoid the user's operation on the first screen and affect the first screen.
  • the size of the image to be cropped and the size of the cropping frame are adjusted according to the same zoom ratio, that is, cropping
  • the frame is enlarged or reduced along with the image to be cropped, and the initial image area selected by the cropping frame remains unchanged, that is, the display content of the initial image area remains unchanged, only the zoom ratio is changed. In this way, it is convenient for the user to view the local details of the image, thereby facilitating further subsequent fine adjustments.
  • Step 103 Receive a second input of the target border line of the cropping frame displayed on the first screen
  • the second input is a preset input.
  • the second input may include but is not limited to at least one of click input, press input, long press input, pinch input, drag input, slide input, and swipe input, that is, the first input
  • the second input can be one of the above inputs, or can also be a combination operation of two or more of the inputs.
  • the second input is a sliding input to the target frame line.
  • the second input is a sliding input for sliding the target frame line toward or away from the frame line opposite to the target frame line.
  • Step 104 In response to the second input, while keeping the display position of the image to be cropped unchanged, adjust the position of the target border line to crop the image to be cropped.
  • the size of the cropping frame is changed, that is, the edge part of the area selected by the cropping frame is changed. Fine adjustment is performed, and the area selected by the cropping frame changes, from the original initial image area to the target image area, where the target image area includes at least part of the initial image area.
  • cropping the image to be cropped may include: cropping the image area outside the cropping frame. Finally, the target image area that meets the user's cropping needs is obtained.
  • the image cropping method of the embodiment of the present invention when the image to be cropped is displayed on the first screen and the crop frame is displayed on the image to be cropped, the first input to the second screen is received; When the relative position of the cropped image and the cropping frame is unchanged, adjust the size of the image to be cropped and the cropping frame according to the same zoom ratio; receive the second input of the target border line of the cropping frame displayed on the first screen; respond; In the second input, while keeping the display position of the image to be cropped, the size of the image to be cropped and the size of the cropping frame are adjusted according to the same zoom ratio. In this way, the user does not need to adjust the cropping frame up and down. The left and right movement operations are repeated, and the fine cropping of the image can be achieved through simple cropping operations, and a better cropping effect can be achieved, meeting the user's image cropping needs, and improving the user's cropping operation experience.
  • the method may further include: enabling a fine cropping image function through user input.
  • the user's triple-click input on the second screen can enable the fine cropping image function.
  • step 102 of the method of the present invention may specifically include:
  • Step 1021 Determine a target zoom ratio according to the first input
  • Step 1022 Adjust the size of the image to be cropped and the size of the cropping frame according to the same target zoom ratio.
  • the first input is a first sliding input that slides along a first preset direction to form at least a part of the first preset shape track; the foregoing step 1021 may specifically include:
  • step 1022 may specifically include:
  • the image to be cropped and the cropping frame are enlarged according to the same target enlargement ratio.
  • the electronic device detects the ratio of the length of the track formed in the sliding process of the first sliding input to the perimeter value of the complete first preset shape.
  • the first preset shape is a circle
  • the first preset direction is a clockwise direction. If the first electronic device detects that the length of the circular trajectory formed during the sliding process of the first sliding input accounts for 25% of the circumference of the complete circular trajectory, the ratio drawn by the user through the first sliding input is 1/ 4Circular, for example, if the circumference value of the complete circular track is 100mm, and the first electronic device detects that the length of the circular track formed during the first sliding input sliding process is 25mm, then the first sliding input sliding process
  • the ratio of the length of the circular trajectory formed in the trajectory to the perimeter value of the complete circular trajectory is 25%, and the image to be cropped and the cropping frame are enlarged according to the enlargement ratio of 125%; if the user passes the first
  • the slide input draws a half circle, that is, a 1/2 circle, and the image to be cropped and the crop frame are enlarged at a magnification ratio of 150%; if the user draws a complete circle through the first slide input For a circle,
  • the first preset shape is a rectangle
  • the first preset direction is a clockwise direction. If the first electronic device detects that the ratio of the length of the rectangular trajectory formed during the sliding process of the first sliding input to the perimeter value of the complete rectangular trajectory is 50%, that is, the degree of completion of the rectangle drawn by the user through the first sliding input is 50%, the image to be cropped and the cropping frame are enlarged at a magnification ratio of 150%; if the user draws a complete rectangle through the first sliding input, the image to be cropped is enlarged at a magnification ratio of 200%. Crop the image and the crop frame.
  • the first preset shape is an equilateral triangle
  • the first preset direction is a clockwise direction. If the first electronic device detects that the ratio of the length of the triangle trajectory formed during the sliding process of the first sliding input to the perimeter value of the complete triangle trajectory is 1/3, that is, the degree of completion of the triangle drawn by the user through the first sliding input If the user draws a side of a triangle, the image to be cropped and the crop frame will be enlarged at a magnification ratio of 133.34%; if the user draws a complete triangle through the first sliding input, it will follow With a 200% magnification ratio, the image to be cropped and the crop frame are enlarged.
  • first preset shape is not limited to a circle, a rectangle, and a triangle, and other shapes are also possible, which are not specifically limited here.
  • the first input is a second sliding input that slides along a second preset direction to form at least a part of a second preset shape track; the foregoing step 1021 may specifically include:
  • the ratio of the length value of the trajectory formed by the second sliding input to the perimeter value of the complete second preset shape is determined as the target reduction ratio; accordingly, the above step 1022 may specifically include:
  • the image to be cropped and the cropping frame are reduced according to the same target reduction ratio.
  • the electronic device can also detect the ratio of the length value of the track formed during the second sliding input sliding process to the perimeter value of the complete second preset shape.
  • the second preset shape is a circle
  • the second preset direction is a counterclockwise direction. If the first electronic device detects that the length of the circular trajectory formed during the sliding process of the second sliding input accounts for 25% of the circumference of the complete circular trajectory, the ratio drawn by the user through the second sliding input is 1/ 4 Circle, if the current image ratio is 300% of the original image ratio, the image to be cropped and the cropping frame will be reduced according to 275% of the original image ratio; if the user draws a half circle through the second sliding input Shape, that is, 1/2 circle, then the image to be cropped and the cropping frame are reduced according to 250% of the original image; if the user draws a complete circle through the second sliding input, then follow the original image 200% of the ratio, the image to be cropped and the cropping frame are reduced.
  • the second preset shape is a rectangle
  • the second preset direction is a counterclockwise direction. If the first electronic device detects that the ratio of the length of the rectangular trajectory formed during the sliding process of the second sliding input to the perimeter value of the complete rectangular trajectory is 50%, that is, the degree of completion of the rectangle drawn by the user through the second sliding input is 50%, if the current image ratio is 300% of the original image ratio, the image to be cropped and the crop frame are reduced according to 250% of the original image ratio; if the user draws a complete rectangle through the second sliding input , The image to be cropped and the cropping frame are reduced according to 200% of the original image ratio.
  • the second preset shape is an equilateral triangle
  • the second preset direction is a counterclockwise direction. If the first electronic device detects that the ratio of the length of the triangle trajectory formed during the sliding process of the second sliding input to the perimeter value of the complete triangle trajectory is 1/3, that is, the degree of completion of the triangle drawn by the user through the second sliding input Is 33.34%, that is, the user has drawn a side of the triangle. If the current image ratio is 300% of the original image ratio, the image to be cropped and the cropping frame will be reduced according to the original image ratio of 266.66%; if the user passes the first image The second sliding input draws a complete triangle, and the image to be cropped and the cropping frame are reduced according to 200% of the original image ratio.
  • first preset shape is not limited to a circle, a rectangle, and a triangle, and other shapes are also possible, which are not specifically limited here.
  • the method of the present invention may further include:
  • the third input is a preset input.
  • the third input may include but is not limited to at least one of click input, press input, long press input, pinch input, drag input, slide input, and swipe input, that is, the first input.
  • the three inputs can be one of the above inputs, or can also be a combined operation of two or more of them.
  • the third input is a swipe input to the first screen or the second screen.
  • the image to be cropped and the cropping frame are moved simultaneously, and the target border line of the cropping frame is displayed at the target position of the first screen.
  • the method of the present invention may further include:
  • the fourth input is a preset input.
  • the fourth input may include, but is not limited to, click input, press input, long press input, pinch input, drag input, slide input, and swipe input.
  • At least one of the inputs, that is, the fourth input may be one of the foregoing inputs, or may also be a combined operation of two or more of the inputs.
  • the fourth input is a double-click input on the second screen.
  • the size of the image to be cropped after being scaled and the size of the cropping frame are restored to those before the scaling, and displayed on the first screen.
  • the size of the image to be cropped and the size of the cropping frame after scaling is restored to the size before scaling, that is, the image ratio is automatically changed to 100% through the fourth input, and the image is restored to the image to be cropped The scale of the original image.
  • the second screen is a screen opposite to the first screen.
  • the electronic device is a double-sided screen electronic device, the first screen is the front screen, and the second screen is the back screen; or, for another example, the electronic device is a folding screen electronic device, and the folding screen is folded outward to present the front screen and The status of the back screen. In this way, it is convenient for the user to operate the electronic device with one hand.
  • the electronic device in this example is a double-sided screen electronic device.
  • Step S1 controlling the electronic device to enter the picture editing page through the first user operation, and turning on the refined operation mode through the second user operation on the back screen;
  • the second user operation may be a three-click input by the user on the back screen.
  • Fig. 2 As shown in Fig. 2, Fig. 4 and Fig. 6, it is the front screen of the electronic device; as shown in Fig. 3 and Fig. 5, it is the back screen of the electronic device.
  • the picture 1 to be cropped and the crop frame 2 are displayed on the picture editing page.
  • the user can quickly turn on the refined operation mode with three clicks on the back screen is a way to turn on this mode, and it can also be turned on through other methods such as buttons, floating ball on the front screen, drop-down menu, pull-up function bar, etc. Mode of operation.
  • step S2 the user draws a circle clockwise on the back screen, while keeping the relative position of the picture to be cropped and the crop frame unchanged, the picture to be cropped and the crop frame are enlarged at the same magnification ratio.
  • the default detection of drawing a circle clockwise is the switch to turn on the zoom mode.
  • the picture is not zoomed.
  • the percentage of the circle drawn will be detected, according to the percentage of the circle drawn. To adjust the magnification of the picture.
  • the picture when drawing a 1/4 circle, the picture is enlarged by 125%, when drawing a 1/2 circle, the picture is enlarged by 150%, when drawing a 3/4 circle, the picture is enlarged by 175%, when the second circle is drawn, it is enlarged by 200%, and continue drawing the circle until it is cropped.
  • the picture reaches the maximum magnification.
  • the range of the cropping frame is enlarged along with the picture, but the thickness of the border line of the cropping frame remains unchanged.
  • Figure 4 shows the enlarged schematic diagram shown in Figure 2. After the cropped picture is enlarged, only part of the crop frame is displayed in the interface. You can move the crop frame to a suitable position through user operations on the front screen, or Move the cropping frame to a suitable position through the user operation of the operation on the back screen.
  • Step S3 if no touch operation of the user touching the touch area of the back screen is detected within the preset time period, the front screen saves the current state.
  • the user can release the index finger, and at this time, the front screen is saved to the state of the last touch.
  • Step S4 by operating the third user on the back screen, move the picture to be cropped and the crop frame at the same time, and move the target border line of the crop frame to a suitable position.
  • the user's index finger slides on the touch area of the back screen, and the display part of the front screen changes accordingly.
  • the user's index finger slides to the left of the back screen on the touch area of the back screen, and the interface of the front screen is translated to the right to the position shown in FIG. 6.
  • the picture to be cropped and the cropping frame are simultaneously translated.
  • the movement direction of the user's index finger on the back screen is relative to the back.
  • the screen can be regarded as a transparent screen.
  • the index finger moves on the back of the glass.
  • the movement direction from the front glass is opposite to left and right, up and down.
  • the index finger can slide in any direction on the back screen, and the front screen display will change accordingly.
  • the position of the target frame line is adjusted while keeping the display position of the picture to be cropped unchanged.
  • the size of the cropping frame changes, that is, fine adjustments are made to the edge of the area selected by the cropping frame.
  • step S5 the user draws a circle counterclockwise on the back screen, while keeping the relative position of the picture to be cropped and the crop frame unchanged, the picture to be cropped and the crop frame are reduced by the same reduction ratio.
  • the user's index finger draws a complete circle counterclockwise on the back screen, and the picture reduction mode is turned on. If the user continues to draw the circle after the index finger draws the circle, the steps of reducing the picture to be cropped and the crop frame are started.
  • the default detection of drawing a circle counterclockwise is the switch to turn on the zoom mode.
  • the picture is not reduced.
  • the percentage of the circle drawn will be detected, according to the percentage of the circle drawn. , Adjust the zoom factor of the picture.
  • the current picture proportion is 300% of the original picture proportion
  • the picture proportion is 275% when drawing a 1/4 circle
  • the picture proportion is 250% when drawing a 1/2 circle
  • the picture proportion is 225% when drawing a 3/4 circle.
  • the proportion of the picture is 200%, and continue to draw the circle until the picture reaches the minimum zoom factor.
  • step S5 and step S3 are two steps executed in parallel, and the scale can also be enlarged in step S3 to make the user feel that the enlargement is too large, and S5 can be executed to adjust the scale.
  • Step S6 by operating the fifth user on the back screen, the picture ratio is switched between the current ratio and 100%.
  • the fifth user operation may be a double-click input of the user on the back screen.
  • Step S7 Turn off the refined operation mode by operating the second user on the back screen.
  • the second user operation may be the user's three-click input on the back screen, and the user's index finger three-clicks on the back screen to end the refined operation mode. After the refined operation mode is ended, the picture ratio automatically becomes 100%.
  • the image cropping method of the embodiment of the present invention receives the first input to the second screen by displaying the image to be cropped on the first screen and the cropping frame is displayed on the image to be cropped; Under the condition that the relative position of the image to be cropped and the crop frame is unchanged, the size of the image to be cropped and the size of the crop frame are adjusted according to the same zoom ratio; the target frame of the crop frame displayed on the first screen is received The second input of the line; in response to the second input, while keeping the display position of the image to be cropped unchanged, adjust the position of the target border line to crop the image to be cropped, so that the user does not need to repeat the cropping frame up and down
  • the mobile operation can realize the fine cropping of the image through simple cropping operation, and can achieve a better cropping effect, meet the user's image cropping demand, and improve the user's cropping operation experience.
  • an embodiment of the present invention provides an electronic device for implementing the above method.
  • FIG. 7 it is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.
  • An embodiment of the present invention provides an electronic device 700.
  • the electronic device 700 includes a first screen and a second screen, and may include:
  • the first receiving module 701 is configured to receive a first input to the second screen when the image to be cropped is displayed on the first screen and a crop frame is displayed on the image to be cropped;
  • the adjustment module 702 is configured to change the size of the image to be cropped and the size of the crop frame while keeping the relative position of the image to be cropped and the crop frame unchanged in response to the first input. Adjust according to the same zoom ratio;
  • the second receiving module 703 is configured to receive a second input of the target frame line of the cropping frame displayed on the first screen;
  • the cropping module 704 is configured to adjust the position of the target border line and crop the image to be cropped while keeping the display position of the image to be cropped in response to the second input.
  • the adjustment module 702 includes:
  • a zoom ratio determining unit configured to determine a target zoom ratio according to the first input
  • the adjusting unit is configured to adjust the size of the image to be cropped and the size of the cropping frame according to the same target zoom ratio.
  • the first input is a first sliding input that slides along a first preset direction to form at least a part of a first preset shape track;
  • the zoom ratio determining unit is specifically configured to:
  • the adjustment unit is specifically used for:
  • the image to be cropped and the cropping frame are enlarged according to the same target enlargement ratio.
  • the first input is a second sliding input that slides along a second preset direction to form at least a part of a second preset shape track;
  • the zoom ratio determining unit is specifically configured to:
  • the adjustment unit is specifically used for:
  • the image to be cropped and the cropping frame are reduced according to the same target reduction ratio.
  • the third receiving module is configured to receive the target border line of the cropping frame displayed on the first screen after adjusting the size of the image to be cropped and the size of the cropping frame according to the same zoom ratio. Before the second input, receive the third input;
  • the first display module is configured to simultaneously move the image to be cropped and the cropping frame in response to the third input, and display the target border line of the cropping frame at the target position of the first screen.
  • the fourth receiving module is configured to adjust the position of the target border line in response to the second input while keeping the display position of the image to be cropped, before cropping the image to be cropped , Receiving a fourth input to the second screen;
  • the second display module is configured to, in response to the fourth input, restore the size of the image to be cropped after being scaled and the size of the crop frame to the size before the scaling, and display on the first screen.
  • the electronic device provided by the embodiment of the present invention can implement each process implemented by the electronic device in the method embodiments of FIGS. 1 to 6. To avoid repetition, details are not described herein again.
  • the first receiving module displays the image to be cropped on the first screen, and when the crop frame is displayed on the image to be cropped, it receives the first input to the second screen;
  • the adjustment module responds to The first input is to adjust the size of the image to be cropped and the size of the crop frame according to the same scaling ratio while keeping the relative position of the image to be cropped and the crop frame unchanged;
  • the second receiving module receives the second receiving module The second input of the target border line of the cropping frame displayed on a screen;
  • the cropping module responds to the second input, while keeping the display position of the image to be cropped unchanged, adjusts the position of the target border line and crops the image to be cropped In this way, there is no need for the user to repeatedly move the cropping frame up, down, left, and right.
  • FIG. 8 is a schematic diagram of the hardware structure of an electronic device that implements various embodiments of the present invention.
  • the electronic device 800 includes a first screen and a second screen, and also includes but is not limited to: a radio frequency unit 801, a network module 802, an audio output unit 803, an input unit 804, a sensor 805, a display unit 806, a user input unit 807, and an interface unit 808, memory 809, processor 810, and power supply 811.
  • a radio frequency unit 801 for example, a radio frequency unit 801
  • a network module 802 includes but is not limited to: a radio frequency unit 801, a network module 802, an audio output unit 803, an input unit 804, a sensor 805, a display unit 806, a user input unit 807, and an interface unit 808, memory 809, processor 810, and power supply 811.
  • a radio frequency unit 801 includes a radio frequency unit 801, a network module 802, an audio output unit 803, an input unit 804, a sensor 805, a display unit 806, a user input unit 807, and an interface unit 808, memory 809, processor 810, and power supply 811.
  • a first input to the second screen is received; in response to the first input, the Under the condition that the relative position of the image to be cropped and the cropping frame is unchanged, the size of the image to be cropped and the size of the cropping frame are adjusted according to the same zoom ratio; The second input of the target frame line of the cropping frame; in response to the second input, while keeping the display position of the image to be cropped unchanged, the position of the target frame line is adjusted, and the The image to be cropped is cropped.
  • the radio frequency unit 801 can be used for receiving and sending signals in the process of sending and receiving information or talking. Specifically, the downlink data from the base station is received and processed by the processor 810; in addition, Uplink data is sent to the base station.
  • the radio frequency unit 801 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like.
  • the radio frequency unit 801 can also communicate with the network and other devices through a wireless communication system.
  • Electronic devices provide users with wireless broadband Internet access through the network module 802, such as helping users to send and receive emails, browse web pages, and access streaming media.
  • the audio output unit 803 can convert the audio data received by the radio frequency unit 801 or the network module 802 or stored in the memory 809 into audio signals and output them as sounds. Moreover, the audio output unit 803 may also provide audio output related to a specific function performed by the electronic device 800 (for example, call signal reception sound, message reception sound, etc.).
  • the audio output unit 803 includes a speaker, a buzzer, a receiver, and the like.
  • the input unit 804 is used to receive audio or video signals.
  • the input unit 804 may include a graphics processing unit (GPU) 8041 and a microphone 8042.
  • the graphics processor 8041 is configured to monitor images of still pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. Data is processed.
  • the processed image frame may be displayed on the display unit 806.
  • the image frame processed by the graphics processor 8041 may be stored in the memory 809 (or other storage medium) or sent via the radio frequency unit 801 or the network module 802.
  • the microphone 8042 can receive sound and can process such sound into audio data.
  • the processed audio data can be converted into a format that can be sent to the mobile communication base station via the radio frequency unit 801 for output in the case of a telephone call mode.
  • the electronic device 800 further includes at least one sensor 805, such as a light sensor, a motion sensor, and other sensors.
  • the light sensor includes an ambient light sensor and a proximity sensor.
  • the ambient light sensor can adjust the brightness of the display panel 8061 according to the brightness of the ambient light.
  • the proximity sensor can close the display panel 8061 and the display panel 8061 when the electronic device 800 is moved to the ear. / Or backlight.
  • the accelerometer sensor can detect the magnitude of acceleration in various directions (usually three-axis), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of mobile electronic devices (such as horizontal and vertical screen switching, related Games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, percussion), etc.; sensor 805 can also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers , Infrared sensors, etc., I won’t repeat them here.
  • the display unit 806 is used to display information input by the user or information provided to the user.
  • the display unit 806 may include a display panel 8061, and the display panel 8061 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • the user input unit 807 can be used to receive inputted numeric or character information, and generate key signal input related to user settings and function control of the mobile electronic device.
  • the user input unit 807 includes a touch panel 8071 and other input devices 8072.
  • the touch panel 8071 also called a touch screen, can collect the user's touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc.) on the touch panel 8071 or near the touch panel 8071. operate).
  • the touch panel 8071 may include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the user's touch position, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it To the processor 810, the command sent by the processor 810 is received and executed.
  • the touch panel 8071 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave.
  • the user input unit 807 may also include other input devices 8072.
  • other input devices 8072 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackball, mouse, and joystick, which will not be repeated here.
  • the touch panel 8071 can be overlaid on the display panel 8061.
  • the touch panel 8071 detects a touch operation on or near it, it transmits it to the processor 810 to determine the type of the touch event, and then the processor 810 determines the type of the touch event according to the touch.
  • the type of event provides corresponding visual output on the display panel 8061.
  • the touch panel 8071 and the display panel 8061 are used as two independent components to implement the input and output functions of the mobile electronic device, in some embodiments, the touch panel 8071 and the display panel 8061 can be combined. Integrate to realize the input and output functions of mobile electronic devices, and the specifics are not limited here.
  • the interface unit 808 is an interface for connecting an external device and the electronic device 800.
  • the external device may include a wired or wireless headset port, an external power source (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, audio input/output (I/O) port, video I/O port, headphone port, etc.
  • the interface unit 808 can be used to receive input (for example, data information, power, etc.) from an external device and transmit the received input to one or more elements in the electronic device 800 or can be used to connect the electronic device 800 to an external device. Transfer data between devices.
  • the memory 809 can be used to store software programs and various data.
  • the memory 809 may mainly include a program storage area and a data storage area.
  • the program storage area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data created by the use of mobile phones (such as audio data, phone book, etc.), etc.
  • the memory 809 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • the processor 810 is the control center of the mobile electronic device, which uses various interfaces and lines to connect the various parts of the entire mobile electronic device, runs or executes the software programs and/or modules stored in the memory 809, and calls the storage in the memory 809 Data, perform various functions of mobile electronic devices and process data, so as to monitor the mobile electronic devices as a whole.
  • the processor 810 may include one or more processing units; preferably, the processor 810 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface and application programs, etc., the modem
  • the processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 810.
  • the electronic device 800 may also include a power source 811 (such as a battery) for supplying power to various components.
  • a power source 811 such as a battery
  • the power source 811 may be logically connected to the processor 810 through a power management system, so as to manage charging, discharging, and power consumption management through the power management system. And other functions.
  • the electronic device 800 includes some functional modules not shown, which will not be repeated here.
  • the embodiment of the present invention also provides an electronic device, including a processor 810, a memory 809, and a computer program stored in the memory 809 and running on the processor 810.
  • a processor 810 When the computer program is executed by the processor 810, the foregoing
  • the computer program When the computer program is executed by the processor 810, the foregoing
  • Each process of the embodiment of the image cropping method can achieve the same technical effect. In order to avoid repetition, it will not be repeated here.
  • the embodiment of the present invention also provides a computer-readable storage medium, and a computer program is stored on the computer-readable storage medium.
  • a computer program is stored on the computer-readable storage medium.
  • the computer program is executed by a processor, each process of the above-mentioned image cropping method embodiment is realized, and the same technology can be achieved. The effect, in order to avoid repetition, will not be repeated here.
  • the computer-readable storage medium such as read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk, or optical disk, etc.
  • the technical solution of the present invention essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes a number of instructions to enable an electronic device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the method described in each embodiment of the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Hardware Design (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)
  • User Interface Of Digital Computer (AREA)
  • Processing Or Creating Images (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

一种图像裁剪方法及电子设备,该方法包括:在第一屏显示待裁剪图像,且待裁剪图像上显示有裁剪框的情况下,接收对第二屏的第一输入(101);响应于第一输入,在保持待裁剪图像与裁剪框的相对位置不变的情况下,将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的缩放比例调整(102);接收对第一屏上显示的裁剪框的目标边框线的第二输入(103);响应于第二输入,在保持待裁剪图像的显示位置不变的情况下,调整目标边框线的位置,对待裁剪图像进行裁剪(104)。

Description

图像裁剪方法及电子设备
相关申请的交叉引用
本申请主张在2020年1月17日在中国提交的中国专利申请号No.202010051509.4的优先权,其全部内容通过引用包含于此。
技术领域
本发明实施例涉及通信技术领域,尤其涉及一种图像裁剪方法及电子设备。
背景技术
随着移动通信技术的不断发展,电子设备,例如,智能手机、个人数字处理、掌上电脑、笔记本电脑等应用越来越广泛,电子设备提供的应用功能也越来越丰富,极大地满足了不同用户的个性化需求。例如,用户可通过电子设备对图片或是视频画面进行编辑处理。
目前,当用户使用电子设备对图片或视频画面进行裁剪时,尤其是需要对选定区域进行精细化裁剪时,一般需要用户对裁剪框进行上下左右反复地移动操作,其裁剪操作繁琐,且裁剪效果不佳。
发明内容
本发明实施例提供一种图像裁剪方法及电子设备,以解决现有电子设备对图片或视频画面进行精细化裁剪时,其裁剪操作繁琐,且裁剪效果不佳的问题。
为了解决上述技术问题,本发明是这样实现的:
第一方面,本发明的实施例提供了一种图像裁剪方法,应用于包括第一屏和第二屏的电子设备,包括:
在所述第一屏显示待裁剪图像,且所述待裁剪图像上显示有裁剪框的情况下,接收对所述第二屏的第一输入;
响应于所述第一输入,在保持所述待裁剪图像与所述裁剪框的相对位置 不变的情况下,将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的缩放比例调整;
接收对所述第一屏上显示的所述裁剪框的目标边框线的第二输入;
响应于所述第二输入,在保持所述待裁剪图像的显示位置不变的情况下,调整所述目标边框线的位置,对所述待裁剪图像进行裁剪。
第二方面,本发明的实施例还提供了一种电子设备,包括:
第一接收模块,用于在所述第一屏显示待裁剪图像,且所述待裁剪图像上显示有裁剪框的情况下,接收对所述第二屏的第一输入;
调整模块,用于响应于所述第一输入,在保持所述待裁剪图像与所述裁剪框的相对位置不变的情况下,将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的缩放比例调整;
第二接收模块,用于接收对所述第一屏上显示的所述裁剪框的目标边框线的第二输入;
裁剪模块,用于响应于所述第二输入,在保持所述待裁剪图像的显示位置不变的情况下,调整所述目标边框线的位置,对所述待裁剪图像进行裁剪。
第三方面,本发明实施例还提供了一种电子设备,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如上所述的图像裁剪方法的步骤。
第四方面,本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上所述的图像裁剪方法的步骤。
本发明实施例的上述方案中,在第一屏显示待剪裁图像,且待裁剪图像上显示有裁剪框的情况下,接收对第二屏的第一输入;响应于第一输入,在保持待裁剪图像与裁剪框的相对位置不变的情况下,将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的缩放比例调整;接收对第一屏上显示的裁剪框的目标边框线的第二输入;响应于第二输入,在保持待裁剪图像的显示位置不变的情况下,调整目标边框线的位置,对待裁剪图像进行裁剪,如此,无需用户对裁剪框进行上下左右反复地移动操作,通过简单地裁剪操作,便可实现对图像的精细化裁剪,且能够达到较佳地裁剪效果,满足用户对图 像的裁剪需求,提升用户裁剪操作的体验。
附图说明
图1为本发明实施例提供的图像剪裁方法的流程示意图;
图2为本发明实施例应用图像裁剪方法的操作界面示意图之一;
图3为本发明实施例应用图像裁剪方法的操作界面示意图之二;
图4为本发明实施例应用图像裁剪方法的操作界面示意图之三;
图5为本发明实施例应用图像裁剪方法的操作界面示意图之四;
图6为本发明实施例应用图像裁剪方法的操作界面示意图之五;
图7为本发明实施例提供的电子设备的结构示意图;
图8为本发明实施例提供的电子设备的硬件结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
如图1所示,为本发明实施例提供的图像裁剪方法的流程示意图,应用于包括第一屏和第二屏的电子设备。
需要说明的是,该电子设备可为双面屏电子设备,也可为具有至少两个屏的折叠屏电子设备。本发明的方法可包括:
步骤101,在所述第一屏显示待裁剪图像,且所述待裁剪图像上显示有裁剪框的情况下,接收对所述第二屏的第一输入;
本步骤中,待裁剪图像可以为图片或者视频画面。这里,在第一屏显示待裁剪图像的情况下,可通过用户操作开启电子设备的图像编辑功能,电子设备进入图像编辑界面,即待裁剪图像上显示有裁剪框。此时,裁剪框所框选的区域为待裁剪图像的初始图像区域。
这里,第一输入为预先设置的输入。可选地,该第一输入为可以包括但不限于点击输入、按压输入、长按输入、捏合输入、拖拽输入、滑动输入和划 动输入中的至少一种,也即是说,该第一输入可以为上述输入中的其中一种,或者也可以为其中两种或以上输入的组合操作。
步骤102,响应于所述第一输入,在保持所述待裁剪图像与所述裁剪框的相对位置不变的情况下,将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的缩放比例调整;
本步骤中,对第二屏的第一输入,能够实现对显示在第一屏上的待裁剪图像的大小以及裁剪框的大小调整,还能够避免用户在第一屏上的操作,影响第一屏上显示内容的显示效果。
这里,在保持所述待裁剪图像与所述裁剪框的相对位置不变的情况下,将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的缩放比例调整,也就是说,裁剪框随待裁剪图像一起放大或缩小,裁剪框所框选的初始图像区域不变,即初始图像区域的显示内容不变,仅是改变了其缩放比例。这样,便于用户查看图像的局部细节,从而便于进一步地进行后续的精细化调整。
需要说明的是,裁剪框的大小经缩放处理后,裁剪框的边框线的线条粗细不变。
步骤103,接收对所述第一屏上显示的所述裁剪框的目标边框线的第二输入;
本步骤中,第二输入为预先设置的输入。可选地,该第二输入为可以包括但不限于点击输入、按压输入、长按输入、捏合输入、拖拽输入、滑动输入和划动输入中的至少一种,也即是说,该第二输入可以为上述输入中的其中一种,或者也可以为其中两种或以上输入的组合操作。
优选地,所述第二输入为对目标边框线的滑动输入。
比如,若裁剪框为矩形裁剪框,第二输入为对目标边框线向靠近或者远离与所述目标边框线相对的边框线的方向滑动的滑动输入。
步骤104,响应于所述第二输入,在保持所述待裁剪图像的显示位置不变的情况下,调整所述目标边框线的位置,对所述待裁剪图像进行裁剪。
本步骤中,在保持所述待裁剪图像的显示位置不变的情况下,通过调整裁剪框的目标边框线的位置,剪裁框的大小发生改变,即对裁剪框所框选的区域的边缘部分进行精细调整,裁剪框所框选的区域发生改变,由原来的初 始图像区域变为目标图像区域,其中,该目标图像区域包括至少部分的初始图像区域。
具体的,对待裁剪图像进行裁剪可以包括:对裁剪框之外的图像区域进行裁剪。最终得到满足用户裁剪需求的目标图像区域。
本发明实施例的图像裁剪方法,在第一屏显示待剪裁图像,且待裁剪图像上显示有裁剪框的情况下,接收对第二屏的第一输入;响应于第一输入,在保持待裁剪图像与裁剪框的相对位置不变的情况下,按照相同的缩放比例,调整待裁剪图像以及裁剪框的大小;接收对第一屏上显示的裁剪框的目标边框线的第二输入;响应于第二输入,在保持待裁剪图像的显示位置不变的情况下,将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的缩放比例调整,如此,无需用户对裁剪框进行上下左右反复地移动操作,通过简单地裁剪操作,便可实现对图像的精细化裁剪,且能够达到较佳地裁剪效果,满足用户对图像的裁剪需求,提升用户裁剪操作的体验。
为了避免电子设备误响应用户对第二屏的第一输入,在接收对所述第二屏的第一输入之前,所述方法还可包括:通过用户输入,开启精细化裁剪图像功能。
需要说明的是,可通过用户对第二屏的三连击输入,开启精细化裁剪图像功能。还可以通过其他的开启方式,如点击预设按钮、点击显示在第一屏上的悬浮球、下拉菜单、上拉功能栏等方式开启精细化裁剪图像功能,这里不做具体限定。
基于图1所示的实施例,作为一可选地实现方式,本发明方法的步骤102可具体包括:
步骤1021,根据所述第一输入,确定目标缩放比例;
步骤1022,将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的所述目标缩放比例调整。
在一可选地实施例中,所述第一输入为沿第一预设方向滑动形成至少部分第一预设形状轨迹的第一滑动输入;上述步骤1021可具体包括:
将所述第一滑动输入形成的轨迹的长度值占完整的所述第一预设形状的周长值的比值确定为目标放大比例;
相应地,上述步骤1022可具体包括:
将所述待裁剪图像以及所述裁剪框按照相同的所述目标放大比例放大。
这里,电子设备检测第一滑动输入滑动过程中形成的轨迹的长度值占完整的第一预设形状的周长值的比值。
比如,第一预设形状为圆形,第一预设方向为顺时针方向。若第一电子设备检测到第一滑动输入滑动过程中形成的圆形轨迹的长度值占完整的圆形轨迹的周长值的比值为25%,即用户通过第一滑动输入绘制的为1/4圆形,例如,若完整的圆形轨迹的周长值为100mm,第一电子设备检测到第一滑动输入滑动过程中形成的圆形轨迹的长度值为25mm,则第一滑动输入滑动过程中形成的圆形轨迹的长度值占完整的圆形轨迹的周长值的比值为25%,则按照125%的放大比例,放大所述待裁剪图像以及所述裁剪框;若用户通过第一滑动输入绘制的为半个圆形,即1/2圆形,则按照150%的放大比例,放大所述待裁剪图像以及所述裁剪框;若用户通过第一滑动输入绘制的为一完整的圆形,则按照200%的放大比例,放大所述待裁剪图像以及所述裁剪框。
需要说明的是,为了避免无限制放大待裁剪图像以及裁剪框,设定一最大放大比例。
又比如,第一预设形状为矩形,第一预设方向为顺时针方向。若第一电子设备检测到第一滑动输入滑动过程中形成的矩形轨迹的长度值占完整的矩形轨迹的周长值的比值为50%,即用户通过第一滑动输入绘制的矩形的完成程度为50%,则按照150%的放大比例,放大所述待裁剪图像以及所述裁剪框;若用户通过第一滑动输入绘制的为一完整的矩形,则按照200%的放大比例,放大所述待裁剪图像以及所述裁剪框。
再比如,第一预设形状为等边三角形,第一预设方向为顺时针方向。若第一电子设备检测到第一滑动输入滑动过程中形成的三角形轨迹的长度值占完整的三角形轨迹的周长值的比值为1/3,即用户通过第一滑动输入绘制的三角形的完成程度为33.34%,即用户绘制了三角形的一条边,则按照133.34%的放大比例,放大所述待裁剪图像以及所述裁剪框;若用户通过第一滑动输入绘制的为一完整的三角形,则按照200%的放大比例,放大所述待裁剪图像以及所述裁剪框。
需要说明的是,上述第一预设形状不仅限于圆形、矩形和三角形,其他形状也可,这里不做具体限定。
在另一可选地实施例中,所述第一输入为沿第二预设方向滑动形成至少部分第二预设形状轨迹的第二滑动输入;上述步骤1021可具体包括:
将所述第二滑动输入形成的轨迹的长度值占完整的所述第二预设形状的周长值的比值确定为目标缩小比例;相应地,上述步骤1022可具体包括:
将所述待裁剪图像以及所述裁剪框按照相同的所述目标缩小比例缩小。
这里,同理,电子设备也能够检测到第二滑动输入滑动过程中形成的轨迹的长度值占完整第二预设形状的周长值的比值。
比如,第二预设形状为圆形,第二预设方向为逆时针方向。若第一电子设备检测到第二滑动输入滑动过程中形成的圆形轨迹的长度值占完整的圆形轨迹的周长值的比值为25%,即用户通过第二滑动输入绘制的为1/4圆形,若当前图像比例为原图比例的300%,则按照原图比例的275%,缩小所述待裁剪图像以及所述裁剪框;若用户通过第二滑动输入绘制的为半个圆形,即1/2圆形,则按照原图比例的250%,缩小所述待裁剪图像以及所述裁剪框;若用户通过第二滑动输入绘制的为一完整的圆形,则按照原图比例的200%,缩小所述待裁剪图像以及所述裁剪框。
需要说明的是,为了避免无限制缩小待裁剪图像以及裁剪框,设定一最小缩小比例。
又比如,第二预设形状为矩形,第二预设方向为逆时针方向。若第一电子设备检测到第二滑动输入滑动过程中形成的矩形轨迹的长度值占完整的矩形轨迹的周长值的比值为50%,即用户通过第二滑动输入绘制的矩形的完成程度为50%,若当前图像比例为原图比例的300%,则按照原图比例的250%,缩小所述待裁剪图像以及所述裁剪框;若用户通过第二滑动输入绘制的为一完整的矩形,则按照原图比例的200%,缩小所述待裁剪图像以及所述裁剪框。
再比如,第二预设形状为等边三角形,第二预设方向为逆时针方向。若第一电子设备检测到第二滑动输入滑动过程中形成的三角形轨迹的长度值占完整的三角形轨迹的周长值的比值为1/3,即用户通过第二滑动输入绘制的三角形的完成程度为33.34%,即用户绘制了三角形的一条边,若当前图像比例 为原图比例的300%,则按照原图比例的266.66%,缩小所述待裁剪图像以及所述裁剪框;若用户通过第二滑动输入绘制的为一完整的三角形,则按照原图比例的200%,缩小所述待裁剪图像以及所述裁剪框。
需要说明的是,上述第一预设形状不仅限于圆形、矩形和三角形,其他形状也可,这里不做具体限定。
基于图1所示的实施例,若经过对待裁剪图像以及所述裁剪框的比例调整以后,尤其是放大以后,在第一屏上可能仅会显示部分的裁剪框,所显示的裁剪框的边框线若不是用户想要精细化调整的图像区域所对应的边缘部分,为了满足用户需求,作为一可选地实现方式,在步骤102之后,步骤103之前,本发明方法还可包括:
接收第三输入;
本步骤中,第三输入为预先设置的输入。可选地,该第三输入为可以包括但不限于点击输入、按压输入、长按输入、捏合输入、拖拽输入、滑动输入和划动输入中的至少一种,也即是说,该第三输入可以为上述输入中的其中一种,或者也可以为其中两种或以上输入的组合操作。
优选地,第三输入为对第一屏或第二屏的划动输入。
响应于所述第三输入,同时移动所述待裁剪图像以及所述裁剪框,将所述裁剪框的目标边框线显示于所述第一屏的目标位置。
为了便于用户查看经精细化剪裁操作后的裁剪框所框选的图像区域的效果是否满足用户的要求,同时也为了方便后续可能的继续精细化调整,基于图1所示的实施例,作为一可选地实现方式,在步骤104之前,本发明方法还可包括:
接收对所述第二屏的第四输入;
本步骤中,第四输入为预先设置的输入,可选地,该第四输入为可以包括但不限于点击输入、按压输入、长按输入、捏合输入、拖拽输入、滑动输入和划动输入中的至少一种,也即是说,该第四输入可以为上述输入中的其中一种,或者也可以为其中两种或以上输入的组合操作。
优选的,第四输入为对第二屏的双击输入。
响应于所述第四输入,将按照比例缩放后的所述待裁剪图像的大小以及 所述裁剪框的大小恢复至比例缩放之前,并显示于所述第一屏。
本步骤中,将按照比例缩放后的所述待裁剪图像的大小以及所述裁剪框的大小恢复至比例缩放之前,也就是将图像比例经第四输入自动变为100%,恢复至待裁剪图像的原图比例。
可选地,所述第二屏为与所述第一屏相背的屏。
这里,比如,电子设备为双面屏电子设备,第一屏为正面屏,第二屏为背面屏;或者,再比如,电子设备为折叠屏电子设备,折叠屏向外折叠之后呈现正面屏和背面屏的状态。如此,方便用户单手操作电子设备。
如图2至图6所示,就一示例说明本发明方法的具体实施过程。该示例的电子设备为双面屏电子设备。
步骤S1,通过第一用户操作控制电子设备进入图片编辑页面,并通过对背面屏的第二用户操作,开启精细化操作模式;
这里,第二用户操作可以是用户在背面屏的三击输入。
如图2、图4和图6所示,为电子设备的正面屏;如图3和图5所示,为电子设备的背面屏。
这里,如图2所示,图片编辑页面中显示有待裁剪图片1以及裁剪框2。
需要说明的是,用户在背面屏快速三击开启精细化操作模式是开启该模式的一种方法,也可以通过其他的如按钮、正面屏悬浮球、下拉菜单、上拉功能栏等方法开启精细化操作模式。
步骤S2,通过用户在背面屏顺时针画圈操作,在保持待裁剪图片以及裁剪框相对位置不变的情况下,将待裁剪图片以及裁剪框按照相同的放大比例放大。
需要说明的是,用户的食指在背面屏顺时针画一个完整圈,开启图片放大模式,如图3所示,若用户的食指画完圈后继续画圈,则开始执行放大待裁剪图片以及裁剪框的步骤。
这里,默认检测到顺时针画一个圈为开启放大模式的开关,画第一个圈期间,图片不放大,从画第一个圈结束后开始检测画的圈的百分比,根据画的圈的百分比,调整图片的放大倍数。
例如,画1/4圈时图片放大125%,画1/2圈时图片放大150%,画3/4圈 时图片放大175%,画第二圈结束放大200%,继续画圈直到待裁剪图片到达最大放大倍数。图片放大时,裁剪框的范围随图片一起放大,但裁剪框的边框线的线条粗细不变。
例如,图4所示为图2所示的放大后的示意图,待裁剪图片放大后,界面中只显示部分的裁剪框,可以通过在正面屏的用户操作移动裁剪框到合适的位置,也可以通过在背面屏的操作的用户操作移动裁剪框到合适的位置。
步骤S3,若在预设时间段内检测不到用户触摸背面屏触控区域的触控操作,正面屏保存当前状态。
比如,用户可以松开食指,此时,正面屏保存到最后一次触摸的状态。
步骤S4,通过对背面屏的第三用户操作,同时移动待裁剪图片以及裁剪框,将裁剪框的目标边框线移动到合适位置。
这里,用户食指在背面屏触控区域滑动,正面屏显示部分随之变化。如图5所示,用户食指在背面屏触控区域向背面屏的左方滑动,正面屏的界面向右方平移到图6所示的位置。其中,待裁剪图片以及裁剪框同时平移。
需要说明的是,用户食指在背面屏的移动方向是相对于背面而言的,可以将屏幕看作是透明屏幕,食指在玻璃的背面移动,从正面玻璃看上去的移动方向是左右相反,上下相同的,如食指在背面向左移动,正面看到的是向右移动,食指在背面向上移动,正面看到的也是向上移动。食指可以在背屏任意方向滑动,正面屏显示部分也随之进行相应的变化。
之后,通过对目标边框线的第四用户操作,在保持所述待裁剪图片的显示位置不变的情况下,调整目标边框线的位置。此时,剪裁框的大小发生改变,即对裁剪框所框选的区域的边缘部分进行精细调整。
步骤S5,通过用户在背面屏逆时针画圈操作,在保持待裁剪图片以及裁剪框相对位置不变的情况下,将待裁剪图片以及裁剪框按照相同的缩小比例缩小。
这里,用户的食指在背面屏逆时针画一个完整圈,开启图片缩小模式,若用户食指画完圈后继续画圈,则开始执行缩小待裁剪图片以及裁剪框的步骤。
这里,默认检测到逆时针画一个圈为开启缩小模式的开关,画第一个圈 期间,图片不缩小,从画第一个圈结束后开始检测画的圈的百分比,根据画的圈的百分比,调整图片的缩小倍数。
例如,当前图片比例为原图比例的300%,画1/4圈时图片比例为275%,画1/2圈时图片比例为250%,画3/4圈时图片比例为225%,画第二圈结束图片比例为200%,继续画圈直到图片到达最小缩小倍数。图片缩小时,裁剪框的范围随图片一起缩小,但裁剪框的边框线的线条粗细不变。
需要说明的是,步骤S5与步骤S3是两个并列执行的步骤,也可以是在S3步骤中放大比例使得用户觉得放大过大,可执行S5来调整比例。
步骤S6,通过对背面屏的第五用户操作,图片比例在当前比例和100%之间切换。
这里,可选地,第五用户操作可以是用户在背面屏的双击输入。
步骤S7,通过对背面屏的第二用户操作,关闭精细化操作模式。
这里,第二用户操作可以是用户在背面屏的三击输入,用户食指在背面屏三击结束精细化操作模式,结束精细化操作模式后,图片比例自动变为100%。
本发明实施例的图像剪裁方法,通过在第一屏显示待剪裁图像,且待裁剪图像上显示有裁剪框的情况下,接收对第二屏的第一输入;响应于第一输入,在保持待裁剪图像与裁剪框的相对位置不变的情况下,将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的缩放比例调整;接收对第一屏上显示的裁剪框的目标边框线的第二输入;响应于第二输入,在保持待裁剪图像的显示位置不变的情况下,调整目标边框线的位置,对待裁剪图像进行裁剪,如此,无需用户对裁剪框进行上下左右反复地移动操作,通过简单地裁剪操作,便可实现对图像的精细化裁剪,且能够达到较佳地裁剪效果,满足用户对图像的裁剪需求,提升用户裁剪操作的体验。
基于上述方法,本发明实施例提供一种用以实现上述方法的电子设备。
如图7所示,为本发明实施例提供的电子设备的结构示意图。本发明实施例提供一种电子设备700,该电子设备700包括第一屏和第二屏,可以包括:
第一接收模块701,用于在所述第一屏显示待裁剪图像,且所述待裁剪图 像上显示有裁剪框的情况下,接收对所述第二屏的第一输入;
调整模块702,用于响应于所述第一输入,在保持所述待裁剪图像与所述裁剪框的相对位置不变的情况下,将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的缩放比例调整;
第二接收模块703,用于接收对所述第一屏上显示的所述裁剪框的目标边框线的第二输入;
裁剪模块704,用于响应于所述第二输入,在保持所述待裁剪图像的显示位置不变的情况下,调整所述目标边框线的位置,对所述待裁剪图像进行裁剪。
可选地,所述调整模块702包括:
缩放比例确定单元,用于根据所述第一输入,确定目标缩放比例;
调整单元,用于将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的所述目标缩放比例调整。
可选地,所述第一输入为沿第一预设方向滑动形成至少部分第一预设形状轨迹的第一滑动输入;所述缩放比例确定单元具体用于:
将所述第一滑动输入形成的轨迹的长度值占完整的所述第一预设形状的周长值的比值确定为目标放大比例;
相应地,所述调整单元具体用于:
将所述待裁剪图像以及所述裁剪框按照相同的所述目标放大比例放大。
可选地,所述第一输入为沿第二预设方向滑动形成至少部分第二预设形状轨迹的第二滑动输入;所述缩放比例确定单元具体用于:
将所述第二滑动输入形成的轨迹的长度值占完整的所述第二预设形状的周长值的比值确定为目标缩小比例;
所述调整单元具体用于:
将所述待裁剪图像以及所述裁剪框按照相同的所述目标缩小比例缩小。
本发明实施例的电子设备,还可包括:
第三接收模块,用于在将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的缩放比例调整之后,接收对所述第一屏上显示的所述裁剪框的目标边框线的第二输入之前,接收第三输入;
第一显示模块,用于响应于所述第三输入,同时移动所述待裁剪图像以及所述裁剪框,将所述裁剪框的目标边框线显示于所述第一屏的目标位置。
本发明实施例的电子设备,还可包括:
第四接收模块,用于在响应于所述第二输入,在保持所述待裁剪图像的显示位置不变的情况下,调整所述目标边框线的位置,对所述待裁剪图像进行裁剪之前,接收对所述第二屏的第四输入;
第二显示模块,用于响应于所述第四输入,将按照比例缩放后的所述待裁剪图像的大小以及所述裁剪框的大小恢复至比例缩放之前,并显示于所述第一屏。
本发明实施例提供的电子设备能够实现图1至图6的方法实施例中电子设备实现的各个过程,为避免重复,这里不再赘述。
本发明实施例提供的电子设备,通过第一接收模块在第一屏显示待剪裁图像,且待裁剪图像上显示有裁剪框的情况下,接收对第二屏的第一输入;调整模块响应于第一输入,在保持待裁剪图像与裁剪框的相对位置不变的情况下,将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的缩放比例调整;第二接收模块接收对第一屏上显示的裁剪框的目标边框线的第二输入;裁剪模块响应于第二输入,在保持待裁剪图像的显示位置不变的情况下,调整目标边框线的位置,对待裁剪图像进行裁剪,如此,无需用户对裁剪框进行上下左右反复地移动操作,通过简单地裁剪操作,便可实现对图像的精细化裁剪,且能够达到较佳地裁剪效果,满足用户对图像的裁剪需求,提升用户裁剪操作的体验。
图8为实现本发明各个实施例的一种电子设备的硬件结构示意图。
该电子设备800包括第一屏和第二屏,还包括但不限于:射频单元801、网络模块802、音频输出单元803、输入单元804、传感器805、显示单元806、用户输入单元807、接口单元808、存储器809、处理器810、以及电源811等部件。本领域技术人员可以理解,图8中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本发明实施例中,电子设备包括但不限于手机、平板电脑、笔记本电脑、掌上电脑、车载终端设备、可穿戴设备、以及计 步器等。
其中,在所述第一屏显示待裁剪图像,且所述待裁剪图像上显示有裁剪框的情况下,接收对所述第二屏的第一输入;响应于所述第一输入,在保持所述待裁剪图像与所述裁剪框的相对位置不变的情况下,将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的缩放比例调整;接收对所述第一屏上显示的所述裁剪框的目标边框线的第二输入;响应于所述第二输入,在保持所述待裁剪图像的显示位置不变的情况下,调整所述目标边框线的位置,对所述待裁剪图像进行裁剪。
本发明实施例中,无需用户对裁剪框进行上下左右反复地移动操作,通过简单地裁剪操作,便可实现对图像的精细化裁剪,且能够达到较佳地裁剪效果,满足用户对图像的裁剪需求,提升用户裁剪操作的体验。
应理解的是,本发明实施例中,射频单元801可用于收发信息或通话过程中,信号的接收和发送,具体的,将来自基站的下行数据接收后,给处理器810处理;另外,将上行的数据发送给基站。通常,射频单元801包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元801还可以通过无线通信系统与网络和其他设备通信。
电子设备通过网络模块802为用户提供了无线的宽带互联网访问,如帮助用户收发电子邮件、浏览网页和访问流式媒体等。
音频输出单元803可以将射频单元801或网络模块802接收的或者在存储器809中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元803还可以提供与电子设备800执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元803包括扬声器、蜂鸣器以及受话器等。
输入单元804用于接收音频或视频信号。输入单元804可以包括图形处理器(Graphics Processing Unit,GPU)8041和麦克风8042,图形处理器8041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元806上。经图形处理器8041处理后的图像帧可以存储在存储器809(或其它存储介质)中或者经由射频单元801或网络模块802进行发送。麦克风8042可以 接收声音,并且能够将这样的声音处理为音频数据。处理后的音频数据可以在电话通话模式的情况下转换为可经由射频单元801发送到移动通信基站的格式输出。
电子设备800还包括至少一种传感器805,比如光传感器、运动传感器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板8061的亮度,接近传感器可在电子设备800移动到耳边时,关闭显示面板8061和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别移动电子设备姿态(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;传感器805还可以包括指纹传感器、压力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等,在此不再赘述。
显示单元806用于显示由用户输入的信息或提供给用户的信息。显示单元806可包括显示面板8061,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板8061。
用户输入单元807可用于接收输入的数字或字符信息,以及产生与移动电子设备的用户设置以及功能控制有关的键信号输入。具体地,用户输入单元807包括触控面板8071以及其他输入设备8072。触控面板8071,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板8071上或在触控面板8071附近的操作)。触控面板8071可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器810,接收处理器810发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板8071。除了触控面板8071,用户输入单元807还可以包括其他输入设备8072。具体地,其他输入设备8072可以包括但不限于物理键盘、功能键(比如音量控制 按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。
进一步的,触控面板8071可覆盖在显示面板8061上,当触控面板8071检测到在其上或附近的触摸操作后,传送给处理器810以确定触摸事件的类型,随后处理器810根据触摸事件的类型在显示面板8061上提供相应的视觉输出。虽然在图8中,触控面板8071与显示面板8061是作为两个独立的部件来实现移动电子设备的输入和输出功能,但是在某些实施例中,可以将触控面板8071与显示面板8061集成而实现移动电子设备的输入和输出功能,具体此处不做限定。
接口单元808为外部装置与电子设备800连接的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。接口单元808可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到电子设备800内的一个或多个元件或者可以用于在电子设备800和外部装置之间传输数据。
存储器809可用于存储软件程序以及各种数据。存储器809可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器809可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
处理器810是移动电子设备的控制中心,利用各种接口和线路连接整个移动电子设备的各个部分,通过运行或执行存储在存储器809内的软件程序和/或模块,以及调用存储在存储器809内的数据,执行移动电子设备的各种功能和处理数据,从而对移动电子设备进行整体监控。处理器810可包括一个或多个处理单元;优选的,处理器810可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器810中。
电子设备800还可以包括给各个部件供电的电源811(比如电池),优选的,电源811可以通过电源管理系统与处理器810逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
另外,电子设备800包括一些未示出的功能模块,在此不再赘述。
优选的,本发明实施例还提供一种电子设备,包括处理器810,存储器809,存储在存储器809上并可在处理器810上运行的计算机程序,该计算机程序被处理器810执行时实现上述图像裁剪方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述图像裁剪方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台电子设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。
上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求 所保护的范围情况下,还可做出很多形式,均属于本发明的保护之内。

Claims (14)

  1. 一种图像裁剪方法,应用于包括第一屏和第二屏的电子设备,包括:
    在所述第一屏显示待裁剪图像,且所述待裁剪图像上显示有裁剪框的情况下,接收对所述第二屏的第一输入;
    响应于所述第一输入,在保持所述待裁剪图像与所述裁剪框的相对位置不变的情况下,将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的缩放比例调整;
    接收对所述第一屏上显示的所述裁剪框的目标边框线的第二输入;
    响应于所述第二输入,在保持所述待裁剪图像的显示位置不变的情况下,调整所述目标边框线的位置,对所述待裁剪图像进行裁剪。
  2. 根据权利要求1所述的方法,其中,所述将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的缩放比例调整,包括:
    根据所述第一输入,确定目标缩放比例;
    将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的所述目标缩放比例调整。
  3. 根据权利要求2所述的方法,其中,所述第一输入为沿第一预设方向滑动形成至少部分第一预设形状轨迹的第一滑动输入;
    所述根据所述第一输入,确定目标缩放比例,包括:
    将所述第一滑动输入形成的轨迹的长度值占完整的所述第一预设形状的周长值的比值确定为目标放大比例;
    所述将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的所述目标缩放比例调整,包括:
    将所述待裁剪图像以及所述裁剪框按照相同的所述目标放大比例放大。
  4. 根据权利要求2所述的方法,其中,所述第一输入为沿第二预设方向滑动形成至少部分第二预设形状轨迹的第二滑动输入;
    所述根据所述第一输入,确定目标缩放比例,包括:
    将所述第二滑动输入形成的轨迹的长度值占完整的所述第二预设形状的周长值的比值确定为目标缩小比例;
    所述将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的所述目标缩放比例调整,包括:
    将所述待裁剪图像以及所述裁剪框按照相同的所述目标缩小比例缩小。
  5. 根据权利要求1所述的方法,其中,将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的缩放比例调整之后,接收对所述第一屏上显示的所述裁剪框的目标边框线的第二输入之前,所述方法还包括:
    接收第三输入;
    响应于所述第三输入,同时移动所述待裁剪图像以及所述裁剪框,将所述裁剪框的目标边框线显示于所述第一屏的目标位置。
  6. 根据权利要求1所述的方法,其中,响应于所述第二输入,在保持所述待裁剪图像的显示位置不变的情况下,调整所述目标边框线的位置,对所述待裁剪图像进行裁剪之前,所述方法还包括:
    接收对所述第二屏的第四输入;
    响应于所述第四输入,将按照比例缩放后的所述待裁剪图像的大小以及所述裁剪框的大小恢复至比例缩放之前,并显示于所述第一屏。
  7. 一种电子设备,所述电子设备包括第一屏和第二屏,包括:
    第一接收模块,用于在所述第一屏显示待裁剪图像,且所述待裁剪图像上显示有裁剪框的情况下,接收对所述第二屏的第一输入;
    调整模块,用于响应于所述第一输入,在保持所述待裁剪图像与所述裁剪框的相对位置不变的情况下,将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的缩放比例调整;
    第二接收模块,用于接收对所述第一屏上显示的所述裁剪框的目标边框线的第二输入;
    裁剪模块,用于响应于所述第二输入,在保持所述待裁剪图像的显示位置不变的情况下,调整所述目标边框线的位置,对所述待裁剪图像进行裁剪。
  8. 根据权利要求7所述的电子设备,其中,所述调整模块包括:
    缩放比例确定单元,用于根据所述第一输入,确定目标缩放比例;
    调整单元,用于将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的所述目标缩放比例调整。
  9. 根据权利要求8所述的电子设备,其中,所述第一输入为沿第一预设方向滑动形成至少部分第一预设形状轨迹的第一滑动输入;
    所述缩放比例确定单元具体用于:
    将所述第一滑动输入形成的轨迹的长度值占完整的所述第一预设形状的周长值的比值确定为目标放大比例;
    所述调整单元具体用于:
    将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的所述目标放大比例放大。
  10. 根据权利要求8所述的电子设备,其中,所述第一输入为沿第二预设方向滑动形成至少部分第二预设形状轨迹的第二滑动输入;
    所述缩放比例确定单元具体用于:
    将所述第二滑动输入形成的轨迹的长度值占完整的所述第二预设形状的周长值的比值确定为目标缩小比例;
    所述调整单元具体用于:
    将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的所述目标缩小比例缩小。
  11. 根据权利要求7所述的电子设备,还包括:
    第三接收模块,用于在将所述待裁剪图像的大小以及所述裁剪框的大小按照相同的缩放比例调整之后,接收对所述第一屏上显示的所述裁剪框的目标边框线的第二输入之前,接收第三输入;
    第一显示模块,用于响应于所述第三输入,同时移动所述待裁剪图像以及所述裁剪框,将所述裁剪框的目标边框线显示于所述第一屏的目标位置。
  12. 根据权利要求7所述的电子设备,还包括:
    第四接收模块,用于在响应于所述第二输入,在保持所述待裁剪图像的显示位置不变的情况下,调整所述目标边框线的位置,对所述待裁剪图像进行裁剪之前,接收对所述第二屏的第四输入;
    第二显示模块,用于响应于所述第四输入,将按照比例缩放后的所述待裁剪图像的大小以及所述裁剪框的大小恢复至比例缩放之前,并显示于所述第一屏。
  13. 一种电子设备,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求1-6任一项所述的图像裁剪方法的步骤。
  14. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-6任一项所述的图像裁剪方法的步骤。
PCT/CN2021/071052 2020-01-17 2021-01-11 图像裁剪方法及电子设备 Ceased WO2021143642A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2022543577A JP7446441B2 (ja) 2020-01-17 2021-01-11 画像クロップ方法及び電子機器
KR1020227022841A KR102661343B1 (ko) 2020-01-17 2021-01-11 이미지 크로핑 방법 및 전자기기
EP21741979.5A EP4092613B1 (en) 2020-01-17 2021-01-11 Image cropping method and electronic device
US17/865,365 US12469101B2 (en) 2020-01-17 2022-07-14 Image cropping method and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010051509.4 2020-01-17
CN202010051509.4A CN111311489B (zh) 2020-01-17 2020-01-17 一种图像裁剪方法及电子设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/865,365 Continuation US12469101B2 (en) 2020-01-17 2022-07-14 Image cropping method and electronic device

Publications (1)

Publication Number Publication Date
WO2021143642A1 true WO2021143642A1 (zh) 2021-07-22

Family

ID=71150922

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/071052 Ceased WO2021143642A1 (zh) 2020-01-17 2021-01-11 图像裁剪方法及电子设备

Country Status (6)

Country Link
US (1) US12469101B2 (zh)
EP (1) EP4092613B1 (zh)
JP (1) JP7446441B2 (zh)
KR (1) KR102661343B1 (zh)
CN (1) CN111311489B (zh)
WO (1) WO2021143642A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114004845A (zh) * 2021-10-28 2022-02-01 网易(杭州)网络有限公司 一种图片编辑方法、电子设备和存储介质
CN114327730A (zh) * 2021-12-31 2022-04-12 维沃移动通信有限公司 图像显示方法和电子设备

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111311489B (zh) * 2020-01-17 2023-07-04 维沃移动通信有限公司 一种图像裁剪方法及电子设备
CN112541919B (zh) * 2020-12-29 2024-09-17 申建常 一种图片分割处理方法及处理系统
CN114063864A (zh) * 2021-11-29 2022-02-18 惠州Tcl移动通信有限公司 图像显示方法、装置、电子设备及计算机可读存储介质
CN114612485B (zh) * 2022-03-10 2025-04-29 北京达佳互联信息技术有限公司 一种图像裁剪方法、装置及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102646258A (zh) * 2011-02-21 2012-08-22 腾讯科技(深圳)有限公司 图像裁剪方法及系统
US20140300645A1 (en) * 2013-04-04 2014-10-09 Sony Corporation Method and apparatus for controlling a virtual camera
CN105205780A (zh) * 2015-10-19 2015-12-30 新华瑞德(北京)网络科技有限公司 图片裁剪方法和装置
CN107622497A (zh) * 2017-09-29 2018-01-23 广东欧珀移动通信有限公司 图像裁剪方法、装置、计算机可读存储介质和计算机设备
CN108898555A (zh) * 2018-07-27 2018-11-27 维沃移动通信有限公司 一种图像处理方法及终端设备
CN111311489A (zh) * 2020-01-17 2020-06-19 维沃移动通信有限公司 一种图像裁剪方法及电子设备

Family Cites Families (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1812906B1 (en) * 2004-11-19 2020-04-01 FUJIFILM Corporation Screen edit apparatus, screen edit method, and screen edit program
US8587614B2 (en) * 2007-12-10 2013-11-19 Vistaprint Schweiz Gmbh System and method for image editing of electronic product design
JP5093080B2 (ja) * 2008-12-05 2012-12-05 富士通モバイルコミュニケーションズ株式会社 携帯端末
KR101564108B1 (ko) * 2009-03-20 2015-10-28 엘지전자 주식회사 듀얼 디스플레이부를 구비한 이동 통신 단말기에서의 아이템 제어 방법 및 이를 적용한 이동 통신 단말기
US8823749B2 (en) * 2009-06-10 2014-09-02 Qualcomm Incorporated User interface methods providing continuous zoom functionality
US9489078B2 (en) * 2011-02-10 2016-11-08 Samsung Electronics Co., Ltd. Portable device comprising a touch-screen display, and method for controlling same
JP5885152B2 (ja) * 2011-05-27 2016-03-15 京セラ株式会社 携帯端末装置、プログラムおよび表示制御方法
US9158455B2 (en) * 2011-07-12 2015-10-13 Apple Inc. Multifunctional environment for image cropping
JP5859298B2 (ja) * 2011-12-08 2016-02-10 任天堂株式会社 情報処理システム、情報処理装置、情報処理方法及び情報処理プログラム
CN104335151B (zh) * 2012-06-29 2018-10-26 日本电气株式会社 终端设备、显示控制方法和程序
KR101999137B1 (ko) * 2013-01-03 2019-07-11 삼성전자주식회사 카메라를 구비하는 장치의 이미지 처리장치 및 방법
JP6598089B2 (ja) * 2015-04-14 2019-10-30 華為技術有限公司 ジェスチャコントロール方法、装置、端末デバイス、およびストレージ媒体
CN105872236A (zh) * 2016-04-28 2016-08-17 努比亚技术有限公司 一种图片显示装置和方法
US10768804B2 (en) * 2016-09-06 2020-09-08 Microsoft Technology Licensing, Llc Gesture language for a device with multiple touch surfaces
US9917957B1 (en) * 2016-11-17 2018-03-13 Xerox Corporation Cropping image within image preview
JP7029913B2 (ja) * 2017-09-22 2022-03-04 Line株式会社 プログラム、情報処理方法、及び情報処理装置
US11126258B2 (en) * 2017-10-14 2021-09-21 Qualcomm Incorporated Managing and mapping multi-sided touch
CN108628508B (zh) * 2018-04-25 2020-05-05 维沃移动通信有限公司 一种调整剪裁窗口的方法及移动终端
CN110221738A (zh) * 2019-05-16 2019-09-10 珠海格力电器股份有限公司 一种图片处理的方法及设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102646258A (zh) * 2011-02-21 2012-08-22 腾讯科技(深圳)有限公司 图像裁剪方法及系统
US20140300645A1 (en) * 2013-04-04 2014-10-09 Sony Corporation Method and apparatus for controlling a virtual camera
CN105205780A (zh) * 2015-10-19 2015-12-30 新华瑞德(北京)网络科技有限公司 图片裁剪方法和装置
CN107622497A (zh) * 2017-09-29 2018-01-23 广东欧珀移动通信有限公司 图像裁剪方法、装置、计算机可读存储介质和计算机设备
CN108898555A (zh) * 2018-07-27 2018-11-27 维沃移动通信有限公司 一种图像处理方法及终端设备
CN111311489A (zh) * 2020-01-17 2020-06-19 维沃移动通信有限公司 一种图像裁剪方法及电子设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4092613A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114004845A (zh) * 2021-10-28 2022-02-01 网易(杭州)网络有限公司 一种图片编辑方法、电子设备和存储介质
CN114327730A (zh) * 2021-12-31 2022-04-12 维沃移动通信有限公司 图像显示方法和电子设备

Also Published As

Publication number Publication date
KR20220108147A (ko) 2022-08-02
CN111311489B (zh) 2023-07-04
US20220351330A1 (en) 2022-11-03
EP4092613B1 (en) 2026-01-28
JP2023510620A (ja) 2023-03-14
US12469101B2 (en) 2025-11-11
EP4092613A4 (en) 2023-07-19
JP7446441B2 (ja) 2024-03-08
KR102661343B1 (ko) 2024-04-25
EP4092613A1 (en) 2022-11-23
CN111311489A (zh) 2020-06-19

Similar Documents

Publication Publication Date Title
KR102661343B1 (ko) 이미지 크로핑 방법 및 전자기기
WO2019228294A1 (zh) 对象分享方法及移动终端
WO2020156169A1 (zh) 显示控制方法及终端设备
WO2021104321A1 (zh) 图像显示方法及电子设备
WO2020134744A1 (zh) 图标移动方法及移动终端
WO2020238497A1 (zh) 图标移动方法及终端设备
WO2021136136A1 (zh) 截图方法及电子设备
WO2019184947A1 (zh) 图像查看方法及移动终端
CN108549508A (zh) 一种应用图标显示方法和移动终端
CN108491123A (zh) 一种调节应用程序图标的方法及移动终端
WO2021109961A1 (zh) 快捷标识生成方法、电子设备及介质
WO2021004426A1 (zh) 内容选择方法及终端
WO2020151513A1 (zh) 信息处理方法及终端设备
CN108319418A (zh) 一种界面显示控制方法及移动终端
CN108536366A (zh) 一种应用程序窗口调整方法及终端
WO2021073579A1 (zh) 长截图的方法及终端设备
WO2020038143A1 (zh) 显示界面的处理方法和移动终端
CN109656461B (zh) 一种截屏方法和终端
CN110413363B (zh) 一种截图方法及终端设备
WO2021031868A1 (zh) 界面显示方法及终端
CN108469940A (zh) 一种截图方法及终端
CN108228902A (zh) 一种文件显示方法及移动终端
WO2020156113A1 (zh) 界面显示控制方法及移动终端
CN108600498B (zh) 信息提示方法及装置
WO2021083114A1 (zh) 照片查看方法及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21741979

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 20227022841

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2022543577

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2021741979

Country of ref document: EP

Effective date: 20220817

WWG Wipo information: grant in national office

Ref document number: 2021741979

Country of ref document: EP