CN105808051B - Image processing method and electronic equipment - Google Patents

Image processing method and electronic equipment Download PDF

Info

Publication number
CN105808051B
CN105808051B CN201610110037.9A CN201610110037A CN105808051B CN 105808051 B CN105808051 B CN 105808051B CN 201610110037 A CN201610110037 A CN 201610110037A CN 105808051 B CN105808051 B CN 105808051B
Authority
CN
China
Prior art keywords
image
curve track
track
closed
area image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610110037.9A
Other languages
Chinese (zh)
Other versions
CN105808051A (en
Inventor
台流杰
田星
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201610110037.9A priority Critical patent/CN105808051B/en
Publication of CN105808051A publication Critical patent/CN105808051A/en
Application granted granted Critical
Publication of CN105808051B publication Critical patent/CN105808051B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Processing Or Creating Images (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses an image processing method, which is applied to electronic equipment and comprises the following steps: loading and displaying a first image; detecting a first operation of forming a closed curve track on the first image, and taking an area image in the closed curve track as a target area image; detecting a second operation of forming a non-closed curvilinear locus on the first image, the non-closed curvilinear locus having at least two intersections with the closed curvilinear locus; determining an operation type of the second operation based on the relative position information of the non-closed curve track and the position information of the intersection point; and adjusting the image area of the target area image according to the operation type. The invention also discloses an electronic device.

Description

Image processing method and electronic equipment
Technical Field
The present invention relates to information processing technologies, and in particular, to an image processing method and an electronic device.
Background
When the current user selects an image, the user can add or delete the selected image area only by entering an image area adding or subtracting mode, and the device cannot automatically judge the operation of the user. For example, when a user selects an image by using Photoshop, the user can add or delete the selected image area only by using a Shift key and an Alt key of a keyboard, and the operation is complicated and the user experience is poor.
Disclosure of Invention
The embodiment of the invention provides an image processing method and electronic equipment, which at least solve the problems in the prior art, can realize the area adjustment of an image area selected by a user without entering any special mode, and has the advantages of simple and convenient operation and good user experience.
The technical scheme of the embodiment of the invention is realized as follows:
the embodiment of the invention provides an image processing method, which is applied to electronic equipment and comprises the following steps:
loading and displaying a first image;
detecting a first operation of forming a closed curve track on the first image, and taking an area image in the closed curve track as a target area image;
detecting a second operation of forming a non-closed curvilinear locus on the first image, the non-closed curvilinear locus having at least two intersections with the closed curvilinear locus;
determining an operation type of the second operation based on the relative position information of the non-closed curve track and the position information of the intersection point;
and adjusting the image area of the target area image according to the operation type.
In the foregoing solution, determining an operation type of the second operation based on the relative position information of the non-closed curve track and the position information of the intersection includes:
determining that there are two intersections of the non-closed curve trajectory with the closed curve trajectory;
extracting a curved track between the two intersections from the non-closed curved track as a third curved track;
determining the operation type as a first operation type when the third curved track is located within the closed curved track; the first operation type is used for indicating the reduction of the image area of the target area image;
determining the operation type as a second operation type when the third curved track is outside the closed curved track; the second operation type is used for indicating the expansion of the image area of the target area image.
In the above solution, the operation type is a first operation type, the third curve trajectory divides the target area image into a first area image and a second area image, and the method further includes:
marking the first area image and the second area image by different display effects;
generating first prompt information; the first prompt message is used for prompting a user to give an instruction for deleting the first area image or the second area image from the target area image.
In the above scheme, the operation type is a second operation type; the image area adjustment of the target area image according to the operation type includes:
and taking an image which is formed by a curve track between two intersection points in the closed curve track and the third curve track and is positioned outside the target area image as a third area image, and combining the third area image and the target area image into one area image.
In the foregoing solution, after performing image area adjustment on the target area image according to the operation type, the method further includes:
and carrying out background image information identification on the target area image subjected to the image area adjustment, and adjusting the transparency of the background image obtained by identification according to the preset background transparency.
In the foregoing solution, determining an operation type of the second operation based on the relative position information of the non-closed curve track and the position information of the intersection includes:
determining that there are N intersections of the non-closed curve trajectory with the closed curve trajectory; n is a positive integer greater than 2;
extracting a curve track between the first intersection point and the second intersection point from the non-closed curve track to be used as a third curve track, and extracting a curve track between the second intersection point and the third intersection point to be used as a fourth curve track until a curve track between the (N-1) th intersection point and the (N) th intersection point is extracted to be used as an (N + 1) th curve track;
and respectively judging the relative position relationship between the third curve track and the fourth curve track until the (N + 1) th curve track and the closed curve track, if the third curve track and the fourth curve track are positioned in the closed curve track, the corresponding curve track indicates to reduce the image area of the target area image, and if the fourth curve track and the N +1 th curve track are positioned outside the closed curve track, the corresponding curve track indicates to expand the image area of the target area image.
An embodiment of the present invention further provides an electronic device, where the electronic device includes: the device comprises a display unit, a detection unit, a determination unit and an adjustment unit; wherein the content of the first and second substances,
the display unit is used for loading and displaying a first image;
the detection unit is used for detecting a first operation of forming a closed curve track on the first image and taking an area image in the closed curve track as a target area image;
detecting a second operation of forming a non-closed curvilinear locus on the first image, the non-closed curvilinear locus having at least two intersections with the closed curvilinear locus;
the determining unit is used for determining the operation type of the second operation based on the relative position information of the non-closed curve track and the position information of the intersection point;
and the adjusting unit is used for adjusting the image area of the target area image according to the operation type.
In the above scheme, the determining unit is further configured to determine that two intersections exist between the non-closed curve trajectory and the closed curve trajectory;
extracting a curved track between the two intersections from the non-closed curved track as a third curved track;
determining the operation type as a first operation type when the third curved track is located within the closed curved track; the first operation type is used for indicating the reduction of the image area of the target area image;
determining the operation type as a second operation type when the third curved track is outside the closed curved track; the second operation type is used for indicating the expansion of the image area of the target area image.
In the above scheme, the operation type is a first operation type, and the third curve trajectory divides the target area image into a first area image and a second area image;
the electronic equipment further comprises a prompting unit used for marking the first area image and the second area image with different display effects;
generating first prompt information; the first prompt message is used for prompting a user to give an instruction for deleting the first area image or the second area image from the target area image.
In the above scheme, the operation type is a second operation type;
the adjusting unit is further configured to use an image, which is formed by a curve track between two intersection points in the closed curve track and the third curve track and is located outside the target area image, as a third area image, and combine the third area image and the target area image into one area image.
In the foregoing solution, the adjusting unit is further configured to perform background image information identification on the target area image after the image area adjustment is performed, and adjust the transparency of the background image obtained through identification according to a preset background transparency.
In the foregoing solution, the determining unit is further configured to determine that N intersection points exist between the non-closed curve trajectory and the closed curve trajectory; n is a positive integer greater than 2;
extracting a curve track between the first intersection point and the second intersection point from the non-closed curve track to be used as a third curve track, and extracting a curve track between the second intersection point and the third intersection point to be used as a fourth curve track until a curve track between the (N-1) th intersection point and the (N) th intersection point is extracted to be used as an (N + 1) th curve track;
and respectively judging the relative position relationship between the third curve track and the fourth curve track until the (N + 1) th curve track and the closed curve track, if the third curve track and the fourth curve track are positioned in the closed curve track, the corresponding curve track indicates to reduce the image area of the target area image, and if the fourth curve track and the N +1 th curve track are positioned outside the closed curve track, the corresponding curve track indicates to expand the image area of the target area image.
According to the image processing method and the electronic device provided by the embodiment of the invention, a first image is loaded and displayed, a closed curve track and a non-closed curve track formed on the first image are sequentially detected, and at least two intersections exist between the non-closed curve track and the closed curve track, so that the operation type of a second operation is determined based on the relative position information between the non-closed curve track and the position information of the intersections, and the image area of a target area image is adjusted according to the operation type; therefore, a user only needs to draw a closed curve track of any graph to determine a target area image, then the drawing line is crossed with the closed curve track, the image area adjustment of the target area image can be achieved, the user can achieve the area adjustment of the image area selected by the user without entering any special mode, the operation is simple and convenient, and the user experience is good.
Drawings
FIG. 1 is a first schematic flow chart illustrating an implementation of an image processing method according to an embodiment of the present invention;
FIG. 2a is a first schematic view of a first image loaded and displayed according to an embodiment of the present invention;
FIG. 2b is a first schematic diagram of an image of a closed curve trace detected according to an embodiment of the present invention;
FIG. 2c is a first diagram of an image of a non-closed curve trace detected according to an embodiment of the present invention;
FIG. 2d is a schematic diagram of an image obtained by segmenting an image of a target area by a third curved track according to an embodiment of the present invention;
FIG. 2e is a diagram illustrating a first exemplary embodiment of adjusting the area of a target image according to the present invention;
FIG. 2f is a schematic diagram of an image displaying a user prompt message according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a second implementation flow of the image processing method according to the embodiment of the present invention;
FIG. 4a is a second schematic view of a first image loaded and displayed according to an embodiment of the present invention;
FIG. 4b is a second schematic diagram of an image of a closed curve trace detected according to an embodiment of the present invention;
FIG. 4c is a second schematic image of a non-closed curve trace detected according to an embodiment of the present invention;
FIG. 4d is a second schematic diagram illustrating a target image area after performing area adjustment according to an embodiment of the present invention;
FIG. 5 is a third schematic flow chart illustrating an implementation of an image processing method according to an embodiment of the present invention;
FIG. 6a is a third schematic view of a first image loaded and displayed according to an embodiment of the present invention;
FIG. 6b is a third schematic image of a closed curve trace detected according to an embodiment of the present invention;
FIG. 6c is a third schematic image of a non-closed curve trace detected according to an embodiment of the present invention;
FIG. 6d is a schematic diagram of an image of a third curve trace and a fourth curve trace extracted according to the embodiment of the present invention;
fig. 6e is a schematic diagram of a third embodiment of the present invention after performing region adjustment on a target image region;
FIG. 6f is a schematic diagram of an image after background transparency adjustment according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the invention.
Detailed Description
In an embodiment of the present invention, a first image is loaded and displayed; detecting a first operation of forming a closed curve track on the first image, and taking an area image in the closed curve track as a target area image; detecting a second operation of forming a non-closed curvilinear locus on the first image, the non-closed curvilinear locus having at least two intersections with the closed curvilinear locus; determining an operation type of the second operation based on the relative position information of the non-closed curve track and the position information of the intersection point; and adjusting the image area of the target area image according to the operation type.
The electronic devices in the embodiments of the present invention include, but are not limited to, mobile terminals such as smart phones, notebook computers, PAD (tablet computer), etc., and fixed terminals such as digital TVs, desktop computers, etc.
The invention is described in further detail below with reference to the figures and specific examples.
Example one
Fig. 1 is a schematic diagram of an implementation flow of an image processing method according to an embodiment of the present invention, applied to an electronic device, as shown in fig. 1, the implementation flow of the image processing method according to the embodiment of the present invention includes:
step 101: the first image is loaded and displayed.
Here, the first image is any image selected by the user and required to be subjected to image area processing, and as shown in fig. 2a, a schematic diagram of the first image to be processed loaded and displayed in the embodiment of the present invention is shown.
Step 102: and detecting a first operation of forming a closed curve track on the first image, and taking an area image in the closed curve track as a target area image.
In an embodiment, the first operation may be any operation of forming a closed curve track on the first image, and the closed curve track may be a closed curve track formed by a smooth curve of any shape drawn by a user, such as a circle, an ellipse, and the like; fig. 2b is a schematic image diagram of a closed curve path according to an embodiment of the present invention.
Step 103: a second operation is detected that forms a non-closed curved trajectory on the first image.
Here, the non-closed curve track and the closed curve track have at least two intersection points, the non-closed curve track may be a curve or a straight line intersecting the closed curve track, and correspondingly, the second operation may be an operation of drawing the curve or the straight line intersecting the closed curve track on the first image by the user; fig. 2c is a schematic diagram of an image of a non-closed curve trace and a closed curve trace with two intersections according to an embodiment of the present invention.
Step 104: determining an operation type of the second operation based on the relative position information of the non-closed curve trajectory and the position information of the intersection point.
In actual implementation, the operation types of the second operation may be set as two types, namely, a first operation type and a second operation type; wherein the first operation type is used for indicating the reduction of the image area of the target area image (namely the area image in the closed curve track); the second operation type is used for indicating the expansion of the image area of the target area image; the reduction and expansion described here are not image reduction and expansion of the target area image, but deletion or increase of the area size of the area where the target area image is located.
Since there are at least two intersections between the non-closed curve track and the closed curve track, and a curve is formed between two adjacent intersections on the non-closed curve track, if a curve is extracted from two adjacent intersections, at least one curve can be extracted from the non-closed curve, and each curve extracted from the non-closed curve can form a different relative position relationship with the closed curve track, such as being located inside the closed curve track or being located outside the closed curve track, and the different position relationship can correspond to a different operation type, such as a first operation type when the curve is located inside the closed curve track and a second operation type when the curve is located outside the closed curve track, in the embodiment of the present invention, as shown in fig. 2c, there are two intersections between the non-closed curve track and the closed curve track, and the curve between the two intersections is located inside the closed curve track, therefore, it is determined that a reduction of the image area is required for the target area image (i.e., the area image within the closed curve trajectory).
Step 105: and adjusting the image area of the target area image according to the operation type.
In the embodiment of the present invention, if the curve trajectory between two intersections formed by the non-closed curve trajectory and the closed curve trajectory is a third curve trajectory, as shown in fig. 2d, it can be seen from fig. 2d that the third curve trajectory divides the target area image into the first area image and the second area image, and the second operation corresponds to the first operation type, so that performing image area adjustment on the target area image may be to reduce the image area where the target area image is located, and may be to delete the first area image or the second area image, which may specifically be preset by a user, such as presetting an image with a default deleted area having a smaller area, as shown in fig. 2 e; or, in actual implementation, the first area image and the second area image are identified by different display effects, and a prompt message is generated and displayed for prompting a user to give an instruction to delete the first area image or the second area image from the target area image, that is, the user determines which image area to delete, as shown in fig. 2f, if the user selects image 1, the image after area adjustment on the target image area is 2 e; the different display effects may be any display effects that can distinguish the first area image from the second area image, such as filling different colors, filling different patterns, and the like.
By applying the embodiment of the invention, when the user selects the image, the user only needs to draw a closed curve track graph on the image to be processed firstly to determine the target image, and then draws a non-closed curve track graph to be crossed with the closed curve track graph based on the target image to form at least two cross points, so that the image area of the area where the target image is located can be automatically increased or reduced according to the relative position relation between the closed curve drawn by the user and the non-closed curve, the user does not need to enter a special image area increasing or subtracting mode, the operation is simple and convenient, and the user experience is good.
Example two
Fig. 3 is a schematic diagram of an implementation flow of an image processing method according to an embodiment of the present invention, which is applied to an electronic device, and as shown in fig. 3, the implementation flow of the image processing method according to the embodiment of the present invention includes:
step 301: the first image is loaded and displayed.
Here, the first image is any image selected by the user and required to be subjected to image area processing, and as shown in fig. 4a, a schematic diagram of the first image to be processed loaded and displayed in the embodiment of the present invention is shown.
Step 302: and detecting a first operation of forming a closed curve track on the first image, and taking an area image in the closed curve track as a target area image.
In an embodiment, the first operation may be any operation of forming a closed curve track on the first image, and the closed curve track may be a closed curve track formed by a smooth curve of any shape drawn by a user, such as a circle, an ellipse, and the like; fig. 4b is a schematic image diagram of a closed curve path according to an embodiment of the present invention.
Step 303: a second operation is detected that forms a non-closed curved trajectory on the first image.
Here, the non-closed curve track and the closed curve track have at least two intersection points, the non-closed curve track may be a curve or a straight line intersecting the closed curve track, and correspondingly, the second operation may be an operation of drawing the curve or the straight line intersecting the closed curve track on the first image by the user; fig. 4c is a schematic diagram of an image of a non-closed curve trace and a closed curve trace with two intersections according to an embodiment of the present invention.
Step 304: and detecting that two intersection points exist between the non-closed curve track and the closed curve track, and extracting a curve track between the two intersection points from the non-closed curve track as a third curve track.
It should be noted that, in the embodiment of the present invention, there are two intersection points between the non-closed curve track and the closed curve track, however, in practical applications, there may also be more than two intersection points between the non-closed curve track and the closed curve track, such as 3, 4, 6, etc., and when there are more than two intersection points, two adjacent intersection points on the non-closed curve track may extract a curve.
Step 305: judging the relative position relationship between the third curve track and the closed curve track, and executing step 306 if the third curve track is positioned in the closed curve track; if the third curved track is outside the closed curved track, go to step 308.
In practical implementation, the different position relationships between the third curve track and the closed curve track correspond to different operation types of the second operation, and when the third curve track is located in the closed curve track, the operation type is the first operation type; the first operation type is used for indicating the reduction of the image area of the target area image; when a third curved track is outside the closed curved track, the operation type is a second operation type; the second operation type is used for indicating the expansion of the image area of the target area image; the reduction and expansion described here are not image reduction and expansion of the target area image, but deletion or increase of the area size of the area where the target area image is located.
Step 306: and marking the first area image and the second area image by using different display effects, and generating and displaying first prompt information.
Here, the first area image and the second area image are the first area image and the second area image into which the target area image is divided by the third curve track;
the different display effects may be any display effects that can distinguish the first area image from the second area image, such as filling different colors, filling different patterns, and the like.
The first prompt message is used for prompting the user to give an instruction for deleting the first area image or the second area image from the target area image, namely prompting the user to decide which image area to delete by the user.
Step 307: and receiving and responding to an image deleting instruction, and adjusting the image area of the target area image.
Here, the image deletion instruction is an instruction given by the user to delete the first area image or the second area image; and responding to the instruction, and performing image area adjustment on the target area image to delete the first area image or the second area image.
Step 308: and combining the third area image and the target area image into one area image.
Here, the third area image is an area image which is formed by a curve track between two intersection points in the closed curve track and the third curve track and is positioned outside the target area image; as shown in fig. 4 c.
Combining a third area image and the target area image into an area image, namely, increasing/expanding the image area of the target area image, wherein the size of the increased image area is the size of the image area where the third area image is located; as shown in fig. 4 d.
Step 309: and ending the processing flow.
In the embodiment of the invention, taking a closed curve track and a non-closed curve track as an example, when a user selects an image, the user only needs to draw a closed curve track graph on the image to be processed to determine a target image, and then draws a non-closed curve track graph and the closed curve track graph to form two intersections based on the target image, so that if a curve between the two intersections on the non-closed curve track is positioned outside the closed curve track, the target image area can be directly increased, and if a curve between the two intersections on the non-closed curve track is positioned inside the closed curve track, a prompt message is generated to enable the user to determine the deleted image area, which is more humanized, and the user does not need to enter a special image area increasing or subtracting mode, the user experience is improved.
EXAMPLE III
Fig. 5 is a schematic diagram of an implementation flow of an image processing method according to an embodiment of the present invention, which is applied to an electronic device, and as shown in fig. 5, the implementation flow of the image processing method according to the embodiment of the present invention includes:
step 501: the first image is loaded and displayed.
Here, the first image is any image selected by the user and required to be subjected to image area processing, and as shown in fig. 6a, a schematic diagram of the first image to be processed loaded and displayed in the embodiment of the present invention is shown.
Step 502: and detecting a first operation of forming a closed curve track on the first image, and taking an area image in the closed curve track as a target area image.
In an embodiment, the first operation may be any operation of forming a closed curve track on the first image, and the closed curve track may be a closed curve track formed by a smooth curve of any shape drawn by a user, such as a circle, an ellipse, and the like; fig. 6b is a schematic image diagram of a closed curve path according to an embodiment of the present invention.
Step 503: a second operation is detected that forms a non-closed curved trajectory on the first image.
Here, the non-closed curve track and the closed curve track have at least two intersection points, the non-closed curve track may be a curve or a straight line intersecting the closed curve track, and correspondingly, the second operation may be an operation of drawing the curve or the straight line intersecting the closed curve track on the first image by the user; fig. 6c is a schematic diagram of an image of a non-closed curve trace and a closed curve trace with three intersections according to an embodiment of the present invention.
Step 504: and detecting that three intersection points exist between the non-closed curve track and the closed curve track, extracting a curve track between the first intersection point and the second intersection point from the non-closed curve track as a third curve track, and extracting a curve track between the second intersection point and the third intersection point as a fourth curve track.
It should be noted that, if it is detected that N intersections exist between the non-closed curve trajectory and the closed curve trajectory, where N is a positive integer greater than 2, a curve trajectory between the first intersection and the second intersection is sequentially extracted from the non-closed curve trajectory as a third curve trajectory, and a curve trajectory between the second intersection and the third intersection is extracted as a fourth curve trajectory until a curve trajectory between the N-1 th intersection and the N-th intersection is extracted as an N +1 th curve trajectory.
Step 505: it is detected that the third curved track is located inside the closed curved track and the fourth curved track is located outside the closed curved track.
In practical implementation, if N intersections exist between a non-closed curve track and a closed curve track, where N is a positive integer greater than 2, the relative position relationship between the third curve track and the fourth curve track, and up to the N +1 th curve track and the closed curve track, needs to be determined respectively.
And different position relations between a curve track extracted from a non-closed curve track and a closed curve track correspond to different operation types of the second operation, if the curve track is positioned in the closed curve track, the corresponding curve track corresponds to the first operation type and indicates that the image area of the target area image is reduced, and if the curve track is positioned outside the closed curve track, the corresponding curve track corresponds to the second operation type and indicates that the image area of the target area image is expanded. As shown in fig. 6d, the third curved track is located inside the closed curved track, and the fourth curved track is located outside the closed curved track, that is, the image area increasing and decreasing operations need to be performed on the target image area at the same time.
Step 506: and determining that the first image area is smaller than the second image area, deleting the first image area, and combining the second image area and the third image area into a fourth image area.
Here, the first image area and the second image area are a first image area and a second image area into which the target image area is divided by the third curve track; the third image area is an image area which is formed by the fourth curve track and the closed curve track and is positioned outside the target image area.
In the embodiment of the present invention, the image area with a smaller area is deleted by default when the image area deletion operation is performed, but in practical applications, a prompt message for prompting the user to give an instruction to delete the first area image or the second area image from the target area image may also be generated, and the user determines which image area to delete. Fig. 6e is a schematic diagram illustrating the region of the target image region after being adjusted according to the embodiment of the present invention.
Step 507: and identifying background image information of the fourth image area, and adjusting the transparency of the identified background image according to the preset background transparency.
Here, the background transparency of the region image may be set according to actual needs, for example, the background transparency is set to 100%, so that when the user inserts the fourth region image into a certain position in another image according to actual needs, the insertion effect is more desirable, as shown in fig. 6 f.
In the embodiment of the invention, the three intersections formed by the closed curve track and the non-closed curve track are taken as an example, and by applying the embodiment, when a user selects an image, the user only needs to draw a closed curve track graph on the image to be processed to determine a target image, and then draws a non-closed curve track graph to intersect with the closed curve track graph based on the target image, so that the increase and/or decrease of a plurality of image areas can be simultaneously carried out on the target image area, the background transparency of the image after the image area adjustment can be automatically adjusted, the realization is simple, and the user experience is good.
Example four
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 7, the electronic device according to the embodiment of the present invention includes: a display unit 71, a detection unit 72, a determination unit 73, and an adjustment unit 74; wherein the content of the first and second substances,
the display unit 71 is used for loading and displaying a first image;
the detection unit 72 is configured to detect a first operation of forming a closed curve track on the first image, and use an area image in the closed curve track as a target area image;
detecting a second operation of forming a non-closed curvilinear locus on the first image, the non-closed curvilinear locus having at least two intersections with the closed curvilinear locus;
the determining unit 73 is configured to determine an operation type of the second operation based on the relative position information of the non-closed curve trajectory and the position information of the intersection;
the adjusting unit 74 is configured to perform image area adjustment on the target area image according to the operation type.
In an embodiment, the determining unit 73 is further configured to determine that there are two intersections between the non-closed curve trajectory and the closed curve trajectory;
extracting a curved track between the two intersections from the non-closed curved track as a third curved track;
determining the operation type as a first operation type when the third curved track is located within the closed curved track; the first operation type is used for indicating the reduction of the image area of the target area image;
determining the operation type as a second operation type when the third curved track is outside the closed curved track; the second operation type is used for indicating the expansion of the image area of the target area image.
In an embodiment, the operation type is a first operation type, and the third curve trajectory divides the target area image into a first area image and a second area image;
the electronic device further includes a prompt unit 75, configured to identify the first area image and the second area image with different display effects;
generating first prompt information; the first prompt message is used for prompting a user to give an instruction for deleting the first area image or the second area image from the target area image.
In an embodiment, the operation type is a second operation type;
the adjusting unit 74 is further configured to use an image, which is formed by a curve track between two intersection points in the closed curve track and the third curve track and is located outside the target area image, as a third area image, and combine the third area image and the target area image into one area image.
In an embodiment, the adjusting unit 74 is further configured to perform background image information identification on the target area image after the image area adjustment is performed, and adjust the transparency of the identified background image according to a preset background transparency.
In an embodiment, the determining unit 73 is further configured to determine that there are N intersection points between the non-closed curve trajectory and the closed curve trajectory; n is a positive integer greater than 2;
extracting a curve track between the first intersection point and the second intersection point from the non-closed curve track to be used as a third curve track, and extracting a curve track between the second intersection point and the third intersection point to be used as a fourth curve track until a curve track between the (N-1) th intersection point and the (N) th intersection point is extracted to be used as an (N + 1) th curve track;
and respectively judging the relative position relationship between the third curve track and the fourth curve track until the (N + 1) th curve track and the closed curve track, if the third curve track and the fourth curve track are positioned in the closed curve track, the corresponding curve track indicates to reduce the image area of the target area image, and if the fourth curve track and the N +1 th curve track are positioned outside the closed curve track, the corresponding curve track indicates to expand the image area of the target area image.
Here, it should be noted that: the above description related to the electronic device is similar to the above description of the method, and the description of the beneficial effects of the method is omitted for brevity. For technical details not disclosed in the embodiments of the mobile terminal of the present invention, refer to the description of the embodiments of the method of the present invention.
In the embodiment of the present invention, the display Unit, the detection Unit, the determination Unit, the adjustment Unit, and the prompt Unit in the electronic device may be implemented by a Central Processing Unit (CPU) or a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or an integrated circuit (ASIC) in the electronic device.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (12)

1. An image processing method applied to an electronic device, the method comprising:
loading and displaying a first image;
detecting a first operation of forming a closed curve track on the first image, and taking an area image in the closed curve track as a target area image;
detecting a second operation of forming a non-closed curvilinear locus on the first image, the non-closed curvilinear locus having at least two intersections with the closed curvilinear locus;
determining an operation type of the second operation based on the relative position information of the non-closed curve track and the position information of the intersection point;
adjusting the image area of the target area image according to the operation type;
wherein the determining the operation type of the second operation based on the relative position information of the non-closed curve track and the position information of the intersection point comprises:
extracting a curve track between two adjacent intersection points from the non-closed curve track as a third curve track;
determining the operation type as a second operation type when the third curved track is outside the closed curved track; the second operation type is used for indicating the expansion of the image area of the target area image; the operation type of the second operation comprises the second operation type.
2. The method of claim 1, wherein said extracting a curved trajectory between two adjacent intersections from said non-closed curved trajectory as a third curved trajectory comprises:
determining that there are two intersections of the non-closed curve trajectory with the closed curve trajectory;
extracting a curved track between the two intersections from the non-closed curved track as a third curved track;
accordingly, the method further comprises:
determining the operation type as a first operation type when the third curved track is located within the closed curved track; the first operation type is used for indicating the reduction of the image area of the target area image; the operation type of the second operation includes the first operation type.
3. The method of claim 2, wherein the operation type is a first operation type, wherein the third curve trajectory segments the target area image into a first area image and a second area image, and wherein the method further comprises:
marking the first area image and the second area image by different display effects;
generating first prompt information; the first prompt message is used for prompting a user to give an instruction for deleting the first area image or the second area image from the target area image.
4. The method of claim 2, wherein the operation type is a second operation type; the image area adjustment of the target area image according to the operation type includes:
and taking an image which is formed by a curve track between two intersection points in the closed curve track and the third curve track and is positioned outside the target area image as a third area image, and combining the third area image and the target area image into one area image.
5. The method of claim 1, wherein after performing image region adjustment on the target region image according to the operation type, the method further comprises:
and carrying out background image information identification on the target area image subjected to the image area adjustment, and adjusting the transparency of the background image obtained by identification according to the preset background transparency.
6. The method of claim 1, wherein determining the operation type of the second operation based on the relative position information of the non-closed curve trajectory and the position information of the intersection point comprises:
determining that there are N intersections of the non-closed curve trajectory with the closed curve trajectory; n is a positive integer greater than 2;
extracting a curve track between the first intersection point and the second intersection point from the non-closed curve track to be used as a third curve track, and extracting a curve track between the second intersection point and the third intersection point to be used as a fourth curve track until a curve track between the (N-1) th intersection point and the (N) th intersection point is extracted to be used as an (N + 1) th curve track;
and respectively judging the relative position relationship between the third curve track and the fourth curve track until the (N + 1) th curve track and the closed curve track, if the third curve track and the fourth curve track are positioned in the closed curve track, the corresponding curve track indicates to reduce the image area of the target area image, and if the fourth curve track and the N +1 th curve track are positioned outside the closed curve track, the corresponding curve track indicates to expand the image area of the target area image.
7. An electronic device, characterized in that the electronic device comprises: the device comprises a display unit, a detection unit, a determination unit and an adjustment unit; wherein the content of the first and second substances,
the display unit is used for loading and displaying a first image;
the detection unit is used for detecting a first operation of forming a closed curve track on the first image and taking an area image in the closed curve track as a target area image;
detecting a second operation of forming a non-closed curvilinear locus on the first image, the non-closed curvilinear locus having at least two intersections with the closed curvilinear locus;
the determining unit is used for determining the operation type of the second operation based on the relative position information of the non-closed curve track and the position information of the intersection point;
the adjusting unit is used for adjusting the image area of the target area image according to the operation type;
the determining unit is specifically configured to extract a curve track between two adjacent intersection points from the non-closed curve track as a third curve track; determining the operation type as a second operation type when the third curved track is outside the closed curved track; the second operation type is used for indicating the expansion of the image area of the target area image; the operation type of the second operation comprises the second operation type.
8. The electronic device of claim 7,
the determining unit is further used for determining that two intersection points exist between the non-closed curve track and the closed curve track;
extracting a curved track between the two intersections from the non-closed curved track as a third curved track;
determining the operation type as a first operation type when the third curved track is located within the closed curved track; the first operation type is used for indicating the reduction of the image area of the target area image.
9. The electronic device of claim 8, wherein the operation type is a first operation type, and the third curved trajectory segments the target area image into a first area image and a second area image;
the electronic equipment further comprises a prompting unit used for marking the first area image and the second area image with different display effects;
generating first prompt information; the first prompt message is used for prompting a user to give an instruction for deleting the first area image or the second area image from the target area image.
10. The electronic device of claim 8, wherein the operation type is a second operation type;
the adjusting unit is further configured to use an image, which is formed by a curve track between two intersection points in the closed curve track and the third curve track and is located outside the target area image, as a third area image, and combine the third area image and the target area image into one area image.
11. The electronic device of claim 7,
the adjusting unit is further configured to perform background image information identification on the target area image after the image area adjustment is performed, and adjust the transparency of the background image obtained through identification according to a preset background transparency.
12. The electronic device of claim 7,
the determining unit is further configured to determine that N intersection points exist between the non-closed curve trajectory and the closed curve trajectory; n is a positive integer greater than 2;
extracting a curve track between the first intersection point and the second intersection point from the non-closed curve track to be used as a third curve track, and extracting a curve track between the second intersection point and the third intersection point to be used as a fourth curve track until a curve track between the (N-1) th intersection point and the (N) th intersection point is extracted to be used as an (N + 1) th curve track;
and respectively judging the relative position relationship between the third curve track and the fourth curve track until the (N + 1) th curve track and the closed curve track, if the third curve track and the fourth curve track are positioned in the closed curve track, the corresponding curve track indicates to reduce the image area of the target area image, and if the fourth curve track and the N +1 th curve track are positioned outside the closed curve track, the corresponding curve track indicates to expand the image area of the target area image.
CN201610110037.9A 2016-02-26 2016-02-26 Image processing method and electronic equipment Active CN105808051B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610110037.9A CN105808051B (en) 2016-02-26 2016-02-26 Image processing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610110037.9A CN105808051B (en) 2016-02-26 2016-02-26 Image processing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN105808051A CN105808051A (en) 2016-07-27
CN105808051B true CN105808051B (en) 2019-12-24

Family

ID=56466173

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610110037.9A Active CN105808051B (en) 2016-02-26 2016-02-26 Image processing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN105808051B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106357979A (en) * 2016-09-19 2017-01-25 宇龙计算机通信科技(深圳)有限公司 Photographing method, device and terminal
JP7087393B2 (en) * 2018-01-12 2022-06-21 カシオ計算機株式会社 Display control device, display control method, and program

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103155534A (en) * 2010-09-27 2013-06-12 富士胶片株式会社 Image editing method and device, and image editing program
KR20130107868A (en) * 2012-03-23 2013-10-02 주식회사 인프라웨어 Method and apparatus for managing list using multi touch
CN104077784A (en) * 2013-03-29 2014-10-01 联想(北京)有限公司 Method for extracting target object and electronic device
CN104317520A (en) * 2014-10-23 2015-01-28 小米科技有限责任公司 Method and device for processing contents of display area
CN105005426A (en) * 2014-04-18 2015-10-28 深圳Tcl新技术有限公司 Screenshot method and system for touch screen terminal, and data sharing method and system for touch screen terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103155534A (en) * 2010-09-27 2013-06-12 富士胶片株式会社 Image editing method and device, and image editing program
KR20130107868A (en) * 2012-03-23 2013-10-02 주식회사 인프라웨어 Method and apparatus for managing list using multi touch
CN104077784A (en) * 2013-03-29 2014-10-01 联想(北京)有限公司 Method for extracting target object and electronic device
CN105005426A (en) * 2014-04-18 2015-10-28 深圳Tcl新技术有限公司 Screenshot method and system for touch screen terminal, and data sharing method and system for touch screen terminal
CN104317520A (en) * 2014-10-23 2015-01-28 小米科技有限责任公司 Method and device for processing contents of display area

Also Published As

Publication number Publication date
CN105808051A (en) 2016-07-27

Similar Documents

Publication Publication Date Title
US20120102401A1 (en) Method and apparatus for providing text selection
WO2017032068A1 (en) Text message viewing method and user terminal
KR20140091555A (en) Measuring web page rendering time
TW201227460A (en) Method and apparatus for providing different user interface effects for different implementation characteristics of a touch event
CN104991696B (en) A kind of information processing method and electronic equipment
CN106681584A (en) Method for optimizing application display and terminal
US9576411B2 (en) Apparatus and method for providing security keypad through shift of keypad
US20150248206A1 (en) Word processing method and device for smart device with touch screen
CN105824487B (en) The display methods and device of prompt information
CN109743613B (en) Subtitle processing method, device, terminal and storage medium
CN105302828B (en) Page label information display method and device and electronic equipment
JP2010267079A (en) Information processor, control method, and program
CN111143731B (en) Display method and device for webpage interface zooming and terminal equipment
CN107832337B (en) Page returning method, device and equipment
CN105808051B (en) Image processing method and electronic equipment
US10943372B2 (en) GUI display method and apparatus, and terminal device
CN106951811A (en) A kind of image processing method and terminal
US20170139584A1 (en) User account switching interface
US10254959B2 (en) Method of inputting a character into a text string using a sliding touch gesture, and electronic device therefor
CN106201399A (en) A kind of split screen window display method and terminal
CN104571812B (en) Information processing method and electronic equipment
US10514843B2 (en) Method for displaying virtual keypad overlapping an application and electronic device
US9536126B2 (en) Function execution method based on a user input, and electronic device thereof
US9229608B2 (en) Character display apparatus, character display method, and computer readable medium
CN109543174B (en) Text selection method, text selection device, computer readable storage medium and computer equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant