CN111126023B - Graphic processing method, system, readable storage medium and computer device - Google Patents

Graphic processing method, system, readable storage medium and computer device Download PDF

Info

Publication number
CN111126023B
CN111126023B CN202010233670.3A CN202010233670A CN111126023B CN 111126023 B CN111126023 B CN 111126023B CN 202010233670 A CN202010233670 A CN 202010233670A CN 111126023 B CN111126023 B CN 111126023B
Authority
CN
China
Prior art keywords
aspect ratio
graphic
initial
area
screenshot
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010233670.3A
Other languages
Chinese (zh)
Other versions
CN111126023A (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.)
Jiangxi Booway New Technology Co ltd
Original Assignee
Jiangxi Booway New 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 Jiangxi Booway New Technology Co ltd filed Critical Jiangxi Booway New Technology Co ltd
Priority to CN202010233670.3A priority Critical patent/CN111126023B/en
Publication of CN111126023A publication Critical patent/CN111126023A/en
Application granted granted Critical
Publication of CN111126023B publication Critical patent/CN111126023B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/34Browsing; Visualisation therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Image Generation (AREA)

Abstract

The invention discloses a graphic processing method, a system, a readable storage medium and computer equipment, wherein the method comprises the following steps: acquiring graphic data to be visualized; performing visual drawing on the graphic data in the initial drawing area to obtain an intermediate graphic; screenshot is carried out on the intermediate graph according to the size of the initial layout area, and the picture obtained by screenshot is calculated by adopting an image-based aspect ratio algorithm so as to determine the optimal aspect ratio; and adjusting the initial canvas area according to the optimal horizontal and vertical ratios, and performing visual construction on the graphic data in the adjusted canvas area again to obtain a new graphic without a blank area. The invention can effectively remove blank areas of graphs without coordinate axes, such as pie charts or topographic charts.

Description

Graphic processing method, system, readable storage medium and computer device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and a system for processing a graphic, a readable storage medium, and a computer device.
Background
In daily work and learning, graphical data often need to be mapped visually, for example, data in an excel table is converted into a bar graph or a pie graph, a topographic map and the like.
For the graphs with coordinate axes such as the column graph, when the visual drawing is performed, the coordinate axes can be expanded to the whole canvas area as much as possible to perform drawing, so that blank areas are reduced, namely, the graphs with coordinate axes generated by the visual drawing do not have the problem of more blank areas generally. However, in the case of a graph having no coordinate axis, such as a pie chart or a topographic chart, there is a problem that many blank regions are left when visualized drawing is performed, which affects the appearance of the graph, and if the blank regions are removed by processing the graph having the coordinate axis, the graph is deformed.
Disclosure of Invention
Therefore, an object of the present invention is to provide a graphic processing method to effectively remove blank areas of a graphic without coordinate axes, such as a pie chart or a topographic chart.
The invention provides a graphic processing method, which comprises the following steps:
acquiring graphic data to be visualized;
performing visual drawing on the graphic data in the initial drawing area to obtain an intermediate graphic;
screenshot is carried out on the intermediate graph according to the size of the initial layout area, and the picture obtained by screenshot is calculated by adopting an image-based aspect ratio algorithm so as to determine the optimal aspect ratio;
and adjusting the initial canvas area according to the optimal horizontal and vertical ratios, and performing visual construction on the graphic data in the adjusted canvas area again to obtain a new graphic without a blank area.
According to the graphic processing method provided by the invention, the intermediate graphic made in the initial canvas area is subjected to screenshot, then the picture obtained by screenshot is calculated by adopting an image-based aspect ratio algorithm to determine the optimal aspect ratio, finally the initial canvas area is adjusted according to the optimal aspect ratio, and the visual plotting is carried out again in the adjusted canvas area, and finally the new graphic with the blank area removed can be obtained.
In addition, the graphics processing method according to the present invention may further include the following additional features:
further, the step of calculating the picture obtained by screenshot by using an image-based aspect ratio algorithm to determine the optimal aspect ratio specifically includes:
carrying out graying processing on the picture obtained by screenshot to obtain a grayscale image;
and determining the optimal aspect ratio suitable for the gray-scale image by adopting a synthetic vector method for the gray-scale image.
Further, the step of determining the optimal aspect ratio suitable for the gray scale map by using a synthetic vector method for the gray scale map specifically includes:
the resultant vector method based on the line graph takes the total rate of change of the line segments in the x and y directions as the aspect ratio, as shown in the following formula:
Figure 516372DEST_PATH_IMAGE001
wherein the content of the first and second substances,
Figure 218749DEST_PATH_IMAGE002
in order to achieve the optimum aspect ratio,
Figure 642777DEST_PATH_IMAGE003
and
Figure 183742DEST_PATH_IMAGE004
respectively representing the change rate of the ith vector line segment in the line graph in the directions of the x axis and the y axis, and writing the above expression into a line integral form as shown in the following expression:
Figure 783350DEST_PATH_IMAGE005
wherein C is the total arc length of the line segment, ds is the differential of the arc length,
Figure 515683DEST_PATH_IMAGE006
is the direction angle of the line segment; converting the above formula into a two-dimensional form to obtain a graph-based aspect ratio determination method, and regarding the gray scale map as a two-dimensional density distribution function
Figure 567953DEST_PATH_IMAGE007
Gradient thereof in the x-axis
Figure 411144DEST_PATH_IMAGE008
Instead of the former
Figure 865259DEST_PATH_IMAGE009
Density field of
Figure 237334DEST_PATH_IMAGE007
Gradient in y-axis
Figure 402999DEST_PATH_IMAGE010
Instead of the former
Figure 190826DEST_PATH_IMAGE011
Finally, an objective function calculated according to the optimal aspect ratio obtained from the gray scale map is as follows:
Figure 499448DEST_PATH_IMAGE012
wherein the content of the first and second substances,
Figure 573583DEST_PATH_IMAGE013
and the drawing area is a drawing area corresponding to the initial aspect ratio of the middle graph.
Further, the step of performing visual drawing on the graphic data in the initial drawing area to obtain an intermediate graphic specifically includes:
acquiring drawing parameters input by a user and aiming at the graphic data;
and carrying out visual drawing on the graphic data in the initial drawing area according to the drawing parameters to obtain an intermediate graphic.
Further, the plotting parameter includes at least one of a graph category, a value axis, a classification axis, and a filtering condition.
Another objective of the present invention is to provide a graphic processing system to effectively remove blank areas of a graphic without coordinate axes, such as a pie chart or a topographic chart.
A graphics processing system, comprising:
the acquisition module is used for acquiring graphic data to be visualized;
the drawing module is used for carrying out visual drawing on the graphic data in the initial drawing area so as to obtain an intermediate graphic;
the calculation module is used for carrying out screenshot on the intermediate graph according to the size of the initial layout area and calculating the picture obtained by screenshot by adopting an image-based aspect ratio algorithm so as to determine the optimal aspect ratio;
and the adjusting module is used for adjusting the initial canvas area according to the optimal horizontal and vertical ratio and performing visual construction on the graphic data in the adjusted canvas area again to obtain a new graphic with a blank area removed.
According to the image processing system provided by the invention, the intermediate image made in the initial canvas area is subjected to screenshot, then the image obtained by screenshot is calculated based on the image aspect ratio algorithm to determine the optimal aspect ratio, finally the initial canvas area is adjusted according to the optimal aspect ratio, and the visualization plotting is carried out again in the adjusted canvas area, and finally the new image with the blank area removed can be obtained.
In addition, the graphics processing system according to the present invention may further have the following additional features:
further, the calculation module includes:
the processing unit is used for carrying out graying processing on the picture obtained by screenshot to obtain a grayscale image;
and the determining unit is used for determining the optimal aspect ratio suitable for the gray-scale image by adopting a synthetic vector method for the gray-scale image.
Further, the determining unit is specifically configured to:
the resultant vector method based on the line graph takes the total rate of change of the line segments in the x and y directions as the aspect ratio, as shown in the following formula:
Figure 334866DEST_PATH_IMAGE014
wherein the content of the first and second substances,
Figure 785439DEST_PATH_IMAGE015
in order to achieve the optimum aspect ratio,
Figure 948567DEST_PATH_IMAGE016
and
Figure 193603DEST_PATH_IMAGE004
respectively representing the change rate of the ith vector line segment in the line graph in the directions of the x axis and the y axis, and writing the above expression into a line integral form as shown in the following expression:
Figure 68281DEST_PATH_IMAGE017
wherein C is the total arc length of the line segment, ds is the differential of the arc length,
Figure 932331DEST_PATH_IMAGE018
is the direction angle of the line segment; converting the above formula into a two-dimensional form to obtain a graph-based aspect ratio determination method, and regarding the gray scale map as a two-dimensional density distribution function
Figure 74600DEST_PATH_IMAGE007
Gradient thereof in the x-axis
Figure 365904DEST_PATH_IMAGE008
Instead of the former
Figure 226412DEST_PATH_IMAGE009
Density field of
Figure 487629DEST_PATH_IMAGE007
Gradient in y-axis
Figure 625350DEST_PATH_IMAGE010
Instead of the former
Figure 990952DEST_PATH_IMAGE011
Finally, an objective function calculated according to the optimal aspect ratio obtained from the gray scale map is as follows:
Figure 682964DEST_PATH_IMAGE012
wherein the content of the first and second substances,
Figure 279031DEST_PATH_IMAGE013
and the drawing area is a drawing area corresponding to the initial aspect ratio of the middle graph.
Further, the mapping module is specifically configured to:
acquiring drawing parameters input by a user and aiming at the graphic data;
and carrying out visual drawing on the graphic data in the initial drawing area according to the drawing parameters to obtain an intermediate graphic.
Further, the plotting parameter includes at least one of a graph category, a value axis, a classification axis, and a filtering condition.
The invention also proposes a readable storable medium on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
The invention also proposes a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the program.
Drawings
The above and/or additional aspects and advantages of embodiments of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a flow chart of a graphics processing method according to a first embodiment of the invention;
FIG. 2 is a diagram illustrating a graphics processing system according to a second embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a graphics processing method according to a first embodiment of the present invention includes steps S101 to S104.
S101, acquiring graphic data to be visualized.
The user can select graphic data to be loaded for visualization and upload the graphic data to the system, and specifically, data loading in formats such as excel and CSV can be realized.
And S102, performing visual drawing on the graphic data in the initial drawing area to obtain an intermediate graphic.
In specific implementation, a drawing parameter for the graphic data input by a user may be obtained first, and then the graphic data is visually drawn in the initial drawing area according to the drawing parameter to obtain an intermediate graphic. The initial canvas area refers to a canvas area corresponding to a made graph when the graph is drawn for the first time. The drawing parameters comprise at least one of a graph category, a value axis, a classification axis and a filtering condition, the drawing parameters are set by a user, for example, the user only selects data of certain rows and columns in an excel table to perform visual drawing, and after the drawing parameters are determined, the graph data are visually drawn in an initial drawing area to obtain an intermediate graph.
S103, screenshot is conducted on the middle graph according to the size of the initial layout area, and the picture obtained through screenshot is calculated through an image aspect ratio algorithm to determine the optimal aspect ratio.
The step of carrying out screenshot on the intermediate graph according to the size of the initial layout area means that when the screenshot is carried out, the size of the initial layout area is large, the size of the screenshot is large, and a part of the screenshot is not intercepted.
Specifically, the step of calculating the picture obtained by screenshot by using an image-based aspect ratio algorithm to determine the optimal aspect ratio specifically comprises:
carrying out graying processing on the picture obtained by screenshot to obtain a grayscale image;
and determining the optimal aspect ratio suitable for the gray-scale image by adopting a synthetic vector method for the gray-scale image.
As a specific example, the step of determining the optimal aspect ratio suitable for the gray scale map by using a synthetic vector method for the gray scale map specifically includes:
the resultant vector method based on the line graph takes the total rate of change of the line segments in the x and y directions as the aspect ratio, as shown in the following formula:
Figure 130312DEST_PATH_IMAGE019
wherein the content of the first and second substances,
Figure 763419DEST_PATH_IMAGE002
in order to achieve the optimum aspect ratio,
Figure 598519DEST_PATH_IMAGE003
and
Figure 608064DEST_PATH_IMAGE020
respectively representing the change rate of the ith vector line segment in the line graph in the directions of the x axis and the y axis (the line graph generally consists of a plurality of vector line segments), and writing the above expression into a line integral form as shown in the following expression:
Figure 80896DEST_PATH_IMAGE005
wherein C is the total arc length of the line segment, ds is the differential of the arc length,
Figure 884904DEST_PATH_IMAGE006
is the direction angle of the line segment; converting the above formula into a two-dimensional form to obtain a graph-based aspect ratio determination method, and regarding the gray scale map as a two-dimensional density distribution function
Figure 676142DEST_PATH_IMAGE007
Gradient thereof in the x-axis
Figure 348432DEST_PATH_IMAGE008
Instead of the former
Figure 315251DEST_PATH_IMAGE009
Density field of
Figure 414794DEST_PATH_IMAGE007
Gradient in y-axis
Figure 99853DEST_PATH_IMAGE010
Instead of the former
Figure 811719DEST_PATH_IMAGE011
Finally, an objective function calculated according to the optimal aspect ratio obtained from the gray scale map is as follows:
Figure 757679DEST_PATH_IMAGE012
wherein the content of the first and second substances,
Figure 903489DEST_PATH_IMAGE013
the canvas area corresponding to the initial aspect ratio of the middle graph can be regarded as the ratio between the total changes in the x direction and the y direction in the whole density field, and the algorithm has the characteristic of high calculation speed.
And S104, adjusting the initial canvas area according to the optimal horizontal and vertical ratios, and performing visual construction on the graphic data in the adjusted canvas area again to obtain a new graphic with a blank area removed.
When the graphical data is re-plotted visually, the plotting parameters for the graphical data, which are input by the user and acquired in the step S102, may be directly invoked, and the user is not required to input the plotting parameters repeatedly.
According to the graphic processing method provided by the invention, the intermediate graphic made in the initial canvas area is subjected to screenshot, then the picture obtained by screenshot is calculated by adopting an image-based aspect ratio algorithm to determine the optimal aspect ratio, finally the initial canvas area is adjusted according to the optimal aspect ratio, and the visual plotting is carried out again in the adjusted canvas area, and finally the new graphic with the blank area removed can be obtained.
Referring to fig. 2, based on the same inventive concept, a graphics processing system according to a second embodiment of the present invention includes:
the acquisition module is used for acquiring graphic data to be visualized;
the drawing module is used for carrying out visual drawing on the graphic data in the initial drawing area so as to obtain an intermediate graphic;
the calculation module is used for carrying out screenshot on the intermediate graph according to the size of the initial layout area and calculating the picture obtained by screenshot by adopting an image-based aspect ratio algorithm so as to determine the optimal aspect ratio;
and the adjusting module is used for adjusting the initial canvas area according to the optimal horizontal and vertical ratio and performing visual construction on the graphic data in the adjusted canvas area again to obtain a new graphic with a blank area removed.
In this embodiment, the calculation module includes:
the processing unit is used for carrying out graying processing on the picture obtained by screenshot to obtain a grayscale image;
and the determining unit is used for determining the optimal aspect ratio suitable for the gray-scale image by adopting a synthetic vector method for the gray-scale image.
In this embodiment, the determining unit is specifically configured to:
the resultant vector method based on the line graph takes the total rate of change of the line segments in the x and y directions as the aspect ratio, as shown in the following formula:
Figure 934899DEST_PATH_IMAGE014
wherein the content of the first and second substances,
Figure 89937DEST_PATH_IMAGE015
in order to achieve the optimum aspect ratio,
Figure 890403DEST_PATH_IMAGE016
and
Figure 472694DEST_PATH_IMAGE004
respectively representing the change rate of the ith vector line segment in the line graph in the directions of the x axis and the y axis, and writing the above expression into a line integral form as shown in the following expression:
Figure 492865DEST_PATH_IMAGE017
wherein C is the total arc length of the line segment, ds is the differential of the arc length,
Figure 186014DEST_PATH_IMAGE018
is the direction angle of the line segment; converting the above formula into a two-dimensional form to obtain a graph-based aspect ratio determination method, and regarding the gray scale map as a two-dimensional density distribution function
Figure 106566DEST_PATH_IMAGE007
Gradient thereof in the x-axis
Figure 594179DEST_PATH_IMAGE008
Instead of the former
Figure 334602DEST_PATH_IMAGE009
Density field of
Figure 831442DEST_PATH_IMAGE007
Gradient in y-axis
Figure 340921DEST_PATH_IMAGE010
Instead of the former
Figure 891113DEST_PATH_IMAGE011
Finally, an objective function calculated according to the optimal aspect ratio obtained from the gray scale map is as follows:
Figure 259778DEST_PATH_IMAGE012
wherein the content of the first and second substances,
Figure 153784DEST_PATH_IMAGE013
and the drawing area is a drawing area corresponding to the initial aspect ratio of the middle graph.
In this embodiment, the mapping module is specifically configured to:
acquiring drawing parameters input by a user and aiming at the graphic data;
and carrying out visual drawing on the graphic data in the initial drawing area according to the drawing parameters to obtain an intermediate graphic.
In this embodiment, the mapping parameter includes at least one of a graphic category, a value axis, a classification axis, and a filter condition.
According to the image processing system provided by the invention, the intermediate image made in the initial canvas area is subjected to screenshot, then the image obtained by screenshot is calculated based on the image aspect ratio algorithm to determine the optimal aspect ratio, finally the initial canvas area is adjusted according to the optimal aspect ratio, and the visualization plotting is carried out again in the adjusted canvas area, and finally the new image with the blank area removed can be obtained.
Furthermore, an embodiment of the present invention also proposes a readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the method described in the first embodiment.
Furthermore, an embodiment of the present invention also provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the steps of the method in the first embodiment when executing the program.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims (8)

1. A method of graphics processing, comprising:
acquiring graphic data to be visualized;
performing visual drawing on the graphic data in the initial drawing area to obtain an intermediate graphic;
screenshot is carried out on the intermediate graph according to the size of the initial layout area, and the picture obtained by screenshot is calculated by adopting an image-based aspect ratio algorithm so as to determine the optimal aspect ratio;
adjusting the initial canvas area according to the optimal horizontal and vertical ratio, and performing visual plotting on the graphic data in the adjusted canvas area again to obtain a new graphic without a blank area;
the method for determining the optimal aspect ratio comprises the following steps of calculating a picture obtained by screenshot by adopting an image-based aspect ratio algorithm:
carrying out graying processing on the picture obtained by screenshot to obtain a grayscale image;
and determining the optimal aspect ratio suitable for the gray-scale image by adopting a synthetic vector method for the gray-scale image.
2. The graphics processing method according to claim 1, wherein the step of determining the optimal aspect ratio suitable for the gray-scale map by using a composite vector method for the gray-scale map specifically comprises:
the resultant vector method based on the line graph takes the total rate of change of the line segments in the x and y directions as the aspect ratio, as shown in the following formula:
Figure 71259DEST_PATH_IMAGE001
wherein the content of the first and second substances,
Figure 170802DEST_PATH_IMAGE002
in order to achieve the optimum aspect ratio,
Figure 855861DEST_PATH_IMAGE003
and
Figure 331842DEST_PATH_IMAGE004
respectively representing the change rate of the ith vector line segment in the line graph in the directions of the x axis and the y axis, and writing the above expression into a line integral form as shown in the following expression:
Figure 153167DEST_PATH_IMAGE005
wherein C is the total arc length of the line segment, ds is the differential of the arc length,
Figure 190656DEST_PATH_IMAGE006
is the direction angle of the line segment; converting the above formula into a two-dimensional form to obtain a graph-based aspect ratio determination method, and regarding the gray scale map as a two-dimensional density distribution function
Figure 831853DEST_PATH_IMAGE007
Gradient thereof in the x-axis
Figure 845945DEST_PATH_IMAGE008
Instead of the former
Figure 787356DEST_PATH_IMAGE009
Density field of
Figure 228702DEST_PATH_IMAGE007
Gradient in y-axis
Figure 622774DEST_PATH_IMAGE010
Instead of the former
Figure 440557DEST_PATH_IMAGE011
Finally, an objective function calculated according to the optimal aspect ratio obtained from the gray scale map is as follows:
Figure 236475DEST_PATH_IMAGE012
wherein the content of the first and second substances,
Figure 350187DEST_PATH_IMAGE013
and the drawing area is a drawing area corresponding to the initial aspect ratio of the middle graph.
3. The method for processing graphics as claimed in claim 1, wherein said step of visually plotting said graphics data in said initial plotting area to obtain an intermediate graphic specifically comprises:
acquiring drawing parameters input by a user and aiming at the graphic data;
and carrying out visual drawing on the graphic data in the initial drawing area according to the drawing parameters to obtain an intermediate graphic.
4. The graphics processing method according to claim 3, wherein the plotting parameter includes at least one of a graphics class, a value axis, a classification axis, and a filter condition.
5. A graphics processing system, comprising:
the acquisition module is used for acquiring graphic data to be visualized;
the drawing module is used for carrying out visual drawing on the graphic data in the initial drawing area so as to obtain an intermediate graphic;
the calculation module is used for carrying out screenshot on the intermediate graph according to the size of the initial layout area and calculating the picture obtained by screenshot by adopting an image-based aspect ratio algorithm so as to determine the optimal aspect ratio;
the adjusting module is used for adjusting the initial canvas area according to the optimal horizontal and vertical ratio and performing visual construction on the graphic data in the adjusted canvas area again to obtain a new graphic with a blank area removed;
wherein the calculation module comprises:
the processing unit is used for carrying out graying processing on the picture obtained by screenshot to obtain a grayscale image;
and the determining unit is used for determining the optimal aspect ratio suitable for the gray-scale image by adopting a synthetic vector method for the gray-scale image.
6. The graphics processing system of claim 5, wherein the determination unit is specifically configured to:
the resultant vector method based on the line graph takes the total rate of change of the line segments in the x and y directions as the aspect ratio, as shown in the following formula:
Figure 497135DEST_PATH_IMAGE001
wherein the content of the first and second substances,
Figure 853029DEST_PATH_IMAGE002
in order to achieve the optimum aspect ratio,
Figure 503454DEST_PATH_IMAGE003
and
Figure 286602DEST_PATH_IMAGE004
respectively representing the change rate of the ith vector line segment in the line graph in the directions of the x axis and the y axis, and writing the above expression into a line integral form as shown in the following expression:
Figure 779900DEST_PATH_IMAGE005
wherein C is the total arc length of the line segment, ds is the differential of the arc length,
Figure 814852DEST_PATH_IMAGE006
is the direction angle of the line segment; converting the above formula into a two-dimensional form to obtain a graph-based aspect ratio determination method, and regarding the gray scale map as a two-dimensional density distribution function
Figure 945882DEST_PATH_IMAGE007
Gradient thereof in the x-axis
Figure 40877DEST_PATH_IMAGE008
Instead of the former
Figure 21471DEST_PATH_IMAGE009
Density field of
Figure 594535DEST_PATH_IMAGE007
Gradient in y-axis
Figure 344185DEST_PATH_IMAGE010
Instead of the former
Figure 875660DEST_PATH_IMAGE011
Finally, an objective function calculated according to the optimal aspect ratio obtained from the gray scale map is as follows:
Figure 812392DEST_PATH_IMAGE012
wherein the content of the first and second substances,
Figure 720305DEST_PATH_IMAGE013
and the drawing area is a drawing area corresponding to the initial aspect ratio of the middle graph.
7. A readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-4.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 4 when executing the program.
CN202010233670.3A 2020-03-30 2020-03-30 Graphic processing method, system, readable storage medium and computer device Active CN111126023B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010233670.3A CN111126023B (en) 2020-03-30 2020-03-30 Graphic processing method, system, readable storage medium and computer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010233670.3A CN111126023B (en) 2020-03-30 2020-03-30 Graphic processing method, system, readable storage medium and computer device

Publications (2)

Publication Number Publication Date
CN111126023A CN111126023A (en) 2020-05-08
CN111126023B true CN111126023B (en) 2020-07-28

Family

ID=70494019

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010233670.3A Active CN111126023B (en) 2020-03-30 2020-03-30 Graphic processing method, system, readable storage medium and computer device

Country Status (1)

Country Link
CN (1) CN111126023B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1154519A (en) * 1995-10-12 1997-07-16 夏普公司 Character pattern generator
CN108875703A (en) * 2018-07-14 2018-11-23 昆山数字城市信息技术有限公司 The SAR image lines detection method converted using vector Radon

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7417645B2 (en) * 2003-03-27 2008-08-26 Microsoft Corporation Markup language and object model for vector graphics
WO2013106984A1 (en) * 2012-01-16 2013-07-25 Google Inc. Learning painting styles for painterly rendering
CN103729853B (en) * 2014-01-15 2016-06-08 武汉大学 High score remote sensing image building under three-dimension GIS auxiliary damages detection method
CN104392486B (en) * 2014-11-25 2017-07-28 西安理工大学 One kind point cloud scene reconstruction method
CN105958942A (en) * 2016-05-13 2016-09-21 江苏中天科技软件技术有限公司 WEB based photovoltaic power station monitoring system
CN107393459B (en) * 2017-07-31 2020-07-31 京东方科技集团股份有限公司 Image display method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1154519A (en) * 1995-10-12 1997-07-16 夏普公司 Character pattern generator
CN108875703A (en) * 2018-07-14 2018-11-23 昆山数字城市信息技术有限公司 The SAR image lines detection method converted using vector Radon

Also Published As

Publication number Publication date
CN111126023A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
CN110427932B (en) Method and device for identifying multiple bill areas in image
US8368714B2 (en) Curved surface rendering system and method
CN110428414B (en) Method and device for identifying number of notes in image
KR102278147B1 (en) Clipping of graphics primitives
US20140294293A1 (en) Image processing circuit and image detection device
CN111260694B (en) Satellite remote sensing video target tracking method and device
US20140071124A1 (en) Image processing apparatus
CN115601385B (en) Bubble morphology processing method, device and medium
US20090309898A1 (en) Rendering apparatus and method
CN114926839A (en) Image identification method based on RPA and AI and electronic equipment
CN116152218A (en) Intelligent detection method and device for construction quality
EP4068220A1 (en) Image processing device, image processing method, moving device, and storage medium
CN111126023B (en) Graphic processing method, system, readable storage medium and computer device
CN111160084A (en) Dangerous article detection method, dangerous article detection device and storage medium
DE112012006274B4 (en) Character drawing apparatus and character drawing method
CN110807113B (en) Non-iterative elimination method for rectangular primitive overlap in visual layout
CN108447066B (en) Biliary tract image segmentation method, terminal and storage medium
CN114648455A (en) Ultrasonic image processing method, electronic device and storage medium
CN107330905B (en) Image processing method, device and storage medium
CN111009004B (en) Hardware optimization method for accelerating image matching
CN111626913B (en) Image processing method, device and storage medium
DE102012203122B4 (en) Method and system for determining a boundary surface mesh
US20220130135A1 (en) Data generation method, data generation device, and program
CN112348021A (en) Text detection method, device, equipment and storage medium
CN112116076A (en) Optimization method and optimization device for activation function

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