CN109993680A - Writing imitates method, apparatus, electronic equipment and computer-readable medium - Google Patents
Writing imitates method, apparatus, electronic equipment and computer-readable medium Download PDFInfo
- Publication number
- CN109993680A CN109993680A CN201910270104.7A CN201910270104A CN109993680A CN 109993680 A CN109993680 A CN 109993680A CN 201910270104 A CN201910270104 A CN 201910270104A CN 109993680 A CN109993680 A CN 109993680A
- Authority
- CN
- China
- Prior art keywords
- information
- writing
- routing information
- framework
- generated
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 63
- 238000000605 extraction Methods 0.000 claims abstract description 15
- 238000012545 processing Methods 0.000 claims description 28
- 238000003860 storage Methods 0.000 claims description 22
- 230000015572 biosynthetic process Effects 0.000 claims description 8
- 238000011088 calibration curve Methods 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 4
- 230000010365 information processing Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 14
- 230000015654 memory Effects 0.000 description 11
- 230000008569 process Effects 0.000 description 8
- 238000004891 communication Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 230000006835 compression Effects 0.000 description 3
- 238000007906 compression Methods 0.000 description 3
- 238000003709 image segmentation Methods 0.000 description 3
- 230000005291 magnetic effect Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000010422 painting Methods 0.000 description 3
- 238000007639 printing Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 230000007797 corrosion Effects 0.000 description 2
- 238000005260 corrosion Methods 0.000 description 2
- 230000006866 deterioration Effects 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 239000000203 mixture Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000003672 processing method Methods 0.000 description 2
- 238000011084 recovery Methods 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 238000010146 3D printing Methods 0.000 description 1
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- WYTGDNHDOZPMIW-RCBQFDQVSA-N alstonine Natural products C1=CC2=C3C=CC=CC3=NC2=C2N1C[C@H]1[C@H](C)OC=C(C(=O)OC)[C@H]1C2 WYTGDNHDOZPMIW-RCBQFDQVSA-N 0.000 description 1
- 230000000712 assembly Effects 0.000 description 1
- 238000000429 assembly Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 229910052799 carbon Inorganic materials 0.000 description 1
- 210000004027 cell Anatomy 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000000052 comparative effect Effects 0.000 description 1
- 238000010425 computer drawing Methods 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000000608 laser ablation Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000012797 qualification Methods 0.000 description 1
- 230000003014 reinforcing effect Effects 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
- 235000015170 shellfish Nutrition 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 210000000352 storage cell Anatomy 0.000 description 1
- 238000005728 strengthening Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/0014—Image feed-back for automatic industrial control, e.g. robot with camera
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/20—Drawing from basic elements, e.g. lines or circles
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20092—Interactive image processing based on input by user
- G06T2207/20104—Interactive definition of region of interest [ROI]
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Robotics (AREA)
- Processing Or Creating Images (AREA)
Abstract
This disclosure relates to which a kind of writing imitates method, apparatus, electronic equipment and computer-readable medium.It is related to computer information processing field, this method comprises: obtaining the picture for having target writing;Determine that the framework information of the target writing, the framework information include straight-line segment and/or curved segments by skeletal extraction technology;Routing information is generated by the framework information;And control instruction is generated to control the imitation that mechanical arm carries out the target writing by the routing information.This disclosure relates to writing imitate method, apparatus, electronic equipment and computer-readable medium, be capable of imitating writing for efficiently and accurately, generation can direct applied emulation writing works.
Description
Technical field
This disclosure relates to which computer information processing field, imitates method, apparatus, electronics in particular to a kind of writing
Equipment and computer-readable medium.
Background technique
Writing imitation is a relatively new field, everyone has the person's handwriting of oneself, and the writing of the mankind is not in life
It is reproducible.And in the batch signature of some unique occasions, such as certificate, the integrated planning file of project, parent is white in person writes
With different meanings.But under some less important scenes, can the occasion such as star's batch autographed copy sale postcard, if
If having instrument or tool that can carry out batch imitation to mankind's writing, it is very big convenient to bring.
In the historical relic's protection field for being related to calligraphy, it will receive the influence of environment when due to true showpiece on show, subtract
The service life of few showpiece if can fast and accurately be imitated historical relic, puts on display emulation historical relic so that both in this case
The purpose of historical relic can be protected by meeting audience's demand again, and very big help can be also brought to historical relic field.
But writing in the prior art imitates technology, is substantially and is carried out at analysis by computer to original document
Then reason generates emulation writing data, emulation writing data are saved in a computer in the form of picture, and computer again will emulation
Writing data are printed by way of picture.The writing that this processing mode generates imitates file, still with truth
Writing file has certain difference, and user goes through the difference that can find out printing writing and true writing, so this mould
There is significant limitations for the mode of imitative writing.
Therefore, it is necessary to a kind of new writings to imitate method, apparatus, electronic equipment and computer-readable medium.
Above- mentioned information are only used for reinforcing the understanding to the background of the disclosure, therefore it disclosed in the background technology part
It may include the information not constituted to the prior art known to persons of ordinary skill in the art.
Summary of the invention
In view of this, the disclosure, which provides a kind of writing, imitates method, apparatus, electronic equipment and computer-readable medium, energy
Enough efficiently and accuratelies imitate writing, and generation can direct applied emulation writing works.
Other characteristics and advantages of the disclosure will be apparent from by the following detailed description, or partially by the disclosure
Practice and acquistion.
According to the one side of the disclosure, propose that a kind of writing imitates method, this method comprises: obtaining with target writing
Picture;Determine the framework information of the target writing by skeletal extraction technology, the framework information include straight-line segment and/or
Curved segments;Routing information is generated by the framework information;And control instruction is generated to control by the routing information
Mechanical arm carries out the imitation of the target writing.
In a kind of exemplary embodiment of the disclosure, generating routing information by the framework information includes: to pass through institute
It states straight-line segment and generates straight line information;Pass through the curved segments formation curve information;And pass through the straight line information and institute
It states calibration curve information and generates the routing information.
It include: to pass through shellfish by the curved segments formation curve information in a kind of exemplary embodiment of the disclosure
Sai Er curve carries out curve fitting processing to the curved segments, generates the calibration curve information.
In a kind of exemplary embodiment of the disclosure, control instruction is generated to control manipulator by the routing information
The imitation that arm carries out the target writing includes: at least one start position obtained in the routing information;Obtain the road
At least one corresponding final position of at least one described start position in diameter information;And pass through at least one described starting point
Position at least one final position corresponding with its generates the control instruction.
In a kind of exemplary embodiment of the disclosure, control instruction is generated to control manipulator by the routing information
The imitation that arm carries out the target writing includes: to control the mechanical arm to carry out place of starting to write at least one described start position
Reason;And the control mechanical arm carries out processing of starting writing at least one described final position.
In a kind of exemplary embodiment of the disclosure, further includes: when the target writing meets predetermined condition, obtain
The width information of the target writing;And control instruction is generated to control machine by the routing information and the width information
Tool arm carries out the imitation of the target writing.
In a kind of exemplary embodiment of the disclosure, control is generated with the width information by the routing information and is referred to
Enabling to control mechanical arm to carry out the imitation of the target writing includes: to obtain the routing information to determine pen-down position;Pass through
The width information determines dynamics of starting to write;And the control is generated by pen-down position dynamics of starting to write corresponding with its and is referred to
It enables.
According to the one side of the disclosure, propose that a kind of writing imitates device, which includes: picture module, for obtaining
Picture with target writing;Framework module, for determining the framework information of the target writing, institute by skeletal extraction technology
Stating framework information includes straight-line segment and/or curved segments;Path module, for generating path letter by the framework information
Breath;And control module, the target word is carried out for generating control instruction by the routing information to control mechanical arm
The imitation of mark.
According to the one side of the disclosure, a kind of electronic equipment is proposed, which includes: one or more processors;
Storage device, for storing one or more programs;When one or more programs are executed by one or more processors, so that one
A or multiple processors realize such as methodology above.
According to the one side of the disclosure, it proposes a kind of computer-readable medium, is stored thereon with computer program, the program
Method as mentioned in the above is realized when being executed by processor.
Method, apparatus, electronic equipment and computer-readable medium are imitated according to the writing of the disclosure, passes through skeletal extraction skill
Art determines the framework information of the target writing, then generates routing information by the framework information;And pass through the road
Diameter information generates control instruction in a manner of controlling mechanical arm and carry out writing imitation, and be capable of efficiently and accurately carries out mould to writing
Imitative, generation can direct applied emulation writing works.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited
It is open.
Detailed description of the invention
Its example embodiment is described in detail by referring to accompanying drawing, above and other target, feature and the advantage of the disclosure will
It becomes more fully apparent.Drawings discussed below is only some embodiments of the present disclosure, for the ordinary skill of this field
For personnel, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is the system scenarios block diagram that a kind of writing shown according to an exemplary embodiment imitates method and device.
Fig. 2 is the application scenarios block diagram that a kind of writing shown according to an exemplary embodiment imitates method and device.
Fig. 3 is the flow chart that a kind of writing shown according to an exemplary embodiment imitates method.
Fig. 4 is that a kind of writing shown according to another exemplary embodiment imitates the flow chart of method.
Fig. 5 is that a kind of writing shown according to another exemplary embodiment imitates the schematic diagram of method.
Fig. 6 is that a kind of writing shown according to another exemplary embodiment imitates the flow chart of method.
Fig. 7 is the block diagram that a kind of writing shown according to an exemplary embodiment imitates device.
Fig. 8 is the block diagram of a kind of electronic equipment shown according to an exemplary embodiment.
Fig. 9 is a kind of computer readable storage medium schematic diagram shown according to an exemplary embodiment.
Specific embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be real in a variety of forms
It applies, and is not understood as limited to embodiment set forth herein;On the contrary, thesing embodiments are provided so that the disclosure will be comprehensively and complete
It is whole, and the design of example embodiment is comprehensively communicated to those skilled in the art.Identical appended drawing reference indicates in figure
Same or similar part, thus repetition thereof will be omitted.
In addition, described feature, structure or characteristic can be incorporated in one or more implementations in any suitable manner
In example.In the following description, many details are provided to provide and fully understand to embodiment of the disclosure.However,
It will be appreciated by persons skilled in the art that can with technical solution of the disclosure without one or more in specific detail,
Or it can be using other methods, constituent element, device, step etc..In other cases, it is not shown in detail or describes known side
Method, device, realization or operation are to avoid fuzzy all aspects of this disclosure.
Block diagram shown in the drawings is only functional entity, not necessarily must be corresponding with physically separate entity.
I.e., it is possible to realize these functional entitys using software form, or realized in one or more hardware modules or integrated circuit
These functional entitys, or these functional entitys are realized in heterogeneous networks and/or processor device and/or microcontroller device.
Flow chart shown in the drawings is merely illustrative, it is not necessary to including all content and operation/step,
It is not required to execute by described sequence.For example, some operation/steps can also decompose, and some operation/steps can close
And or part merge, therefore the sequence actually executed is possible to change according to the actual situation.
It should be understood that although herein various assemblies may be described using term first, second, third, etc., these groups
Part should not be limited by these terms.These terms are to distinguish a component and another component.Therefore, first group be discussed herein below
Part can be described as the second component without departing from the teaching of disclosure concept.As used herein, term " and/or " include associated
All combinations for listing any of project and one or more.
It will be understood by those skilled in the art that attached drawing is the schematic diagram of example embodiment, module or process in attached drawing
Necessary to not necessarily implementing the disclosure, therefore it cannot be used for the protection scope of the limitation disclosure.
Fig. 1 is the system scenarios block diagram that a kind of writing shown according to an exemplary embodiment imitates method and device.
As shown in Figure 1, system architecture 100 may include mechanical arm 101,102,103, network 104 and server 105.
Network 104 between mechanical arm 101,102,103 and server 105 to provide the medium of communication link.Network 104 can be with
Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
Mechanical arm 101,102,103 can be interacted by network 104 with server 105, to receive command information or send
Status information etc..The client application etc. of various communication classes can be installed on mechanical arm 101,102,103.
Mechanical arm 101,102,103, which can be, can receive instruction, be precisely positioned to three-dimensional (or two dimension) spatially
Certain point carry out operation equipment, mechanical arm 101,102,103 can be multi-joint manipulator arm, rectangular coordinate system manipulator
Arm, spherical coordinate system mechanical arm, polar coordinates mechanical arm, cylindrical coordinates mechanical arm etc..
Server 105 can be to provide the server of various services, such as control mechanical arm 101,102,103
Commander server.Server 105 can carry out the processing such as analyzing to the image data with target writing received, generate
Control instruction is to control mechanical arm 101,102,103.
Server 105 can for example obtain the picture with target writing;Server 105 can for example pass through skeletal extraction technology
Determine that the framework information of the target writing, the framework information include straight-line segment and/or curved segments;Server 105 can
Such as routing information is generated by the framework information;And server 105 can be generated for example by the routing information and be controlled
Instruction is to control the imitation that mechanical arm carries out the target writing.
Server 105 can also obtain the width of the target writing for example when the target writing meets predetermined condition
Information;Server 105 also for example can generate control instruction by the routing information and the width information to control manipulator
Arm carries out the imitation of the target writing.
Server 105 can be the server of an entity, also may be, for example, multiple server compositions, needs to illustrate
It is that writing provided by the embodiment of the present disclosure imitates method and can be held by server 105 and/or mechanical arm 101,102,103
Row, correspondingly, writing imitate device and can be set in server 105 and/or mechanical arm 101,102,103.And it is supplied to
Server 105 carries out picture or the input terminal of data input is normally in server 105.
Fig. 2 is the application scenarios block diagram that a kind of writing shown according to an exemplary embodiment imitates method and device.
In the prior art, for the mankind after non-electronic product surface (such as: paper) is write, lines have a fixed width
Degree, general processing method can only obtain outline path data, therefore will be unable to restore the mankind in mechanical arm manifolding
Hand-written track, and outline can only be drawn.Mechanical arm writing words mainly or by artificial on computers draw text
Word path, or by control mechanical arm motion recording path, then completed with the mode that computer is constantly debugged final
It writes.
As shown in Fig. 2, carrying out image knowledge to the image with writing by computer equipment in embodiments herein
Not, it determines the skeleton in image, and then is fitted mankind's person's handwriting, writing reduction is then carried out by mechanical arm.The word of the application
Mark imitates method can imitate the works of late expert of calligraphy and painting with mechanical arm, and then protect to painting and calligraphy pieces.The present invention is
Mechanical arm imitates a kind of method of mankind's operation, in addition to making carbon copies mankind's person's handwriting, can also generate more use on this basis
Method further increases the ability that mechanical arm completes complex operations instead of the mankind.
Fig. 3 is the flow chart that a kind of writing shown according to an exemplary embodiment imitates method.Writing imitates method 30
Including at least step S302 to S308.
As shown in figure 3, obtaining the picture for having target writing in S302.Picture with target writing may be, for example,
The signature picture of user or the calligraphy work picture of calligraphist.
It in one embodiment, can be by picture pick-up device by obtaining in the material object with true writing with target writing
Picture, the format of picture may be, for example, JPG or PNG etc. format, and the application is not limited.
It in one embodiment, can also be for example to the picture after the picture for getting target writing by picture pick-up device
It is pre-processed, image procossing (image processing) is analyzed image with computer, to reach required result
Technology.Also known as image processing.Image procossing refers generally to Digital Image Processing.Digital picture refers to industrial camera, video camera, sweeps
It retouches the equipment such as instrument and passes through the big two-dimensional array that shooting obtains, the element of the array is known as pixel, and value is known as gray value.
In the present embodiment, image processing techniques may include compression of images, enhancing and recovery, several parts such as image segmentation.
In one embodiment, compression of images can reduce the data volume (i.e. bit number) of description image, to save image
Transmission, processing time and the occupied memory capacity of reduction.Compression can obtain under the premise of distortionless, can also permit
Perhaps it is carried out under distortion condition.Coding is most important method in compress technique, it is that development is earliest in the image processing arts
And the technology of comparative maturity.
In one embodiment, image enhancement and the purpose of recovery are the quality in order to improve image, such as remove noise, mention
The clarity etc. of hi-vision.Image enhancement does not consider the reason of image deterioration, protrudes part interested in image.As strengthened
Image high fdrequency component can make objects in images clear-cut, and details is obvious;Noise in image shadow can be reduced by such as strengthening low frequency component
It rings.Image restoration require have certain understanding to the reason of image deterioration, generally should according to degrade process establish " degrade mould
Type ", then certain filtering method is used, restore or rebuild original image.
In one embodiment, image segmentation is one of the key technology in Digital Image Processing.Image segmentation is will to scheme
Significant characteristic extracts as in, and significant feature has edge, region in image etc., this be further into
Row image recognition, analysis and the basis of understanding.More specifically, can for example when the image to some painting and calligraphy pieces is handled,
The region of target writing will be had in image by being cut into general image.
In S304, determine that the framework information of the target writing, the framework information include by skeletal extraction technology
Straight-line segment and/or curved segments.
Wherein, it is to extract the center pixel profile of target writing on the image that image framework, which extracts,.Image framework can also claim
For refinement, so-called refinement is exactly the removing by from level to level, removes some points from original figure, but be still to keep originally
Shape, until obtaining the skeleton of image.Skeleton, it can be understood as the axis of object, such as a rectangular skeleton is it
Central axes on length direction;The skeleton of square is its central point;Round skeleton is its center of circle, the skeleton of straight line be it from
Body, the skeleton of isolated point are also itself.Skeleton has been obtained, the primary structure and shape information of prominent object, removal are equivalent to
Redundant information, may be implemented the detection of characteristic point on image, such as endpoint, crosspoint and inflection point according to these information.
In one embodiment, skeletal extraction algorithm is divided into iteration and non-iterative two major classes, in iterative algorithm, and is divided into
Parallel iteration and two kinds of sequential iteration.More specifically, Framework Arithmetic in this application may be, for example, Zhang-Suen
Algorithm, the iterative step of the algorithm each time are corroded to the object pixel for meeting specified conditions, and effect is exactly
Target becomes increasingly thinner.Continuous iteration, until the target after upper primary corrosion epicycle operation in, not new pixel
Point is corroded, and algorithm terminates.In this application, also skeletal extraction can be carried out using other algorithms, to obtain the bone of target writing
Frame information, framework information include straight-line segment and/or curved segments.
In S306, routing information is generated by the framework information.Can include: straight line is generated by the straight-line segment
Information;Pass through the curved segments formation curve information;And by described in the straight line information and calibration curve information generation
Routing information.
It in one embodiment, include: by Bezier to described by the curved segments formation curve information
Curved segments carry out curve fitting processing, generate the calibration curve information.
In S308, control instruction is generated by the routing information and carries out the target writing to control mechanical arm
It imitates.
In one embodiment, control instruction is generated by the routing information and carries out the target to control mechanical arm
The imitation of writing includes: at least one start position obtained in the routing information;It obtains described in the routing information
At least one corresponding final position of at least one start position;And it is corresponding with its by least one described start position
At least one final position generates the control instruction.
In one embodiment, further includes: when the target writing meets predetermined condition, obtain the target writing
Width information;And control instruction is generated to control described in mechanical arm progress by the routing information and the width information
The imitation of target writing.
The skeleton of image is calculated, continuous line segment is taken out, straight line is converted to inter-two-point path, curve Bezier
Path data is sent to arm by curve matching, is started to write at continuous linear or the origin of curve, is lifted pen in terminal, is completed to write.
It in one embodiment,, can also be after the skeleton of target writing is calculated when target writing is Writing brush calligraphy
Vertical line is done on path, vertical line is cut into line segment by edge line, and line segment length delegated path width by conversion and adjusts the width
Examination, is converted to pen tip height of the mechanical arm in the repetitive process of path, will can be fitted the writing of Brush calligraphy.
Method is imitated according to the writing of the disclosure, the framework information of the target writing is determined by skeletal extraction technology,
Then routing information is generated by the framework information;And control instruction is generated to control manipulator by the routing information
Arm carries out the mode of writing imitation, is capable of imitating writing for efficiently and accurately, and generation can direct applied emulation writing work
Product.
It will be clearly understood that the present disclosure describes how to form and use particular example, but the principle of the disclosure is not limited to
These exemplary any details.On the contrary, the introduction based on disclosure disclosure, these principles can be applied to many other
Embodiment.
Fig. 4 is that a kind of writing shown according to another exemplary embodiment imitates the flow chart of method.Process shown in Fig. 4
It is to the detailed description for " generating routing information by the framework information " in process shown in Fig. 3.
As shown in figure 4, generating straight line information by the straight-line segment in S402.
It in S404, is carried out curve fitting processing by Bezier to the curved segments, generates the curve letter
Breath.
In S406, the routing information is generated by the straight line information and the calibration curve information.
Fig. 5 is that a kind of writing shown according to another exemplary embodiment imitates the schematic diagram of method.As shown in figure 5, its
In, Bezier (B é zier curve), also known as Bezier curve or Bezier surface are to be applied to X-Y scheme application program
Mathematic curve.Due to the smooth features that Bezier itself has, so that Bezier obtains in terms of Industry Control
Very it is widely applied.
In one embodiment, it generates Bezier and needs data point and control point:
Data point: refer to the starting point and ending point of a paths.
Control point: control point determines the serpentine track of a paths, and according to the number at control point, Bezier is divided
For single order Bezier (0 control point), second order Bezier (1 control point), (2 controls of three rank Beziers
Point) etc..
In one embodiment, specifically routing information can be determined by the three rank Beziers with 2 control points.Tool
Body can are as follows: using the initial position of curve and terminal position as Bezier data point, in the skeleton of this section of target writing
Determine 2 control points at random to determine three rank Beziers, three rank Beziers of generation can be for example shown in Fig. 3.
In one embodiment, the dominating pair of vertices curve line of other Bessel functions and different modes selection can also be passed through
Section is fitted processing, with formation curve information.
Fig. 6 is that a kind of writing shown according to another exemplary embodiment imitates the flow chart of method.Process shown in fig. 6
It is " control instruction to be generated in process shown in Fig. 3 by the routing information and carries out the target word to control mechanical arm
The detailed description of the imitation of mark ".
As shown in fig. 6, obtaining at least one start position in the routing information in S602.
In S604, at least one corresponding terminal position of at least one described start position in the routing information is obtained
It sets.
In S606, the control is generated by least one described start position at least one final position corresponding with its
System instruction.
In S608, judge whether the target writing meets predetermined condition.Judge target writing whether be Brush calligraphy or
Person is overstriking text.Specifically, can for example judge the classification of target writing by the width of the shape of posture or writing.
In S610, when the target writing is unsatisfactory for predetermined condition, control instruction is generated by the routing information
To control the imitation that mechanical arm carries out the target writing.It include: the control mechanical arm at least one described starting point
Position carries out processing of starting to write;And the control mechanical arm carries out processing of starting writing at least one described final position.
In S612, when the target writing meets predetermined condition, the width information of the target writing is obtained.
In S614, control instruction is generated by the routing information and the width information to control mechanical arm progress
The imitation of the target writing.Can include: it obtains the routing information and determines pen-down position;It is fallen by width information determination
Vigour of style in literary composition degree;And the control instruction is generated by pen-down position dynamics of starting to write corresponding with its.
In one embodiment, the writing that different dynamics of starting to write can control manipulator to write out different in width.Another
In a embodiment, the order of the current pen tool of replacement manipulator can be also generated by width information, so that manipulator is with more suitably
Pen tool is write.
Robot using more and more extensive.Mechanical arm is one of form of robot.It, can be with mould by mechanical arm
The operation of apery class completes the impossible part work of mankind institute, or more accurately completes the behaviour for needing the mankind to complete originally
Make.Under certain scenes, dot lattice printing mode is not applicable, it is necessary to be completed using the mode that trajectory path is drawn.With mechanical arm mould
The motion profile of imitative human arm is realized for example: being write, laser ablation, the operation such as 3D printing.Mechanical arm in the prior art
Although text profile can be obtained by image recognition, it can not obtain and write path, so that mechanical arm can not be allowed to write
Mode restore.It is manual non-by computer drawing path, or in such a way that the writing of direct manipulator's arm is corrected by hand again
It often takes time and effort, is difficult to realize batch operation.
Method is imitated according to the writing of the disclosure, manipulator can directly carry out notes mould on paper or physical item
Intend, generate target writing directly over, do not need again to handle writing printing etc., directly obtaining can direct applied production in kind
Product, moreover, the hand-held pen tool of manipulator can carry out more according to the writing material of target writing in the writing process of manipulator
It changes, to obtain more life-like simulation effect.
It will be appreciated by those skilled in the art that realizing that all or part of the steps of above-described embodiment is implemented as being executed by CPU
Computer program.When the computer program is executed by CPU, above-mentioned function defined by the above method that the disclosure provides is executed
Energy.The program can store in a kind of computer readable storage medium, which can be read-only memory, magnetic
Disk or CD etc..
Further, it should be noted that above-mentioned attached drawing is only the place according to included by the method for disclosure exemplary embodiment
Reason schematically illustrates, rather than limits purpose.It can be readily appreciated that above-mentioned processing shown in the drawings is not indicated or is limited at these
The time sequencing of reason.In addition, be also easy to understand, these processing, which can be, for example either synchronously or asynchronously to be executed in multiple modules.
Following is embodiment of the present disclosure, can be used for executing embodiments of the present disclosure.It is real for disclosure device
Undisclosed details in example is applied, embodiments of the present disclosure is please referred to.
Fig. 7 is the block diagram that a kind of writing shown according to an exemplary embodiment imitates device.Writing imitates device 70 and wraps
It includes: picture module 702, framework module 704, path module 706 and control module 708.
Picture module 702 is used to obtain the picture with target writing;Picture with target writing may be, for example, user
Signature picture or calligraphist calligraphy work picture.
Framework module 704 is used to determine the framework information of the target writing, the skeleton letter by skeletal extraction technology
Breath includes straight-line segment and/or curved segments;In one embodiment, skeletal extraction algorithm is divided into iteration and non-iterative two is big
Class in iterative algorithm, and is divided into parallel iteration and two kinds of sequential iteration.More specifically, Framework Arithmetic in this application can
For example, Zhang-Suen algorithm, the iterative step of the algorithm each time be to the object pixel for meeting specified conditions,
Corroded, effect is exactly that target becomes increasingly thinner.Continuous iteration, until the target after upper primary corrosion is grasped in epicycle
In work, not new pixel is corroded, and algorithm terminates.Also skeletal extraction can be carried out using other algorithms, to obtain target word
The framework information of mark, the framework information include straight-line segment and/or curved segments.
Path module 706 is used to generate routing information by the framework information;Can include: it is raw by the straight-line segment
Be in line information;Pass through the curved segments formation curve information;And it is raw by the straight line information and the calibration curve information
At the routing information.
Control module 708, which is used to generate control instruction by the routing information, carries out the target to control mechanical arm
The imitation of writing.
In one embodiment, control instruction is generated by the routing information and carries out the target to control mechanical arm
The imitation of writing includes: at least one start position obtained in the routing information;It obtains described in the routing information
At least one corresponding final position of at least one start position;And it is corresponding with its by least one described start position
At least one final position generates the control instruction.
In one embodiment, further includes: when the target writing meets predetermined condition, obtain the target writing
Width information;And control instruction is generated to control described in mechanical arm progress by the routing information and the width information
The imitation of target writing.
Device is imitated according to the writing of the disclosure, the framework information of the target writing is determined by skeletal extraction technology,
Then routing information is generated by the framework information;And control instruction is generated to control manipulator by the routing information
Arm carries out the mode of writing imitation, is capable of imitating writing for efficiently and accurately, and generation can direct applied emulation writing work
Product.
Fig. 8 is the block diagram of a kind of electronic equipment shown according to an exemplary embodiment.
The electronic equipment 200 of this embodiment according to the disclosure is described referring to Fig. 8.The electronics that Fig. 8 is shown
Equipment 200 is only an example, should not function to the embodiment of the present disclosure and use scope bring any restrictions.
As shown in figure 8, electronic equipment 200 is showed in the form of universal computing device.The component of electronic equipment 200 can wrap
It includes but is not limited to: at least one processing unit 210, at least one storage unit 220, (including the storage of the different system components of connection
Unit 220 and processing unit 210) bus 230, display unit 240 etc..
Wherein, the storage unit is stored with program code, and said program code can be held by the processing unit 210
Row, so that the processing unit 210 executes described in this specification above-mentioned electronic prescription circulation processing method part according to this
The step of disclosing various illustrative embodiments.For example, the processing unit 210 can be executed such as Fig. 3, Fig. 4, shown in Fig. 6
The step of.
The storage unit 220 may include the readable medium of volatile memory cell form, such as random access memory
Unit (RAM) 2201 and/or cache memory unit 2202 can further include read-only memory unit (ROM) 2203.
The storage unit 220 can also include program/practical work with one group of (at least one) program module 2205
Tool 2204, such program module 2205 includes but is not limited to: operating system, one or more application program, other programs
It may include the realization of network environment in module and program data, each of these examples or certain combination.
Bus 230 can be to indicate one of a few class bus structures or a variety of, including storage unit bus or storage
Cell controller, peripheral bus, graphics acceleration port, processing unit use any bus structures in a variety of bus structures
Local bus.
Electronic equipment 200 can also be with one or more external equipments 300 (such as keyboard, sensing equipment, bluetooth equipment
Deng) communication, can also be enabled a user to one or more equipment interact with the electronic equipment 200 communicate, and/or with make
Any equipment (such as the router, modulation /demodulation that the electronic equipment 200 can be communicated with one or more of the other calculating equipment
Device etc.) communication.This communication can be carried out by input/output (I/O) interface 250.Also, electronic equipment 200 can be with
By network adapter 260 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network,
Such as internet) communication.Network adapter 260 can be communicated by bus 230 with other modules of electronic equipment 200.It should
Understand, although not shown in the drawings, other hardware and/or software module can be used in conjunction with electronic equipment 200, including but unlimited
In: microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive and number
According to backup storage system etc..
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented
Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the disclosure
The technical solution of embodiment can be embodied in the form of software products, which can store non-volatile at one
Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating
Equipment (can be personal computer, server or network equipment etc.) executes the above method according to disclosure embodiment.
Fig. 9 schematically shows a kind of computer readable storage medium schematic diagram in disclosure exemplary embodiment.
Refering to what is shown in Fig. 9, describing the program product for realizing the above method according to embodiment of the present disclosure
400, can using portable compact disc read only memory (CD-ROM) and including program code, and can in terminal device,
Such as it is run on PC.However, the program product of the disclosure is without being limited thereto, in this document, readable storage medium storing program for executing can be with
To be any include or the tangible medium of storage program, the program can be commanded execution system, device or device use or
It is in connection.
Described program product can be using any combination of one or more readable mediums.Readable medium can be readable letter
Number medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example can be but be not limited to electricity, magnetic, optical, electromagnetic, infrared ray or
System, device or the device of semiconductor, or any above combination.The more specific example of readable storage medium storing program for executing is (non exhaustive
List) include: electrical connection with one or more conducting wires, portable disc, hard disk, random access memory (RAM), read-only
Memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read only memory
(CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
The computer readable storage medium may include in a base band or the data as the propagation of carrier wave a part are believed
Number, wherein carrying readable program code.The data-signal of this propagation can take various forms, including but not limited to electromagnetism
Signal, optical signal or above-mentioned any appropriate combination.Readable storage medium storing program for executing can also be any other than readable storage medium storing program for executing
Readable medium, the readable medium can send, propagate or transmit for by instruction execution system, device or device use or
Person's program in connection.The program code for including on readable storage medium storing program for executing can transmit with any suitable medium, packet
Include but be not limited to wireless, wired, optical cable, RF etc. or above-mentioned any appropriate combination.
Can with any combination of one or more programming languages come write for execute the disclosure operation program
Code, described program design language include object oriented program language-Java, C++ etc., further include conventional
Procedural programming language-such as " C " language or similar programming language.Program code can be fully in user
It calculates and executes in equipment, partly executes on a user device, being executed as an independent software package, partially in user's calculating
Upper side point is executed on a remote computing or is executed in remote computing device or server completely.It is being related to far
Journey calculates in the situation of equipment, and remote computing device can pass through the network of any kind, including local area network (LAN) or wide area network
(WAN), it is connected to user calculating equipment, or, it may be connected to external computing device (such as utilize ISP
To be connected by internet).
Above-mentioned computer-readable medium carries one or more program, when said one or multiple programs are by one
When the equipment executes, so that the computer-readable medium implements function such as: obtaining the picture for having target writing;Pass through skeleton
Extractive technique determines that the framework information of the target writing, the framework information include straight-line segment and/or curved segments;Pass through
The framework information generates routing information;And control instruction is generated by the routing information and carries out institute to control mechanical arm
State the imitation of target writing.
It will be appreciated by those skilled in the art that above-mentioned each module can be distributed in device according to the description of embodiment, it can also
Uniquely it is different from one or more devices of the present embodiment with carrying out corresponding change.The module of above-described embodiment can be merged into
One module, can also be further split into multiple submodule.
By the description of above embodiment, those skilled in the art is it can be readily appreciated that example embodiment described herein
It can also be realized in such a way that software is in conjunction with necessary hardware by software realization.Therefore, implemented according to the disclosure
The technical solution of example can be embodied in the form of software products, which can store in a non-volatile memories
In medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) or on network, including some instructions are so that a calculating equipment (can
To be personal computer, server, mobile terminal or network equipment etc.) it executes according to the method for the embodiment of the present disclosure.
It is particularly shown and described the exemplary embodiment of the disclosure above.It should be appreciated that the present disclosure is not limited to
Detailed construction, set-up mode or implementation method described herein;On the contrary, disclosure intention covers included in appended claims
Various modifications and equivalence setting in spirit and scope.
In addition, structure shown by this specification Figure of description, ratio, size etc., only to cooperate specification institute
Disclosure, for skilled in the art realises that be not limited to the enforceable qualifications of the disclosure with reading, therefore
Do not have technical essential meaning, the modification of any structure, the change of proportionate relationship or the adjustment of size are not influencing the disclosure
Under the technical effect and achieved purpose that can be generated, it should all still fall in technology contents disclosed in the disclosure and obtain and can cover
In the range of.
Claims (10)
1. a kind of writing imitates method characterized by comprising
Obtain the picture for having target writing;
Determine the framework information of the target writing by skeletal extraction technology, the framework information include straight-line segment and/or
Curved segments;
Routing information is generated by the framework information;And
Control instruction is generated by the routing information to control the imitation that mechanical arm carries out the target writing.
2. the method as described in claim 1, which is characterized in that generating routing information by the framework information includes:
Straight line information is generated by the straight-line segment;
Pass through the curved segments formation curve information;And
The routing information is generated by the straight line information and the calibration curve information.
3. method according to claim 2, which is characterized in that include: by the curved segments formation curve information
It is carried out curve fitting processing by Bezier to the curved segments, generates the calibration curve information.
4. the method as described in claim 1, which is characterized in that generate control instruction by the routing information to control machinery
The imitation that arm carries out the target writing includes:
Obtain at least one start position in the routing information;
Obtain at least one corresponding final position of at least one described start position in the routing information;And
The control instruction is generated by least one described start position at least one final position corresponding with its.
5. method as claimed in claim 4, which is characterized in that generate control instruction by the routing information to control machinery
The imitation that arm carries out the target writing includes:
It controls the mechanical arm and carries out processing of starting to write at least one described start position;And
It controls the mechanical arm and carries out processing of starting writing at least one described final position.
6. the method as described in claim 1, which is characterized in that further include:
When the target writing meets predetermined condition, the width information of the target writing is obtained;And
Control instruction, which is generated, by the routing information and the width information carries out the target writing to control mechanical arm
Imitation.
7. method as claimed in claim 6, which is characterized in that generated and controlled by the routing information and the width information
Instruction carries out the imitation of the target writing to control mechanical arm
It obtains the routing information and determines pen-down position;
Dynamics of starting to write is determined by the width information;And
The control instruction is generated by pen-down position dynamics of starting to write corresponding with its.
8. a kind of writing imitates method characterized by comprising
Picture module, for obtaining the picture for having target writing;
Framework module, for determining that the framework information of the target writing, the framework information include by skeletal extraction technology
Straight-line segment and/or curved segments;
Path module, for generating routing information by the framework information;And
Control module carries out the target writing for generating control instruction by the routing information to control mechanical arm
It imitates.
9. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real
The now method as described in any in claim 1-7.
10. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is held by processor
The method as described in any in claim 1-7 is realized when row.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910270104.7A CN109993680A (en) | 2019-04-04 | 2019-04-04 | Writing imitates method, apparatus, electronic equipment and computer-readable medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910270104.7A CN109993680A (en) | 2019-04-04 | 2019-04-04 | Writing imitates method, apparatus, electronic equipment and computer-readable medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109993680A true CN109993680A (en) | 2019-07-09 |
Family
ID=67132500
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910270104.7A Pending CN109993680A (en) | 2019-04-04 | 2019-04-04 | Writing imitates method, apparatus, electronic equipment and computer-readable medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109993680A (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1999039302A1 (en) * | 1998-01-28 | 1999-08-05 | California Institute Of Technology | Camera-based handwriting tracking |
CN104424473A (en) * | 2013-09-06 | 2015-03-18 | 北京三星通信技术研究有限公司 | Method and device for identifying and editing freehand sketch |
CN107481299A (en) * | 2017-06-27 | 2017-12-15 | 北京新国人智慧科技股份有限公司 | A kind of written handwriting display methods and system, intelligent terminal and intelligent writing system |
US20170371485A1 (en) * | 2016-06-24 | 2017-12-28 | Wacom Co., Ltd. | Stroke continuation for dropped touches on electronic handwriting devices |
CN108335423A (en) * | 2017-12-08 | 2018-07-27 | 广东数相智能科技有限公司 | A kind of system for drawing portrait, method and storage medium |
CN108399821A (en) * | 2018-01-29 | 2018-08-14 | 常涛涛 | A kind of electronic intelligence auxiliary writing training and analysis and evaluation system |
CN207747068U (en) * | 2017-12-29 | 2018-08-21 | 河北科技大学 | A kind of calligraphy robotic gripper change-fountain pen mechanism |
CN108460369A (en) * | 2018-04-04 | 2018-08-28 | 南京阿凡达机器人科技有限公司 | A kind of drawing practice and system based on machine vision |
CN108564639A (en) * | 2018-04-27 | 2018-09-21 | 广州视源电子科技股份有限公司 | Person's handwriting store method, device, intelligent interaction device and readable storage medium storing program for executing |
-
2019
- 2019-04-04 CN CN201910270104.7A patent/CN109993680A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO1999039302A1 (en) * | 1998-01-28 | 1999-08-05 | California Institute Of Technology | Camera-based handwriting tracking |
CN104424473A (en) * | 2013-09-06 | 2015-03-18 | 北京三星通信技术研究有限公司 | Method and device for identifying and editing freehand sketch |
US20170371485A1 (en) * | 2016-06-24 | 2017-12-28 | Wacom Co., Ltd. | Stroke continuation for dropped touches on electronic handwriting devices |
CN107481299A (en) * | 2017-06-27 | 2017-12-15 | 北京新国人智慧科技股份有限公司 | A kind of written handwriting display methods and system, intelligent terminal and intelligent writing system |
CN108335423A (en) * | 2017-12-08 | 2018-07-27 | 广东数相智能科技有限公司 | A kind of system for drawing portrait, method and storage medium |
CN207747068U (en) * | 2017-12-29 | 2018-08-21 | 河北科技大学 | A kind of calligraphy robotic gripper change-fountain pen mechanism |
CN108399821A (en) * | 2018-01-29 | 2018-08-14 | 常涛涛 | A kind of electronic intelligence auxiliary writing training and analysis and evaluation system |
CN108460369A (en) * | 2018-04-04 | 2018-08-28 | 南京阿凡达机器人科技有限公司 | A kind of drawing practice and system based on machine vision |
CN108564639A (en) * | 2018-04-27 | 2018-09-21 | 广州视源电子科技股份有限公司 | Person's handwriting store method, device, intelligent interaction device and readable storage medium storing program for executing |
Non-Patent Citations (1)
Title |
---|
邢淑敏等: "基于风格迁移技术的机器人书法临摹研究", 《机械制造》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11361505B2 (en) | Model retrieval for objects in images using field descriptors | |
EP4068150A1 (en) | Hand key point detection method, gesture recognition method, and related devices | |
Tagliasacchi et al. | Robust articulated‐icp for real‐time hand tracking | |
EP3454302B1 (en) | Approximating mesh deformation for character rigs | |
CN111844128A (en) | Track planning device and track planning method | |
KR101379074B1 (en) | An apparatus system and method for human-machine-interface | |
Pai et al. | Augmented reality–based programming, planning and simulation of a robotic work cell | |
CN109732593B (en) | Remote control method and device for robot and terminal equipment | |
Nishino et al. | 3d object modeling using spatial and pictographic gestures | |
CN111753739A (en) | Object detection method, device, equipment and storage medium | |
JP6055065B1 (en) | Character recognition program and character recognition device | |
CN112785712A (en) | Three-dimensional model generation method and device and electronic equipment | |
Cukovic et al. | Engineering design education for industry 4.0: implementation of augmented reality concept in teaching CAD courses | |
Cai et al. | Multi-modal transformer-based tactile signal generation for haptic texture simulation of materials in virtual and augmented reality | |
CN109993680A (en) | Writing imitates method, apparatus, electronic equipment and computer-readable medium | |
US20200098194A1 (en) | Virtual Reality Anchored Annotation Tool | |
CN116012913A (en) | Model training method, face key point detection method, medium and device | |
Kaushik et al. | Imitating human movement using a measure of verticality to animate low degree-of-freedom non-humanoid virtual characters | |
WO2020067204A1 (en) | Learning data creation method, machine learning model generation method, learning data creation device, and program | |
Martinez et al. | 3D reconstruction with a markerless tracking method of flexible and modular molecular physical models: Towards tangible interfaces | |
EP4275176A1 (en) | Three-dimensional scan registration with deformable models | |
KR20200059465A (en) | Method and apparatus for controlling a drawing robot based on image | |
Chan et al. | Emotion Transfer for 3D Hand Motion using StarGAN | |
Endo et al. | Teaching handwriting using robot and onomatopoeia | |
US8890889B1 (en) | System and method for generating a pose of an object |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190709 |
|
RJ01 | Rejection of invention patent application after publication |