CN105894554B - Image processing method and device - Google Patents
Image processing method and device Download PDFInfo
- Publication number
- CN105894554B CN105894554B CN201610221414.6A CN201610221414A CN105894554B CN 105894554 B CN105894554 B CN 105894554B CN 201610221414 A CN201610221414 A CN 201610221414A CN 105894554 B CN105894554 B CN 105894554B
- Authority
- CN
- China
- Prior art keywords
- touch point
- point
- touch
- image
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/80—Creating or modifying a manually drawn or painted image using a manual input device, e.g. mouse, light pen, direction keys on keyboard
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- User Interface Of Digital Computer (AREA)
- Processing Or Creating Images (AREA)
Abstract
The present invention relates to a kind of image processing method and device.The described method includes: obtaining original image, and show the original image;Receive the touch event to the original image;The first touch point that the touch event generates on the original image is obtained, and obtains and the moving direction of moving event is carried out as starting point using first touch point and is formed by motion track;Pattern to be added is rotated according to the moving direction;It draws on the postrotational pattern to the motion track;Image after the pattern being plotted on motion track and the original image are synthesized.Above-mentioned image processing method and device, the moving direction of moving event is carried out as starting point using the first touch point and is formed by motion track, pattern to be added is rotated according to moving direction, postrotational pattern is plotted on motion track, it realizes and the kinetic potential of paintbrush is followed to handle image, synthesized new image.
Description
Technical field
The present invention relates to field of image processings, more particularly to a kind of image processing method and device.
Background technique
With the development of technology, more and more users can conveniently using itself terminal device shooting image or from
Image is obtained in network, and in order to obtain oneself desired image, original image is handled using various image processing tools
To obtain desired effect.There is paintbrush (or scribble) function in the application program of many image processing tools.Traditional paintbrush
Function be by the photo of user's shooting or the picture presentation chosen from photograph album on the screen, image can be cut, be rotated,
The operation such as filter is added, the kinetic potential of paintbrush can not be followed to handle image.
Summary of the invention
Based on this, it is necessary to for what can not be handled with the kinetic potential of paintbrush image in traditional image processing tool
Problem provides a kind of image processing method, can be realized and the kinetic potential of paintbrush is followed to handle image.
In addition, there is a need to provide a kind of image processing apparatus, can be realized follow the kinetic potential of paintbrush to image at
Reason.
A kind of image processing method, comprising:
Original image is obtained, and shows the original image;
Receive the touch event to the original image;
The first touch point that the touch event generates on the original image is obtained, and is obtained with first touching
Control point is that starting point carries out the moving direction of moving event and is formed by motion track;
Pattern to be added is rotated according to the moving direction;
It draws on the postrotational pattern to the motion track;
Image after the pattern being plotted on motion track and the original image are synthesized.
A kind of image processing apparatus, comprising:
Display module for obtaining original image, and shows the original image;
Event receiving module, for receiving the touch event to the original image;
Parameter acquisition module, the first touch point generated on the original image for obtaining the touch event, with
And it obtains and the moving direction of moving event is carried out as starting point using first touch point and is formed by motion track;
Rotary module, for being rotated pattern to be added according to the moving direction;
Drafting module, for drawing the postrotational pattern to the motion track;
Synthesis module is closed for being synthesized the pattern being plotted on motion track with the original image
Image after.
Above-mentioned image processing method and device by obtaining original image, and are obtained and are produced to the touch event of original image
The first raw touch point carries out the moving direction of moving event as starting point using the first touch point and is formed by motion track, root
Pattern to be added is rotated according to moving direction, postrotational pattern is plotted on motion track, is realized and is followed the dynamic of paintbrush
Gesture handles image, has synthesized new image.
Detailed description of the invention
Fig. 1 is the schematic diagram of internal structure of terminal in one embodiment;
Fig. 2 is the flow chart of image processing method in one embodiment;
Fig. 3 is the schematic diagram that original image is pressed in one embodiment;
Fig. 4 is the flow chart of image processing method in another embodiment;
Fig. 5 is the effect diagram of pattern overlapping in one embodiment;
Fig. 6 is the postrotational effect diagram of pattern in one embodiment;
Fig. 7 is the first touch point for obtaining the touch event and generating on the original image, and is obtained with first touching
Control point is that starting point carries out the moving direction of moving event and is formed by the specific flow chart of motion track;
Fig. 8 is the effect diagram for adding pattern with the mobile track dynamic of finger on the image;
Fig. 9 is the structural block diagram of image processing apparatus in one embodiment.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
It is appreciated that term " first " used in the present invention, " second " etc. can be used to describe various elements herein,
But these elements should not be limited by these terms.These terms are only used to distinguish the first element from the other element.Citing comes
It says, without departing from the scope of the invention, first set can be known as to second set, and similarly, it can be by second
Collection is collectively referred to as first set.First set and second set are both gathered, but it is not identity set.
Fig. 1 is the schematic diagram of internal structure of terminal in one embodiment.As shown in Figure 1, the terminal includes total by system
Processor, non-volatile memory medium, memory, display screen and the input unit of line connection.Wherein, the non-volatile memories of terminal
Media storage has operating system.The processor supports the operation of entire terminal, the processor for providing calculating and control ability
It is used for image processing method, comprising: obtain original image, and show the original image;It receives to the original image
Touch event;The first touch point that the touch event generates on the original image is obtained, and is obtained with described first
Touch point is that starting point carries out the moving direction of moving event and is formed by motion track;It will be to be added according to the moving direction
Pattern rotated;It draws on the postrotational pattern to the motion track;It is plotted to described on motion track
Pattern and the original image synthesized after image.The display screen of terminal can be liquid crystal display or electricity
Sub- ink display screen etc., input unit can be the touch layer covered on display screen, be also possible to be arranged in terminal enclosure by
Key, trace ball or Trackpad are also possible to external keyboard, Trackpad or mouse etc..The terminal can be mobile phone, plate electricity
Brain, personal digital assistant or wearable device etc..It will be understood by those skilled in the art that structure shown in Fig. 1, only with
The block diagram of the relevant part-structure of application scheme, does not constitute the restriction for the terminal being applied thereon to application scheme,
Specific terminal may include perhaps combining certain components or with different than more or fewer components as shown in the figure
Component layout.
Fig. 2 is the flow chart of image processing method in one embodiment.As shown in Fig. 2, a kind of image processing method, operation
In terminal in Fig. 1, comprising:
Step 202, original image is obtained, and shows the original image.
In the present embodiment, the photo of shooting or from the picture chosen in photograph album or the picture downloaded from network as original
Image loads original image into image processing application program, and original image is shown on the screen of terminal.
Step 204, the touch event to the original image is received.
In the present embodiment, terminal receives touch event of the user by touch control objects such as finger or styluses to original image.
The touch event refers to the pressing operation to original image.
Step 206, obtain the first touch point that the touch event generates on the original image, and obtain with this first
Touch point is that starting point carries out the moving direction of moving event and is formed by motion track.
In the present embodiment, the image coordinate of the first touch point of user's pressing on the original image is obtained, and is captured
Mobile moving direction is carried out as starting point using the first touch point and is formed by motion track.The motion track includes multiple touch-controls
Point.Moving direction can be variation or constant, such as it is straight line that user is mobile, then moving direction does not change, if with
Family motion track be a curve then moving direction in dynamic change.
The moving direction can be acquired according to the image coordinate of adjacent touch point.
Fig. 3 is the schematic diagram that original image is pressed in one embodiment.It is shown as shown in figure 3, user is pressed by finger
Original image generate touch event, and record the first touch point that the touch event generates on the original image image sit
Mark.
Step 208, pattern to be added is rotated according to the moving direction.
In the present embodiment, pattern to be added can in the material database in image processing application program pattern or user from
The pattern etc. of definition.The customized pattern of user can be according to the pattern downloaded or be locally stored from network.
Pattern to be added itself has original state, and with moving direction, pattern to be added is rotated.
Pattern to be added may be the same or different every time.If pattern to be added is identical every time, this figure to be added
Case is to rotate corresponding rotation angle through last time pattern to be added to obtain.The rotation angle is obtained according to moving direction.
Step 210, it draws on postrotational pattern to the motion track.
In the present embodiment, postrotational pattern is attached on motion track.
Step 212, the figure after the pattern being plotted on motion track and the original image being synthesized
Picture.
In the present embodiment, the color of pattern is mapped on the corresponding position of original image using mixed mode.Hybrid guided mode
Formula is to use different methods by the color mixing of object color and underlying object.Mixed mode includes dissolution mode, behind mould
Formula, dimmed mode, the mode that brightens etc..Wherein, the final color of dissolution mode is identical with drawing color, only according to each pixel institute
Position transparency it is different, can be replaced at random with color rendering and background color.The final color of behind mode is identical with drawing color, when
When operating in the figure layer for have transparent region, behind mode just will appear, and the lines of drafting can be placed in figure layer after image
Face.Dimmed mode is by that choosing darker in two images as a result, being used to search the colouring information in each Color Channel,
And background color and drawing color are compared according to pixel, that is darker, the color final as this image using darker color.It is bright in background color
Color be replaced, it is secretly constant in the color keep of background color.
Above-mentioned image processing method by obtaining original image, and obtains the generated to the touch event of original image
One touch point carries out the moving direction of moving event as starting point using the first touch point and is formed by motion track, according to movement
Direction rotates pattern to be added, and postrotational pattern is plotted on motion track, realizes and follows the kinetic potential of paintbrush to figure
As being handled, new image is synthesized, the interest of image is increased.
Fig. 4 is the flow chart of image processing method in another embodiment.As shown in figure 4, a kind of image processing method, packet
It includes:
Step 402, original image is obtained, and shows the original image.
In the present embodiment, the photo of shooting or from the picture chosen in photograph album or the picture downloaded from network as original
Image loads original image into image processing application program, and original image is shown on the screen of terminal.
Step 404, the touch event to the original image is received.
In the present embodiment, terminal receives touch event of the user by touch control objects such as finger or styluses to original image.
The touch event refers to the pressing operation to original image.
Step 406, the first touch point that the touch event generates on the original image is obtained.
In the present embodiment, the image coordinate of the first touch point generated on the original image is obtained.If two variable p1 and
Image coordinate of the p2 to store touch point.P1 is used to store the image coordinate of the first touch point.
Step 408, second generated on the original image using first touch point as starting point progress moving event is obtained
Touch point.
In the present embodiment, obtains and carry out the second touching that moving event generates on the original image by starting point of the first touch point
Control the image coordinate of point.
Step 410, the event of lifting is judged whether there is, if so, 412 are thened follow the steps, if it is not, executing step 414.
The event of lifting can lift finger or stylus etc. for user, indicate that touch-control terminates.
Step 412, drafting terminates.
Step 414, obtain the second touch point for being generated on the original image between the first touch point at a distance from.
In the present embodiment, the first touch-control is calculated according to the image coordinate of the first touch point and the image coordinate of the second touch point
The distance between point and the second touch point.For example, the image coordinate of the first touch point is (x1, y1), the image of the second touch point
Coordinate is (x2, y2), then the distance between the first touch point and the second touch point are
Step 416, judge whether the distance is greater than or equal to distance threshold, if so, 418 are thened follow the steps, if it is not, executing
Step 408.
In the present embodiment, distance threshold can be set as needed.Distance threshold can be greater than pattern width or wide less than pattern
Degree.Such as distance threshold can be 0.8 times or 0.7 times of pattern width, if distance threshold is less than pattern width, in certain situations
Lower pattern is plotted on motion track the effect for having overlapping between pattern, as shown in figure 5, distance threshold is less than the width of pattern,
Two neighboring pattern produces the effect of overlapping.If distance threshold is greater than pattern width, the pattern being plotted on motion track
Between there are gaps, there are the effects of segmentation.
Step 418, the image coordinate of second touch point is recorded.
It specifically, will be in the image coordinate deposit p2 of the second touch point.
Step 420, it is obtained according to the image coordinate of the second touch point of the record and the image coordinate of first touch point
The rotation angle of pattern to be added.
In the present embodiment, rotate angle calculation formula be doubleangle=atan (- 1*double (y2-y1)/
(x2-x1), wherein the coordinate of p1 is (x1, y1), and the coordinate of p2 is (x2, y2).Because the codomain of arctan function is (- pi/2, π/
2), angle is reconverted into according to coordinate quadrant: if (x2 < x1) { angle=angle+ π }.
Central point is calculated according to the first touch point and the second touch point after rotation, using the central point as to be added
The central point that pattern is drawn.
Rotating angle is moving direction.
Step 422, pattern to be added is rotated according to the rotation angle.
Fig. 6 is the postrotational effect diagram of pattern in one embodiment.As shown in fig. 6, pattern is rectangle chain, pattern
Original state is transverse pattern, after calculating rotation angle according to the first touch point and the second touch point, according to the rotation angle
Rotation obtains postrotational pattern.
Step 424, it draws on the motion track that the postrotational pattern is formed to first touch point and the second touch point.
In the present embodiment, postrotational pattern is attached on motion track.
Step 426, the figure after the pattern being plotted on motion track and the original image being synthesized
Picture.
In the present embodiment, the color of pattern is mapped on the corresponding position of original image using mixed mode.
Step 428, moving event is carried out using second touch point as new starting point, then executes step 408.
Specifically, it by the coordinate deposit p1 of the second touch point stored in p2, is moved as new starting point.
Above-mentioned image processing method by obtaining original image, and obtains the generated to the touch event of original image
One touch point is carried out the second touch point of moving event generation using the first touch point as starting point, judges the second touch point and first
The distance of touch point is greater than or equal to distance threshold, records second touch point, postrotational pattern is plotted to the first touch-control
On motion track between point and the second touch point, quantity and the position of pattern addition are effectively controlled, and realizes and follows paintbrush
Kinetic potential image is handled, synthesized new image, increased the interest of image.
In one embodiment, the step of which carries out the moving direction of moving event as starting point using first touch point
It include: to obtain to carry out the second touch point that moving event generates on the original image by starting point of first touch point;It obtains
The second touch point generated on the original image between the first touch point at a distance from;Judge whether the distance is greater than or equal to
Distance threshold, if so, recording the image coordinate of second touch point;According to the image coordinate of the second touch point of the record with
The image coordinate of first touch point obtains the rotation angle of pattern to be added.
Further, the step of this is rotated pattern to be added according to the moving direction include;According to the rotation
Angle rotates pattern to be added.
Step on the postrotational pattern to the motion track of the drafting include: draw the postrotational pattern to this
On the track that one touch point and the second touch point are formed;Moving event is carried out using second touch point as new starting point.
In one embodiment, as shown in fig. 7, the first touch-control that the acquisition touch event generates on the original image
Point, and obtain the step of carrying out the moving direction of moving event as starting point using first touch point and be formed by motion track
Include:
Step 702, the image coordinate for the first touch point that the touch event generates on the original image is obtained.
In the present embodiment, step 702 includes: the screen seat for obtaining the first touch point that the touch event generates on the screen
Mark;The screen coordinate of the first touch point generated on the screen is converted to the figure of the first touch point generated in the original image
As coordinate.
Specifically, the transformational relation of screen coordinate system and image coordinate system can be established in advance.According to screen coordinate system and figure
As screen coordinate is converted to image coordinate by the transformational relation of coordinate system.
Step 704, second generated on the original image using first touch point as starting point progress moving event is obtained
The image coordinate of touch point.
In the present embodiment, step 704 includes: to obtain to produce on the screen by starting point progress moving event of first touch point
The screen coordinate of the second raw touch point;The screen coordinate of the second touch point generated on the screen is converted in the original graph
As the image coordinate of the second touch point of upper generation.
Specifically, the transformational relation of screen coordinate system and image coordinate system can be established in advance.According to screen coordinate system and figure
As screen coordinate is converted to image coordinate by the transformational relation of coordinate system.
Step 706, moving direction is obtained according to the image coordinate of first touch point and the image coordinate of the second touch point.
Step 708, it using second touch point as new starting point, obtains original at this with new starting point progress moving event
The image coordinate of the second new touch point generated on image.
Step 710, new shifting is obtained according to the image coordinate of the image coordinate of the new starting point and the second new touch point
Dynamic direction.
Step 712, it detects the event of lifting, obtains and lift the image coordinate of the touch point before event generates as eventually at this
The image coordinate of point.
Step 714, it records first touch point and is formed by the motion track comprising each touch point coordinate to terminal.
Fig. 8 is the effect diagram for adding pattern with the mobile track dynamic of finger on the image.As shown in figure 8, obtaining
The picture that user selects from the photograph album of terminal, is shown on the screen of terminal, detects user's finger pressing in terminal
Screen on, obtain the image coordinate of the first touch point of user's finger pressing, record generated as user's finger is mobile the
The image coordinate of two touch points obtains the first touch-control according to the image coordinate of the image coordinate of the second touch point and the first touch point
The distance between point and the second touch point, judge whether the distance is greater than or equal to distance threshold, if more than or equal to apart from threshold
Value, then the second touch point obtains the rotation angle of pattern relative to the moving direction of the first touch point, by pattern according to rotation angle
Degree is rotated, and postrotational pattern is added on the motion track on picture between the first touch point and the second touch point,
It is moved again using the second touch point as new starting point, then obtains the second new touch point, repeating the above process will scheme
Case is added in picture, and until detecting that finger frames out, one is formed on picture with the mobile pattern added of finger
Chain.
Fig. 9 is the structural block diagram of image processing apparatus in one embodiment.As shown in figure 9, a kind of image processing apparatus, packet
Include display module 902, event receiving module 904, parameter acquisition module 906, rotary module 908, drafting module 910 and synthesis mould
Block 912.Wherein:
Display module 902 shows the original image for obtaining original image.
Event receiving module 904 is used to receive the touch event to the original image.
Parameter acquisition module 906 is used to obtain the first touch point that the touch event generates on the original image, and
It obtains and the moving direction of moving event is carried out as starting point using first touch point and is formed by motion track.
In the present embodiment, the image coordinate of the first touch point of user's pressing on the original image is obtained, and is captured
Mobile moving direction is carried out as starting point using the first touch point and is formed by motion track.The motion track includes multiple touch-controls
Point.Moving direction can be variation or constant, such as it is straight line that user is mobile, then moving direction does not change, if with
Family motion track be a curve then moving direction in dynamic change.
The moving direction can be acquired according to the image coordinate of adjacent touch point.
Rotary module 908 is for rotating pattern to be added according to the moving direction.
In the present embodiment, pattern to be added can in the material database in image processing application program pattern or user from
The pattern etc. of definition.The customized pattern of user can be according to the pattern downloaded or be locally stored from network.
Pattern to be added itself has original state, and with moving direction, pattern to be added is rotated.
Pattern to be added may be the same or different every time.If pattern to be added is identical every time, this figure to be added
Case is to rotate corresponding rotation angle through last time pattern to be added to obtain.The rotation angle is obtained according to moving direction.
Drafting module 910 is for drawing the postrotational pattern to the motion track.
Synthesis module 912 is for being synthesized the pattern being plotted on motion track with the original image
Image afterwards.
In the present embodiment, the color of pattern is mapped on the corresponding position of original image using mixed mode.
Above-mentioned image processing apparatus by obtaining original image, and obtains the generated to the touch event of original image
One touch point carries out the moving direction of moving event as starting point using the first touch point and is formed by motion track, according to movement
Direction rotates pattern to be added, and postrotational pattern is plotted on motion track, realizes and follows the kinetic potential of paintbrush to figure
As being handled, new image is synthesized, the interest of image is increased.
In one embodiment, which is also used to obtain and be moved using first touch point as starting point
The second touch point that dynamic event generates on the original image, and obtain the second touch point for being generated on the original image with
The distance between first touch point, and judge whether the distance is greater than or equal to distance threshold, if so, recording second touch-control
The image coordinate of point, and obtained according to the image coordinate of the second touch point and the image coordinate of first touch point of the record
The rotation angle of pattern to be added.
The rotary module 908 is also used to be rotated pattern to be added according to the rotation angle.
The drafting module 910 is also used to draw what the postrotational pattern was formed to first touch point and the second touch point
On track.
Moving event is carried out using second touch point as new starting point.
The distance threshold is less than the width of the pattern to be added.
The parameter acquisition module 906 is also used to obtain the central point of first touch point and the second touch point.
The drafting module 908 is also used to the central point of the central point pattern to be added as this.
In one embodiment, which is also used to obtain the touch event and produces on the original image
The image coordinate of the first raw touch point;
Obtaining using first touch point is the second touch point for generating on the original image of starting point progress moving event
Image coordinate;
Moving direction is obtained according to the image coordinate of first touch point and the image coordinate of the second touch point;
Using second touch point as new starting point, obtains and produced on the original image with new starting point progress moving event
The image coordinate of raw the second new touch point;
New moving direction is obtained according to the image coordinate of the image coordinate of the new starting point and the second new touch point;
It detects the event of lifting, obtains and lift image of the image coordinate of the touch point before event generates as terminal at this
Coordinate;
It records first touch point and is formed by the motion track comprising each touch point coordinate to terminal.
In one embodiment, parameter acquisition module 906 is also used to obtain first that the touch event generates on the screen
The screen coordinate of touch point is converted to the screen coordinate of the first touch point generated on the screen in original image generation
The image coordinate of first touch point;And obtain be that starting point progress moving event generates on the screen using first touch point the
The screen coordinate of the second touch point generated on the screen is converted to and is produced on the original image by the screen coordinate of two touch points
The image coordinate of the second raw touch point.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in a non-volatile computer and can be read
In storage medium, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage is situated between
Matter can be magnetic disk, CD, read-only memory (Read-Only Memory, ROM) etc..
The embodiments described above only express several embodiments of the present invention, and the description thereof is more specific and detailed, but simultaneously
Limitations on the scope of the patent of the present invention therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art
For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to guarantor of the invention
Protect range.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.
Claims (8)
1. a kind of image processing method, comprising:
Original image is obtained, and shows the original image;
Receive the touch event to the original image;
The first touch point that the touch event generates on the original image is obtained, and is obtained with first touch point
The second touch point that moving event generates on the original image is carried out for starting point, obtains second generated on the original image
The distance between touch point and the first touch point;Judge whether the distance is greater than or equal to distance threshold, if so, record institute
State the image coordinate of the second touch point;According to the figure of the image coordinate of the second touch point of the record and first touch point
As coordinate obtains the rotation angle of pattern to be added;
Pattern to be added is rotated according to the rotation angle;
It draws on the motion track that the postrotational pattern is formed to first touch point and the second touch point, by described the
Two touch points carry out moving event as new starting point and repeat the above process;
Image after the pattern being plotted on motion track and the original image are synthesized.
2. the method according to claim 1, wherein the distance threshold is less than the width of the pattern to be added
Degree;
The method also includes:
Obtain the central point of first touch point and the second touch point;
Using the central point as the central point of the pattern to be added.
3. method according to any one of claim 1 to 2, which is characterized in that described to obtain the touch event in institute
The first touch point generated on original image is stated, and obtains the movement for carrying out moving event using first touch point as starting point
Direction and the step of being formed by motion track include:
Obtain the image coordinate for the first touch point that the touch event generates on the original image;
Obtaining using first touch point is the second touch point for generating on the original image of starting point progress moving event
Image coordinate;
Moving direction is obtained according to the image coordinate of first touch point and the image coordinate of the second touch point;
Using second touch point as new starting point, obtains and produced on the original image with new starting point progress moving event
The image coordinate of raw the second new touch point;
New moving direction is obtained according to the image coordinate of the image coordinate of the new starting point and the second new touch point;
It detects the event of lifting, obtains and sat in the image coordinate for lifting the touch point before event generates as the image of terminal
Mark;
It records first touch point and is formed by the motion track comprising each touch point coordinate to terminal.
4. according to the method described in claim 3, it is characterized in that, described obtain the touch event on the original image
Generate the first touch point image coordinate the step of include:
Obtain the screen coordinate for the first touch point that the touch event generates on the screen;
The screen coordinate of the first touch point generated on the screen is converted to the first touch-control generated in the original image
The image coordinate of point;
The acquisition carries out the second touch-control that moving event generates on the original image by starting point of first touch point
Point image coordinate the step of include:
Obtain the screen coordinate that the second touch point that moving event generates on the screen is carried out using first touch point as starting point;
The screen coordinate of the second touch point generated on the screen is converted to the second touching generated on the original image
Control the image coordinate of point.
5. a kind of image processing apparatus characterized by comprising
Display module for obtaining original image, and shows the original image;
Event receiving module, for receiving the touch event to the original image;
Parameter acquisition module, the first touch point generated on the original image for obtaining the touch event, and obtain
It takes and carries out the second touch point that moving event generates on the original image by starting point of first touch point, and obtain
The second touch point generated on the original image between the first touch point at a distance from, and judge whether the distance is greater than
Or it is equal to distance threshold, if so, recording the image coordinate of second touch point, and according to the second touch-control of the record
The image coordinate of point and the image coordinate of first touch point obtain the rotation angle of pattern to be added;
Rotary module, for being rotated pattern to be added according to the rotation angle;
Drafting module, the moving rail formed for drawing the postrotational pattern to first touch point and the second touch point
On mark, second touch point is subjected to moving event as new starting point and repeats the above process;
Synthesis module, for being synthesized the pattern being plotted on motion track and the original image after obtaining synthesis
Image.
6. device according to claim 5, which is characterized in that the distance threshold is less than the width of the pattern to be added
Degree;
The parameter acquisition module is also used to obtain the central point of first touch point and the second touch point;
The drafting module is also used to using the central point as the central point of the pattern to be added.
7. the device according to any one of claim 5 to 6, which is characterized in that the parameter acquisition module is also used to obtain
The image coordinate for the first touch point for taking the touch event to generate on the original image;
Obtaining using first touch point is the second touch point for generating on the original image of starting point progress moving event
Image coordinate;
Moving direction is obtained according to the image coordinate of first touch point and the image coordinate of the second touch point;
Using second touch point as new starting point, obtains and produced on the original image with new starting point progress moving event
The image coordinate of raw the second new touch point;
New moving direction is obtained according to the image coordinate of the image coordinate of the new starting point and the second new touch point;
It detects the event of lifting, obtains and sat in the image coordinate for lifting the touch point before event generates as the image of terminal
Mark;
It records first touch point and is formed by the motion track comprising each touch point coordinate to terminal.
8. device according to claim 7, which is characterized in that obtain the first touching that the touch event generates on the screen
The screen coordinate for controlling point, the screen coordinate of the first touch point generated on the screen is converted to and is generated in the original image
The first touch point image coordinate;
And obtain the screen that the second touch point that moving event generates on the screen is carried out using first touch point as starting point
The screen coordinate of the second touch point generated on the screen is converted to the second touching generated on the original image by coordinate
Control the image coordinate of point.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610221414.6A CN105894554B (en) | 2016-04-11 | 2016-04-11 | Image processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610221414.6A CN105894554B (en) | 2016-04-11 | 2016-04-11 | Image processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105894554A CN105894554A (en) | 2016-08-24 |
CN105894554B true CN105894554B (en) | 2019-07-05 |
Family
ID=57012933
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610221414.6A Active CN105894554B (en) | 2016-04-11 | 2016-04-11 | Image processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105894554B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107103634A (en) * | 2017-04-20 | 2017-08-29 | 广州视源电子科技股份有限公司 | Graph track drawing method, device and equipment and computer storage medium |
CN109814784B (en) * | 2019-01-07 | 2022-07-08 | 平安科技(深圳)有限公司 | Picture rotation method and device, computer equipment and storage medium |
CN111862349A (en) * | 2019-04-26 | 2020-10-30 | 北京字节跳动网络技术有限公司 | Virtual brush implementation method and device and computer readable storage medium |
CN112799627B (en) * | 2021-02-08 | 2022-12-09 | 海信视像科技股份有限公司 | Display apparatus and image display method |
WO2022089043A1 (en) | 2020-10-30 | 2022-05-05 | 海信视像科技股份有限公司 | Display device, geometry recognition method, and multi-pattern layer superimposed display method |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08249490A (en) * | 1994-12-26 | 1996-09-27 | Sony Corp | Three-dimensional parameter input device and image processor |
CN102169383A (en) * | 2010-11-26 | 2011-08-31 | 苏州瀚瑞微电子有限公司 | Identification method for rotating gestures of touch screen |
CN103246476A (en) * | 2013-04-27 | 2013-08-14 | 华为技术有限公司 | Method, device and terminal device for rotating screen contents |
CN103309557A (en) * | 2012-03-06 | 2013-09-18 | 卡西欧计算机株式会社 | Image processing apparatus and image processing method |
CN104517305A (en) * | 2013-10-07 | 2015-04-15 | 智仁科技开发股份有限公司 | Matching method of human body clothes fittings |
CN104899911A (en) * | 2015-06-09 | 2015-09-09 | 北京白鹭时代信息技术有限公司 | Image editing method and apparatus |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11003351B2 (en) * | 2012-12-26 | 2021-05-11 | Gree, Inc. | Display processing method and information device |
-
2016
- 2016-04-11 CN CN201610221414.6A patent/CN105894554B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH08249490A (en) * | 1994-12-26 | 1996-09-27 | Sony Corp | Three-dimensional parameter input device and image processor |
CN102169383A (en) * | 2010-11-26 | 2011-08-31 | 苏州瀚瑞微电子有限公司 | Identification method for rotating gestures of touch screen |
CN103309557A (en) * | 2012-03-06 | 2013-09-18 | 卡西欧计算机株式会社 | Image processing apparatus and image processing method |
CN103246476A (en) * | 2013-04-27 | 2013-08-14 | 华为技术有限公司 | Method, device and terminal device for rotating screen contents |
CN104517305A (en) * | 2013-10-07 | 2015-04-15 | 智仁科技开发股份有限公司 | Matching method of human body clothes fittings |
CN104899911A (en) * | 2015-06-09 | 2015-09-09 | 北京白鹭时代信息技术有限公司 | Image editing method and apparatus |
Also Published As
Publication number | Publication date |
---|---|
CN105894554A (en) | 2016-08-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105894554B (en) | Image processing method and device | |
US11158057B2 (en) | Device, method, and graphical user interface for processing document | |
US8514264B2 (en) | Remote workspace sharing | |
US8286102B1 (en) | System and method for image processing using multi-touch gestures | |
JP6047587B2 (en) | Fan-editing user interface controls for media editing applications | |
CN104375797B (en) | Information processing method and electronic equipment | |
US20130027425A1 (en) | Superimposed annotation output | |
CN106687902B (en) | Image display, visualization and management based on content analysis | |
CN106485164A (en) | A kind of image processing method and mobile terminal | |
CN104967893B (en) | The video generation method and device of mancarried electronic aid | |
CN101833413A (en) | Signal conditioning package, animation method and program | |
CN107005458B (en) | Unscripted digital media message generation method, device, electronic equipment and readable medium | |
JP2016085381A (en) | Encryption method, encryption device and encryption system | |
CN102819386B (en) | The method and apparatus of picture in a kind of display web page | |
Wang et al. | SurfaceSlide: a multitouch digital pathology platform | |
CN106126108A (en) | A kind of breviary map generalization method and mobile terminal | |
CN101315758A (en) | Dynamic display method and system for multi-layer plane graph layer | |
CN101901312A (en) | Password protection method | |
US20110316859A1 (en) | Apparatus and method for displaying images | |
CN104360847A (en) | Method and equipment for processing image | |
CN112965681B (en) | Image processing method, device, equipment and storage medium | |
Patel et al. | Accelerated seam carving for image retargeting | |
US9235575B1 (en) | Systems and methods using a slideshow generator | |
CN105389523A (en) | Information display method | |
CN108614657B (en) | Image synthesis method, device and equipment and image carrier thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |