CN105335067B - A kind of pair of picture carries out the method and device of mosaic processing - Google Patents
A kind of pair of picture carries out the method and device of mosaic processing Download PDFInfo
- Publication number
- CN105335067B CN105335067B CN201510724080.XA CN201510724080A CN105335067B CN 105335067 B CN105335067 B CN 105335067B CN 201510724080 A CN201510724080 A CN 201510724080A CN 105335067 B CN105335067 B CN 105335067B
- Authority
- CN
- China
- Prior art keywords
- picture
- brush
- user
- mosaic
- color
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 32
- 230000015572 biosynthetic process Effects 0.000 claims abstract description 8
- 239000003086 colorant Substances 0.000 claims description 8
- 230000001788 irregular Effects 0.000 claims description 5
- 229910003460 diamond Inorganic materials 0.000 claims description 4
- 239000010432 diamond Substances 0.000 claims description 4
- 238000001514 detection method Methods 0.000 claims description 3
- 238000011084 recovery Methods 0.000 claims description 2
- 230000000694 effects Effects 0.000 abstract description 9
- 239000003973 paint Substances 0.000 abstract 1
- 238000011897 real-time detection Methods 0.000 abstract 1
- 238000005192 partition Methods 0.000 description 7
- 238000010428 oil painting Methods 0.000 description 4
- 239000000463 material Substances 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 241001422033 Thestylus Species 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/04845—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
-
- 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
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Processing Or Creating Images (AREA)
- Image Processing (AREA)
- Studio Circuits (AREA)
Abstract
The invention discloses the method and devices that a kind of pair of picture carries out mosaic processing.The described method includes: according to user instructions, obtaining original image;Slide of the real-time detection user on picture;Obtain preset shape, size and the transparency of brush;It obtains the default fixed-direction of brush or direction is determined by slide of the user on picture;It obtains the default fixed color of brush or color is determined according to slide of the user on picture and image content;It is sequentially formed the brush of corresponding attribute according to slide of the user on picture, and obtains mosaic picture in conjunction with image content.Technical solution provided in an embodiment of the present invention, according to the slide and image content formation mosaic picture of the preset attribute of brush, user on picture, obtain the mosaic picture with stereovision and oil paint effect, increase the aesthetic feeling of mosaic picture, the processing mode of mosaic picture is enriched, the user experience is improved.
Description
Technical Field
The embodiment of the invention relates to a picture processing technology, in particular to a method and a device for carrying out mosaic processing on pictures.
Background
With the continuous development of communication technology, mobile terminals equipped with external or internal cameras are gradually popularized in the life of people, and the requirements of users for taking pictures anytime and anywhere are met, but due to the complexity of shooting scenes, the shot pictures often contain unwanted scenes.
In the prior art, a mosaic processing area selected by a user is divided into a plurality of partitions comprising one pixel point or a plurality of pixel points, then partition color materials are extracted, the colors of the corresponding partitions are replaced by the color materials, or the color materials and the original colors of the pictures of the corresponding partitions are mixed to form the colors of the partitions, as shown in fig. 1 a; the picture of the partition can also be replaced by a specified picture to form a picture mosaic, as shown in fig. 1 b.
The mosaic picture obtained by the prior art has obvious rectangular partition, rigid picture and poor aesthetic feeling.
Disclosure of Invention
The invention provides a method and a device for mosaic processing of pictures, which are used for enriching the processing modes of mosaic pictures.
In a first aspect, an embodiment of the present invention provides a method for performing mosaic processing on a picture, where the method includes:
acquiring an original picture according to a user instruction;
detecting sliding operation of a user on a picture in real time;
acquiring the preset shape, size and transparency of the brush;
acquiring a preset fixed direction of the brush or determining the direction by the sliding operation of a user on a picture;
acquiring a preset fixed color of the brush or determining the color according to the sliding operation of a user on the picture and the content of the picture;
and sequentially forming brushes with corresponding attributes according to the sliding operation of the user on the picture, and obtaining the mosaic picture by combining the picture content.
In a second aspect, an embodiment of the present invention further provides an apparatus for mosaic processing of a picture, where the apparatus includes:
the image acquisition module is used for acquiring an original image according to a user instruction;
the operation detection module is used for detecting the sliding operation of the user on the picture in real time;
the first acquisition module is used for acquiring the preset shape, size and transparency of the brush;
the second acquisition module is used for acquiring a preset fixed direction of the brush or determining the direction by the sliding operation of a user on the picture;
the third acquisition module is used for acquiring a preset fixed color of the brush or determining the color according to the sliding operation of the user on the picture and the picture content;
and the picture generation module is used for sequentially forming brushes with corresponding attributes according to the sliding operation of the user on the picture and obtaining the mosaic picture by combining the picture content.
According to the technical scheme provided by the embodiment of the invention, the brush with the corresponding attributes is sequentially formed according to the sliding operation of the user on the picture by acquiring the preset shape, size, transparency, direction and color attributes of the brush, and the mosaic picture is obtained by combining the picture content, so that the mosaic picture with the layering effect and the oil painting effect is obtained, the aesthetic feeling of the mosaic picture is increased, the processing mode of the mosaic picture is enriched, and the user experience is improved.
Drawings
Fig. 1a and 1b are mosaic pictures in the prior art;
fig. 2a is a schematic flowchart of a method for mosaic processing of a picture according to a first embodiment of the present invention;
fig. 2b and fig. 2c are mosaic images according to a first embodiment of the present invention;
fig. 3 is a flowchart illustrating a method for mosaic processing of a picture according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of an apparatus for mosaic processing of pictures according to a third embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 2a is a flowchart illustrating a method for mosaic processing of a picture according to a first embodiment of the present invention. The present embodiment can be applied in the following scenarios: the user wants to mosaic the picture. The method can be executed by a device for mosaic processing of pictures, wherein the device is realized by software and/or hardware and is configured in the mobile terminal. The mobile terminal can be a mobile electronic device such as a smart phone, a tablet computer and a notebook computer.
Referring to fig. 2a, the method for mosaic processing of pictures may specifically include:
step 101, acquiring an original picture according to a user instruction;
and opening and displaying the picture selected by the user on a screen according to an opening instruction input by the user, and acquiring the picture as an original picture of the mosaic processing operation.
Step 102, detecting sliding operation of a user on a picture in real time;
in this embodiment, the mobile terminal has a touch function, and a user can slide on a touch screen of the mobile terminal by using a finger or a touch pen, so as to control a current picture displayed on the touch screen. When the mobile terminal detects that the finger of the user or the pen point of the touch pen moves to a certain position, a pen brush with corresponding attributes is formed at the position, and in order to realize the operation, the mobile terminal detects the sliding operation of the user on the picture in real time.
103, acquiring the preset shape, size and transparency of the brush;
before the mosaic operation is carried out, the mobile terminal acquires the preset shape, size and transparency attribute of the brush, wherein the preset shape of the brush comprises but is not limited to a round shape, a rectangular shape, a diamond shape, a triangular shape, a trapezoidal shape or an irregular shape at one end, and specifically, the irregular shape at one end can enable the formed mosaic picture to display the feeling of strokes, so that the oil painting effect is improved.
104, acquiring a preset fixed direction of the brush or determining the direction by the sliding operation of a user on a picture;
further, the acquiring a preset fixed direction of the brush or determining the direction by a sliding operation of the user on the picture includes:
acquiring a direction selected by a user in the to-be-selected item as a direction of the brush; or,
acquiring the current sliding operation direction of a user on a picture as the direction of a corresponding brush; or,
and acquiring the direction of the current sliding operation direction of the user on the picture and the direction after the superposition of the preset disturbance angle as the direction of the corresponding brush.
Among them, the directions selected by the user among the candidate items include directions having common special angles, for example, 45 °, 90 ° and 270 ° from the horizontal direction, and fixed angle directions input by the user in the input field according to personal preference. In this embodiment, the direction of the brush may also be determined according to the current sliding operation direction of the user on the picture, specifically, the current sliding operation direction is used to determine the direction in which the brush is formed at the current time, and the direction in which the brush is formed at the next time is determined by the sliding operation direction at the next time. In order to avoid the formed mosaic picture from being too rigid, a user preset angle can be superimposed on the sliding operation direction of the user to determine the direction of the brush.
105, acquiring a preset fixed color of the brush or determining the color according to the sliding operation of the user on the picture and the picture content;
further, the acquiring a preset fixed color of the brush or determining a color according to a sliding operation of the user on the picture and the picture content includes:
acquiring the color selected by the user in the to-be-selected item as the color of the brush; or,
acquiring the color of a middle pixel point of a contact area between a user finger or a touch pen nib and a picture at the starting point of each brush as the color of the corresponding brush; or,
and acquiring the color cluster of all pixel points in the contact area of the pen point of the user or the touch pen of each brush forming starting point and the picture to determine the color of the corresponding brush.
The brush color obtained by the mobile terminal comprises a fixed color preset by a user or a color determined according to the sliding operation of the user on the picture and the picture content, wherein when the color is determined according to the sliding operation of the user on the picture and the picture content, the color of the contact position of the user finger or the touch pen nib and the picture is required to be obtained once when each brush is formed and is used as the color of the brush. Specifically, the contact position between the pen point of the user finger or the touch pen and the picture comprises more than one pixel point, and the color of the brush can be determined according to the color of the central pixel point at the contact position or the color cluster of all the pixel points. It should be noted that, for determining the brush color according to all the pixel point color clusters, the color with the largest proportion in the clustering result is selected as the color of the brush.
And 106, sequentially forming brushes with corresponding attributes according to the sliding operation of the user on the picture, and obtaining the mosaic picture by combining the picture content.
When the mobile terminal detects that a finger or a touch pen of a user slides to a certain position, a brush is formed at the position according to the shape, the size, the transparency and the direction of the obtained brush, a local mosaic picture of a region corresponding to the current brush is formed by combining the picture color of the position of the pen point of the finger or the touch pen of the user, and a plurality of brushes are sequentially formed according to the mode to obtain the mosaic picture. It should be noted that the attribute of the subsequent brush is obtained based on the local mosaic picture of the corresponding region of the previous brush, for example, when the mobile terminal detects that the finger or the stylus of the user slides to a certain position on the previous brush, the subsequent brush is formed, and for the case that the color of the brush is determined according to the sliding operation of the user on the picture and the picture content, the color of the subsequent brush is determined by the current time color at the position where the previous brush is formed, which is different from the original picture.
Fig. 2b and fig. 2c are mosaic images according to a first embodiment of the present invention. The mosaic images in fig. 2b and fig. 2c are obtained by using the method for mosaic processing of images according to the embodiment of the present invention, and it can be seen that both images have strong layering. In fig. 2b, the character is highlighted and becomes the central content of the whole screen, so in practical application, the main content of the picture can be highlighted by the method for mosaicing the picture provided by the present invention.
According to the technical scheme provided by the embodiment of the invention, the brush with the corresponding attributes is sequentially formed according to the sliding operation of the user on the picture by acquiring the preset shape, size, transparency, direction and color attributes of the brush, and the mosaic picture is obtained by combining the picture content, so that the mosaic picture with the layering effect and the oil painting effect is obtained, the aesthetic feeling of the mosaic picture is increased, the processing mode of the mosaic picture is enriched, and the user experience is improved.
Example two
Based on the first embodiment, the present embodiment further describes a specific process of sequentially forming brushes with corresponding attributes according to a sliding operation of a user on a picture and obtaining a mosaic picture by combining picture contents.
Fig. 3 is a flowchart illustrating a method for mosaic processing of a picture according to a second embodiment of the present invention. As shown in fig. 3, the method may specifically include:
step 201, acquiring an original picture according to a user instruction;
step 202, detecting the sliding operation of a user on a picture in real time;
step 203, acquiring the preset shape, size and transparency of the brush;
step 204, acquiring a preset fixed direction of the brush or determining the direction by the sliding operation of a user on a picture;
step 205, acquiring a preset fixed color of the brush or a color determined according to the sliding operation of the user on the picture and the content of the picture;
step 206, detecting that a finger or a touch pen of a user is in contact with the picture, and determining that one mosaic operation starts;
the mosaic picture is formed by multiple mosaic operations of the user, and in the embodiment, the mosaic operation corresponding to one continuous track of the user on the picture is defined as a complete mosaic operation, so that the mobile terminal determines that one mosaic operation starts when detecting that a finger or a stylus pen point of the user is in contact with the picture.
Step 207, when detecting that the distance between the pen point of the user finger or the touch pen and the formation starting point of the previous brush is greater than a threshold value, forming the current brush;
the threshold is adjusted according to the size of the original picture, and the larger the size of the original picture is, the larger the threshold is; the smaller the size of the original picture is, the smaller the threshold value is, and the purpose is to ensure that the brush can be uniformly distributed on the picture, so that the condition that the distribution is too dense or too sparse is avoided.
Step 208, mixing the formed brush color with the current color of the corresponding area of the picture;
in this embodiment, the brush is not simply overlaid on the picture, but the color of the brush is mixed with the current color of the corresponding area of the picture to obtain a local mosaic picture.
Step 209, sequentially forming a plurality of brush brushes along with the sliding operation of the user according to the above manner, and determining that one mosaic operation is finished when detecting that the finger or the touch pen of the user is separated from the picture;
and step 210, forming a mosaic picture after at least one mosaic operation is finished.
The process of forming the mosaic picture may include one or more mosaic operations, which are adjusted according to the content to be masked in the original picture and the requirement of the user on the display effect of the mosaic picture, and it should be noted that the brush brushes formed by any two mosaic operations may have an overlapping portion, and the attribute of the brush used by any two mosaic operations may be changed. For example, the brush attribute used for the first mosaic operation is: a square with a side length of 6mm, an angle of 45 degrees with the horizontal direction, water red, a transparency of 50%, and a brush attribute used in the second mosaic operation may be: a rectangle with the length of 6mm and the width of 4mm, an angle of 60 degrees with the horizontal direction, wine red color and transparency of 40 percent.
Further, after the mosaic picture is formed, the method further includes:
and canceling the last mosaic operation according to the user instruction.
When the user is not satisfied with the result of the last mosaic operation, the mobile terminal can cancel the last mosaic operation through the cancel instruction.
Further, after the mosaic picture is formed, the method further includes:
and recovering the mosaic picture in the area corresponding to the sliding operation to the original picture according to the user instruction and the sliding operation.
In the embodiment, an eraser function is set, a user can select an area needing to remove the mosaic effect through sliding of a finger or a pen point of a touch pen, and after the area is determined, the mobile terminal restores the mosaic picture in the area to the original picture.
According to the technical scheme provided by the embodiment of the invention, one-time mosaic operation is realized according to the user sliding operation with continuous brush attributes and tracks and the picture content, and the mosaic picture is formed by combining multiple mosaic operations, so that the mosaic picture with layering and oil painting effects is obtained, the aesthetic feeling of the mosaic picture is increased, the processing mode of the mosaic picture is enriched, and the user experience is improved.
EXAMPLE III
Fig. 4 is a schematic structural diagram of an apparatus for mosaic processing of pictures according to a third embodiment of the present invention. Referring to fig. 4, the specific structure of the apparatus for mosaic processing of pictures may be as follows:
the picture acquisition module 301 is configured to acquire an original picture according to a user instruction;
an operation detection module 302, configured to detect a sliding operation of a user on a picture in real time;
a first obtaining module 303, configured to obtain a preset shape, size, and transparency of the brush;
a second obtaining module 304, configured to obtain a preset fixed direction of the brush or a direction determined by a sliding operation of a user on a picture;
a third obtaining module 305, configured to obtain a preset fixed color of the brush or a color determined according to a sliding operation of a user on a picture and a content of the picture;
and the picture generation module 306 is configured to sequentially form brushes with corresponding attributes according to sliding operations of the user on the picture, and obtain a mosaic picture by combining picture contents.
Specifically, the preset shape of the brush may include a circular shape, a rectangular shape, a diamond shape, a triangular shape, a trapezoidal shape, or an irregular shape at one end.
In this embodiment, the second obtaining module may be configured to:
acquiring a direction selected by a user in the to-be-selected item as a direction of the brush; or,
acquiring the current sliding operation direction of a user on a picture as the direction of a corresponding brush; or,
and acquiring the direction of the current sliding operation direction of the user on the picture and the direction after the superposition of the preset disturbance angle as the direction of the corresponding brush.
In this embodiment, the third obtaining module may be configured to:
acquiring the color selected by the user in the to-be-selected item as the color of the brush; or,
acquiring the color of a middle pixel point of a contact area between a user finger or a touch pen nib and a picture at the starting point of each brush as the color of the corresponding brush; or,
and acquiring the color cluster of all pixel points in the contact area of the pen point of the user or the touch pen of each brush forming starting point and the picture to determine the color of the corresponding brush.
Illustratively, the picture generation module may include:
the starting determining unit is used for detecting that a finger or a touch pen of a user is in contact with the picture and determining that one-time mosaic operation starts;
the brush forming unit is used for forming the current brush when detecting that the distance between the pen point of the user finger or the touch pen and the forming starting point of the previous brush is greater than a threshold value;
the color mixing unit is used for mixing the formed brush color with the current color of the corresponding area of the picture;
the end determining unit is used for sequentially forming a plurality of brush brushes along with the sliding operation of the user according to the mode until the finger or the touch pen of the user is detected to be separated from the picture, and determining that the mosaic operation is ended;
and the picture forming unit is used for forming the mosaic picture after at least one mosaic operation is finished.
Further, the apparatus may further include:
and the operation canceling module is used for canceling the latest mosaic operation according to the user instruction after the mosaic picture is formed.
Further, the apparatus may further include:
and the picture recovery module is used for recovering the mosaic picture in the area corresponding to the sliding operation to the original picture according to the user instruction and the sliding operation after the mosaic picture is formed.
The device for mosaic processing of pictures provided by this embodiment of the present invention is the same as the method for mosaic processing of pictures provided by any embodiment of the present invention, and can execute the method for mosaic processing of pictures provided by any embodiment of the present invention. For details of the technique not described in detail in this embodiment, reference may be made to the process of mosaic processing for pictures provided in any embodiment of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (14)
1. A method for mosaic processing of pictures, comprising:
acquiring an original picture according to a user instruction;
detecting sliding operation of a user on a picture in real time;
acquiring the preset shape, size and transparency of the brush;
acquiring a preset fixed direction of the brush or determining the direction by the sliding operation of a user on a picture;
determining color according to sliding operation of a user on the picture and picture content at a brush forming starting point;
sequentially forming brushes with corresponding attributes according to sliding operation of a user on a picture, and obtaining a mosaic picture by combining picture contents, wherein the step of obtaining the mosaic picture by combining the picture contents comprises mixing the colors of the formed brushes with the colors of pictures in a region corresponding to the brushes to obtain the mosaic picture;
accordingly, determining the color according to the sliding operation of the user on the picture and the picture content at the starting point of the brush formation comprises:
and if the starting point of the brush formation of the latter brush is the end point of the brush of the former brush, the color of the brush of the latter brush is obtained based on the local mosaic picture of the corresponding region of the brush end point of the former brush.
2. The method of claim 1, wherein the predetermined shape of the brush comprises a circle, a rectangle, a diamond, a triangle, a trapezoid, or a shape with an irregular end.
3. The method according to claim 1, wherein the obtaining of the preset fixed direction of the brush or the determination of the direction by a sliding operation of a user on a picture comprises:
acquiring a direction selected by a user in the to-be-selected item as a direction of the brush; or,
acquiring the current sliding operation direction of a user on a picture as the direction of a corresponding brush; or,
and acquiring the direction of the current sliding operation direction of the user on the picture and the direction after the superposition of the preset disturbance angle as the direction of the corresponding brush.
4. The method according to claim 1, wherein the determining the color according to the sliding operation of the user on the picture and the picture content at the starting point of the brush formation comprises:
acquiring the color of a middle pixel point of a contact area between a user finger or a touch pen nib and a picture at the starting point of each brush as the color of the corresponding brush; or,
and acquiring the color cluster of all pixel points in the contact area of the pen point of the user or the touch pen of each brush forming starting point and the picture to determine the color of the corresponding brush.
5. The method according to claim 1, wherein the sequentially forming brushes with corresponding attributes according to the sliding operation of the user on the picture and obtaining the mosaic picture in combination with the picture content comprises:
detecting that a finger or a touch pen of a user is in contact with the picture, and determining that one-time mosaic operation starts;
when detecting that the distance between the pen point of the finger or the touch pen of the user and the formation starting point of the previous brush is greater than a threshold value, forming the current brush;
mixing the formed brush color with the current color of the corresponding area of the picture;
sequentially forming a plurality of brush brushes along with the sliding operation of the user according to the mode until the finger or the touch pen of the user is detected to be separated from the picture, and determining that the mosaic operation is finished;
and forming the mosaic picture after at least one mosaic operation is finished.
6. The method of claim 5, wherein after the forming the mosaic picture, further comprising:
and canceling the last mosaic operation according to the user instruction.
7. The method of claim 5, wherein after the forming the mosaic picture, further comprising:
and recovering the mosaic picture in the area corresponding to the sliding operation to the original picture according to the user instruction and the sliding operation.
8. An apparatus for mosaic processing of pictures, comprising:
the image acquisition module is used for acquiring an original image according to a user instruction;
the operation detection module is used for detecting the sliding operation of the user on the picture in real time;
the first acquisition module is used for acquiring the preset shape, size and transparency of the brush;
the second acquisition module is used for acquiring a preset fixed direction of the brush or determining the direction by the sliding operation of a user on the picture;
the third acquisition module is used for determining the color according to the sliding operation of the user on the picture and the picture content at the starting point of the brush formation;
the picture generation module is used for sequentially forming brush brushes with corresponding attributes according to sliding operation of a user on the picture and obtaining the mosaic picture by combining picture contents, wherein the step of obtaining the mosaic picture by combining the picture contents comprises the step of mixing colors of the formed brush brushes with the picture colors of the corresponding areas of the brush brushes to obtain the mosaic picture;
correspondingly, the third obtaining module is specifically configured to:
and if the starting point of the brush formation of the latter brush is the end point of the brush of the former brush, the color of the brush of the latter brush is obtained based on the local mosaic picture of the corresponding region of the brush end point of the former brush.
9. The device of claim 8, wherein the predetermined shape of the brush comprises a circular, rectangular, diamond, triangular, trapezoidal, or irregular shape at one end.
10. The apparatus of claim 8, wherein the second obtaining module is specifically configured to:
acquiring a direction selected by a user in the to-be-selected item as a direction of the brush; or,
acquiring the current sliding operation direction of a user on a picture as the direction of a corresponding brush; or,
and acquiring the direction of the current sliding operation direction of the user on the picture and the direction after the superposition of the preset disturbance angle as the direction of the corresponding brush.
11. The apparatus of claim 8, wherein the third obtaining module is specifically configured to:
acquiring the color of a middle pixel point of a contact area between a user finger or a touch pen nib and a picture at the starting point of each brush as the color of the corresponding brush; or,
and acquiring the average value of the colors of all pixel points in the contact area between the pen point of the user or the touch pen at the starting point of each brush and the picture as the color of the corresponding brush.
12. The apparatus of claim 8, wherein the picture generation module comprises:
the starting determining unit is used for detecting that a finger or a touch pen of a user is in contact with the picture and determining that one-time mosaic operation starts;
the brush forming unit is used for forming the current brush when detecting that the distance between the pen point of the user finger or the touch pen and the forming starting point of the previous brush is greater than a threshold value;
the color mixing unit is used for mixing the formed brush color with the current color of the corresponding area of the picture;
the end determining unit is used for sequentially forming a plurality of brush brushes along with the sliding operation of the user according to the mode until the finger or the touch pen of the user is detected to be separated from the picture, and determining that the mosaic operation is ended;
and the picture forming unit is used for forming the mosaic picture after at least one mosaic operation is finished.
13. The apparatus of claim 12, further comprising:
and the operation canceling module is used for canceling the latest mosaic operation according to the user instruction after the mosaic picture is formed.
14. The apparatus of claim 12, further comprising:
and the picture recovery module is used for recovering the mosaic picture in the area corresponding to the sliding operation to the original picture according to the user instruction and the sliding operation after the mosaic picture is formed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510724080.XA CN105335067B (en) | 2015-10-29 | 2015-10-29 | A kind of pair of picture carries out the method and device of mosaic processing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510724080.XA CN105335067B (en) | 2015-10-29 | 2015-10-29 | A kind of pair of picture carries out the method and device of mosaic processing |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105335067A CN105335067A (en) | 2016-02-17 |
CN105335067B true CN105335067B (en) | 2019-03-08 |
Family
ID=55285653
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510724080.XA Expired - Fee Related CN105335067B (en) | 2015-10-29 | 2015-10-29 | A kind of pair of picture carries out the method and device of mosaic processing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105335067B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106910232A (en) * | 2017-02-24 | 2017-06-30 | 青岛海信电器股份有限公司 | Line drawing eraser removes method and device |
CN109271089A (en) * | 2018-09-14 | 2019-01-25 | 天津字节跳动科技有限公司 | Picture code printing method and device |
CN111679782B (en) * | 2020-06-10 | 2021-08-31 | 腾讯科技(深圳)有限公司 | Erasing method and related device |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20110043825A (en) * | 2009-10-22 | 2011-04-28 | 김상국 | Lotus leaves art business model |
CN102930289B (en) * | 2012-09-28 | 2015-05-06 | 清华大学 | Method for generating mosaic picture |
CN104299186A (en) * | 2014-09-30 | 2015-01-21 | 珠海市君天电子科技有限公司 | Method and device for conducting mosaic processing on picture |
-
2015
- 2015-10-29 CN CN201510724080.XA patent/CN105335067B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN105335067A (en) | 2016-02-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108932053B (en) | Drawing method and device based on gestures, storage medium and computer equipment | |
CN110100251B (en) | Apparatus, method, and computer-readable storage medium for processing document | |
KR101773488B1 (en) | Method for displaying interface content and user equipment | |
US20140118483A1 (en) | Smart targets facilitating the capture of contiguous images | |
CN109766053A (en) | Method for displaying user interface, device, terminal and storage medium | |
CN107844228A (en) | Message display method, device and terminal | |
US10554803B2 (en) | Method and apparatus for generating unlocking interface, and electronic device | |
KR20130088104A (en) | Mobile apparatus and method for providing touch-free interface | |
CN107145280B (en) | Image data processing method and device | |
US20130314489A1 (en) | Information processing apparatus, information processing system and information processing method | |
CN108984094B (en) | Switch method, apparatus, terminal device and the storage medium of global special efficacy | |
CN105335067B (en) | A kind of pair of picture carries out the method and device of mosaic processing | |
US20120139827A1 (en) | Method and apparatus for interacting with projected displays using shadows | |
CN103793146A (en) | Method and device for processing images | |
CN106791574A (en) | Video labeling method, device and video conferencing system | |
WO2020200255A1 (en) | Erase control processing method, apparatus, and device | |
CN112911147A (en) | Display control method, display control device and electronic equipment | |
CN112162803A (en) | Message display method and device and electronic equipment | |
CN105407313A (en) | Video calling method, equipment and system | |
CN114816135A (en) | Cross-device drawing system | |
CN106326476B (en) | Information processing method and device | |
US20230386162A1 (en) | Virtual action center based on segmented video feed for a video communication session | |
CN114327140B (en) | Screen touch method, device, system, equipment and storage medium | |
WO2017198092A1 (en) | Touch feedback method and apparatus, and terminal | |
CN113741775A (en) | Image processing method and device and electronic 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 | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20190308 Termination date: 20191029 |