CN108241861A - A kind of data visualization method and equipment - Google Patents
A kind of data visualization method and equipment Download PDFInfo
- Publication number
- CN108241861A CN108241861A CN201810009644.5A CN201810009644A CN108241861A CN 108241861 A CN108241861 A CN 108241861A CN 201810009644 A CN201810009644 A CN 201810009644A CN 108241861 A CN108241861 A CN 108241861A
- Authority
- CN
- China
- Prior art keywords
- geometric
- pel
- layer
- input picture
- composition information
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/26—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/001—Texturing; Colouring; Generation of texture or colour
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Character Input (AREA)
Abstract
This application provides a kind of data visualization method and equipment, the program is after input picture is obtained, the input picture is pre-processed, obtain the composition information of geometric figure and text in the input data, then the composition information of composition information and text for being based respectively on geometric figure is handled, first figure layer is generated according to the composition information of the geometric figure, and the second figure layer is generated according to the composition information of the text, finally merge the first figure layer and the second figure layer, so as to rapidly realize image data visualization reconstruct, reduction, generation meets the desired the visual design of user.
Description
Technical field
This application involves information technology field more particularly to a kind of data visualization method and equipment.
Background technology
Data visualization and visual analysis as help user efficiently, accurate understanding data, interacted point with reference to data
The important means understood is analysed, is become more and more important in data age.Compared to traditional chart, data visualization can be with more
Vividly, the meaning of data is presented in friendly form immediately.In every field, data visualization and visual analysis can help user
It was found that traffic issues, increasingly become a ring indispensable in big data solution.How for data quickly design one
A visualization scheme is simultaneously allowed to rapid, without threshold is reconstructed, restores in terminal device, and further being optimized, raw
Into desired the visual design, this technology or product are still short of at present.
Apply for content
The purpose of the application is to provide a kind of scheme of data visualization, rapidly to realize that image data is visual
Change reconstruct, reduction, generation meets the desired the visual design of user.
To achieve the above object, this application provides a kind of data visualization method, this method includes:
The geometric figure and text pattern are identified in the input image, and obtain geometric figure in the input data
With the composition information of text pattern;
First figure layer is generated, and give birth to according to the composition information of the text pattern according to the composition information of the geometric figure
Into the second figure layer;
According to first figure layer and second figure layer, visual image is generated.
Further, the geometric figure and text pattern are identified in the input picture, including:
Figure identification is carried out to the input picture, determines the text pattern in the input picture;
Its complementary graph in the input picture is determined as geometric figure, wherein, its described complementary graph is the input
Figure in image in addition to the text pattern.
Further, the figure identification is using OCR technique.
Further, the composition information includes the position letter of text pattern and geometric figure in the input picture
Breath.
Further, it before the geometric figure and text pattern being identified in the input picture, further includes:
Gridding processing is carried out to the input picture, divides multiple net regions;
Coordinate value of pixel of the composition information including text pattern and geometric figure in net region.
Further, the first figure layer is generated according to the composition information of the geometric figure, including:
The corresponding stroke information of the geometric figure is determined based on the composition information of the geometric figure;
Stroke segmentation is carried out according to the stroke information, the geometric figure is divided at least one pel;
The identification and fitting of straight line and/or curve are carried out to the pel, determines the corresponding straight line of the pel and/or song
Line;
By the corresponding straight line of pel and/or curve combination, first figure layer is generated.
Further, stroke segmentation is carried out according to the stroke information, the geometric figure is divided at least one figure
Member, including:
Inflection point in the geometric figure is determined according to the stroke information, wherein, the inflection point is bent in geometric figure
Rate is more than the position of preset value;
The geometric figure is divided by least one pel according to the inflection point.
Further, by the corresponding straight line of pel and/or curve combination, first figure layer is generated, including:
The corresponding straight line of the pel and/or curve are drawn successively, to the company of the corresponding straight line of the pel and/or curve
The place of connecing carries out fusion and regular, generation first figure layer.
Further, this method further includes:
Adjustment is optimized to the visual effect of figure in the visual image.
Another aspect based on the application additionally provides a kind of Data visualization apparatus, which includes:
Preprocessing module for identifying the geometric figure and text pattern in the input image, and obtains described defeated
Enter the composition information of geometric figure and text pattern in data;
Figure builds module, for generating the first figure layer according to the composition information of the geometric figure, and according to the text
The composition information of this figure generates the second figure layer;
Visualization structure module, according to first figure layer and second figure layer, generates visual image.
Further, the preprocessing module for carrying out figure identification to the input picture, determines the input figure
Text pattern as in;Its complementary graph in the input picture is determined as geometric figure, wherein, its described complementary graph is institute
State the figure in addition to the text pattern in input picture.
Further, the figure identification is using OCR technique.
Further, the composition information includes the position letter of text pattern and geometric figure in the input picture
Breath.
Further, the preprocessing module is additionally operable to identify the geometric figure and text in the input picture
Before this figure, gridding processing is carried out to the input picture, divides multiple net regions, wherein, the composition information packet
Include coordinate value of the pixel of text pattern and geometric figure in net region.
Further, the figure structure module, for determining the geometry based on the composition information of the geometric figure
The corresponding stroke information of figure;Stroke segmentation is carried out according to the stroke information, the geometric figure is divided at least one
Pel;The identification and fitting of straight line and/or curve are carried out to the pel, determines the corresponding straight line of the pel and/or curve;
By the corresponding straight line of pel and/or curve combination, first figure layer is generated.
Further, the figure structure module, for determining turning in the geometric figure according to the stroke information
Point, wherein, the inflection point is more than the position of preset value for geometric figure mean curvature;The geometric figure is divided according to the inflection point
It is segmented at least one pel.
Further, the figure structure module is right for drawing the corresponding straight line of the pel and/or curve successively
The junction of the corresponding straight line of the pel and/or curve carries out fusion and regular, generates first figure layer.
Further, which further includes:
Adjustment module optimizes adjustment for the visual effect to figure in the visual image.
In addition, present invention also provides a kind of Data visualization apparatus, which includes:
Processor;And
One or more machine readable medias of machine readable instructions are stored with, when the processor execution machine can
During reading instruction so that the equipment performs aforementioned data visualization method.
In the scheme that the application provides, after input picture is obtained, the input picture is pre-processed, obtains institute
The composition information of geometric figure and text in input data is stated, is then based respectively on the composition information of geometric figure and the structure of text
Figure information is handled, and the first figure layer and the composition according to the text are generated according to the composition information of the geometric figure
Information generate the second figure layer, finally merge the first figure layer and the second figure layer, so as to rapidly realize image data visualization reconstruct,
Reduction, generation meet the desired the visual design of user.
Description of the drawings
By reading the detailed description made to non-limiting example made with reference to the following drawings, the application's is other
Feature, objects and advantages will become more apparent upon:
Fig. 1 is a kind of process chart of data visualization method provided by the embodiments of the present application;
Fig. 2 is the schematic diagram of input picture in the embodiment of the present application;
Fig. 3 is to carry out the schematic diagram after gridding processing to input picture in the embodiment of the present application;
Fig. 4 is process chart when the first figure layer is generated in the embodiment of the present application;
Fig. 5 is the inflection point schematic diagram in input picture in the embodiment of the present application;
Fig. 6 is the schematic diagram of pel identification and fitting identified in the embodiment of the present application;
Fig. 7 is the display renderings for the first figure layer for not carrying out fusion and regular processing in the embodiment of the present application;
Fig. 8 is the display renderings for the first figure layer that fusion and regular processing have been carried out in the embodiment of the present application;
Fig. 9 is a kind of schematic diagram of Data visualization apparatus provided by the embodiments of the present application;
Figure 10 is the structure diagram of another Data visualization apparatus provided by the embodiments of the present application;
The same or similar reference numeral represents the same or similar component in attached drawing.
Specific embodiment
The application is described in further detail below in conjunction with the accompanying drawings.
In a typical configuration of this application, terminal, the equipment of service network include one or more processors
(CPU), input/output interface, network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media, can be by any side
Method or technology realize that information stores.Information can be computer-readable instruction, data structure, program device or other number
According to.The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM
(SRAM), dynamic random access memory (DRAM), other kinds of random access memory (RAM), read-only memory
(ROM), electrically erasable programmable read-only memory (EEPROM), fast flash memory bank or other memory techniques, CD-ROM (CD-
ROM), digital versatile disc (DVD) or other optical storages, magnetic tape cassette, magnetic tape disk storage or other magnetic storages
Equipment or any other non-transmission medium, available for storing the information that can be accessed by a computing device.
Fig. 1 shows a kind of data visualization method provided by the embodiments of the present application, and this method can be in all kinds of images
Graphic element be reconstructed, regenerate visual image, include following steps:
Step 101, input picture is pre-processed, to extract the required information of reconstruct.
Wherein, the input picture can be any form of image data got, such as scanning and printing original text, shine
The scan image that piece, Freehandhand-drawing original text etc. are got, hand-drawing image that user is inputted by hand drawing board or downloaded from network or its
Image of its user transmission etc..
The process of pretreatment can mainly include:The geometric figure and text diagram are identified in the input picture
Shape, and obtain the composition information of geometric figure and text pattern in the input data.Text pattern refers to digital, word figure
The number or word of Arabic numerals, letter, Chinese character in picture, such as input picture either other types.And the geometry
Figure refer in input picture " 1 " in all its complementary graphs, such as Fig. 2 other than text pattern, " 2 ", " 3 ", " 4 ",
" 2000 ", " moon " belong to text pattern, and the rectangle being made of four straight lines then belongs to geometric figure.
In actual scene, figure identification can be carried out to the input picture, first determine the text in the input picture
Then its complementary graph in input picture is determined as geometric figure by this figure, it is possible thereby to determine respectively several in input picture
What figure and text pattern.
Figure described in the embodiment of the present application is known otherwise, can arbitrarily can recognize that all kinds of words or number
The identification technology of word, such as OCR (Optical Character Recognition, optical character identification) technology.Due to OCR
When identifying word or number, the mode of stencil matching may be used, therefore all kinds of words and number can be preset
Masterplate, if the non-successful match of a certain figure in input picture, can not complete OCR identification, represent the figure and it is non-legible or
Number, therefore can be determined that the figure belongs to geometric figure.Still by taking Fig. 2 as an example, when carrying out OCR identifications, identify 1 " first,
Several text patterns such as " 2 ", " 3 ", " 4 ", " 2000 ", " moon ", when the rectangle formed to four straight lines is identified, due to nothing
Method obtains OCR recognition results, then as geometric figure.
The composition information of geometric figure and text pattern refers to text pattern and geometric figure in the input picture
Location information, the location information can represent text pattern and geometric figure in the input image where position, for follow-up weight
Composition picture provides foundation.According to the difference of practical application scene, which may be used Various types of data structure and is recorded,
Such as coordinate value of each pixel in record figure in the input picture, it can be determined based on these coordinate values each
The physical location of the pixel of figure, and then complete the reconstruct of figure.It, can be using each pixel as coordinate in actual scene
A unit on axis, so that each pixel in figure can be demarcated using a coordinate value.
In a kind of embodiment of the application, the geometric figure and text diagram can be identified in the input picture
Before shape, gridding processing is carried out to the input picture, divides multiple net regions, and at this time can be into one in composition information
It walks and is associated with the net region marked off so that the pixel comprising text pattern and geometric figure in composition information is in grid regions
Coordinate value in domain.By taking Fig. 2 as an example, gridding processing can be carried out to it, be divided into 12 net regions, be respectively labeled as 1
~No. 12 net regions, as shown in Figure 3.By taking the text pattern in " January " as an example, it is located at No. 5 net regions, thus composition information
In can to include it belong to coordinate in No. 5 net regions be (XX, YY).
Visualization reconstruct is carried out in certain specific application scenes of application scheme, such as to the input picture of Freehandhand-drawing
When, some optimization processings, such as denoising, binaryzation, smooth processing can be carried out to it, is made before its composition information is obtained
Obtaining its composition information extracted being capable of actual demand that is more accurate, being more in line with user.
Step S102 generates the first figure layer, and according to the text pattern according to the composition information of the geometric figure
Composition information generates the second figure layer.Figure has been divided into two classes, i.e. text pattern and geometric figure in the embodiment of the present application, due to
It reconstructs mode difference, therefore it is built to corresponding figure layer respectively, then to be combined.In the present embodiment, first
Figure layer and the second figure layer refer respectively to the geometric figure rebuild and text pattern forms figure layer.
When generating the first figure layer by the composition information of the geometric figure, step as shown in Figure 4 may be used:
Step S401, stroke structure, the corresponding pen of the geometric figure is determined based on the composition information of the geometric figure
Information is drawn, stroke information contains the curvature that each point on geometric figure is formed on lines, can be indicated by stroke information
Go out the trend of lines on geometric figure, such as when the curvature at certain point is very big, represent the lines of the figure at this point
Bending degree is bigger, if curvature very little, then it represents that lines herein are close to straight line.Such as the geometric figure in Fig. 2, pen
The curvature drawn at the point in information on rectangle on 4 angles is larger, and the curvature of other positions is 0.
Step S402, stroke segmentation.According to the stroke information carry out stroke segmentation, by the geometric figure be divided into
A few pel.Since any geometric figure theoretically can be regarded as by straight line and circle, circular arc, ellipse, elliptic arc etc.
Curve is built-up.Therefore stroke segmentation can be carried out bending degree to geometric figure according to represented by stroke information mean curvature,
Individual pel is divided into, each pel is straight line or a kind of any form of curve.
In actual scene, the concept of inflection point can be introduced, i.e., the position that geometric figure mean curvature is more than to preset value is true
It is set to inflection point.Due to having got stroke information, then can the geometric figure be determined according to the stroke information
In inflection point, the geometric figure is then divided at least one pel using the inflection point as cut-point.For example, in Fig. 2
In geometric figure, 4 angles are inflection point, as shown in figure 5, and it is possible thereby to be divided into 4 pels as shown in Figure 6, i.e., 4
Straight line.
Step S403, lines identification and fitting, due to only having carried out the segmentation of pel in step S402, for each figure
Member does not determine it is specifically the curve of straight line either which kind of form, it is therefore desirable to carry out straight line and/or song to the pel
The identification of line, to determine the corresponding straight line of the pel and/or curve, closer to the geometric figure in input picture.
When being identified, can all pels be carried out with a Straight Line Identification one by one first, determine whether straight line
According to as follows:I.e. in two end-point distances of pel and pel the ratio of the accumulation chord length of point sequence whether be more than one it is given
Threshold value.
Pel end-point distances computational methods are as follows:
The computational methods of the accumulation chord length of point sequence are as follows:
Wherein { P0,P1,P2…nIt is the point sequence for forming the pel, (x, y) value is to being each in the point sequence
The transverse and longitudinal coordinate of point.
Straight linear ratio R=d/L, R is closer to 1, then pel is closer to straight line.
For being determined as non-directional pel, then Curves Recognition is carried out to it.
When Curves Recognition is carried out in the embodiment of the present application, signified curve includes circle, circular arc, ellipse, elliptic arc, identification
The general equation of conic section being fitted according to the point sequence based on current pel.Equation is as follows:
Ax2+Bxy+Cy2+ Dx+Ey+F=0, wherein ABC are not all 0
It takes
I1=+0
I1、I2、I3Be conic section translation transformation and rotation transformation under invariant, K is constant under rotation transformation
Amount, works as I1=2When=0, K is also the invariant under translation transformation.WhenIt, will during less than some preset value close to 0
The pel is identified as circle, and either otherwise circular arc is oval or elliptic arc.
After straight line or all kinds of curves is identified, pel fitting is carried out, the purpose of pel fitting is so that manual draw
It is closer with recognition result, there is following model of fit for straight line:
Y=ax+b
There is following model of fit for curve:
Y=Ax2+Bxy+Cy2+Dx+Ey+F
Fitting is iterated using least median square regression algorithm, it is assumed that have n point in the point sequence of pel, be fitted mould
Type has p parameter, then step is as follows:
1st, in n point of pel point sequence, m point is chosen (m is more than p), it is desirable that m point is uniform as possible in point sequence
Distribution;
2nd, it is fitted m point one by one with model of fit;
3rd, digital simulation residual error;
1-3 is repeated, until regression criterion is less than the threshold value of setting.
The parameter in model of fit may act as the parameter in the quadratic equation of the curve at this time, determine the song as a result,
Line.
Based on above two fit approach, it may be determined that the corresponding straight line or curve of each pel in geometric figure.
In addition, other than the identification of above-mentioned pel, the mode being fitted, the artificial intelligence approaches such as neural network can also be based on
It realizes the reconstruct of geometric figure, such as is completed by training set to neural network after training, the geometric graph that will be got
Shape inputs neural network, may thereby determine that the geometric figure of the first figure layer of composition, and then generate the first figure layer.
Step S404, pel sequence combination, by the corresponding straight line of pel and/or curve combination, generates first figure layer.
Can be the pel sequence of extraction, such as according to sequence from left to right, from top to bottom when being split to geometric figure,
Pel is arranged, after identification and fitting is completed, it is corresponding straight equally can sequentially to draw each pel successively according to this
Line and/or curve, so as to generate the first figure layer.When drawing each pel, its junction can be carried out to merge and regular
Processing so that the display effect of the geometric figure in the first figure layer ultimately generated is more preferably.In actual scene, if at place before
The information of each inflection point is determined during reason, it, then can be according to the letter of inflection point since inflection point is the junction of each pel
Breath carries out corresponding fusion and regular processing, such as the display effect that Fig. 7 is the first figure layer for not carrying out fusion and regular processing
Fruit is schemed, and Fig. 8 is the display renderings for the first figure layer for having carried out fusion and regular processing.
When generating the second figure layer according to the composition information of the text pattern, since OCR skills may be used in text pattern
Art is identified, and can automatically identify corresponding text or number, and records the belonging positions of its pixel, and there is no need to again
It the processing such as is identified, is fitted, can the second figure layer directly be generated according to composition information.
According to first figure layer and second figure layer, two figure layers are merged by step S103, generation visualization
Image forms complete visualization scheme.Finally formed visual image can be exported as various shapes according to the demand of user
The image file of formula, such as polar plot, bitmap etc..
In actual scene, in order to enable final visualization scheme is more in line with the expection of user, can to it is described can
Visual effect depending on changing figure in image optimizes adjustment, such as the adjustment to carrying out color, size, layout etc..
Based on same inventive concept, a kind of Data visualization apparatus, the equipment pair are additionally provided in the embodiment of the present application
The method answered is the method in previous embodiment, and its principle solved the problems, such as is similar to this method.
Fig. 9 shows a kind of Data visualization apparatus provided by the embodiments of the present application, which includes at least pretreatment mould
Block 910, figure structure module 920 and visualization structure module 930.Wherein, the preprocessing module 910 is used in the input
The geometric figure and text pattern are identified in image, and obtains the structure of geometric figure and text pattern in the input data
Figure information.The figure structure module 920 is used to generate the first figure layer according to the composition information of the geometric figure, and according to institute
The composition information for stating text pattern generates the second figure layer.The visualization structure module 930 is according to first figure layer and described
Second figure layer generates visual image.
The input picture can be any form of image data got, such as scanning and printing original text, photo, Freehandhand-drawing
The scan image that original text etc. is got, the hand-drawing image or download or other users from network that user is inputted by hand drawing board
Image of transmission etc..
The process of pretreatment can mainly include:The geometric figure and text diagram are identified in the input picture
Shape, and obtain the composition information of geometric figure and text pattern in the input data.Text pattern refers to digital, word figure
The number or word of Arabic numerals, letter, Chinese character in picture, such as input picture either other types.And the geometry
Figure refer in input picture " 1 " in all its complementary graphs, such as Fig. 2 other than text pattern, " 2 ", " 3 ", " 4 ",
" 2000 ", " moon " belong to text pattern, and the rectangle being made of four straight lines then belongs to geometric figure.
In actual scene, figure identification can be carried out to the input picture, first determine the text in the input picture
Then its complementary graph in input picture is determined as geometric figure by this figure, it is possible thereby to determine respectively several in input picture
What figure and text pattern.
Figure described in the embodiment of the present application is known otherwise, can arbitrarily can recognize that all kinds of words or number
The identification technology of word, such as OCR (Optical Character Recognition, optical character identification) technology.Due to OCR
When identifying word or number, the mode of stencil matching may be used, therefore all kinds of words and number can be preset
Masterplate, if the non-successful match of a certain figure in input picture, can not complete OCR identification, represent the figure and it is non-legible or
Number, therefore can be determined that the figure belongs to geometric figure.Still by taking Fig. 2 as an example, when carrying out OCR identifications, identify 1 " first,
Several text patterns such as " 2 ", " 3 ", " 4 ", " 2000 ", " moon ", when the rectangle formed to four straight lines is identified, due to nothing
Method obtains OCR recognition results, then as geometric figure.
The composition information of geometric figure and text pattern refers to text pattern and geometric figure in the input picture
Location information, the location information can represent text pattern and geometric figure in the input image where position, for follow-up weight
Composition picture provides foundation.According to the difference of practical application scene, which may be used Various types of data structure and is recorded,
Such as coordinate value of each pixel in record figure in the input picture, it can be determined based on these coordinate values each
The physical location of the pixel of figure, and then complete the reconstruct of figure.It, can be using each pixel as coordinate in actual scene
A unit on axis, so that each pixel in figure can be demarcated using a coordinate value.
In a kind of embodiment of the application, the preprocessing module can identify described several in the input picture
Before what figure and text pattern, gridding processing is carried out to the input picture, divides multiple net regions, and composition at this time
It can be further associated in information with the net region marked off so that comprising text pattern and geometric figure in composition information
Coordinate value of the pixel in net region.By taking Fig. 2 as an example, gridding processing can be carried out to it, be divided into 12 grid regions
Domain is respectively labeled as 1~No. 12 net region, as shown in Figure 3.By taking the text pattern in " January " as an example, it is located at No. 5 grid regions
Domain, it is (XX, YY) that its coordinate belonged in No. 5 net regions thus can be included in composition information.
Visualization reconstruct is carried out in certain specific application scenes of application scheme, such as to the input picture of Freehandhand-drawing
When, some optimization processings, such as denoising, binaryzation, smooth processing can be carried out to it, is made before its composition information is obtained
Obtaining its composition information extracted being capable of actual demand that is more accurate, being more in line with user.
Figure two classes, i.e. text pattern and geometric figure are divided into the embodiment of the present application, since it reconstructs mode not
Together, therefore by it corresponding figure layer is built respectively, then to be combined.In the present embodiment, the first figure layer and the second figure
Layer refers respectively to the geometric figure rebuild and text pattern forms figure layer.
Figure builds mould 920 when generating the first figure layer by the composition information of the geometric figure, may be used such as Fig. 4
Shown step:
Step S401, stroke structure, the corresponding pen of the geometric figure is determined based on the composition information of the geometric figure
Information is drawn, stroke information contains the curvature that each point on geometric figure is formed on lines, can be indicated by stroke information
Go out the trend of lines on geometric figure, such as when the curvature at certain point is very big, represent the lines of the figure at this point
Bending degree is bigger, if curvature very little, then it represents that lines herein are close to straight line.Such as the geometric figure in Fig. 2, pen
The curvature drawn at the point in information on rectangle on 4 angles is larger, and the curvature of other positions is 0.
Step S402, stroke segmentation.According to the stroke information carry out stroke segmentation, by the geometric figure be divided into
A few pel.Since any geometric figure theoretically can be regarded as by straight line and circle, circular arc, ellipse, elliptic arc etc.
Curve is built-up.Therefore stroke segmentation can be carried out bending degree to geometric figure according to represented by stroke information mean curvature,
Individual pel is divided into, each pel is straight line or a kind of any form of curve.
In actual scene, the concept of inflection point can be introduced, i.e., the position that geometric figure mean curvature is more than to preset value is true
It is set to inflection point.Due to having got stroke information, then can the geometric figure be determined according to the stroke information
In inflection point, the geometric figure is then divided at least one pel using the inflection point as cut-point.For example, in Fig. 2
In geometric figure, 4 angles are inflection point, as shown in figure 5, and it is possible thereby to be divided into 4 pels as shown in Figure 6, i.e., 4
Straight line.
Step S403, lines identification and fitting, due to only having carried out the segmentation of pel in step S402, for each figure
Member does not determine it is specifically the curve of straight line either which kind of form, it is therefore desirable to carry out straight line and/or song to the pel
The identification of line, to determine the corresponding straight line of the pel and/or curve, closer to the geometric figure in input picture.
Figure builds module when being identified, and can all pels be carried out with a Straight Line Identification one by one first, judges
Whether be straight line foundation it is as follows:I.e. whether the ratio of the accumulation chord length of point sequence is big in two end-point distances of pel and pel
In a given threshold value.
Pel end-point distances computational methods are as follows:
The computational methods of the accumulation chord length of point sequence are as follows:
Wherein { P0,P1,P2…PnIt is the point sequence for forming the pel, (x, y) value is to being each in the point sequence
The transverse and longitudinal coordinate of point.
Straight linear ratio R=d/L, R is closer to 1, then pel is closer to straight line.
For being determined as non-directional pel, then figure structure module carries out Curves Recognition to it.
When Curves Recognition is carried out in the embodiment of the present application, signified curve includes circle, circular arc, ellipse, elliptic arc, identification
The general equation of conic section being fitted according to the point sequence based on current pel.Equation is as follows:
Ax2+Bxy+Cy2+ Dx+Ey+F=0, wherein ABC are not all 0
It takes
I1=+C
I1、I2、I3Be conic section translation transformation and rotation transformation under invariant, K is constant under rotation transformation
Amount, works as I1=2When=0, K is also the invariant under translation transformation.WhenIt, will during less than some preset value close to 0
The pel is identified as circle, and either otherwise circular arc is oval or elliptic arc.
Figure builds module after straight line or all kinds of curves is identified, carries out pel fitting, the purpose of pel fitting
It is so that manual draw is closer with recognition result, has following model of fit for straight line:
Y=ax+b
There is following model of fit for curve:
Y=Ax2+Bxy+Cy2+Dx+Ey+F
Fitting is iterated using least median square regression algorithm, it is assumed that have n point in the point sequence of pel, be fitted mould
Type has p parameter, then step is as follows:
1st, in n point of pel point sequence, m point is chosen (m is more than p), it is desirable that m point is uniform as possible in point sequence
Distribution;
2nd, it is fitted m point one by one with model of fit;
3rd, digital simulation residual error;
1-3 is repeated, until regression criterion is less than the threshold value of setting.
The parameter in model of fit may act as the parameter in the quadratic equation of the curve at this time, determine the song as a result,
Line.
Based on above two fit approach, figure structure module can determine each pel in geometric figure it is corresponding directly
Line or curve.
In addition, other than the identification of above-mentioned pel, the mode being fitted, the artificial intelligence approaches such as neural network can also be based on
It realizes the reconstruct of geometric figure, such as is completed by training set to neural network after training, the geometric graph that will be got
Shape inputs neural network, may thereby determine that the geometric figure of the first figure layer of composition, and then generate the first figure layer.
Step S404, pel sequence combination, figure build module by the corresponding straight line of pel and/or curve combination, generation
First figure layer.When being split to geometric figure, can be extraction pel sequence, such as according to from left to right, from
Sequence under to arrange pel, after identification and fitting is completed, equally sequentially can successively be drawn each according to this
The corresponding straight line of pel and/or curve, so as to generate the first figure layer.When drawing each pel, its junction can be carried out
Fusion and regular processing so that the display effect of the geometric figure in the first figure layer ultimately generated is more preferably.In actual scene,
It, then can be with since inflection point is the junction of each pel if the information of each inflection point is determined in processing procedure before
Corresponding fusion and regular processing are carried out according to the information of inflection point, such as Fig. 7 is do not carry out fusion and regular processing first
The display renderings of figure layer, Fig. 8 are the display renderings for the first figure layer for having carried out fusion and regular processing.
Figure builds module when generating the second figure layer according to the composition information of the text pattern, since text pattern can
To be identified using OCR technique, corresponding text or number can be automatically identified, and record the affiliated position of its pixel
It puts, there is no need to the processing such as be identified, be fitted again, can the second figure layer directly be generated according to composition information.
Visualization structure module can merge two figure layers according to first figure layer and second figure layer,
Visual image is generated, forms complete visualization scheme.Finally formed visual image can be defeated according to the demand of user
Go out for various forms of image files, such as polar plot, bitmap etc..
In actual scene, in order to enable final visualization scheme is more in line with the expection of user, the embodiment of the present application
In the Data visualization apparatus of offer, an adjustment module 940 can also be included, which can be to the visual image
The visual effect of middle figure optimizes adjustment, such as the adjustment to carrying out color, size, layout etc..
In conclusion in the scheme that the application provides, after input picture is obtained, the input picture is located in advance
Reason, obtains the composition information of geometric figure and text in the input data, is then based respectively on the composition information of geometric figure
It is handled with the composition information of text, the first figure layer is generated and according to described according to the composition information of the geometric figure
The composition information of text generates the second figure layer, finally merges the first figure layer and the second figure layer, so as to rapidly realize image data
Visualization reconstruct, reduction, generation meet the desired the visual design of user.
In addition, the part of the application can be applied to computer program product, such as computer program instructions, when its quilt
When computer performs, by the operation of the computer, it can call or provide according to the present processes and/or technical solution.
And the program instruction of the present processes is called, be possibly stored in fixed or moveable recording medium and/or is passed through
Broadcast or the data flow in other signal loaded mediums and be transmitted and/or be stored in the calculating run according to program instruction
In the working storage of machine equipment.Here, including an equipment as shown in Figure 10 according to one embodiment of the application, this sets
It is standby to include being stored with one or more machine readable medias 1010 of machine readable instructions and for performing machine readable instructions
Processor 1020, wherein, when the machine readable instructions are performed by the processor so that the equipment is performed based on aforementioned basis
The method and/or technology scheme of multiple embodiments of the application.
It should be noted that the application can be carried out in the assembly of software and/or software and hardware, for example, can adopt
With application-specific integrated circuit (ASIC), general purpose computer or any other realized similar to hardware device.In one embodiment
In, the software program of the application can perform to realize above step or function by processor.Similarly, the software of the application
Program can be stored in computer readable recording medium storing program for performing (including relevant data structure), for example, RAM memory, magnetic or
CD-ROM driver or floppy disc and similar devices.In addition, hardware can be used to realize in some steps or function of the application, for example,
As coordinating with processor so as to perform the circuit of each step or function.
It is obvious to a person skilled in the art that the application is not limited to the details of above-mentioned exemplary embodiment, Er Qie
In the case of without departing substantially from spirit herein or essential characteristic, the application can be realized in other specific forms.Therefore, no matter
From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and scope of the present application is by appended power
Profit requirement rather than above description limit, it is intended that all by what is fallen within the meaning and scope of the equivalent requirements of the claims
Variation is included in the application.Any reference numeral in claim should not be considered as to the involved claim of limitation.This
Outside, it is clear that one word of " comprising " is not excluded for other units or step, and odd number is not excluded for plural number.That is stated in device claim is multiple
Unit or device can also be realized by a unit or device by software or hardware.The first, the second grade words are used for table
Show title, and do not represent any particular order.
Claims (19)
1. a kind of data visualization method, wherein, this method includes:
Geometric figure and text pattern are identified in the input image, and obtain geometric figure and text diagram in the input data
The composition information of shape;
First figure layer is generated, and according to the composition information of text pattern generation the according to the composition information of the geometric figure
Two figure layers;
According to first figure layer and second figure layer, visual image is generated.
2. according to the method described in claim 1, wherein, the geometric figure and text diagram are identified in the input picture
Shape, including:
Figure identification is carried out to the input picture, determines the text pattern in the input picture;
Its complementary graph in the input picture is determined as geometric figure, wherein, its described complementary graph is the input picture
In figure in addition to the text pattern.
3. according to the method described in claim 2, wherein, the figure identification is using OCR technique.
4. according to the method described in claim 1, wherein, the composition information includes text pattern and geometric figure described defeated
Enter the location information in image.
5. according to the method described in claim 4, wherein, the geometric figure and text diagram are identified in the input picture
Before shape, further include:
Gridding processing is carried out to the input picture, divides multiple net regions;
Coordinate value of pixel of the composition information including text pattern and geometric figure in net region.
6. according to the method described in claim 1, wherein, the first figure layer, packet are generated according to the composition information of the geometric figure
It includes:
The corresponding stroke information of the geometric figure is determined based on the composition information of the geometric figure;
Stroke segmentation is carried out according to the stroke information, the geometric figure is divided at least one pel;
The identification and fitting of straight line and/or curve are carried out to the pel, determines the corresponding straight line of the pel and/or curve;
By the corresponding straight line of pel and/or curve combination, first figure layer is generated.
7. according to the method described in claim 6, wherein, stroke segmentation is carried out according to the stroke information, by the geometric graph
Shape is divided at least one pel, including:
Inflection point in the geometric figure is determined according to the stroke information, wherein, the inflection point is big for geometric figure mean curvature
In the position of preset value;
The geometric figure is divided by least one pel according to the inflection point.
8. according to the method described in claim 6, wherein, by the corresponding straight line of pel and/or curve combination, generate described first
Figure layer, including:
The corresponding straight line of the pel and/or curve are drawn successively, to the junction of the corresponding straight line of the pel and/or curve
Carry out fusion and regular, generation first figure layer.
9. according to the method described in claim 1, wherein, this method further includes:
Adjustment is optimized to the visual effect of figure in the visual image.
10. a kind of Data visualization apparatus, wherein, which includes:
Preprocessing module for identifying geometric figure and text pattern in the input image, and is obtained in the input data
The composition information of geometric figure and text pattern;
Figure builds module, for generating the first figure layer according to the composition information of the geometric figure, and according to the text diagram
The composition information of shape generates the second figure layer;
Visualization structure module, according to first figure layer and second figure layer, generates visual image.
11. equipment according to claim 10, wherein, the preprocessing module, for carrying out figure to the input picture
Shape identifies, determines the text pattern in the input picture;Its complementary graph in the input picture is determined as geometric figure,
Wherein, its described complementary graph is the figure in the input picture in addition to the text pattern.
12. equipment according to claim 11, wherein, the figure identification is using OCR technique.
13. equipment according to claim 10, wherein, the composition information includes text pattern and geometric figure described
Location information in input picture.
14. equipment according to claim 13, wherein, the preprocessing module is additionally operable to know in the input picture
Do not go out before the geometric figure and text pattern, gridding processing carried out to the input picture, divides multiple net regions,
Wherein, coordinate value of pixel of the composition information including text pattern and geometric figure in net region.
15. equipment according to claim 10, wherein, the figure builds module, for based on the geometric figure
Composition information determines the corresponding stroke information of the geometric figure;Stroke segmentation is carried out according to the stroke information, it will be described several
What figure is divided at least one pel;The identification and fitting of straight line and/or curve are carried out to the pel, determines the pel
Corresponding straight line and/or curve;By the corresponding straight line of pel and/or curve combination, first figure layer is generated.
16. equipment according to claim 15, wherein, the figure builds module, for true according to the stroke information
Inflection point in the fixed geometric figure, wherein, the inflection point is more than the position of preset value for geometric figure mean curvature;According to described
The geometric figure is divided at least one pel by inflection point.
17. equipment according to claim 15, wherein, the figure builds module, for drawing the pel pair successively
The straight line and/or curve answered carry out the junction of the corresponding straight line of the pel and/or curve fusion and regular, generation institute
State the first figure layer.
18. equipment according to claim 10, wherein, which further includes:
Adjustment module optimizes adjustment for the visual effect to figure in the visual image.
19. a kind of Data visualization apparatus, wherein, which includes:
Processor;And
One or more machine readable medias of machine readable instructions are stored with, when the processor performs the machine readable finger
When enabling so that the equipment performs method as claimed in any one of claims 1-9 wherein.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810009644.5A CN108241861A (en) | 2018-01-05 | 2018-01-05 | A kind of data visualization method and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810009644.5A CN108241861A (en) | 2018-01-05 | 2018-01-05 | A kind of data visualization method and equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108241861A true CN108241861A (en) | 2018-07-03 |
Family
ID=62699432
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810009644.5A Pending CN108241861A (en) | 2018-01-05 | 2018-01-05 | A kind of data visualization method and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108241861A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20200012939A1 (en) * | 2018-07-07 | 2020-01-09 | Massachusetts Institute Of Technology | Methods and Apparatus for Visualization Recommender |
CN111986292A (en) * | 2019-05-22 | 2020-11-24 | 腾讯科技(深圳)有限公司 | Layer restoration method and device, computer readable storage medium and computer equipment |
CN112634397A (en) * | 2019-09-24 | 2021-04-09 | 华为技术有限公司 | Data processing method, data processing device, computer equipment and computer readable storage medium |
CN112633038A (en) * | 2019-09-24 | 2021-04-09 | 华为技术有限公司 | Data processing method, data processing device, computer equipment and computer readable storage medium |
CN113313027A (en) * | 2021-05-28 | 2021-08-27 | 维沃移动通信有限公司 | Image processing method, image processing device, electronic equipment and storage medium |
WO2024077946A1 (en) * | 2022-10-10 | 2024-04-18 | International Business Machines Corporation | Image creation with positioning of recreated text and shapes |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102663382A (en) * | 2012-04-25 | 2012-09-12 | 重庆邮电大学 | Video image character recognition method based on submesh characteristic adaptive weighting |
CN103123683A (en) * | 2011-09-08 | 2013-05-29 | 三星电子株式会社 | Apparatus for recognizing character and barcode simultaneously and method for controlling the same |
CN105279525A (en) * | 2015-11-19 | 2016-01-27 | 浪潮软件集团有限公司 | Image processing method and device |
JP2016134014A (en) * | 2015-01-20 | 2016-07-25 | 株式会社リコー | Electronic information board device, information processing method and program |
CN105843595A (en) * | 2014-10-27 | 2016-08-10 | 中兴通讯股份有限公司 | Method, device, and terminal for interface display |
-
2018
- 2018-01-05 CN CN201810009644.5A patent/CN108241861A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103123683A (en) * | 2011-09-08 | 2013-05-29 | 三星电子株式会社 | Apparatus for recognizing character and barcode simultaneously and method for controlling the same |
CN102663382A (en) * | 2012-04-25 | 2012-09-12 | 重庆邮电大学 | Video image character recognition method based on submesh characteristic adaptive weighting |
CN105843595A (en) * | 2014-10-27 | 2016-08-10 | 中兴通讯股份有限公司 | Method, device, and terminal for interface display |
JP2016134014A (en) * | 2015-01-20 | 2016-07-25 | 株式会社リコー | Electronic information board device, information processing method and program |
CN105279525A (en) * | 2015-11-19 | 2016-01-27 | 浪潮软件集团有限公司 | Image processing method and device |
Non-Patent Citations (2)
Title |
---|
常新立等: "基于图元的手绘几何图形识别", 《计算机与数字工程》 * |
张小亮: "手绘流程图的在线识别研究", 《中国优秀硕士学位论文全文数据库·工程科技Ⅱ辑》 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20200012939A1 (en) * | 2018-07-07 | 2020-01-09 | Massachusetts Institute Of Technology | Methods and Apparatus for Visualization Recommender |
CN111986292A (en) * | 2019-05-22 | 2020-11-24 | 腾讯科技(深圳)有限公司 | Layer restoration method and device, computer readable storage medium and computer equipment |
CN112634397A (en) * | 2019-09-24 | 2021-04-09 | 华为技术有限公司 | Data processing method, data processing device, computer equipment and computer readable storage medium |
CN112633038A (en) * | 2019-09-24 | 2021-04-09 | 华为技术有限公司 | Data processing method, data processing device, computer equipment and computer readable storage medium |
CN113313027A (en) * | 2021-05-28 | 2021-08-27 | 维沃移动通信有限公司 | Image processing method, image processing device, electronic equipment and storage medium |
WO2024077946A1 (en) * | 2022-10-10 | 2024-04-18 | International Business Machines Corporation | Image creation with positioning of recreated text and shapes |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Jam et al. | A comprehensive review of past and present image inpainting methods | |
Jiang et al. | Scfont: Structure-guided chinese font generation via deep stacked networks | |
CN108241861A (en) | A kind of data visualization method and equipment | |
Gao et al. | Artistic glyph image synthesis via one-stage few-shot learning | |
CN110555795B (en) | High resolution style migration | |
Wang et al. | Deepfont: Identify your font from an image | |
CN111476708B (en) | Model generation method, model acquisition method, device, equipment and storage medium | |
US20190180154A1 (en) | Text recognition using artificial intelligence | |
CN107610200B (en) | Character library rapid generation method based on characteristic template | |
CN111199531A (en) | Interactive data expansion method based on Poisson image fusion and image stylization | |
Ahmadi et al. | Context-aware saliency detection for image retargeting using convolutional neural networks | |
US20240161355A1 (en) | Generation of stylized drawing of three-dimensional shapes using neural networks | |
Liu et al. | Painting completion with generative translation models | |
US20230153965A1 (en) | Image processing method and related device | |
CN107862664A (en) | A kind of image non-photorealistic rendering method and system | |
Wei et al. | A-ESRGAN: Training real-world blind super-resolution with attention U-Net Discriminators | |
Liu et al. | Learning implicit glyph shape representation | |
CN110348025A (en) | A kind of interpretation method based on font, device, storage medium and electronic equipment | |
CN117078790A (en) | Image generation method, device, computer equipment and storage medium | |
US20230419551A1 (en) | Generating novel images using sketch image representations | |
Pérez-Pellitero et al. | Antipodally invariant metrics for fast regression-based super-resolution | |
Thamizharasan et al. | VecFusion: Vector Font Generation with Diffusion | |
Peter et al. | Deep spatial and tonal data optimisation for homogeneous diffusion inpainting | |
CN115131803A (en) | Document word size identification method and device, computer equipment and storage medium | |
Tomei et al. | What was Monet seeing while painting? Translating artworks to photo-realistic images |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180703 |