CN111195912B - Method and device for drawing portrait by using mechanical arm, robot and storage medium - Google Patents

Method and device for drawing portrait by using mechanical arm, robot and storage medium Download PDF

Info

Publication number
CN111195912B
CN111195912B CN202010016499.0A CN202010016499A CN111195912B CN 111195912 B CN111195912 B CN 111195912B CN 202010016499 A CN202010016499 A CN 202010016499A CN 111195912 B CN111195912 B CN 111195912B
Authority
CN
China
Prior art keywords
stroke
drawing priority
region
area
dividing
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
CN202010016499.0A
Other languages
Chinese (zh)
Other versions
CN111195912A (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.)
Advanced Institute of Information Technology AIIT of Peking University
Hangzhou Weiming Information Technology Co Ltd
Original Assignee
Advanced Institute of Information Technology AIIT of Peking University
Hangzhou Weiming Information Technology 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 Advanced Institute of Information Technology AIIT of Peking University, Hangzhou Weiming Information Technology Co Ltd filed Critical Advanced Institute of Information Technology AIIT of Peking University
Priority to CN202010016499.0A priority Critical patent/CN111195912B/en
Publication of CN111195912A publication Critical patent/CN111195912A/en
Application granted granted Critical
Publication of CN111195912B publication Critical patent/CN111195912B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1656Programme controls characterised by programming, planning systems for manipulators
    • B25J9/1664Programme controls characterised by programming, planning systems for manipulators characterised by motion, path, trajectory planning
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J11/00Manipulators not otherwise provided for
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1602Programme controls characterised by the control system, structure, architecture
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1602Programme controls characterised by the control system, structure, architecture
    • B25J9/161Hardware, e.g. neural networks, fuzzy logic, interfaces, processor

Landscapes

  • Engineering & Computer Science (AREA)
  • Robotics (AREA)
  • Mechanical Engineering (AREA)
  • Automation & Control Theory (AREA)
  • Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Manipulator (AREA)

Abstract

The application discloses a method and a device for drawing portrait by using a mechanical arm, a robot and a storage medium, wherein the method comprises the following steps: dividing a binary image corresponding to a portrait picture to be drawn into a plurality of areas; the plurality of regions are subjected to drawing priority sequencing to obtain a region drawing priority sequence; dividing each region into a plurality of communicating regions, wherein each communicating region corresponds to one stroke; drawing priority ordering is carried out on the plurality of communication areas to obtain a stroke drawing priority order; and controlling the mechanical arm to finish the drawing of the portrait according to the region drawing priority sequence and the stroke drawing priority sequence. According to the method, the mechanical arm is controlled to draw according to the region drawing priority sequence and the stroke drawing priority sequence, the region drawing priority sequence and the stroke drawing priority sequence are very close to the drawing sequence of a real painter, and the pen carrying sequence of the mechanical arm drawing is made to be highly close to the pen carrying sequence of the real painter drawing.

Description

Method and device for drawing portrait by using mechanical arm, robot and storage medium
Technical Field
The application relates to the technical field of computers, in particular to a method and a device for drawing a portrait painting by using a mechanical arm, a robot and a storage medium.
Background
Along with the development and progress of science and technology, computer technology and artificial intelligence technology have developed rapidly, and the application field of intelligent robot is more and more extensive, has also widely used intelligent robot in the life, and the robot that draws is carried out to control the painting brush through the arm also receives people's general welcome.
At present, robot drawing tracks are mostly drawn in a disordered manner or in a manner of line-by-line printing of pixel points, and the pen-off sequence of the drawing process is completely different from the pen-off sequence of a real person painter in the drawing process. How to realize drawing the figure simple pen portrait painting according to the human-simulated path through the mechanical arm for the lower order of robot drawing highly approaches the lower order of real person painter drawing, becomes the technical problem that awaits solution urgently.
Disclosure of Invention
The application aims to provide a new technical scheme for drawing a portrait painting by using a mechanical arm. The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview and is intended to neither identify key/critical elements nor delineate the scope of such embodiments. Its sole purpose is to present some concepts in a simplified form as a prelude to the more detailed description that is presented later.
According to an aspect of an embodiment of the present application, there is provided a method of drawing a portrait painting using a robot arm, including:
dividing a binary image corresponding to a portrait picture to be drawn into a plurality of areas;
the plurality of regions are subjected to drawing priority sequencing to obtain a region drawing priority sequence;
dividing each region into a plurality of communicating regions, wherein each communicating region corresponds to one stroke;
drawing priority ordering is carried out on the plurality of communication areas to obtain a stroke drawing priority order;
and controlling the mechanical arm to finish the drawing of the portrait according to the region drawing priority sequence and the stroke drawing priority sequence.
Further, the dividing each of the regions into a plurality of connected regions, each of the connected regions corresponding to a stroke, includes:
classifying strokes in each region into first-class strokes and second-class strokes; the first type of strokes are strokes formed by one stroke; the second type of stroke is a stroke formed by two or more strokes with a cross point;
dividing the first type of strokes into a communication area;
and cutting the second type of strokes into a plurality of strokes, and then dividing the plurality of strokes into different communication areas respectively.
Further, the dividing each of the regions into a plurality of communication areas includes: comparing the stroke in each region with a preset threshold value, and if the stroke length is not greater than the preset threshold value, directly dividing the stroke into a communication region; if the stroke length is larger than a preset threshold value, dividing the stroke into a plurality of communication areas after segmentation.
Further, the performing drawing priority ordering on the plurality of communication areas to obtain a stroke drawing priority order includes:
calculating the area of each communication area and the corresponding stroke starting point coordinate;
normalizing the area and the stroke starting point coordinate;
carrying out weighted summation on the normalized area and the normalized stroke starting point coordinate;
and sequencing the values obtained by weighted summation, and determining the drawing priority order of each communication area.
Further, the performing drawing priority ordering on the plurality of communication areas to obtain a stroke drawing priority order includes:
and determining the drawing priority order of each communication area according to the priority order from left to right in position, from top to bottom or from large to small in area.
Further, the performing drawing priority ordering on the plurality of communication areas to obtain a stroke drawing priority order includes:
establishing a rectangular coordinate system, acquiring the area of each communication area or the corresponding stroke starting point coordinate according to the rectangular coordinate system, and determining the drawing priority order of each communication area according to the area of each communication area or the corresponding stroke starting point coordinate.
Further, each of the connected regions corresponds to a stroke, and the method includes:
each of the communication areas is a stroke; and/or
Each of the connected regions includes a stroke and a region within a predetermined range around the stroke.
According to another aspect of the embodiments of the present application, there is provided an apparatus for drawing a portrait using a robot arm, including:
the segmentation module is used for segmenting the binary image corresponding to the portrait picture to be drawn into a plurality of areas;
the first sequencing module is used for sequencing the drawing priorities of the plurality of areas to obtain an area drawing priority sequence;
the dividing module is used for dividing each region into a plurality of communicating regions, and each communicating region corresponds to one stroke;
the second sequencing module is used for sequencing drawing priorities of the communication areas to obtain a stroke drawing priority sequence;
and the control module is used for controlling the mechanical arm to finish the portrait drawing according to the region drawing priority sequence and the stroke drawing priority sequence.
According to another aspect of the embodiments of the present application, there is provided a painting robot including a processor, a communication device, and a robot arm, the processor being capable of executing the above-mentioned method of painting a portrait using the robot arm.
According to another aspect of embodiments of the present application, there is provided a computer-readable storage medium having a computer program stored thereon, the program being executed by a processor to implement the above-mentioned method for drawing a portrait using a robot arm.
The technical scheme provided by one aspect of the embodiment of the application can have the following beneficial effects:
the method for drawing the portrait painting by using the mechanical arm can control the mechanical arm to draw according to the region drawing priority sequence and the stroke drawing priority sequence, wherein the region drawing priority sequence and the stroke drawing priority sequence are very close to the drawing sequence of a real painter, so that the pen moving sequence of the mechanical arm drawing is highly close to the pen moving sequence of the real painter drawing.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the application, or may be learned by the practice of the embodiments. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 illustrates a flow diagram of a method of drawing a portrait using a robotic arm according to an embodiment of the present application;
FIG. 2 is a block diagram illustrating the configuration of an apparatus for drawing a portrait using a robotic arm according to one embodiment of the present application;
FIG. 3 illustrates a flow chart of a method of drawing a portrait using a robotic arm according to another embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is further described with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It will be understood by those within the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
As shown in fig. 1, one embodiment of the present application provides a method of drawing a portrait using a robotic arm, comprising:
and S1, dividing the binary image corresponding to the portrait to be drawn into a plurality of areas.
For example, the binary image may be an input target person simple stroke portrait; the simple strokes are generally formed by simple lines; dividing the target person simple stroke portrait according to organs and wearing objects, for example, dividing the target person simple stroke portrait into a plurality of areas such as a face, a right eyebrow, a left eyebrow, a right eye, a left eye, glasses, a right ear, a left ear, an earring, a nose, a mouth (oral cavity), an upper lip, a lower lip, a neck, a necklace, clothes, hair, a hat and the like;
and S2, carrying out drawing priority sequencing on the plurality of areas to obtain an area drawing priority sequence.
For example, numbering each region, and prioritizing each region as hat > hair > facial contour > left ear > right ear > left eyebrow > right eyebrow > eye > nose > mouth > other regions, then ranking the numbers of the corresponding regions in the order of priority;
and S3, dividing each area into a plurality of connected areas, wherein each connected area corresponds to a single stroke.
In some embodiments, each of the connected regions is a single stroke, i.e., a stroke is directly used as a connected region.
In some embodiments, each connected region contains a single stroke, and the connected region further includes a region within a predetermined range around the stroke; for example, the connected region may be preset as a region formed by points with a minimum value of 0.5mm from each point on the stroke, and the specific preset range may be adjusted and set according to the needs of practical application; if the connected region is preset as a region constituted by points whose minimum value from each point on the stroke is 0, one stroke is a connected region.
In some embodiments, each of said connected regions corresponds to a stroke, comprising:
each of the communication areas is a stroke; and/or
Each of the connected regions includes a stroke and a region within a predetermined range around the stroke.
In some embodiments, the dividing each of the regions into a plurality of communication areas includes: when the connected regions are divided, comparing the stroke in each region with a preset threshold value, and if the stroke length is not greater than the preset threshold value, directly dividing the stroke into one connected region; if the stroke length is larger than the preset threshold value, the stroke is divided into a plurality of strokes, and the plurality of strokes obtained after division are divided into a plurality of communication areas.
In certain embodiments, step S3 includes:
s31, classifying the strokes in each region into a first type of strokes and a second type of strokes; the first type of strokes are strokes formed by one stroke; the second type of stroke is a stroke formed by two or more strokes with a cross point;
s32, dividing the first type of strokes into a communication area;
s33, cutting the second type of strokes into a plurality of strokes, and then dividing the plurality of strokes into different communication areas respectively.
And S4, carrying out drawing priority sequencing on the plurality of communication areas to obtain a stroke drawing priority sequence.
In certain embodiments, step S4 includes:
s41, calculating the area of each communication area and the corresponding stroke starting point coordinate; in some embodiments, the area of the connected region is the area occupied by the strokes of the connected region;
s42, normalizing the area and the stroke starting point coordinates, and then performing weighted summation on the normalized area and the normalized stroke starting point coordinates;
for example, a rectangular coordinate system is established with the upper left corner of the canvas as the origin; configuring different weights for the normalized area and the normalized stroke starting point coordinate respectively; the formula of weighted summation is Sum ═ α S + β d; wherein alpha and beta are respectively the normalized area and the normalized weight of the stroke starting point coordinate;
and S43, sorting the values obtained by weighted summation, and determining the drawing priority order of each communication area.
In certain embodiments, step S4 includes:
and determining the drawing priority order of each communication area according to the priority order from left to right in position, from top to bottom or from large to small in area. And establishing a rectangular coordinate system by taking the upper left corner or the lower right corner of the canvas or the drawing paper as an origin, acquiring the area of each communication area or the corresponding stroke starting point coordinate according to the rectangular coordinate system, and determining the drawing priority order of each communication area according to the area of each communication area or the corresponding stroke starting point coordinate.
In some embodiments, for more complicated parts such as the left eye, the right eye, the glasses, the mouth, and the like, because the stroke structures are relatively complicated, after the parts are divided into different communication areas, the artificial drawing sequence of each stroke of the complicated parts (the artificial drawing sequence is the drawing sequence of each stroke when the painter draws the complicated parts) is obtained through a deep learning algorithm, and then the communication areas of the complicated parts are made into the drawing priority sequence according to the drawing sequence.
And S5, controlling the mechanical arm to move the painting brush according to the region drawing priority sequence and the stroke drawing priority sequence to finish the drawing of the portrait painting.
As shown in fig. 2, the present embodiment also provides an apparatus for drawing a portrait using a robot arm, including:
the segmentation module 100 is configured to segment a binary image corresponding to a portrait to be drawn into a plurality of regions;
a first ordering module 200, configured to perform drawing priority ordering on the plurality of regions, so as to obtain a region drawing priority order;
a dividing module 300, configured to divide each of the regions into a plurality of connected regions, where each of the connected regions corresponds to one stroke;
a second sorting module 400, configured to sort the rendering priorities of the connected regions to obtain a stroke rendering priority order;
and the control module 500 is used for controlling the mechanical arm to finish the portrait drawing according to the region drawing priority sequence and the stroke drawing priority sequence.
The embodiment also provides a painting robot, which comprises a processor, a communication device and a mechanical arm, wherein the processor can execute the method for drawing the portrait painting by using the mechanical arm.
The present embodiment also provides a computer-readable storage medium having a computer program stored thereon, the program being executed by a processor to implement the method for drawing a portrait using a robot arm as described above.
The method for drawing the portrait painting by using the mechanical arm can simulate the pen-carrying track drawing of a real-person painter, the mechanical arm is controlled to draw according to the region drawing priority sequence and the stroke drawing priority sequence, and the region drawing priority sequence and the stroke drawing priority sequence are extremely close to the drawing sequence of the real-person painter, so that the pen-carrying sequence of the mechanical arm drawing is highly approximate to the pen-carrying sequence of the real-person painter drawing.
As shown in fig. 3, an embodiment of the present application provides a method of drawing a portrait using a robot arm, including:
A1. face analysis and segmentation: and dividing the target character simple stroke portrait painting according to regions of five sense organs and the like.
Specifically, the target person simple stroke portrait painting is divided according to areas such as a face, a right eyebrow, a left eyebrow, a right eye, a left eye, glasses, a right ear, a left ear, earrings, a nose, a mouth (oral cavity), an upper lip, a lower lip, a neck, a necklace, clothes, hair, a hat and the like, and an image of the corresponding area is generated. In a specific implementation, the drawing order of each stroke is determined based on the principle of left-to-right, top-to-bottom and big-to-small as a whole according to the common habit of the painter.
A human face analyzing step: the target face image is divided according to the areas of the face, the right eyebrow, the left eyebrow, the right eye, the left eye, the glasses, the right ear, the left ear, the earrings, the nose, the mouth (oral cavity), the upper lip, the lower lip, the neck, the necklace, clothes, hair, a hat and the like through a deep learning method, and area pictures with labels are respectively obtained.
A2. Human-simulated sequencing of the drawing area: and sequencing the obtained area tracks according to the common artist custom sequence.
A3. Generating a drawing track: and generating a drawing track according to the stroke sequence obtained by A2.
Basic drawing sequence based on face structure: the regions of the face image are divided according to the face analysis (matching) result obtained in a2, and the drawing order of each region is determined according to the common habit of the painter. In a specific implementation case, the priority of each region is to be determined as: hat > hair > facial contour > left ear > right ear > left eyebrow > left eye > right eyebrow > glasses > nose > mouth > other areas.
Aiming at the left eye, the right eye, the glasses and the mouth area, because the structure is relatively complex, the drawing sequence of a painter is learned by a deep learning method, all lines in the area corresponding to a given image are divided into different strokes and the corresponding sequences, and the strokes and the corresponding sequences are drawn in sequence.
For other areas, dividing lines of the corresponding area into different connected areas, wherein each connected area corresponds to one stroke; then, calculating the area and the starting point coordinate of each communication area; normalizing the area and the starting point coordinate, and then weighting; and sequencing according to the weighted numerical values, and determining the drawing priority of each connected region according to the principle of from left to right, from top to bottom and from large to small.
This embodiment can be according to the effective region generation drawing orbit of the arm of input image and reality, can the complete input image that draws to can optimize the process of arm drawing according to the custom drawing order of real person painter.
It should be noted that:
the term "module" is not intended to be limited to a particular physical form. Depending on the particular application, a module may be implemented as hardware, firmware, software, and/or combinations thereof. Furthermore, different modules may share common components or even be implemented by the same component. There may or may not be clear boundaries between the various modules.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose devices may be used with the teachings herein. The required structure for constructing such a device will be apparent from the description above. In addition, this application is not directed to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the teachings of the present application as described herein, and any descriptions of specific languages are provided above to disclose the best modes of the present application.
In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the application may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the application, various features of the application are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: this application is intended to cover such departures from the present disclosure as come within known or customary practice in the art to which this invention pertains. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this application.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the application and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the present application may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the creation apparatus of a virtual machine according to embodiments of the present application. The present application may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present application may be stored on a computer readable medium or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the application, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The above-mentioned embodiments only express the embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A method for drawing a portrait by using a mechanical arm is characterized by comprising the following steps:
dividing a binary image corresponding to a portrait picture to be drawn into a plurality of areas;
the plurality of regions are subjected to drawing priority sequencing to obtain a region drawing priority sequence;
dividing each region into a plurality of communicating regions, wherein each communicating region corresponds to one stroke;
drawing priority ordering is carried out on the plurality of communication areas to obtain a stroke drawing priority order;
and controlling the mechanical arm to finish the drawing of the portrait according to the region drawing priority sequence and the stroke drawing priority sequence.
2. The method of claim 1, wherein said dividing each of said regions into a plurality of connected regions, each of said connected regions corresponding to a stroke, comprises:
classifying strokes in each region into first-class strokes and second-class strokes; the first type of strokes are strokes formed by one stroke; the second type of stroke is a stroke formed by two or more strokes with a cross point;
dividing the first type of strokes into a communication area;
and cutting the second type of strokes into a plurality of strokes, and then dividing the plurality of strokes into different communication areas respectively.
3. The method of claim 1, wherein the dividing each of the regions into a plurality of communication areas comprises: comparing the stroke in each region with a preset threshold value, and if the stroke length is not greater than the preset threshold value, directly dividing the stroke into a communication region; if the stroke length is larger than a preset threshold value, dividing the stroke into a plurality of communication areas after segmentation.
4. The method of claim 1, wherein said prioritizing said plurality of connected regions into a stroke drawing priority order comprises:
calculating the area of each communication area and the corresponding stroke starting point coordinate;
normalizing the area and the stroke starting point coordinate;
carrying out weighted summation on the normalized area and the normalized stroke starting point coordinate;
and sequencing the values obtained by weighted summation, and determining the drawing priority order of each communication area.
5. The method of claim 1, wherein said prioritizing said plurality of connected regions into a stroke drawing priority order comprises:
and determining the drawing priority order of each communication area according to the priority order from left to right in position, from top to bottom or from large to small in area.
6. The method of claim 1, wherein said prioritizing said plurality of connected regions into a stroke drawing priority order comprises:
establishing a rectangular coordinate system, acquiring the area of each communication area or the corresponding stroke starting point coordinate according to the rectangular coordinate system, and determining the drawing priority order of each communication area according to the area of each communication area or the corresponding stroke starting point coordinate.
7. The method of claim 1, wherein each of said connected regions corresponds to a stroke, comprising:
each of the communication areas is a stroke; or
Each of the connected regions includes a stroke and a region within a predetermined range around the stroke.
8. An apparatus for drawing a portrait using a robotic arm, comprising:
the segmentation module is used for segmenting the binary image corresponding to the portrait picture to be drawn into a plurality of areas;
the first sequencing module is used for sequencing the drawing priorities of the plurality of areas to obtain an area drawing priority sequence;
the dividing module is used for dividing each region into a plurality of communicating regions, and each communicating region corresponds to one stroke;
the second sequencing module is used for sequencing drawing priorities of the communication areas to obtain a stroke drawing priority sequence;
and the control module is used for controlling the mechanical arm to finish the portrait drawing according to the region drawing priority sequence and the stroke drawing priority sequence.
9. A painting robot comprising a processor, communication means and a robotic arm, the processor being capable of performing the method of drawing a portrait using the robotic arm as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which program is executable by a processor for implementing a method for rendering a portrait by means of a robot arm as claimed in any one of the claims 1-7.
CN202010016499.0A 2020-01-08 2020-01-08 Method and device for drawing portrait by using mechanical arm, robot and storage medium Active CN111195912B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010016499.0A CN111195912B (en) 2020-01-08 2020-01-08 Method and device for drawing portrait by using mechanical arm, robot and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010016499.0A CN111195912B (en) 2020-01-08 2020-01-08 Method and device for drawing portrait by using mechanical arm, robot and storage medium

Publications (2)

Publication Number Publication Date
CN111195912A CN111195912A (en) 2020-05-26
CN111195912B true CN111195912B (en) 2021-06-15

Family

ID=70741806

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010016499.0A Active CN111195912B (en) 2020-01-08 2020-01-08 Method and device for drawing portrait by using mechanical arm, robot and storage medium

Country Status (1)

Country Link
CN (1) CN111195912B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090078043A (en) * 2008-01-14 2009-07-17 반동구 How to create color characters (video, animation)
CN101923698A (en) * 2009-06-11 2010-12-22 株式会社理光 Method and device for embedding and detecting watermark information
CN102034232A (en) * 2009-09-25 2011-04-27 上海电机学院 Method for segmenting medical image graph
CN108460369A (en) * 2018-04-04 2018-08-28 南京阿凡达机器人科技有限公司 A kind of drawing practice and system based on machine vision

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3105967B2 (en) * 1991-11-14 2000-11-06 キヤノン株式会社 Character recognition method and device
US20050281467A1 (en) * 2003-01-24 2005-12-22 Stahovich Thomas F Recognizing multi-stroke symbols
CN100470582C (en) * 2007-04-06 2009-03-18 清华大学 Printed Monggol language text segmentation method
CN110587599A (en) * 2019-08-19 2019-12-20 广东智媒云图科技股份有限公司 Drawing method, device and system based on curved surface drawing carrier

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090078043A (en) * 2008-01-14 2009-07-17 반동구 How to create color characters (video, animation)
CN101923698A (en) * 2009-06-11 2010-12-22 株式会社理光 Method and device for embedding and detecting watermark information
CN102034232A (en) * 2009-09-25 2011-04-27 上海电机学院 Method for segmenting medical image graph
CN108460369A (en) * 2018-04-04 2018-08-28 南京阿凡达机器人科技有限公司 A kind of drawing practice and system based on machine vision

Also Published As

Publication number Publication date
CN111195912A (en) 2020-05-26

Similar Documents

Publication Publication Date Title
KR102523512B1 (en) Creation of a face model
CN105787878B (en) A kind of U.S. face processing method and processing device
CN105184249B (en) Method and apparatus for face image processing
CN112419170B (en) Training method of shielding detection model and beautifying processing method of face image
Liang et al. Parsing the hand in depth images
WO2020078119A1 (en) Method, device and system for simulating user wearing clothing and accessories
CN111383638A (en) Signal processing device, signal processing method and related product
US12062154B2 (en) Image correction system and image correcting method thereof
CN111680550B (en) Emotion information identification method and device, storage medium and computer equipment
CN109063678B (en) Face image recognition method, device and storage medium
CN110288715B (en) Virtual necklace try-on method and device, electronic equipment and storage medium
CN109635752A (en) Localization method, face image processing process and the relevant apparatus of face key point
CN110532883A (en) On-line tracking is improved using off-line tracking algorithm
CN111062328A (en) Image processing method and device and intelligent robot
CN110968235B (en) Signal processing device and related product
CN108764143A (en) Image processing method, device, computer equipment and storage medium
CN110688897A (en) Pedestrian re-identification method and device based on joint judgment and generation learning
Güçlü et al. End-to-end semantic face segmentation with conditional random fields as convolutional, recurrent and adversarial networks
CN116091667B (en) Character artistic image generation system based on AIGC technology
CN110751733A (en) Method and apparatus for converting 3D scanned object into avatar
CN114758382B (en) Face AU detection model building method based on self-adaptive patch learning and application
CN112115790A (en) Face recognition method and device, readable storage medium and electronic equipment
EP3871194A1 (en) Digital character blending and generation system and method
CN113379623B (en) Image processing method, device, electronic equipment and storage medium
WO2019098872A1 (en) Method for displaying a three-dimensional face of an object, and device for same

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Room 101, building 1, block C, Qianjiang Century Park, ningwei street, Xiaoshan District, Hangzhou City, Zhejiang Province

Applicant after: Hangzhou Weiming Information Technology Co.,Ltd.

Applicant after: Institute of Information Technology, Zhejiang Peking University

Address before: Room 288-1, 857 Xinbei Road, Ningwei Town, Xiaoshan District, Hangzhou City, Zhejiang Province

Applicant before: Institute of Information Technology, Zhejiang Peking University

Applicant before: Hangzhou Weiming Information Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20200526

Assignee: Zhejiang smart video security Innovation Center Co.,Ltd.

Assignor: Institute of Information Technology, Zhejiang Peking University

Contract record no.: X2022330000930

Denomination of invention: Method, device, robot and storage medium for drawing portrait with mechanical arm

Granted publication date: 20210615

License type: Common License

Record date: 20221229

EE01 Entry into force of recordation of patent licensing contract