Specific embodiment
In order that those skilled in the art more fully understand the technical scheme in the application, below in conjunction with the application reality
The accompanying drawing in example is applied, the technical scheme in the embodiment of the present application is clearly and completely described, it is clear that described implementation
Example is only some embodiments of the present application, rather than whole embodiments.Based on the embodiment in the application, this area is common
The every other embodiment that technical staff is obtained under the premise of creative work is not made, should all belong to the application protection
Scope.
Fig. 3 is a kind of a kind of method flow diagram of embodiment of herein described image processing method.Although the application
There is provided such as following embodiments or method operating procedure shown in the drawings or apparatus structure, but based on routine or without creative
Work can include less operating procedure or modular units after more or part merges in the methods described or device.
In the step of in logicality in the absence of necessary causality or structure, the execution sequence of these steps or the modular structure of device are not
It is limited to the embodiment of the present application or execution sequence shown in the drawings or modular structure.Described method or modular structure are in practice
Device or during end product application, order execution can be carried out according to embodiment or method shown in the drawings or modular structure
Or executed in parallel (environment of such as parallel processor or multiple threads, even the implementation ring including distributed treatment
Border).
Below for the sake of clarity, the application one embodiment draws thermodynamic chart as application scenarios are illustrated with web terminal.
But, skilled artisans appreciate that arriving, the connotation of this programme can be applied to the view data of other drawing
Under treatment scene, such as financial expenses figure, on score value distribution map, and mobile terminal, self-aided terminal, onboard system, server
Image real time transfer etc..It is smoothed by original view data, generation numerical values recited or position distribution are uniform
The homogeneous image data of (error is within a preset range), then form grid, are divided into splicing segment, calculate each splicing segment
Color after can obtain data message and express that more accurate, color transition is more smooth, the more preferable data image of bandwagon effect.
Replaceability description will not be below done, will not herein be tired out for the applicability of other implement scenes and be stated.
A kind of specific embodiment is as shown in figure 3, a kind of a kind of implementation of image processing method that the application is provided
In example, methods described can include:
S1:Smooth expansion is carried out to pending data using preset algorithm to process, and generates homogeneous image data.
The general original digital image data that can include collection/acquisition of described pending data, such as the present embodiment draws heat
Pending data described in the application scenarios tried hard to can be the temperature data of each districts and cities of collection.These temperature datas are usual
The numerical value and districts and cities' title (or stabilization districts and cities' coordinate locality) of temperature can be included.As shown in figure 4, being drawn in web terminal
During thermodynamic chart, the pending data that will can be obtained is included on painting canvas.Fig. 4 is a kind of pending data of embodiment in painting canvas
On displaying schematic diagram.Assuming that the present embodiment acquires four temperature datas of districts and cities C1, C2, C3, C4 when drawing thermodynamic chart, point
Not Wei 5 degrees Celsius, 7 degrees Celsius, 8 degrees Celsius, 10 degrees Celsius, be distributed in web drawing areas (drawing area described in the present embodiment
Be painting canvas) on as shown in Figure 4.
General, in application scenes, the numerical value of the pending data of acquisition or spatial distribution position are typically
Heterogeneous, such data distribution feature can the intensive area of data distribution when using existing progressive circular drawing data image
Domain discrimination is inadequate, and the sparse field color poor continuity of data distribution, easily there is the region that blank is covering.And this Shen
Please embodiment smooth expansion can be carried out to pending data using the advance algorithm chosen and process, make original pending number
According to being extended for the equally distributed homogeneous image data in position in plane.Because next drawing area of normal conditions uses identical
Coordinate system, it is understood, therefore, that the numerical values recited of the equally distributed homogeneous image data in position described above is also to be in
It is equally distributed, or, from numerically it is to be understood that the homogeneous image data generated after smooth expansion treatment variance (or
Standard deviation) in the range of predetermined receiving.So, what the application can be evenly distributed using original pending data is equal
Even view data.
In the application it is specific pending data is carried out smooth expansion process used preset algorithm can include it is many
Implementation method is planted, equidistant data value, kenel smoothing algorithms, moving window multinomial, five are such as generated according to pending data
Three smoothing algorithms of point etc., or customized other processing modes of operating personnel.Fig. 5 is the application pre- using the one kind for providing
Imputation method is calculated the schematic diagram of homogeneous image data point, in Fig. 5, can be by coordinate of the pending data in drawing area
Extend to drawing area reference axis respectively, the joint of the extension line for obtaining as the homogeneous image data of production data point D1
To D36.Of course, it is possible to the image real time transfer scene according to data processing needs or reality selects or sets/define other to enter
The smooth algorithm for expanding treatment of row, the application is not being repeated one by one.
It should be noted that general, the number of the homogeneous image data obtained after smoothing expansion treatment is typically
More than the pending data.As shown in fig. 6, Fig. 6 is obtained after carrying out smooth expansion treatment to four pending datas in Fig. 4
The list schematic diagram of the homogeneous image data for arriving.In figure 6, pending data C1, C2, C3, C4 through use certain smooth
121 homogeneous image data from (x=0, y=0) to (x=10, y=10) are generated after algorithm process.So, the present embodiment
The number K of the homogeneous image data generated in application scenarios is far longer than the number N, i.e. K=of the pending data of original acquisition
121 > > N=4.Therefore, the smooth expansion that the application is provided is processed in specific one embodiment, the use preset algorithm
Smooth expansion is carried out to pending data and processes generation homogeneous image data, including:
S101:It is determined that the smoothing algorithm for using;
S102:N number of pending data is extended for K homogeneous image data using the smoothing algorithm, K >=N is described equal
Data of the even view data for the error between consecutive number strong point after the sequence of numerical values recited order within a preset range.
The application embodiment can carry out smooth expansion to pending data and process using the advance smoothing algorithm chosen,
Original pending data is set to be extended for the equally distributed homogeneous image data in position in plane.At the smooth uniform of data
Reason, can not only increase the data volume of drawing data image, it is also possible that these homogeneous image Data Positions or numeric distribution
Uniformly, the flatness of the data image for drawing generation is improved, image shows effect is improved.
Above-mentioned is only schematically illustrate, the uniform figure generated in actual job application carried out by taking 4 pending datas as an example
As the data volume of data is often than original pending data one or several orders of magnitude high.But, the application is not intended to limit life
Into the number of homogeneous image data be necessarily greater than the number of the pending data, in other implementation methods, it is also possible to
The number of equal to or slightly greater than described pending data.In the application scenarios of above-mentioned web terminal drafting thermodynamic chart, it is also possible to most
Throughout one's life into homogeneous image data number be 4, the number with pending data is equal.Even, in certain embodiments, originally
It is identical with the pending data that application is not excluded for the homogeneous image data, in this case it is considered that pending data
Itself is evenly distributed, and pending data can carry out follow-up Image Rendering as homogeneous image data in itself, can now recognize
For the data amount check for expanding is 0.
In a kind of embodiment of the application, the homogeneous image data of the generation can include the pending data, such as
Have in 121 pending datas 2 it is identical with pending data.In other embodiment, the homogeneous image data can not also
Including the pending data, as shown in Figure 6.
In the embodiment of the present application, smooth expansion can be carried out to obtaining pending data using the algorithm chosen in advance or set
Treatment is filled, generation spatial distribution position or numerical values recited compare the more uniform homogeneous image data of pending data.
S2:The image grid in drawing area is determined according to the homogeneous image data.
After obtaining homogeneous image data, it may be determined that these homogeneous image data can be with the position of drawing area, then
The point of homogeneous image data in drawing area is connected according to predetermined way (direction of such as reference axis is sequentially connected), image is formed
Grid.Specifically for example shown in Fig. 7, Fig. 7 is the image grid that the homogeneous image data that will be generated shown in Fig. 6 are formed in painting canvas
Schematic diagram, each homogeneous image data generated in Fig. 6 have corresponding coordinate information (x, y), can be by these homogeneous images
Data are mapped in the reference axis of painting canvas, and connection forms image grid.Specifically, a kind of implementation method that the application is provided
In, the image grid homogeneous image data formed in drawing area can include:
S201:Determine coordinate of the homogeneous image data in the drawing area, image pane is formed according to the coordinate
Grid, the single grid in described image grid is the quadrangle with the coordinate position as summit.
The mode that homogeneous image data form image grid is not limited and is connected according to change in coordinate axis direction (laterally or longitudinally),
Other implementation methods can also include that case is certain for example since the homogeneous image data closest to painting canvas border
Angle (such as 45 degree or 135 degree) connects the homogeneous image data on the angle direction respectively.Generally, the image that above-mentioned connection is obtained
Single grid in grid is quadrangle (parallelogram or non-parallel quadrangle).The application is not excluded for using other modes
In the single grid of image grid that is formed based on the homogeneous image data can be other shapes, such as hexagon, triangle,
Or other irregular figures.
S3:Single grid in described image grid is divided into the splicing segment of predetermined number predetermined shape, the spelling
At least one summit of map interlinking block is the homogeneous image data.
Further, the single grid of each in image grid can be split.Can be by each list in the application
Individual grid is divided into the splicing segment of predetermined format predetermined shape, and at least one order of the splicing segment that each is divided into is
The homogeneous image data of the generation, can so ensure that each single grid can be drawn to be formed more based on homogeneous image data
It is accurate color.The shape and each single grid of herein described splicing segment will specifically be divided into several splicing segments
Deng can be configured previously according to data processing needs.In a kind of mode that the application is provided, the predetermined number preboarding
The splicing segment of shape, including:
S301:Single grid in described image grid is divided at least two spliced maps that predetermined shape is triangle
Block.
Certainly, in S301, it is also possible to by each single grid of image grid be divided into multiple triangle sets into splicing
Segment, such as trapezoidal or rectangle single grid is divided into two or three triangles.
In another embodiment that the application is provided, the single grid in the grid by described image is divided into default
The splicing segment of number predetermined shape, including:
When the single grid is quadrangle, single grid is divided into by cut-off rule of the diagonal of the quadrangle
Two splicing segments of triangle.
Fig. 8 is the schematic diagram that single grid is split in the application one embodiment triangularity.
S4:Homogeneous image data according to the splicing segment summit determine the number of colours of splicing segment in image grid
According to drafting generation target image.
Then each single grid can be mapped to corresponding color, including splicing segment summit color and inside fill out
The color filled.For example when splicing segment is triangle, each triangle can be drawn, the numerical value of triangular apex is mapped to face
Color, the value of triangle interior out, is equally mapped to color using mathematic interpolation.Treatment of the difference arithmetic with reference to geocentric coordinate system
Mode.All of triangle is completed and draw out by uniform thermodynamic chart.
In a kind of embodiment that the application is provided, the homogeneous image data according to the splicing segment summit determine institute
The color data of splicing segment is stated, including:
The homogeneous image data on the splicing segment summit are mapped to corresponding color data;And,
Based on the homogeneous image data on the splicing segment summit, the spliced map is calculated using default computational methods
The color data of the filling field color of block.
In specific another embodiment, the filling that the splicing segment is calculated using default computational methods
The color data of field color, including:
Since the adjacent vertex of the splicing segment, splicing segment first border is chosen successively according to predetermined direction
The second calculating pixel in the first calculating pixel and the second boundary line on line;
Calculate the difference of first pixel and the view data corresponding to the second pixel, and between spaced pixels
Number;
Pixel between first pixel and the second pixel is determined according to the difference and the spaced pixels number
View data;
The view data that will be calculated is mapped to the color data in the filling region.
Fig. 9 to Figure 11 is the effect diagram that the embodiment provided using the application draws the thermodynamic chart to be formed, and Fig. 9 is
One schematic diagram of implement scene intermediate cam shape concatenation module of the application, it is assumed that the color red (255,0,0) of A points, the face of B points
Color is Green (0,255,0), and the color of C points is Blue (0,0,255);Figure 10 is that the concatenation module in Fig. 9 is mapped out accordingly
Color after schematic diagram;Figure 11 is the effect diagram of the thermodynamic chart drawn out in an implement scene;Figure 12 is using biography
The circular effect diagram for drawing the thermodynamic chart for being formed of the gradual change of system.From Figure 10 and Figure 11 contrast can, the application implementation
Scheme can be smoothed to the initial data in drawing area, obtain the image data point of uniform position distribution, so
Can with abundant data volume, obtain homogeneous image number, improve the flatness of the data image color region transition of generation.The application
According to homogeneous image data genaration grid, then each grid can be sub-divided into the spliced map of predetermined shape predetermined format
Block, such as each quadrangle grid can be divided into two triangles, can so ensure each form can by complete covering,
Solve the problems, such as to be in the prior art covering because blank occurs in data image caused by view data non-uniform Distribution, improve number
According to image color continuity.Also, the Fill Color spliced in the application embodiment, in each form inside segment is basis
The homogeneous image data on splicing segment summit are calculated, and make the Fill Color of splicing segment more accurate, improve whole data
The accuracy of the data message expression of image, and then improve the quality and bandwagon effect of the final datagram for drawing generation.
Based on the image processing method described in above-described embodiment, the application also provides a kind of image real time transfer dress
Put.Figure 13 is a kind of modular structure schematic diagram of embodiment of a kind of image data processing system that the application is provided, such as Figure 13 institutes
Show, described device can include:
Uniform treatment module 101, can be used for carrying out pending data smooth expansion treatment, generation using preset algorithm
Homogeneous image data;
Grid determining module 102, can be used for determining the image grid in drawing area according to the homogeneous image data;
Segmentation module 103, can be used for for the single grid in described image grid being divided into predetermined number predetermined shape
Splicing segment, at least one summit of the splicing segment is the homogeneous image data;
Graphics module 104, in can be used for determining image grid according to the homogeneous image data on the splicing segment summit
Splice the color data of segment, draw generation target image.
A kind of image processing method device that the application is provided, can put down to the initial data in drawing area
Sliding treatment, obtains the image data point of uniform position distribution, so can with abundant data volume, obtain homogeneous image number, improve
The flatness of the data image color region transition of generation.The application can be by according to homogeneous image data genaration grid, then
Each grid is sub-divided into the splicing segment of predetermined shape predetermined format, and such as each quadrangle grid can be divided into two triangles
Shape, can so ensure that each form can be solved in the prior art because view data non-uniform Distribution is led by complete covering
There is the problem that blank is covering in the data image of cause, improves data image color continuity.Also, the application embodiment
In, the Fill Color inside segment is spliced in each form to be calculated according to the homogeneous image data on splicing segment summit,
Make the Fill Color of splicing segment more accurate, improve the accuracy of the data message expression of whole data image, and then improve
The quality and bandwagon effect of the final datagram for drawing generation.
The mode that homogeneous image data form image grid is not limited and is connected according to change in coordinate axis direction (laterally or longitudinally),
Other implementation methods can also include that case is certain for example since the homogeneous image data closest to painting canvas border
Angle (such as 45 degree or 135 degree) connects the homogeneous image data on the angle direction respectively, forms the single grid of quadrangle
((parallelogram or non-parallel quadrangle, such as trapezoidal).Therefore, in another embodiment that the application is provided, the grid is true
Cover half root tuber determines the image grid in drawing area according to the homogeneous image data, can include:
Determine coordinate of the homogeneous image data in the drawing area, image grid, institute are formed according to the coordinate
It is the quadrangle with the coordinate position as summit to state the single grid in image grid.
Each single grid can be divided into the splicing segment of predetermined format predetermined shape, each is divided in the application
Into splicing segment at least one order be the generation homogeneous image data, can so ensure that each single grid can
More accurate color is formed to be drawn based on homogeneous image data.The shape of herein described splicing segment and each is single
Grid will specifically be divided into several splicing segments etc., can be configured previously according to data processing needs.What the application was provided
The splicing segment of predetermined number predetermined shape can include described in a kind of mode of described device:
Single grid in described image grid is divided at least two splicing segments that predetermined shape is triangle.
It is of course also possible to by each single grid of image grid be divided into multiple triangle sets into splicing segment, such as
Trapezoidal or rectangle single grid is divided into two or three triangles.In a kind of specific implementation of the application, described point
Cutting module is divided into the splicing segment of predetermined number predetermined shape can to include the single grid in described image grid:
When the single grid is quadrangle, single grid is divided into by cut-off rule of the diagonal of the quadrangle
Two splicing segments of triangle.
The device that the application is provided, can be mapped to corresponding color, including splicing segment summit by each single grid
Color and internal filling color.For example when splicing segment is triangle, each triangle can be drawn, by triangular apex
Numerical value be mapped to color, the value of triangle interior out, is equally mapped to color using mathematic interpolation.Difference arithmetic refers to matter
The processing mode of heart coordinate system.All of triangle is completed and draw out by uniform thermodynamic chart.
The homogeneous image data according to the splicing segment summit determine the color data of the splicing segment, bag
Include:
The homogeneous image data on the splicing segment summit are mapped to corresponding color data;And,
Based on the homogeneous image data on the splicing segment summit, the spliced map is calculated using default computational methods
The color data of the filling field color of block.
The method or apparatus that the embodiment of the present application is provided, can be according to homogeneous image data genaration grid, then can be by
Each grid is sub-divided into the splicing segment of predetermined shape predetermined format, and such as each quadrangle grid can be divided into two triangles
Shape, can so ensure that each form can be solved in the prior art because view data non-uniform Distribution is led by complete covering
There is the problem that blank is covering in the data image of cause, improves data image color continuity.Also, the application embodiment
In, the Fill Color inside segment is spliced in each form to be calculated according to the homogeneous image data on splicing segment summit,
Make the Fill Color of splicing segment more accurate, improve the accuracy of the data message expression of whole data image, and then improve
The quality and bandwagon effect of the final datagram for drawing generation.
Although being mentioned in teachings herein and generating the mode of uniform view data using smoothing algorithm, by each grid point
It is cut into splicing segment, the calculation of the color of splicing segment, segment area or the like being spliced according to distance adjustment for triangle
The description such as image data acquisition, generation, calculating, mapping, but, the application is not limited to that traffic criteria must be met
Image real time transfer, the smoothing algorithm of standard, conventional mathematic interpolation method, standard computer language or the embodiment of the present application institute
The situation of description.Some professional standards are used amended slightly on the practice processes that self-defined mode or embodiment are described
Embodiment can also realize above-described embodiment it is identical, equivalent or close or deformation after it is anticipated that implementation result.Using these
The embodiment of the acquisitions such as image data acquisition, generation, judgement, processing mode after modification or deformation, still may belong to this Shen
Within the scope of optional embodiment please.
Although this application provides the method operating procedure as described in embodiment or flow chart, based on conventional or noninvasive
The means of the property made can include more or less operating procedures.The step of being enumerated in embodiment order is only numerous steps
A kind of mode in execution sequence, unique execution sequence is not represented.When device in practice or end product are performed, can be with
Performed or executed in parallel (such as parallel processor or multiple threads according to embodiment or method shown in the drawings order
Environment, even distributed data processing environment).Term " including ", "comprising" or its any other variant be intended to
Nonexcludability is included, so that process, method, product or equipment including a series of key elements not only will including those
Element, but also other key elements including being not expressly set out, or also include being this process, method, product or equipment
Intrinsic key element.In the absence of more restrictions, be not precluded from the process including the key element, method, product or
Also there are other identical or equivalent elements in person's equipment.
Unit, device or module that above-described embodiment is illustrated etc., can specifically be realized by computer chip or entity, or
Realized by the product with certain function.For convenience of description, describe to be divided into various modules point with function during apparatus above
Do not describe.Certainly, can the function of each module is real in same or multiple softwares and/or hardware when the application is implemented
It is existing, it is also possible to will to realize that the module of same function is realized etc. by the combination of multiple submodule or subelement.Dress described above
It is only schematical to put embodiment, for example, the division of the unit, only a kind of division of logic function, when actually realizing
There can be other dividing mode, such as multiple units or component can combine or be desirably integrated into another system, or one
A little features can be ignored, or not perform.It is another, shown or discussed coupling or direct-coupling or communication link each other
Connecing can be that the INDIRECT COUPLING or communication connection of device or unit can be electrical, mechanical or other shapes by some interfaces
Formula.
It is also known in the art that in addition to realizing controller in pure computer readable program code mode, it is complete
Entirely can by by method and step carry out programming in logic come cause controller with gate, switch, application specific integrated circuit, may be programmed
Logic controller realizes identical function with the form of embedded microcontroller etc..Therefore this controller is considered one kind
Hardware component, and the device for realizing various functions included to its inside can also be considered as the structure in hardware component.Or
Person even, can be used to realizing that the device of various functions is considered as not only being the software module of implementation method but also can be hardware
Structure in part.
The application can be described in the general context of computer executable instructions, such as program
Module.Usually, program module includes performing particular task or realizes routine, program, object, the group of particular abstract data type
Part, data structure, class etc..The application can also be in a distributed computing environment put into practice, in these DCEs,
Task is performed by the remote processing devices connected by communication network.In a distributed computing environment, program module can
With in the local and remote computer-readable storage medium including including storage device.
As seen through the above description of the embodiments, those skilled in the art can be understood that the application can
Realized by the mode of software plus required general hardware platform.Based on such understanding, the technical scheme essence of the application
On the part that is contributed to prior art in other words can be embodied in the form of software product, the computer software product
Can store in storage medium, such as ROM/RAM, magnetic disc, CD, including some instructions are used to so that a computer equipment
(can be personal computer, mobile terminal, server, or network equipment etc.) performs each embodiment of the application or implementation
Method described in some parts of example.
Each embodiment in this specification is described by the way of progressive, same or analogous portion between each embodiment
Divide mutually referring to what each embodiment was stressed is the difference with other embodiment.The application can be used for crowd
In more general or special purpose computing system environments or configuration.For example:Personal computer, server computer, handheld device or
Portable set, laptop device, multicomputer system, the system based on microprocessor, set top box, programmable system, net
Network PC, minicom, mainframe computer, the DCE including any of the above system or equipment etc..
Although depicting the application by embodiment, it will be appreciated by the skilled addressee that the application have it is many deformation and
Change is without deviating from spirit herein, it is desirable to which appended claim includes these deformations and changes without deviating from the application's
Spirit.