CN102646258B - Image cropping method and system - Google Patents

Image cropping method and system Download PDF

Info

Publication number
CN102646258B
CN102646258B CN201110041815.0A CN201110041815A CN102646258B CN 102646258 B CN102646258 B CN 102646258B CN 201110041815 A CN201110041815 A CN 201110041815A CN 102646258 B CN102646258 B CN 102646258B
Authority
CN
China
Prior art keywords
crop box
summit
drag operation
movement
coordinate
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
CN201110041815.0A
Other languages
Chinese (zh)
Other versions
CN102646258A (en
Inventor
傅斌
刘元芳
吴永坚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201110041815.0A priority Critical patent/CN102646258B/en
Publication of CN102646258A publication Critical patent/CN102646258A/en
Application granted granted Critical
Publication of CN102646258B publication Critical patent/CN102646258B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)
  • Processing Or Creating Images (AREA)
  • Image Processing (AREA)

Abstract

A kind of image cropping method, comprises the following steps: obtain the crop box of image and the attribute of described crop box; Triggered the dynamic conditioning of described crop box by user's drag operation, according to the object of described drag operation and the attribute of crop box, described crop box is adjusted.In above-mentioned image cropping method and system, after the attribute of the crop box and crop box that obtain image, the dynamic conditioning of crop box is carried out by user's drag operation, and according to the attribute of drag object and crop box, crop box is adjusted, be in course of adjustment due to the attribute of the object and crop box that consider drag operation, thus the automatic turning of crop box can be realized, effectively improve dirigibility.

Description

Image cropping method and system
[technical field]
The present invention relates to image processing techniques, particularly relate to a kind of image cropping method and system.
[background technology]
In the process of picture editting and application, usually need to carry out cutting to image, to obtain sizeable image.Traditional image cropping is by the clipping region in selected digital image and the size adjusting clipping region realizes, such as, user proportionally carries out the convergent-divergent of clipping region by the limit or angle dragging clipping region, also can drag limit or the angle of clipping region when freely pulling, carrying out the free convergent-divergent of clipping region.In the adjustment process of clipping region, when the limit of the mouse drag clipping region of user or angle, if when mouse surmounts initial clipping region, clipping region will deteriorate to a point, can not automatically overturn, and lack dirigibility.
[summary of the invention]
Based on this, be necessary to provide a kind of image cropping method improving dirigibility.
In addition, there is a need to provide a kind of image cropping system improving dirigibility.
A kind of image cropping method, comprises the following steps: obtain the crop box of image and the attribute of described crop box; Triggered the dynamic conditioning of described crop box by user's drag operation, according to the object of described drag operation and the attribute of crop box, described crop box is adjusted.
Preferably, the object of described drag operation is the summit in crop box, and the attribute of described crop box is fixed proportion cutting; Describedly according to the object of described drag operation and the attribute of crop box to the step that described crop box adjusts be: move according to the summit that user's drag operation triggers in crop box, and the summit with movement is in same cornerwise summit as point of fixity; Obtain the coordinate on summit and the coordinate of point of fixity of movement; Distance proportion in the summit being movement described in benchmark with the coordinate of point of fixity between horizontal ordinate displacement and ordinate displacement; Judge whether described distance proportion is greater than cutting ratio, if, then according to the horizontal ordinate on the summit of the ordinate on the summit of described movement and cutting ratio adjustment movement, if not, then the ordinate of drag object is adjusted according to the horizontal ordinate on the summit of described movement and cutting ratio; Crop box after being adjusted according to the coordinate on summit of described movement after adjustment and the coordinate of point of fixity.
Preferably, the object of described drag operation is the summit in crop box, and the attribute of described crop box is free cutting; Describedly according to the object of described drag operation and the attribute of crop box to the step that described crop box adjusts be: move according to the summit that user's drag operation triggers in crop box, and the summit with movement is in same cornerwise summit as point of fixity; Obtain the coordinate on the summit of described movement and the coordinate of point of fixity; Crop box after the diagonal line consisted of the coordinate on the summit by described movement and the coordinate of point of fixity is adjusted.
Preferably, the object of described drag operation is operation limit, and the attribute of described crop box is fixed proportion cutting; The described step described crop box adjusted according to the object of described drag operation and the attribute of crop box: trigger described crop box by user's drag operation and move along the direction of described drag operation.
Preferably, the object of described drag operation is operation limit, and the attribute of described crop box is free cutting; Describedly according to the object of described drag operation and the attribute of crop box to the step that described crop box adjusts be: triggered operating limit in described crop box and move by user's drag operation, and using limit relative with operation limit in described crop box as fixed edge; Crop box after being adjusted by described operation limit and fixed edge.
A kind of image cropping system, at least comprises: acquisition module, for the attribute of the crop box and described crop box that obtain image; Cutting module, for being triggered the dynamic conditioning of described crop box by user's drag operation, is adjusted described crop box according to the object of described drag operation and the attribute of crop box.
Preferably, the object of described drag operation is the summit in crop box, and the attribute of described crop box is fixed proportion cutting; Described cutting module comprises: trigger element, moves, and the summit with described movement is in same cornerwise summit as point of fixity for the summit of triggering in crop box according to user's drag operation; Coordinate acquiring unit, obtains the coordinate on the summit of described movement and the coordinate of point of fixity; Computing unit, for the distance proportion in the summit that is movement described in benchmark with the coordinate of point of fixity between horizontal ordinate displacement and ordinate displacement; Whether judging unit, be greater than cutting ratio for judging distance ratio, and judged result notified adjustment unit; Adjustment unit, for being greater than cutting ratio when described distance proportion, the horizontal ordinate on the summit of described movement is adjusted according to the ordinate on the summit of described movement and cutting ratio, when described distance proportion is less than cutting ratio, the ordinate on the summit of described movement is adjusted according to the horizontal ordinate on the summit of movement and cutting ratio, and the crop box after being adjusted according to the coordinate on summit of the movement after adjustment and the coordinate of point of fixity.
Preferably, the object of described drag operation is the summit in crop box, and the attribute of described crop box is free cutting; Described cutting module comprises: trigger element, moves, and will be in same cornerwise summit as point of fixity with described summit for the summit of triggering in crop box according to user's drag operation; Coordinate acquiring unit, for the coordinate of the coordinate and point of fixity that obtain the summit of movement; Adjustment unit, the crop box after the diagonal line for consisting of the coordinate on the summit by described movement and the coordinate of point of fixity is adjusted.
Preferably, the object of described drag operation is operation limit, and the attribute of described crop box is fixed proportion cutting; Described cutting module is further used for triggering described crop box by user's drag operation and moves the crop box after being adjusted along the direction of described drag operation.
Preferably, the object of described drag operation is operation limit, and the attribute of described crop box is free cutting; Described cutting module comprises: trigger element, for by user's drag operation the operation limit of triggering in described crop box move, and using in described crop box with relative limit, operation limit as fixed edge; Adjustment unit, for the crop box after being adjusted by described operation limit and fixed edge.
In above-mentioned image cropping method and system, after the attribute of the crop box and crop box that obtain image, the dynamic conditioning of crop box is carried out by user's drag operation, and according to the attribute of drag object and crop box, crop box is adjusted, be in course of adjustment due to the attribute of the object and crop box that consider drag operation, thus the automatic turning of crop box can be realized, effectively improve dirigibility.
[accompanying drawing explanation]
Fig. 1 is the process flow diagram of the image cropping method in embodiment one;
Fig. 2 is the process flow diagram of the image cropping method in embodiment two;
Fig. 3 shows the application process schematic diagram in Fig. 2;
Fig. 4 is the process flow diagram of the image cropping method in embodiment three;
Fig. 5 is the process flow diagram of the image cropping method in embodiment four;
Fig. 6 is the application process schematic diagram in Fig. 5;
Fig. 7 is the application process schematic diagram of image cropping method in embodiment five;
Fig. 8 is the structural representation of the image cropping system in embodiment five;
Fig. 9 is the structural representation of the cutting module in embodiment six;
Figure 10 is the structural representation of the cutting module in embodiment seven;
Figure 11 is the structural representation of the cutting module in embodiment eight.
[embodiment]
Fig. 1 shows the image cropping method in embodiment one, comprises the following steps:
In step slo, the crop box of image and the attribute of crop box is obtained.In the present embodiment, need the image carrying out cutting to enter cutting pattern, now, image occurs the crop box being used for cutting image, and obtain the attribute of crop box.Crop box is preferably square.In other embodiments, crop box can be circular or other is irregularly shaped.The attribute record of the crop box information such as cutting type, the size of crop box and the position of crop box.
In step s 30, triggered the dynamic conditioning of crop box by user's drag operation, according to the object of drag operation and the attribute of crop box, crop box is adjusted.In the present embodiment, user carries out drag operation by mouse to the limit of crop box or summit, to carry out the adjustment of crop box size.
The attribute of crop box is cutting type, and this cutting type includes fixed proportion cutting and free cutting.Fixed proportion cutting refers to crop box whether great or small, and under being in the cutting ratio of setting all the time, this cutting ratio is the wide high proportion of crop box; Free cutting refers to user arbitrarily can drag limit in crop box or summit, makes crop box be in optional position, arbitrary size.
For different cutting types, under user's drag operation, to carry out the process of dynamic conditioning also different for crop box.After being provided with suitable cutting type, user uses mouse to catch limit or the summit of crop box, rolling mouse carries out the limit of crop box or the dragging on summit, now, trailing limit or summit are moved according to the track of cutting type and rolling mouse, to realize size variation and the change in location of crop box, and then flexible accurately cutting image.
Fig. 2 shows the image cropping method in embodiment two, in this embodiment, the object of drag operation is the summit in crop box, and the attribute of crop box is fixed proportion cutting, then according to the object of drag operation and the attribute of crop box to the step that crop box adjusts be:
In step s 201, move according to the summit that user's drag operation triggers in crop box, and the summit with movement is in same cornerwise summit as point of fixity.In the present embodiment, user is by a summit in mouse drag crop box, now, it is fixed for being in and being dragged another summit on the diagonal line on summit in dragging process, therefore summit on same diagonal line is in as point of fixity, to carry out the location of crop box in dragging process using with the summit dragged by user.
In step S203, obtain the coordinate on summit and the coordinate of point of fixity of movement.In the present embodiment, under the triggering of user's drag operation, the summit on crop box is moved, and now, needs to obtain the summit of movement and the coordinate of point of fixity, to carry out follow-up crop box adjustment.
In step S205, the distance proportion in the summit being benchmark movement with the coordinate of point of fixity between horizontal ordinate displacement and ordinate displacement.In the present embodiment, calculate distance in the summit of movement between horizontal ordinate and the horizontal ordinate of point of fixity respectively as the distance between the ordinate on the summit of horizontal ordinate displacement and movement and the ordinate of point of fixity as ordinate displacement, and then obtain distance proportion.
Such as, as shown in Figure 3, for the crop box 200 in image 100, trigger summit P on crop box 100 by user's drag operation and to be moved to summit P on the crop box of dotted line by the crop box 100 of solid line, be then in the summit P on same diagonal line with the summit P of movement 1for point of fixity.Wherein, the coordinate of summit P is (P.x, P.y), point of fixity P 1coordinate be (P 1.x, P 1.y), the horizontal ordinate displacement on the summit of the movement obtained is abs (P.x-P 1.x), ordinate displacement is abs (P.y-P 1.y), abs is the absolute value asking integer.Now, distance proportion is abs (P.x-P 1.x)/abs (P.y-P 1.y).
In step S207, whether judging distance ratio is greater than cutting ratio, if so, then enters step S209, if not, then enters step S211.In the present embodiment, cutting ratio is the crop box wide high proportion arranged under the attribute of the crop box of fixed proportion cutting, and such as, this cutting ratio can be 4: 3,16: 10 etc.
In step S209, cut the horizontal ordinate on the summit of ratio adjustment movement according to the ordinate on the summit of movement and cultivation.In the present embodiment, distance proportion is greater than cutting ratio, i.e. abs (P.x-P 1.x)/abs (P.y-P 1.y) > x/y, x/y is cutting ratio, illustrate that the displacement of the horizontal ordinate on the summit of movement is larger, the displacement of the summit ordinate of movement is smaller, meet user as best one can when meeting cutting ratio for making the crop box size of adjustment to expect, with the ordinate location cutting frame on the summit of movement, according to the horizontal ordinate on the summit of cutting ratio adjustment movement, the summit horizontal ordinate of the movement namely after adjustment is abs (P.y-P 1.y) * X/Y+P 1.x.
In step S211, according to the ordinate on the summit of the horizontal ordinate on the summit of movement and cutting ratio adjustment movement.In the present embodiment, distance proportion is less than cutting ratio, i.e. abs (P.x-P 1.x)/abs (P.y-P 1.y) < x/y, then the ordinate on the summit according to the horizontal ordinate on the summit of movement and according to cutting ratio adjustment movement, the summit ordinate of the movement after namely adjusting is abs (P.x-P 1.x) * Y/X+P 1.y.
In step S213, the crop box after being adjusted according to the coordinate on summit of movement after adjustment and the coordinate of point of fixity.In the present embodiment, the summit of the movement after adjustment and point of fixity determine a diagonal line in crop box, now, and the crop box after can being adjusted by the coordinate of the summit of movement and point of fixity, diagonal line.
Fig. 4 shows the image cropping method in embodiment three, and in this embodiment, the object of drag operation is the summit in crop box, and the attribute of crop box is free cutting; According to the object of drag operation and the attribute of crop box to the step that crop box adjusts be then:
In step S301, move according to the summit that user's drag operation triggers in crop box, and the summit with movement is in same cornerwise summit as point of fixity.In the present embodiment, as previously mentioned, when dragging the summit in crop box user, another summit be on same diagonal line is in fixed state all the time, therefore this fixed summit can be carried out the location of crop box as point of fixity.
In step S303, obtain the coordinate on summit and the coordinate of point of fixity of movement.In the present embodiment, the drag operation that summit is followed through mouse realization moves, and obtains the coordinate of apex coordinate and the point of fixity moved, so that determine the size and location of the crop box after adjusting.
In step S305, the crop box after the diagonal line consisted of the coordinate on the summit by movement and the coordinate of point of fixity is adjusted.In the present embodiment, a diagonal line in crop box can be determined by the coordinate on the summit of movement and these two summits of coordinate of point of fixity, and then obtain the crop box after adjustment by the apex coordinate of movement, point of fixity coordinate and cornerwise interaction.
In the process of above-mentioned image cropping, because cutting type is free cutting, therefore, user arbitrarily can drag any one summit on crop box, to obtain the image size wanted.
Fig. 5 shows the image cropping method in embodiment four, and in this embodiment, the object of drag operation is operation limit, and the attribute of crop box is free cutting, then according to the object of drag operation and the attribute of crop box to the step that crop box adjusts be:
In step S401, move by operating limit in user's drag operation triggering crop box, and using limit relative with operation limit in crop box as fixed edge.In the present embodiment, operation limit is any limit of being triggered movement in crop box by user's drag operation.When user realizes the dragging on any limit in crop box by mouse, limit corresponding with this limit on crop box is fixed, therefore can be used as fixed edge, to carry out the location of crop box.
In step S403, the crop box after being adjusted by operation limit and fixed edge.In the present embodiment, the crop box after adjusting can be determined by operation limit and these two limits of fixed edge.
Such as, as shown in Figure 6, for the crop box 200 in image 100, the operation limit P on crop box 100 is triggered by user's drag operation 2p moves to dotted line position by solid line position, then with operation limit P 2the limit P that P is relative 1p 3for fixed edge.According to operation limit P 2p and fixed edge P 1p 3determine the crop box after adjusting.
In above-mentioned image cropping method, drag operation to as if operation limit, the attribute of crop box is fixed proportion cutting, then according to the object of drag operation and the attribute of crop box to the step that crop box adjusts be: trigger crop box by user's drag operation and move along the direction of drag operation.In the present embodiment, when fixed proportion cutting, user is moved along the direction of user's drag operation by crop box during any limit in mouse drag crop box.
Such as, as shown in Figure 7, for the crop box 200 in image 100, by user's drag operation trigger action limit P 2p moves up, and now crop box 100 moves to dotted line position by solid line position.
In addition, there is a need to provide a kind of image cropping system.Fig. 8 shows the image cropping system in embodiment five, comprises acquisition module 10 and cutting module 30.
Acquisition module 10, for the attribute of the crop box and crop box that obtain image.In the present embodiment, need the image carrying out cutting to enter cutting pattern, now, the crop box for cutting image is placed in image by acquisition module 10, and obtains the attribute of crop box.Crop box is preferably square.In other embodiments, crop box can also be circular or other is irregularly shaped.The attribute record of the crop box information such as cutting type, the size of crop box and the position of crop box.
Cutting module 20, for being triggered the dynamic conditioning of crop box by user's drag operation, is adjusted crop box according to the object of drag operation and the attribute of crop box.In the present embodiment, user carries out drag operation by mouse to the limit of crop box or summit, to carry out the adjustment of crop box size.The attribute of crop box is specially cutting type, and this cutting type includes fixed proportion cutting and free cutting, and fixed proportion cutting refers to crop box whether great or small, and under being in the cutting ratio of setting all the time, this cutting ratio is the wide high proportion of crop box; Free cutting refers to user arbitrarily can drag limit in crop box or summit, makes crop box be in optional position, arbitrary size.
After suitable crop box type is set, user uses mouse to catch limit or the summit of crop box, rolling mouse carries out the limit of crop box or the dragging on summit, now, trailing limit or summit are moved according to the track of cutting type and rolling mouse by cutting module 20, to realize size variation and the change in location of crop box, and then cutting image neatly.
Fig. 9 shows the cutting module in embodiment six.In this embodiment, the object of drag operation is the summit in crop box, and the attribute of crop box is fixed proportion cutting, comprises trigger element 201, coordinate acquiring unit 203, computing unit 205, judging unit 207 and adjustment unit 209 by cutting module 20.
Trigger element 201, moves for the summit of triggering in crop box according to the drag operation of user, and the summit with movement is in same cornerwise summit as point of fixity.In the present embodiment, under the drag operation that user is undertaken by mouse, trigger element 201 moves trailing summit, make this summit follow mouse to move, now, trigger element 201 is in summit on same diagonal line as point of fixity, to carry out the location of crop box in dragging process using with the summit dragged by user.
Coordinate acquiring unit 203, for the coordinate of the coordinate and point of fixity that obtain the summit of movement.In the present embodiment, under the triggering of user's drag operation, the summit on crop box is moved, and now needs coordinate acquiring unit 203 to obtain the summit of movement and the coordinate of point of fixity, to carry out the adjustment of follow-up crop box.
Computing unit 205, for the distance proportion in the summit that is benchmark movement with point of fixity coordinate between horizontal ordinate displacement and ordinate displacement.In the present embodiment, computing unit 205 calculates distance in the summit of movement between horizontal ordinate and the horizontal ordinate of point of fixity respectively as the distance between the ordinate on the summit of horizontal ordinate displacement and movement and the ordinate of point of fixity as ordinate displacement, and then obtains distance proportion.
Whether judging unit 207, be greater than cutting ratio for judging distance ratio, and judged result is notified adjustment unit 209.In the present embodiment, the basis for estimation cutting ratio in judging unit 207 is the crop box wide high proportion arranged under the attribute of the crop box of fixed proportion cutting.
Adjustment unit 209, during for being greater than cutting ratio when distance proportion, according to the horizontal ordinate on the summit of the ordinate on the summit of movement and cutting ratio adjustment movement, when distance proportion is less than cutting ratio, according to the ordinate on the summit of the horizontal ordinate on the summit of movement and cutting ratio adjustment movement, and the crop box after being adjusted according to the apex coordinate of movement after adjusting and the coordinate of point of fixity.In the present embodiment, if the judged result middle distance ratio that judging unit 207 obtains is greater than cutting ratio, i.e. abs (P.x-P 1.x)/abs (P.y-P 1.y) > x/y, x/y is cutting ratio, illustrate that the displacement of the horizontal ordinate on the summit of movement is larger, the displacement of the summit ordinate of movement is smaller, adjustment unit 209 is with the ordinate location cutting frame on the summit of movement, according to the horizontal ordinate on the summit of cutting ratio adjustment movement, the summit horizontal ordinate of the movement namely after adjustment is abs (P.y-P 1.y) * X/Y+P 1.x.
If judging unit 207 obtain judged result middle distance ratio and be less than cutting ratio, i.e. abs (P.x-P 1.x)/abs (P.y-P 1.y) < x/y, the then ordinate on the summit of adjustment unit 209 according to the horizontal ordinate on the summit of movement and according to cutting ratio adjustment movement, the summit ordinate of the movement namely after adjustment is abs (P.x-P 1.x) * Y/X+P 1.y.The summit of the movement after adjustment and fixed object determine a diagonal line in crop box, now, and the crop box after adjustment unit 209 can be adjusted by the coordinate of drag object and fixed object, diagonal line.
Figure 10 shows the cutting module in embodiment seven.In this embodiment, the object of drag operation is the summit in crop box, and the attribute of crop box is free cutting, and cutting module 30 comprises trigger element 301, coordinate acquiring unit 303 and adjustment unit 305.
Trigger element 301, moves for the summit of triggering in crop box according to user's drag operation, and the summit with movement is in same cornerwise summit as point of fixity.In the present embodiment, as previously mentioned, the drag operation that user is followed on the summit that trigger element 301 makes user drag moves, and using another summit of being on same diagonal line as point of fixity, this point of fixity is in fixed state all the time, can carry out the location of crop box.
Coordinate acquiring unit 303, for the coordinate of the coordinate and point of fixity that obtain the summit of movement.In the present embodiment, the summit of movement is followed through the drag operation that mouse realizes and moves, and coordinate acquiring unit 303 obtains the coordinate of apex coordinate and the point of fixity moved, so that determine the size and location of the crop box after adjustment.
Adjustment unit 305, the crop box after the diagonal line for consisting of the coordinate on the summit by movement and the coordinate of point of fixity is adjusted.In the present embodiment, adjustment unit 305 is determined a diagonal line in crop box by the coordinate on the summit of movement and these two summits of coordinate of point of fixity, and then obtains the crop box after adjustment by the apex coordinate of movement, point of fixity coordinate and cornerwise interaction.
Figure 11 shows the cutting module in embodiment eight.In this embodiment, the object of drag operation is operation limit, and the attribute of crop box is free cutting, and cutting module 40 comprises trigger element 401 and adjustment unit 403.
Trigger element 401, for moving by operating limit in user's drag operation triggering crop box, and using limit relative with operation limit in crop box as fixed edge.In the present embodiment, when user implements drag operation by mouse, trigger element 401 makes any limit in crop box follow drag operation to move, and using limit corresponding with this limit on crop box as fixed edge, to carry out the location of crop box.
Adjustment unit 403, for by operation limit and fixed edge be adjusted after crop box.In the present embodiment, adjustment unit 403 can determine the crop box after adjusting by operation limit and these two limits of fixed edge.
In another embodiment, the object of the drag operation of above-mentioned image cropping system is operation limit, and the attribute of crop box is fixed proportion cutting, and cutting module is further used for being moved by the method for user's drag operation triggering crop box along drag operation.In the present embodiment, cutting module is when fixed proportion cutting, and when user passes through any limit in mouse drag crop box, the direction of crop box along user's drag operation is moved by cutting module.
In above-mentioned image cropping method and system, after the attribute of the crop box and crop box that obtain image, the dynamic conditioning of crop box is carried out by user's drag operation, attribute according to drag object and crop box adjusts crop box, be in course of adjustment due to the attribute of the object and crop box that consider drag operation, thus the automatic turning of crop box can be realized, be effectively improve dirigibility.
The above embodiment only have expressed several embodiment of the present invention, and it describes comparatively concrete and detailed, but therefore can not be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.

Claims (10)

1. an image cropping method, comprises the following steps:
Obtain the crop box of image and the attribute of described crop box;
The object of drag operation is made to move obtain the object after being moved according to the track dragged by the drag operation carried out crop box;
Attribute according to the object after described being moved and crop box adjusts described crop box;
When the object of described drag operation is the summit in crop box, when the attribute of described crop box is fixed proportion cutting,
The described drag operation by carrying out crop box makes the object of drag operation move according to the track dragged the step obtaining the object after being moved: move according to the summit that user's drag operation triggers in crop box, and the summit with movement is in same cornerwise summit as point of fixity, obtain the coordinate on summit and the coordinate of point of fixity of movement
Step that object after being moved described in described basis and the attribute of crop box adjust described crop box is the distance proportion in the summit being movement described in benchmark with the coordinate of point of fixity between horizontal ordinate displacement and ordinate displacement, judge whether described distance proportion is greater than cutting ratio, if, then according to the horizontal ordinate on the summit of the ordinate on the summit of described movement and cutting ratio adjustment movement, if not, then according to the horizontal ordinate on the summit of described movement and the ordinate of cutting ratio adjustment drag object, crop box after being adjusted according to the coordinate on summit of described movement after adjustment and the coordinate of point of fixity.
2. image cropping method according to claim 1, it is characterized in that, when the object of described drag operation is the summit in crop box, when the attribute of described crop box is free cutting, the described drag operation by carrying out crop box makes the object of drag operation move the step obtaining the object after being moved according to the track dragged be:
Move according to the summit that user's drag operation triggers in crop box, and the summit with movement is in same cornerwise summit as point of fixity;
Obtain the coordinate on the summit of described movement and the coordinate of point of fixity.
3. image cropping method according to claim 2, is characterized in that, the object after being moved described in described basis and the attribute of crop box to the step that described crop box adjusts are:
Crop box after the diagonal line consisted of the coordinate on the summit by described movement and the coordinate of point of fixity is adjusted.
4. image cropping method according to claim 1, it is characterized in that, when the object of described drag operation is operation limit, when the attribute of described crop box is fixed proportion cutting, describedly the object of drag operation is made to move the step obtaining the object after being moved according to the track dragged be by carrying out drag operation to crop box:
Trigger described crop box by user's drag operation to move along the direction of described drag operation.
5. image cropping method according to claim 1, it is characterized in that, when the object of described drag operation is operation limit, when the attribute of described crop box is free cutting, the object after being moved described in described basis and the attribute of crop box to the step that described crop box adjusts are:
Triggered by user's drag operation and operate limit in described crop box and move, and using limit relative with operation limit in described crop box as fixed edge;
Crop box after being adjusted by described operation limit and fixed edge.
6. an image cropping system, is characterized in that, at least comprises:
Acquisition module, for the attribute of the crop box and described crop box that obtain image;
Mobile trigger module, makes the object of drag operation move obtain the object after being moved according to the track dragged for the drag operation by carrying out crop box;
Mobile processing module, the attribute for the object after being moved described in basis and crop box adjusts described crop box;
When the object of described drag operation is the summit in crop box, when the attribute of described crop box is fixed proportion cutting,
Described mobile trigger module comprises: trigger element, summit for triggering in crop box according to user's drag operation is moved, and the summit with described movement is in same cornerwise summit as point of fixity, coordinate acquiring unit, for the coordinate of the coordinate and point of fixity that obtain the summit of described movement
Described mobile processing module comprises: computing unit, for the distance proportion in the summit that is movement described in benchmark with the coordinate of point of fixity between horizontal ordinate displacement and ordinate displacement, judging unit, cutting ratio whether is greater than for judging distance ratio, and judged result is notified adjustment unit, adjustment unit, for being greater than cutting ratio when described distance proportion, the horizontal ordinate on the summit of described movement is adjusted according to the ordinate on the summit of described movement and cutting ratio, when described distance proportion is less than cutting ratio, the ordinate on the summit of described movement is adjusted according to the horizontal ordinate on the summit of movement and cutting ratio, and the crop box after being adjusted according to the coordinate on summit of movement after adjustment and the coordinate of point of fixity.
7. image cropping system according to claim 6, is characterized in that, when the object of described drag operation is the summit in crop box, when the attribute of described crop box is free cutting, described mobile trigger module comprises:
Trigger element, moves for the summit of triggering in crop box according to user's drag operation, and will be in same cornerwise summit as point of fixity with described summit;
Coordinate acquiring unit, for the coordinate of the coordinate and point of fixity that obtain the summit of movement.
8. image cropping system according to claim 7, is characterized in that, the crop box after the diagonal line of described mobile processing module also for consisting of the coordinate on the summit by described movement and the coordinate of point of fixity is adjusted.
9. image cropping system according to claim 6, it is characterized in that, when the object of described drag operation is operation limit, when the attribute of described crop box is fixed proportion cutting, described mobile trigger module is further used for triggering described crop box by user's drag operation and moves along the direction of described drag operation;
Described mobile processing module be further used for the crop box after according to movement be adjusted after crop box.
10. image cropping system according to claim 6, it is characterized in that, when the object of described drag operation is operation limit, when the attribute of described crop box is free cutting, described mobile trigger module also for by user's drag operation the operation limit of triggering in described crop box move, and using in described crop box with relative limit, operation limit as fixed edge;
Described mobile processing module is also for the crop box after being adjusted by described operation limit and fixed edge.
CN201110041815.0A 2011-02-21 2011-02-21 Image cropping method and system Active CN102646258B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110041815.0A CN102646258B (en) 2011-02-21 2011-02-21 Image cropping method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110041815.0A CN102646258B (en) 2011-02-21 2011-02-21 Image cropping method and system

Publications (2)

Publication Number Publication Date
CN102646258A CN102646258A (en) 2012-08-22
CN102646258B true CN102646258B (en) 2016-01-06

Family

ID=46659071

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110041815.0A Active CN102646258B (en) 2011-02-21 2011-02-21 Image cropping method and system

Country Status (1)

Country Link
CN (1) CN102646258B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103400387B (en) * 2013-08-06 2018-10-09 上海合合信息科技发展有限公司 The method and device of line segment absorption in the picture, constructs the method and device of polygon
CN104899825B (en) * 2014-03-06 2019-07-05 腾讯科技(深圳)有限公司 A kind of method and apparatus of pair of picture character moulding
CN104580932A (en) * 2015-01-29 2015-04-29 广东欧珀移动通信有限公司 Image information modification method and device
CN104881888B (en) * 2015-06-17 2018-07-10 北京金山安全软件有限公司 Picture clipping method and device
CN104991725B (en) * 2015-07-28 2018-02-23 北京金山安全软件有限公司 Picture clipping method and system
CN106775342A (en) * 2015-11-25 2017-05-31 中兴通讯股份有限公司 Picture method of cutting out and device based on pressure sensitive technology
CN106293474B (en) * 2016-08-15 2019-11-26 广东小天才科技有限公司 Adjustment method and device for selected information
CN108364295A (en) * 2018-01-08 2018-08-03 武汉斗鱼网络科技有限公司 A kind of cropping method and system
CN111316319A (en) * 2019-03-15 2020-06-19 深圳市大疆创新科技有限公司 Image processing method, electronic device, and computer-readable storage medium
CN111158561A (en) * 2019-12-03 2020-05-15 深圳传音控股股份有限公司 Intelligent terminal, view clipping method and computer readable storage medium
CN111311489B (en) * 2020-01-17 2023-07-04 维沃移动通信有限公司 Image clipping method and electronic equipment
CN111275726B (en) * 2020-02-24 2021-02-05 北京字节跳动网络技术有限公司 Image cropping method, device, equipment and storage medium
CN111327841A (en) * 2020-02-25 2020-06-23 四川新视创伟超高清科技有限公司 Ultra-high-definition video cutting method and system based on X86 framework
CN111757177B (en) * 2020-06-17 2022-12-20 维沃移动通信有限公司 Video clipping method and device
CN112215648A (en) * 2020-10-12 2021-01-12 上海酷量信息技术有限公司 Picture processing system and method suitable for multiple advertisement platforms

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1497938A (en) * 2002-09-30 2004-05-19 ������������ʽ���� Image editing method, image editing device, program and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1497938A (en) * 2002-09-30 2004-05-19 ������������ʽ���� Image editing method, image editing device, program and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
光影魔术手裁剪随我意;无人喝彩;《电脑迷》;20080801;全文 *
浅谈利用Photoshop裁剪图像;洪亮等;《印刷世界》;20101020;第24-25页 *

Also Published As

Publication number Publication date
CN102646258A (en) 2012-08-22

Similar Documents

Publication Publication Date Title
CN102646258B (en) Image cropping method and system
JP6469932B2 (en) System and method for performing automatic zoom
CN105824003B (en) A kind of indoor moving object localization method based on smooth trajectory
CN104801043B (en) Method and device for controlling scene sound effect
WO2014079585A4 (en) A method for obtaining and inserting in real time a virtual object within a virtual scene from a physical object
CN103533246B (en) A kind of control method of automatic tracking spherical camera
CN101902616A (en) Quick stereo positioning method for video monitoring
RU2015109072A (en) METHOD FOR DETECTING HUMAN OBJECTS IN VIDEO (OPTIONS)
CN103237155B (en) The tracking of the target that a kind of single-view is blocked and localization method
CN105045584B (en) Touch control method and system for screen of vehicle machine
CN102799875B (en) Any hand shape hand tracking method
CN103472907B (en) Method and system for determining operation area
EP2830028A1 (en) Controlling movement of a camera to autonomously track a mobile object
CN107621883B (en) Virtual reality system based on mobile phone terminal and man-machine interaction method
CN109979020B (en) Line segment adsorption method, device, equipment and storage medium
CN108490939B (en) Obstacle avoidance method of potential flow method under local perception capability
CN105141828A (en) Method for carrying out recording of motion camera by automatically adjusting view angle after locking scene
CN107977981B (en) Moving target tracking method and device
WO2019119290A1 (en) Method and apparatus for determining prompt information, and electronic device and computer program product
CN105979209A (en) Monitoring video display method and monitoring video display device
CN102707802A (en) Method for controlling speed of mapping of gesture movement to interface
CN102348093A (en) Intelligent base of Android mobile phone for video chat
CN203974675U (en) Automatically show backing-up photographing system and the reversing camera thereof at tri-state visual angle
CN103218775A (en) Method of changing faces in portrait photos
CN108932728B (en) Tracking method based on visual monitoring

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant