CN109741426A - A kind of caricature form method for transformation and device - Google Patents

A kind of caricature form method for transformation and device Download PDF

Info

Publication number
CN109741426A
CN109741426A CN201910064635.0A CN201910064635A CN109741426A CN 109741426 A CN109741426 A CN 109741426A CN 201910064635 A CN201910064635 A CN 201910064635A CN 109741426 A CN109741426 A CN 109741426A
Authority
CN
China
Prior art keywords
dialog box
layer
image
mirror
file
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.)
Granted
Application number
CN201910064635.0A
Other languages
Chinese (zh)
Other versions
CN109741426B (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.)
Shenzhen Maverick Animation Technology Co Ltd
Original Assignee
Shenzhen Maverick Animation 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 Shenzhen Maverick Animation Technology Co Ltd filed Critical Shenzhen Maverick Animation Technology Co Ltd
Priority to CN201910064635.0A priority Critical patent/CN109741426B/en
Publication of CN109741426A publication Critical patent/CN109741426A/en
Application granted granted Critical
Publication of CN109741426B publication Critical patent/CN109741426B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of caricature form method for transformation and devices, wherein the method includes obtaining and handling page to be converted to overflow file, to obtain dialog box image layer, text layer and other image layers;It analyzes the parameter and location information of dialog box image layer, text layer and other image layers respectively based on preset algorithm, overflows the positional relationship in file to obtain dialog box image layer, text layer and other image layers in page to be converted;File is overflow for item according to preset rules reduction dialog box figure layer, text layer and other figure layers based on positional relationship.Scheme disclosed by the invention can be improved the unrestrained transfer efficiency for being automatically converted to item and overflowing of page.

Description

A kind of caricature form method for transformation and device
Technical field
The invention belongs to digital image processing fields, and in particular to a kind of caricature form method for transformation and device.
Background technique
Caricature is a kind of depth by the favorite publication of China and foreign countries reader especially juvenile readers, generally by multiple picture groups and A small amount of text composition.In digital times, digitlization creation, which has been compared, to be popularized, and author is using tools such as photoshop in electricity It is created in sub- terminal, in order to digitized propagation, publication, works are usually with the page of common paper book in creation Face size carries out layout, has the biggish page.With popularizing for smart machine, caricature is read on intelligent devices Demand is increasing, and the biggish page is not suitable for smart machine (such as smart phone) lesser screen, can not be completely clear Entire caricature is watched clearly, needs to drag picture to and fro up and down, and reading experience is poor.
The unrestrained unrestrained method of item that turns of traditional page is manually to intercept each image respectively by the direct operation overflow to original page Figure layer, text layer and dialog box figure layer, then paste and classify respectively in new file, and a page is unrestrained to need about hour It is handled, inefficiency, lost labor's cost and time.Existing mobile terminal generates lattice caricature technology and then still needs Manual intervention is wanted to carry out image zooming-out, efficiency is lower.
Therefore, how to improve the unrestrained unrestrained transfer efficiency of item that is automatically converted to of page becomes technical problem urgently to be resolved.
Summary of the invention
The technical problem to be solved in the present invention is that how to improve, page is unrestrained to be automatically converted to the unrestrained transfer efficiency of item.
For this purpose, according in a first aspect, the embodiment of the invention discloses a kind of caricature form method for transformation, comprising:
It obtains and handles page to be converted and overflow file, to obtain dialog box image layer, text layer and other image layers; Analyze the parameter and location information of dialog box image layer, text layer and other image layers respectively based on preset algorithm, with It obtains dialog box image layer, text layer and other image layers and overflows the positional relationship in file in page to be converted;Based on position It is that item overflows file that relationship, which is set, according to preset rules reduction dialog box figure layer, text layer and other figure layers.
Optionally, the ginseng of dialog box image layer, text layer and other image layers is analyzed respectively based on preset algorithm Several and location information is overflow in file with obtaining dialog box image layer, text layer and other image layers in page to be converted Positional relationship includes: to analyze other image layers and dialog box image layer respectively based on frame recognizer, divides mirror to obtain Frame and dialog box frame;Dialog box mass center and/or dialog box tip in dialog box image layer are analyzed based on image algorithm, with Based on dialog box mass center and/or dialog box tip relative to the position for dividing mirror frame, determine dialog box divides mirror to belong to;According to text The parameter of this figure layer determines text layer and corresponding dialog box figure layer and/or divides the binding relationship between mirror.
Optionally, other image layers and dialog box image layer are analyzed based on frame recognizer respectively, to be divided Mirror frame and dialog box frame include: that the outer profile of image in other image layers is obtained and arranged based on predetermined manner, to obtain Take a point mirror frame coordinate;Divide mirror coordinate based on what preset computation rule calculated image in other image layers, divides mirror to obtain Sequentially;The outer profile of image in dialog box image layer is obtained and arranges, based on predetermined manner to obtain dialog box frame coordinate; The dialog box center-of-mass coordinate of image in dialog box image layer is calculated, based on preset computation rule to obtain dialog box sequence.
It optionally, is item according to preset rules reduction dialog box figure layer, text layer and other figure layers based on positional relationship Unrestrained file includes: to divide mirror according to dividing mirror sequence to overflow in file filling in item;Based on dividing between mirror coordinate and dialog box center-of-mass coordinate Mapping relations determine item overflow file in dialog box mass center position coordinates;It is sat according to the position that item overflows dialog box mass center in file It is marked on item and overflows filling dialog box figure layer in file;It is obtained and dialog box figure layer and/or the text for dividing mirror to bind based on binding relationship Layer position, and overflow in item and fill text layer in file.
Optionally, according to divide mirror sequence item overflow in file filling divide mirror include: judgement divide mirror item overflow in file whether It fills plentiful;If it is plentiful without filling in file to divide mirror to overflow in item, amplification divides mirror so as to which mirror is divided to overflow file in item after filling Interior filling is plentiful.
According to second aspect, the embodiment of the invention provides a kind of caricature form reforming units, comprising:
File analyzing module overflows file for obtaining and handling page to be converted, to obtain dialog box image layer, text diagram Layer and other image layers;Figure layer analysis module, for analyzing dialog box image layer, text layer respectively based on preset algorithm With the parameter and location information of other image layers, existed with obtaining dialog box image layer, text layer and other image layers Page to be converted overflows the positional relationship in file;Figure layer recovery module is talked with for being restored based on positional relationship according to preset rules Block diagram layer, text layer and other figure layers are that item overflows file.
Optionally, figure layer analysis module includes: frame recognition unit, for analyzing other respectively based on frame recognizer Image layer and dialog box image layer divide mirror frame and dialog box frame to obtain;Mirror is divided to belong to unit, for being based on image Algorithm analyzes dialog box mass center and/or dialog box tip in dialog box image layer, to be based on dialog box mass center and/or dialog box Relative to the position for dividing mirror frame, determine dialog box divides mirror to belong at tip;Binding relationship unit, for according to text layer Parameter determines text layer and corresponding dialog box figure layer and/or divides the binding relationship between mirror.
Optionally, figure layer recovery module includes: a point mirror fills unit, divides mirror sequence to overflow in file in item for basis and fills Divide mirror;Coordinate determination unit, for determining that item overflows file based on the mapping relations divided between mirror coordinate and dialog box center-of-mass coordinate The position coordinates of interior dialog box mass center;Dialog box fills unit, for overflowing the position coordinates of dialog box mass center in file according to item Filling dialog box figure layer in file is overflow in item;Text fills unit, for based on binding relationship obtain with dialog box figure layer and/or Divide the text layer position of mirror binding, and is overflow in item and fill text layer in file.
Optionally, frame recognition unit includes: a point mirror coordinate unit, for being obtained based on predetermined manner and arranging other figures As the outer profile of image in figure layer, divide mirror frame coordinate to obtain;Divide mirror sequential cell, by based on preset computation rule That calculates image in other image layers divides mirror coordinate, divides mirror sequence to obtain;Dialog box coordinate unit, for being based on predetermined manner The outer profile of image in dialog box image layer is obtained and arranges, to obtain dialog box frame coordinate;Dialog box sequential cell is used It is suitable to obtain dialog box in the dialog box center-of-mass coordinate for calculating image in dialog box image layer based on preset computation rule Sequence.
According to the third aspect, the present invention provides a kind of computer installation, including processor, processor is for executing storage The computer program stored in device realizes the caricature form method for transformation of above-mentioned first aspect any one.
According to fourth aspect, the present invention provides a kind of computer readable storage mediums, are stored thereon with computer program, Processor is used to execute the computer program stored in storage medium and realizes that the caricature form of above-mentioned first aspect any one turns Change method.
The beneficial effects of the present invention are:
A kind of caricature form method for transformation and device disclosed by the embodiments of the present invention overflow file to page to be processed first and carry out Processing divides according to preset algorithm respectively later to obtain dialog box image layer, text layer and other image layers respectively Analyse dialog box image layer, text layer and other image layers, thus obtain dialog box image layer, text layer and other Image layer overflows the parameter and positional relationship in file in page to be converted, is finally distinguished based on the positional relationship according to preset rules Dialog box image layer, text layer and other image layers are restored, so that realizing that page is unrestrained is converted into the unrestrained operation of item.Relative to It needs manually to carry out figure layer interception in the prior art and pastes to realize that page is unrestrained and be converted into the unrestrained scheme of item, the embodiment of the present invention is public The scheme opened can overflow each figure layer in file to page to be converted automatically and be handled and be extracted, and by after to extraction Each figure layer is handled to obtain the positional relationship of text layer parameter and each figure layer in the unrestrained file of page to be converted, finally Item is reduced to according to the positional relationship and overflows file, to reduce cost of labor, and is improved transfer efficiency, is reduced Conversion time.
Detailed description of the invention
It, below will be to specific in order to illustrate more clearly of the specific embodiment of the invention or technical solution in the prior art Embodiment or attached drawing needed to be used in the description of the prior art be briefly described, it should be apparent that, it is described below Attached drawing is some embodiments of the present invention, for those skilled in the art, without creative efforts, It is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow chart of caricature form method for transformation of the embodiment of the present invention;
Fig. 2 is the specific flow chart of step in a kind of caricature form method for transformation of the embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of caricature form reforming unit of the embodiment of the present invention.
Specific embodiment
Technical solution of the present invention is clearly and completely described below in conjunction with attached drawing, it is clear that described implementation Example is a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill Personnel's every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
In order to more clearly be illustrated to the application, first some terms being related to are explained as follows below:
Point mirror: independent subgraph, a width caricature by least one divide microscope group at.One point of mirror generally includes three portions Point:
1) image layer includes the image content portion divided in mirror;
2) text layer, the dialogue part of role;
3) dialog box figure layer plays compartmentation to text layer and image layer.
Only divide mirror comprising image layer it should be noted that also having.
Referring to FIG. 1, for a kind of flow chart of caricature form method for transformation disclosed in the present embodiment, caricature form conversion Method includes:
Step S101, obtain and handle page to be converted overflow file, with obtain dialog box image layer, text layer and other Image layer.
Wherein, the unrestrained file of page to be converted refers to the unrestrained image file of page to be converted, other image layers refer in addition to dialogue All Layers except block diagram layer and text layer.It in a particular embodiment, can be respectively by dialog box image layer, text diagram Layer and the output of other image layers are literary with its one-to-one dialog box image file, text layer parameter and other images Part.Namely: dialog box figure layer is exported as dialog box image file, it will be all other than dialog box figure layer and text layer Figure layer output is other image files.
It should be noted that above-mentioned mentioned output dialog box image file, other image files are only to be convenient for ability Technical staff understands cited example in domain, can not be considered the restriction to this programme technology contents, using other to point The method and mode that tomographic image file format is handled, which reach, should be considered as with the scheme of this programme same technique effect at this Within the protection scope of scheme.
In a particular embodiment, overflowing picture to carry out processing to page to be converted may include: to delete invisible figure layer, will lock Layer unlock, sanction removes redundance, and makes whole picture figure placed in the middle.
In the specific implementation process, the picture file that user can first overflow the page converted arranges as a text Part folder, the entire file of automatically scanning obtain page to be converted and overflow picture, automatically open picture file followed by script and carry out Processing, such as: Photoshop (hereinafter referred to as: PS) script can be used and automatically open PS software, and beaten automatically in PS software Open picture file to be processed.In a particular embodiment, user can adjust various Transformation Parameters in advance, such as: divide mirror spacing, The amplification factor of the spacing of every page of caricature, the spacing for dividing mirror to overflow file boundaries with item, font and dialog box divides mirror figure layer to retouch side picture Element value etc..
It should be noted that above-mentioned mentioned being handled based on PS script is only managed convenient for those skilled in that art The cited example of solution, can not be considered the restriction to this programme technology contents, using other to layered image file format The method and mode handled reaches the protection scope that should be considered as with the scheme of this programme same technique effect in this programme Within.
Step S102 analyzes dialog box image layer, text layer and other image layers based on preset algorithm respectively Parameter and location information are overflow in file with obtaining dialog box image layer, text layer and other image layers in page to be converted Positional relationship.
In the present embodiment, referring to FIG. 2, being the flow chart of step S102, step S102 can also include:
Step S1021 analyzes other image layers and dialog box image layer based on frame recognizer respectively, to obtain Divide mirror frame and dialog box frame.
In a particular embodiment, step S1021 includes: and is obtained and arranged in other image layers based on predetermined manner to scheme again The outer profile of picture divides mirror frame coordinate to obtain;Divide mirror based on what preset computation rule calculated image in other image layers Coordinate divides mirror sequence to obtain;The outer profile of image in dialog box image layer is obtained and arranges, based on predetermined manner to obtain Dialog box frame coordinate;The dialog box center-of-mass coordinate of image in dialog box image layer is calculated based on preset computation rule, with Obtain dialog box sequence.
It in the specific implementation process, can be first to acquisition in obtaining other image layers before the outer profile of image To other image layers in each image pre-processed, such as: convert gray level image for image, calculated using canny Method extracts image border, reuses Morphology Algorithm and expands to image.Secondly, determining image using edge following algorithm Outer profile is arranged the outer profile of image by algorithm of convex hull after determining outer profile, and forms the convex polygon for surrounding frame, thus Determine each point of mirror frame coordinate in image.In the specific implementation process, for the frame containing bevel edge, hough can be used It converts algorithm and identifies straight line, thus identification of the enhancing to frame.Finally each point is calculated in image based on preset computation rule The coordinate of mirror divides mirror sequence to obtain.In the specific implementation process, the center-of-mass coordinate determination of mirror can be divided to divide mirror by calculating Sequentially.Specific calculating process is listed below:
The digital picture (i, j) of one width M*N, p+q rank geometric moment mpqAre as follows:
Wherein f (i, j) is gray value of the image at coordinate points (i, j).ThenIt is sat for the mass center of image Mark.
For each point of mirror, the center-of-mass coordinate of mirror is divided to divide mirror place paging upper left from this by dividing the center-of-mass coordinate of mirror to calculate The distance at angle, and then each divide mirror in the foundation of the sequence of current paging for the result of calculated distance as determination.
It should be noted that the above-mentioned mentioned Processing Algorithm and computation rule to image is only to be convenient for skill in the art Art personnel understand cited example, the restriction to this programme technology contents can not be considered, using other places to image Adjustment method and computation rule reach with the scheme of this programme same technique effect should be considered as this programme protection scope it It is interior.
Step S1022 analyzes dialog box mass center and/or dialog box tip in dialog box image layer based on image algorithm, With based on dialog box mass center and/or dialog box tip, relative to the position for dividing mirror frame, determine dialog box divides mirror to belong to.
Each dialog box image file handle and then obtains dialog box frame coordinate and center-of-mass coordinate, in turn The scheme for obtaining dialog box sequence please refers to described in step S1021.
In the present embodiment, in analysis dialog box image layer the tip of dialog box relative to the position for dividing mirror frame, To determine when mirror being divided to belong to of dialog box, Fast algorithm can be used, the pixel value to make a circle in candidate feature point week is detected, if There is the gray value difference of enough pixel and the candidate feature point enough big around candidate feature point in field, then it is assumed that the time Selecting characteristic point is a characteristic point.
Wherein I (x) is the gray scale at any point on circumference, and I (p) is the gray scale in the center of circle, εdThreshold value is obtained for gray value differences, such as Fruit N be greater than given threshold value, generally around one punctuate 3/4ths, then it is assumed that p is a characteristic point, i.e., with field around it Interior enough pixels are in the pixel in different regions.At this time it is considered that point p is exactly the tip location of dialog box, lead to The position for crossing the tip can determine which dialog box belongs to and divide mirror.
It should be noted that the image algorithm at above-mentioned mentioned determination dialog box tip is only to be convenient for technology in the art Personnel understand cited example, can not be considered the restriction to this programme technology contents, be reached using other image algorithms It should be considered as within the protection scope of this programme to the scheme with this programme same technique effect.
Step S1023 determines text layer and corresponding dialog box figure layer according to the parameter of text layer and/or divides mirror Between binding relationship.
In a particular embodiment, text layer can correspond to an at most dialog box, can not also correspond to dialog box.
In the specific implementation process, the position of text layer is determined according to the text layer parameter got in step S101 It sets, in the case where text layer does not correspond to dialog box, divides mirror position according to what is determined in step S1021, determine text layer The binding relationship of opposite position divided between mirror is in it;In the case where text layer corresponds to dialog box, text is first determined Binding relationship between this figure layer and its dialog box figure layer for being in opposite position, then according to determination in step S1022 Dialog box divides mirror to belong to, and determines the binding relationship having between the text layer of dialog box and corresponding point of mirror.
Step S103, restoring dialog box figure layer, text layer and other figure layers according to preset rules based on positional relationship is Item overflows file.
In a particular embodiment, step S103 includes: to divide mirror according to dividing mirror sequence to overflow in file filling in item;Based on dividing mirror Corresponding relationship between coordinate and dialog box center-of-mass coordinate determines that item overflows the position coordinates of dialog box mass center in file;It is unrestrained according to item The position coordinates of dialog box mass center overflow filling dialog box figure layer in file in item in file;Based on binding relationship acquisition and dialog box Figure layer and/or the text layer position for dividing mirror to bind, and overflow in item and fill text layer in file.Wherein, according to divide mirror sequence Overflow in file filling in item and divide mirror further include: judgement divide mirror item overflow whether filled in file it is plentiful;If dividing mirror in the unrestrained text of item In part without fill it is plentiful, then fill after amplification divide mirror so that divide mirror item overflow filled in file it is plentiful.
Divide mirror position by what is determined in step S102 first and divide mirror sequence, is set in advance based on user in step S101 All points of mirrors are sequentially filled by the Transformation Parameters set in sequence to be overflow in file in item, in the specific implementation process, is first determined whether Whether point mirror can overflow in item is filled plentiful in file, for that can fill up the mirror that divides of a line, it is unrestrained to be directly filled into item in order In file;Appropriate amplification is carried out for the mirror that divides of a line can not be filled up, after duplication to be subsequently filled, and enables score mirror in the unrestrained text of item Filling is plentiful in part.In the specific implementation process, can by after dividing mirror to fill it is new divide mirror frame coordinate and amplify after talk with Relationship between block diagram layer and the frame coordinate of text layer is adjusted the position of dialog box.
Secondly, dialog box center-of-mass coordinate and its punished mirror coordinate by being calculated in step S102, so that it is unrestrained to calculate page Corresponding relationship in file between dialog box center-of-mass coordinate and its punished mirror coordinate, then overflows according to page and divides mirror and item in file The mapping relations for dividing mirror in unrestrained file obtain the position coordinates that item overflows dialog box mass center in file, then glue dialog box figure layer It is labelled to corresponding position.Finally, according to determining text layer and dialog box figure layer and/or divide binding relationship between mirror, it will Text layer is packed into item and overflows in file, realizes that page overflows the reduction of whole figure layers in file, is converted into item to realize that page overflows file The purpose of unrestrained file.
The present embodiment overflows file to page to be processed first and handles, to obtain dialog box image layer, text respectively Figure layer and other image layers, analyze dialog box image layer, text layer and other images respectively according to preset algorithm later Figure layer, thus obtain dialog box image layer, text layer and other image layers page to be converted overflow file in parameter and Positional relationship, finally based on the positional relationship restored respectively according to preset rules dialog box image layer, text layer and other Image layer, so that realizing that page is unrestrained is converted into the unrestrained operation of item.Need manually to carry out in compared with the existing technology figure layer interception and It pastes to realize that page is unrestrained and be converted into the unrestrained scheme of item, scheme disclosed by the embodiments of the present invention can overflow file to page to be converted automatically In each figure layer handled and extracted, and by being handled to obtain text layer parameter to each figure layer after extraction And each figure layer overflows the positional relationship in file in page to be converted, is finally reduced to the unrestrained text of item according to the positional relationship Part to reduce cost of labor, and improves transfer efficiency, reduces conversion time.
The present embodiment also discloses a kind of caricature form reforming unit, referring to FIG. 3, being the caricature form reforming unit knot Structure schematic diagram, the caricature form reforming unit include:
File analyzing module 201 overflows file for obtaining and handling page to be converted, to obtain dialog box image layer, text This figure layer and other image layers;Figure layer analysis module 202, for based on preset algorithm analyze respectively dialog box image layer, The parameter and location information of text layer and other image layers, to obtain dialog box image layer, text layer and other figures As figure layer overflows the positional relationship in file in page to be converted;Figure layer recovery module 203, for being based on positional relationship according to default rule Then restoring dialog box figure layer, text layer and other figure layers is that item overflows file.
In optionally embodiment, figure layer analysis module 202 includes: frame recognition unit, for being calculated based on frame identification Method analyzes other image layers and dialog box image layer respectively, divides mirror frame and dialog box frame to obtain;Divide mirror ownership single Member, for analyzing dialog box mass center and/or dialog box tip in dialog box image layer based on image algorithm, to be based on dialog box Relative to the position for dividing mirror frame, determine dialog box divides mirror to belong to for mass center and/or dialog box tip;Binding relationship unit is used In determining text layer and corresponding dialog box figure layer according to text layer parameter and/or divide the binding relationship between mirror.
In optionally embodiment, figure layer recovery module 203 includes: a point mirror fills unit, divides mirror sequence to exist for basis Item overflows filling in file and divides mirror;Coordinate determination unit, for being closed based on the mapping divided between mirror coordinate and dialog box center-of-mass coordinate It is to determine that item overflows the position coordinates of dialog box mass center in file;Dialog box fills unit, for overflowing dialog box in file according to item The position coordinates of mass center overflow filling dialog box figure layer in file in item;Text fills unit, for based on binding relationship obtain with Dialog box figure layer and/or the text layer position for dividing mirror to bind, and overflow in item and fill text layer in file.
In optionally embodiment, frame recognition unit includes: a point mirror coordinate unit, for being obtained simultaneously based on predetermined manner The outer profile of image in other image layers is arranged, divides mirror frame coordinate to obtain;Divide mirror sequential cell, for based on preset What computation rule calculated image in other image layers divides mirror coordinate, divides mirror sequence to obtain;Dialog box coordinate unit is used for base The outer profile of image in dialog box image layer is obtained and arranges in predetermined manner, to obtain dialog box frame coordinate;Dialog box Sequential cell, for calculating the dialog box center-of-mass coordinate of image in dialog box image layer based on preset computation rule, to obtain Take dialog box sequence.
In addition, also providing a kind of computer installation in the embodiment of the present invention, processor, which passes through, executes the computer instruction, To realize following methods:
It obtains and handles page to be converted and overflow file, to obtain dialog box image layer, text layer and other image layers; Analyze the parameter and location information of dialog box image layer, text layer and other image layers respectively based on preset algorithm, with It obtains dialog box image layer, text layer and other image layers and overflows the positional relationship in file in page to be converted;Based on position It is that item overflows file that relationship, which is set, according to preset rules reduction dialog box figure layer, text layer and other figure layers.
It is that can lead to it will be understood by those skilled in the art that realizing all or part of the process in above-described embodiment method Computer program is crossed to instruct relevant hardware and complete, the program can be stored in a computer-readable storage medium In, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic Dish, CD, read-only memory (ROM) or random access memory (RAM) etc..Computer processor is situated between for executing storage The computer program stored in matter realizes following methods:
It obtains and handles page to be converted and overflow file, to obtain dialog box image layer, text layer and other image layers; Analyze the parameter and location information of dialog box image layer, text layer and other image layers respectively based on preset algorithm, with It obtains dialog box image layer, text layer and other image layers and overflows the positional relationship in file in page to be converted;Based on position It is that item overflows file that relationship, which is set, according to preset rules reduction dialog box figure layer, text layer and other figure layers.
What has been described above is only an embodiment of the present invention, and the common sense such as well known specific structure and characteristic are not made herein in scheme Excessive description.It, without departing from the structure of the invention, can be with it should be pointed out that for those skilled in the art Make several modifications and improvements.These also should be considered as protection scope of the present invention, these all will not influence what the present invention was implemented Effect and patent practicability.The scope of protection required by this application should be based on the content of the claims, in specification The records such as specific embodiment can be used for explaining the content of claim.

Claims (10)

1. a kind of caricature form method for transformation characterized by comprising
It obtains and handles page to be converted and overflow file, to obtain dialog box image layer, text layer and other image layers;
Analyze the dialog box image layer, the ginseng of the text layer and other image layers respectively based on preset algorithm Several and location information, with obtain the dialog box image layer, the text layer and other described image layers it is described to Convert the positional relationship in the unrestrained file of page;
The dialog box figure layer, the text layer and other described figure layers are restored according to preset rules based on the positional relationship File is overflow for item.
2. caricature form method for transformation as described in claim 1, which is characterized in that described to analyze institute respectively based on preset algorithm The parameter and location information of dialog box image layer, the text layer and other image layers are stated, it is described right to obtain It talks about frame image layer, the text layer and other described image layers and overflows the positional relationship packet in file in the page to be converted It includes:
It analyzes other described image layers and the dialog box image layer respectively based on frame recognizer, divides mirror side to obtain Frame and dialog box frame;
Dialog box mass center and/or dialog box tip in the dialog box image layer are analyzed based on image algorithm, based on described Relative to the position for dividing mirror frame, determine dialog box divides mirror to belong to for dialog box mass center and/or the dialog box tip;
Determine the text layer and the corresponding dialog box figure layer according to the parameter of the text layer and/or divide mirror it Between binding relationship.
3. caricature form method for transformation as claimed in claim 2, which is characterized in that described to be divided respectively based on frame recognizer Other described image layers and the dialog box image layer are analysed, divides mirror frame with acquisition and dialog box frame includes:
It is obtained based on predetermined manner and arranges the outer profile of image in other described image layers, divide mirror frame coordinate to obtain;
Divide mirror coordinate based on what preset computation rule calculated image in other described image layers, divides mirror sequence to obtain;
The outer profile of image in the dialog box image layer is obtained and arranges, based on the predetermined manner to obtain dialog box side Frame coordinate;
The dialog box center-of-mass coordinate of image in the dialog box image layer is calculated, based on the preset computation rule to obtain Dialog box sequence.
4. caricature form method for transformation as claimed in claim 3, which is characterized in that described to be based on the positional relationship according to pre- If it is that the unrestrained file of item includes: that rule, which restores the dialog box figure layer, the text layer and other described figure layers,
Divide mirror sequence to overflow in file filling in item to divide mirror according to described;
It determines that the item is overflow in file based on the mapping relations divided between mirror coordinate and the dialog box center-of-mass coordinate to talk with The position coordinates of frame mass center;
It is overflow in file according to the position coordinates that the item overflows dialog box mass center in file in the item and fills the dialog box figure layer;
Based on binding relationship acquisition and the dialog box figure layer and/or the text layer position for dividing mirror to bind, and The item overflows the filling text layer in file.
5. caricature form method for transformation as claimed in claim 4, which is characterized in that described to divide mirror sequence unrestrained in item according to Filling divides the mirror to include: in file
Divide described in judgement mirror item overflow whether filled in file it is plentiful;
If it is described divide mirror item overflow in file without fill it is not plentiful, filling after amplification described in divide mirror so that described divide mirror in item Filling is plentiful in unrestrained file.
6. a kind of caricature form reforming unit characterized by comprising
File analyzing module, for obtain and handle page to be converted overflow file, with obtain dialog box image layer, text layer and Other image layers;
Figure layer analysis module, for analyzing the dialog box image layer, the text layer and institute respectively based on preset algorithm State the parameter and location information of other image layers, with obtain the dialog box image layer, the text layer and it is described its His image layer overflows the positional relationship in file in the page to be converted;
Figure layer recovery module, for restoring the dialog box figure layer, the text according to preset rules based on the positional relationship Figure layer and other described figure layers are that item overflows file.
7. caricature form reforming unit as claimed in claim 6, which is characterized in that the figure layer analysis module includes:
Frame recognition unit, for analyzing other described image layers and the dialog box image respectively based on frame recognizer Figure layer divides mirror frame and dialog box frame to obtain;
Mirror is divided to belong to unit, for analyzing dialog box mass center and/or dialogue in the dialog box image layer based on image algorithm Frame tip, relative to the position for dividing mirror frame, to be determined based on the dialog box mass center and/or the dialog box tip pair Words frame divides mirror to belong to;
Binding relationship unit, for determining the text layer and the corresponding dialogue according to the parameter of the text layer Block diagram layer and/or divide binding relationship between mirror.
8. caricature form reforming unit as claimed in claim 7, which is characterized in that the frame recognition unit includes:
Divide mirror coordinate unit, for the outer profile of image in other described image layers to be obtained and arranged based on predetermined manner, with Acquisition divides mirror frame coordinate;
Point mirror sequential cell divides mirror coordinate for calculate image in other described image layers based on preset computation rule, Divide mirror sequence to obtain;
Dialog box coordinate unit, for the outer of image in the dialog box image layer to be obtained and arranged based on the predetermined manner Profile, to obtain dialog box frame coordinate;
Dialog box sequential cell, for calculating pair of image in the dialog box image layer based on the preset computation rule Frame center-of-mass coordinate is talked about, to obtain dialog box sequence.
9. a kind of computer installation, which is characterized in that including processor, the processor is based on executing and storing in memory Calculation machine program realizes the caricature form method for transformation such as claim 1-5 any one.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that processor is for executing The computer program stored in storage medium realizes the caricature form method for transformation as described in claim 1-5 any one.
CN201910064635.0A 2019-01-23 2019-01-23 Cartoon form conversion method and device Active CN109741426B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910064635.0A CN109741426B (en) 2019-01-23 2019-01-23 Cartoon form conversion method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910064635.0A CN109741426B (en) 2019-01-23 2019-01-23 Cartoon form conversion method and device

Publications (2)

Publication Number Publication Date
CN109741426A true CN109741426A (en) 2019-05-10
CN109741426B CN109741426B (en) 2023-04-25

Family

ID=66365828

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910064635.0A Active CN109741426B (en) 2019-01-23 2019-01-23 Cartoon form conversion method and device

Country Status (1)

Country Link
CN (1) CN109741426B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113505212A (en) * 2021-07-30 2021-10-15 北京华录新媒信息技术有限公司 Intelligent cartoon generation system and method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000194871A (en) * 1998-12-24 2000-07-14 Tokuma Shoten:Kk Cartoon preparation system and storage medium recording cartoon preparation program
JP2001338307A (en) * 2000-05-29 2001-12-07 Sharp Corp Electronic cartoon producing device and electronic cartoon display device
JP2002279398A (en) * 2001-03-19 2002-09-27 Square Co Ltd Comic strip browser and control method therefor, and program and program-recording medium for browsing the comic strip
KR101552509B1 (en) * 2015-05-07 2015-09-22 주식회사 탑코믹스 System for multi language support for a Webtoon
CN105528614A (en) * 2015-12-02 2016-04-27 北京大学 Cartoon image layout recognition method and automatic recognition system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000194871A (en) * 1998-12-24 2000-07-14 Tokuma Shoten:Kk Cartoon preparation system and storage medium recording cartoon preparation program
JP2001338307A (en) * 2000-05-29 2001-12-07 Sharp Corp Electronic cartoon producing device and electronic cartoon display device
JP2002279398A (en) * 2001-03-19 2002-09-27 Square Co Ltd Comic strip browser and control method therefor, and program and program-recording medium for browsing the comic strip
KR101552509B1 (en) * 2015-05-07 2015-09-22 주식회사 탑코믹스 System for multi language support for a Webtoon
CN105528614A (en) * 2015-12-02 2016-04-27 北京大学 Cartoon image layout recognition method and automatic recognition system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113505212A (en) * 2021-07-30 2021-10-15 北京华录新媒信息技术有限公司 Intelligent cartoon generation system and method
CN113505212B (en) * 2021-07-30 2023-07-14 北京华录新媒信息技术有限公司 Intelligent cartoon generation system and method

Also Published As

Publication number Publication date
CN109741426B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
US20210256253A1 (en) Method and apparatus of image-to-document conversion based on ocr, device, and readable storage medium
CN109146892A (en) A kind of image cropping method and device based on aesthetics
JP6595714B2 (en) Method and apparatus for generating a two-dimensional code image having a dynamic effect
EP2835762B1 (en) Face recognition method and device
CN110473141A (en) Image processing method, device, storage medium and electronic equipment
CN109829437A (en) Image processing method, text recognition method, device and electronic system
CN109410215A (en) Image processing method, device, electronic equipment and computer-readable medium
CN109117846B (en) Image processing method and device, electronic equipment and computer readable medium
CN106485720A (en) Image processing method and device
CN109472249A (en) A kind of method and device of determining script superiority and inferiority grade
CN109255826B (en) Chinese training image generation method, device, computer equipment and storage medium
CN111738280A (en) Image identification method, device, equipment and readable storage medium
CN105550641B (en) Age estimation method and system based on multi-scale linear differential texture features
CN114429637B (en) Document classification method, device, equipment and storage medium
CN110163866A (en) A kind of image processing method, electronic equipment and computer readable storage medium
WO2021115403A1 (en) Image processing method and apparatus
CN109858409A (en) Manual figure conversion method, device, equipment and medium
CN114255337A (en) Method and device for correcting document image, electronic equipment and storage medium
CN111667556A (en) Form correction method and device
CN110633640A (en) Method for identifying complex scene by optimizing PointNet
CN114239508A (en) Form restoration method and device, storage medium and electronic equipment
KR101262164B1 (en) Method for generating high resolution depth image from low resolution depth image, and medium recording the same
CN109741426A (en) A kind of caricature form method for transformation and device
CN116703777A (en) Image processing method, system, storage medium and electronic equipment
CN114511862B (en) Form identification method and device and electronic equipment

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
GR01 Patent grant
GR01 Patent grant